…
// ---- the caption line under the map: what you clicked or typed (folded, the map is only this line, sticky) ----
const capHome=()=>`<b>${esc(V.title)}</b>`+(V.model||[]).slice(0,6).map((x,i)=>` · <a href="#" class="th-bn th-brel" data-m="${i}">${esc(cut(x.label,30))}</a>`).join("");
-const capModel=i=>{const x=V.model[i],ts=(x.topics||[]).map(n=>V.members.find(m=>m.n===n)).filter(Boolean);return `<a href="#" class="th-bn" data-m="${i}"><b>${esc(x.label)}</b></a> · ${esc(x.kind)}`+(ts.length?" · in "+ts.map(m=>`<a href="#" class="th-bn th-brel" data-n="${m.n}">${esc(label(m))}</a>`).join(" · "):"")};
+const capModel=i=>{const x=V.model[i],ts=(x.topics||[]).map(n=>V.members.find(m=>m.n===n)).filter(Boolean);return `<a href="#" class="th-bn" data-m="${i}"><b>${esc(x.label)}</b></a> · ${x.kind==="concept"?"class":esc(x.kind)}`+(ts.length?" · in "+ts.map(m=>`<a href="#" class="th-bn th-brel" data-n="${m.n}">${esc(label(m))}</a>`).join(" · "):"")};
const capTopic=n=>{const m=V.members.find(x=>x.n===n),ks=(V.model||[]).map((x,i)=>[x,i]).filter(([x])=>(x.topics||[]).includes(n));return `<a href="#" class="th-bn" data-n="${n}"><b>${esc(label(m))}</b></a>`+(ks.length?" · names "+ks.map(([x,i])=>`<a href="#" class="th-bn th-brel" data-m="${i}">${esc(cut(x.label,30))}</a>`).join(" · "):"")};
const cap=h=>{const c=$("fo-bcap");if(c)c.innerHTML=h};
…
function render(){
+ const keep=new Set([...document.querySelectorAll(".fo-pick:checked")].map(i=>i.dataset.n)); // ticks survive a redraw
const main=$("fo-main"),folded=(()=>{try{return !!localStorage.getItem("fo-bfold")}catch(_){return false}})();
let first=false;try{first=!localStorage.getItem("fo-seen");if(first)localStorage.setItem("fo-seen","1")}catch(_){}
…
document.querySelectorAll(".fo-cedit").forEach(b=>{window.thTX(b);const m=V.members.find(x=>x.n===+b.dataset.n);b.value=m?m.text||"":"";setTimeout(()=>{b.focus();b.selectionStart=b.selectionEnd=b.value.length},0)});
if(view.k==="rel"){const r=V.related[view.i];api("GET","/api/v2/topics/"+encodeURIComponent(r.name)+"?format=json").then(j=>{const t=$("fo-rptext");if(t)t.textContent=cut(j.text||j.body||"",2400)}).catch(()=>{const t=$("fo-rptext");if(t)t.textContent="(can't read it from here: Open full)"})}
+ document.querySelectorAll(".fo-pick").forEach(i=>{if(keep.has(i.dataset.n))i.checked=true});
if(view.k==="model")cap(capModel(view.i));else if(view.k==="topic")cap(capTopic(view.n));else cap(capHome());
upd()}
…