{
  "version": 3,
  "sources": ["ssg:https://framer.com/m/framer/integrations-styles.js@0.2.0", "ssg:https://framerusercontent.com/modules/uGQZtcsxBzvxqsgxQ0Tz/b7VYVaGCWWNyhqVsgsiv/Hubspot.js", "ssg:https://framerusercontent.com/modules/susNkLV8nKwKgqpslNpb/4TqYwGdFOMH8EGbXZW1r/WithHubSpotFormStyles.js"],
  "sourcesContent": ["import{containerStyles,emptyStateStyle as defaultEmptyStateStyle}from\"https://framer.com/m/framer/default-utils.js@^0.43.0\";export const emptyStateStyle={...containerStyles,...defaultEmptyStateStyle,textAlign:\"center\",padding:15,width:200,height:100,overflow:\"hidden\"};export const neutralStateStyle={...emptyStateStyle,color:\"#09f\",background:\"rgb(0, 153, 255, 0.1)\",borderColor:\"#09f\"};export const stateTitleStyle={fontSize:12,fontWeight:600,margin:0};export const stateParagraphStyle={fontSize:12,maxWidth:200,lineHeight:1.4,margin:\"5px 0 0 0\"};\nexport const __FramerMetadata__ = {\"exports\":{\"neutralStateStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"stateTitleStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"emptyStateStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"stateParagraphStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./styles.map", "import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{emptyStateStyle,stateParagraphStyle,stateTitleStyle}from\"https://framer.com/m/framer/integrations-styles.js@0.2.0\";// Poll for 5 minutes ...\nfunction poll(f,delay=200,count=5*60*5,i=0){if(i>count){console.error(\"poll max attempts\",f);return;}if(!f()){console.log(\"poll\",delay,count,i);setTimeout(()=>{poll(f,delay,count,i+1);},delay);}}function EmptyState({title,description}){return /*#__PURE__*/_jsxs(\"div\",{style:{...emptyStateStyle,width:\"100%\",height:\"100%\"},children:[/*#__PURE__*/_jsx(\"h1\",{style:stateTitleStyle,children:title}),/*#__PURE__*/_jsx(\"p\",{style:stateParagraphStyle,children:description})]});}/**\n * HUBSPOT\n *\n * @framerIntrinsicWidth 480\n * @framerIntrinsicHeight 300\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function HubSpotForm({portalId,formId,advanced,region,id}){if(!portalId||!formId||!region){return /*#__PURE__*/_jsx(EmptyState,{title:\"Hubspot\",description:\"Set a portal ID and form in the Properties.\"});}// const ref = React.createRef<HTMLDivElement>()\nconst elementId=`hubspot_form_${id}`;const cleanup=()=>{const element=document.querySelector(`#${elementId}`);if(element)element.innerHTML=\"\";};React.useEffect(()=>{if(window.hbspt){handleScriptLoad();return cleanup;}const script=document.createElement(\"script\");script.src=`https://js-${region}.hsforms.net/forms/shell.js`;script.onload=handleScriptLoad();document.body.appendChild(script);return cleanup;},[portalId,formId,region]);const handleScriptLoad=()=>{console.log(\"Loading HubSpot form...\",portalId);poll(()=>{if(!window.hbspt){console.warn(`HubSpot could not be loaded: window.hbspt is missing`);return false;}if(!document.querySelector(`#${elementId}`)){console.warn(`HubSpot could not be loaded: element not found #${elementId}`);return false;}cleanup();window.hbspt.forms.create({region,portalId,formId,target:`#${elementId}`,formInstanceId:formId});return true;});};return /*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\"},id:elementId});}addPropertyControls(HubSpotForm,{portalId:{title:\"Portal\",type:ControlType.String,placeholder:\"25276298\",// defaultValue: \"25276298\",\ndescription:\"Create a [Hubspot](https://www.hubspot.com/) account, add a new form and copy your portal ID. [Learn more\u2026](https://www.framer.com/plugins/hubspot/)\"},formId:{title:\"Form\",type:ControlType.String,placeholder:\"e7167571-4bc4-4c2c-bfdc-a0a8dbfd22f1\"},advanced:{title:\"Advanced\",type:ControlType.Boolean,enabledTitle:\"Show\",disabledTitle:\"Hide\",defaultValue:false},region:{title:\"Region\",type:ControlType.String,placeholder:\"eu1\",defaultValue:\"eu1\",hidden:({advanced})=>!advanced}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"HubSpotForm\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"fixed\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"300\",\"framerIntrinsicWidth\":\"480\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Hubspot.map", "// WithHubSpotFormStyles.tsx\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect}from\"react\";export function WithHubSpotFormStyles(){useEffect(()=>{const style=document.createElement(\"style\");style.innerHTML=`\n.hubspot-form-wrapper {\n  width: 100%;\n}\n\n.hubspot-form-wrapper  > * {\n  width: 100% !important;\n  height: auto !important;\n}\n\n.hubspot-form-wrapper .hs-form label {\n    display: flex;\n    margin-bottom: 0.5rem;\n}\n\n.hubspot-form-wrapper .hs-form textarea {\n    min-height: 100px;\n    width: 100% !important;\n}\n\n.hubspot-form-wrapper .hs-form select,\n.hubspot-form-wrapper .hs-form input[type=\"email\"],\n.hubspot-form-wrapper .hs-form input[type=\"text\"], \n.hubspot-form-wrapper .hs-form input[type=\"tel\"] {\n    width: 100% !important;\n    height: 42px;\n}\n\n.hubspot-form-wrapper .hs-form fieldset {\n    display: flex;\n    flex-wrap: wrap;\n    gap: 1rem;\n}\n\n.hubspot-form-wrapper .inputs-list {\n    padding-left: 0;\n    list-style: none;\n}\n\n.hubspot-form-wrapper .inputs-list li label {\n    align-content: center;\n    gap: 0.25rem;\n}\n\n.hubspot-form-wrapper .inputs-list li label span {\n    line-height: 2;\n}\n\n.hubspot-form-wrapper .hs-error-msgs {\n  background-color: #ffe5e5;\n  padding: 0.75rem 1rem;\n  margin-top: 0.5rem;\n  border-left: 4px solid #d33;\n  border-radius: 4px;\n  list-style: none;\n  font-size: 14px;\n  color: #a00;\n  display: flex;\n  flex-direction: column;\n  gap: 0.5rem;\n  margin-bottom: 0;\n}\n\n.hubspot-form-wrapper .hs-error-msgs li {\n  margin: 0;\n  padding: 0;\n}\n\n.hubspot-form-wrapper .hs-error-msgs label.hs-error-msg {\n  font-weight: 500;\n  display: block;\n  margin-bottom: 0;\n}\n\n.hubspot-form-wrapper .hs-form .hs-form-field {\n    width: 100% !important;\n    margin-bottom: 1.25rem;\n}\n\n.hubspot-form-wrapper .hs-form .hs-input {\n    width: 100%;\n    font-size: 16px;\n    border-radius: 6px;\n    border: 1px solid #ccc;\n    background-color: #fff;\n}\n\n.hubspot-form-wrapper .hs-form .hs-button.primary {\n    align-content: center;\n    align-items: center;\n    background-color: var(--token-a921b5cb-12e4-4b2a-9d51-0e902a370cbf, #e35554);\n    border-radius: 80px;\n    border: none;\n    display: flex;\n    flex: none;\n    flex-direction: row;\n    flex-wrap: nowrap;\n    gap: 8px;\n    justify-content: center;\n    padding: 1rem 2rem;\n    overflow: hidden;\n    cursor: pointer;\n    font-size: 16px;\n    line-height: 0.9;\n}\n\n.hubspot-form-wrapper .hs-form .hs-button.primary:hover {\n    background: #222;\n    color: #fff;\n}\n    `;document.head.appendChild(style);return()=>{document.head.removeChild(style);};},[]);return{className:\"hubspot-form-wrapper\"};}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withWithHubSpotFormStyles(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...WithHubSpotFormStyles(props)});};}withWithHubSpotFormStyles.displayName=\"WithHubSpotFormStyles\";\nexport const __FramerMetadata__ = {\"exports\":{\"withWithHubSpotFormStyles\":{\"type\":\"reactHoc\",\"name\":\"withWithHubSpotFormStyles\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"WithHubSpotFormStyles\":{\"type\":\"override\",\"name\":\"WithHubSpotFormStyles\",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AAQ,CAAC,CAAC,ECV3Z,SAASY,GAAuB,CAAC,OAAAC,EAAU,IAAI,CAAC,IAAMC,EAAM,SAAS,cAAc,OAAO,EAAE,OAAAA,EAAM,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MA8GrL,SAAS,KAAK,YAAYA,CAAK,EAAQ,IAAI,CAAC,SAAS,KAAK,YAAYA,CAAK,CAAE,CAAE,EAAE,CAAC,CAAC,EAAQ,CAAC,UAAU,sBAAsB,CAAE,CAA2J,SAASC,EAA0BC,EAAE,CAAC,OAAOC,IAAQC,EAA+BC,CAAuC,EAASC,EAAKJ,EAAE,CAAC,GAAGC,EAAM,GAAGL,EAAsBK,CAAK,CAAC,CAAC,EAAI,CAACF,EAA0B,YAAY",
  "names": ["emptyStateStyle", "containerStyles", "neutralStateStyle", "stateTitleStyle", "stateParagraphStyle", "poll", "f", "delay", "count", "i", "EmptyState", "title", "description", "u", "emptyStateStyle", "p", "stateTitleStyle", "stateParagraphStyle", "HubSpotForm", "portalId", "formId", "advanced", "region", "id", "elementId", "cleanup", "element", "ue", "window", "handleScriptLoad", "script", "addPropertyControls", "ControlType", "WithHubSpotFormStyles", "ue", "style", "withWithHubSpotFormStyles", "C", "props", "re", "DataObserverContext", "p"]
}
