{"version":3,"file":"StructuredData.PpBh4fez.mjs","names":["useMemo","_Fragment","__esmMin","init_jsx_runtime","pe","c","init_npm_react_18_3_1","addPropertyControls","init_framer_D1IzEvwH","ControlType","StructuredData","props","serializedSchema","origin","organizationId","resolvedImage","image","normalized","title","description","author","datePublished","serviceType","pagePath","slug","normalizedPagePath","schemaObject","schemaType","resolvedScriptId","trimmed","scriptId","l","init_StructuredData"],"sources":["https:/framerusercontent.com/modules/pxcIlTZD0HvmnLLrxf0q/sBz4KHwFjB9te9XHk2fm/StructuredData.js"],"sourcesContent":["import{jsx as _jsx,Fragment as _Fragment}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function StructuredData(props){const{schemaType,title,description,image,author,datePublished,serviceType,pagePath,slug,scriptId}=props;const serializedSchema=useMemo(()=>{const origin=\"https://www.usicomputer.com\";const organizationId=\"https://www.usicomputer.com/#organization\";const resolvedImage=typeof image===\"string\"?image:typeof image?.src===\"string\"?image.src:\"\";const normalized={title:title?.trim()??\"\",description:description?.trim()??\"\",image:resolvedImage.trim(),author:author?.trim()??\"\",datePublished:typeof datePublished===\"string\"||typeof datePublished===\"number\"?String(datePublished).trim():\"\",serviceType:serviceType?.trim()??\"\",pagePath:pagePath?.trim()??\"\",slug:slug?.trim()??\"\"};const normalizedPagePath=normalized.pagePath?normalized.pagePath.startsWith(\"/\")?normalized.pagePath:`/${normalized.pagePath}`:\"\";let schemaObject={};if(schemaType===\"Organization\"){schemaObject={\"@context\":\"https://schema.org\",\"@type\":\"Organization\",\"@id\":organizationId,name:\"Universal Systems\",url:origin};}else if(schemaType===\"Service\"){schemaObject={\"@context\":\"https://schema.org\",\"@type\":\"Service\",...normalized.title?{name:normalized.title}:{},...normalized.description?{description:normalized.description}:{},...normalized.serviceType?{serviceType:normalized.serviceType}:{},provider:{\"@id\":organizationId},url:`${origin}${normalizedPagePath}`};}else if(schemaType===\"Article\"){schemaObject={\"@context\":\"https://schema.org\",\"@type\":\"Article\",...normalized.title?{headline:normalized.title}:{},...normalized.description?{description:normalized.description}:{},...normalized.image?{image:normalized.image}:{},...normalized.author?{author:{\"@type\":\"Person\",name:normalized.author}}:{},...normalized.datePublished?{datePublished:normalized.datePublished}:{},publisher:{\"@id\":organizationId},mainEntityOfPage:`https://www.usicomputer.com/insights/${normalized.slug}`};}else{schemaObject={\"@context\":\"https://schema.org\",\"@type\":schemaType,...normalized.title?{name:normalized.title}:{},...normalized.description?{description:normalized.description}:{},url:`${origin}${normalizedPagePath}`};}return JSON.stringify(schemaObject).replace(/</g,\"\\\\u003c\").replace(/>/g,\"\\\\u003e\").replace(/&/g,\"\\\\u0026\").replace(/\\u2028/g,\"\\\\u2028\").replace(/\\u2029/g,\"\\\\u2029\");},[schemaType,title,description,image,author,datePublished,serviceType,pagePath,slug]);const resolvedScriptId=useMemo(()=>{const trimmed=scriptId?.trim();return trimmed&&trimmed.length>0?trimmed:\"structured-data-jsonld\";},[scriptId]);return /*#__PURE__*/_jsx(_Fragment,{children:/*#__PURE__*/_jsx(\"script\",{id:resolvedScriptId,type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:serializedSchema}})});}addPropertyControls(StructuredData,{schemaType:{type:ControlType.Enum,title:\"Schema Type\",options:[\"Organization\",\"Service\",\"Article\",\"AboutPage\",\"ContactPage\",\"CollectionPage\"],optionTitles:[\"Organization\",\"Service\",\"Article\",\"AboutPage\",\"ContactPage\",\"CollectionPage\"],defaultValue:\"Organization\"},title:{type:ControlType.String,title:\"Title\",defaultValue:\"\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"\",displayTextArea:true},image:{type:ControlType.Image,title:\"Image\"},author:{type:ControlType.String,title:\"Author\",defaultValue:\"\"},datePublished:{type:ControlType.Date,title:\"Date Published\"},serviceType:{type:ControlType.String,title:\"Service Type\",defaultValue:\"\"},pagePath:{type:ControlType.String,title:\"Page Path\",defaultValue:\"\"},slug:{type:ControlType.String,title:\"Slug\",defaultValue:\"\"},scriptId:{type:ControlType.String,title:\"Script ID\",defaultValue:\"structured-data-jsonld\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StructuredData\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StructuredData.map"],"mappings":"A,iLAGG,SAAwBU,EAAe,EAAM,CAAC,GAAK,CAAC,aAAW,QAAM,cAAY,QAAM,SAAO,gBAAc,cAAY,WAAS,OAAK,YAAUC,EAAYC,EAAiBZ,MAAY,CAAC,IAAMa,EAAO,8BAAoCC,EAAe,4CAAkDC,EAAc,OAAOC,GAAQ,SAASA,EAAM,OAAOA,GAAO,KAAM,SAASA,EAAM,IAAI,GAASC,EAAW,CAAC,MAAMC,GAAO,KAAK,GAAG,GAAG,YAAYC,GAAa,KAAK,GAAG,GAAG,MAAMJ,EAAc,KAAK,EAAE,OAAOK,GAAQ,KAAK,GAAG,GAAG,cAAc,OAAOC,GAAgB,UAAU,OAAOA,GAAgB,SAAS,OAAOA,CAAa,CAAC,CAAC,KAAK,EAAE,GAAG,YAAYC,GAAa,KAAK,GAAG,GAAG,SAASC,GAAU,KAAK,GAAG,GAAG,KAAKC,GAAM,KAAK,GAAG,EAAE,EAAQC,EAAmBR,EAAW,SAASA,EAAW,SAAS,WAAW,GAAG,EAAEA,EAAW,SAAS,IAAIA,EAAW,WAAW,GAAOS,EAAa,CAAC,EAAguC,MAA9tC,CAAqgCA,EAAlgCC,IAAa,eAA6B,CAAC,WAAW,qBAAqB,QAAQ,eAAe,MAAMb,EAAe,KAAK,oBAAoB,IAAID,CAAM,EAAWc,IAAa,UAAwB,CAAC,WAAW,qBAAqB,QAAQ,UAAU,GAAGV,EAAW,MAAM,CAAC,KAAKA,EAAW,KAA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