{"version":3,"file":"TableOfContent.fPsiiaTL.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/IsroRUpnhhNHU6Vyzp49/JR0L2gkyFlbNt322IUbM/TableOfContent.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";export function TOC(props){const[headings,setHeadings]=useState([]);useEffect(()=>{const buildTOC=()=>{const h2s=Array.from(document.querySelectorAll(\"h2\"));if(h2s.length===0)return false;const items=h2s.map(el=>{const text=(el.textContent||\"\").trim();if(!text)return null;let id=el.id;if(!id||id.startsWith(\"-\")){id=text.toLowerCase().replace(/[^\\w\\s-]/g,\"\").replace(/\\s+/g,\"-\").replace(/^-+/,\"\");el.id=id;}return /*#__PURE__*/_jsx(\"a\",{href:`#${id}`,style:{display:\"block\",padding:\"16px 0\",color:\"white\",textDecoration:\"none\",borderBottom:\"1px solid rgba(255,255,255,0.1)\",transition:\"color 0.2s ease\"},onMouseEnter:e=>{e.currentTarget.style.color=\"#BEFFE0\";},onMouseLeave:e=>{e.currentTarget.style.color=\"white\";},children:text},id);}).filter(Boolean);setHeadings(items);return true;};// Try immediately first\nif(buildTOC())return;// If not ready yet, observe DOM changes (Framer often injects content after mount)\nconst observer=new MutationObserver(()=>{buildTOC();});observer.observe(document.body,{childList:true,subtree:true});return()=>observer.disconnect();},[]);return /*#__PURE__*/_jsxs(\"div\",{...props,style:{...props.style,fontFamily:\"Figtree, sans-serif\",fontSize:\"16px\",lineHeight:\"28px\"},children:[props.children,headings.length>0?headings:/*#__PURE__*/_jsx(\"p\",{style:{color:\"#aaa\"},children:\"Loading TOC…\"})]});}\nexport const __FramerMetadata__ = {\"exports\":{\"TOC\":{\"type\":\"reactComponent\",\"name\":\"TOC\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./TableOfContent.map"],"mappings":"gIAA+F,SAAgB,EAAI,EAAM,CAA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