{"version":3,"file":"Facebook.CVRQRCIX.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/H9CvVrwLrFYAbKP9eYKI/LLwTL59gOwG1vkJhdZ4b/Facebook.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";import{containerStyles}from\"https://framer.com/m/framer/default-utils.js@^0.45.0\";import{emptyStateStyle,stateParagraphStyle,stateTitleStyle}from\"https://framer.com/m/framer/integrations-styles.js@0.2.0\";const facebookRegex=/^https?:\\/\\/(?:www\\.)?facebook\\.com\\//;/**\n * Facebook\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 200\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */ export default function Facebook({url,style,...props}){const encodedUrl=useMemo(()=>{if(!facebookRegex.test(url)){return null;}return encodeURIComponent(url.replace(/(\\?.*)/,\"\"));},[url]);return url&&encodedUrl?/*#__PURE__*/ _jsx(motion.iframe,{style:{...containerStyles,...style},src:`https://www.facebook.com/plugins/post.php?href=${encodedUrl}`,frameBorder:0,width:\"100%\",height:\"100%\",scrolling:\"no\",...props}):/*#__PURE__*/ _jsxs(motion.div,{style:{...emptyStateStyle,...style},...props,children:[/*#__PURE__*/ _jsx(\"h1\",{style:stateTitleStyle,children:\"Facebook\"}),url?/*#__PURE__*/ _jsx(\"p\",{style:stateParagraphStyle,children:\"This post URL doesn’t seem correct.\"}):/*#__PURE__*/ _jsx(\"p\",{style:stateParagraphStyle,children:\"Set a post URL in the Properties.\"})]});};addPropertyControls(Facebook,{url:{title:\"URL\",type:ControlType.String,placeholder:\"https://www.facebook.com/***\",defaultValue:\"https://www.facebook.com/framerjs/videos/284888495883514\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Facebook\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutWidth\":\"any\",\"framerIntrinsicWidth\":\"200\",\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"200\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Facebook.map"],"mappings":"uaAQI,SAAwB,EAAS,CAAC,MAAI,QAAM,GAAG,GAAO,CAAC,IAAM,EAAWA,MAAiB,EAAc,KAAK,CAAG,EAAuB,mBAAmB,EAAI,QAAQ,SAAS,EAAE,CAAC,EAAxD,KAA4D,CAAC,CAAG,CAAC,EAAE,OAAO,GAAK,EAAyB,EAAK,EAAO,OAAO,CAAC,MAAM,CAAC,GAAG,EAAgB,GAAG,CAAK,EAAE,IAAI,kDAAkD,IAAa,YAAY,EAAE,MAAM,OAAO,OAAO,OAAO,UAAU,KAAK,GAAG,CAAK,CAAC,EAAgB,EAAM,EAAO,IAAI,CAAC,MAAM,CAAC,GAAG,EAAgB,GAAG,CAAK,EAAE,GAAG,EAAM,SAAS,CAAe,EAAK,KAAK,CAAC,MAAM,EAAgB,SAAS,UAAU,CAAC,EAAE,EAAkB,EAAK,IAAI,CAAC,MAAM,EAAoB,SAAS,qCAAqC,CAAC,EAAgB,EAAK,IAAI,CAAC,MAAM,EAAoB,SAAS,mCAAmC,CAAC,CAAC,CAAC,CAAC,CAAE,mBARltB,IAA2B,IAAoD,IAAkC,IAAkF,IAA0H,EAAO,EAAc,wCAQkY,EAAoB,EAAS,CAAC,IAAI,CAAC,MAAM,MAAM,KAAK,EAAY,OAAO,YAAY,+BAA+B,aAAa,0DAA0D,CAAC,CAAC"}