{"version":3,"file":"BlogPostSchema.CiVGClLK.mjs","names":[],"sources":["https:/framerusercontent.com/modules/riv5BlK0SUFXKzIpBkjG/W8MtX2ngYDgLVSdZCu7t/BlogPostSchema.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import{useEffect}from\"react\";const GERMAN_MONTHS={januar:\"01\",februar:\"02\",\"m\\xe4rz\":\"03\",maerz:\"03\",april:\"04\",mai:\"05\",juni:\"06\",juli:\"07\",august:\"08\",september:\"09\",oktober:\"10\",november:\"11\",dezember:\"12\",dezemeber:\"12\"};function parseGermanDate(dateStr){if(!dateStr)return\"\";if(/^\\d{4}-\\d{2}-\\d{2}/.test(dateStr))return dateStr.slice(0,10);const match=dateStr.match(/(\\d{1,2})\\.\\s*(\\w+)\\s+(\\d{4})/);if(match){const day=match[1].padStart(2,\"0\");const monthKey=match[2].toLowerCase();const month=GERMAN_MONTHS[monthKey];const year=match[3];if(month)return`${year}-${month}-${day}`;}return dateStr;}function detectFAQs(){const faqs=[];const allH3s=document.querySelectorAll(\"h3\");allH3s.forEach(h3=>{const question=h3.textContent?.trim()||\"\";if(!question)return;let answer=\"\";let sibling=h3.nextElementSibling;while(sibling){const tag=sibling.tagName?.toLowerCase();if(tag===\"h1\"||tag===\"h2\"||tag===\"h3\"||tag===\"h4\")break;const text=sibling.textContent?.trim()||\"\";if(text)answer+=(answer?\" \":\"\")+text;sibling=sibling.nextElementSibling;}if(question&&answer&&answer.length>20){faqs.push({question,answer});}});return faqs.filter(faq=>{const q=faq.question.toLowerCase();return!q.includes(\"h\\xe4ufig gestellte\")&&!q.startsWith(\"fazit\")&&!q.startsWith(\"zusammenfassung\")&&q!==\"n\\xe4chste schritte\"&&q!==\"weiterlesen\"&&q!==\"quellen\"&&q!==\"inhaltsverzeichnis\"&&(q.includes(\"?\")||faq.answer.length>50);});}/**\n * Extract plain-text article body from rendered DOM.\n *\n * Strategy:\n * 1. Find main content container (prefer <main>, then <article>, then deepest container with multiple <h2>+<p> children).\n * 2. Walk descendant paragraphs, headings, and list items in document order.\n * 3. Strip the trailing \"Häufig gestellte Fragen\", \"Weiterlesen\", \"Nächste Schritte\" tail-sections (those are FAQs / link-lists, not body).\n * 4. Normalize whitespace, dedupe consecutive whitespace.\n * 5. Cap at MAX_BODY chars to keep JSON-LD payload reasonable for crawlers.\n *\n * Result: plain-text article body suitable for schema.org BlogPosting.articleBody —\n * the field that Google AI Overviews and other AI crawlers prefer over scraping the rendered DOM.\n */function extractArticleBody(){const MAX_BODY=8e3;// Find the most likely article body container.\nlet container=document.querySelector(\"main article\")||document.querySelector(\"article\")||document.querySelector(\"main\");if(!container){// Framer fallback: pick the container with the most <p> + <h2> direct descendants.\nlet best={el:null,score:0};document.querySelectorAll(\"div\").forEach(div=>{const score=div.querySelectorAll(\":scope > p, :scope > h2, :scope > h3\").length;if(score>best.score)best={el:div,score};});container=best.el;}if(!container)return\"\";const blocks=[];const tailHeadings=[\"h\\xe4ufig gestellte fragen\",\"weiterlesen\",\"weiterlesen — verwandte artikel\",\"n\\xe4chste schritte\",\"naechste schritte\",\"verwandte artikel\",\"quellen\"];let stop=false;const walker=container.querySelectorAll(\"h1, h2, h3, h4, p, li, blockquote\");walker.forEach(el=>{if(stop)return;const tag=el.tagName.toLowerCase();const text=el.textContent?.replace(/\\s+/g,\" \").trim()||\"\";if(!text)return;// Stop at tail-section markers.\nif((tag===\"h2\"||tag===\"h3\")&&tailHeadings.some(h=>text.toLowerCase().startsWith(h))){stop=true;return;}blocks.push(text);});let body=blocks.join(\" \").replace(/\\s+/g,\" \").trim();if(body.length>MAX_BODY){body=body.slice(0,MAX_BODY).replace(/\\s\\S*$/,\"\")+\"…\";}return body;}/**\n * BlogPosting + FAQPage Schema JSON-LD\n * Injects Article/BlogPosting structured data for blog posts\n * Auto-detects headline, description, image, date, articleBody, and FAQs from page\n *\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicWidth 1\n * @framerIntrinsicHeight 1\n */export default function BlogPostSchema(props){const{headline=\"\",description=\"\",authorName=\"Indicium Team\",authorUrl=\"https://www.indicium.ag/ueber-indicium\",authorJobTitle=\"\",publisherName=\"Indicium Technologies AG\",publisherLogo=\"https://framerusercontent.com/images/tTH9ziw2X9ilRWtQXc1wvDUC9Q.svg\",datePublished=\"\",dateModified=\"\",image=\"\",articleSection=\"Background Checks\",inLanguage=\"de-DE\",enableFAQSchema=true,enableArticleBody=true}=props;useEffect(()=>{if(typeof window===\"undefined\")return;// --- BlogPosting Schema ---\nconst scriptId=\"blogpost-schema-jsonld\";const existing=document.getElementById(scriptId);if(existing)existing.remove();const pageTitle=headline||document.title?.replace(/ \\| Indicium$/,\"\")||\"\";const pageMeta=description||document.querySelector('meta[name=\"description\"]')?.getAttribute(\"content\")||\"\";const pageUrl=window.location.href;const pageImage=image||document.querySelector('meta[property=\"og:image\"]')?.getAttribute(\"content\")||\"\";let detectedDate=datePublished;if(!detectedDate){const dateEl=document.querySelector('[data-framer-name=\"Published Date\"], [data-framer-name=\"Date\"]');if(dateEl?.textContent){detectedDate=dateEl.textContent.trim();}}const isoDate=parseGermanDate(detectedDate);const isoDateModified=parseGermanDate(dateModified);// articleBody: extract plain text from rendered DOM after Framer hydration.\n// Two-pass strategy — once now, then again after a short delay if hydration was incomplete.\nconst articleBodyText=enableArticleBody?extractArticleBody():\"\";const schema={\"@context\":\"https://schema.org\",\"@type\":\"BlogPosting\",headline:pageTitle,description:pageMeta,url:pageUrl,inLanguage,articleSection,author:{\"@type\":\"Person\",name:authorName,url:authorUrl},publisher:{\"@type\":\"Organization\",name:publisherName,logo:{\"@type\":\"ImageObject\",url:publisherLogo}},mainEntityOfPage:{\"@type\":\"WebPage\",\"@id\":pageUrl}};if(authorJobTitle){schema.author.jobTitle=authorJobTitle;}if(isoDate){schema.datePublished=isoDate;}if(isoDateModified){schema.dateModified=isoDateModified;}else if(isoDate){schema.dateModified=isoDate;}if(pageImage){schema.image={\"@type\":\"ImageObject\",url:pageImage};}if(articleBodyText&&articleBodyText.length>100){schema.articleBody=articleBodyText;schema.wordCount=articleBodyText.split(/\\s+/).length;}const script=document.createElement(\"script\");script.id=scriptId;script.type=\"application/ld+json\";script.textContent=JSON.stringify(schema);document.head.appendChild(script);// Second pass — re-extract after Framer finishes hydrating CMS body content.\n// Some pages render CMS body lazily; without this pass the schema would have\n// articleBody=\"\" on first render and never update.\nlet rerunTimer=null;if(enableArticleBody){rerunTimer=window.setTimeout(()=>{const refreshedBody=extractArticleBody();if(refreshedBody&&refreshedBody.length>(articleBodyText?.length||0)+200){schema.articleBody=refreshedBody;schema.wordCount=refreshedBody.split(/\\s+/).length;const refreshedScript=document.getElementById(scriptId);if(refreshedScript){refreshedScript.textContent=JSON.stringify(schema);}}},1500);}// --- FAQPage Schema (auto-detected from H3s) ---\nconst faqScriptId=\"faqpage-schema-jsonld\";const existingFaq=document.getElementById(faqScriptId);if(existingFaq)existingFaq.remove();if(enableFAQSchema){const faqs=detectFAQs();if(faqs.length>0){const faqSchema={\"@context\":\"https://schema.org\",\"@type\":\"FAQPage\",mainEntity:faqs.map(faq=>({\"@type\":\"Question\",name:faq.question,acceptedAnswer:{\"@type\":\"Answer\",text:faq.answer}}))};const faqScript=document.createElement(\"script\");faqScript.id=faqScriptId;faqScript.type=\"application/ld+json\";faqScript.textContent=JSON.stringify(faqSchema);document.head.appendChild(faqScript);}}return()=>{if(rerunTimer)window.clearTimeout(rerunTimer);const el=document.getElementById(scriptId);if(el)el.remove();const faqEl=document.getElementById(faqScriptId);if(faqEl)faqEl.remove();};},[headline,description,authorName,authorUrl,authorJobTitle,publisherName,publisherLogo,datePublished,dateModified,image,articleSection,inLanguage,enableFAQSchema,enableArticleBody]);return /*#__PURE__*/_jsx(\"div\",{style:{width:0,height:0,overflow:\"hidden\"}});}addPropertyControls(BlogPostSchema,{headline:{type:ControlType.String,title:\"Headline\",defaultValue:\"\",description:\"Leave empty to auto-detect from page title\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"\",displayTextArea:true,description:\"Leave empty to auto-detect from meta description\"},authorName:{type:ControlType.String,title:\"Author Name\",defaultValue:\"Indicium Team\"},authorUrl:{type:ControlType.String,title:\"Author URL\",defaultValue:\"https://www.indicium.ag/ueber-indicium\"},authorJobTitle:{type:ControlType.String,title:\"Author Job Title\",defaultValue:\"\"},publisherName:{type:ControlType.String,title:\"Publisher\",defaultValue:\"Indicium Technologies AG\"},publisherLogo:{type:ControlType.String,title:\"Publisher Logo URL\",defaultValue:\"https://framerusercontent.com/images/tTH9ziw2X9ilRWtQXc1wvDUC9Q.svg\"},datePublished:{type:ControlType.String,title:\"Date Published\",defaultValue:\"\",description:\"ISO (YYYY-MM-DD) or German (17. Dezember 2025)\"},dateModified:{type:ControlType.String,title:\"Date Modified\",defaultValue:\"\",description:\"ISO (YYYY-MM-DD) or German format\"},image:{type:ControlType.String,title:\"Image URL\",defaultValue:\"\",description:\"Leave empty to auto-detect from og:image\"},articleSection:{type:ControlType.String,title:\"Section\",defaultValue:\"Background Checks\"},inLanguage:{type:ControlType.Enum,title:\"Language\",defaultValue:\"de-DE\",options:[\"de-DE\",\"en-US\",\"fr-FR\",\"it-IT\"],optionTitles:[\"Deutsch\",\"English\",\"Fran\\xe7ais\",\"Italiano\"]},enableFAQSchema:{type:ControlType.Boolean,title:\"FAQ Schema\",defaultValue:true,description:\"Auto-detect FAQ sections from H3 headings\"},enableArticleBody:{type:ControlType.Boolean,title:\"Article Body Extract\",defaultValue:true,description:\"Extract plain-text article body for AI crawlers (GEO)\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BlogPostSchema\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicHeight\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerIntrinsicWidth\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceM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