{"version":3,"file":"PrivacyToc.DF5NSpU1.mjs","names":["useMemo","useState"],"sources":["https:/framerusercontent.com/modules/xE8AGD8YFfCXxgdQN8Ah/UlUAQTkOFZEOQjV9DGU9/PrivacyToc.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useMemo,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";const PRESETS={datenschutz:[{label:\"1. Auf einen Blick\",id:\"ueberblick\"},{label:\"2. Hosting\",id:\"hosting\"},{label:\"3. Verantwortlicher\",id:\"verantwortlicher\"},{label:\"4. Datenerhebung\",id:\"erhebung\"},{label:\"5. Cookies\",id:\"cookies\"},{label:\"6. Analyse-Tools\",id:\"analyse\"},{label:\"7. Weitergabe\",id:\"weitergabe\"},{label:\"8. Speicherdauer\",id:\"speicherdauer\"},{label:\"9. Ihre Rechte\",id:\"rechte\"},{label:\"10. Widerspruch\",id:\"widerspruch\"},{label:\"11. Sicherheit\",id:\"sicherheit\"},{label:\"12. Aktualit\\xe4t\",id:\"aktualitaet\"}],impressum:[{label:\"1. Anbieter\",id:\"anbieter\"},{label:\"2. Vertreten durch\",id:\"vertretung\"},{label:\"3. Kontakt\",id:\"kontakt\"},{label:\"4. Registereintrag\",id:\"register\"},{label:\"5. Umsatzsteuer-ID\",id:\"ustid\"},{label:\"6. Streitbeilegung\",id:\"streitbeilegung\"}],agb:[{label:\"1. Geltungsbereich\",id:\"geltungsbereich\"},{label:\"2. Leistungen\",id:\"leistungen\"},{label:\"3. Nutzerkonto\",id:\"nutzerkonto\"},{label:\"4. Nutzungsregeln\",id:\"nutzungsregeln\"},{label:\"5. Preise & Zahlung\",id:\"preise\"},{label:\"6. Haftung\",id:\"haftung\"},{label:\"7. Schlussbestimmungen\",id:\"schluss\"}]};const FONT='\"Helvetica Neue\", Helvetica, Arial, sans-serif';// Auf dem Handy (unter 810 px, der Phone-Breakpoint der Seite) steht das\n// Verzeichnis über dem Text und schob die Überschrift aus dem ersten\n// Bildschirm. Dort ist es deshalb eingeklappt: eine Zeile \"Inhalt\", die sich\n// per Tipp öffnet. Die Einträge sind auf dem Handy außerdem höher, damit man\n// sie mit dem Finger trifft. Ab 810 px bleibt alles wie bisher.\nconst TOC_CSS=`\n.ptoc-toggle { display: none; }\n.ptoc-list { display: flex; flex-direction: column; }\n.ptoc-link { padding: 5px 0 5px 10px; }\n@media (max-width: 809.98px) {\n    .ptoc-title, .ptoc-rule { display: none; }\n    .ptoc-toggle { display: flex; }\n    .ptoc-list[data-open=\"false\"] { display: none; }\n    .ptoc-list { padding-top: 4px; }\n    .ptoc-link { padding: 11px 0 11px 10px; }\n}\n`;/**\n * Compact sticky table of contents with scroll-spy active state.\n *\n * @framerIntrinsicWidth 200\n * @framerIntrinsicHeight 360\n *\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function PrivacyToc(props){const{title=\"Inhalt\",preset=\"datenschutz\",textColor=\"#000000\",mutedColor=\"#999999\",activeColor=\"#000000\",activeBarColor=\"#CFF525\",fontSize=13,gap=2,style}=props;const isStatic=useIsStaticRenderer();const safeItems=useMemo(()=>{const list=PRESETS[preset]||PRESETS.datenschutz;return list.map(item=>({label:(item?.label||\"\").trim(),id:(item?.id||\"\").trim().replace(/^#/,\"\")})).filter(item=>item.label&&item.id);},[preset]);const[activeId,setActiveId]=useState(safeItems[0]?.id||\"\");// Nur auf dem Handy von Bedeutung: Liste auf- oder zugeklappt.\nconst[open,setOpen]=useState(false);const listId=\"ptoc-\"+preset;useEffect(()=>{if(isStatic||typeof window===\"undefined\"||safeItems.length===0)return;const elements=safeItems.map(item=>document.getElementById(item.id)).filter(el=>Boolean(el));if(elements.length===0)return;const ratios=new Map;const observer=new IntersectionObserver(entries=>{for(const entry of entries){ratios.set(entry.target.id,entry.isIntersecting?entry.intersectionRatio:0);}let bestId=activeId;let bestScore=-1;for(const item of safeItems){const ratio=ratios.get(item.id)||0;if(ratio>bestScore){bestScore=ratio;bestId=item.id;}}if(bestScore<=0){let nearest=null;let nearestTop=-Infinity;for(const el of elements){const top=el.getBoundingClientRect().top;if(top<=140&&top>nearestTop){nearestTop=top;nearest=el.id;}}if(nearest)bestId=nearest;}if(bestId){startTransition(()=>setActiveId(bestId));}},{root:null,rootMargin:\"-20% 0px -55% 0px\",threshold:[0,.1,.25,.5,.75,1]});for(const el of elements)observer.observe(el);const hash=window.location.hash.replace(/^#/,\"\");if(hash&&safeItems.some(i=>i.id===hash)){startTransition(()=>setActiveId(hash));}return()=>observer.disconnect();// eslint-disable-next-line react-hooks/exhaustive-deps\n},[isStatic,safeItems]);// Reset active when preset changes\nuseEffect(()=>{if(safeItems[0]?.id){startTransition(()=>setActiveId(safeItems[0].id));}},[preset]);const handleClick=id=>event=>{if(isStatic||typeof window===\"undefined\")return;event.preventDefault();const el=document.getElementById(id);if(!el)return;startTransition(()=>{setActiveId(id);setOpen(false);});// Erst nach dem Einklappen scrollen, sonst stimmt das Ziel auf dem\n    // Handy nicht, weil die Liste über dem Text Höhe verliert.\n    window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>el.scrollIntoView({behavior:\"smooth\",block:\"start\"}));});if(window.history?.replaceState){window.history.replaceState(null,\"\",\"#\"+id);}};return /*#__PURE__*/_jsxs(\"nav\",{\"aria-label\":title,style:{position:\"relative\",width:\"100%\",display:\"flex\",flexDirection:\"column\",gap:10,...style},children:[/*#__PURE__*/_jsx(\"style\",{dangerouslySetInnerHTML:{__html:TOC_CSS}}),/*#__PURE__*/_jsx(\"div\",{className:\"ptoc-title\",style:{fontFamily:FONT,fontSize:11,fontWeight:500,letterSpacing:\"0.08em\",textTransform:\"uppercase\",color:mutedColor,lineHeight:1.2},children:title}),/*#__PURE__*/_jsx(\"div\",{className:\"ptoc-rule\",style:{width:\"100%\",height:1,backgroundColor:\"rgba(0,0,0,0.08)\"}}),/*#__PURE__*/_jsxs(\"button\",{type:\"button\",className:\"ptoc-toggle\",\"aria-expanded\":open,\"aria-controls\":listId,onClick:()=>setOpen(v=>!v),style:{alignItems:\"center\",justifyContent:\"space-between\",width:\"100%\",minHeight:48,margin:0,padding:\"0 16px\",border:\"1px solid rgba(0,0,0,0.12)\",borderRadius:14,background:\"transparent\",fontFamily:FONT,fontSize:15,fontWeight:500,letterSpacing:\"-0.01em\",color:textColor,cursor:\"pointer\",WebkitTapHighlightColor:\"transparent\"},children:[/*#__PURE__*/_jsx(\"span\",{children:title}),/*#__PURE__*/_jsx(\"svg\",{width:\"16\",height:\"16\",viewBox:\"0 0 16 16\",fill:\"none\",\"aria-hidden\":\"true\",style:{transform:open?\"rotate(180deg)\":\"none\",transition:\"transform 200ms ease\"},children:/*#__PURE__*/_jsx(\"path\",{d:\"M3.5 6l4.5 4.5L12.5 6\",stroke:\"currentColor\",strokeWidth:\"1.8\",strokeLinecap:\"round\",strokeLinejoin:\"round\"})})]}),/*#__PURE__*/_jsx(\"ul\",{id:listId,className:\"ptoc-list\",\"data-open\":open?\"true\":\"false\",style:{listStyle:\"none\",margin:0,padding:0,gap},children:safeItems.map(item=>{const active=item.id===activeId;return /*#__PURE__*/_jsx(\"li\",{style:{margin:0,padding:0},children:/*#__PURE__*/_jsxs(\"a\",{href:\"#\"+item.id,className:\"ptoc-link\",onClick:handleClick(item.id),\"aria-current\":active?\"true\":undefined,style:{position:\"relative\",display:\"flex\",alignItems:\"center\",gap:8,textDecoration:\"none\",fontFamily:FONT,fontSize,fontWeight:active?500:400,lineHeight:1.35,letterSpacing:\"-0.01em\",color:active?activeColor:mutedColor,transition:\"color 160ms ease\",cursor:\"pointer\"},children:[/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",style:{position:\"absolute\",left:0,top:6,bottom:6,width:2,borderRadius:1,backgroundColor:active?activeBarColor:\"transparent\",transition:\"background-color 160ms ease\"}}),/*#__PURE__*/_jsx(\"span\",{style:{flex:1},children:item.label})]})},item.id);})})]});}addPropertyControls(PrivacyToc,{title:{type:ControlType.String,title:\"Title\",defaultValue:\"Inhalt\"},preset:{type:ControlType.Enum,title:\"Page\",options:[\"datenschutz\",\"impressum\",\"agb\"],optionTitles:[\"Datenschutz\",\"Impressum\",\"AGB\"],defaultValue:\"datenschutz\",displaySegmentedControl:true},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#000000\"},mutedColor:{type:ControlType.Color,title:\"Muted\",defaultValue:\"#999999\"},activeColor:{type:ControlType.Color,title:\"Active Text\",defaultValue:\"#000000\"},activeBarColor:{type:ControlType.Color,title:\"Active Bar\",defaultValue:\"#CFF525\"},fontSize:{type:ControlType.Number,title:\"Font Size\",defaultValue:13,min:11,max:18,step:1,unit:\"px\",displayStepper:true},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:2,min:0,max:16,step:1,unit:\"px\",displayStepper:true}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PrivacyToc\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"360\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"200\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PrivacyToc.map"],"mappings":"kNAwBG,SAAwB,EAAW,EAAM,CAAC,GAAK,CAAC,QAAM,SAAS,SAAO,cAAc,YAAU,UAAU,aAAW,UAAU,cAAY,UAAU,iBAAe,UAAU,WAAS,GAAG,MAAI,EAAE,SAAO,EAAY,EAAS,EAAoB,EAAQ,EAAUA,OAAwB,EAAQ,IAAS,EAAQ,YAAA,CAAwB,IAAI,IAAO,CAAC,OAAO,GAAM,OAAO,GAAA,CAAI,KAAK,EAAE,IAAI,GAAM,IAAI,GAAA,CAAI,KAAK,CAAC,CAAC,QAAQ,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,OAAO,GAAM,EAAK,OAAO,EAAK,EAAE,EAAI,CAAC,CAAM,CAAC,EAA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