function htmlToElement(e){const t=document.createElement("template");return e=e.trim(),t.innerHTML=e,t.content.firstChild}function initPopover(e){const t=e.replace(window.location.origin,"");document.addEventListener("DOMContentLoaded",()=>{fetchData.then(({content:e})=>{const n=[...document.getElementsByClassName("internal-link")];n.filter(e=>e.dataset.src).forEach(n=>{const s=e[n.dataset.src.replace(t,"")];if(s){const t=`

${s.title}

${removeMarkdown(s.content).split(" ",20).join(" ")}...

${new Date(s.lastmodified).toLocaleDateString()}

`,e=htmlToElement(t);n.appendChild(e),n.addEventListener("mouseover",()=>{e.classList.add("visible")}),n.addEventListener("mouseout",()=>{e.classList.remove("visible")})}})})})}