{"version":3,"file":"StickyIndex.CsA3GC_s.mjs","names":["useState","useRef","_Fragment","__esmMin","init_ssg_sandbox_shims","window","_e","de","init_jsx_runtime","J","p","init_npm_react_18_3_1","ce","init_framer_motion_DhsWWWsN","motion","init_framer_DcGZRLrs","ControlType","addPropertyControls","Caret","color","Item","hover","setHover","active","props","slugify","label","SPRING","LegalIndex","setActive","raf","navRef","nav","link","left","blocks","col","items","l","update","line","all","focus","el","r","offset","current","prev","onScroll","go","e","top","style","PHONE_CSS","i","init_LegalIndex","s","withStickyIndex","CSS","Component","init_StickyIndex"],"sources":["https:/framerusercontent.com/modules/dPUSnyC5TO7iIvXHM1zx/aYJy00L5AedrpvWvUCCC/LegalIndex.js","https:/framerusercontent.com/modules/3mJ8CFCtnWtdzqLgsc0W/SM8F8GsXUupdDLIdphZ1/StickyIndex.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useEffect,useRef,useState}from\"react\";import{motion}from\"framer-motion\";import{addPropertyControls,ControlType}from\"framer\";// Legal page index (\"On this page\").\n// - Highlights the section currently in view (Text Primary), others stay Text Secondary.\n// - Hover: the button triangle slides in before the label, same spring as the site buttons.\n// - Focus: the text block being read stays at full opacity, the others drop to 0.3 (as on the home page).\n// - Click: smooth-scrolls to the section, leaving room for the fixed header.\n// Sections are found by id = slug of the label (\"About this website\" -> \"about-this-website\").\n// Phone: shown as one horizontal, swipeable row; the active item scrolls to the left edge.\n// One passive scroll listener, throttled to animation frames.\nconst slugify=s=>s.toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/(^-|-$)/g,\"\");const SPRING={type:\"spring\",duration:.4,bounce:.2};function Caret({color}){// Same triangle as the \"Request a demo\" button (Caret Up icon, rotated 90deg).\nreturn /*#__PURE__*/_jsxs(\"svg\",{width:\"12\",height:\"12\",viewBox:\"0 0 24 24\",\"aria-hidden\":\"true\",style:{display:\"block\",transform:\"rotate(90deg)\"},children:[/*#__PURE__*/_jsx(\"path\",{d:\"M 0 7.5 L 7.5 0 L 15 7.5 Z\",fill:color,transform:\"translate(4.5 7.5)\"}),/*#__PURE__*/_jsx(\"path\",{d:\"M 0 7.5 L 7.5 0 L 15 7.5\",fill:\"transparent\",stroke:color,strokeWidth:1,strokeLinecap:\"round\",strokeLinejoin:\"round\",transform:\"translate(4.5 7.5)\"})]});}function Item({label,active,onClick,props}){const[hover,setHover]=useState(false);const color=active||hover?props.activeColor:props.color;return /*#__PURE__*/_jsxs(\"a\",{href:\"#\"+slugify(label),onClick:onClick,onMouseEnter:()=>setHover(true),onMouseLeave:()=>setHover(false),onFocus:()=>setHover(true),onBlur:()=>setHover(false),style:{display:\"flex\",alignItems:\"center\",textDecoration:\"none\",color,transition:\"color 0.2s ease\",fontFamily:'\"Geist Mono\", monospace',fontSize:props.fontSize,lineHeight:1.8,fontFeatureSettings:'\"blwf\", \"cv03\", \"cv04\", \"cv09\", \"cv11\"',cursor:\"pointer\",outlineOffset:4},children:[/*#__PURE__*/_jsx(motion.span,{initial:false,animate:{width:hover?15:0,opacity:hover?1:0},transition:SPRING,style:{display:\"inline-flex\",overflow:\"hidden\",flexShrink:0},children:/*#__PURE__*/_jsx(Caret,{color:props.activeColor})}),/*#__PURE__*/_jsx(\"span\",{children:label})]});}const PHONE_CSS=`\n@media (max-width: 809.98px) {\n  nav[data-legal-index] { flex-direction: row !important; overflow-x: auto; gap: 24px !important; scrollbar-width: none; -webkit-overflow-scrolling: touch; }\n  nav[data-legal-index]::-webkit-scrollbar { display: none; }\n  nav[data-legal-index] a { white-space: nowrap; flex-shrink: 0; }\n}\n`;export default function LegalIndex(props){const{items,offset,gap,style}=props;const[active,setActive]=useState(-1);const raf=useRef(0);const navRef=useRef(null);// Phone: the list scrolls sideways; bring the active item to the left edge.\nuseEffect(()=>{const nav=navRef.current;if(!nav||active<0||nav.scrollWidth<=nav.clientWidth+1)return;const link=nav.querySelectorAll(\"a\")[active];if(!link)return;const left=link.getBoundingClientRect().left-nav.getBoundingClientRect().left+nav.scrollLeft;nav.scrollTo({left,behavior:\"smooth\"});},[active]);useEffect(()=>{if(typeof window===\"undefined\")return;const blocks=()=>{const first=items.map(l=>document.getElementById(slugify(l))).find(Boolean);const col=first?.parentElement;return col?Array.from(col.children):[];};const update=()=>{raf.current=0;const line=window.innerHeight*.35;const all=blocks();// the block currently crossing the reading line\nlet focus=null;for(const el of all){const r=el.getBoundingClientRect();if(r.top<=line&&r.bottom>offset)focus=el;}if(!focus&&all.length){// nothing crossing the reading line: before the text starts, focus the\n// first block; after it ends, keep the last one\nfocus=all[0].getBoundingClientRect().top>line?all[0]:all[all.length-1];}const current=focus?items.findIndex(l=>slugify(l)===focus.id):-1;for(const el of all){el.style.transition=\"opacity 0.5s cubic-bezier(0.44, 0, 0.56, 1)\";el.style.opacity=el===focus?\"1\":String(props.dimOpacity);}setActive(prev=>prev===current?prev:current);};const onScroll=()=>{if(!raf.current)raf.current=requestAnimationFrame(update);};update();window.addEventListener(\"scroll\",onScroll,{passive:true});window.addEventListener(\"resize\",onScroll);return()=>{for(const el of blocks())el.style.opacity=\"\";window.removeEventListener(\"scroll\",onScroll);window.removeEventListener(\"resize\",onScroll);if(raf.current)cancelAnimationFrame(raf.current);};},[items,offset,props.dimOpacity]);const go=label=>e=>{const el=document.getElementById(slugify(label));if(!el)return;e.preventDefault();const top=el.getBoundingClientRect().top+window.scrollY-offset;window.scrollTo({top,behavior:\"smooth\"});history.replaceState(null,\"\",\"#\"+slugify(label));};return /*#__PURE__*/_jsxs(\"nav\",{ref:navRef,\"data-legal-index\":\"\",\"aria-label\":\"On this page\",style:{...style,display:\"flex\",flexDirection:\"column\",gap},children:[/*#__PURE__*/_jsx(\"style\",{children:PHONE_CSS}),items.map((label,i)=>/*#__PURE__*/_jsx(Item,{label:label,active:i===active,onClick:go(label),props:props},label))]});}LegalIndex.defaultProps={items:[\"About this website\",\"Waitlist\"],offset:120,gap:6,fontSize:11,dimOpacity:.3,color:\"var(--token-e587ec05-e11e-4d46-9ecc-64cbd1000bb7, rgb(100, 100, 96))\",activeColor:\"var(--token-82111ac3-d4bc-4e1d-ac97-e6631d0cfac0, rgb(11, 14, 14))\"};addPropertyControls(LegalIndex,{items:{type:ControlType.Array,title:\"Sections\",control:{type:ControlType.String}},offset:{type:ControlType.Number,title:\"Scroll offset\",min:0,max:400,defaultValue:120},gap:{type:ControlType.Number,title:\"Gap\",min:0,max:40,defaultValue:6},fontSize:{type:ControlType.Number,title:\"Font size\",min:8,max:24,defaultValue:11},dimOpacity:{type:ControlType.Number,title:\"Dim opacity\",min:0,max:1,step:.05,defaultValue:.3},color:{type:ControlType.Color,title:\"Color\",defaultValue:\"var(--token-e587ec05-e11e-4d46-9ecc-64cbd1000bb7, rgb(100, 100, 96))\"},activeColor:{type:ControlType.Color,title:\"Active\",defaultValue:\"var(--token-82111ac3-d4bc-4e1d-ac97-e6631d0cfac0, rgb(11, 14, 14))\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"LegalIndex\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./LegalIndex.map","import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{forwardRef}from\"react\";// Keeps the legal-page index pinned below the header while the text scrolls.\n// Pure CSS (position: sticky). Desktop and up: pinned column on the left.\n// Phone: pinned horizontal bar under the header. Tablet: sits above the text.\nconst CSS=`\n@media (min-width: 1200px) {\n  [data-sticky-index] { position: sticky !important; top: 120px !important; align-self: flex-start; }\n}\n@media (max-width: 809.98px) {\n  [data-sticky-index] {\n    position: sticky !important; top: 60px !important; z-index: 3;\n    width: calc(100% + 32px) !important; margin: 0 -16px; padding: 12px 16px !important;\n    background: var(--token-f2f9428d-3503-41c3-b6b1-eef9a029912f);\n    border-bottom: 1px solid var(--token-3d752898-b2e1-4c40-9ed9-79de438b6955);\n  }\n  [data-sticky-index] > :not(:last-child) { display: none !important; }\n}\n`;export function withStickyIndex(Component){return /*#__PURE__*/forwardRef(function StickyIndex(props,ref){return /*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"style\",{children:CSS}),/*#__PURE__*/_jsx(Component,{...props,ref:ref,\"data-sticky-index\":\"\"})]});});}\nexport const __FramerMetadata__ = {\"exports\":{\"withStickyIndex\":{\"type\":\"reactHoc\",\"name\":\"withStickyIndex\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./StickyIndex.map"],"mappings":"A,4QAQsI,SAASkB,EAAM,CAAC,SAAO,CAC7J,MAAoB,gBAAM,MAAM,CAAC,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,cAAc,OAAO,MAAM,CAAC,QAAQ,QAAQ,UAAU,eAAe,EAAE,SAAS,CAAc,gBAAK,OAAO,CAAC,EAAE,6BAA6B,KAAKC,EAAM,UAAU,oBAAoB,CAAC,EAAe,gBAAK,OAAO,CAAC,EAAE,2BAA2B,KAAK,cAAc,OAAOA,EAAM,YAAY,EAAE,cAAc,QAAQ,eAAe,QAAQ,UAAU,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC,SAASC,EAAK,CAAC,QAAM,SAAO,UAAQ,SAAO,CAAC,GAAK,CAACC,EAAMC,GAAUtB,EAAS,EAAK,EAAQmB,EAAMI,GAAQF,EAAMG,EAAM,YAAYA,EAAM,MAAM,MAAoB,gBAAM,IAAI,CAAC,KAAK,IAAIC,EAAQC,CAAK,EAAU,UAAQ,iBAAiBJ,EAAS,EAAI,EAAE,iBAAiBA,EAAS,EAAK,EAAE,YAAYA,EAAS,EAAI,EAAE,WAAWA,EAAS,EAAK,EAAE,MAAM,CAAC,QAAQ,OAAO,WAAW,SAAS,eAAe,OAAO,QAAM,WAAW,kBAAkB,WAAW,0BAA0B,SAASE,EAAM,SAAS,WAAW,IAAI,oBAAoB,yCAAyC,OAAO,UAAU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