{"version":3,"file":"ArticleEmbed.CiQs47ac.mjs","names":["__esmMin","init_jsx_runtime","c","p","addPropertyControls","RenderTarget","init_framer_Duogf4LG","withTopTarget","html","attrs","tag","splitForScreenshot","leadStart","leadEnd","afterLead","positions","h2","m","middle","best","ArticleEmbed","props","onCanvas","articleHtml","split","caption","screenshotCaption","src","screenshot","srcSet","altText","CSS","head","tail","shot","init_ArticleEmbed","ControlType"],"sources":["https:/framerusercontent.com/modules/Gy1ywpe2WPDricU3lS8E/PZ8zeug1a20442aE8kbg/ArticleEmbed.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";// Label-wise Answer Hub article styling. Rendered in-DOM (good for SEO),\n// all selectors scoped under .lw-article so nothing leaks to the page.\n// Fonts Switzer (headings) + Satoshi (body) are already loaded site-wide.\nconst CSS=`\n.lw-article { font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #243b36; line-height: 1.8; font-size: 17px; }\n.lw-article > *:first-child { margin-top: 0; }\n.lw-article .eyebrow { font-family: 'Switzer', sans-serif; font-size: 0.8rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; color: #265E49; margin: 0 0 18px; }\n.lw-article h1 { font-family: 'Switzer', sans-serif; color: #092924; font-size: 2.1rem; line-height: 1.15; font-weight: 600; letter-spacing: -0.5px; margin: 0 0 16px; }\n.lw-article .lead { font-size: 1.2rem; line-height: 1.65; color: #243b36; margin: 18px 0 2.4em; }\n.lw-article h2 { font-family: 'Switzer', sans-serif; color: #092924; font-size: 1.55rem; line-height: 1.25; font-weight: 600; letter-spacing: -0.3px; margin: 3.6em 0 0.7em; }\n.lw-article h3 { font-family: 'Switzer', sans-serif; color: #092924; font-size: 1.2rem; font-weight: 600; margin: 2.8em 0 0.6em; }\n.lw-article p { margin: 0 0 1.5em; }\n.lw-article a { color: #265E49; text-decoration: underline; text-underline-offset: 2px; font-weight: 500; }\n.lw-article a:hover { color: #092924; }\n.lw-article strong { color: #092924; font-weight: 700; }\n.lw-article ul, .lw-article ol { margin: 0 0 1.5em; padding-left: 1.4em; }\n.lw-article li { margin-bottom: 0.6em; }\n.lw-article hr { border: none; border-top: 1px solid rgba(9,41,36,0.12); margin: 3.4em 0; }\n.lw-article table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 3em 0; font-size: 0.96rem; border: 1px solid rgba(9,41,36,0.12); border-radius: 12px; overflow: hidden; }\n.lw-article thead th { background: #092924; color: #ffffff; text-align: left; padding: 14px 18px; font-family: 'Switzer', sans-serif; font-weight: 600; font-size: 0.9rem; letter-spacing: 0.2px; }\n.lw-article tbody td { padding: 14px 18px; border-top: 1px solid rgba(9,41,36,0.10); vertical-align: top; }\n.lw-article tbody tr:nth-child(even) td { background: #FBF8F2; }\n.lw-article figure { margin: 3em 0; }\n.lw-article img { width: 100%; height: auto; display: block; border-radius: 14px; margin: 3em 0; }\n.lw-article figure img { margin: 0; }\n.lw-article figcaption { font-size: 0.85rem; color: #5a6b66; text-align: center; margin-top: 12px; }\n.lw-article .callout { background: #FDF5EA; border-left: 4px solid #265E49; padding: 22px 26px; border-radius: 0 12px 12px 0; margin: 3em 0; }\n.lw-article .callout p:last-child { margin-bottom: 0; }\n.lw-article .facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 3em 0; }\n.lw-article .fact { background: #F5F6F6; border: 1px solid rgba(9,41,36,0.10); border-radius: 14px; padding: 22px; }\n.lw-article .fact .v { font-family: 'Switzer', sans-serif; font-size: 1.5rem; font-weight: 600; color: #092924; line-height: 1.1; }\n.lw-article .fact .l { font-size: 0.85rem; color: #5a6b66; margin-top: 8px; }\n@media (max-width: 640px) { .lw-article .facts { grid-template-columns: 1fr; } }\n.lw-article .cta { background: #092924; border-radius: 18px; padding: 40px 36px; margin: 3.6em 0; text-align: center; }\n.lw-article .cta h3 { color: #ffffff; margin: 0 0 10px; }\n.lw-article .cta p { color: rgba(255,255,255,0.82); margin: 0 0 20px; }\n.lw-article .cta a.button { display: inline-block; background: #80CCAE; color: #092924; padding: 14px 28px; border-radius: 10px; font-weight: 700; text-decoration: none; }\n.lw-article .cta a.button:hover { background: #ffffff; }\n.lw-article .cta .trust { color: rgba(255,255,255,0.65); font-size: 0.82rem; margin-top: 18px; }\n.lw-article details { border-bottom: 1px solid rgba(9,41,36,0.12); padding: 20px 0; }\n.lw-article summary { font-family: 'Switzer', sans-serif; font-weight: 600; color: #092924; cursor: pointer; font-size: 1.05rem; line-height: 1.4; list-style: none; position: relative; padding-right: 32px; }\n.lw-article summary::-webkit-details-marker { display: none; }\n.lw-article summary::after { content: '+'; color: #265E49; font-size: 1.3rem; line-height: 1; position: absolute; top: 0; right: 0; }\n.lw-article details[open] summary::after { content: '–'; }\n/* The FAQ answer <p> is authored nested inside <summary> (existing CMS content convention).\n   Without this, it inherited the question's bold weight and sat in an unintended flex row\n   next to the question text. Style it as a normal-weight block and only reveal it when the\n   <details> is open, so closed items show just the bold question — like a real accordion. */\n.lw-article summary p { display: none; font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-weight: 400; color: #243b36; font-size: 1rem; line-height: 1.7; margin: 12px 0 0; }\n.lw-article details[open] summary p { display: block; }\n.lw-article details p { margin-bottom: 0; }\n.lw-article .sources { font-size: 0.85rem; color: #5a6b66; margin-top: 2.6em; }\n/* Related articles: cards on the ivory page background. White instead of grey so\n   they read as separate, clickable objects, with an arrow that moves on hover. */\n.lw-article .related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 1.4em 0 0; }\n.lw-article .related-grid a { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #FFFFFF; border: 1px solid rgba(9,41,36,0.10); border-radius: 14px; padding: 20px 22px; text-decoration: none; color: #092924; font-family: 'Switzer', sans-serif; font-weight: 600; font-size: 1rem; line-height: 1.35; transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease; }\n.lw-article .related-grid a::after { content: '→'; flex: none; color: #265E49; font-weight: 600; opacity: 0.5; transition: transform 0.18s ease, opacity 0.18s ease; }\n.lw-article .related-grid a:hover { border-color: #80CCAE; box-shadow: 0 14px 28px -22px rgba(9,41,36,0.6); transform: translateY(-1px); color: #092924; }\n.lw-article .related-grid a:hover::after { transform: translateX(4px); opacity: 1; }\n@media (max-width: 640px) { .lw-article .related-grid { grid-template-columns: 1fr; } }\n/* Optional screenshot slot, bound to the CMS image field. Renders nothing when empty. */\n.lw-article .lw-shot { margin: 3.2em 0; }\n.lw-article .lw-shot img { margin: 0; border: 1px solid rgba(9,41,36,0.10); border-radius: 16px; box-shadow: 0 18px 40px -24px rgba(9,41,36,0.45); background: #FBF8F2; }\n.lw-article .lw-shot figcaption { text-align: left; color: #5a6b66; font-size: 0.85rem; margin-top: 10px; }\n.lw-article .lw-shot-empty { border: 1px dashed rgba(9,41,36,0.25); border-radius: 16px; padding: 28px; text-align: center; color: #5a6b66; font-size: 0.9rem; background: #FBF8F2; }\n`;// Internal links authored in the CMS are root-relative (\"/kennisbank/slug\").\n// Inside the Framer preview the page runs in an iframe on framer.com, so such a\n// link resolves against the wrong origin and lands on a 404. Adding target=\"_top\"\n// makes the navigation happen on the top-level document instead, which is what the\n// in-article links already do by hand. Doing it here covers every link in every\n// article, including the related-articles grid, without editing 70 CMS records.\nfunction withTopTarget(html){return html.replace(/<a\\s+([^>]*href=['\"]\\/[^'\"]*['\"][^>]*)>/gi,(tag,attrs)=>{if(/\\starget=/i.test(attrs))return tag;return`<a ${attrs} target=\"_top\">`;});}// Places the screenshot part-way down the article instead of directly under the\n// intro, so it breaks up the body text rather than crowding the opening. Splits at\n// the <h2> closest to the middle of the article. Returns null when the html has no\n// intro paragraph (<p class='lead'>), which is how the related-articles block is\n// recognised: that instance should never show a screenshot or its placeholder.\nfunction splitForScreenshot(html){const leadStart=html.search(/class=['\"]lead['\"]/);if(leadStart===-1)return null;const leadEnd=html.indexOf(\"</p>\",leadStart);if(leadEnd===-1)return null;const afterLead=leadEnd+4;const positions=[];const h2=/<h2[\\s>]/gi;let m;while((m=h2.exec(html))!==null){if(m.index>afterLead)positions.push(m.index);}if(positions.length===0)return[html.slice(0,afterLead),html.slice(afterLead)];const middle=afterLead+(html.length-afterLead)/2;let best=positions[0];for(const p of positions){if(Math.abs(p-middle)<Math.abs(best-middle))best=p;}return[html.slice(0,best),html.slice(best)];}export default function ArticleEmbed(props){const{articleHtml,screenshot,screenshotCaption}=props;// NOTE: FAQ Schema JSON is intentionally NOT rendered here anymore.\n// It's already injected once via Site Settings → Code (\"Kennisbank\"\n// custom code entry, Start of <head>, scoped to /kennisbank/:slug),\n// which also now carries the BreadcrumbList schema. Rendering it a\n// second time here caused every article page to output the FAQPage\n// JSON-LD block twice. The faqSchema prop is kept (unused) so the\n// existing Framer canvas binding on this component doesn't break.\nconst onCanvas=RenderTarget.current()===RenderTarget.canvas;const html=withTopTarget(articleHtml);const split=splitForScreenshot(html);const caption=screenshotCaption||\"\";const src=screenshot?screenshot.src:\"\";const srcSet=screenshot?screenshot.srcSet:undefined;const altText=screenshot&&screenshot.alt||caption||\"Schermafbeelding uit Label-wise\";// No intro paragraph means this instance carries a fragment such as the\n// related-articles grid, not a full article. Render it plain.\nif(!split){return /*#__PURE__*/_jsxs(\"div\",{className:\"lw-article\",style:{width:\"100%\"},children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:CSS}}),/*#__PURE__*/_jsx(\"div\",{dangerouslySetInnerHTML:{__html:html}})]});}const[head,tail]=split;let shot=null;if(src){shot=/*#__PURE__*/_jsxs(\"figure\",{className:\"lw-shot\",children:[/*#__PURE__*/_jsx(\"img\",{src:src,srcSet:srcSet,alt:altText,loading:\"lazy\"}),caption?/*#__PURE__*/_jsx(\"figcaption\",{children:caption}):null]});}else if(onCanvas){// Placeholder on the canvas only, so the slot stays visible while editing.\n// Nothing is rendered on the published page when the field is empty.\nshot=/*#__PURE__*/_jsx(\"div\",{className:\"lw-shot lw-shot-empty\",children:\"Screenshot (optioneel) — koppel het CMS-veld om hier een afbeelding te tonen\"});}return /*#__PURE__*/_jsxs(\"div\",{className:\"lw-article\",style:{width:\"100%\"},children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:CSS}}),/*#__PURE__*/_jsx(\"div\",{dangerouslySetInnerHTML:{__html:head}}),shot,/*#__PURE__*/_jsx(\"div\",{dangerouslySetInnerHTML:{__html:tail}})]});}ArticleEmbed.defaultProps={articleHtml:\"<p class='lead'>Koppel deze component aan het CMS-veld ‘Article HTML’ om het artikel te tonen.</p>\",faqSchema:\"\",screenshotCaption:\"\"};addPropertyControls(ArticleEmbed,{articleHtml:{type:ControlType.String,title:\"Article HTML\",displayTextArea:true,defaultValue:\"<p class='lead'>Koppel deze component aan het CMS-veld ‘Article HTML’ om het artikel te tonen.</p>\"},faqSchema:{type:ControlType.String,title:\"FAQ Schema JSON\",displayTextArea:true,defaultValue:\"\"},screenshot:{type:ControlType.ResponsiveImage,title:\"Screenshot\",description:\"Optioneel. Koppel aan het CMS-veld Screenshot. Leeg laten verbergt het blok.\"},screenshotCaption:{type:ControlType.String,title:\"Bijschrift\",placeholder:\"Wat je op de afbeelding ziet\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ArticleEmbed\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ArticleEmbed.map"],"mappings":"A,sKAuEA,SAASO,EAAc,EAAK,CAAC,OAAOC,EAAK,QAAQ,6CAA6C,EAAI,IAAY,aAAa,KAAKC,CAAK,EAASC,EAAU,MAAMD,EAAM,gBAAkB,CAAE,CAKxL,SAASE,EAAmB,EAAK,CAAC,IAAMC,EAAUJ,EAAK,OAAO,oBAAoB,EAAE,GAAGI,IAAY,GAAG,OAAO,KAAK,IAAMC,EAAQL,EAAK,QAAQ,OA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