(()=>{const e=window.matchMedia("(prefers-color-scheme: dark)").matches?"github-dark":"github-light",t=new URL(location.href),n=t.searchParams.get("utterances");n&&(localStorage.setItem("utterances-session",n),t.searchParams.delete("utterances"),history.replaceState(void 0,document.title,t.href));let r=document.currentScript;void 0===r&&(r=document.querySelector('script[src^="https://utteranc.es/client.js"],script[src^="http://localhost:4000/client.js"]'));const i={};for(let e=0;e1e3&&(i.description=i.description.substr(0,Math.floor(1e3*i.description.length/o)));const c=document.querySelector("meta[property='og:title'],meta[name='og:title']");i["og:title"]=c?c.content:"",i.session=n||localStorage.getItem("utterances-session")||"",document.head.insertAdjacentHTML("afterbegin","");const l=r.src.match(/^https:\/\/utteranc\.es|http:\/\/localhost:\d+/)[0],h=`${l}/utterances.html`;r.insertAdjacentHTML("afterend",`
\n \n
`);const m=r.nextElementSibling;r.parentElement.removeChild(r),addEventListener("message",(e=>{if(e.origin!==l)return;const t=e.data;t&&"resize"===t.type&&t.height&&(m.style.height=`${t.height}px`)}))})(); //# sourceMappingURL=client.js.map