PageSourceSearch

https://livehighlevel.com/cdn/shop/t/26/assets/navigation-position.js?v=20281270967652285431789446022

js livehighlevel.com collected 2026-10-04 05:27:46 UTC 3,370 bytes, 2 lines download raw bytes

1export function setupNavigationPosition(carousel,options){options?.navigationPosition?.enabled&&requestAnimationFrame(()=>{calculateNavigationPosition(carousel,options)})}function calculateNavigationPosition(carousel,options){!options?.navigationPosition?.enabled||carousel.querySelectorAll(`.${carousel.slideClass}`).length===0||deferNavigationCalculationUntilVisible(carousel,options)}function calculateElementOffsetFromSlide(element,slideEl){const elementRect=(element instanceof HTMLImageElement?element.parentElement:element).getBoundingClientRect(),slideRect=slideEl.getBoundingClientRect(),offsetTop=Math.ceil(elementRect.top-slideRect.top);return{height:element.offsetHeight,offsetTop}}function updateNavigationPositionOnImageLoaded(carousel,imageEl,slideEl,config){const measureAndUpdate=()=>{requestAnimationFrame(()=>{const{height,offsetTop}=calculateElementOffsetFromSlide(imageEl,slideEl);config.offset=offsetTop,updateNavigationPosition(carousel,config,height,1)})};imageEl.complete&&imageEl.naturalHeight>0?measureAndUpdate():(imageEl.addEventListener("load",measureAndUpdate,{once:!0}),imageEl.addEventListener("error",()=>{setNavigationPositionFallback(carousel,config)},{once:!0}))}function updateNavigationPosition(carousel,config,totalImageHeight,imageCount){if(imageCount===0){setNavigationPositionFallback(carousel,config);return}const finalPosition=totalImageHeight/imageCount/2+config.offset;carousel.style.setProperty("--navigation-offset-top",`${finalPosition}px`)}function setNavigationPositionFallback(carousel,config){const fallback=config.fallback;typeof fallback=="number"?carousel.style.setProperty("--navigation-offset-top",`${fallback}px`):carousel.style.removeProperty("--navigation-offset-top")}export function performNavigationPositionCalculation(carousel,options){const config=options?.navigationPosition;if(!config?.enabled)return;const slides=carousel.querySelectorAll(`.${carousel.slideClass}`);slides.length!==0&&requestAnimationFrame(()=>{const firstSlide=slides[0],firstImage=firstSlide.querySelector(config.selector);if(!firstImage){setNavigationPositionFallback(carousel,config);return}if(firstImage instanceof HTMLImageElement){updateNavigationPositionOnImageLoaded(carousel,firstImage,firstSlide,config);return}else if(firstImage instanceof SVGElement){const rect=firstImage.getBoundingClientRect();updateNavigationPosition(carousel,config,rect.height,1);return}const childImage=firstImage.querySelector("img");if(childImage){updateNavigationPositionOnImageLoaded(carousel,childImage,firstSlide,config);return}const{height,offsetTop}=calculateElementOffsetFromSlide(firstImage,firstSlide);config.offset=offsetTop,updateNavigationPosition(carousel,config,height,1)})}function deferNavigationCalculationUntilVisible(carousel,options){if(carousel.navigationPositionObserver&&(carousel.navigationPositionObserver.disconnect(),carousel.navigationPositionObserver=null),!options?.navigationPosition?.enabled)return;const observer=new IntersectionObserver(entries=>{entries.forEach(entry=>{entry.isIntersecting&&entry.target===carousel&&(performNavigationPositionCalculation(carousel,options),observer.disconnect())})},{threshold:.01,rootMargin:"50px"});observer.observe(carousel),carousel.navigationPositionObserver=observer}
2//# sourceMappingURL=/cdn/shop/t/26/assets/navigation-position.js.map?v=20281270967652285431789446022

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.