{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/uGQZtcsxBzvxqsgxQ0Tz/cGBHXozmXUtcAABEfMAq/Hubspot.js", "ssg:https://framer.com/m/framer/integrations-styles.js@0.2.0", "ssg:https://framer.com/m/framer/default-utils.js@^0.43.0", "ssg:https://framerusercontent.com/modules/cuQH4dmpDnV8YK1mSgQX/tTLhbOFToDhKcwOVmn8E/useFontControls.js", "ssg:https://framerusercontent.com/modules/afBE9Yx1W6bY5q32qPxe/AAh30yXzt1DUsOi1YwUY/useRenderTarget.js"],
  "sourcesContent": ["import { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nimport * as React from \"react\";\nimport { addPropertyControls, ControlType } from \"framer\";\nimport { emptyStateStyle, stateParagraphStyle, stateTitleStyle } from \"https://framer.com/m/framer/integrations-styles.js@0.2.0\";\nfunction poll(f, delay = 200, count = 50, i = 0) {\n  if (i > count) {\n    console.error(\"poll max attempts\", f);\n    return;\n  }\n  if (!f()) {\n    console.log(\"poll\", delay, count, i);\n    setTimeout(() => {\n      poll(f, delay, count, i + 1);\n    }, delay);\n  }\n}\nfunction EmptyState({\n  title,\n  description\n}) {\n  return /*#__PURE__*/_jsxs(\"div\", {\n    style: {\n      ...emptyStateStyle,\n      width: \"100%\",\n      height: \"100%\"\n    },\n    children: [/*#__PURE__*/_jsx(\"h1\", {\n      style: stateTitleStyle,\n      children: title\n    }), /*#__PURE__*/_jsx(\"p\", {\n      style: stateParagraphStyle,\n      children: description\n    })]\n  });\n} /**\n  * HUBSPOT\n  *\n  * @framerIntrinsicWidth 480\n  * @framerIntrinsicHeight 300\n  *\n  * @framerSupportedLayoutWidth fixed\n  * @framerSupportedLayoutHeight fixed\n  */\nexport default function HubSpotForm({\n  portalId,\n  formId,\n  advanced,\n  region,\n  id\n}) {\n  if (!portalId || !formId || !region) {\n    return /*#__PURE__*/_jsx(EmptyState, {\n      title: \"Hubspot\",\n      description: \"Set a portal ID and form in the Properties.\"\n    });\n  } // const ref = React.createRef<HTMLDivElement>()\n  const elementId = `hubspot_form_${id}`;\n  const cleanup = () => {\n    const element = document.querySelector(`#${elementId}`);\n    if (element) element.innerHTML = \"\";\n  };\n  React.useEffect(() => {\n    if (window.hbspt) {\n      handleScriptLoad();\n      return cleanup;\n    }\n    const script = document.createElement(\"script\");\n    script.src = `https://js-${region}.hsforms.net/forms/shell.js`;\n    script.onload = handleScriptLoad();\n    document.body.appendChild(script);\n    return cleanup;\n  }, [portalId, formId, region]);\n  const handleScriptLoad = () => {\n    console.log(\"Loading HubSpot form...\", portalId);\n    poll(() => {\n      if (!window.hbspt) {\n        console.warn(`HubSpot could not be loaded: window.hbspt is missing`);\n        return false;\n      }\n      if (!document.querySelector(`#${elementId}`)) {\n        console.warn(`HubSpot could not be loaded: element not found #${elementId}`);\n        return false;\n      }\n      cleanup();\n      window.hbspt.forms.create({\n        region,\n        portalId,\n        formId,\n        target: `#${elementId}`,\n        formInstanceId: formId\n      });\n      return true;\n    });\n  };\n  return /*#__PURE__*/_jsx(\"div\", {\n    style: {\n      width: \"100%\",\n      height: \"100%\"\n    },\n    id: elementId\n  });\n}\n;\naddPropertyControls(HubSpotForm, {\n  portalId: {\n    title: \"Portal\",\n    type: ControlType.String,\n    placeholder: \"25276298\",\n    // defaultValue: \"25276298\",\n    description: \"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/)\"\n  },\n  formId: {\n    title: \"Form\",\n    type: ControlType.String,\n    placeholder: \"e7167571-4bc4-4c2c-bfdc-a0a8dbfd22f1\"\n  },\n  advanced: {\n    title: \"Advanced\",\n    type: ControlType.Boolean,\n    enabledTitle: \"Show\",\n    disabledTitle: \"Hide\",\n    defaultValue: false\n  },\n  region: {\n    title: \"Region\",\n    type: ControlType.String,\n    placeholder: \"eu1\",\n    defaultValue: \"eu1\",\n    hidden: ({\n      advanced\n    }) => !advanced\n  }\n});\nexport const __FramerMetadata__ = {\n  \"exports\": {\n    \"default\": {\n      \"type\": \"reactComponent\",\n      \"name\": \"HubSpotForm\",\n      \"slots\": [],\n      \"annotations\": {\n        \"framerIntrinsicHeight\": \"300\",\n        \"framerSupportedLayoutHeight\": \"fixed\",\n        \"framerContractVersion\": \"1\",\n        \"framerSupportedLayoutWidth\": \"fixed\",\n        \"framerIntrinsicWidth\": \"480\"\n      }\n    },\n    \"__FramerMetadata__\": {\n      \"type\": \"variable\"\n    }\n  }\n};\n//# sourceMappingURL=./Hubspot.map", "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 { defaultEvents, localeOptions, fontControls, fontSizeOptions, emptyStateStyle, containerStyles, fontStack } from \"https://framerusercontent.com/modules/VTUDdizacRHpwbkOamr7/AykinQJbgwl92LvMGZwu/constants.js\";\nimport { useOnEnter, useOnExit } from \"https://framerusercontent.com/modules/D4TWeLfcxT6Tysr2BlYg/iZjmqdxVx1EOiM3k1FaW/useOnNavigationTargetChange.js\";\nimport { useConstant } from \"https://framerusercontent.com/modules/ExNgrA7EJTKUPpH6vIlN/eiOrSJ2Ab5M9jPCvVwUz/useConstant.js\";\nimport { colorTokentoValue, colorFromToken } from \"https://framerusercontent.com/modules/D2Lz5CmnNVPZFFiZXalt/QaCzPbriZBfXWZIIycFI/colorFromToken.js\";\nimport { isMotionValue } from \"https://framerusercontent.com/modules/3mKFSGQqKHV82uOV1eBc/5fbRLvOpxZC0JOXugvwm/isMotionValue.js\";\nimport { useUniqueClassName, randomID } from \"https://framerusercontent.com/modules/xDiQsqBGXzmMsv7AlEVy/uhunpMiNsbXxzjlXsg1y/useUniqueClassName.js\";\nimport { getVariantControls } from \"https://framerusercontent.com/modules/ETACN5BJyFTSo0VVDJfu/NHRqowOiXkF9UwOzczF7/variantUtils.js\";\nimport { useIsBrowserSafari } from \"https://framerusercontent.com/modules/eMBrwoqQK7h6mEeGQUH8/GuplvPJVjmxpk9zqOTcb/isBrowser.js\";\nimport { useMultiOnChange, useOnChange } from \"https://framerusercontent.com/modules/v9AWX2URmiYsHf7GbctE/XxKAZ9KlhWqf5x1JMyyF/useOnChange.js\";\nimport { mstoMinAndSec, secondsToMinutes } from \"https://framerusercontent.com/modules/4zHZnO5JojN1PrIbu2jm/revv9QCWpkh8lPzi2jje/time.js\";\nimport { useAutoMotionValue } from \"https://framerusercontent.com/modules/kNDwabfjDEb3vUxkQlZS/fSIr3AOAYbGlfSPgXpYu/useAutoMotionValue.js\";\nimport { useFontControls } from \"https://framerusercontent.com/modules/cuQH4dmpDnV8YK1mSgQX/tTLhbOFToDhKcwOVmn8E/useFontControls.js\";\nimport { useRenderTarget, useIsInPreview } from \"https://framerusercontent.com/modules/afBE9Yx1W6bY5q32qPxe/AAh30yXzt1DUsOi1YwUY/useRenderTarget.js\";\nimport { useControlledState } from \"https://framerusercontent.com/modules/zGkoP8tPDCkoBzMdt5uq/0zFSjxIYliHxrQQnryFX/useControlledState.js\";\nimport { usePadding, useRadius, paddingControl, borderRadiusControl } from \"https://framerusercontent.com/modules/5SM58HxZHxjjv7aLMOgQ/WXz9i6mVki0bBCrKdqB3/propUtils.js\";\nimport { detectAutoSizingAxis } from \"https://framerusercontent.com/modules/8CkHAZatUz1UR8jNTcfD/HwbnIAZlUmQ2oTpcLkaH/detectAutoSizingAxis.js\";\nexport { useOnEnter, useOnExit, defaultEvents, isMotionValue, colorFromToken, colorTokentoValue, localeOptions, fontControls, fontSizeOptions, emptyStateStyle, containerStyles, fontStack, useUniqueClassName, getVariantControls, useIsBrowserSafari, randomID, useConstant, useMultiOnChange, useOnChange, usePadding, useRadius, paddingControl, borderRadiusControl, mstoMinAndSec, useFontControls, secondsToMinutes, useAutoMotionValue, useRenderTarget, useIsInPreview, useControlledState, detectAutoSizingAxis,  };\n\nexport const __FramerMetadata__ = {\"exports\":{\"fontControls\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"mstoMinAndSec\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"colorTokentoValue\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useFontControls\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useUniqueClassName\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"paddingControl\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"localeOptions\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fontStack\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"detectAutoSizingAxis\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useRenderTarget\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useOnEnter\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"emptyStateStyle\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useIsBrowserSafari\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"getVariantControls\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useAutoMotionValue\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"randomID\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useOnExit\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useIsInPreview\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useRadius\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"usePadding\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useMultiOnChange\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"containerStyles\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"fontSizeOptions\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"defaultEvents\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useConstant\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"isMotionValue\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useOnChange\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"useControlledState\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"borderRadiusControl\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"colorFromToken\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"secondsToMinutes\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}", "// @ts-ignore\nimport { fontStore } from \"framer\";\nimport { useEffect } from \"react\";\n// @ts-ignore\nimport { fontStack } from \"https://framerusercontent.com/modules/VTUDdizacRHpwbkOamr7/AykinQJbgwl92LvMGZwu/constants.js\";\nconst fontWeights = {\n  100: \"Thin\",\n  200: \"Extra-light\",\n  300: \"Light\",\n  400: \"Regular\",\n  500: \"Medium\",\n  600: \"Semi-bold\",\n  700: \"Bold\",\n  800: \"Extra-bold\",\n  900: \"Black\"\n};\nexport function useFontControls(props) {\n  const {\n    fontFamily,\n    fontSize,\n    fontWeight,\n    font\n  } = props;\n  const fontWeightName = fontWeights[fontWeight];\n  const customFontStack = `\"${fontFamily} ${fontWeightName}\", \"${fontFamily}\", ${fontStack}`;\n  const fontFamilyStyle = fontFamily ? {\n    fontSize,\n    fontWeight,\n    fontFamily: customFontStack\n  } : {\n    fontSize,\n    fontWeight\n  };\n  const fetchCustomFonts = async () => {\n    await fontStore.loadWebFontsFromSelectors([`CUSTOM;${fontFamily}`, `CUSTOM;${fontFamily} ${fontWeightName}`, `GF;${fontFamily}-${fontWeightName.toLowerCase()}`]).catch(e => console.error(e));\n  };\n  useEffect(() => {\n    if (font) fetchCustomFonts();\n  }, [font, fontFamily, fontWeight]);\n  return fontFamilyStyle;\n}\nexport const __FramerMetadata__ = {\n  \"exports\": {\n    \"useFontControls\": {\n      \"type\": \"function\",\n      \"annotations\": {\n        \"framerContractVersion\": \"1\"\n      }\n    }\n  }\n};\n//# sourceMappingURL=./useFontControls.map", "import { useMemo } from \"react\";\nimport { RenderTarget } from \"framer\";\nexport function useRenderTarget() {\n  const currentRenderTarget = useMemo(() => RenderTarget.current(), []);\n  return currentRenderTarget;\n}\nexport function useIsInPreview() {\n  const inPreview = useMemo(() => RenderTarget.current() === RenderTarget.preview, []);\n  return inPreview;\n}\nexport const __FramerMetadata__ = {\n  \"exports\": {\n    \"useIsInPreview\": {\n      \"type\": \"function\",\n      \"annotations\": {\n        \"framerContractVersion\": \"1\"\n      }\n    },\n    \"useRenderTarget\": {\n      \"type\": \"function\",\n      \"annotations\": {\n        \"framerContractVersion\": \"1\"\n      }\n    }\n  }\n};\n//# sourceMappingURL=./useRenderTarget.map"],
  "mappings": "uMAAAA,ICAAC,ICAAC,ICAAC,ICAAC,I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AIC,EAAO,MACT,OAAAC,EAAiB,EACVJ,EAET,IAAMK,EAAS,SAAS,cAAc,QAAQ,EAC9C,OAAAA,EAAO,IAAM,cAAcR,+BAC3BQ,EAAO,OAASD,EAAiB,EACjC,SAAS,KAAK,YAAYC,CAAM,EACzBL,CACT,EAAG,CAACN,EAAUC,EAAQE,CAAM,CAAC,EAC7B,IAAMO,EAAmB,IAAM,CAC7B,QAAQ,IAAI,0BAA2BV,CAAQ,EAC/Cd,EAAK,IACEuB,EAAO,MAIP,SAAS,cAAc,IAAIJ,GAAW,GAI3CC,EAAQ,EACRG,EAAO,MAAM,MAAM,OAAO,CACxB,OAAAN,EACA,SAAAH,EACA,OAAAC,EACA,OAAQ,IAAII,IACZ,eAAgBJ,CAClB,CAAC,EACM,KAXL,QAAQ,KAAK,mDAAmDI,GAAW,EACpE,KALP,QAAQ,KAAK,sDAAsD,EAC5D,GAeV,CACH,EACA,OAAoBT,EAAK,MAAO,CAC9B,MAAO,CACL,MAAO,OACP,OAAQ,MACV,EACA,GAAIS,CACN,CAAC,CACH,CAEAO,EAAoBb,EAAa,CAC/B,SAAU,CACR,MAAO,SACP,KAAMc,EAAY,OAClB,YAAa,WAEb,YAAa,2JACf,EACA,OAAQ,CACN,MAAO,OACP,KAAMA,EAAY,OAClB,YAAa,sCACf,EACA,SAAU,CACR,MAAO,WACP,KAAMA,EAAY,QAClB,aAAc,OACd,cAAe,OACf,aAAc,EAChB,EACA,OAAQ,CACN,MAAO,SACP,KAAMA,EAAY,OAClB,YAAa,MACb,aAAc,MACd,OAAQ,CAAC,CACP,SAAAX,CACF,IAAM,CAACA,CACT,CACF,CAAC",
  "names": ["init_shims", "init_shims", "init_shims", "init_shims", "init_shims", "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"]
}
