import{getNavbarElement as l}from"@redocly/theme/core/utils";const r=3;function s(e,o=0){const t=document.getElementById(e)||document.getElementsByName(e)[0];if(t){const n=l()?.offsetHeight??0,i=t.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:i-n,behavior:"smooth"})}else o<r&&requestAnimationFrame(()=>s(e,o+1))}export{r as MAX_ANCHOR_ATTEMPTS,s as scrollToAnchor};
