markdown-design-doc-viewer 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +2 -1
- package/README.md +2 -1
- package/dist/cli.js +38 -37
- package/dist/export.css +1 -1
- package/dist/export.js +1 -1
- package/dist/webview.js +451 -451
- package/package.json +1 -1
package/dist/export.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--vscode-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, "Noto Sans JP", sans-serif;--vscode-markdown-font-family: var(--vscode-font-family);--vscode-markdown-font-size: 14px;--vscode-markdown-line-height: 1.6;--vscode-editor-font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace}body.seqnotes-export{max-width:1600px;margin:0 auto;padding:16px 26px 40px}body.seqnotes-export.seqnotes-wide .seqnotes-pair:not(.seqnotes-pair-stacked){grid-template-columns:minmax(0,var(--seqnotes-split, 55%)) minmax(0,1fr);column-gap:24px}body.seqnotes-diff-off :is([data-seqnotes-diff=deleted],del.seqnotes-diff-del,.seqnotes-diff-old-diagram){display:none}@media print{body.seqnotes-export{max-width:none;padding:0}body.seqnotes-wide .seqnotes-pair:not(.seqnotes-pair-stacked){display:block}body.seqnotes-wide .seqnotes-pair:not(.seqnotes-pair-stacked)>.seqnotes-seq-col{position:static;max-height:none;overflow:visible}.seqnotes-splitter{display:none!important}body.seqnotes-sticky-table-header thead th{position:static}.seqnotes-section.seqnotes-active{background:none;border-left-color:transparent}.seqnotes-diagram,pre,table,.markdown-alert,details{break-inside:avoid}h1,h2,h3,h4,h5,h6{break-after:avoid}}
|
|
1
|
+
:root{--vscode-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, "Noto Sans JP", sans-serif;--vscode-markdown-font-family: var(--vscode-font-family);--vscode-markdown-font-size: 14px;--vscode-markdown-line-height: 1.6;--vscode-editor-font-family: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace}body.seqnotes-export{max-width:1600px;margin:0 auto;padding:16px 26px 40px}body.seqnotes-export.seqnotes-wide .seqnotes-pair:not(.seqnotes-pair-stacked){grid-template-columns:minmax(0,var(--seqnotes-split, 55%)) minmax(0,1fr);column-gap:24px}body.seqnotes-diff-off :is([data-seqnotes-diff=deleted],del.seqnotes-diff-del,.seqnotes-diff-old-diagram){display:none}@media print{body.seqnotes-export{max-width:none;padding:0}body.seqnotes-wide .seqnotes-pair:not(.seqnotes-pair-stacked){display:block}body.seqnotes-wide .seqnotes-pair:not(.seqnotes-pair-stacked)>.seqnotes-seq-col{position:static;max-height:none;overflow:visible}.seqnotes-splitter,.seqnotes-toc{display:none!important}body.seqnotes-sticky-table-header thead th{position:static}.seqnotes-section.seqnotes-active{background:none;border-left-color:transparent}.seqnotes-diagram,pre,table,.markdown-alert,details{break-inside:avoid}h1,h2,h3,h4,h5,h6{break-after:avoid}}
|
package/dist/export.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var S=document.body.dataset,se=.25,re=1500,ie=(e,n)=>(e??"{0}").replace("{0}",String(n)),le='<svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M3.5 10l4.5-4.5 4.5 4.5" fill="none" stroke="currentColor" stroke-width="1.5"/></svg>',ae='<svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M3.5 6l4.5 4.5 4.5-4.5" fill="none" stroke="currentColor" stroke-width="1.5"/></svg>',$='<svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M1.5 8s2.5-4.5 6.5-4.5S14.5 8 14.5 8 12 12.5 8 12.5 1.5 8 1.5 8z" fill="none" stroke="currentColor" stroke-width="1.3"/><circle cx="8" cy="8" r="2" fill="none" stroke="currentColor" stroke-width="1.3"/></svg>',ce='<svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M1.5 8s2.5-4.5 6.5-4.5S14.5 8 14.5 8 12 12.5 8 12.5 1.5 8 1.5 8z" fill="none" stroke="currentColor" stroke-width="1.3"/><circle cx="8" cy="8" r="2" fill="none" stroke="currentColor" stroke-width="1.3"/><path d="M2.5 13.5l11-11" stroke="currentColor" stroke-width="1.3"/></svg>';function z(e,n){let t=document.createElement("div");t.className="seqnotes-diff-bar",t.setAttribute("role","toolbar"),t.hidden=!0;let o=document.createElement("span");o.className="seqnotes-diff-label";let i=document.createElement("span");i.className="seqnotes-diff-counts";let r=document.createElement("span");r.className="seqnotes-diff-buttons";let c=(a,f,q)=>{let g=document.createElement("button");return g.type="button",g.innerHTML=a,g.title=f??"",g.setAttribute("aria-label",g.title),g.addEventListener("click",q),g},d=c(le,S.seqnotesDiffPreviousTitle,()=>L(-1)),E=c(ae,S.seqnotesDiffNextTitle,()=>L(1));r.append(d,E);let s,l,h,b=0,u=!0,m=()=>{d.disabled=E.disabled=b===0||!u};if("onClose"in n)r.append(c("×",S.seqnotesDiffCloseTitle,n.onClose));else{let a=c($,S.seqnotesDiffHideTitle,()=>{u=!u,s?.classList.remove("seqnotes-diff-focus"),a.innerHTML=u?$:ce,a.title=(u?S.seqnotesDiffHideTitle:S.seqnotesDiffShowTitle)??"",a.setAttribute("aria-label",a.title),m(),n.onToggle(u)});r.append(a)}t.append(o,i,r),document.body.append(t);let p=()=>Array.from(e.querySelectorAll("[data-seqnotes-diff]")).filter(a=>a.getClientRects().length>0);function L(a){let f=p();if(f.length===0)return;let q=window.innerHeight*se,g=s?f.indexOf(s):-1,v;g>=0&&l!==void 0&&Math.abs(window.scrollY-l)<2?v=f[(g+a+f.length)%f.length]:a>0?v=f.find(x=>x.getBoundingClientRect().top>q+1)??f[0]:v=[...f].reverse().find(x=>x.getBoundingClientRect().top<q-1)??f[f.length-1],s?.classList.remove("seqnotes-diff-focus"),s=v,v.classList.add("seqnotes-diff-focus"),v.scrollIntoView({block:"start"}),l=window.scrollY,clearTimeout(h),h=setTimeout(()=>v.classList.remove("seqnotes-diff-focus"),re)}return{show(a){if(t.hidden=!a,s=void 0,l=void 0,!a)return;o.textContent=a.label,o.title=a.label;let{added:f,changed:q,deleted:g}=a.stats,v=[["added",f,S.seqnotesDiffAdded],["changed",q,S.seqnotesDiffChanged],["deleted",g,S.seqnotesDiffDeleted]];i.replaceChildren(...v.filter(([,x])=>x>0).map(([x,w,y])=>{let T=document.createElement("span");return T.className="seqnotes-diff-count",T.dataset.kind=x,T.textContent=ie(y,w),T})),b=f+q+g,b===0&&(i.textContent=S.seqnotesDiffNoChanges??""),m()}}}var C='.footnote-ref a[href^="#"]';function V(e,n){let t=document.createElement("div");t.className="seqnotes-footnote-popup",t.id="seqnotes-footnote-popup",t.setAttribute("role","tooltip"),t.hidden=!0,document.body.append(t);let o,i,r=(s,l)=>{window.clearTimeout(i),i=window.setTimeout(s,l)};function c(){window.clearTimeout(i),o?.removeAttribute("aria-describedby"),o=void 0,t.hidden=!0,t.replaceChildren()}function d(s){if(window.clearTimeout(i),s===o)return;let l=s.getAttribute("href").slice(1);try{l=decodeURIComponent(l)}catch{}let h=document.getElementById(l);if(!h||!e.contains(h)||!h.matches(".footnote-item")){c();return}c();let b=h.cloneNode(!0);b.querySelectorAll(".footnote-backref, .seqnotes-zoom-button").forEach(u=>u.remove()),b.querySelectorAll(".seqnotes-zoomable").forEach(u=>{u.classList.remove("seqnotes-zoomable");for(let m of["tabindex","role","aria-label"])u.removeAttribute(m)}),b.querySelectorAll("[id]").forEach(u=>{u.closest("svg")||u.removeAttribute("id")}),t.replaceChildren(...Array.from(b.childNodes)),t.hidden=!1,o=s,s.setAttribute("aria-describedby",t.id),E(s)}function E(s){t.style.left="0",t.style.top="0";let l=s.getBoundingClientRect(),{width:h,height:b}=t.getBoundingClientRect(),u=window.innerHeight-l.bottom-6-8,m=l.top-6-8,p=b>u&&m>u?Math.max(8,l.top-6-b):l.bottom+6,L=Math.max(8,Math.min(l.left-16,window.innerWidth-8-h));t.style.left=`${L}px`,t.style.top=`${p}px`}return e.addEventListener("mouseover",s=>{let l=s.target.closest(C);l&&r(()=>d(l),l===o?0:150)}),e.addEventListener("mouseout",s=>{let l=s.target.closest(C);l&&!l.contains(s.relatedTarget)&&r(c,200)}),t.addEventListener("mouseenter",()=>window.clearTimeout(i)),t.addEventListener("mouseleave",()=>r(c,200)),e.addEventListener("focusin",s=>{let l=s.target.closest(C);l?.matches(":focus-visible")&&d(l)}),e.addEventListener("focusout",s=>{s.target.closest(C)&&!t.contains(s.relatedTarget)&&r(c,200)}),e.addEventListener("click",s=>{s.target.closest(C)&&c()}),t.addEventListener("click",s=>{let l=s.target.closest("a[href]");l&&n(l.getAttribute("href"))&&(s.preventDefault(),c())}),document.addEventListener("keydown",s=>{s.key==="Escape"&&o&&(s.stopImmediatePropagation(),c())},{capture:!0}),document.addEventListener("scroll",s=>{o&&!t.contains(s.target)&&c()},{capture:!0,passive:!0}),window.addEventListener("resize",c),new ResizeObserver(()=>{o&&E(o)}).observe(t),{hide:c}}var de=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function ue(e){return e.toLocaleLowerCase().split(/\s+/).filter(Boolean)}function Y(e,n={query:""},t){let o=Array.from(e.querySelectorAll(":scope > table"));if(o.length===0)return;let i=m=>e.getAttribute(`data-seqnotes-${m}`)??"",r={...n},c=new Map(o.map(m=>[m,Array.from(m.tBodies[0]?.rows??[])])),d=[...c.values()].reduce((m,p)=>m+p.length,0),E=document.createElement("div");E.className="seqnotes-index-filter";let s=document.createElement("input");s.type="search",s.value=r.query,s.placeholder=i("filter-placeholder"),s.setAttribute("aria-label",i("filter-label"));let l=document.createElement("span");l.className="seqnotes-index-count",l.setAttribute("aria-live","polite"),E.append(s,l);let h=document.createElement("p");h.className="seqnotes-index-empty",h.textContent=i("no-match"),e.querySelector(":scope > h1")?.after(E),o[o.length-1].after(h);let b=o.map(m=>Array.from(m.tHead?.rows[0]?.cells??[],p=>{let L=p.dataset.seqnotesColumn??"",a=document.createElement("button");return a.type="button",a.className="seqnotes-index-sort",a.title=i("sort-title"),a.append(...Array.from(p.childNodes)),a.addEventListener("click",()=>{let f=r.sort;r={...r,sort:f?.column!==L?{column:L,descending:!1}:f.descending?void 0:{column:L,descending:!0}},u(),t?.(r)}),p.replaceChildren(a),a}));s.addEventListener("input",()=>{r={...r,query:s.value},u(),t?.(r)});function u(){let m=ue(r.query),p=r.sort,L=0;o.forEach((a,f)=>{let q=[...c.get(a)],g=p?b[f].findIndex(w=>w.parentElement.dataset.seqnotesColumn===p.column):-1;if(p&&g>=0){let w=y=>{let T=y.cells[g];return T?.dataset.seqnotesSort??T?.textContent?.trim()??""};q.sort((y,T)=>{let[I,N]=[w(y),w(T)];return I===""||N===""?+(I==="")-+(N===""):de.compare(I,N)*(p.descending?-1:1)})}let v=0;for(let w of q){let y=(w.textContent??"").toLocaleLowerCase();w.hidden=!m.every(T=>y.includes(T)),v+=w.hidden?0:1}a.tBodies[0]?.append(...q),a.hidden=v===0;let x=a.previousElementSibling;x?.tagName==="H2"&&(x.hidden=v===0),b[f].forEach(w=>{let y=w.parentElement;p&&p.column===y.dataset.seqnotesColumn?y.setAttribute("aria-sort",p.descending?"descending":"ascending"):y.removeAttribute("aria-sort")}),L+=v}),l.textContent=i("count").replace("{0}",String(L)).replace("{1}",String(d)),h.hidden=L>0}return u(),s}function W(e){return e.trim().toLowerCase().replace(/[^\p{L}\p{N}\s_-]/gu,"").replace(/\s+/g,"-")||"section"}var R="seqnotes-active",fe=()=>document.body.classList.contains("seqnotes-wide"),me=e=>fe()&&!e.closest(".seqnotes-pair-stacked");function D(e,n){if(e.querySelectorAll(`.${R}`).forEach(o=>o.classList.remove(R)),!n)return;let t=CSS.escape(n.target);n.pair.querySelectorAll(`[data-seqnotes-target="${t}"], [data-seqnotes-section="${t}"]`).forEach(o=>o.classList.add(R))}function B(e){let n=e?.closest(".seqnotes-pair");if(!e||!n)return;let t=e.closest("[data-seqnotes-target]");if(t)return{pair:n,target:t.getAttribute("data-seqnotes-target"),kind:"message"};let o=e.closest(":is(h1, h2, h3, h4, h5, h6)[id]");if(o&&o.parentElement?.getAttribute("data-seqnotes-section")===o.id)return{pair:n,target:o.id,kind:"heading"}}function pe(e,n){let t=e.closest(".seqnotes-seq-col"),o=n?"smooth":"auto";if(t&&me(t)){let i=e.getBoundingClientRect(),r=t.getBoundingClientRect();t.scrollBy({top:i.top-r.top-r.height/2,behavior:o});let c=t.parentElement.getBoundingClientRect();(c.top>0||c.bottom<window.innerHeight/2)&&t.parentElement.scrollIntoView({block:"start",behavior:o})}else e.scrollIntoView({block:"center",behavior:o})}function X(e){let n=CSS.escape(e.target);if(e.kind==="message")e.pair.querySelector(`[data-seqnotes-section="${n}"]`)?.scrollIntoView({block:"nearest",behavior:"smooth"});else{let t=e.pair.querySelector(`.seqnotes-item[data-seqnotes-target="${n}"]`);t&&pe(t,!0)}}function P(e){let n=e.slice(1);try{n=decodeURIComponent(n)}catch{}let t=document.getElementById(n);((t?.closest(".footnote-item, .footnote-ref")?t:null)??document.getElementById("sn-"+n)??document.getElementById("sn-"+W(n))??t)?.scrollIntoView({block:"start"})}var j=".seqnotes-tree-toggle",_="seqnotes-tree-folded",ge="seqnotes-tree-hidden",J=".seqnotes-table-plain-toggle",K="seqnotes-table-plain",O="seqnotes-tree-current",F="seqnotes-tree-related",H=e=>Number(e.getAttribute("data-seqnotes-depth")),Q=e=>Array.from(e.querySelectorAll(":scope > tbody > tr[data-seqnotes-depth]"));function Ee(e){let n=1/0;for(let t of Q(e)){let o=H(t);o<=n&&(n=1/0);let i=o>n;t.classList.toggle(ge,i),!i&&t.classList.contains(_)&&(n=o)}}function he(e,n){e.classList.toggle(_,n),e.querySelector(j)?.setAttribute("aria-expanded",String(!n))}function be(e){let n=e.closest("table");if(!n)return[];let t=Q(n),o=t.indexOf(e),i=H(e),r=[];for(let d=o+1;d<t.length&&H(t[d])>i;d++)r.push(t[d]);let c=i;for(let d=o-1;d>=0&&c>0;d--)H(t[d])<c&&(c=H(t[d]),r.push(t[d]));return r}function ve(e,n){e.classList.toggle(K,n),e.querySelector(J)?.setAttribute("aria-pressed",String(n))}function Z(e){let n=i=>{let r=i.target,d=r.closest(J)?.closest("table");if(d){i.stopPropagation(),i.type==="click"&&ve(d,!d.classList.contains(K));return}let E=r.closest(j)?.closest("tr");E&&(i.stopPropagation(),i.type==="click"&&(he(E,!E.classList.contains(_)),Ee(E.closest("table"))))};e.addEventListener("click",n,!0),e.addEventListener("dblclick",n,!0);let t,o=()=>{e.querySelectorAll(`.${O}, .${F}`).forEach(i=>i.classList.remove(O,F)),t=void 0};e.addEventListener("mouseover",i=>{let r=i.target.closest(".seqnotes-tree-table > tbody > tr[data-seqnotes-depth]");r!==t&&(o(),r&&(t=r,r.classList.add(O),be(r).forEach(c=>c.classList.add(F))))}),e.addEventListener("mouseleave",o)}var A=document.getElementById("seqnotes-root"),ee=Number(document.body.dataset.seqnotesSplitMinWidth),Le=Number.isFinite(ee)?ee:1e3,k,G=!1;function M(){document.body.classList.toggle("seqnotes-wide",!G&&window.innerWidth>=Le)}M();window.addEventListener("resize",M);window.addEventListener("beforeprint",()=>{G=!0,M()});window.addEventListener("afterprint",()=>{G=!1,M()});V(A,e=>e.startsWith("#")?(P(e),!0):!1);Z(A);var{seqnotesDiffLabel:te,seqnotesDiffStats:ne}=document.body.dataset;if(te!==void 0&&ne!==void 0){let[e=0,n=0,t=0]=ne.split(",").map(Number);z(A,{onToggle:i=>{document.body.classList.toggle("seqnotes-diff-off",!i)}}).show({label:te,stats:{added:e,changed:n,deleted:t}})}var oe=A.querySelector(".seqnotes-index");oe&&Y(oe);A.addEventListener("mouseover",e=>D(A,B(e.target)??k));A.addEventListener("mouseleave",()=>D(A,k));A.addEventListener("click",e=>{let n=e.target,t=n.closest('a[href^="#"]');if(t){e.preventDefault(),P(t.getAttribute("href"));return}let o=B(n);o&&(k={pair:o.pair,target:o.target},D(A,k),X(o))});document.addEventListener("keydown",e=>{e.key==="Escape"&&(k=void 0,D(A,void 0))});})();
|
|
1
|
+
"use strict";(()=>{var x=document.body.dataset,re=.25,ie=1500,le=(e,n)=>(e??"{0}").replace("{0}",String(n)),ce='<svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M3.5 10l4.5-4.5 4.5 4.5" fill="none" stroke="currentColor" stroke-width="1.5"/></svg>',ae='<svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M3.5 6l4.5 4.5 4.5-4.5" fill="none" stroke="currentColor" stroke-width="1.5"/></svg>',z='<svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M1.5 8s2.5-4.5 6.5-4.5S14.5 8 14.5 8 12 12.5 8 12.5 1.5 8 1.5 8z" fill="none" stroke="currentColor" stroke-width="1.3"/><circle cx="8" cy="8" r="2" fill="none" stroke="currentColor" stroke-width="1.3"/></svg>',de='<svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M1.5 8s2.5-4.5 6.5-4.5S14.5 8 14.5 8 12 12.5 8 12.5 1.5 8 1.5 8z" fill="none" stroke="currentColor" stroke-width="1.3"/><circle cx="8" cy="8" r="2" fill="none" stroke="currentColor" stroke-width="1.3"/><path d="M2.5 13.5l11-11" stroke="currentColor" stroke-width="1.3"/></svg>';function Y(e,n){let t=document.createElement("div");t.className="seqnotes-diff-bar",t.setAttribute("role","toolbar"),t.hidden=!0;let o=document.createElement("span");o.className="seqnotes-diff-label";let i=document.createElement("span");i.className="seqnotes-diff-counts";let r=document.createElement("span");r.className="seqnotes-diff-buttons";let d=(c,E,L)=>{let h=document.createElement("button");return h.type="button",h.innerHTML=c,h.title=E??"",h.setAttribute("aria-label",h.title),h.addEventListener("click",L),h},m=d(ce,x.seqnotesDiffPreviousTitle,()=>f(-1)),w=d(ae,x.seqnotesDiffNextTitle,()=>f(1));r.append(m,w);let s,l,b,p=0,a=!0,u=()=>{m.disabled=w.disabled=p===0||!a};if("onClose"in n)r.append(d("×",x.seqnotesDiffCloseTitle,n.onClose));else{let c=d(z,x.seqnotesDiffHideTitle,()=>{a=!a,s?.classList.remove("seqnotes-diff-focus"),c.innerHTML=a?z:de,c.title=(a?x.seqnotesDiffHideTitle:x.seqnotesDiffShowTitle)??"",c.setAttribute("aria-label",c.title),u(),n.onToggle(a)});r.append(c)}t.append(o,i,r),document.body.append(t);let g=()=>Array.from(e.querySelectorAll("[data-seqnotes-diff]")).filter(c=>c.getClientRects().length>0);function f(c){let E=g();if(E.length===0)return;let L=window.innerHeight*re,h=s?E.indexOf(s):-1,v;h>=0&&l!==void 0&&Math.abs(window.scrollY-l)<2?v=E[(h+c+E.length)%E.length]:c>0?v=E.find(T=>T.getBoundingClientRect().top>L+1)??E[0]:v=[...E].reverse().find(T=>T.getBoundingClientRect().top<L-1)??E[E.length-1],s?.classList.remove("seqnotes-diff-focus"),s=v,v.classList.add("seqnotes-diff-focus"),v.scrollIntoView({block:"start"}),l=window.scrollY,clearTimeout(b),b=setTimeout(()=>v.classList.remove("seqnotes-diff-focus"),ie)}return{show(c){if(t.hidden=!c,s=void 0,l=void 0,!c)return;o.textContent=c.label,o.title=c.label;let{added:E,changed:L,deleted:h}=c.stats,v=[["added",E,x.seqnotesDiffAdded],["changed",L,x.seqnotesDiffChanged],["deleted",h,x.seqnotesDiffDeleted]];i.replaceChildren(...v.filter(([,T])=>T>0).map(([T,q,A])=>{let C=document.createElement("span");return C.className="seqnotes-diff-count",C.dataset.kind=T,C.textContent=le(A,q),C})),p=E+L+h,p===0&&(i.textContent=x.seqnotesDiffNoChanges??""),u()}}}var S='.footnote-ref a[href^="#"]';function $(e,n){let t=document.createElement("div");t.className="seqnotes-footnote-popup",t.id="seqnotes-footnote-popup",t.setAttribute("role","tooltip"),t.hidden=!0,document.body.append(t);let o,i,r=(s,l)=>{window.clearTimeout(i),i=window.setTimeout(s,l)};function d(){window.clearTimeout(i),o?.removeAttribute("aria-describedby"),o=void 0,t.hidden=!0,t.replaceChildren()}function m(s){if(window.clearTimeout(i),s===o)return;let l=s.getAttribute("href").slice(1);try{l=decodeURIComponent(l)}catch{}let b=document.getElementById(l);if(!b||!e.contains(b)||!b.matches(".footnote-item")){d();return}d();let p=b.cloneNode(!0);p.querySelectorAll(".footnote-backref, .seqnotes-zoom-button").forEach(a=>a.remove()),p.querySelectorAll(".seqnotes-zoomable").forEach(a=>{a.classList.remove("seqnotes-zoomable");for(let u of["tabindex","role","aria-label"])a.removeAttribute(u)}),p.querySelectorAll("[id]").forEach(a=>{a.closest("svg")||a.removeAttribute("id")}),t.replaceChildren(...Array.from(p.childNodes)),t.hidden=!1,o=s,s.setAttribute("aria-describedby",t.id),w(s)}function w(s){t.style.left="0",t.style.top="0";let l=s.getBoundingClientRect(),{width:b,height:p}=t.getBoundingClientRect(),a=window.innerHeight-l.bottom-6-8,u=l.top-6-8,g=p>a&&u>a?Math.max(8,l.top-6-p):l.bottom+6,f=Math.max(8,Math.min(l.left-16,window.innerWidth-8-b));t.style.left=`${f}px`,t.style.top=`${g}px`}return e.addEventListener("mouseover",s=>{let l=s.target.closest(S);l&&r(()=>m(l),l===o?0:150)}),e.addEventListener("mouseout",s=>{let l=s.target.closest(S);l&&!l.contains(s.relatedTarget)&&r(d,200)}),t.addEventListener("mouseenter",()=>window.clearTimeout(i)),t.addEventListener("mouseleave",()=>r(d,200)),e.addEventListener("focusin",s=>{let l=s.target.closest(S);l?.matches(":focus-visible")&&m(l)}),e.addEventListener("focusout",s=>{s.target.closest(S)&&!t.contains(s.relatedTarget)&&r(d,200)}),e.addEventListener("click",s=>{s.target.closest(S)&&d()}),t.addEventListener("click",s=>{let l=s.target.closest("a[href]");l&&n(l.getAttribute("href"))&&(s.preventDefault(),d())}),document.addEventListener("keydown",s=>{s.key==="Escape"&&o&&(s.stopImmediatePropagation(),d())},{capture:!0}),document.addEventListener("scroll",s=>{o&&!t.contains(s.target)&&d()},{capture:!0,passive:!0}),window.addEventListener("resize",d),new ResizeObserver(()=>{o&&w(o)}).observe(t),{hide:d}}var ue=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function fe(e){return e.toLocaleLowerCase().split(/\s+/).filter(Boolean)}function U(e,n={query:""},t){let o=Array.from(e.querySelectorAll(":scope > table"));if(o.length===0)return;let i=u=>e.getAttribute(`data-seqnotes-${u}`)??"",r={...n},d=new Map(o.map(u=>[u,Array.from(u.tBodies[0]?.rows??[])])),m=[...d.values()].reduce((u,g)=>u+g.length,0),w=document.createElement("div");w.className="seqnotes-index-filter";let s=document.createElement("input");s.type="search",s.value=r.query,s.placeholder=i("filter-placeholder"),s.setAttribute("aria-label",i("filter-label"));let l=document.createElement("span");l.className="seqnotes-index-count",l.setAttribute("aria-live","polite"),w.append(s,l);let b=document.createElement("p");b.className="seqnotes-index-empty",b.textContent=i("no-match"),e.querySelector(":scope > h1")?.after(w),o[o.length-1].after(b);let p=o.map(u=>Array.from(u.tHead?.rows[0]?.cells??[],g=>{let f=g.dataset.seqnotesColumn??"",c=document.createElement("button");return c.type="button",c.className="seqnotes-index-sort",c.title=i("sort-title"),c.append(...Array.from(g.childNodes)),c.addEventListener("click",()=>{let E=r.sort;r={...r,sort:E?.column!==f?{column:f,descending:!1}:E.descending?void 0:{column:f,descending:!0}},a(),t?.(r)}),g.replaceChildren(c),c}));s.addEventListener("input",()=>{r={...r,query:s.value},a(),t?.(r)});function a(){let u=fe(r.query),g=r.sort,f=0;o.forEach((c,E)=>{let L=[...d.get(c)],h=g?p[E].findIndex(q=>q.parentElement.dataset.seqnotesColumn===g.column):-1;if(g&&h>=0){let q=A=>{let C=A.cells[h];return C?.dataset.seqnotesSort??C?.textContent?.trim()??""};L.sort((A,C)=>{let[N,R]=[q(A),q(C)];return N===""||R===""?+(N==="")-+(R===""):ue.compare(N,R)*(g.descending?-1:1)})}let v=0;for(let q of L){let A=(q.textContent??"").toLocaleLowerCase();q.hidden=!u.every(C=>A.includes(C)),v+=q.hidden?0:1}c.tBodies[0]?.append(...L),c.hidden=v===0;let T=c.previousElementSibling;T?.tagName==="H2"&&(T.hidden=v===0),p[E].forEach(q=>{let A=q.parentElement;g&&g.column===A.dataset.seqnotesColumn?A.setAttribute("aria-sort",g.descending?"descending":"ascending"):A.removeAttribute("aria-sort")}),f+=v}),l.textContent=i("count").replace("{0}",String(f)).replace("{1}",String(m)),b.hidden=f>0}return a(),s}function V(e){return e.trim().toLowerCase().replace(/[^\p{L}\p{N}\s_-]/gu,"").replace(/\s+/g,"-")||"section"}var I="seqnotes-active",me=()=>document.body.classList.contains("seqnotes-wide"),pe=e=>me()&&!e.closest(".seqnotes-pair-stacked");function H(e,n){if(e.querySelectorAll(`.${I}`).forEach(o=>o.classList.remove(I)),!n)return;let t=CSS.escape(n.target);n.pair.querySelectorAll(`[data-seqnotes-target="${t}"], [data-seqnotes-section="${t}"]`).forEach(o=>o.classList.add(I))}function B(e){let n=e?.closest(".seqnotes-pair");if(!e||!n)return;let t=e.closest("[data-seqnotes-target]");if(t)return{pair:n,target:t.getAttribute("data-seqnotes-target"),kind:"message"};let o=e.closest(":is(h1, h2, h3, h4, h5, h6)[id]");if(o&&o.parentElement?.getAttribute("data-seqnotes-section")===o.id)return{pair:n,target:o.id,kind:"heading"}}function ge(e,n){let t=e.closest(".seqnotes-seq-col"),o=n?"smooth":"auto";if(t&&pe(t)){let i=e.getBoundingClientRect(),r=t.getBoundingClientRect();t.scrollBy({top:i.top-r.top-r.height/2,behavior:o});let d=t.parentElement.getBoundingClientRect();(d.top>0||d.bottom<window.innerHeight/2)&&t.parentElement.scrollIntoView({block:"start",behavior:o})}else e.scrollIntoView({block:"center",behavior:o})}function X(e){let n=CSS.escape(e.target);if(e.kind==="message")e.pair.querySelector(`[data-seqnotes-section="${n}"]`)?.scrollIntoView({block:"nearest",behavior:"smooth"});else{let t=e.pair.querySelector(`.seqnotes-item[data-seqnotes-target="${n}"]`);t&&ge(t,!0)}}function O(e){let n=e.slice(1);try{n=decodeURIComponent(n)}catch{}let t=document.getElementById(n);((t?.closest(".footnote-item, .footnote-ref")?t:null)??document.getElementById("sn-"+n)??document.getElementById("sn-"+V(n))??t)?.scrollIntoView({block:"start"})}var j=".seqnotes-tree-toggle",F="seqnotes-tree-folded",Ee="seqnotes-tree-hidden",J=".seqnotes-table-plain-toggle",K="seqnotes-table-plain",_="seqnotes-tree-current",P="seqnotes-tree-related",D=e=>Number(e.getAttribute("data-seqnotes-depth")),Q=e=>Array.from(e.querySelectorAll(":scope > tbody > tr[data-seqnotes-depth]"));function he(e){let n=1/0;for(let t of Q(e)){let o=D(t);o<=n&&(n=1/0);let i=o>n;t.classList.toggle(Ee,i),!i&&t.classList.contains(F)&&(n=o)}}function be(e,n){e.classList.toggle(F,n),e.querySelector(j)?.setAttribute("aria-expanded",String(!n))}function ve(e){let n=e.closest("table");if(!n)return[];let t=Q(n),o=t.indexOf(e),i=D(e),r=[];for(let m=o+1;m<t.length&&D(t[m])>i;m++)r.push(t[m]);let d=i;for(let m=o-1;m>=0&&d>0;m--)D(t[m])<d&&(d=D(t[m]),r.push(t[m]));return r}function we(e,n){e.classList.toggle(K,n),e.querySelector(J)?.setAttribute("aria-pressed",String(n))}function Z(e){let n=i=>{let r=i.target,m=r.closest(J)?.closest("table");if(m){i.stopPropagation(),i.type==="click"&&we(m,!m.classList.contains(K));return}let w=r.closest(j)?.closest("tr");w&&(i.stopPropagation(),i.type==="click"&&(be(w,!w.classList.contains(F)),he(w.closest("table"))))};e.addEventListener("click",n,!0),e.addEventListener("dblclick",n,!0);let t,o=()=>{e.querySelectorAll(`.${_}, .${P}`).forEach(i=>i.classList.remove(_,P)),t=void 0};e.addEventListener("mouseover",i=>{let r=i.target.closest(".seqnotes-tree-table > tbody > tr[data-seqnotes-depth]");r!==t&&(o(),r&&(t=r,r.classList.add(_),ve(r).forEach(d=>d.classList.add(P))))}),e.addEventListener("mouseleave",o)}var Le="seqnotes-toc-current";function Te(e){let n=e.cloneNode(!0);return n.querySelectorAll(".seqnotes-step, .footnote-ref, .seqnotes-diff-del").forEach(t=>t.remove()),(n.textContent??"").trim()}function qe(e){for(let n=e.closest("details");n;n=n.parentElement?.closest("details")??null)n.open=!0;e.scrollIntoView({block:"start"})}function ee(e){let n=document.createElement("nav");n.className="seqnotes-toc",n.hidden=!0;let t=document.createElement("div");t.className="seqnotes-toc-title",t.textContent=document.body.dataset.seqnotesTocTitle??"",n.setAttribute("aria-label",t.textContent);let o=document.createElement("ol");n.append(t,o),document.body.append(n);let i=[],r=-1;function d(p){let a=p?Array.from(e.querySelectorAll("h1, h2, h3")).filter(f=>!f.closest('[data-seqnotes-diff="deleted"]')).map(f=>({heading:f,level:Number(f.tagName[1]),text:Te(f)})).filter(f=>f.text):[],u=Math.min(...a.map(f=>f.level)),g=o.scrollTop;o.replaceChildren(...a.map(({heading:f,level:c,text:E})=>{let L=document.createElement("li");L.style.setProperty("--seqnotes-toc-depth",String(c-u));let h=document.createElement("button");h.type="button",h.title=E;let v=document.createElement("span");return v.className="seqnotes-toc-text",v.textContent=E,h.append(v),h.addEventListener("mousedown",T=>T.preventDefault()),h.addEventListener("click",()=>qe(f)),L.append(h),L})),o.scrollTop=g,i=a.map(f=>f.heading),r=-1,n.hidden=a.length===0,m()}function m(){let a=window.scrollY>0&&window.scrollY+window.innerHeight>=document.documentElement.scrollHeight-1?window.innerHeight:window.innerHeight*.2,u=-1;for(let[g,f]of i.entries()){let c=f.getBoundingClientRect();if(c.height!==0){if(c.top>a)break;u=g}}u!==r&&(w(r,!1),w(u,!0),r=u,n.matches(":hover")||s())}function w(p,a){let u=o.children[p];if(!u)return;u.classList.toggle(Le,a);let g=u.querySelector("button");a?g.setAttribute("aria-current","location"):g.removeAttribute("aria-current")}function s(){let p=o.children[r];if(!(p instanceof HTMLElement))return;let a=p.offsetTop,u=a+p.offsetHeight;a<o.scrollTop?o.scrollTop=a:u>o.scrollTop+o.clientHeight&&(o.scrollTop=u-o.clientHeight)}n.addEventListener("pointerenter",s),n.addEventListener("pointerleave",s),n.addEventListener("focusin",p=>{n.contains(p.relatedTarget)||s()});let l=0;function b(){l||(l=requestAnimationFrame(()=>{l=0,m()}))}return window.addEventListener("scroll",b,{passive:!0}),window.addEventListener("resize",b),new ResizeObserver(b).observe(e),{build:d}}var y=document.getElementById("seqnotes-root"),te=Number(document.body.dataset.seqnotesSplitMinWidth),ye=Number.isFinite(te)?te:1e3,k,G=!1;function M(){document.body.classList.toggle("seqnotes-wide",!G&&window.innerWidth>=ye)}M();window.addEventListener("resize",M);window.addEventListener("beforeprint",()=>{G=!0,M()});window.addEventListener("afterprint",()=>{G=!1,M()});$(y,e=>e.startsWith("#")?(O(e),!0):!1);Z(y);document.body.dataset.seqnotesToc!==void 0&&ee(y).build(!0);var{seqnotesDiffLabel:ne,seqnotesDiffStats:oe}=document.body.dataset;if(ne!==void 0&&oe!==void 0){let[e=0,n=0,t=0]=oe.split(",").map(Number);Y(y,{onToggle:i=>{document.body.classList.toggle("seqnotes-diff-off",!i)}}).show({label:ne,stats:{added:e,changed:n,deleted:t}})}var se=y.querySelector(".seqnotes-index");se&&U(se);y.addEventListener("mouseover",e=>H(y,B(e.target)??k));y.addEventListener("mouseleave",()=>H(y,k));y.addEventListener("click",e=>{let n=e.target,t=n.closest('a[href^="#"]');if(t){e.preventDefault(),O(t.getAttribute("href"));return}let o=B(n);o&&(k={pair:o.pair,target:o.target},H(y,k),X(o))});document.addEventListener("keydown",e=>{e.key==="Escape"&&(k=void 0,H(y,void 0))});})();
|