{"version":3,"file":"StructuredData.BBGviESv.mjs","names":["__esmMin","init_jsx_runtime","c","init_framer_DxfB3JJo","addPropertyControls","ControlType","absoluteUrl","cleanPrefix","prefix","cleanSlug","slug","siteUrl","isoDate","value","date","imageUrl","breadcrumb","entries","schemaType","name","url","label","item","index","StructuredData","props","urlPrefix","common","description","data","authorName","organizationId","datePublished","image","episodeNumber","durationSeconds","audioUrl","style","init_StructuredData"],"sources":["https:/framerusercontent.com/modules/i38RDvZ7eq4u5HVlhsCk/GgN895YxNiSd9U59YAev/StructuredData.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";const siteUrl=\"https://pediatricmoonshot.org\";const organizationId=`${siteUrl}/#organization`;function absoluteUrl(prefix,slug){const cleanPrefix=prefix.startsWith(\"/\")?prefix:`/${prefix}`;const cleanSlug=slug.replace(/^\\/+/,\"\");return new URL(`${cleanPrefix.replace(/\\/$/,\"\")}/${cleanSlug}`,siteUrl).toString();}function isoDate(value){if(value===undefined||value===null||value===\"\")return undefined;const date=new Date(value);return Number.isNaN(date.getTime())?undefined:date.toISOString();}function imageUrl(value){if(typeof value===\"string\")return value||undefined;return value?.src||undefined;}function breadcrumb(schemaType,name,url){const entries=schemaType===\"WebPage\"?[[\"Home\",`${siteUrl}/`],[\"Programs\",`${siteUrl}/programs`],[name,url]]:schemaType===\"Article\"?[[\"Home\",`${siteUrl}/`],[\"News\",`${siteUrl}/news`],[\"Articles\",`${siteUrl}/news/articles`],[name,url]]:[[\"Home\",`${siteUrl}/`],[\"News\",`${siteUrl}/news`],[\"Podcast\",`${siteUrl}/news/podcast`],[name,url]];return{\"@type\":\"BreadcrumbList\",\"@id\":`${url}#breadcrumb`,itemListElement:entries.map(([label,item],index)=>({\"@type\":\"ListItem\",position:index+1,name:label,item}))};}export default function StructuredData(props){const{schemaType,name,description,slug,urlPrefix,image,authorName,datePublished,episodeNumber,durationSeconds,audioUrl,style}=props;if(!schemaType||!name||!slug||!urlPrefix)return null;const url=absoluteUrl(urlPrefix,slug);const common={\"@id\":`${url}#${schemaType.toLowerCase()}`,name,description:description||undefined,url,inLanguage:\"en-US\"};const entity=schemaType===\"Article\"?{\"@type\":\"Article\",...common,headline:name,mainEntityOfPage:{\"@type\":\"WebPage\",\"@id\":url},author:authorName?{\"@type\":/pediatric moonshot/i.test(authorName)?\"Organization\":\"Person\",name:authorName}:undefined,publisher:{\"@id\":organizationId},datePublished:isoDate(datePublished),image:imageUrl(image)}:schemaType===\"PodcastEpisode\"?{\"@type\":\"PodcastEpisode\",...common,datePublished:isoDate(datePublished),episodeNumber:episodeNumber||undefined,duration:durationSeconds&&durationSeconds>0?`PT${Math.round(durationSeconds)}S`:undefined,image:imageUrl(image),associatedMedia:audioUrl?{\"@type\":\"MediaObject\",contentUrl:audioUrl}:undefined,partOfSeries:{\"@type\":\"PodcastSeries\",name:\"Pediatric Moonshot Podcast\",url:`${siteUrl}/news/podcast`},publisher:{\"@id\":organizationId}}:{\"@type\":\"WebPage\",...common,isPartOf:{\"@id\":`${siteUrl}/#website`},about:{\"@type\":\"Thing\",name},publisher:{\"@id\":organizationId},image:imageUrl(image)};const data={\"@context\":\"https://schema.org\",\"@graph\":[entity,breadcrumb(schemaType,name,url)]};return /*#__PURE__*/_jsx(\"div\",{\"aria-hidden\":\"true\",style:{...style,width:1,height:1,overflow:\"hidden\",pointerEvents:\"none\"},children:/*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:JSON.stringify(data)}})});}StructuredData.defaultProps={schemaType:\"WebPage\",name:\"\",description:\"\",slug:\"\",urlPrefix:\"/\",image:\"\",authorName:\"\",datePublished:\"\",episodeNumber:0,durationSeconds:0,audioUrl:\"\"};addPropertyControls(StructuredData,{schemaType:{type:ControlType.Enum,title:\"Schema Type\",options:[\"WebPage\",\"Article\",\"PodcastEpisode\"],defaultValue:\"WebPage\"},name:{type:ControlType.String,title:\"Name\"},description:{type:ControlType.String,title:\"Description\"},slug:{type:ControlType.String,title:\"Slug\"},urlPrefix:{type:ControlType.String,title:\"URL Prefix\"},image:{type:ControlType.Image,title:\"Image\"},authorName:{type:ControlType.String,title:\"Author\"},datePublished:{type:ControlType.Date,title:\"Published\"},episodeNumber:{type:ControlType.Number,title:\"Episode\"},durationSeconds:{type:ControlType.Number,title:\"Duration\"},audioUrl:{type:ControlType.String,title:\"Audio URL\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"StructuredData\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StructuredData.map"],"mappings":"A,4JAA6L,SAASM,EAAY,EAAO,EAAK,CAAC,IAAMC,EAAYC,EAAO,WAAW,GAAG,EAAEA,EAAO,IAAIA,IAAeC,EAAUC,EAAK,QAAQ,OAAO,EAAE,EAAE,OAAO,IAAI,IAAI,GAAGH,EAAY,QAAQ,MAAM,EAAE,EAAE,GAAGE,IAAYE,CAAO,CAAC,CAAC,SAAS,CAAE,CAAC,SAASC,EAAQ,EAAM,CAAC,GAAGC,GAA2B,MAAMA,IAAQ,GAAG,OAAiB,IAAMC,EAAK,IAAI,KAAKD,CAAK,EAAE,OAAO,OAAO,MAAMC,EAAK,QAAQ,CAAC,EAAE,IAAA,GAAUA,EAAK,YAAY,CAAE,CAAC,SAASC,EAAS,EAAM,CAAoD,OAAhD,OAAOF,GAAQ,SAAgBA,GAAO,IAAA,GAAiBA,GAAO,KAAK,IAAA,EAAU,CAAC,SAASG,EAAW,EAAW,EAAK,EAAI,CAAC,IAAMC,EAAQC,IAAa,UAAU,CAAC,CAAC,OAAO,GAAGP,EAAQ,EAAE,EAAE,CAAC,WAAW,GAAGA,EAAQ,UAAU,EAAE,CAACQ,EAAKC,CAAG,CAAC,EAAEF,IAAa,UAAU,CAAC,CAAC,OAAO,GAAGP,EAAQ,EAAE,EAAE,CAAC,OAAO,GAAGA,EA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