{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/c6FWaggQof4ISYDPpSlz/zJmgvbXNpBRhLfbBk47p/LegalLocationInPageNav.js", "ssg:https://framerusercontent.com/modules/k2V5d3ECb2crTQERWIjQ/VVyGx0w7oDdq6Bc9C9pR/WithPositionSticky.js"],
  "sourcesContent": ["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{font}from\"https://framerusercontent.com/modules/i4J1EGOrf4GiQfRahlRz/y6ouqX0rU49T8JfBwDzO/_styles.js\";import{useSmoothScroll}from\"https://framerusercontent.com/modules/eSlbzLBXJ10sKJ49G3B9/ikylEbBVmlAiX2rGrRhS/_utils.js\";export function LegalLocationInPageNav(props){const[content,setContent]=useState(null);const[currentAnchor,setCurrentAnchor]=useState(null);useSmoothScroll();useEffect(()=>{setContent(document.querySelector(\".docs-content\"));updateCurrentAnchor();},[content]);const updateCurrentAnchor=()=>{if(!content)return;const anchorElements=content.querySelectorAll(\"h2\");let newCurrentAnchor=null;for(const anchorElement of anchorElements){const{top}=anchorElement.getBoundingClientRect();if(top<=150){newCurrentAnchor=anchorElement.id;}else{break;}}// Set the first link as the current anchor by default\nif(newCurrentAnchor===null&&anchorElements.length>0){newCurrentAnchor=anchorElements[0].id;}if(newCurrentAnchor!==currentAnchor){setCurrentAnchor(newCurrentAnchor);}};useEffect(()=>{const handleScroll=()=>{updateCurrentAnchor();};window.addEventListener(\"scroll\",handleScroll);return()=>{window.removeEventListener(\"scroll\",handleScroll);};},[content]);// This function handles the click event on a navigation anchor link. It prevents the default\n// behavior of the anchor link, scrolls smoothly to the corresponding section of the page,\n// updates the URL hash, and adds a 100-pixel offset to the scroll position for the target element.\nconst handleClick=(event,anchorId)=>{event.preventDefault();const targetElement=document.getElementById(anchorId);if(targetElement){targetElement.scrollIntoView({behavior:\"smooth\",block:\"start\",inline:\"nearest\"});setTimeout(()=>{setCurrentAnchor(anchorId);window.history.pushState({},\"\",`#${anchorId}`);},700);// add a 100 pixel offset to the scroll position\nconst scrollPosition=targetElement.getBoundingClientRect().top+window.pageYOffset;window.scrollTo(0,scrollPosition-100);}};const anchors=content?Array.from(content.querySelectorAll(\"h2\")).map(h2=>{const anchorText=h2.textContent;const anchorId=anchorText.toLowerCase().replace(/[^a-z0-9]+/g,\"-\")// generate an id from the anchor text\n;h2.id=anchorId// set the id of the h2 element to the generated id\n;const currentLink=anchorId===currentAnchor;return /*#__PURE__*/_jsx(\"li\",{style:{borderLeft:currentLink?\"3px solid #1c62eb\":\"\",padding:currentLink?\"7px 0 7px 17px\":\"7px 0 7px 20px\",margin:\"3px 0 3px -1px\",display:\"inline-block\"},children:/*#__PURE__*/_jsx(\"a\",{href:`#${anchorId}`,style:{display:\"inline-block\",fontSize:\"15px\",fontFamily:currentLink?font.euclidMedium:font.euclidRegular,textDecoration:\"none\",color:currentLink?\"#1c62eb\":\"#171a25\",lineHeight:\"1.5\"},onClick:event=>handleClick(event,anchorId),children:anchorText})},anchorId);}):null;return /*#__PURE__*/_jsxs(_Fragment,{children:[anchors&&anchors.length>0&&/*#__PURE__*/_jsxs(\"nav\",{children:[/*#__PURE__*/_jsx(\"div\",{style:{fontFamily:font.euclidBold,textTransform:\"uppercase\",letterSpacing:\"0.08em\",marginBottom:\"10px\"},children:\"In This Document\"}),/*#__PURE__*/_jsx(\"ul\",{style:{display:\"flex\",flexDirection:\"column\",padding:\"0\",borderLeft:\"1px solid #becce9\",// height: \"calc(100vh - 160px)\",\noverflowY:\"auto\"},children:anchors})]}),props.children]});}\nexport const __FramerMetadata__ = {\"exports\":{\"LegalLocationInPageNav\":{\"type\":\"reactComponent\",\"name\":\"LegalLocationInPageNav\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}", "import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";const styles=`\n  \n    @media (min-width: 1200px) {\n        .position-sticky-desktop {\n            position: sticky;\n            top: 100px;\n            max-height: calc(100vh - 112px);\n            overflow-y: auto;\n        }\n    }\n\n    @media (max-width: 1200px) {\n        .position-sticky-desktop {\n            width: 100%;\n        }\n    }\n`;export function positionSticky(Component){return props=>{return /*#__PURE__*/ _jsxs(_Fragment,{children:[/*#__PURE__*/ _jsx(\"style\",{dangerouslySetInnerHTML:{__html:styles}}),/*#__PURE__*/ _jsx(\"div\",{className:\"position-sticky-desktop\",children:/*#__PURE__*/ _jsx(Component,{...props})})]});};}\nexport const __FramerMetadata__ = {\"exports\":{\"positionSticky\":{\"type\":\"reactHoc\",\"name\":\"positionSticky\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./WithPositionSticky.map"],
  "mappings": "2LAAgW,SAASA,EAAuBC,EAAM,CAAC,GAAK,CAACC,EAAQC,CAAU,EAAEC,EAAS,IAAI,EAAO,CAACC,EAAcC,CAAgB,EAAEF,EAAS,IAAI,EAAEG,EAAgB,EAAEC,EAAU,IAAI,CAACL,EAAW,SAAS,cAAc,eAAe,CAAC,EAAEM,EAAoB,CAAE,EAAE,CAACP,CAAO,CAAC,EAAE,IAAMO,EAAoB,IAAI,CAAC,GAAG,CAACP,EAAQ,OAAO,IAAMQ,EAAeR,EAAQ,iBAAiB,IAAI,EAAMS,EAAiB,KAAK,QAAUC,KAAiBF,EAAe,CAAC,GAAK,CAAC,IAAAG,CAAG,EAAED,EAAc,sBAAsB,EAAE,GAAGC,GAAK,IAAKF,EAAiBC,EAAc,OAAS,MAAO,CACl3BD,IAAmB,MAAMD,EAAe,OAAO,IAAGC,EAAiBD,EAAe,CAAC,EAAE,IAAOC,IAAmBN,GAAeC,EAAiBK,CAAgB,CAAG,EAAEH,EAAU,IAAI,CAAC,IAAMM,EAAa,IAAI,CAACL,EAAoB,CAAE,EAAE,OAAAM,EAAO,iBAAiB,SAASD,CAAY,EAAQ,IAAI,CAACC,EAAO,o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C,WAAWC,EAAK,WAAW,cAAc,YAAY,cAAc,SAAS,aAAa,MAAM,EAAE,SAAS,kBAAkB,CAAC,EAAeD,EAAK,KAAK,CAAC,MAAM,CAAC,QAAQ,OAAO,cAAc,SAAS,QAAQ,IAAI,WAAW,oBAC/4B,UAAU,MAAM,EAAE,SAASJ,CAAO,CAAC,CAAC,CAAC,CAAC,EAAEpB,EAAM,QAAQ,CAAC,CAAC,CAAE,CCRqB,IAAM4B,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgBnF,SAASC,EAAeC,EAAU,CAAC,OAAOC,GAA6BC,EAAMC,EAAU,CAAC,SAAS,CAAeC,EAAK,QAAQ,CAAC,wBAAwB,CAAC,OAAON,CAAM,CAAC,CAAC,EAAgBM,EAAK,MAAM,CAAC,UAAU,0BAA0B,SAAuBA,EAAKJ,EAAU,CAAC,GAAGC,CAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAI",
  "names": ["LegalLocationInPageNav", "props", "content", "setContent", "ye", "currentAnchor", "setCurrentAnchor", "useSmoothScroll", "ue", "updateCurrentAnchor", "anchorElements", "newCurrentAnchor", "anchorElement", "top", "handleScroll", "window", "handleClick", "event", "anchorId", "targetElement", "scrollPosition", "anchors", "h2", "anchorText", "currentLink", "p", "font", "u", "l", "styles", "positionSticky", "Component", "props", "u", "l", "p"]
}
