const section=document.querySelector(".blog-section"),blogContent=document.querySelector(".blog-section__content-box").querySelectorAll("h1, h2, h3, h4"),headings=[];if(blogContent.forEach(((e,t)=>{const o=e.getAttribute("id");o&&(headings[t]={tagClass:e.tagName.toLowerCase(),text:e.textContent,link:o})})),0!==headings.length){const e=section.querySelector(".blog-section__headings-list");headings.forEach((t=>{const o=document.createElement("li");o.innerHTML=`<a href="#${t.link}"><div class="${t.tagClass}">${t.text}</div></a>`,e.appendChild(o)}))}else section.querySelector(".blog-section__headings").style.display="none";const backToTop=document.querySelector(".back-to-top");backToTop&&backToTop.addEventListener("click",(()=>{window.scrollTo({top:0,behavior:"smooth"})}));