| 1 | "use strict";(()=>{var E="v9.0.0";var f=document,L=()=>{addEventListener("load",()=>{let t=l("#version");t.innerText=E,t.style.width=t.scrollWidth+"px"})};var b=null,h=()=>b??=l("body > main > article");var l=t=>f.querySelector(t);var m=t=>f.getElementById(t);var v=(t,n)=>t.classList.add(n);var u=(t,n)=>t.classList.remove(n);var o="dark",g="light",p="auto",T=()=>{let t=matchMedia("(prefers-color-scheme: dark)"),n=()=>{let e=localStorage.getItem(o)??p;l("#dark")?.setAttribute("class",e),l("html").className=e==o||e==p&&t.matches?o:g};t.addEventListener("change",n),window.addEventListener("storage",e=>{e.storageArea==localStorage&&e.key==o&&n()}),addEventListener("load",()=>{l("#dark").addEventListener("click",()=>{let e=localStorage.getItem(o);localStorage.setItem(o,e==o?g:e==g?p:o),n()}),n()}),n()};L();T();addEventListener("load",()=>{let t=new Map,n=new IntersectionObserver(e=>{e.forEach(i=>{let s=i.target,c=i.target.className,r=/s\d+/.test(c)?parseInt(c.substr(1)):0,a=t.get(r);a==null&&(a=new Set,t.set(r,a)),i.isIntersecting?a.add(s):(a.delete(s),u(m(s.dataset.id),"current"))});let d=0;t.forEach((i,s)=>{i.size>0&&s>d&&(d=s)}),t.forEach((i,s)=>i.forEach(c=>{let r=m(c.dataset.id);s==d?v(r,"current"):u(r,"current")}))});h().querySelectorAll("section[data-id]").forEach(e=>n.observe(e))});})(); |