{"version":3,"file":"ServiceSchemaDirect.BKSDCNGd.mjs","names":["useMemo"],"sources":["https:/framerusercontent.com/modules/SpGLuyaRaTValcJwWRb0/6ybwyWxBBDIZktEWgA7w/ServiceSchemaDirect.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";function parseList(input){return input.split(/[\\n,]+/g).map(item=>item.trim()).filter(Boolean);}function cleanValue(value){if(value===null||value===undefined)return undefined;if(typeof value===\"string\")return value.trim()?value:undefined;if(Array.isArray(value)){const cleanedArray=value.map(item=>cleanValue(item)).filter(item=>item!==undefined);return cleanedArray.length>0?cleanedArray:undefined;}if(typeof value===\"object\"){const cleanedObject={};Object.entries(value).forEach(([key,entry])=>{const cleanedEntry=cleanValue(entry);if(cleanedEntry!==undefined)cleanedObject[key]=cleanedEntry;});return Object.keys(cleanedObject).length>0?cleanedObject:undefined;}return value;}function stripTrailingSlash(value){return value.replace(/\\/+$/g,\"\");}function ensureLeadingSlash(value){return value.startsWith(\"/\")?value:`/${value}`;}function isFullUrl(value){return/^https?:\\/\\//i.test(value.trim());}/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function ServiceSchemaDirect(props){const{siteUrl=\"https://www.creativemilkshake.com\",path,serviceName,description,serviceType=\"Performance creative and paid social advertising\",areaServed,providerName=\"Creative Milkshake\",providerUrl=\"https://www.creativemilkshake.com\",providerLogo,sameAsUrls,offersDescription}=props;const parsedSameAs=useMemo(()=>parseList(sameAsUrls||\"\"),[sameAsUrls]);const canonicalUrl=useMemo(()=>{const rawPath=(path||\"\").trim();if(!rawPath)return stripTrailingSlash((siteUrl||\"\").trim());if(isFullUrl(rawPath))return rawPath;const base=stripTrailingSlash((siteUrl||\"\").trim());return`${base}${ensureLeadingSlash(rawPath)}`;},[siteUrl,path]);const schema=useMemo(()=>{const rawSchema={\"@context\":\"https://schema.org\",\"@type\":\"Service\",name:serviceName,description,serviceType,url:canonicalUrl,provider:{\"@type\":\"Organization\",name:providerName,url:providerUrl,logo:providerLogo?{\"@type\":\"ImageObject\",url:providerLogo}:undefined,sameAs:parsedSameAs},areaServed,offers:offersDescription?{\"@type\":\"Offer\",description:offersDescription}:undefined,mainEntityOfPage:canonicalUrl?{\"@type\":\"WebPage\",\"@id\":canonicalUrl}:undefined};return cleanValue(rawSchema);},[serviceName,description,serviceType,canonicalUrl,providerName,providerUrl,providerLogo,parsedSameAs,areaServed,offersDescription]);const schemaJson=useMemo(()=>JSON.stringify(schema),[schema]);return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",style:{position:\"relative\",width:0,height:0,overflow:\"hidden\",opacity:0,pointerEvents:\"none\"},children:/*#__PURE__*/_jsx(\"script\",{id:\"service-schema-direct\",type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:schemaJson}})});}addPropertyControls(ServiceSchemaDirect,{siteUrl:{type:ControlType.String,title:\"Site URL\",defaultValue:\"https://www.creativemilkshake.com\"},path:{type:ControlType.String,title:\"Path\",defaultValue:\"\"},serviceName:{type:ControlType.String,title:\"Name\",defaultValue:\"\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"\",displayTextArea:true},serviceType:{type:ControlType.String,title:\"Type\",defaultValue:\"Performance creative and paid social advertising\"},areaServed:{type:ControlType.String,title:\"Area\",defaultValue:\"\"},providerName:{type:ControlType.String,title:\"Provider\",defaultValue:\"Creative Milkshake\"},providerUrl:{type:ControlType.String,title:\"Provider URL\",defaultValue:\"https://www.creativemilkshake.com\"},providerLogo:{type:ControlType.String,title:\"Logo\",defaultValue:\"\"},sameAsUrls:{type:ControlType.String,title:\"Same As\",defaultValue:\"\",displayTextArea:true},offersDescription:{type:ControlType.String,title:\"Offer Desc\",defaultValue:\"\",displayTextArea:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ServiceSchemaDirect\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"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