{"version":3,"file":"Spotify.Deme4Kgd.mjs","names":["useCallback"],"sources":["https:/framerusercontent.com/modules/guoapDNX45i0XQUQQy1D/x9cWfpdrxveGxCtDeXGW/LcK9tKaqm.js","https:/framerusercontent.com/modules/tW1ExjbbJRt9YcZ0Gyxk/7xLQ6of7kXWmBUVuRiYG/Spotify.js"],"sourcesContent":["// Generated by Framer (27dd866)\nimport{fontStore}from\"framer\";fontStore.loadFonts([\"GF;Geist-regular\",\"GF;Geist-700\",\"GF;Geist-700italic\",\"GF;Geist-italic\"]);export const fonts=[{explicitInter:true,fonts:[{cssFamilyName:\"Geist\",source:\"google\",style:\"normal\",uiFamilyName:\"Geist\",url:\"https://fonts.gstatic.com/s/geist/v5/gyBhhwUxId8gMGYQMKR3pzfaWI_RnOM4mJPby1QNtA.woff2\",weight:\"400\"},{cssFamilyName:\"Geist\",source:\"google\",style:\"normal\",uiFamilyName:\"Geist\",url:\"https://fonts.gstatic.com/s/geist/v5/gyBhhwUxId8gMGYQMKR3pzfaWI_Re-Q4mJPby1QNtA.woff2\",weight:\"700\"},{cssFamilyName:\"Geist\",source:\"google\",style:\"italic\",uiFamilyName:\"Geist\",url:\"https://fonts.gstatic.com/s/geist/v5/gyBjhwUxId8gMEwZAluvzlxA9ojEVKA32Zna6VEdtKCL.woff2\",weight:\"700\"},{cssFamilyName:\"Geist\",source:\"google\",style:\"italic\",uiFamilyName:\"Geist\",url:\"https://fonts.gstatic.com/s/geist/v5/gyBjhwUxId8gMEwZAluvzlxA9ojEVKDQ3pna6VEdtKCL.woff2\",weight:\"400\"}]}];export const css=['.framer-7iwfH .framer-styles-preset-1f8a6pp:not(.rich-text-wrapper), .framer-7iwfH .framer-styles-preset-1f8a6pp.rich-text-wrapper h3 { --framer-font-family: \"Geist\", \"Geist Placeholder\", sans-serif; --framer-font-family-bold: \"Geist\", \"Geist Placeholder\", sans-serif; --framer-font-family-bold-italic: \"Geist\", \"Geist Placeholder\", sans-serif; --framer-font-family-italic: \"Geist\", \"Geist Placeholder\", sans-serif; --framer-font-open-type-features: normal; --framer-font-size: 30px; --framer-font-style: normal; --framer-font-style-bold: normal; --framer-font-style-bold-italic: italic; --framer-font-style-italic: italic; --framer-font-variation-axes: normal; --framer-font-weight: 400; --framer-font-weight-bold: 700; --framer-font-weight-bold-italic: 700; --framer-font-weight-italic: 400; --framer-letter-spacing: -0.01em; --framer-line-height: 100%; --framer-paragraph-spacing: 40px; --framer-text-alignment: center; --framer-text-color: #000000; --framer-text-decoration: none; --framer-text-stroke-color: initial; --framer-text-stroke-width: initial; --framer-text-transform: none; --framer-text-wrap: balance; }'];export const className=\"framer-7iwfH\";\nexport const __FramerMetadata__ = {\"exports\":{\"fonts\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"css\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"className\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}","import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useCallback}from\"react\";const urlRegex=/(https?:\\/\\/[^ ]*)/;/**\n * SPOTIFY\n *\n * @framerIntrinsicWidth 280\n * @framerIntrinsicHeight 350\n */ export function Spotify(props){const{theme,url:sourceUrl}=props;const createEmbedUrl=useCallback(()=>{if(sourceUrl.length<5)return null;// If someone pastes the embed code lets still try to render it\nconst strippedUrl=sourceUrl.includes(\"iframe\")?sourceUrl.match(urlRegex)[1].replace(`\"`,\"\"):sourceUrl;const url=new URL(strippedUrl);// Add embed prefix if needed\nif(!url.pathname.includes(\"embed\"))url.pathname=`/embed${url.pathname}`;// Remove params\nurl.search=`theme=${theme}`;// @ben you could add all other bools in here like\n// url.search = `theme=${theme}&dog=${cat}`\nreturn url.toString();},[theme,sourceUrl]);const identifier=createEmbedUrl();return(/*#__PURE__*/ _jsx(\"iframe\",{style:{height:\"100%\",width:\"100%\"},frameBorder:0,src:identifier}));}Spotify.defaultProps={url:\"https://open.spotify.com/album/31qVWUdRrlb8thMvts0yYL?si=Jl-8Mnc3RNGuOtqRC7NXVg\",width:280,height:350,theme:1};addPropertyControls(Spotify,{url:{type:ControlType.String,title:\"URL\"},theme:{type:ControlType.Enum,displaySegmentedControl:true,options:[1,0],optionTitles:[\"On\",\"Off\"]}});\nexport const __FramerMetadata__ = {\"exports\":{\"Spotify\":{\"type\":\"reactComponent\",\"name\":\"Spotify\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerIntrinsicHeight\":\"350\",\"framerIntrinsicWidth\":\"280\"}}}}\n//# sourceMappingURL=./Spotify.map"],"mappings":"uMAC6B,EAAC,EAAU,UAAU,CAAC,mBAAmB,eAAe,qBAAqB,iBAAiB,CAAC,EAAe,EAAM,CAAC,CAAC,cAAc,GAAK,MAAM,CAAC,CAAC,cAAc,QAAQ,OAAO,SAAS,MAAM,SAAS,aAAa,QAAQ,IAAI,wFAAwF,OAAO,KAAK,EAAE,CAAC,cAAc,QAAQ,OAAO,SAAS,MAAM,SAAS,aAAa,QAAQ,IAAI,wFAAwF,OAAO,KAAK,EAAE,CAAC,cAAc,QAAQ,OAAO,SAAS,MAAM,SAAS,aAAa,QAAQ,IAAI,0FAA0F,OAAO,KAAK,EAAE,CAAC,cAAc,QAAQ,OAAO,SAAS,MAAM,SAAS,aAAa,QAAQ,IAAI,0FAA0F,OAAO,KAAK,CAAC,CAAC,CAAC,EAAe,EAAI,CAAC,kmCAAkmC,EAAe,EAAU,kBCIjhE,SAAgB,EAAQ,EAAM,CAAC,GAAK,CAAC,QAAM,IAAI,GAAW,EAKe,OAAqB,EAAK,SAAS,CAAC,MAAM,CAAC,OAAO,OAAO,MAAM,MAAM,EAAE,YAAY,EAAE,IALzEA,MAAgB,CAAC,GAAG,EAAU,OAAO,EAAE,OAAO,KACvI,IAAM,EAAY,EAAU,SAAS,QAAQ,EAAE,EAAU,MAAM,CAAQ,CAAC,CAAC,EAAE,CAAC,QAAQ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