@pi-outpost/embed 0.33.0 → 0.34.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/dist/{conversationExport-DZ2Xi8Lb.js → conversationExport-0aa7tXBv.js} +1 -1
- package/dist/{conversationExport-BeO-f3PY.cjs → conversationExport-BVHvnvh5.cjs} +1 -1
- package/dist/{conversationHistory-CZD9jO6h.cjs → conversationHistory-CNfOwM8H.cjs} +7 -7
- package/dist/{conversationHistory-CT_-smUm.js → conversationHistory-D-hT7EvD.js} +5224 -5215
- package/dist/pi-outpost-embed.cjs +2 -2
- package/dist/pi-outpost-embed.js +2 -2
- package/package.json +1 -1
|
@@ -2,18 +2,18 @@ const e=require("./rolldown-runtime-DF3sbh8G.cjs"),t=require("./lib-DVuUFI8o.cjs
|
|
|
2
2
|
`),n=v(t);if(n===-1)return;let r=t[n],i=/^(\s*)(flowchart|graph)([ \t]+(TD|TB|BT|LR|RL)\b)?(.*)$/i.exec(r);if(i!==null){let[,e,r,,a,o]=i,s=a===void 0?`TB`:_(a),c=g(s),l=[...t];return l[n]=`${e}${r} ${c}${o}`,{direction:s,turned:l.join(`
|
|
3
3
|
`)}}let a=/^(\s*)stateDiagram(-v2)?\s*$/i.exec(r);if(a!==null)return b(t,n,a[1])}function b(e,t,n){let r=0;for(let n=t+1;n<e.length;n+=1){let t=e[n],i=r===0?/^\s*direction\s+(TD|TB|BT|LR|RL)\s*$/i.exec(t):null;if(i!==null){let r=_(i[1]),a=[...e];return a[n]=t.replace(/(direction\s+)(TD|TB|BT|LR|RL)/i,`$1${g(r)}`),{direction:r,turned:a.join(`
|
|
4
4
|
`)}}r+=(t.match(/\{/g)?.length??0)-(t.match(/\}/g)?.length??0),r<0&&(r=0)}let i=[...e];return i.splice(t+1,0,`${n} direction LR`),{direction:`TB`,turned:i.join(`
|
|
5
|
-
`)}}var x=null;async function ee(e){let t=await(x??=Promise.resolve().then(()=>require("./mermaid.core-4MZ-Iwu7.cjs")).then(e=>e.t));return t.default.initialize({startOnLoad:!1,theme:e,look:`classic`,securityLevel:`strict`,suppressErrorRendering:!0}),t}function te(e){let t=/viewBox="\s*[\d.-]+[\s,]+[\d.-]+[\s,]+([\d.]+)[\s,]+([\d.]+)/.exec(e),n=t?Number(t[1]):NaN;return Number.isFinite(n)&&n>0?n:void 0}function ne(e,t){if(typeof e!=`object`||!e||!(`props`in e))return null;let n=e.props;if(t!==void 0&&!RegExp(`\\blanguage-${t}\\b`).test(n.className??``))return null;let r=n.children;return typeof r==`string`?r:Array.isArray(r)&&r.every(e=>typeof e==`string`)?r.join(``):null}function re(e){let t=ne(e,`mermaid`);return t===null?null:t.trim()}function ie(e){let{children:t,...n}=e,r=re(t);if(r!==null)return(0,i.jsx)(ae,{code:r});let a=ne(t);return a===null?(0,i.jsx)(`pre`,{...n,children:t}):(0,i.jsxs)(`div`,{className:`code-block relative`,"data-testid":`code-block`,children:[(0,i.jsx)(`pre`,{...n,children:t}),(0,i.jsx)(c,{iconOnly:!0,text:a.replace(/\n$/,``),className:`absolute right-1.5 top-1.5 rounded border border-zinc-300 bg-white/80 px-1.5 py-0.5 text-xs text-zinc-500 hover:text-zinc-800 dark:border-zinc-700 dark:bg-zinc-900/80 dark:text-zinc-400 dark:hover:text-zinc-100`})]})}function ae({code:e}){let n=(0,r.useId)().replace(/[^a-zA-Z0-9]/g,``),a=s()===`light`?`default`:`dark`,[o,l]=(0,r.useState)(null),[d,m]=(0,r.useState)(null),[g,_]=(0,r.useState)(!1),[v,b]=(0,r.useState)(!1),x=(0,r.useMemo)(()=>y(e),[e]),ne=x===void 0?`landscape`:h(x.direction),[re,ie]=(0,r.useState)(void 0),ae=o?.svg??null,oe=o!==null&&o.orientation!==ne,se=(0,r.useRef)(null),ce=(0,r.useRef)(e);return ce.current=e,(0,r.useEffect)(()=>{let e=!1,r=setTimeout(()=>void t.g(async()=>{try{let t=(await ee(a)).default,r=ce.current,i=y(r),o=i===void 0?`landscape`:h(i.direction);if(re!==void 0&&i!==void 0){let a=re===o?r:i.turned,{svg:s}=await t.render(`mermaid-${n}`,a);e||(l({svg:s,orientation:re}),m(null));return}let s=await t.render(`mermaid-${n}`,r),c={svg:s.svg,orientation:o},u=te(s.svg);if(i!==void 0&&u!==void 0&&u>710){let e=await t.render(`mermaid-${n}-turned`,i.turned),r=te(e.svg);if(r!==void 0){let t=o===`landscape`?p(u,r):p(r,u);t!==o&&(c={svg:e.svg,orientation:t})}}e||(l(c),m(null))}catch(t){e||m(t instanceof Error?t.message:String(t))}}),300);return()=>{e=!0,clearTimeout(r)}},[e,n,a,re]),ae?(0,i.jsxs)(`div`,{ref:se,className:`group relative my-2 rounded-lg border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-800 dark:bg-zinc-900`,children:[(0,i.jsx)(`div`,{className:`absolute left-2 top-2 z-10 opacity-0 transition-opacity group-hover:opacity-100`,children:(0,i.jsx)(`button`,{type:`button`,onClick:()=>_(!g),title:g?`Show diagram`:`Show code`,className:`rounded px-1.5 py-0.5 text-xs text-zinc-400 hover:bg-zinc-100 hover:text-zinc-700 dark:text-zinc-600 dark:hover:bg-zinc-800 dark:hover:text-zinc-300`,children:g?`⚏ diagram`:`⌗ code`})}),(0,i.jsxs)(`div`,{className:`absolute right-2 top-2 z-10 flex items-center gap-2 opacity-0 transition-opacity group-hover:opacity-100`,children:[!g&&x!==void 0&&o!==null&&(0,i.jsx)(`button`,{type:`button`,"data-testid":`mermaid-orientation`,onClick:()=>ie(e=>f(e??o.orientation)),title:o.orientation===`portrait`?`Turn it across the page — it is drawn down`:`Turn it down the page — it is drawn across`,"aria-label":`Turn the diagram ${f(o.orientation)}`,className:`rounded px-1.5 py-0.5 text-xs text-zinc-400 hover:bg-zinc-100 hover:text-zinc-700 dark:text-zinc-600 dark:hover:bg-zinc-800 dark:hover:text-zinc-300`,children:o.orientation===`portrait`?`↔ landscape`:`↕ portrait`}),!g&&(0,i.jsx)(`button`,{type:`button`,onClick:()=>b(!0),"aria-label":`Show diagram at full size`,className:`rounded px-1.5 py-0.5 text-xs text-zinc-400 hover:bg-zinc-100 hover:text-zinc-700 dark:text-zinc-600 dark:hover:bg-zinc-800 dark:hover:text-zinc-300`,children:`⤢ enlarge`}),(0,i.jsx)(c,{text:e})]}),g?(0,i.jsx)(`pre`,{className:`overflow-x-auto font-mono text-xs text-zinc-500 dark:text-zinc-400`,children:e}):(0,i.jsx)(`div`,{className:`flex justify-center overflow-x-auto [&_svg]:max-w-full`,dangerouslySetInnerHTML:{__html:ae}}),oe&&!g&&(0,i.jsxs)(`div`,{className:`mt-1 text-center text-xs text-zinc-400 dark:text-zinc-600`,"data-testid":`mermaid-turned`,children:[`drawn `,o?.orientation,` to fit — the source asks for `,ne]}),(0,i.jsx)(u,{label:`diagram`,testId:`mermaid-enlarged`,open:v,onClose:()=>b(!1),anchorRef:se,children:(0,i.jsx)(`div`,{style:{width:te(ae)},className:`[&_svg]:!h-auto [&_svg]:!max-w-none [&_svg]:!w-full`,dangerouslySetInnerHTML:{__html:ae}})})]}):(0,i.jsxs)(`pre`,{className:`my-2 overflow-x-auto rounded-lg border border-zinc-200 bg-zinc-50 p-3 font-mono text-xs text-zinc-500 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-400`,children:[e,d&&(0,i.jsx)(`div`,{className:`mt-2 text-red-600 dark:text-red-400`,children:d})]})}var oe=`urn:structured-exchange:1`,se=[`graph`,`sequence`];function ce(e){return le(e)?[`graph`,`sequence`,`table`]:se}function le(e){return e===`urn:structured-exchange:2`||e===`urn:structured-exchange:3`}function ue(e){if(Array.isArray(e))return{cells:e};let t=e.heading;return typeof t==`string`?{cells:[],role:e.role,heading:t}:{cells:e.cells,role:e.role}}var de={nodes:500,edges:2e3,participants:100,messages:1e3,columns:50,rows:5e3,removals:500,ref:200,localId:200,label:500,kind:100,kindsPerVocabulary:64,columnName:200,cell:1e3},fe=`urn:structured-exchange:2`,pe={profile:200,attributesPerItem:50,removeAttributesPerItem:50,attributeName:200,attributeString:1e3,attributeListItems:50,revision:200,locationsPerItem:10,uri:2e3,position:1e6,artifactsPerItem:20,artifactsPerDocument:50,artifactRel:100,artifactMediaType:100,artifactLabel:500,artifactDigest:71,relations:2e3,heading:500,headingDepth:6,viewpoints:20,viewpointConcern:500},me=8e6,he=`urn:structured-exchange:3`,ge=[oe,fe,he];function _e(e){return ge.find(t=>t===e)}var ve=4e6,ye=Math.max(ve,me);function be(e){return le(e)?me:ve}var xe=e=>new TextEncoder().encode(e).length;function Se(e){return e===`bytes`?ye:e===`relations`?pe.relations:de[e]}function Ce(e,t){let n=Se(e),r=t?.[e];return r===void 0||r>=n?{limit:n,level:`ceiling`}:{limit:r,level:`deployment`}}function we(e,t,n){let r=xe(e),i=Ce(`bytes`,t),a=n===void 0?1/0:be(n),o=Math.min(i.limit,a),s=o===a&&a<i.limit?`ceiling`:i.level;if(!(r<=o))return{rule:`document-too-large`,path:``,message:`document is ${r} bytes, past the ${o}-byte ${s===`ceiling`?`contract ceiling`:`limit this deployment applies`}`,limit:o,observed:r,level:s}}var Te={graph:[`nodes`,`edges`],sequence:[`participants`,`messages`],table:[`columns`,`rows`,`relations`]};function Ee(e,t){if(t===void 0)return[];let n=[];for(let r of Te[e.kind]??[]){let i=e.data[r];if(!Array.isArray(i))continue;let{limit:a,level:o}=Ce(r,t);o===`deployment`&&i.length>a&&n.push({rule:`collection-past-deployment-limit`,path:`/data/${r}`,message:`${r} has ${i.length} entries, past the ${a} this deployment allows`,limit:a,observed:i.length,level:o})}return n}function De(e,t){let n={};for(let t of Te[e.kind]??[]){let r=e.data[t];Array.isArray(r)&&(n[t]=r.length)}return{kind:e.kind,bytes:xe(t),counts:n}}var Oe=6.6,ke=5.4;function Ae(e,t,n){let r=e.flatMap(e=>e.split(/\r?\n/)).reduce((e,t)=>Math.max(e,t.length),0);return Math.min(Math.max(r*Oe+22,t),n)}function je(e,t,n,r){let i=t.map(e=>Fe(e).length).reduce((e,t)=>Math.max(e,t),0);return Math.max(Ae(e,n,r),Math.min(i*ke+22,r))}function Me(e,t,n=Oe){let r=Math.max(Math.floor((t-22)/n+1e-6),4),i=[],a=e.split(/\r?\n/);if(a.length>1)return a.flatMap(e=>Me(e,t,n)).slice(0,3);let o=``;for(let t of e.split(/\s+/)){let e=o===``?t:`${o} ${t}`;if(e.length<=r){o=e;continue}for(o!==``&&i.push(o),o=t;o.length>r&&i.length<3;)i.push(o.slice(0,r)),o=o.slice(r)}if(o!==``&&i.push(o),i.length===0)return[``];if(i.length<=3)return i;let s=i.slice(0,3);return s[2]=`${s[2].slice(0,Math.max(r-1,1))}…`,s}function Ne(e,t){return e*15+t*15+14}function Pe(e,t){return e.flatMap(e=>Me(Fe(e),t,ke))}function Fe(e){return`${e.field}: ${e.from===void 0?``:`${e.from} → `}${e.to}`}function Ie(e,t){return`${e}: ${Le(t)}`}function Le(e){return Array.isArray(e)?e.map(e=>Le(e)).join(`, `):e===null?`null`:typeof e==`object`&&e&&typeof e.ref==`string`?`<${e.ref}>`:String(e)}function Re(e){let t=e.range===void 0?``:` lines ${e.range.startLine}–${e.range.endLine}`,n=e.revision===void 0?``:` at ${e.revision}`;return`${e.uri}${t}${n}`}function ze(e){let t=e.label===void 0?e.uri:`${e.label} (${e.uri})`,n=e.mediaType===void 0?``:`, ${e.mediaType}`;return`${e.rel}: ${t}${n} — ${e.sha256.slice(0,14)}…`}var Be=864e5,Ve=/^(\d{4})-(\d{2})-(\d{2})$/;function He(e){let t=Ve.exec(e);if(t===null)return;let[n,r,i]=[Number(t[1]),Number(t[2]),Number(t[3])],a=new Date(Date.UTC(n,r-1,i));if(a.setUTCFullYear(n,r-1,i),a.getUTCFullYear()===n&&a.getUTCMonth()===r-1&&a.getUTCDate()===i)return Math.round(a.getTime()/Be)}function Ue(e){let t=new Date(e*Be);return`${String(t.getUTCFullYear()).padStart(4,`0`)}-${String(t.getUTCMonth()+1).padStart(2,`0`)}-${String(t.getUTCDate()).padStart(2,`0`)}`}function We(e=new Date){return Math.round(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())/Be)}function Ge(e){let t=He(e.type===`activity`?e.start:e.date),n=He(e.type===`activity`?e.end:e.date);return t===void 0||n===void 0?void 0:{start:t,end:n}}function Ke(e){let t=new Map;return e.rows.forEach((e,n)=>{e.type===`task`&&(t.has(e.id)||t.set(e.id,{id:e.id,type:`task`,row:n,days:qe(e)}),e.items.forEach((e,r)=>{e.id===void 0||t.has(e.id)||t.set(e.id,{id:e.id,type:e.type,row:n,item:r,days:Ge(e)})}))}),t}function qe(e){let t;for(let n of e.items){let e=Ge(n);e!==void 0&&(t=t===void 0?{...e}:{start:Math.min(t.start,e.start),end:Math.max(t.end,e.end)})}return t}function Je(e){return e.type??`finish-to-start`}function Ye(e){return{from:e.startsWith(`finish`)?`end`:`start`,to:e.endsWith(`finish`)?`end`:`start`}}function Xe(e,t){let n=t.get(e.from)?.days,r=t.get(e.to)?.days;if(n===void 0||r===void 0)return;let i=Ye(Je(e));return r[i.to]>=n[i.from]}function Ze(e){if(`date`in e){let t=He(e.date)??0;return{start:t,end:t}}return{start:He(e.start)??0,end:He(e.end)??0}}function Qe(e){if(e.previous===void 0)return;let t=Ze(e.type===`activity`?{start:e.start,end:e.end}:{date:e.date}),n=Ze(e.previous);return{start:t.start-n.start,end:t.end-n.end}}function $e(e){if(e===0)return``;let t=e>0?`+`:`−`,n=Math.abs(e);return n<14?`${t}${n}d`:n<70?`${t}${Math.round(n/7)}w`:`${t}${Math.round(n/30.44)}mo`}function et(e){let t=Qe(e);return t===void 0?``:t.start===t.end?$e(t.start):t.start===0?`end${$e(t.end)}`:t.end===0?`start${$e(t.start)}`:`${$e(t.start)}, end${$e(t.end)}`}function tt(e,t){if(e.role!==void 0||t?.role!==void 0)return!0;let n=Qe(e);return n!==void 0&&(n.start!==0||n.end!==0)}function nt(e){return e.role!==void 0||e.items.some(t=>tt(t,e))}var rt={week:12,month:4,quarter:.75};function it(e,t){let n=e>=8?`week`:e>=1?`month`:`quarter`;if(t===void 0)return n;let r=[`week`,`month`,`quarter`];return r[Math.max(r.indexOf(n),r.indexOf(t))]}var at=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];function ot(e){return e.width>=24?e.label:e.width>=9?e.label.charAt(0):``}function st(e,t){return t===`month`?ot(e):e.width>=e.label.length*6+4?e.label:``}function ct(e){return((e+3)%7+7)%7}function lt(e){let t=e-ct(e)+3,n=new Date(t*Be).getUTCFullYear();return Math.floor((t-pt(n,0))/7)+1}function ut(e){if(e.label!==void 0&&e.label!==``)return e.label;if(e.type===`milestone`&&e.kind!==void 0&&e.kind!==``)return e.kind}function dt(e){return e.length*Oe}function ft(e,t){let n=new Date(e*Be),r=n.getUTCFullYear(),i=n.getUTCMonth(),a=[];for(;;){i+=1,i===12&&(i=0,r+=1);let e=pt(r,i);if(e>t)return a;a.push({day:e,year:r,month:i})}}function pt(e,t){let n=new Date(0);return n.setUTCFullYear(e,t,1),Math.round(n.getTime()/Be)}function mt(e,t){let n=e=>e===`bar`||e===`ghost`;return n(e)&&t===`star`||e===`star`&&n(t)}function ht(e,t){return e.x0<t.x1&&t.x0<e.x1}function gt(e,t){if(t<=0||e.width<=t)return;let n=e.items.filter(e=>e.change!==void 0);if(n.length>0){let e=Math.min(...n.flatMap(e=>e.ghost===void 0?[e.glyph.x]:[e.glyph.x,e.ghost.x]));return e<t*.9?void 0:Math.max(0,e-t/6)}if(`x`in e.today&&e.today.x>t*.8)return Math.max(0,e.today.x-t/3)}function _t(e,t,n={}){let r=He(e.time.start)??0,i=He(e.time.end)??r,a=n.pxPerDay??rt[e.time.scale]??4,o=(i-r+1)*a,s=e=>(e-r)*a,c=ft(r,i),l=new Date(r*Be),u=[{day:r,year:l.getUTCFullYear(),month:l.getUTCMonth()},...c],d=u.map((e,t)=>{let n=t+1<u.length?u[t+1].day:i+1;return{label:at[e.month],x:s(e.day),width:(n-e.day)*a,year:e.year,month:e.month}}),f=[];u.forEach((e,t)=>{let n=d[t],r=f[f.length-1];r!==void 0&&r.label===String(e.year)?r.width+=n.width:f.push({label:String(e.year),x:n.x,width:n.width})});let p=it(a,n.unit),m=(e,t)=>e.map((n,r)=>{let o=r+1<e.length?e[r+1]:i+1;return{label:t(n),x:s(n),width:(o-n)*a}}),h=f,g;if(p===`week`){let e=[];for(let t=r-ct(r)+7;t<=i;t+=7)e.push(t);g=m([r,...e],e=>`W${lt(e)}`),h=d.map(e=>({label:`${e.label} ${e.year}`,x:e.x,width:e.width}))}else if(p===`quarter`){let e=u.filter((e,t)=>t===0||e.month%3==0);g=e.map((t,n)=>{let r=n+1<e.length?e[n+1].day:i+1;return{label:`Q${Math.floor(t.month/3)+1}`,x:s(t.day),width:(r-t.day)*a}})}else g=d;let _=g.slice(1).map(e=>e.x),v=[],y=[],b=0,x=e.comparedTo!==void 0,ee=(e,t)=>{if(!x)return;if(e.role===`added`||t.role===`added`)return`(new)`;let n=et(e);return n===``?void 0:`(${n})`},te=(e,t,n)=>{let r=ee(e,t);return r===void 0?n:n===void 0?r:`${n} ${r}`},ne=(e,t)=>{if(x)return e.role===`removed`||t.role===`removed`?`removed`:e.role===`added`||t.role===`added`?`added`:et(e)===``?void 0:`moved`},re=(e,t)=>{let n=[],r=[],i=[],c=e.map(e=>({...e,days:Ge(e.item)})).filter(e=>e.days!==void 0).sort((e,t)=>Number(e.item.type===`milestone`)-Number(t.item.type===`milestone`)||e.days.start-t.days.start||e.row-t.row||e.index-t.index);for(let{item:e,index:t,row:l,days:u,text:d,note:f,change:p}of c){let c=[],m;if(p===`moved`&&e.previous!==void 0){let t=Ze(e.previous);if(e.type===`activity`)m={x0:s(t.start),x1:s(t.end+1)};else{let e=s(t.start)+a/2;m={x0:e-7,x1:e+7,cx:e}}c.push({kind:`ghost`,x0:m.x0,x1:m.x1})}let h,g,_,v;if(e.type===`activity`){if(g=s(u.start),_=s(u.end+1),c.push({kind:`bar`,x0:g,x1:_}),d!==void 0){let e=dt(d);h=e+12<=_-g?{text:d,inside:!0,x:g+6,width:e}:vt(d,g,_,o),f!==void 0&&(h.note=f),c.push({kind:`label`,x0:h.x,x1:h.x+h.width})}}else v=s(u.start)+a/2,g=v-7,_=v+7,c.push({kind:`star`,x0:g,x1:_}),d!==void 0&&(h=vt(d,g,_,o),f!==void 0&&(h.note=f),c.push({kind:`label`,x0:h.x,x1:h.x+h.width}));let y=n.findIndex(e=>c.every(t=>e.every(e=>mt(t.kind,e.kind)||!ht(t,e))));y===-1&&(y=n.length,n.push([])),n[y].push(...c),r.push({row:l,item:t,type:e.type,lane:y,days:u,...e.kind?{kind:e.kind}:{},...p===void 0?{}:{change:p}}),i.push({label:h===void 0?void 0:{...h,...p===`removed`?{struck:!0}:{}},x0:g,x1:_,cx:v,ghost:m})}return r.forEach((e,n)=>{let r=i[n],a=t+4+e.lane*24+12,o=e.type===`activity`?{x:r.x0,y:a-6,width:r.x1-r.x0,height:12}:{x:r.x0,y:a-7,width:14,height:14},s=r.ghost;y.push({...e,glyph:o,...r.cx===void 0?{}:{center:{x:r.cx,y:a}},...r.label===void 0?{}:{label:{...r.label,y:a-8,height:16}},...s===void 0?{}:e.type===`activity`?{ghost:{x:s.x0,y:a-6,width:s.x1-s.x0,height:12}}:{ghost:{x:s.x0,y:a-7,width:14,height:14},ghostCenter:{x:s.cx,y:a}}})}),Math.max(1,n.length)},ie=e=>e*24+8,ae=(e,t)=>{let n=re(e.items.map((n,r)=>({row:t,index:r,item:n,text:te(n,e,ut(n)),note:ee(n,e),change:ne(n,e)})),b),r=ie(n);v.push({type:`task`,row:t,y:b,height:r,lanes:n,label:e.label,id:e.id}),b+=r},oe,se=()=>{if(oe!==void 0){if(oe.tasks.length===0){let e=oe.label?26:10;v.push({type:`separator`,row:oe.row,y:b,height:e,...oe.label?{label:oe.label}:{}}),b+=e}else{let e=re(oe.tasks.flatMap(({task:e,row:t})=>e.items.map((n,r)=>({row:t,index:r,item:n,text:te(n,e,ut(n)??(n.type===`activity`?e.label:void 0)),note:ee(n,e),change:ne(n,e)}))),b),t=ie(e);v.push({type:`section`,row:oe.row,y:b,height:t,lanes:e,...oe.label?{label:oe.label}:{},tasks:oe.tasks.map(({task:e})=>e.id)}),b+=t}oe=void 0}},ce=(()=>{let t=new Set;if(!(n.onlyChanged&&x))return;let r;return e.rows.forEach((e,n)=>{e.type===`separator`?r=n:nt(e)&&(t.add(n),r!==void 0&&t.add(r))}),t})(),le=ce===void 0?0:e.rows.filter((e,t)=>e.type===`task`&&!ce.has(t)).length;e.rows.forEach((e,t)=>{if(!(ce!==void 0&&!ce.has(t))){if(e.type===`separator`){if(n.compact){se(),oe={row:t,...e.label?{label:e.label}:{},tasks:[]};return}let r=e.label?26:10;v.push({type:`separator`,row:t,y:b,height:r,...e.label?{label:e.label}:{}}),b+=r;return}oe===void 0?ae(e,t):oe.tasks.push({task:e,row:t})}}),se();let ue=[];for(let t of e.rows)if(t.type===`task`)for(let e of t.items)e.kind&&!ue.includes(e.kind)&&ue.push(e.kind);for(let t of[...e.periods??[],...e.references??[]])t.kind&&!ue.includes(t.kind)&&ue.push(t.kind);let de=[];(e.periods??[]).forEach((e,t)=>{let n=Math.max(He(e.start)??r,r),o=Math.min(He(e.end)??i,i);n>o||de.push({index:t,x:s(n),width:(o-n+1)*a,start:e.start,end:e.end,...e.label?{label:e.label}:{},...e.kind?{kind:e.kind}:{}})});let fe=(e.references??[]).flatMap((e,t)=>{let n=He(e.date);return n===void 0||n<r||n>i?[]:[{index:t,x:s(n)+a/2,label:e.label,date:e.date,...e.kind?{kind:e.kind}:{}}]}),pe=[];if(t>=r&&t<=i){let e=s(t)+a/2;pe.push({x0:e-26,x1:e+26})}let me=[],he=[...de.filter(e=>e.label).map(e=>({of:`period`,index:e.index,text:e.label,x:e.x+3,room:e.width-6})),...fe.map(e=>{let t=dt(e.label)*(10/11);return{of:`reference`,index:e.index,text:e.label,x:Math.min(Math.max(2,e.x-t/2),o-t-2),room:o-4}})].sort((e,t)=>e.x-t.x);for(let e of he){let t=dt(e.text)*(10/11);if(t>e.room)continue;let n={x0:e.x-2,x1:e.x+t+2};pe.some(e=>n.x0<e.x1&&e.x0<n.x1)||(pe.push(n),me.push({of:e.of,index:e.index,text:e.text,x:e.x,width:t}))}return{width:o,height:b,start:r,end:i,years:f,months:d,monthLines:c.map(e=>s(e.day)),unit:p,upper:h,lower:g,unitLines:_,rows:v,items:y,dependencies:yt(e,v,y,s),today:t<r?{outside:`before`,day:t}:t>i?{outside:`after`,day:t}:{x:s(t)+a/2,day:t},kinds:ue,hiddenTasks:le,periods:de,references:fe,headerLabels:me}}function vt(e,t,n,r){let i=dt(e),a=n+4;if(a+i<=r)return{text:e,inside:!1,x:a,width:i};let o=t-4-i;return o>=0?{text:e,inside:!1,x:o,width:i}:{text:e,inside:!1,x:Math.max(0,r-i),width:i}}function yt(e,t,n,r){let i=Ke(e),a=new Map(n.map(e=>[`${e.row}:${e.item}`,e])),o=new Map(t.map(e=>[e.row,e])),s=(e,t)=>{let s=i.get(e);if(s?.days===void 0)return;if(s.item!==void 0){let e=a.get(`${s.row}:${s.item}`);if(e===void 0)return;let n=e.glyph.y+e.glyph.height/2;return e.center===void 0?{x:t===`start`?e.glyph.x:e.glyph.x+e.glyph.width,y:n}:{x:e.center.x+(t===`start`?-7:7),y:n}}let c=r(t===`start`?s.days.start:s.days.end+1),l=o.get(s.row);if(l!==void 0&&l.type===`task`)return{x:c,y:l.y+4+12};let u=n.filter(e=>e.row===s.row).sort((e,n)=>t===`start`?e.glyph.x-n.glyph.x:n.glyph.x+n.glyph.width-(e.glyph.x+e.glyph.width));if(u.length!==0)return{x:c,y:u[0].glyph.y+u[0].glyph.height/2}},c=[];return(e.dependencies??[]).forEach((e,t)=>{let n=Je(e),r=Ye(n),a=s(e.from,r.from),o=s(e.to,r.to),l=Xe(e,i);if(a===void 0||o===void 0||l===void 0)return;let u={x:a.x+(r.from===`end`?8:-8),y:a.y},d={x:o.x+(r.to===`start`?-8:8),y:o.y};if(a.y===o.y&&r.from===`end`&&r.to===`start`&&o.x>=a.x-14){c.push({index:t,from:e.from,to:e.to,type:n,satisfied:l,points:[a,o]});return}let f=o.y>a.y?o.y-12:(o.y,a.y,o.y+12);c.push({index:t,from:e.from,to:e.to,type:n,satisfied:l,points:[a,u,{x:u.x,y:f},{x:d.x,y:f},d,o]})}),c}function bt(e){let t=e.rows.reduce((e,t)=>Math.max(e,(t.label??``).length),0);return Math.min(Math.max(t*Oe+24,120),280)}function xt(e,t){for(let n of e.rows){if(n.type!==`task`)continue;if(n.id===t)return`"${n.label}" (${t})`;let e=n.items.find(e=>e.id===t);if(e!==void 0){let n=ut(e);return n===void 0?t:`"${n}" (${t})`}}return t}function St(e,t,n){let r=n===!1?` — not satisfied by the dates`:``;return`${xt(e,t.to)} waits on ${xt(e,t.from)} (${Je(t)})${r}`}function Ct(e){let t=[];e.title!==void 0&&e.title!==``&&t.push(e.title),e.comparedTo!==void 0&&t.push(`Compared with ${e.comparedTo.label}${e.comparedTo.date===void 0?``:` (${e.comparedTo.date})`}`),t.push(`From ${e.time.start} to ${e.time.end}, by ${e.time.scale}`);for(let n of e.rows){if(t.push(``),n.type===`separator`){t.push(n.label?`— ${n.label} —`:`———`);continue}let e=n.role===void 0?``:n.role===`added`?` — new`:` — removed`;t.push(`${n.label} [${n.id}]${n.items.length===0?` — no items`:``}${e}`);for(let e of n.items){let n=e.type===`activity`?`${e.start} to ${e.end}`:e.date,r=e.label===void 0?``:`: ${e.label}`,i=e.kind===void 0?``:` [${e.kind}]`,a=e.id===void 0?``:` (${e.id})`,o=(()=>{if(e.role===`added`)return` — new`;if(e.role===`removed`)return` — removed`;let t=et(e);return t===``||e.previous===void 0?``:` — moved ${t}, was ${`date`in e.previous?e.previous.date:`${e.previous.start} to ${e.previous.end}`}`})();t.push(` ${e.type} ${n}${r}${i}${a}${o}`)}}let n=[...(e.periods??[]).map(e=>` period ${e.start} to ${e.end}${e.label?`: ${e.label}`:``}${e.kind?` [${e.kind}]`:``}`),...(e.references??[]).map(e=>` reference ${e.date}: ${e.label}${e.kind?` [${e.kind}]`:``}`)];n.length>0&&t.push(``,`Calendar`,...n);let r=e.dependencies??[];if(r.length>0){let n=Ke(e);t.push(``,`Dependencies`);for(let i of r)t.push(` ${St(e,i,Xe(i,n))}`)}return t}function wt(e){let t=[],n=(e,n)=>{let r=He(e);return r===void 0&&t.push({rule:`invalid-date`,path:n,message:`"${e}" is not a day of the calendar`}),r},r=n(e.time.start,`/data/time/start`),i=n(e.time.end,`/data/time/end`),a=r!==void 0&&i!==void 0&&r<=i?{start:r,end:i}:void 0;r!==void 0&&i!==void 0&&r>i&&t.push({rule:`inverted-range`,path:`/data/time`,message:`the timeline starts on ${e.time.start}, after it ends on ${e.time.end}`});let o=`${e.time.start} to ${e.time.end}`,s=new Map,c=(e,n)=>{if(e===void 0)return;let r=s.get(e);r===void 0?s.set(e,n):t.push({rule:`duplicate-identifier`,path:`${n}/id`,message:`identifier "${e}" is already declared at ${r}`})},l=e.comparedTo!==void 0;e.comparedTo?.date!==void 0&&n(e.comparedTo.date,`/data/comparedTo/date`);let u=e=>t.push({rule:`comparison-without-reference`,path:e,message:"previous dates and change roles describe a comparison; declare `comparedTo` naming the plan they compare with"}),d=new Set;return e.rows.forEach((e,r)=>{if(e.type!==`task`)return;let i=`/data/rows/${r}`;c(e.id,i),e.role!==void 0&&!l&&u(`${i}/role`),e.items.forEach((r,s)=>{let f=`${i}/items/${s}`;if(c(r.id,f),r.kind!==void 0&&d.add(r.kind),r.role!==void 0&&!l&&u(`${f}/role`),r.previous!==void 0){l||u(`${f}/previous`),(r.role!==void 0||e.role!==void 0)&&t.push({rule:`contradictory-change`,path:`${f}/previous`,message:`an item that is ${r.role??`in a task that is ${e.role}`} has no previous dates; it is new or dropped, not moved`});let i=r.previous,s=r.type===`activity`?{first:n(i.start,`${f}/previous/start`),last:n(i.end,`${f}/previous/end`)}:(()=>{let e=n(i.date,`${f}/previous/date`);return{first:e,last:e}})();s.first!==void 0&&s.last!==void 0&&(s.first>s.last?t.push({rule:`inverted-range`,path:`${f}/previous`,message:`the previous dates start on ${i.start}, after they end on ${i.end}`}):a!==void 0&&(s.first<a.start||s.last>a.end)&&t.push({rule:`item-outside-range`,path:`${f}/previous`,message:`the previous dates fall outside the timeline's range ${o}; the range covers both plans, so widen \`time\``}))}r.role!==void 0&&e.role!==void 0&&r.role!==e.role&&t.push({rule:`contradictory-change`,path:`${f}/role`,message:`an item ${r.role} in a task that is ${e.role}`});let p,m;if(r.type===`activity`){if(p=n(r.start,`${f}/start`),m=n(r.end,`${f}/end`),p!==void 0&&m!==void 0&&p>m){t.push({rule:`inverted-range`,path:f,message:`the activity starts on ${r.start}, after it ends on ${r.end}`});return}}else p=m=n(r.date,`${f}/date`);a!==void 0&&p!==void 0&&m!==void 0&&(p<a.start||m>a.end)&&t.push({rule:`item-outside-range`,path:f,message:r.type===`activity`?`the activity runs ${r.start} to ${r.end}, outside the timeline's range ${o}; widen \`time\` or move the activity`:`the milestone falls on ${r.date}, outside the timeline's range ${o}; widen \`time\` or move the milestone`})})}),(e.periods??[]).forEach((e,r)=>{let i=`/data/periods/${r}`;e.kind!==void 0&&d.add(e.kind);let s=n(e.start,`${i}/start`),c=n(e.end,`${i}/end`);s!==void 0&&c!==void 0&&(s>c?t.push({rule:`inverted-range`,path:i,message:`the period starts on ${e.start}, after it ends on ${e.end}`}):a!==void 0&&(c<a.start||s>a.end)&&t.push({rule:`period-outside-range`,path:i,message:`the period ${e.start} to ${e.end} lies wholly outside the timeline's range ${o}, so nothing of it could be drawn`}))}),(e.references??[]).forEach((e,r)=>{let i=`/data/references/${r}`;e.kind!==void 0&&d.add(e.kind);let s=n(e.date,`${i}/date`);s!==void 0&&a!==void 0&&(s<a.start||s>a.end)&&t.push({rule:`item-outside-range`,path:i,message:`the reference date ${e.date} is outside the timeline's range ${o}; widen \`time\` or move it`})}),d.size>de.kindsPerVocabulary&&t.push({rule:`too-many-kinds`,path:`/data/rows`,message:`${d.size} distinct item types, and no more than ${de.kindsPerVocabulary} can be told apart in a rendering`,observed:d.size,limit:de.kindsPerVocabulary}),t.push(...Et(e,Ke(e))),t.push(...Tt(e)),t}function Tt(e){let t=new Set;for(let n of e.rows)if(n.type===`task`){n.role===`removed`&&t.add(n.id);for(let e of n.items)e.id!==void 0&&(e.role===`removed`||n.role===`removed`)&&t.add(e.id)}let n=[];return(e.dependencies??[]).forEach((e,r)=>{for(let i of[`from`,`to`])t.has(e[i])&&n.push({rule:`dependency-on-removed`,path:`/data/dependencies/${r}/${i}`,message:`"${e[i]}" was dropped from the plan, so nothing can depend on it any more; remove the dependency`})}),n}function Et(e,t){let n=[],r=e.dependencies??[],i=[],a=new Map;r.forEach((r,o)=>{let s=`/data/dependencies/${o}`,c=!0;for(let i of[`from`,`to`]){let a=r[i],o=t.get(a);if(o===void 0)c=!1,n.push({rule:`unresolved-endpoint`,path:`${s}/${i}`,message:`"${a}" is not the identifier of any task or item this timeline declares`});else if(o.type===`task`&&o.days===void 0){c=!1;let t=e.rows[o.row];if(t.type===`task`&&t.items.length>0)continue;n.push({rule:`empty-task-endpoint`,path:`${s}/${i}`,message:`task "${a}" holds no item, so it has no start or finish for a dependency to link`})}}if(!c)return;let l=t.get(r.from),u=t.get(r.to),d=(e,t)=>e.type===`task`&&t.type!==`task`&&t.row===e.row;if(l.id===u.id||d(l,u)||d(u,l)){n.push({rule:`self-dependency`,path:s,message:l.id===u.id?`"${l.id}" cannot depend on itself`:`a task and one of its own items cannot depend on each other: the task's span is made of its items`});return}let f=JSON.stringify([r.from,r.to,Je(r)]),p=a.get(f);if(p!==void 0){n.push({rule:`duplicate-dependency`,path:s,message:`the same dependency is already declared at /data/dependencies/${p}`});return}a.set(f,o),i.push({from:r.from,to:r.to,index:o})});let o=Dt(i);return o!==void 0&&n.push({rule:`dependency-cycle`,path:`/data/dependencies/${o.index}`,message:`dependencies form a cycle, which no dates can honour: ${o.ids.join(` → `)}`}),n}function Dt(e){let t=new Map;for(let n of e){let e=t.get(n.from)??[];e.push({to:n.to,index:n.index}),t.set(n.from,e)}let n=new Map,r=[];for(let e of t.keys()){if(n.has(e))continue;let i=[{id:e,next:0}];for(n.set(e,`open`),r.push({id:e,index:-1});i.length>0;){let e=i[i.length-1],a=t.get(e.id)??[];if(e.next>=a.length){n.set(e.id,`done`),i.pop(),r.pop();continue}let o=a[e.next++],s=n.get(o.to);if(s===`open`){let e=r.findIndex(e=>e.id===o.to);return{ids:[...r.slice(e).map(e=>e.id),o.to],index:o.index}}s===void 0&&(n.set(o.to,`open`),i.push({id:o.to,next:0}),r.push({id:o.to,index:o.index}))}}}function Ot(e){let t=e.data;return e.kind===`graph`?Array.isArray(t.nodes)&&Array.isArray(t.edges):e.kind===`sequence`?Array.isArray(t.participants)&&Array.isArray(t.messages):e.kind===`timeline`?typeof t.time==`object`&&t.time!==null&&Array.isArray(t.rows):Array.isArray(t.columns)&&Array.isArray(t.rows)}function kt(e){return e.kind===`graph`?e.data.nodes:e.kind===`sequence`?e.data.participants:[]}function At(e){return e.kind===`graph`?e.data.edges:e.kind===`sequence`?e.data.messages:[]}function jt(e){return e.kind===`graph`||e.kind===`sequence`?e.data.containers??[]:[]}function Mt(e){return e.kind===`graph`?`/data/nodes`:`/data/participants`}function Nt(e){return e.kind===`graph`?`/data/edges`:`/data/messages`}function Pt(e){if(e.kind===`timeline`)return[];let t=e.data,n=[];for(let e of[`nodes`,`edges`,`participants`,`messages`,`rows`,`relations`]){let r=t[e];Array.isArray(r)&&r.forEach((t,r)=>{if(typeof t!=`object`||!t||Array.isArray(t))return;let i=t;n.push({at:`/data/${e}/${r}`,ref:typeof i.ref==`string`?i.ref:void 0,set:i.set,expect:i.expect,locations:i.locations})})}return n}function Ft(e){if(e.kind!==`table`)return[];let t=e.data.rows,n=[];return t.forEach((e,t)=>{if(typeof e!=`object`||!e||Array.isArray(e))return;let r=e;(r.ref!==void 0||r.set!==void 0)&&n.push({at:`/data/rows/${t}`,...typeof r.ref==`string`?{ref:r.ref}:{},...r.set===void 0?{}:{set:r.set}})}),n}function It(e){if(e.kind!==`table`)return[];let t=e.data.rows,n=[];return t.forEach((e,t)=>{if(typeof e!=`object`||!e||Array.isArray(e))return;let r=e.id;typeof r==`string`&&n.push({id:r,at:`/data/rows/${t}`})}),n}function Lt(e){if(e.kind!==`table`)return[];let t=e.data.relations;return Array.isArray(t)?t:[]}function Rt(e,t){return e===`timeline`?`a timeline is maintained by presenting the revised timeline again, not proposed as a change, ${t}`:`a ${e} is a projection and cannot be proposed, ${t}`}function zt(e){let t=[];if(!Ot(e))return t.push({rule:`kind-data-mismatch`,path:`/data`,message:`data does not carry what kind "${e.kind}" declares`}),t;let n=ce(e.schema).includes(e.kind);e.target!==void 0&&!n&&t.push({rule:`kind-not-proposable`,path:`/target`,message:Rt(e.kind,`so it carries no target`)}),e.removals!==void 0&&(n?e.target===void 0&&t.push({rule:`removal-without-target`,path:`/removals`,message:`removals need a target: an artifact that does not exist yet has nothing to remove`}):t.push({rule:`kind-not-proposable`,path:`/removals`,message:Rt(e.kind,`so it declares no removals`)}));let r=kt(e),i=Mt(e),a=new Map;r.forEach((e,n)=>{let r=a.get(e.id);r===void 0?a.set(e.id,n):t.push({rule:`duplicate-identifier`,path:`${i}/${n}/id`,message:`identifier "${e.id}" is already declared at ${i}/${r}`})});let o=new Map;jt(e).forEach((e,n)=>{let r=o.get(e.id);r===void 0?o.set(e.id,n):t.push({rule:`duplicate-container-identifier`,path:`/data/containers/${n}/id`,message:`container "${e.id}" is already declared at /data/containers/${r}`})}),r.forEach((e,n)=>{for(let[r,a]of[[`container`,e.container],[`set/container`,e.set?.container]])a!==void 0&&!o.has(a)&&t.push({rule:`unresolved-container`,path:`${i}/${n}/${r}`,message:`"${a}" is not a container declared in /data/containers`})});let s=Nt(e);At(e).forEach((e,n)=>{for(let r of[`from`,`to`]){let o=e[r];a.has(o)||t.push({rule:`unresolved-endpoint`,path:`${s}/${n}/${r}`,message:`"${o}" is not an identifier declared in ${i}`})}});let c=new Map,l=(e,n,r)=>{if(n===void 0)return;let i=`${e}:${n}`,a=c.get(i);a===void 0?c.set(i,r):t.push({rule:`duplicate-reference`,path:r,message:`${e} "${n}" is already addressed at ${a}; a proposal states one intention per thing`})};r.forEach((e,t)=>l(`element`,e.ref,`${i}/${t}`)),At(e).forEach((e,t)=>l(`relationship`,e.ref,`${s}/${t}`)),Ft(e).forEach(e=>l(`row`,e.ref,e.at)),(e.removals??[]).forEach((e,t)=>l(e.type,e.ref,`/removals/${t}`));let u=[...r.map((e,t)=>({at:`${i}/${t}`,ref:e.ref,set:e.set})),...At(e).map((t,n)=>({at:`${Nt(e)}/${n}`,ref:t.ref,set:t.set})),...Ft(e)];for(let r of u)r.set!==void 0&&(r.ref===void 0?t.push({rule:`change-without-reference`,path:`${r.at}/set`,message:`a change names a reference to change; without one this is a new thing, and its fields are its values`}):n?e.target===void 0&&t.push({rule:`change-without-target`,path:`${r.at}/set`,message:`a change needs a target: naming what is being changed is what makes this a proposal rather than a new artifact`}):t.push({rule:`kind-not-proposable`,path:`${r.at}/set`,message:Rt(e.kind,`so nothing in it declares a change`)}));let d=e=>{let t=new Set;for(let n of e)n.kind!==void 0&&n.kind!==``&&t.add(n.kind);return t},f=[[e.kind===`sequence`?`participant`:`element`,i,d(r)],[e.kind===`sequence`?`message`:`relationship`,Nt(e),d(At(e))]];for(let[e,n,r]of f)r.size>de.kindsPerVocabulary&&t.push({rule:`too-many-kinds`,path:n,message:`${r.size} distinct ${e} types, and no more than ${de.kindsPerVocabulary} can be told apart in a rendering`,observed:r.size,limit:de.kindsPerVocabulary});let p=e.viewpoints;if(Array.isArray(p)){if(e.kind!==`graph`)t.push({rule:`viewpoints-without-graph`,path:`/viewpoints`,message:`only a graph declares viewpoints; a ${e.kind} has no element and relationship kinds for one to retain`});else{let n=new Set(r.map(e=>e.kind).filter(e=>!!e)),i=new Set(At(e).map(e=>e.kind).filter(e=>!!e)),a=new Map;p.forEach((e,r)=>{let o=`/viewpoints/${r}`,{id:s,elementKinds:c,relationshipKinds:l}=e,u=a.get(s);u===void 0?a.set(s,r):t.push({rule:`duplicate-viewpoint-identifier`,path:`${o}/id`,message:`viewpoint "${s}" is already declared at /viewpoints/${u}`}),c===void 0&&l===void 0&&t.push({rule:`empty-viewpoint`,path:o,message:`viewpoint "${s}" retains no kind, so it would show nothing it was not already showing; name elementKinds, relationshipKinds, or both`});let d=[[c,n,i,`elementKinds`,`element`,`relationship`],[l,i,n,`relationshipKinds`,`relationship`,`element`]];for(let[e,n,r,i,a,c]of d)e?.forEach((e,l)=>{n.has(e)||t.push({rule:`unresolved-viewpoint-kind`,path:`${o}/${i}/${l}`,message:`viewpoint "${s}" retains ${a} kind "${e}", and no ${a} of this document has it`+(r.has(e)?` (it is a ${c} kind here, which is a different vocabulary)`:``)})})})}}if(e.kind===`table`){let{columns:n,rows:r}=e.data;r.forEach((e,r)=>{let{cells:i,heading:a}=ue(e);a===void 0&&i.length!==n.length&&t.push({rule:`row-column-mismatch`,path:`/data/rows/${r}`,message:`row has ${i.length} values but ${n.length} columns are declared`,observed:i.length,limit:n.length})})}e.kind===`timeline`&&t.push(...wt(e.data));for(let n of Pt(e)){n.expect!==void 0&&(e.target===void 0?t.push({rule:`expectation-without-target`,path:`${n.at}/expect`,message:`an expectation is checked by the authority a proposal targets; a document that targets nothing has nobody to check it`}):n.ref===void 0&&t.push({rule:`expectation-without-reference`,path:`${n.at}/expect`,message:`an expectation describes something that already exists, and this item carries no reference to one`}));let r=n.set?.removeAttributes;if(Array.isArray(r)){let e=n.set?.attributes??{},i=new Map;r.forEach((r,a)=>{if(typeof r!=`string`)return;let o=i.get(r);o===void 0?i.set(r,a):t.push({rule:`duplicate-attribute-removal`,path:`${n.at}/set/removeAttributes/${a}`,message:`"${r}" is already removed at ${n.at}/set/removeAttributes/${o}`}),Object.prototype.hasOwnProperty.call(e,r)&&t.push({rule:`attribute-set-and-removed`,path:`${n.at}/set/removeAttributes/${a}`,message:`"${r}" is both assigned and removed; a proposal states one intention per property`})})}Array.isArray(n.locations)&&n.locations.forEach((e,r)=>{if(typeof e!=`object`||!e)return;let i=e.range;i!==void 0&&(i.endLine<i.startLine||i.endLine===i.startLine&&i.endCharacter!==void 0&&i.startCharacter!==void 0&&i.endCharacter<i.startCharacter)&&t.push({rule:`location-range-reversed`,path:`${n.at}/locations/${r}/range`,message:`a range ends before it begins, so it selects nothing a reader could be taken to`})})}e.kind===`table`&&e.data.rows.forEach((e,n)=>{if(typeof e!=`object`||!e||Array.isArray(e))return;let r=e;r.role!==void 0&&r.set!==void 0&&t.push({rule:`role-with-change`,path:`/data/rows/${n}/role`,message:`a row states what it observed or what it asks for, not both: a declared role beside a change is a report and an instruction at once`})});let m=new Map;for(let n of It(e)){let e=m.get(n.id);e===void 0?m.set(n.id,n.at):t.push({rule:`duplicate-identifier`,path:`${n.at}/id`,message:`identifier "${n.id}" is already declared at ${e}`})}return Lt(e).forEach((e,n)=>{for(let r of[`from`,`to`]){let i=e[r];if(typeof i!=`object`||!i)continue;let a=i.id;typeof a==`string`&&(m.has(a)||t.push({rule:`unresolved-endpoint`,path:`/data/relations/${n}/${r}`,message:`"${a}" is not the identifier of any row this document declares`}))}}),t}function Bt(e,t){let n=t(e);if(n.length>0)return{valid:!1,issues:n};let r=e,i=zt(r);return i.length>0?{valid:!1,issues:i}:{valid:!0,envelope:r,issues:[]}}function Vt(e,t,n){let r=we(e,n);if(r!==void 0)return{valid:!1,issues:[r]};let i;try{i=JSON.parse(e)}catch{return{valid:!1,issues:[{rule:`not-json`,path:``,message:`document is not parseable JSON`}]}}let a=Bt(i,t);if(!a.valid)return a;let o=we(e,n,a.envelope.schema);if(o!==void 0)return{valid:!1,issues:[o]};let s=Ee(a.envelope,n);return s.length>0?{valid:!1,issues:s}:{valid:!0,envelope:a.envelope,measurement:De(a.envelope,e),issues:[]}}function Ht(e){if(typeof e!=`object`||!e||Array.isArray(e))return;let t=e.schema;if(!(typeof t!=`string`||!t.startsWith(`urn:structured-exchange:`)))return t}function Ut(e,t,n){let r=we(e,n);if(r!==void 0)return{status:`too-large`,issue:r};let i;try{i=JSON.parse(e)}catch{return{status:`not-a-document`,why:`unparseable`}}let a=Ht(i);if(a===void 0)return{status:`not-a-document`,why:`undeclared`};if(_e(a)===void 0)return{status:`unsupported-version`,schema:a};let o=Bt(i,t);if(!o.valid)return{status:`invalid`,issues:o.issues};let s=we(e,n,o.envelope.schema);return s===void 0?{status:`valid`,envelope:o.envelope}:{status:`too-large`,issue:s}}function Wt(e){let t=e.replace(/\r\n/g,`
|
|
5
|
+
`)}}var ee=null;async function x(e){let t=await(ee??=Promise.resolve().then(()=>require("./mermaid.core-4MZ-Iwu7.cjs")).then(e=>e.t));return t.default.initialize({startOnLoad:!1,theme:e,look:`classic`,securityLevel:`strict`,suppressErrorRendering:!0}),t}function te(e){let t=/viewBox="\s*[\d.-]+[\s,]+[\d.-]+[\s,]+([\d.]+)[\s,]+([\d.]+)/.exec(e),n=t?Number(t[1]):NaN;return Number.isFinite(n)&&n>0?n:void 0}function ne(e,t){if(typeof e!=`object`||!e||!(`props`in e))return null;let n=e.props;if(t!==void 0&&!RegExp(`\\blanguage-${t}\\b`).test(n.className??``))return null;let r=n.children;return typeof r==`string`?r:Array.isArray(r)&&r.every(e=>typeof e==`string`)?r.join(``):null}function re(e){let t=ne(e,`mermaid`);return t===null?null:t.trim()}function ie(e){let{children:t,...n}=e,r=re(t);if(r!==null)return(0,i.jsx)(ae,{code:r});let a=ne(t);return a===null?(0,i.jsx)(`pre`,{...n,children:t}):(0,i.jsxs)(`div`,{className:`code-block relative`,"data-testid":`code-block`,children:[(0,i.jsx)(`pre`,{...n,children:t}),(0,i.jsx)(c,{iconOnly:!0,text:a.replace(/\n$/,``),className:`absolute right-1.5 top-1.5 rounded border border-zinc-300 bg-white/80 px-1.5 py-0.5 text-xs text-zinc-500 hover:text-zinc-800 dark:border-zinc-700 dark:bg-zinc-900/80 dark:text-zinc-400 dark:hover:text-zinc-100`})]})}function ae({code:e}){let n=(0,r.useId)().replace(/[^a-zA-Z0-9]/g,``),a=s()===`light`?`default`:`dark`,[o,l]=(0,r.useState)(null),[d,m]=(0,r.useState)(null),[g,_]=(0,r.useState)(!1),[v,b]=(0,r.useState)(!1),ee=(0,r.useMemo)(()=>y(e),[e]),ne=ee===void 0?`landscape`:h(ee.direction),[re,ie]=(0,r.useState)(void 0),ae=o?.svg??null,oe=o!==null&&o.orientation!==ne,se=(0,r.useRef)(null),ce=(0,r.useRef)(e);return ce.current=e,(0,r.useEffect)(()=>{let e=!1,r=setTimeout(()=>void t.g(async()=>{try{let t=(await x(a)).default,r=ce.current,i=y(r),o=i===void 0?`landscape`:h(i.direction);if(re!==void 0&&i!==void 0){let a=re===o?r:i.turned,{svg:s}=await t.render(`mermaid-${n}`,a);e||(l({svg:s,orientation:re}),m(null));return}let s=await t.render(`mermaid-${n}`,r),c={svg:s.svg,orientation:o},u=te(s.svg);if(i!==void 0&&u!==void 0&&u>710){let e=await t.render(`mermaid-${n}-turned`,i.turned),r=te(e.svg);if(r!==void 0){let t=o===`landscape`?p(u,r):p(r,u);t!==o&&(c={svg:e.svg,orientation:t})}}e||(l(c),m(null))}catch(t){e||m(t instanceof Error?t.message:String(t))}}),300);return()=>{e=!0,clearTimeout(r)}},[e,n,a,re]),ae?(0,i.jsxs)(`div`,{ref:se,className:`group relative my-2 rounded-lg border border-zinc-200 bg-zinc-50 p-3 dark:border-zinc-800 dark:bg-zinc-900`,children:[(0,i.jsx)(`div`,{className:`absolute left-2 top-2 z-10 opacity-0 transition-opacity group-hover:opacity-100`,children:(0,i.jsx)(`button`,{type:`button`,onClick:()=>_(!g),title:g?`Show diagram`:`Show code`,className:`rounded px-1.5 py-0.5 text-xs text-zinc-400 hover:bg-zinc-100 hover:text-zinc-700 dark:text-zinc-600 dark:hover:bg-zinc-800 dark:hover:text-zinc-300`,children:g?`⚏ diagram`:`⌗ code`})}),(0,i.jsxs)(`div`,{className:`absolute right-2 top-2 z-10 flex items-center gap-2 opacity-0 transition-opacity group-hover:opacity-100`,children:[!g&&ee!==void 0&&o!==null&&(0,i.jsx)(`button`,{type:`button`,"data-testid":`mermaid-orientation`,onClick:()=>ie(e=>f(e??o.orientation)),title:o.orientation===`portrait`?`Turn it across the page — it is drawn down`:`Turn it down the page — it is drawn across`,"aria-label":`Turn the diagram ${f(o.orientation)}`,className:`rounded px-1.5 py-0.5 text-xs text-zinc-400 hover:bg-zinc-100 hover:text-zinc-700 dark:text-zinc-600 dark:hover:bg-zinc-800 dark:hover:text-zinc-300`,children:o.orientation===`portrait`?`↔ landscape`:`↕ portrait`}),!g&&(0,i.jsx)(`button`,{type:`button`,onClick:()=>b(!0),"aria-label":`Show diagram at full size`,className:`rounded px-1.5 py-0.5 text-xs text-zinc-400 hover:bg-zinc-100 hover:text-zinc-700 dark:text-zinc-600 dark:hover:bg-zinc-800 dark:hover:text-zinc-300`,children:`⤢ enlarge`}),(0,i.jsx)(c,{text:e})]}),g?(0,i.jsx)(`pre`,{className:`overflow-x-auto font-mono text-xs text-zinc-500 dark:text-zinc-400`,children:e}):(0,i.jsx)(`div`,{className:`flex justify-center overflow-x-auto [&_svg]:max-w-full`,dangerouslySetInnerHTML:{__html:ae}}),oe&&!g&&(0,i.jsxs)(`div`,{className:`mt-1 text-center text-xs text-zinc-400 dark:text-zinc-600`,"data-testid":`mermaid-turned`,children:[`drawn `,o?.orientation,` to fit — the source asks for `,ne]}),(0,i.jsx)(u,{label:`diagram`,testId:`mermaid-enlarged`,open:v,onClose:()=>b(!1),anchorRef:se,children:(0,i.jsx)(`div`,{style:{width:te(ae)},className:`[&_svg]:!h-auto [&_svg]:!max-w-none [&_svg]:!w-full`,dangerouslySetInnerHTML:{__html:ae}})})]}):(0,i.jsxs)(`pre`,{className:`my-2 overflow-x-auto rounded-lg border border-zinc-200 bg-zinc-50 p-3 font-mono text-xs text-zinc-500 dark:border-zinc-800 dark:bg-zinc-900 dark:text-zinc-400`,children:[e,d&&(0,i.jsx)(`div`,{className:`mt-2 text-red-600 dark:text-red-400`,children:d})]})}var oe=`urn:structured-exchange:1`,se=[`graph`,`sequence`];function ce(e){return le(e)?[`graph`,`sequence`,`table`]:se}function le(e){return e===`urn:structured-exchange:2`||e===`urn:structured-exchange:3`}function ue(e){if(Array.isArray(e))return{cells:e};let t=e.heading;return typeof t==`string`?{cells:[],role:e.role,heading:t}:{cells:e.cells,role:e.role}}var de={nodes:500,edges:2e3,participants:100,messages:1e3,columns:50,rows:5e3,removals:500,ref:200,localId:200,label:500,kind:100,kindsPerVocabulary:64,columnName:200,cell:1e3},fe=`urn:structured-exchange:2`,pe={profile:200,attributesPerItem:50,removeAttributesPerItem:50,attributeName:200,attributeString:1e3,attributeListItems:50,revision:200,locationsPerItem:10,uri:2e3,position:1e6,artifactsPerItem:20,artifactsPerDocument:50,artifactRel:100,artifactMediaType:100,artifactLabel:500,artifactDigest:71,relations:2e3,heading:500,headingDepth:6,viewpoints:20,viewpointConcern:500},me=8e6,he=`urn:structured-exchange:3`,ge=[oe,fe,he];function _e(e){return ge.find(t=>t===e)}var ve=4e6,ye=Math.max(ve,me);function be(e){return le(e)?me:ve}var xe=e=>new TextEncoder().encode(e).length;function Se(e){return e===`bytes`?ye:e===`relations`?pe.relations:de[e]}function Ce(e,t){let n=Se(e),r=t?.[e];return r===void 0||r>=n?{limit:n,level:`ceiling`}:{limit:r,level:`deployment`}}function we(e,t,n){let r=xe(e),i=Ce(`bytes`,t),a=n===void 0?1/0:be(n),o=Math.min(i.limit,a),s=o===a&&a<i.limit?`ceiling`:i.level;if(!(r<=o))return{rule:`document-too-large`,path:``,message:`document is ${r} bytes, past the ${o}-byte ${s===`ceiling`?`contract ceiling`:`limit this deployment applies`}`,limit:o,observed:r,level:s}}var Te={graph:[`nodes`,`edges`],sequence:[`participants`,`messages`],table:[`columns`,`rows`,`relations`]};function Ee(e,t){if(t===void 0)return[];let n=[];for(let r of Te[e.kind]??[]){let i=e.data[r];if(!Array.isArray(i))continue;let{limit:a,level:o}=Ce(r,t);o===`deployment`&&i.length>a&&n.push({rule:`collection-past-deployment-limit`,path:`/data/${r}`,message:`${r} has ${i.length} entries, past the ${a} this deployment allows`,limit:a,observed:i.length,level:o})}return n}function De(e,t){let n={};for(let t of Te[e.kind]??[]){let r=e.data[t];Array.isArray(r)&&(n[t]=r.length)}return{kind:e.kind,bytes:xe(t),counts:n}}var Oe=6.6,ke=5.4;function Ae(e,t,n){let r=e.flatMap(e=>e.split(/\r?\n/)).reduce((e,t)=>Math.max(e,t.length),0);return Math.min(Math.max(r*Oe+22,t),n)}function je(e,t,n,r){let i=t.map(e=>Fe(e).length).reduce((e,t)=>Math.max(e,t),0);return Math.max(Ae(e,n,r),Math.min(i*ke+22,r))}function Me(e,t,n=Oe){let r=Math.max(Math.floor((t-22)/n+1e-6),4),i=[],a=e.split(/\r?\n/);if(a.length>1)return a.flatMap(e=>Me(e,t,n)).slice(0,3);let o=``;for(let t of e.split(/\s+/)){let e=o===``?t:`${o} ${t}`;if(e.length<=r){o=e;continue}for(o!==``&&i.push(o),o=t;o.length>r&&i.length<3;)i.push(o.slice(0,r)),o=o.slice(r)}if(o!==``&&i.push(o),i.length===0)return[``];if(i.length<=3)return i;let s=i.slice(0,3);return s[2]=`${s[2].slice(0,Math.max(r-1,1))}…`,s}function Ne(e,t){return e*15+t*15+14}function Pe(e,t){return e.flatMap(e=>Me(Fe(e),t,ke))}function Fe(e){return`${e.field}: ${e.from===void 0?``:`${e.from} → `}${e.to}`}function Ie(e,t){return`${e}: ${Le(t)}`}function Le(e){return Array.isArray(e)?e.map(e=>Le(e)).join(`, `):e===null?`null`:typeof e==`object`&&e&&typeof e.ref==`string`?`<${e.ref}>`:String(e)}function Re(e){let t=e.range===void 0?``:` lines ${e.range.startLine}–${e.range.endLine}`,n=e.revision===void 0?``:` at ${e.revision}`;return`${e.uri}${t}${n}`}function ze(e){let t=e.label===void 0?e.uri:`${e.label} (${e.uri})`,n=e.mediaType===void 0?``:`, ${e.mediaType}`;return`${e.rel}: ${t}${n} — ${e.sha256.slice(0,14)}…`}var Be=864e5,Ve=/^(\d{4})-(\d{2})-(\d{2})$/;function He(e){let t=Ve.exec(e);if(t===null)return;let[n,r,i]=[Number(t[1]),Number(t[2]),Number(t[3])],a=new Date(Date.UTC(n,r-1,i));if(a.setUTCFullYear(n,r-1,i),a.getUTCFullYear()===n&&a.getUTCMonth()===r-1&&a.getUTCDate()===i)return Math.round(a.getTime()/Be)}function Ue(e){let t=new Date(e*Be);return`${String(t.getUTCFullYear()).padStart(4,`0`)}-${String(t.getUTCMonth()+1).padStart(2,`0`)}-${String(t.getUTCDate()).padStart(2,`0`)}`}function We(e=new Date){return Math.round(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())/Be)}function Ge(e){let t=He(e.type===`activity`?e.start:e.date),n=He(e.type===`activity`?e.end:e.date);return t===void 0||n===void 0?void 0:{start:t,end:n}}function Ke(e){let t=new Map;return e.rows.forEach((e,n)=>{e.type===`task`&&(t.has(e.id)||t.set(e.id,{id:e.id,type:`task`,row:n,days:qe(e)}),e.items.forEach((e,r)=>{e.id===void 0||t.has(e.id)||t.set(e.id,{id:e.id,type:e.type,row:n,item:r,days:Ge(e)})}))}),t}function qe(e){let t;for(let n of e.items){let e=Ge(n);e!==void 0&&(t=t===void 0?{...e}:{start:Math.min(t.start,e.start),end:Math.max(t.end,e.end)})}return t}function Je(e){return e.type??`finish-to-start`}function Ye(e){return{from:e.startsWith(`finish`)?`end`:`start`,to:e.endsWith(`finish`)?`end`:`start`}}function Xe(e,t){let n=t.get(e.from)?.days,r=t.get(e.to)?.days;if(n===void 0||r===void 0)return;let i=Ye(Je(e));return r[i.to]>=n[i.from]}function Ze(e){if(`date`in e){let t=He(e.date)??0;return{start:t,end:t}}return{start:He(e.start)??0,end:He(e.end)??0}}function Qe(e){if(e.previous===void 0)return;let t=Ze(e.type===`activity`?{start:e.start,end:e.end}:{date:e.date}),n=Ze(e.previous);return{start:t.start-n.start,end:t.end-n.end}}function $e(e){if(e===0)return``;let t=e>0?`+`:`−`,n=Math.abs(e);return n<14?`${t}${n}d`:n<70?`${t}${Math.round(n/7)}w`:`${t}${Math.round(n/30.44)}mo`}function et(e){let t=Qe(e);return t===void 0?``:t.start===t.end?$e(t.start):t.start===0?`end${$e(t.end)}`:t.end===0?`start${$e(t.start)}`:`${$e(t.start)}, end${$e(t.end)}`}function tt(e,t){if(e.role!==void 0||t?.role!==void 0)return!0;let n=Qe(e);return n!==void 0&&(n.start!==0||n.end!==0)}function nt(e){return e.role!==void 0||e.items.some(t=>tt(t,e))}var rt={week:12,month:4,quarter:.75};function it(e,t){let n=e>=8?`week`:e>=1?`month`:`quarter`;if(t===void 0)return n;let r=[`week`,`month`,`quarter`];return r[Math.max(r.indexOf(n),r.indexOf(t))]}var at=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];function ot(e){return e.width>=24?e.label:e.width>=9?e.label.charAt(0):``}function st(e,t){return t===`month`?ot(e):e.width>=e.label.length*6+4?e.label:``}function ct(e){return((e+3)%7+7)%7}function lt(e){let t=e-ct(e)+3,n=new Date(t*Be).getUTCFullYear();return Math.floor((t-pt(n,0))/7)+1}function ut(e){if(e.label!==void 0&&e.label!==``)return e.label;if(e.type===`milestone`&&e.kind!==void 0&&e.kind!==``)return e.kind}function dt(e){return e.length*Oe}function ft(e,t){let n=new Date(e*Be),r=n.getUTCFullYear(),i=n.getUTCMonth(),a=[];for(;;){i+=1,i===12&&(i=0,r+=1);let e=pt(r,i);if(e>t)return a;a.push({day:e,year:r,month:i})}}function pt(e,t){let n=new Date(0);return n.setUTCFullYear(e,t,1),Math.round(n.getTime()/Be)}function mt(e,t){let n=e=>e===`bar`||e===`ghost`;return n(e)&&t===`star`||e===`star`&&n(t)}function ht(e,t){return e.x0<t.x1&&t.x0<e.x1}function gt(e,t){if(t<=0||e.width<=t)return;let n=e.items.filter(e=>e.change!==void 0);if(n.length>0){let e=Math.min(...n.flatMap(e=>e.ghost===void 0?[e.glyph.x]:[e.glyph.x,e.ghost.x]));return e<t*.9?void 0:Math.max(0,e-t/6)}if(`x`in e.today&&e.today.x>t*.8)return Math.max(0,e.today.x-t/3)}function _t(e,t,n={}){let r=He(e.time.start)??0,i=He(e.time.end)??r,a=n.pxPerDay??rt[e.time.scale]??4,o=(i-r+1)*a,s=e=>(e-r)*a,c=ft(r,i),l=new Date(r*Be),u=[{day:r,year:l.getUTCFullYear(),month:l.getUTCMonth()},...c],d=u.map((e,t)=>{let n=t+1<u.length?u[t+1].day:i+1;return{label:at[e.month],x:s(e.day),width:(n-e.day)*a,year:e.year,month:e.month}}),f=[];u.forEach((e,t)=>{let n=d[t],r=f[f.length-1];r!==void 0&&r.label===String(e.year)?r.width+=n.width:f.push({label:String(e.year),x:n.x,width:n.width})});let p=it(a,n.unit),m=(e,t)=>e.map((n,r)=>{let o=r+1<e.length?e[r+1]:i+1;return{label:t(n),x:s(n),width:(o-n)*a}}),h=f,g;if(p===`week`){let e=[];for(let t=r-ct(r)+7;t<=i;t+=7)e.push(t);g=m([r,...e],e=>`W${lt(e)}`),h=d.map(e=>({label:`${e.label} ${e.year}`,x:e.x,width:e.width}))}else if(p===`quarter`){let e=u.filter((e,t)=>t===0||e.month%3==0);g=e.map((t,n)=>{let r=n+1<e.length?e[n+1].day:i+1;return{label:`Q${Math.floor(t.month/3)+1}`,x:s(t.day),width:(r-t.day)*a}})}else g=d;let _=g.slice(1).map(e=>e.x),v=[],y=[],b=0,ee=e.comparedTo!==void 0,x=(e,t)=>{if(!ee)return;if(e.role===`added`||t.role===`added`)return`(new)`;let n=et(e);return n===``?void 0:`(${n})`},te=(e,t,n)=>{let r=x(e,t);return r===void 0?n:n===void 0?r:`${n} ${r}`},ne=(e,t)=>{if(ee)return e.role===`removed`||t.role===`removed`?`removed`:e.role===`added`||t.role===`added`?`added`:et(e)===``?void 0:`moved`},re=(e,t)=>{let n=[],r=[],i=[],c=e.map(e=>({...e,days:Ge(e.item)})).filter(e=>e.days!==void 0).sort((e,t)=>Number(e.item.type===`milestone`)-Number(t.item.type===`milestone`)||e.days.start-t.days.start||e.row-t.row||e.index-t.index);for(let{item:e,index:t,row:l,days:u,text:d,note:f,change:p}of c){let c=[],m;if(p===`moved`&&e.previous!==void 0){let t=Ze(e.previous);if(e.type===`activity`)m={x0:s(t.start),x1:s(t.end+1)};else{let e=s(t.start)+a/2;m={x0:e-7,x1:e+7,cx:e}}c.push({kind:`ghost`,x0:m.x0,x1:m.x1})}let h,g,_,v;if(e.type===`activity`){if(g=s(u.start),_=s(u.end+1),c.push({kind:`bar`,x0:g,x1:_}),d!==void 0){let e=dt(d);h=e+12<=_-g?{text:d,inside:!0,x:g+6,width:e}:vt(d,g,_,o),f!==void 0&&(h.note=f),c.push({kind:`label`,x0:h.x,x1:h.x+h.width})}}else v=s(u.start)+a/2,g=v-7,_=v+7,c.push({kind:`star`,x0:g,x1:_}),d!==void 0&&(h=vt(d,g,_,o),f!==void 0&&(h.note=f),c.push({kind:`label`,x0:h.x,x1:h.x+h.width}));let y=n.findIndex(e=>c.every(t=>e.every(e=>mt(t.kind,e.kind)||!ht(t,e))));y===-1&&(y=n.length,n.push([])),n[y].push(...c),r.push({row:l,item:t,type:e.type,lane:y,days:u,...e.kind?{kind:e.kind}:{},...p===void 0?{}:{change:p}}),i.push({label:h===void 0?void 0:{...h,...p===`removed`?{struck:!0}:{}},x0:g,x1:_,cx:v,ghost:m})}return r.forEach((e,n)=>{let r=i[n],a=t+4+e.lane*24+12,o=e.type===`activity`?{x:r.x0,y:a-6,width:r.x1-r.x0,height:12}:{x:r.x0,y:a-7,width:14,height:14},s=r.ghost;y.push({...e,glyph:o,...r.cx===void 0?{}:{center:{x:r.cx,y:a}},...r.label===void 0?{}:{label:{...r.label,y:a-8,height:16}},...s===void 0?{}:e.type===`activity`?{ghost:{x:s.x0,y:a-6,width:s.x1-s.x0,height:12}}:{ghost:{x:s.x0,y:a-7,width:14,height:14},ghostCenter:{x:s.cx,y:a}}})}),Math.max(1,n.length)},ie=e=>e*24+8,ae=(e,t)=>{let n=re(e.items.map((n,r)=>({row:t,index:r,item:n,text:te(n,e,ut(n)),note:x(n,e),change:ne(n,e)})),b),r=ie(n);v.push({type:`task`,row:t,y:b,height:r,lanes:n,label:e.label,id:e.id}),b+=r},oe,se=()=>{if(oe!==void 0){if(oe.tasks.length===0){let e=oe.label?26:10;v.push({type:`separator`,row:oe.row,y:b,height:e,...oe.label?{label:oe.label}:{}}),b+=e}else{let e=re(oe.tasks.flatMap(({task:e,row:t})=>e.items.map((n,r)=>({row:t,index:r,item:n,text:te(n,e,ut(n)??(n.type===`activity`?e.label:void 0)),note:x(n,e),change:ne(n,e)}))),b),t=ie(e);v.push({type:`section`,row:oe.row,y:b,height:t,lanes:e,...oe.label?{label:oe.label}:{},tasks:oe.tasks.map(({task:e})=>e.id)}),b+=t}oe=void 0}},ce=(()=>{let t=new Set;if(!(n.onlyChanged&&ee))return;let r;return e.rows.forEach((e,n)=>{e.type===`separator`?r=n:nt(e)&&(t.add(n),r!==void 0&&t.add(r))}),t})(),le=ce===void 0?0:e.rows.filter((e,t)=>e.type===`task`&&!ce.has(t)).length;e.rows.forEach((e,t)=>{if(!(ce!==void 0&&!ce.has(t))){if(e.type===`separator`){if(n.compact){se(),oe={row:t,...e.label?{label:e.label}:{},tasks:[]};return}let r=e.label?26:10;v.push({type:`separator`,row:t,y:b,height:r,...e.label?{label:e.label}:{}}),b+=r;return}oe===void 0?ae(e,t):oe.tasks.push({task:e,row:t})}}),se();let ue=[];for(let t of e.rows)if(t.type===`task`)for(let e of t.items)e.kind&&!ue.includes(e.kind)&&ue.push(e.kind);for(let t of[...e.periods??[],...e.references??[]])t.kind&&!ue.includes(t.kind)&&ue.push(t.kind);let de=[];(e.periods??[]).forEach((e,t)=>{let n=Math.max(He(e.start)??r,r),o=Math.min(He(e.end)??i,i);n>o||de.push({index:t,x:s(n),width:(o-n+1)*a,start:e.start,end:e.end,...e.label?{label:e.label}:{},...e.kind?{kind:e.kind}:{}})});let fe=(e.references??[]).flatMap((e,t)=>{let n=He(e.date);return n===void 0||n<r||n>i?[]:[{index:t,x:s(n)+a/2,label:e.label,date:e.date,...e.kind?{kind:e.kind}:{}}]}),pe=[];if(t>=r&&t<=i){let e=s(t)+a/2;pe.push({x0:e-26,x1:e+26})}let me=[],he=[...de.filter(e=>e.label).map(e=>({of:`period`,index:e.index,text:e.label,x:e.x+3,room:e.width-6})),...fe.map(e=>{let t=dt(e.label)*(10/11);return{of:`reference`,index:e.index,text:e.label,x:Math.min(Math.max(2,e.x-t/2),o-t-2),room:o-4}})].sort((e,t)=>e.x-t.x);for(let e of he){let t=dt(e.text)*(10/11);if(t>e.room)continue;let n={x0:e.x-2,x1:e.x+t+2};pe.some(e=>n.x0<e.x1&&e.x0<n.x1)||(pe.push(n),me.push({of:e.of,index:e.index,text:e.text,x:e.x,width:t}))}return{width:o,height:b,start:r,end:i,years:f,months:d,monthLines:c.map(e=>s(e.day)),unit:p,upper:h,lower:g,unitLines:_,rows:v,items:y,dependencies:yt(e,v,y,s),today:t<r?{outside:`before`,day:t}:t>i?{outside:`after`,day:t}:{x:s(t)+a/2,day:t},kinds:ue,hiddenTasks:le,periods:de,references:fe,headerLabels:me}}function vt(e,t,n,r){let i=dt(e),a=n+4;if(a+i<=r)return{text:e,inside:!1,x:a,width:i};let o=t-4-i;return o>=0?{text:e,inside:!1,x:o,width:i}:{text:e,inside:!1,x:Math.max(0,r-i),width:i}}function yt(e,t,n,r){let i=Ke(e),a=new Map(n.map(e=>[`${e.row}:${e.item}`,e])),o=new Map(t.map(e=>[e.row,e])),s=(e,t)=>{let s=i.get(e);if(s?.days===void 0)return;if(s.item!==void 0){let e=a.get(`${s.row}:${s.item}`);if(e===void 0)return;let n=e.glyph.y+e.glyph.height/2;return e.center===void 0?{x:t===`start`?e.glyph.x:e.glyph.x+e.glyph.width,y:n}:{x:e.center.x+(t===`start`?-7:7),y:n}}let c=r(t===`start`?s.days.start:s.days.end+1),l=o.get(s.row);if(l!==void 0&&l.type===`task`)return{x:c,y:l.y+4+12};let u=n.filter(e=>e.row===s.row).sort((e,n)=>t===`start`?e.glyph.x-n.glyph.x:n.glyph.x+n.glyph.width-(e.glyph.x+e.glyph.width));if(u.length!==0)return{x:c,y:u[0].glyph.y+u[0].glyph.height/2}},c=[];return(e.dependencies??[]).forEach((e,t)=>{let n=Je(e),r=Ye(n),a=s(e.from,r.from),o=s(e.to,r.to),l=Xe(e,i);if(a===void 0||o===void 0||l===void 0)return;let u={x:a.x+(r.from===`end`?8:-8),y:a.y},d={x:o.x+(r.to===`start`?-8:8),y:o.y};if(a.y===o.y&&r.from===`end`&&r.to===`start`&&o.x>=a.x-14){c.push({index:t,from:e.from,to:e.to,type:n,satisfied:l,points:[a,o]});return}let f=o.y>a.y?o.y-12:(o.y,a.y,o.y+12);c.push({index:t,from:e.from,to:e.to,type:n,satisfied:l,points:[a,u,{x:u.x,y:f},{x:d.x,y:f},d,o]})}),c}function bt(e){let t=e.rows.reduce((e,t)=>Math.max(e,(t.label??``).length),0);return Math.min(Math.max(t*Oe+24,120),280)}function xt(e,t){for(let n of e.rows){if(n.type!==`task`)continue;if(n.id===t)return`"${n.label}" (${t})`;let e=n.items.find(e=>e.id===t);if(e!==void 0){let n=ut(e);return n===void 0?t:`"${n}" (${t})`}}return t}function St(e,t,n){let r=n===!1?` — not satisfied by the dates`:``;return`${xt(e,t.to)} waits on ${xt(e,t.from)} (${Je(t)})${r}`}function Ct(e){let t=[];e.title!==void 0&&e.title!==``&&t.push(e.title),e.comparedTo!==void 0&&t.push(`Compared with ${e.comparedTo.label}${e.comparedTo.date===void 0?``:` (${e.comparedTo.date})`}`),t.push(`From ${e.time.start} to ${e.time.end}, by ${e.time.scale}`);for(let n of e.rows){if(t.push(``),n.type===`separator`){t.push(n.label?`— ${n.label} —`:`———`);continue}let e=n.role===void 0?``:n.role===`added`?` — new`:` — removed`;t.push(`${n.label} [${n.id}]${n.items.length===0?` — no items`:``}${e}`);for(let e of n.items){let n=e.type===`activity`?`${e.start} to ${e.end}`:e.date,r=e.label===void 0?``:`: ${e.label}`,i=e.kind===void 0?``:` [${e.kind}]`,a=e.id===void 0?``:` (${e.id})`,o=(()=>{if(e.role===`added`)return` — new`;if(e.role===`removed`)return` — removed`;let t=et(e);return t===``||e.previous===void 0?``:` — moved ${t}, was ${`date`in e.previous?e.previous.date:`${e.previous.start} to ${e.previous.end}`}`})();t.push(` ${e.type} ${n}${r}${i}${a}${o}`)}}let n=[...(e.periods??[]).map(e=>` period ${e.start} to ${e.end}${e.label?`: ${e.label}`:``}${e.kind?` [${e.kind}]`:``}`),...(e.references??[]).map(e=>` reference ${e.date}: ${e.label}${e.kind?` [${e.kind}]`:``}`)];n.length>0&&t.push(``,`Calendar`,...n);let r=e.dependencies??[];if(r.length>0){let n=Ke(e);t.push(``,`Dependencies`);for(let i of r)t.push(` ${St(e,i,Xe(i,n))}`)}return t}function wt(e){let t=[],n=(e,n)=>{let r=He(e);return r===void 0&&t.push({rule:`invalid-date`,path:n,message:`"${e}" is not a day of the calendar`}),r},r=n(e.time.start,`/data/time/start`),i=n(e.time.end,`/data/time/end`),a=r!==void 0&&i!==void 0&&r<=i?{start:r,end:i}:void 0;r!==void 0&&i!==void 0&&r>i&&t.push({rule:`inverted-range`,path:`/data/time`,message:`the timeline starts on ${e.time.start}, after it ends on ${e.time.end}`});let o=`${e.time.start} to ${e.time.end}`,s=new Map,c=(e,n)=>{if(e===void 0)return;let r=s.get(e);r===void 0?s.set(e,n):t.push({rule:`duplicate-identifier`,path:`${n}/id`,message:`identifier "${e}" is already declared at ${r}`})},l=e.comparedTo!==void 0;e.comparedTo?.date!==void 0&&n(e.comparedTo.date,`/data/comparedTo/date`);let u=e=>t.push({rule:`comparison-without-reference`,path:e,message:"previous dates and change roles describe a comparison; declare `comparedTo` naming the plan they compare with"}),d=new Set;return e.rows.forEach((e,r)=>{if(e.type!==`task`)return;let i=`/data/rows/${r}`;c(e.id,i),e.role!==void 0&&!l&&u(`${i}/role`),e.items.forEach((r,s)=>{let f=`${i}/items/${s}`;if(c(r.id,f),r.kind!==void 0&&d.add(r.kind),r.role!==void 0&&!l&&u(`${f}/role`),r.previous!==void 0){l||u(`${f}/previous`),(r.role!==void 0||e.role!==void 0)&&t.push({rule:`contradictory-change`,path:`${f}/previous`,message:`an item that is ${r.role??`in a task that is ${e.role}`} has no previous dates; it is new or dropped, not moved`});let i=r.previous,s=r.type===`activity`?{first:n(i.start,`${f}/previous/start`),last:n(i.end,`${f}/previous/end`)}:(()=>{let e=n(i.date,`${f}/previous/date`);return{first:e,last:e}})();s.first!==void 0&&s.last!==void 0&&(s.first>s.last?t.push({rule:`inverted-range`,path:`${f}/previous`,message:`the previous dates start on ${i.start}, after they end on ${i.end}`}):a!==void 0&&(s.first<a.start||s.last>a.end)&&t.push({rule:`item-outside-range`,path:`${f}/previous`,message:`the previous dates fall outside the timeline's range ${o}; the range covers both plans, so widen \`time\``}))}r.role!==void 0&&e.role!==void 0&&r.role!==e.role&&t.push({rule:`contradictory-change`,path:`${f}/role`,message:`an item ${r.role} in a task that is ${e.role}`});let p,m;if(r.type===`activity`){if(p=n(r.start,`${f}/start`),m=n(r.end,`${f}/end`),p!==void 0&&m!==void 0&&p>m){t.push({rule:`inverted-range`,path:f,message:`the activity starts on ${r.start}, after it ends on ${r.end}`});return}}else p=m=n(r.date,`${f}/date`);a!==void 0&&p!==void 0&&m!==void 0&&(p<a.start||m>a.end)&&t.push({rule:`item-outside-range`,path:f,message:r.type===`activity`?`the activity runs ${r.start} to ${r.end}, outside the timeline's range ${o}; widen \`time\` or move the activity`:`the milestone falls on ${r.date}, outside the timeline's range ${o}; widen \`time\` or move the milestone`})})}),(e.periods??[]).forEach((e,r)=>{let i=`/data/periods/${r}`;e.kind!==void 0&&d.add(e.kind);let s=n(e.start,`${i}/start`),c=n(e.end,`${i}/end`);s!==void 0&&c!==void 0&&(s>c?t.push({rule:`inverted-range`,path:i,message:`the period starts on ${e.start}, after it ends on ${e.end}`}):a!==void 0&&(c<a.start||s>a.end)&&t.push({rule:`period-outside-range`,path:i,message:`the period ${e.start} to ${e.end} lies wholly outside the timeline's range ${o}, so nothing of it could be drawn`}))}),(e.references??[]).forEach((e,r)=>{let i=`/data/references/${r}`;e.kind!==void 0&&d.add(e.kind);let s=n(e.date,`${i}/date`);s!==void 0&&a!==void 0&&(s<a.start||s>a.end)&&t.push({rule:`item-outside-range`,path:i,message:`the reference date ${e.date} is outside the timeline's range ${o}; widen \`time\` or move it`})}),d.size>de.kindsPerVocabulary&&t.push({rule:`too-many-kinds`,path:`/data/rows`,message:`${d.size} distinct item types, and no more than ${de.kindsPerVocabulary} can be told apart in a rendering`,observed:d.size,limit:de.kindsPerVocabulary}),t.push(...Et(e,Ke(e))),t.push(...Tt(e)),t}function Tt(e){let t=new Set;for(let n of e.rows)if(n.type===`task`){n.role===`removed`&&t.add(n.id);for(let e of n.items)e.id!==void 0&&(e.role===`removed`||n.role===`removed`)&&t.add(e.id)}let n=[];return(e.dependencies??[]).forEach((e,r)=>{for(let i of[`from`,`to`])t.has(e[i])&&n.push({rule:`dependency-on-removed`,path:`/data/dependencies/${r}/${i}`,message:`"${e[i]}" was dropped from the plan, so nothing can depend on it any more; remove the dependency`})}),n}function Et(e,t){let n=[],r=e.dependencies??[],i=[],a=new Map;r.forEach((r,o)=>{let s=`/data/dependencies/${o}`,c=!0;for(let i of[`from`,`to`]){let a=r[i],o=t.get(a);if(o===void 0)c=!1,n.push({rule:`unresolved-endpoint`,path:`${s}/${i}`,message:`"${a}" is not the identifier of any task or item this timeline declares`});else if(o.type===`task`&&o.days===void 0){c=!1;let t=e.rows[o.row];if(t.type===`task`&&t.items.length>0)continue;n.push({rule:`empty-task-endpoint`,path:`${s}/${i}`,message:`task "${a}" holds no item, so it has no start or finish for a dependency to link`})}}if(!c)return;let l=t.get(r.from),u=t.get(r.to),d=(e,t)=>e.type===`task`&&t.type!==`task`&&t.row===e.row;if(l.id===u.id||d(l,u)||d(u,l)){n.push({rule:`self-dependency`,path:s,message:l.id===u.id?`"${l.id}" cannot depend on itself`:`a task and one of its own items cannot depend on each other: the task's span is made of its items`});return}let f=JSON.stringify([r.from,r.to,Je(r)]),p=a.get(f);if(p!==void 0){n.push({rule:`duplicate-dependency`,path:s,message:`the same dependency is already declared at /data/dependencies/${p}`});return}a.set(f,o),i.push({from:r.from,to:r.to,index:o})});let o=Dt(i);return o!==void 0&&n.push({rule:`dependency-cycle`,path:`/data/dependencies/${o.index}`,message:`dependencies form a cycle, which no dates can honour: ${o.ids.join(` → `)}`}),n}function Dt(e){let t=new Map;for(let n of e){let e=t.get(n.from)??[];e.push({to:n.to,index:n.index}),t.set(n.from,e)}let n=new Map,r=[];for(let e of t.keys()){if(n.has(e))continue;let i=[{id:e,next:0}];for(n.set(e,`open`),r.push({id:e,index:-1});i.length>0;){let e=i[i.length-1],a=t.get(e.id)??[];if(e.next>=a.length){n.set(e.id,`done`),i.pop(),r.pop();continue}let o=a[e.next++],s=n.get(o.to);if(s===`open`){let e=r.findIndex(e=>e.id===o.to);return{ids:[...r.slice(e).map(e=>e.id),o.to],index:o.index}}s===void 0&&(n.set(o.to,`open`),i.push({id:o.to,next:0}),r.push({id:o.to,index:o.index}))}}}function Ot(e){let t=e.data;return e.kind===`graph`?Array.isArray(t.nodes)&&Array.isArray(t.edges):e.kind===`sequence`?Array.isArray(t.participants)&&Array.isArray(t.messages):e.kind===`timeline`?typeof t.time==`object`&&t.time!==null&&Array.isArray(t.rows):Array.isArray(t.columns)&&Array.isArray(t.rows)}function kt(e){return e.kind===`graph`?e.data.nodes:e.kind===`sequence`?e.data.participants:[]}function At(e){return e.kind===`graph`?e.data.edges:e.kind===`sequence`?e.data.messages:[]}function jt(e){return e.kind===`graph`||e.kind===`sequence`?e.data.containers??[]:[]}function Mt(e){return e.kind===`graph`?`/data/nodes`:`/data/participants`}function Nt(e){return e.kind===`graph`?`/data/edges`:`/data/messages`}function Pt(e){if(e.kind===`timeline`)return[];let t=e.data,n=[];for(let e of[`nodes`,`edges`,`participants`,`messages`,`rows`,`relations`]){let r=t[e];Array.isArray(r)&&r.forEach((t,r)=>{if(typeof t!=`object`||!t||Array.isArray(t))return;let i=t;n.push({at:`/data/${e}/${r}`,ref:typeof i.ref==`string`?i.ref:void 0,set:i.set,expect:i.expect,locations:i.locations})})}return n}function Ft(e){if(e.kind!==`table`)return[];let t=e.data.rows,n=[];return t.forEach((e,t)=>{if(typeof e!=`object`||!e||Array.isArray(e))return;let r=e;(r.ref!==void 0||r.set!==void 0)&&n.push({at:`/data/rows/${t}`,...typeof r.ref==`string`?{ref:r.ref}:{},...r.set===void 0?{}:{set:r.set}})}),n}function It(e){if(e.kind!==`table`)return[];let t=e.data.rows,n=[];return t.forEach((e,t)=>{if(typeof e!=`object`||!e||Array.isArray(e))return;let r=e.id;typeof r==`string`&&n.push({id:r,at:`/data/rows/${t}`})}),n}function Lt(e){if(e.kind!==`table`)return[];let t=e.data.relations;return Array.isArray(t)?t:[]}function Rt(e,t){return e===`timeline`?`a timeline is maintained by presenting the revised timeline again, not proposed as a change, ${t}`:`a ${e} is a projection and cannot be proposed, ${t}`}function zt(e){let t=[];if(!Ot(e))return t.push({rule:`kind-data-mismatch`,path:`/data`,message:`data does not carry what kind "${e.kind}" declares`}),t;let n=ce(e.schema).includes(e.kind);e.target!==void 0&&!n&&t.push({rule:`kind-not-proposable`,path:`/target`,message:Rt(e.kind,`so it carries no target`)}),e.removals!==void 0&&(n?e.target===void 0&&t.push({rule:`removal-without-target`,path:`/removals`,message:`removals need a target: an artifact that does not exist yet has nothing to remove`}):t.push({rule:`kind-not-proposable`,path:`/removals`,message:Rt(e.kind,`so it declares no removals`)}));let r=kt(e),i=Mt(e),a=new Map;r.forEach((e,n)=>{let r=a.get(e.id);r===void 0?a.set(e.id,n):t.push({rule:`duplicate-identifier`,path:`${i}/${n}/id`,message:`identifier "${e.id}" is already declared at ${i}/${r}`})});let o=new Map;jt(e).forEach((e,n)=>{let r=o.get(e.id);r===void 0?o.set(e.id,n):t.push({rule:`duplicate-container-identifier`,path:`/data/containers/${n}/id`,message:`container "${e.id}" is already declared at /data/containers/${r}`})}),r.forEach((e,n)=>{for(let[r,a]of[[`container`,e.container],[`set/container`,e.set?.container]])a!==void 0&&!o.has(a)&&t.push({rule:`unresolved-container`,path:`${i}/${n}/${r}`,message:`"${a}" is not a container declared in /data/containers`})});let s=Nt(e);At(e).forEach((e,n)=>{for(let r of[`from`,`to`]){let o=e[r];a.has(o)||t.push({rule:`unresolved-endpoint`,path:`${s}/${n}/${r}`,message:`"${o}" is not an identifier declared in ${i}`})}});let c=new Map,l=(e,n,r)=>{if(n===void 0)return;let i=`${e}:${n}`,a=c.get(i);a===void 0?c.set(i,r):t.push({rule:`duplicate-reference`,path:r,message:`${e} "${n}" is already addressed at ${a}; a proposal states one intention per thing`})};r.forEach((e,t)=>l(`element`,e.ref,`${i}/${t}`)),At(e).forEach((e,t)=>l(`relationship`,e.ref,`${s}/${t}`)),Ft(e).forEach(e=>l(`row`,e.ref,e.at)),(e.removals??[]).forEach((e,t)=>l(e.type,e.ref,`/removals/${t}`));let u=[...r.map((e,t)=>({at:`${i}/${t}`,ref:e.ref,set:e.set})),...At(e).map((t,n)=>({at:`${Nt(e)}/${n}`,ref:t.ref,set:t.set})),...Ft(e)];for(let r of u)r.set!==void 0&&(r.ref===void 0?t.push({rule:`change-without-reference`,path:`${r.at}/set`,message:`a change names a reference to change; without one this is a new thing, and its fields are its values`}):n?e.target===void 0&&t.push({rule:`change-without-target`,path:`${r.at}/set`,message:`a change needs a target: naming what is being changed is what makes this a proposal rather than a new artifact`}):t.push({rule:`kind-not-proposable`,path:`${r.at}/set`,message:Rt(e.kind,`so nothing in it declares a change`)}));let d=e=>{let t=new Set;for(let n of e)n.kind!==void 0&&n.kind!==``&&t.add(n.kind);return t},f=[[e.kind===`sequence`?`participant`:`element`,i,d(r)],[e.kind===`sequence`?`message`:`relationship`,Nt(e),d(At(e))]];for(let[e,n,r]of f)r.size>de.kindsPerVocabulary&&t.push({rule:`too-many-kinds`,path:n,message:`${r.size} distinct ${e} types, and no more than ${de.kindsPerVocabulary} can be told apart in a rendering`,observed:r.size,limit:de.kindsPerVocabulary});let p=e.viewpoints;if(Array.isArray(p)){if(e.kind!==`graph`)t.push({rule:`viewpoints-without-graph`,path:`/viewpoints`,message:`only a graph declares viewpoints; a ${e.kind} has no element and relationship kinds for one to retain`});else{let n=new Set(r.map(e=>e.kind).filter(e=>!!e)),i=new Set(At(e).map(e=>e.kind).filter(e=>!!e)),a=new Map;p.forEach((e,r)=>{let o=`/viewpoints/${r}`,{id:s,elementKinds:c,relationshipKinds:l}=e,u=a.get(s);u===void 0?a.set(s,r):t.push({rule:`duplicate-viewpoint-identifier`,path:`${o}/id`,message:`viewpoint "${s}" is already declared at /viewpoints/${u}`}),c===void 0&&l===void 0&&t.push({rule:`empty-viewpoint`,path:o,message:`viewpoint "${s}" retains no kind, so it would show nothing it was not already showing; name elementKinds, relationshipKinds, or both`});let d=[[c,n,i,`elementKinds`,`element`,`relationship`],[l,i,n,`relationshipKinds`,`relationship`,`element`]];for(let[e,n,r,i,a,c]of d)e?.forEach((e,l)=>{n.has(e)||t.push({rule:`unresolved-viewpoint-kind`,path:`${o}/${i}/${l}`,message:`viewpoint "${s}" retains ${a} kind "${e}", and no ${a} of this document has it`+(r.has(e)?` (it is a ${c} kind here, which is a different vocabulary)`:``)})})})}}if(e.kind===`table`){let{columns:n,rows:r}=e.data;r.forEach((e,r)=>{let{cells:i,heading:a}=ue(e);a===void 0&&i.length!==n.length&&t.push({rule:`row-column-mismatch`,path:`/data/rows/${r}`,message:`row has ${i.length} values but ${n.length} columns are declared`,observed:i.length,limit:n.length})})}e.kind===`timeline`&&t.push(...wt(e.data));for(let n of Pt(e)){n.expect!==void 0&&(e.target===void 0?t.push({rule:`expectation-without-target`,path:`${n.at}/expect`,message:`an expectation is checked by the authority a proposal targets; a document that targets nothing has nobody to check it`}):n.ref===void 0&&t.push({rule:`expectation-without-reference`,path:`${n.at}/expect`,message:`an expectation describes something that already exists, and this item carries no reference to one`}));let r=n.set?.removeAttributes;if(Array.isArray(r)){let e=n.set?.attributes??{},i=new Map;r.forEach((r,a)=>{if(typeof r!=`string`)return;let o=i.get(r);o===void 0?i.set(r,a):t.push({rule:`duplicate-attribute-removal`,path:`${n.at}/set/removeAttributes/${a}`,message:`"${r}" is already removed at ${n.at}/set/removeAttributes/${o}`}),Object.prototype.hasOwnProperty.call(e,r)&&t.push({rule:`attribute-set-and-removed`,path:`${n.at}/set/removeAttributes/${a}`,message:`"${r}" is both assigned and removed; a proposal states one intention per property`})})}Array.isArray(n.locations)&&n.locations.forEach((e,r)=>{if(typeof e!=`object`||!e)return;let i=e.range;i!==void 0&&(i.endLine<i.startLine||i.endLine===i.startLine&&i.endCharacter!==void 0&&i.startCharacter!==void 0&&i.endCharacter<i.startCharacter)&&t.push({rule:`location-range-reversed`,path:`${n.at}/locations/${r}/range`,message:`a range ends before it begins, so it selects nothing a reader could be taken to`})})}e.kind===`table`&&e.data.rows.forEach((e,n)=>{if(typeof e!=`object`||!e||Array.isArray(e))return;let r=e;r.role!==void 0&&r.set!==void 0&&t.push({rule:`role-with-change`,path:`/data/rows/${n}/role`,message:`a row states what it observed or what it asks for, not both: a declared role beside a change is a report and an instruction at once`})});let m=new Map;for(let n of It(e)){let e=m.get(n.id);e===void 0?m.set(n.id,n.at):t.push({rule:`duplicate-identifier`,path:`${n.at}/id`,message:`identifier "${n.id}" is already declared at ${e}`})}return Lt(e).forEach((e,n)=>{for(let r of[`from`,`to`]){let i=e[r];if(typeof i!=`object`||!i)continue;let a=i.id;typeof a==`string`&&(m.has(a)||t.push({rule:`unresolved-endpoint`,path:`/data/relations/${n}/${r}`,message:`"${a}" is not the identifier of any row this document declares`}))}}),t}function Bt(e,t){let n=t(e);if(n.length>0)return{valid:!1,issues:n};let r=e,i=zt(r);return i.length>0?{valid:!1,issues:i}:{valid:!0,envelope:r,issues:[]}}function Vt(e,t,n){let r=we(e,n);if(r!==void 0)return{valid:!1,issues:[r]};let i;try{i=JSON.parse(e)}catch{return{valid:!1,issues:[{rule:`not-json`,path:``,message:`document is not parseable JSON`}]}}let a=Bt(i,t);if(!a.valid)return a;let o=we(e,n,a.envelope.schema);if(o!==void 0)return{valid:!1,issues:[o]};let s=Ee(a.envelope,n);return s.length>0?{valid:!1,issues:s}:{valid:!0,envelope:a.envelope,measurement:De(a.envelope,e),issues:[]}}function Ht(e){if(typeof e!=`object`||!e||Array.isArray(e))return;let t=e.schema;if(!(typeof t!=`string`||!t.startsWith(`urn:structured-exchange:`)))return t}function Ut(e,t,n){let r=we(e,n);if(r!==void 0)return{status:`too-large`,issue:r};let i;try{i=JSON.parse(e)}catch{return{status:`not-a-document`,why:`unparseable`}}let a=Ht(i);if(a===void 0)return{status:`not-a-document`,why:`undeclared`};if(_e(a)===void 0)return{status:`unsupported-version`,schema:a};let o=Bt(i,t);if(!o.valid)return{status:`invalid`,issues:o.issues};let s=we(e,n,o.envelope.schema);return s===void 0?{status:`valid`,envelope:o.envelope}:{status:`too-large`,issue:s}}function Wt(e){let t=e.replace(/\r\n/g,`
|
|
6
6
|
`).replace(/\s+$/,``),n=2166136261;for(let e=0;e<t.length;e++)n^=t.charCodeAt(e),n=Math.imul(n,16777619);return`sx-${(n>>>0).toString(16).padStart(8,`0`)}-${t.length.toString(36)}`}function Gt(e,t,n){return e>=t&&e<=n}function Kt(e){return e===8205}function qt(e){return Gt(e,55296,56319)}function Jt(e){return Gt(e,127462,127487)}function Yt(e){return Gt(e,65024,65039)}function Xt(e){return Gt(e,768,879)||Gt(e,6832,6911)||Gt(e,7616,7679)||Gt(e,65056,65071)}function Zt(e){return e>65535?2:1}function Qt(e,t){for(;t<e.length;){let n=e.codePointAt(t);if(Xt(n)||Yt(n))t+=Zt(n);else break}return t}function $t(e,t){let n=e.codePointAt(t),r=t+Zt(n);for(r=Qt(e,r);r<e.length-1&&Kt(e.codePointAt(r));){let t=e.codePointAt(r+1);r+=1+Zt(t),r=Qt(e,r)}return Jt(n)&&r<e.length&&Jt(e.codePointAt(r))&&(r+=Zt(e.codePointAt(r))),r}function en(e){return qt(e)||Xt(e)||Yt(e)||Kt(e)}function tn(e,t){if(t===0)return!0;let n=0,r=0;for(;r<e.length;)if(r=$t(e,r),n++,n>=t)return!0;return!1}function nn(e,t){let n=0,r=0;for(;r<e.length;)if(r=$t(e,r),n++,n>t)return!1;return!0}function rn(e,t){if(t===0)return!0;let n=0;for(;n<e.length;){if(en(e.charCodeAt(n)))return tn(e,t);if(n++,n>=t)return!0}return!1}function an(e,t){let n=0;for(;n<e.length;){if(en(e.charCodeAt(n)))return nn(e,t);if(n++,n>t)return!1}return!0}function on(e){return Array.isArray(e)}function sn(e){return gn(typeof e,`bigint`)}function cn(e){return gn(typeof e,`boolean`)}function ln(e){if(hn(e)||!un(e))return!1;let t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function un(e){return gn(typeof e,`function`)}function dn(e){return gn(e,null)}function fn(e){return gn(typeof e,`object`)&&!dn(e)}function pn(e){return gn(typeof e,`string`)}function mn(e){return gn(typeof e,`symbol`)}function hn(e){return gn(e,void 0)}function gn(e,t){return e===t}function _n(e,t){return an(e,t)}function vn(e,t){return rn(e,t)}function yn(e){return e instanceof Boolean}function bn(e){return e instanceof Number}function xn(e){return e instanceof String}function Sn(e){return globalThis.ArrayBuffer.isView(e)}function Cn(e){return e instanceof globalThis.RegExp}function wn(e){return e instanceof globalThis.Date}var Tn=[];function En(e){Tn=e.variables}var Dn=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`schema`in e&&`kind`in e&&`data`in e&&Object.getOwnPropertyNames(e).every((e,t)=>Tn[0].test(e)||!1)&&e.schema===`urn:structured-exchange:1`&&(e.kind===`graph`||e.kind===`sequence`||e.kind===`table`)&&(e.target===void 0||!(`target`in e)||On(e.target))&&(e.removals===void 0||!(`removals`in e)||Array.isArray(e.removals)&&e.removals.every((e,t)=>kn(e))&&e.removals.length<=500)&&[typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`nodes`in e.data&&`edges`in e.data&&Object.getOwnPropertyNames(e.data).every((e,t)=>Tn[2].test(e)||!1)&&Array.isArray(e.data.nodes)&&e.data.nodes.every((e,t)=>Nn(e))&&e.data.nodes.length<=500&&e.data.nodes.length>=1&&Array.isArray(e.data.edges)&&e.data.edges.every((e,t)=>Fn(e))&&e.data.edges.length<=2e3&&(e.data.containers===void 0||!(`containers`in e.data)||Array.isArray(e.data.containers)&&e.data.containers.every((e,t)=>Ln(e))&&e.data.containers.length<=50),typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`participants`in e.data&&`messages`in e.data&&Object.getOwnPropertyNames(e.data).every((e,t)=>Tn[8].test(e)||!1)&&Array.isArray(e.data.participants)&&e.data.participants.every((e,t)=>Nn(e))&&e.data.participants.length<=100&&e.data.participants.length>=1&&Array.isArray(e.data.messages)&&e.data.messages.every((e,t)=>Rn(e))&&e.data.messages.length<=1e3&&(e.data.containers===void 0||!(`containers`in e.data)||Array.isArray(e.data.containers)&&e.data.containers.every((e,t)=>Ln(e))&&e.data.containers.length<=50),typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`columns`in e.data&&`rows`in e.data&&Object.getOwnPropertyNames(e.data).length===2&&Array.isArray(e.data.columns)&&e.data.columns.every((e,t)=>typeof e==`string`&&_n(e,200)&&vn(e,1))&&e.data.columns.length<=50&&e.data.columns.length>=1&&Array.isArray(e.data.rows)&&e.data.rows.every((e,t)=>[Bn(e),typeof e==`object`&&!!e&&!Array.isArray(e)&&`cells`in e&&Object.getOwnPropertyNames(e).every((e,t)=>Tn[11].test(e)||!1)&&Bn(e.cells)&&(e.role===void 0||!(`role`in e)||e.role===`added`||e.role===`changed`||e.role===`context`||e.role===`removed`)].reduce((e,t,n)=>t===!0?++e:e,0)===1)&&e.data.rows.length<=5e3].reduce((e,t,n)=>t===!0?++e:e,0)===1),On=(e=>typeof e==`string`&&_n(e,200)&&vn(e,1)),kn=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`type`in e&&`ref`in e&&Object.getOwnPropertyNames(e).every((e,t)=>Tn[1].test(e)||!1)&&(e.type===`element`||e.type===`relationship`)&&On(e.ref)&&(e.label===void 0||!(`label`in e)||An(e.label))&&(e.kind===void 0||!(`kind`in e)||jn(e.kind))&&(e.from===void 0||!(`from`in e)||Mn(e.from))&&(e.to===void 0||!(`to`in e)||Mn(e.to))),An=(e=>typeof e==`string`&&_n(e,500)),jn=(e=>typeof e==`string`&&_n(e,100)&&vn(e,1)),Mn=(e=>typeof e==`string`&&_n(e,200)&&vn(e,1)),Nn=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`id`in e&&Object.getOwnPropertyNames(e).every((e,t)=>Tn[3].test(e)||!1)&&Mn(e.id)&&(e.ref===void 0||!(`ref`in e)||On(e.ref))&&(e.label===void 0||!(`label`in e)||An(e.label))&&(e.kind===void 0||!(`kind`in e)||jn(e.kind))&&(e.set===void 0||!(`set`in e)||Pn(e.set))&&(e.container===void 0||!(`container`in e)||Mn(e.container))&&(!(typeof e==`object`&&e&&!Array.isArray(e))||`ref`in e||!(typeof e==`object`&&e&&!Array.isArray(e))||`label`in e)),Pn=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>Tn[4].test(e)||!1)&&(e.label===void 0||!(`label`in e)||An(e.label))&&(e.kind===void 0||!(`kind`in e)||jn(e.kind))&&(e.container===void 0||!(`container`in e)||Mn(e.container))&&Object.getOwnPropertyNames(e).length>=1),Fn=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`from`in e&&`to`in e&&Object.getOwnPropertyNames(e).every((e,t)=>Tn[5].test(e)||!1)&&Mn(e.from)&&Mn(e.to)&&(e.kind===void 0||!(`kind`in e)||jn(e.kind))&&(e.ref===void 0||!(`ref`in e)||On(e.ref))&&(e.label===void 0||!(`label`in e)||An(e.label))&&(e.set===void 0||!(`set`in e)||In(e.set))&&(!(typeof e==`object`&&e&&!Array.isArray(e))||`ref`in e||!(typeof e==`object`&&e&&!Array.isArray(e))||`kind`in e)),In=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>Tn[6].test(e)||!1)&&(e.kind===void 0||!(`kind`in e)||jn(e.kind))&&(e.label===void 0||!(`label`in e)||An(e.label))&&Object.getOwnPropertyNames(e).length>=1),Ln=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`id`in e&&`label`in e&&Object.getOwnPropertyNames(e).every((e,t)=>Tn[7].test(e)||!1)&&Mn(e.id)&&An(e.label)&&(e.kind===void 0||!(`kind`in e)||jn(e.kind))),Rn=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`from`in e&&`to`in e&&Object.getOwnPropertyNames(e).every((e,t)=>Tn[9].test(e)||!1)&&Mn(e.from)&&Mn(e.to)&&(e.ref===void 0||!(`ref`in e)||On(e.ref))&&(e.label===void 0||!(`label`in e)||An(e.label))&&(e.set===void 0||!(`set`in e)||zn(e.set))&&(!(typeof e==`object`&&e&&!Array.isArray(e))||`ref`in e||!(typeof e==`object`&&e&&!Array.isArray(e))||`label`in e)),zn=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>Tn[10].test(e)||!1)&&(e.label===void 0||!(`label`in e)||An(e.label))&&Object.getOwnPropertyNames(e).length>=1),Bn=(e=>Array.isArray(e)&&e.every((e,t)=>(typeof e==`string`||Number.isFinite(e)||typeof e==`boolean`||e===null)&&(typeof e!=`string`||_n(e,1e3)))&&e.length<=50);function Vn(e){return Dn(e)}En({variables:[RegExp(`(^schema$|^kind$|^target$|^removals$|^data$)`,`u`),RegExp(`(^type$|^ref$|^label$|^kind$|^from$|^to$)`,`u`),RegExp(`(^nodes$|^edges$|^containers$)`,`u`),RegExp(`(^id$|^ref$|^label$|^kind$|^set$|^container$)`,`u`),RegExp(`(^label$|^kind$|^container$)`,`u`),RegExp(`(^from$|^to$|^kind$|^ref$|^label$|^set$)`,`u`),RegExp(`(^kind$|^label$)`,`u`),RegExp(`(^id$|^label$|^kind$)`,`u`),RegExp(`(^participants$|^messages$|^containers$)`,`u`),RegExp(`(^from$|^to$|^ref$|^label$|^set$)`,`u`),RegExp(`(^label$)`,`u`),RegExp(`(^cells$|^role$)`,`u`)]});function Hn(){throw Error(`Unreachable`)}function Un(e){let t=new Set,n=e;for(;n&&n!==Object.prototype;){for(let e of Reflect.ownKeys(n))e!==`constructor`&&typeof e!=`symbol`&&t.add(e);n=Object.getPrototypeOf(n)}return[...t]}function Wn(e){return typeof e==`number`}var Gn;(function(e){e[e.Array=0]=`Array`,e[e.BigInt=1]=`BigInt`,e[e.Boolean=2]=`Boolean`,e[e.Date=3]=`Date`,e[e.Constructor=4]=`Constructor`,e[e.Function=5]=`Function`,e[e.Null=6]=`Null`,e[e.Number=7]=`Number`,e[e.Object=8]=`Object`,e[e.RegExp=9]=`RegExp`,e[e.String=10]=`String`,e[e.Symbol=11]=`Symbol`,e[e.TypeArray=12]=`TypeArray`,e[e.Undefined=13]=`Undefined`})(Gn||={});var Kn=BigInt(`14695981039346656037`),[qn,Jn]=[BigInt(`1099511628211`),BigInt(`18446744073709551616`)],Yn=Array.from({length:256}).map((e,t)=>BigInt(t)),Xn=new Float64Array(1),Zn=new DataView(Xn.buffer),Qn=new Uint8Array(Xn.buffer);function $n(e){Kn^=Yn[e],Kn=Kn*qn%Jn}function er(e){$n(Gn.Array);for(let t of e)hr(t)}function tr(e){$n(Gn.BigInt),Zn.setBigInt64(0,e);for(let e of Qn)$n(e)}function nr(e){$n(Gn.Boolean),$n(+!!e)}function rr(e){$n(Gn.Constructor),hr(e.toString())}function ir(e){$n(Gn.Date),hr(e.getTime())}function ar(e){$n(Gn.Function),hr(e.toString())}function or(e){$n(Gn.Null)}function sr(e){$n(Gn.Number),Zn.setFloat64(0,e,!0);for(let e of Qn)$n(e)}function cr(e){$n(Gn.Object);for(let t of Un(e).sort())hr(t),hr(e[t])}function lr(e){$n(Gn.RegExp),dr(e.toString())}var ur=new TextEncoder;function dr(e){$n(Gn.String);for(let t of ur.encode(e))$n(t)}function fr(e){$n(Gn.Symbol),hr(e.toString())}function pr(e){$n(Gn.TypeArray);let t=new Uint8Array(e.buffer);for(let e=0;e<t.length;e++)$n(t[e])}function mr(e){return $n(Gn.Undefined)}function hr(e){return Sn(e)?pr(e):wn(e)?ir(e):Cn(e)?lr(e):yn(e)?nr(e.valueOf()):xn(e)?dr(e.valueOf()):bn(e)?sr(e.valueOf()):Wn(e)?sr(e):on(e)?er(e):cn(e)?nr(e):sn(e)?tr(e):ln(e)?rr(e):dn(e)?or(e):fn(e)?cr(e):pn(e)?dr(e):mn(e)?fr(e):hn(e)?mr(e):un(e)?ar(e):Hn()}function gr(e){return Kn=BigInt(`14695981039346656037`),hr(e),Kn}function _r(e){return gr(e).toString(16).padStart(16,`0`)}var vr=[];function yr(e){vr=e.variables}var br=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`schema`in e&&`kind`in e&&`data`in e&&Object.getOwnPropertyNames(e).every((e,t)=>vr[0].test(e)||!1)&&e.schema===`urn:structured-exchange:2`&&(e.kind===`graph`||e.kind===`sequence`||e.kind===`table`)&&(e.profile===void 0||!(`profile`in e)||typeof e.profile==`string`&&_n(e.profile,200)&&vn(e.profile,1))&&(e.target===void 0||!(`target`in e)||typeof e.target==`object`&&e.target!==null&&!Array.isArray(e.target)&&`ref`in e.target&&Object.getOwnPropertyNames(e.target).every((e,t)=>vr[1].test(e)||!1)&&xr(e.target.ref)&&(e.target.revision===void 0||!(`revision`in e.target)||Sr(e.target.revision)))&&(e.removals===void 0||!(`removals`in e)||Array.isArray(e.removals)&&e.removals.every((e,t)=>Cr(e))&&e.removals.length<=500)&&(e.artifacts===void 0||!(`artifacts`in e)||Array.isArray(e.artifacts)&&e.artifacts.every((e,t)=>Dr(e))&&e.artifacts.length<=50)&&(e.viewpoints===void 0||!(`viewpoints`in e)||Array.isArray(e.viewpoints)&&e.viewpoints.every((e,t)=>Or(e))&&e.viewpoints.length<=20)&&[typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`nodes`in e.data&&`edges`in e.data&&Object.getOwnPropertyNames(e.data).every((e,t)=>vr[6].test(e)||!1)&&Array.isArray(e.data.nodes)&&e.data.nodes.every((e,t)=>kr(e))&&e.data.nodes.length<=500&&e.data.nodes.length>=1&&Array.isArray(e.data.edges)&&e.data.edges.every((e,t)=>Vr(e))&&e.data.edges.length<=2e3&&(e.data.containers===void 0||!(`containers`in e.data)||Array.isArray(e.data.containers)&&e.data.containers.every((e,t)=>Ur(e))&&e.data.containers.length<=50),typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`participants`in e.data&&`messages`in e.data&&Object.getOwnPropertyNames(e.data).every((e,t)=>vr[16].test(e)||!1)&&Array.isArray(e.data.participants)&&e.data.participants.every((e,t)=>kr(e))&&e.data.participants.length<=100&&e.data.participants.length>=1&&Array.isArray(e.data.messages)&&e.data.messages.every((e,t)=>Wr(e))&&e.data.messages.length<=1e3&&(e.data.containers===void 0||!(`containers`in e.data)||Array.isArray(e.data.containers)&&e.data.containers.every((e,t)=>Ur(e))&&e.data.containers.length<=50),typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`columns`in e.data&&`rows`in e.data&&Object.getOwnPropertyNames(e.data).every((e,t)=>vr[19].test(e)||!1)&&Array.isArray(e.data.columns)&&e.data.columns.every((e,t)=>typeof e==`string`&&_n(e,200)&&vn(e,1))&&e.data.columns.length<=50&&e.data.columns.length>=1&&Array.isArray(e.data.rows)&&e.data.rows.every((e,t)=>[Kr(e),qr(e),Xr(e)].reduce((e,t,n)=>t===!0?++e:e,0)===1)&&e.data.rows.length<=5e3&&(e.data.relations===void 0||!(`relations`in e.data)||Array.isArray(e.data.relations)&&e.data.relations.every((e,t)=>Zr(e))&&e.data.relations.length<=2e3)].reduce((e,t,n)=>t===!0?++e:e,0)===1),xr=(e=>typeof e==`string`&&_n(e,200)&&vn(e,1)),Sr=(e=>typeof e==`string`&&_n(e,200)&&vn(e,1)),Cr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`type`in e&&`ref`in e&&Object.getOwnPropertyNames(e).every((e,t)=>vr[2].test(e)||!1)&&(e.type===`element`||e.type===`relationship`||e.type===`row`)&&xr(e.ref)&&(e.label===void 0||!(`label`in e)||wr(e.label))&&(e.kind===void 0||!(`kind`in e)||Tr(e.kind))&&(e.from===void 0||!(`from`in e)||Er(e.from))&&(e.to===void 0||!(`to`in e)||Er(e.to))),wr=(e=>typeof e==`string`&&_n(e,500)),Tr=(e=>typeof e==`string`&&_n(e,100)&&vn(e,1)),Er=(e=>typeof e==`string`&&_n(e,200)&&vn(e,1)),Dr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`rel`in e&&`uri`in e&&`sha256`in e&&Object.getOwnPropertyNames(e).every((e,t)=>vr[3].test(e)||!1)&&typeof e.rel==`string`&&_n(e.rel,100)&&vn(e.rel,1)&&typeof e.uri==`string`&&_n(e.uri,2e3)&&vn(e.uri,1)&&typeof e.sha256==`string`&&vr[4].test(e.sha256)&&(e.mediaType===void 0||!(`mediaType`in e)||typeof e.mediaType==`string`&&_n(e.mediaType,100)&&vn(e.mediaType,1))&&(e.label===void 0||!(`label`in e)||wr(e.label))),Or=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`id`in e&&`label`in e&&`concern`in e&&Object.getOwnPropertyNames(e).every((e,t)=>vr[5].test(e)||!1)&&Er(e.id)&&typeof e.label==`string`&&_n(e.label,500)&&vn(e.label,1)&&typeof e.concern==`string`&&_n(e.concern,500)&&vn(e.concern,1)&&(e.elementKinds===void 0||!(`elementKinds`in e)||Array.isArray(e.elementKinds)&&e.elementKinds.every((e,t)=>Tr(e))&&e.elementKinds.length<=64&&e.elementKinds.length>=1&&new Set(e.elementKinds.map(_r)).size===e.elementKinds.length)&&(e.relationshipKinds===void 0||!(`relationshipKinds`in e)||Array.isArray(e.relationshipKinds)&&e.relationshipKinds.every((e,t)=>Tr(e))&&e.relationshipKinds.length<=64&&e.relationshipKinds.length>=1&&new Set(e.relationshipKinds.map(_r)).size===e.relationshipKinds.length)),kr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`id`in e&&Object.getOwnPropertyNames(e).every((e,t)=>vr[7].test(e)||!1)&&Er(e.id)&&(e.ref===void 0||!(`ref`in e)||xr(e.ref))&&(e.label===void 0||!(`label`in e)||wr(e.label))&&(e.kind===void 0||!(`kind`in e)||Tr(e.kind))&&(e.set===void 0||!(`set`in e)||Ar(e.set))&&(e.container===void 0||!(`container`in e)||Er(e.container))&&(e.attributes===void 0||!(`attributes`in e)||jr(e.attributes))&&(e.expect===void 0||!(`expect`in e)||Ir(e.expect))&&(e.locations===void 0||!(`locations`in e)||Lr(e.locations))&&(e.artifacts===void 0||!(`artifacts`in e)||Br(e.artifacts))&&(!(typeof e==`object`&&e&&!Array.isArray(e))||`ref`in e||!(typeof e==`object`&&e&&!Array.isArray(e))||`label`in e)),Ar=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>vr[8].test(e)||!1)&&(e.label===void 0||!(`label`in e)||wr(e.label))&&(e.kind===void 0||!(`kind`in e)||Tr(e.kind))&&(e.container===void 0||!(`container`in e)||Er(e.container))&&(e.attributes===void 0||!(`attributes`in e)||jr(e.attributes))&&(e.removeAttributes===void 0||!(`removeAttributes`in e)||Fr(e.removeAttributes))&&Object.getOwnPropertyNames(e).length>=1),jr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((t,n)=>vr[9].test(t)||Mr(e[t]))&&Object.getOwnPropertyNames(e).every((e,t)=>typeof e!=`string`||_n(e,200)&&vn(e,1))&&Object.getOwnPropertyNames(e).length<=50),Mr=(e=>[Nr(e),Pr(e),Array.isArray(e)&&e.every((e,t)=>[Nr(e),Pr(e)].reduce((e,t,n)=>t===!0?++e:e,0)===1)&&e.length<=50].reduce((e,t,n)=>t===!0?++e:e,0)===1),Nr=(e=>(typeof e==`string`||Number.isFinite(e)||typeof e==`boolean`||e===null)&&(typeof e!=`string`||_n(e,1e3))),Pr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`ref`in e&&Object.getOwnPropertyNames(e).length===1&&xr(e.ref)),Fr=(e=>Array.isArray(e)&&e.every((e,t)=>Er(e))&&e.length<=50),Ir=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>vr[10].test(e)||!1)&&(e.label===void 0||!(`label`in e)||wr(e.label))&&(e.kind===void 0||!(`kind`in e)||Tr(e.kind))&&(e.container===void 0||!(`container`in e)||Er(e.container))&&(e.revision===void 0||!(`revision`in e)||Sr(e.revision))&&(e.attributes===void 0||!(`attributes`in e)||jr(e.attributes))&&Object.getOwnPropertyNames(e).length>=1),Lr=(e=>Array.isArray(e)&&e.every((e,t)=>Rr(e))&&e.length<=10),Rr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`uri`in e&&Object.getOwnPropertyNames(e).every((e,t)=>vr[11].test(e)||!1)&&typeof e.uri==`string`&&_n(e.uri,2e3)&&vn(e.uri,1)&&(e.revision===void 0||!(`revision`in e)||Sr(e.revision))&&(e.range===void 0||!(`range`in e)||typeof e.range==`object`&&e.range!==null&&!Array.isArray(e.range)&&`startLine`in e.range&&`endLine`in e.range&&Object.getOwnPropertyNames(e.range).every((e,t)=>vr[12].test(e)||!1)&&zr(e.range.startLine)&&(e.range.startCharacter===void 0||!(`startCharacter`in e.range)||zr(e.range.startCharacter))&&zr(e.range.endLine)&&(e.range.endCharacter===void 0||!(`endCharacter`in e.range)||zr(e.range.endCharacter)))),zr=(e=>Number.isInteger(e)&&(!(Number.isFinite(e)||typeof e==`bigint`)||e<=1e6&&e>=0)),Br=(e=>Array.isArray(e)&&e.every((e,t)=>Dr(e))&&e.length<=20),Vr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`from`in e&&`to`in e&&Object.getOwnPropertyNames(e).every((e,t)=>vr[13].test(e)||!1)&&Er(e.from)&&Er(e.to)&&(e.kind===void 0||!(`kind`in e)||Tr(e.kind))&&(e.ref===void 0||!(`ref`in e)||xr(e.ref))&&(e.label===void 0||!(`label`in e)||wr(e.label))&&(e.set===void 0||!(`set`in e)||Hr(e.set))&&(e.attributes===void 0||!(`attributes`in e)||jr(e.attributes))&&(e.expect===void 0||!(`expect`in e)||Ir(e.expect))&&(e.locations===void 0||!(`locations`in e)||Lr(e.locations))&&(e.artifacts===void 0||!(`artifacts`in e)||Br(e.artifacts))&&(!(typeof e==`object`&&e&&!Array.isArray(e))||`ref`in e||!(typeof e==`object`&&e&&!Array.isArray(e))||`kind`in e)),Hr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>vr[14].test(e)||!1)&&(e.kind===void 0||!(`kind`in e)||Tr(e.kind))&&(e.label===void 0||!(`label`in e)||wr(e.label))&&(e.attributes===void 0||!(`attributes`in e)||jr(e.attributes))&&(e.removeAttributes===void 0||!(`removeAttributes`in e)||Fr(e.removeAttributes))&&Object.getOwnPropertyNames(e).length>=1),Ur=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`id`in e&&`label`in e&&Object.getOwnPropertyNames(e).every((e,t)=>vr[15].test(e)||!1)&&Er(e.id)&&wr(e.label)&&(e.kind===void 0||!(`kind`in e)||Tr(e.kind))),Wr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`from`in e&&`to`in e&&Object.getOwnPropertyNames(e).every((e,t)=>vr[17].test(e)||!1)&&Er(e.from)&&Er(e.to)&&(e.ref===void 0||!(`ref`in e)||xr(e.ref))&&(e.label===void 0||!(`label`in e)||wr(e.label))&&(e.set===void 0||!(`set`in e)||Gr(e.set))&&(e.attributes===void 0||!(`attributes`in e)||jr(e.attributes))&&(e.expect===void 0||!(`expect`in e)||Ir(e.expect))&&(e.locations===void 0||!(`locations`in e)||Lr(e.locations))&&(e.artifacts===void 0||!(`artifacts`in e)||Br(e.artifacts))&&(!(typeof e==`object`&&e&&!Array.isArray(e))||`ref`in e||!(typeof e==`object`&&e&&!Array.isArray(e))||`label`in e)),Gr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>vr[18].test(e)||!1)&&(e.label===void 0||!(`label`in e)||wr(e.label))&&(e.attributes===void 0||!(`attributes`in e)||jr(e.attributes))&&(e.removeAttributes===void 0||!(`removeAttributes`in e)||Fr(e.removeAttributes))&&Object.getOwnPropertyNames(e).length>=1),Kr=(e=>Array.isArray(e)&&e.every((e,t)=>(typeof e==`string`||Number.isFinite(e)||typeof e==`boolean`||e===null)&&(typeof e!=`string`||_n(e,1e3)))&&e.length<=50),qr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`cells`in e&&Object.getOwnPropertyNames(e).every((e,t)=>vr[20].test(e)||!1)&&Kr(e.cells)&&(e.role===void 0||!(`role`in e)||Jr(e.role))&&(e.id===void 0||!(`id`in e)||Er(e.id))&&(e.ref===void 0||!(`ref`in e)||xr(e.ref))&&(e.kind===void 0||!(`kind`in e)||Tr(e.kind))&&(e.label===void 0||!(`label`in e)||wr(e.label))&&(e.set===void 0||!(`set`in e)||Yr(e.set))&&(e.attributes===void 0||!(`attributes`in e)||jr(e.attributes))&&(e.expect===void 0||!(`expect`in e)||Ir(e.expect))&&(e.locations===void 0||!(`locations`in e)||Lr(e.locations))&&(e.artifacts===void 0||!(`artifacts`in e)||Br(e.artifacts))),Jr=(e=>e===`added`||e===`changed`||e===`context`||e===`removed`),Yr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>vr[21].test(e)||!1)&&(e.label===void 0||!(`label`in e)||wr(e.label))&&(e.kind===void 0||!(`kind`in e)||Tr(e.kind))&&(e.cells===void 0||!(`cells`in e)||Kr(e.cells))&&(e.attributes===void 0||!(`attributes`in e)||jr(e.attributes))&&(e.removeAttributes===void 0||!(`removeAttributes`in e)||Fr(e.removeAttributes))&&Object.getOwnPropertyNames(e).length>=1),Xr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`heading`in e&&Object.getOwnPropertyNames(e).every((e,t)=>vr[22].test(e)||!1)&&typeof e.heading==`string`&&_n(e.heading,500)&&vn(e.heading,1)&&(e.depth===void 0||!(`depth`in e)||Number.isInteger(e.depth)&&(!(Number.isFinite(e.depth)||typeof e.depth==`bigint`)||e.depth<=6&&e.depth>=1))&&(e.role===void 0||!(`role`in e)||Jr(e.role))&&(e.id===void 0||!(`id`in e)||Er(e.id))&&(e.ref===void 0||!(`ref`in e)||xr(e.ref))),Zr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`from`in e&&`to`in e&&`kind`in e&&Object.getOwnPropertyNames(e).every((e,t)=>vr[23].test(e)||!1)&&Qr(e.from)&&Qr(e.to)&&Tr(e.kind)&&(e.ref===void 0||!(`ref`in e)||xr(e.ref))&&(e.label===void 0||!(`label`in e)||wr(e.label))&&(e.attributes===void 0||!(`attributes`in e)||jr(e.attributes))),Qr=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>vr[24].test(e)||!1)&&(e.id===void 0||!(`id`in e)||Er(e.id))&&(e.ref===void 0||!(`ref`in e)||xr(e.ref))&&Object.getOwnPropertyNames(e).length>=1&&Object.getOwnPropertyNames(e).length<=1&&[!(typeof e==`object`&&e&&!Array.isArray(e))||`id`in e,!(typeof e==`object`&&e&&!Array.isArray(e))||`ref`in e].reduce((e,t,n)=>t===!0?++e:e,0)===1);function $r(e){return br(e)}yr({variables:[RegExp(`(^schema$|^kind$|^profile$|^target$|^removals$|^artifacts$|^viewpoints$|^data$)`,`u`),RegExp(`(^ref$|^revision$)`,`u`),RegExp(`(^type$|^ref$|^label$|^kind$|^from$|^to$)`,`u`),RegExp(`(^rel$|^uri$|^sha256$|^mediaType$|^label$)`,`u`),RegExp(`^sha256:[0-9a-f]{64}$`,`u`),RegExp(`(^id$|^label$|^concern$|^elementKinds$|^relationshipKinds$)`,`u`),RegExp(`(^nodes$|^edges$|^containers$)`,`u`),RegExp(`(^id$|^ref$|^label$|^kind$|^set$|^container$|^attributes$|^expect$|^locations$|^artifacts$)`,`u`),RegExp(`(^label$|^kind$|^container$|^attributes$|^removeAttributes$)`,`u`),RegExp(`(?!)`,`u`),RegExp(`(^label$|^kind$|^container$|^revision$|^attributes$)`,`u`),RegExp(`(^uri$|^revision$|^range$)`,`u`),RegExp(`(^startLine$|^startCharacter$|^endLine$|^endCharacter$)`,`u`),RegExp(`(^from$|^to$|^kind$|^ref$|^label$|^set$|^attributes$|^expect$|^locations$|^artifacts$)`,`u`),RegExp(`(^kind$|^label$|^attributes$|^removeAttributes$)`,`u`),RegExp(`(^id$|^label$|^kind$)`,`u`),RegExp(`(^participants$|^messages$|^containers$)`,`u`),RegExp(`(^from$|^to$|^ref$|^label$|^set$|^attributes$|^expect$|^locations$|^artifacts$)`,`u`),RegExp(`(^label$|^attributes$|^removeAttributes$)`,`u`),RegExp(`(^columns$|^rows$|^relations$)`,`u`),RegExp(`(^cells$|^role$|^id$|^ref$|^kind$|^label$|^set$|^attributes$|^expect$|^locations$|^artifacts$)`,`u`),RegExp(`(^label$|^kind$|^cells$|^attributes$|^removeAttributes$)`,`u`),RegExp(`(^heading$|^depth$|^role$|^id$|^ref$)`,`u`),RegExp(`(^from$|^to$|^kind$|^ref$|^label$|^attributes$)`,`u`),RegExp(`(^id$|^ref$)`,`u`)]});var ei=[];function ti(e){ei=e.variables}var ni=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`schema`in e&&`kind`in e&&`data`in e&&Object.getOwnPropertyNames(e).every((e,t)=>ei[0].test(e)||!1)&&e.schema===`urn:structured-exchange:3`&&(e.kind===`graph`||e.kind===`sequence`||e.kind===`table`||e.kind===`timeline`)&&(e.profile===void 0||!(`profile`in e)||typeof e.profile==`string`&&_n(e.profile,200)&&vn(e.profile,1))&&(e.target===void 0||!(`target`in e)||typeof e.target==`object`&&e.target!==null&&!Array.isArray(e.target)&&`ref`in e.target&&Object.getOwnPropertyNames(e.target).every((e,t)=>ei[1].test(e)||!1)&&ri(e.target.ref)&&(e.target.revision===void 0||!(`revision`in e.target)||ii(e.target.revision)))&&(e.removals===void 0||!(`removals`in e)||Array.isArray(e.removals)&&e.removals.every((e,t)=>ai(e))&&e.removals.length<=500)&&(e.artifacts===void 0||!(`artifacts`in e)||Array.isArray(e.artifacts)&&e.artifacts.every((e,t)=>li(e))&&e.artifacts.length<=50)&&(e.viewpoints===void 0||!(`viewpoints`in e)||Array.isArray(e.viewpoints)&&e.viewpoints.every((e,t)=>ui(e))&&e.viewpoints.length<=20)&&[typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`nodes`in e.data&&`edges`in e.data&&Object.getOwnPropertyNames(e.data).every((e,t)=>ei[6].test(e)||!1)&&Array.isArray(e.data.nodes)&&e.data.nodes.every((e,t)=>di(e))&&e.data.nodes.length<=500&&e.data.nodes.length>=1&&Array.isArray(e.data.edges)&&e.data.edges.every((e,t)=>Ci(e))&&e.data.edges.length<=2e3&&(e.data.containers===void 0||!(`containers`in e.data)||Array.isArray(e.data.containers)&&e.data.containers.every((e,t)=>Ti(e))&&e.data.containers.length<=50),typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`participants`in e.data&&`messages`in e.data&&Object.getOwnPropertyNames(e.data).every((e,t)=>ei[16].test(e)||!1)&&Array.isArray(e.data.participants)&&e.data.participants.every((e,t)=>di(e))&&e.data.participants.length<=100&&e.data.participants.length>=1&&Array.isArray(e.data.messages)&&e.data.messages.every((e,t)=>Ei(e))&&e.data.messages.length<=1e3&&(e.data.containers===void 0||!(`containers`in e.data)||Array.isArray(e.data.containers)&&e.data.containers.every((e,t)=>Ti(e))&&e.data.containers.length<=50),typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`columns`in e.data&&`rows`in e.data&&Object.getOwnPropertyNames(e.data).every((e,t)=>ei[19].test(e)||!1)&&Array.isArray(e.data.columns)&&e.data.columns.every((e,t)=>typeof e==`string`&&_n(e,200)&&vn(e,1))&&e.data.columns.length<=50&&e.data.columns.length>=1&&Array.isArray(e.data.rows)&&e.data.rows.every((e,t)=>[Oi(e),ki(e),Mi(e)].reduce((e,t,n)=>t===!0?++e:e,0)===1)&&e.data.rows.length<=5e3&&(e.data.relations===void 0||!(`relations`in e.data)||Array.isArray(e.data.relations)&&e.data.relations.every((e,t)=>Ni(e))&&e.data.relations.length<=2e3),typeof e.data==`object`&&e.data!==null&&!Array.isArray(e.data)&&`time`in e.data&&`rows`in e.data&&Object.getOwnPropertyNames(e.data).every((e,t)=>ei[25].test(e)||!1)&&(e.data.title===void 0||!(`title`in e.data)||oi(e.data.title))&&typeof e.data.time==`object`&&e.data.time!==null&&!Array.isArray(e.data.time)&&`start`in e.data.time&&`end`in e.data.time&&`scale`in e.data.time&&Object.getOwnPropertyNames(e.data.time).length===3&&Fi(e.data.time.start)&&Fi(e.data.time.end)&&(e.data.time.scale===`week`||e.data.time.scale===`month`||e.data.time.scale===`quarter`)&&Array.isArray(e.data.rows)&&e.data.rows.every((e,t)=>Ii(e))&&e.data.rows.length<=500&&(e.data.dependencies===void 0||!(`dependencies`in e.data)||Array.isArray(e.data.dependencies)&&e.data.dependencies.every((e,t)=>Ui(e))&&e.data.dependencies.length<=2e3)&&(e.data.comparedTo===void 0||!(`comparedTo`in e.data)||typeof e.data.comparedTo==`object`&&e.data.comparedTo!==null&&!Array.isArray(e.data.comparedTo)&&`label`in e.data.comparedTo&&Object.getOwnPropertyNames(e.data.comparedTo).every((e,t)=>ei[32].test(e)||!1)&&typeof e.data.comparedTo.label==`string`&&_n(e.data.comparedTo.label,500)&&vn(e.data.comparedTo.label,1)&&(e.data.comparedTo.date===void 0||!(`date`in e.data.comparedTo)||Fi(e.data.comparedTo.date)))&&(e.data.periods===void 0||!(`periods`in e.data)||Array.isArray(e.data.periods)&&e.data.periods.every((e,t)=>Wi(e))&&e.data.periods.length<=100)&&(e.data.references===void 0||!(`references`in e.data)||Array.isArray(e.data.references)&&e.data.references.every((e,t)=>Gi(e))&&e.data.references.length<=50)].reduce((e,t,n)=>t===!0?++e:e,0)===1),ri=(e=>typeof e==`string`&&_n(e,200)&&vn(e,1)),ii=(e=>typeof e==`string`&&_n(e,200)&&vn(e,1)),ai=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`type`in e&&`ref`in e&&Object.getOwnPropertyNames(e).every((e,t)=>ei[2].test(e)||!1)&&(e.type===`element`||e.type===`relationship`||e.type===`row`)&&ri(e.ref)&&(e.label===void 0||!(`label`in e)||oi(e.label))&&(e.kind===void 0||!(`kind`in e)||si(e.kind))&&(e.from===void 0||!(`from`in e)||ci(e.from))&&(e.to===void 0||!(`to`in e)||ci(e.to))),oi=(e=>typeof e==`string`&&_n(e,500)),si=(e=>typeof e==`string`&&_n(e,100)&&vn(e,1)),ci=(e=>typeof e==`string`&&_n(e,200)&&vn(e,1)),li=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`rel`in e&&`uri`in e&&`sha256`in e&&Object.getOwnPropertyNames(e).every((e,t)=>ei[3].test(e)||!1)&&typeof e.rel==`string`&&_n(e.rel,100)&&vn(e.rel,1)&&typeof e.uri==`string`&&_n(e.uri,2e3)&&vn(e.uri,1)&&typeof e.sha256==`string`&&ei[4].test(e.sha256)&&(e.mediaType===void 0||!(`mediaType`in e)||typeof e.mediaType==`string`&&_n(e.mediaType,100)&&vn(e.mediaType,1))&&(e.label===void 0||!(`label`in e)||oi(e.label))),ui=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`id`in e&&`label`in e&&`concern`in e&&Object.getOwnPropertyNames(e).every((e,t)=>ei[5].test(e)||!1)&&ci(e.id)&&typeof e.label==`string`&&_n(e.label,500)&&vn(e.label,1)&&typeof e.concern==`string`&&_n(e.concern,500)&&vn(e.concern,1)&&(e.elementKinds===void 0||!(`elementKinds`in e)||Array.isArray(e.elementKinds)&&e.elementKinds.every((e,t)=>si(e))&&e.elementKinds.length<=64&&e.elementKinds.length>=1&&new Set(e.elementKinds.map(_r)).size===e.elementKinds.length)&&(e.relationshipKinds===void 0||!(`relationshipKinds`in e)||Array.isArray(e.relationshipKinds)&&e.relationshipKinds.every((e,t)=>si(e))&&e.relationshipKinds.length<=64&&e.relationshipKinds.length>=1&&new Set(e.relationshipKinds.map(_r)).size===e.relationshipKinds.length)),di=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`id`in e&&Object.getOwnPropertyNames(e).every((e,t)=>ei[7].test(e)||!1)&&ci(e.id)&&(e.ref===void 0||!(`ref`in e)||ri(e.ref))&&(e.label===void 0||!(`label`in e)||oi(e.label))&&(e.kind===void 0||!(`kind`in e)||si(e.kind))&&(e.set===void 0||!(`set`in e)||fi(e.set))&&(e.container===void 0||!(`container`in e)||ci(e.container))&&(e.attributes===void 0||!(`attributes`in e)||pi(e.attributes))&&(e.expect===void 0||!(`expect`in e)||vi(e.expect))&&(e.locations===void 0||!(`locations`in e)||yi(e.locations))&&(e.artifacts===void 0||!(`artifacts`in e)||Si(e.artifacts))&&(!(typeof e==`object`&&e&&!Array.isArray(e))||`ref`in e||!(typeof e==`object`&&e&&!Array.isArray(e))||`label`in e)),fi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>ei[8].test(e)||!1)&&(e.label===void 0||!(`label`in e)||oi(e.label))&&(e.kind===void 0||!(`kind`in e)||si(e.kind))&&(e.container===void 0||!(`container`in e)||ci(e.container))&&(e.attributes===void 0||!(`attributes`in e)||pi(e.attributes))&&(e.removeAttributes===void 0||!(`removeAttributes`in e)||_i(e.removeAttributes))&&Object.getOwnPropertyNames(e).length>=1),pi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((t,n)=>ei[9].test(t)||mi(e[t]))&&Object.getOwnPropertyNames(e).every((e,t)=>typeof e!=`string`||_n(e,200)&&vn(e,1))&&Object.getOwnPropertyNames(e).length<=50),mi=(e=>[hi(e),gi(e),Array.isArray(e)&&e.every((e,t)=>[hi(e),gi(e)].reduce((e,t,n)=>t===!0?++e:e,0)===1)&&e.length<=50].reduce((e,t,n)=>t===!0?++e:e,0)===1),hi=(e=>(typeof e==`string`||Number.isFinite(e)||typeof e==`boolean`||e===null)&&(typeof e!=`string`||_n(e,1e3))),gi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`ref`in e&&Object.getOwnPropertyNames(e).length===1&&ri(e.ref)),_i=(e=>Array.isArray(e)&&e.every((e,t)=>ci(e))&&e.length<=50),vi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>ei[10].test(e)||!1)&&(e.label===void 0||!(`label`in e)||oi(e.label))&&(e.kind===void 0||!(`kind`in e)||si(e.kind))&&(e.container===void 0||!(`container`in e)||ci(e.container))&&(e.revision===void 0||!(`revision`in e)||ii(e.revision))&&(e.attributes===void 0||!(`attributes`in e)||pi(e.attributes))&&Object.getOwnPropertyNames(e).length>=1),yi=(e=>Array.isArray(e)&&e.every((e,t)=>bi(e))&&e.length<=10),bi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`uri`in e&&Object.getOwnPropertyNames(e).every((e,t)=>ei[11].test(e)||!1)&&typeof e.uri==`string`&&_n(e.uri,2e3)&&vn(e.uri,1)&&(e.revision===void 0||!(`revision`in e)||ii(e.revision))&&(e.range===void 0||!(`range`in e)||typeof e.range==`object`&&e.range!==null&&!Array.isArray(e.range)&&`startLine`in e.range&&`endLine`in e.range&&Object.getOwnPropertyNames(e.range).every((e,t)=>ei[12].test(e)||!1)&&xi(e.range.startLine)&&(e.range.startCharacter===void 0||!(`startCharacter`in e.range)||xi(e.range.startCharacter))&&xi(e.range.endLine)&&(e.range.endCharacter===void 0||!(`endCharacter`in e.range)||xi(e.range.endCharacter)))),xi=(e=>Number.isInteger(e)&&(!(Number.isFinite(e)||typeof e==`bigint`)||e<=1e6&&e>=0)),Si=(e=>Array.isArray(e)&&e.every((e,t)=>li(e))&&e.length<=20),Ci=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`from`in e&&`to`in e&&Object.getOwnPropertyNames(e).every((e,t)=>ei[13].test(e)||!1)&&ci(e.from)&&ci(e.to)&&(e.kind===void 0||!(`kind`in e)||si(e.kind))&&(e.ref===void 0||!(`ref`in e)||ri(e.ref))&&(e.label===void 0||!(`label`in e)||oi(e.label))&&(e.set===void 0||!(`set`in e)||wi(e.set))&&(e.attributes===void 0||!(`attributes`in e)||pi(e.attributes))&&(e.expect===void 0||!(`expect`in e)||vi(e.expect))&&(e.locations===void 0||!(`locations`in e)||yi(e.locations))&&(e.artifacts===void 0||!(`artifacts`in e)||Si(e.artifacts))&&(!(typeof e==`object`&&e&&!Array.isArray(e))||`ref`in e||!(typeof e==`object`&&e&&!Array.isArray(e))||`kind`in e)),wi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>ei[14].test(e)||!1)&&(e.kind===void 0||!(`kind`in e)||si(e.kind))&&(e.label===void 0||!(`label`in e)||oi(e.label))&&(e.attributes===void 0||!(`attributes`in e)||pi(e.attributes))&&(e.removeAttributes===void 0||!(`removeAttributes`in e)||_i(e.removeAttributes))&&Object.getOwnPropertyNames(e).length>=1),Ti=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`id`in e&&`label`in e&&Object.getOwnPropertyNames(e).every((e,t)=>ei[15].test(e)||!1)&&ci(e.id)&&oi(e.label)&&(e.kind===void 0||!(`kind`in e)||si(e.kind))),Ei=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`from`in e&&`to`in e&&Object.getOwnPropertyNames(e).every((e,t)=>ei[17].test(e)||!1)&&ci(e.from)&&ci(e.to)&&(e.ref===void 0||!(`ref`in e)||ri(e.ref))&&(e.label===void 0||!(`label`in e)||oi(e.label))&&(e.set===void 0||!(`set`in e)||Di(e.set))&&(e.attributes===void 0||!(`attributes`in e)||pi(e.attributes))&&(e.expect===void 0||!(`expect`in e)||vi(e.expect))&&(e.locations===void 0||!(`locations`in e)||yi(e.locations))&&(e.artifacts===void 0||!(`artifacts`in e)||Si(e.artifacts))&&(!(typeof e==`object`&&e&&!Array.isArray(e))||`ref`in e||!(typeof e==`object`&&e&&!Array.isArray(e))||`label`in e)),Di=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>ei[18].test(e)||!1)&&(e.label===void 0||!(`label`in e)||oi(e.label))&&(e.attributes===void 0||!(`attributes`in e)||pi(e.attributes))&&(e.removeAttributes===void 0||!(`removeAttributes`in e)||_i(e.removeAttributes))&&Object.getOwnPropertyNames(e).length>=1),Oi=(e=>Array.isArray(e)&&e.every((e,t)=>(typeof e==`string`||Number.isFinite(e)||typeof e==`boolean`||e===null)&&(typeof e!=`string`||_n(e,1e3)))&&e.length<=50),ki=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`cells`in e&&Object.getOwnPropertyNames(e).every((e,t)=>ei[20].test(e)||!1)&&Oi(e.cells)&&(e.role===void 0||!(`role`in e)||Ai(e.role))&&(e.id===void 0||!(`id`in e)||ci(e.id))&&(e.ref===void 0||!(`ref`in e)||ri(e.ref))&&(e.kind===void 0||!(`kind`in e)||si(e.kind))&&(e.label===void 0||!(`label`in e)||oi(e.label))&&(e.set===void 0||!(`set`in e)||ji(e.set))&&(e.attributes===void 0||!(`attributes`in e)||pi(e.attributes))&&(e.expect===void 0||!(`expect`in e)||vi(e.expect))&&(e.locations===void 0||!(`locations`in e)||yi(e.locations))&&(e.artifacts===void 0||!(`artifacts`in e)||Si(e.artifacts))),Ai=(e=>e===`added`||e===`changed`||e===`context`||e===`removed`),ji=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>ei[21].test(e)||!1)&&(e.label===void 0||!(`label`in e)||oi(e.label))&&(e.kind===void 0||!(`kind`in e)||si(e.kind))&&(e.cells===void 0||!(`cells`in e)||Oi(e.cells))&&(e.attributes===void 0||!(`attributes`in e)||pi(e.attributes))&&(e.removeAttributes===void 0||!(`removeAttributes`in e)||_i(e.removeAttributes))&&Object.getOwnPropertyNames(e).length>=1),Mi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`heading`in e&&Object.getOwnPropertyNames(e).every((e,t)=>ei[22].test(e)||!1)&&typeof e.heading==`string`&&_n(e.heading,500)&&vn(e.heading,1)&&(e.depth===void 0||!(`depth`in e)||Number.isInteger(e.depth)&&(!(Number.isFinite(e.depth)||typeof e.depth==`bigint`)||e.depth<=6&&e.depth>=1))&&(e.role===void 0||!(`role`in e)||Ai(e.role))&&(e.id===void 0||!(`id`in e)||ci(e.id))&&(e.ref===void 0||!(`ref`in e)||ri(e.ref))),Ni=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`from`in e&&`to`in e&&`kind`in e&&Object.getOwnPropertyNames(e).every((e,t)=>ei[23].test(e)||!1)&&Pi(e.from)&&Pi(e.to)&&si(e.kind)&&(e.ref===void 0||!(`ref`in e)||ri(e.ref))&&(e.label===void 0||!(`label`in e)||oi(e.label))&&(e.attributes===void 0||!(`attributes`in e)||pi(e.attributes))),Pi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.getOwnPropertyNames(e).every((e,t)=>ei[24].test(e)||!1)&&(e.id===void 0||!(`id`in e)||ci(e.id))&&(e.ref===void 0||!(`ref`in e)||ri(e.ref))&&Object.getOwnPropertyNames(e).length>=1&&Object.getOwnPropertyNames(e).length<=1&&[!(typeof e==`object`&&e&&!Array.isArray(e))||`id`in e,!(typeof e==`object`&&e&&!Array.isArray(e))||`ref`in e].reduce((e,t,n)=>t===!0?++e:e,0)===1),Fi=(e=>typeof e==`string`&&ei[26].test(e)),Ii=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`type`in e&&(e.type===`task`||e.type===`separator`)&&(!(typeof e==`object`&&e&&!Array.isArray(e))||e.type===void 0||!(`type`in e)||e.type===`task`?Li(e):!0)&&(!(typeof e==`object`&&e&&!Array.isArray(e))||e.type===void 0||!(`type`in e)||e.type===`separator`?Hi(e):!0)),Li=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`type`in e&&`id`in e&&`label`in e&&`items`in e&&Object.getOwnPropertyNames(e).every((e,t)=>ei[27].test(e)||!1)&&e.type===`task`&&ci(e.id)&&oi(e.label)&&Array.isArray(e.items)&&e.items.every((e,t)=>Ri(e))&&e.items.length<=100&&(e.role===void 0||!(`role`in e)||Bi(e.role))),Ri=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`type`in e&&(e.type===`activity`||e.type===`milestone`)&&(!(typeof e==`object`&&e&&!Array.isArray(e))||e.type===void 0||!(`type`in e)||e.type===`activity`?zi(e):!0)&&(!(typeof e==`object`&&e&&!Array.isArray(e))||e.type===void 0||!(`type`in e)||e.type===`milestone`?Vi(e):!0)),zi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`type`in e&&`start`in e&&`end`in e&&Object.getOwnPropertyNames(e).every((e,t)=>ei[28].test(e)||!1)&&e.type===`activity`&&Fi(e.start)&&Fi(e.end)&&(e.id===void 0||!(`id`in e)||ci(e.id))&&(e.label===void 0||!(`label`in e)||oi(e.label))&&(e.kind===void 0||!(`kind`in e)||si(e.kind))&&(e.previous===void 0||!(`previous`in e)||typeof e.previous==`object`&&e.previous!==null&&!Array.isArray(e.previous)&&`start`in e.previous&&`end`in e.previous&&Object.getOwnPropertyNames(e.previous).length===2&&Fi(e.previous.start)&&Fi(e.previous.end))&&(e.role===void 0||!(`role`in e)||Bi(e.role))),Bi=(e=>e===`added`||e===`removed`),Vi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`type`in e&&`date`in e&&Object.getOwnPropertyNames(e).every((e,t)=>ei[29].test(e)||!1)&&e.type===`milestone`&&Fi(e.date)&&(e.id===void 0||!(`id`in e)||ci(e.id))&&(e.label===void 0||!(`label`in e)||oi(e.label))&&(e.kind===void 0||!(`kind`in e)||si(e.kind))&&(e.previous===void 0||!(`previous`in e)||typeof e.previous==`object`&&e.previous!==null&&!Array.isArray(e.previous)&&`date`in e.previous&&Object.getOwnPropertyNames(e.previous).length===1&&Fi(e.previous.date))&&(e.role===void 0||!(`role`in e)||Bi(e.role))),Hi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`type`in e&&Object.getOwnPropertyNames(e).every((e,t)=>ei[30].test(e)||!1)&&e.type===`separator`&&(e.label===void 0||!(`label`in e)||oi(e.label))),Ui=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`from`in e&&`to`in e&&Object.getOwnPropertyNames(e).every((e,t)=>ei[31].test(e)||!1)&&ci(e.from)&&ci(e.to)&&(e.type===void 0||!(`type`in e)||e.type===`finish-to-start`||e.type===`start-to-start`||e.type===`finish-to-finish`||e.type===`start-to-finish`)),Wi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`start`in e&&`end`in e&&Object.getOwnPropertyNames(e).every((e,t)=>ei[33].test(e)||!1)&&Fi(e.start)&&Fi(e.end)&&(e.label===void 0||!(`label`in e)||oi(e.label))&&(e.kind===void 0||!(`kind`in e)||si(e.kind))),Gi=(e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`date`in e&&`label`in e&&Object.getOwnPropertyNames(e).every((e,t)=>ei[34].test(e)||!1)&&Fi(e.date)&&typeof e.label==`string`&&_n(e.label,500)&&vn(e.label,1)&&(e.kind===void 0||!(`kind`in e)||si(e.kind)));function Ki(e){return ni(e)}ti({variables:[RegExp(`(^schema$|^kind$|^profile$|^target$|^removals$|^artifacts$|^viewpoints$|^data$)`,`u`),RegExp(`(^ref$|^revision$)`,`u`),RegExp(`(^type$|^ref$|^label$|^kind$|^from$|^to$)`,`u`),RegExp(`(^rel$|^uri$|^sha256$|^mediaType$|^label$)`,`u`),RegExp(`^sha256:[0-9a-f]{64}$`,`u`),RegExp(`(^id$|^label$|^concern$|^elementKinds$|^relationshipKinds$)`,`u`),RegExp(`(^nodes$|^edges$|^containers$)`,`u`),RegExp(`(^id$|^ref$|^label$|^kind$|^set$|^container$|^attributes$|^expect$|^locations$|^artifacts$)`,`u`),RegExp(`(^label$|^kind$|^container$|^attributes$|^removeAttributes$)`,`u`),RegExp(`(?!)`,`u`),RegExp(`(^label$|^kind$|^container$|^revision$|^attributes$)`,`u`),RegExp(`(^uri$|^revision$|^range$)`,`u`),RegExp(`(^startLine$|^startCharacter$|^endLine$|^endCharacter$)`,`u`),RegExp(`(^from$|^to$|^kind$|^ref$|^label$|^set$|^attributes$|^expect$|^locations$|^artifacts$)`,`u`),RegExp(`(^kind$|^label$|^attributes$|^removeAttributes$)`,`u`),RegExp(`(^id$|^label$|^kind$)`,`u`),RegExp(`(^participants$|^messages$|^containers$)`,`u`),RegExp(`(^from$|^to$|^ref$|^label$|^set$|^attributes$|^expect$|^locations$|^artifacts$)`,`u`),RegExp(`(^label$|^attributes$|^removeAttributes$)`,`u`),RegExp(`(^columns$|^rows$|^relations$)`,`u`),RegExp(`(^cells$|^role$|^id$|^ref$|^kind$|^label$|^set$|^attributes$|^expect$|^locations$|^artifacts$)`,`u`),RegExp(`(^label$|^kind$|^cells$|^attributes$|^removeAttributes$)`,`u`),RegExp(`(^heading$|^depth$|^role$|^id$|^ref$)`,`u`),RegExp(`(^from$|^to$|^kind$|^ref$|^label$|^attributes$)`,`u`),RegExp(`(^id$|^ref$)`,`u`),RegExp(`(^title$|^time$|^rows$|^dependencies$|^comparedTo$|^periods$|^references$)`,`u`),RegExp(`^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$`,`u`),RegExp(`(^type$|^id$|^label$|^items$|^role$)`,`u`),RegExp(`(^type$|^start$|^end$|^id$|^label$|^kind$|^previous$|^role$)`,`u`),RegExp(`(^type$|^date$|^id$|^label$|^kind$|^previous$|^role$)`,`u`),RegExp(`(^type$|^label$)`,`u`),RegExp(`(^from$|^to$|^type$)`,`u`),RegExp(`(^label$|^date$)`,`u`),RegExp(`(^start$|^end$|^label$|^kind$)`,`u`),RegExp(`(^date$|^label$|^kind$)`,`u`)]});var qi={[oe]:Vn,[fe]:$r,[he]:Ki},Ji=e=>{let t=Ht(e),n=_e(t);return n===void 0&&t!==void 0?[{rule:`unsupported-version`,path:`/schema`,message:`this build validates ${ge.join(` and `)}`}]:qi[n??`urn:structured-exchange:1`](e)?[]:[{rule:`schema/invalid`,path:``,message:`does not conform to the published structured-exchange schema`}]},Yi=Object.defineProperty,Xi=(e,t,n)=>t in e?Yi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zi=(e,t)=>{for(var n in t)Yi(e,n,{get:t[n],enumerable:!0})},Qi=(e,t,n)=>Xi(e,typeof t==`symbol`?t:t+``,n),$i={};Zi($i,{Graph:()=>Ra,alg:()=>fa});var ea=Object.defineProperty,ta=(e,t)=>{for(var n in t)ea(e,n,{get:t[n],enumerable:!0})},na=class{constructor(e){this._isDirected=!0,this._isMultigraph=!1,this._isCompound=!1,this._nodes={},this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={},this._nodeCount=0,this._edgeCount=0,this._defaultNodeLabelFn=()=>{},this._defaultEdgeLabelFn=()=>{},e&&(this._isDirected=`directed`in e?e.directed:!0,this._isMultigraph=`multigraph`in e&&e.multigraph,this._isCompound=`compound`in e&&e.compound),this._isCompound&&(this._parent={},this._children={},this._children[`\0`]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=typeof e==`function`?e:()=>e,this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){return this.nodes().filter(e=>Object.keys(this._in[e]).length===0)}sinks(){return this.nodes().filter(e=>Object.keys(this._out[e]).length===0)}setNodes(e,t){return e.forEach(e=>{t===void 0?this.setNode(e):this.setNode(e,t)}),this}setNode(e,t){return e in this._nodes?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=`\0`,this._children[e]={},this._children[`\0`][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return e in this._nodes}removeNode(e){if(e in this._nodes){let t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(e=>{this.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(t),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(t===void 0)t=`\0`;else{t+=``;for(let n=t;n!==void 0;n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}parent(e){if(this._isCompound){let t=this._parent[e];if(t!==`\0`)return t}}children(e=`\0`){if(this._isCompound){let t=this._children[e];if(t)return Object.keys(t)}else{if(e===`\0`)return this.nodes();if(this.hasNode(e))return[]}return[]}predecessors(e){let t=this._preds[e];if(t)return Object.keys(t)}successors(e){let t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){let t=this.predecessors(e);if(t){let n=new Set(t),r=this.successors(e);if(r)for(let e of r)n.add(e);return Array.from(n.values())}}isLeaf(e){let t;return t=this.isDirected()?this.successors(e):this.neighbors(e),(t?.length??0)===0}filterNodes(e){let t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph()),Object.entries(this._nodes).forEach(([n,r])=>{e(n)&&t.setNode(n,r)}),Object.values(this._edgeObjs).forEach(e=>{t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,this.edge(e))});let n={},r=e=>{let i=this.parent(e);return!i||t.hasNode(i)?(n[e]=i,i):i in n?n[i]:r(i)};return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,r(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=typeof e==`function`?e:()=>e,this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){return e.reduce((e,n)=>(t===void 0?this.setEdge(e,n):this.setEdge(e,n,t),n)),this}setEdge(e,t,n,r){let i,a,o,s,c=!1;typeof e==`object`&&e&&`v`in e?(i=e.v,a=e.w,o=e.name,arguments.length===2&&(s=t,c=!0)):(i=e,a=t,o=r,arguments.length>2&&(s=n,c=!0)),i=``+i,a=``+a,o!==void 0&&(o=``+o);let l=aa(this._isDirected,i,a,o);if(l in this._edgeLabels)return c&&(this._edgeLabels[l]=s),this;if(o!==void 0&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(i),this.setNode(a),this._edgeLabels[l]=c?s:this._defaultEdgeLabelFn(i,a,o);let u=oa(this._isDirected,i,a,o);return i=u.v,a=u.w,Object.freeze(u),this._edgeObjs[l]=u,ra(this._preds[a],i),ra(this._sucs[i],a),this._in[a][l]=u,this._out[i][l]=u,this._edgeCount++,this}edge(e,t,n){let r=arguments.length===1?sa(this._isDirected,e):aa(this._isDirected,e,t,n);return this._edgeLabels[r]}edgeAsObj(e,t,n){let r=arguments.length===1?this.edge(e):this.edge(e,t,n);return typeof r!=`object`||!r?{label:r}:r}hasEdge(e,t,n){return(arguments.length===1?sa(this._isDirected,e):aa(this._isDirected,e,t,n))in this._edgeLabels}removeEdge(e,t,n){let r=arguments.length===1?sa(this._isDirected,e):aa(this._isDirected,e,t,n),i=this._edgeObjs[r];if(i){let e=i.v,t=i.w;delete this._edgeLabels[r],delete this._edgeObjs[r],ia(this._preds[t],e),ia(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--}return this}inEdges(e,t){return this.isDirected()?this.filterEdges(this._in[e],e,t):this.nodeEdges(e,t)}outEdges(e,t){return this.isDirected()?this.filterEdges(this._out[e],e,t):this.nodeEdges(e,t)}nodeEdges(e,t){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,t)}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}filterEdges(e,t,n){if(!e)return;let r=Object.values(e);return n?r.filter(e=>e.v===t&&e.w===n||e.v===n&&e.w===t):r}};function ra(e,t){e[t]?e[t]++:e[t]=1}function ia(e,t){e[t]!==void 0&&!--e[t]&&delete e[t]}function aa(e,t,n,r){let i=``+t,a=``+n;if(!e&&i>a){let e=i;i=a,a=e}return i+``+a+``+(r===void 0?`\0`:r)}function oa(e,t,n,r){let i=``+t,a=``+n;if(!e&&i>a){let e=i;i=a,a=e}let o={v:i,w:a};return r&&(o.name=r),o}function sa(e,t){return aa(e,t.v,t.w,t.name)}ta({},{read:()=>da,write:()=>ca});function ca(e){let t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:la(e),edges:ua(e)},n=e.graph();return n!==void 0&&(t.value=structuredClone(n)),t}function la(e){return e.nodes().map(t=>{let n=e.node(t),r=e.parent(t),i={v:t};return n!==void 0&&(i.value=n),r!==void 0&&(i.parent=r),i})}function ua(e){return e.edges().map(t=>{let n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function da(e){let t=new na(e.options);return e.value!==void 0&&t.setGraph(e.value),e.nodes.forEach(e=>{t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(e=>{t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}var fa={};ta(fa,{CycleException:()=>Da,bellmanFord:()=>ma,components:()=>ga,dijkstra:()=>ya,dijkstraAll:()=>xa,findCycles:()=>Ca,floydWarshall:()=>Ta,isAcyclic:()=>ka,postorder:()=>Na,preorder:()=>Pa,prim:()=>Fa,shortestPaths:()=>Ia,tarjan:()=>Sa,topsort:()=>Oa});var pa=()=>1;function ma(e,t,n,r){return ha(e,String(t),n||pa,r||function(t){return e.outEdges(t)??[]})}function ha(e,t,n,r){let i={},a,o=0,s=e.nodes(),c=function(e){let t=i[e.v],r=i[e.w];if(!t||!r)return;let o=n(e);t.distance+o<r.distance&&(i[e.w]={distance:t.distance+o,predecessor:e.v},a=!0)},l=function(){s.forEach(function(e){r(e).forEach(function(t){let n=t.v===e?t.v:t.w,r=n===t.v?t.w:t.v;c({v:n,w:r})})})};s.forEach(function(e){i[e]={distance:e===t?0:1/0,predecessor:``}});let u=s.length;for(let e=1;e<u&&(a=!1,o++,l(),a);e++);if(o===u-1&&(a=!1,l(),a))throw Error(`The graph contains a negative weight cycle`);return i}function ga(e){let t={},n=[],r;function i(n){var a,o;n in t||(t[n]=!0,r.push(n),(a=e.successors(n))==null||a.forEach(i),(o=e.predecessors(n))==null||o.forEach(i))}return e.nodes().forEach(function(e){r=[],i(e),r.length&&n.push(r)}),n}var _a=class{constructor(){this._arr=[],this._keyIndices={}}size(){return this._arr.length}keys(){return this._arr.map(e=>e.key)}has(e){return e in this._keyIndices}priority(e){let t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw Error(`Queue underflow`);return this._arr[0].key}add(e,t){let n=this._keyIndices,r=String(e);if(!(r in n)){let e=this._arr,i=e.length;return n[r]=i,e.push({key:r,priority:t}),this._decrease(i),!0}return!1}removeMin(){if(this.size()===0)throw Error(`Queue underflow`);this._swap(0,this._arr.length-1);let e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){let n=this._keyIndices[e];if(n===void 0)throw Error(`Key not found: ${e}`);let r=this._arr[n].priority;if(t>r)throw Error(`New priority is greater than current priority. Key: ${e} Old: ${r} New: ${t}`);this._arr[n].priority=t,this._decrease(n)}_heapify(e){let t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))}_decrease(e){let t=this._arr,n=t[e].priority,r;for(;e!==0&&(r=e>>1,!(t[r].priority<n));)this._swap(e,r),e=r}_swap(e,t){let n=this._arr,r=this._keyIndices,i=n[e],a=n[t];n[e]=a,n[t]=i,r[a.key]=e,r[i.key]=t}},va=()=>1;function ya(e,t,n,r){return ba(e,String(t),n||va,r||function(t){return e.outEdges(t)??[]})}function ba(e,t,n,r){let i={},a=new _a,o,s,c=function(e){let t=e.v===o?e.w:e.v,r=i[t];if(!r)return;let c=n(e),l=s.distance+c;if(c<0)throw Error(`dijkstra does not allow negative edge weights. Bad edge: `+e+` Weight: `+c);l<r.distance&&(r.distance=l,r.predecessor=o,a.decrease(t,l))};for(e.nodes().forEach(function(e){let n=e===t?0:1/0;i[e]={distance:n,predecessor:``},a.add(e,n)});a.size()>0;){o=a.removeMin();let e=i[o];if(!e||e.distance===1/0)break;s=e,r(o).forEach(c)}return i}function xa(e,t,n){return e.nodes().reduce(function(r,i){return r[i]=ya(e,i,t,n),r},{})}function Sa(e){let t=0,n=[],r={},i=[];function a(o){var s;let c=r[o]={onStack:!0,lowlink:t,index:t++};if(n.push(o),(s=e.successors(o))==null||s.forEach(function(e){if(e in r){let t=r[e];t!=null&&t.onStack&&(c.lowlink=Math.min(c.lowlink,t.index))}else{a(e);let t=r[e];t&&(c.lowlink=Math.min(c.lowlink,t.lowlink))}}),c.lowlink===c.index){let e=[],t;do{t=n.pop();let i=r[t];i&&(i.onStack=!1),e.push(t)}while(o!==t);i.push(e)}}return e.nodes().forEach(function(e){e in r||a(e)}),i}function Ca(e){return Sa(e).filter(function(t){let n=t[0];return n?t.length>1||t.length===1&&(e.outEdges(n,n)??[]).length>0:!1})}var wa=()=>1;function Ta(e,t,n){return Ea(e,t||wa,n||function(t){return e.outEdges(t)??[]})}function Ea(e,t,n){let r={},i=e.nodes();return i.forEach(function(e){let a={};r[e]=a,a[e]={distance:0,predecessor:``},i.forEach(function(t){e!==t&&(a[t]={distance:1/0,predecessor:``})}),n(e).forEach(function(n){let r=n.v===e?n.w:n.v,i=t(n);a[r]={distance:i,predecessor:e}})}),i.forEach(function(e){let t=r[e];t&&i.forEach(function(n){let a=r[n];a&&i.forEach(function(n){let r=a[e],i=t[n],o=a[n];if(r&&i&&o){let e=r.distance+i.distance;e<o.distance&&(o.distance=e,o.predecessor=i.predecessor)}})})}),r}var Da=class extends Error{constructor(e){super(e),this.name=`CycleException`}};function Oa(e){let t={},n={},r=[];function i(a){var o;if(a in n)throw new Da;a in t||(n[a]=!0,t[a]=!0,(o=e.predecessors(a))==null||o.forEach(i),delete n[a],r.push(a))}if(e.sinks().forEach(i),Object.keys(t).length!==e.nodeCount())throw new Da;return r}function ka(e){try{Oa(e)}catch(e){if(e instanceof Da)return!1;throw e}return!0}function Aa(e,t,n,r,i){Array.isArray(t)||(t=[t]);let a=(t=>(e.isDirected()?e.successors(t):e.neighbors(t))??[]),o={};return t.forEach(function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);i=ja(e,t,n===`post`,o,a,r,i)}),i}function ja(e,t,n,r,i,a,o){return t in r||(r[t]=!0,n||(o=a(o,t)),i(t).forEach(function(t){o=ja(e,t,n,r,i,a,o)}),n&&(o=a(o,t))),o}function Ma(e,t,n){return Aa(e,t,n,function(e,t){return e.push(t),e},[])}function Na(e,t){return Ma(e,t,`post`)}function Pa(e,t){return Ma(e,t,`pre`)}function Fa(e,t){var n;let r=new na,i={},a=new _a,o;function s(e){let n=e.v===o?e.w:e.v,r=a.priority(n);if(r!==void 0){let s=t(e);s<r&&(i[n]=o,a.decrease(n,s))}}if(e.nodeCount()===0)return r;e.nodes().forEach(function(e){a.add(e,1/0),r.setNode(e)});let c=e.nodes()[0];c!==void 0&&a.decrease(c,0);let l=!1;for(;a.size()>0;){if(o=a.removeMin(),o in i)r.setEdge(o,i[o]);else{if(l)throw Error(`Input graph is not connected: `+e);l=!0}(n=e.nodeEdges(o))==null||n.forEach(s)}return r}function Ia(e,t,n,r){return La(e,t,n,r??(t=>e.outEdges(t)??[]))}function La(e,t,n,r){if(n===void 0)return ya(e,t,n,r);let i=!1,a=e.nodes();for(let o=0;o<a.length;o++){let s=a[o];if(s===void 0)continue;let c=r(s);for(let e=0;e<c.length;e++){let t=c[e];if(!t)continue;let r=t.v===s?t.v:t.w;n({v:r,w:r===t.v?t.w:t.v})<0&&(i=!0)}if(i)return ma(e,t,n,r)}return ya(e,t,n,r)}var Ra=na;function za(e,t,n,r){let i=r;for(;e.hasNode(i);)i=to(r);return n.dummy=t,e.setNode(i,n),i}function Ba(e){let t=new Ra().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function Va(e){let t=new Ra({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function Ha(e,t){let n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);let c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function Ua(e){let t=no(Xa(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),i=r.rank;i!==void 0&&(t[i]||(t[i]=[]),t[i][r.order]=n)}),t}function Wa(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MAX_VALUE:n}),n=Ya(Math.min,t);e.nodes().forEach(t=>{let r=e.node(t);Object.hasOwn(r,`rank`)&&(r.rank-=n)})}function Ga(e){let t=e.nodes().map(t=>e.node(t).rank).filter(e=>e!==void 0),n=Ya(Math.min,t),r=[];e.nodes().forEach(t=>{let i=e.node(t).rank-n;r[i]||(r[i]=[]),r[i].push(t)});let i=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((t,n)=>{t===void 0&&n%a!==0?--i:t!==void 0&&i&&t.forEach(t=>e.node(t).rank+=i)})}function Ka(e,t,n,r){let i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),za(e,`border`,i,t)}function qa(e,t=Ja){let n=[];for(let r=0;r<e.length;r+=t){let i=e.slice(r,r+t);n.push(i)}return n}var Ja=65535;function Ya(e,t){return t.length>Ja?e(...qa(t).map(t=>e(...t))):e(...t)}function Xa(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MIN_VALUE:n});return Ya(Math.max,t)}function Za(e,t){let n={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function Qa(e,t){let n=Date.now();try{return t()}finally{console.log(e+` time: `+(Date.now()-n)+`ms`)}}function $a(e,t){return t()}var eo=0;function to(e){return e+(``+ ++eo)}function no(e,t,n=1){t??(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);let i=[];for(let t=e;r(t);t+=n)i.push(t);return i}function ro(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function io(e,t){let n;return n=typeof t==`string`?e=>e[t]:t,Object.entries(e).reduce((e,[t,r])=>(e[t]=n(r,t),e),{})}function ao(e,t){return e.reduce((e,n,r)=>(e[n]=t[r],e),{})}var oo=`\0`;function so(e,t,n){if(!(e&&t&&n&&t.dummy===`edge`&&n.dummy===`edge`&&t.edgeObj&&n.edgeObj&&e[t.edgeObj.v]&&e[n.edgeObj.v]&&e[t.edgeObj.w]&&e[n.edgeObj.w]))return 0;let r=!0;t.edgeObj.w===n.edgeObj.w&&(r=!1);let i=r?e[t.edgeObj.v]?.rank??NaN:e[t.edgeObj.w]?.rank??NaN,a=Object.entries(e).find(e=>e[1].edgeObj?.v===t.edgeObj.v&&e[1].edgeObj?.w===t.edgeObj.w&&e[1].rank===i),o=Object.entries(e).find(e=>e[1].edgeObj?.v===n.edgeObj.v&&e[1].edgeObj?.w===n.edgeObj.w&&e[1].rank===i);if(!a||!o)return 0;let s=a[1].order??NaN,c=o[1].order??NaN;return isNaN(s-c)?0:s-c}var co=`3.1.1`,lo=class{constructor(){Qi(this,`_sentinel`);let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return uo(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&uo(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,fo)),n=n._prev;return`[`+e.join(`, `)+`]`}};function uo(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function fo(e,t){if(e!==`_next`&&e!==`_prev`)return t}var po=lo,mo=()=>1;function ho(e,t){if(e.nodeCount()<=1)return[];let n=vo(e,t||mo);return go(n.graph,n.buckets,n.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w)||[])}function go(e,t,n){let r=[],i=t[t.length-1],a=t[0],o;for(;e.nodeCount();){for(;o=a.dequeue();)_o(e,t,n,o);for(;o=i.dequeue();)_o(e,t,n,o);if(e.nodeCount()){for(let i=t.length-2;i>0;--i)if(o=t[i]?.dequeue(),o){r=r.concat(_o(e,t,n,o,!0)||[]);break}}}return r}function _o(e,t,n,r,i){let a=[],o=i?a:void 0;return(e.inEdges(r.v)||[]).forEach(r=>{let o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,yo(t,n,s)}),(e.outEdges(r.v)||[]).forEach(r=>{let i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,yo(t,n,o)}),e.removeNode(r.v),o}function vo(e,t){let n=new Ra,r=0,i=0;e.nodes().forEach(e=>{n.setNode(e,{v:e,in:0,out:0})}),e.edges().forEach(e=>{let a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s);let c=n.node(e.v),l=n.node(e.w);i=Math.max(i,c.out+=o),r=Math.max(r,l.in+=o)});let a=bo(i+r+3).map(()=>new po),o=r+1;return n.nodes().forEach(e=>{yo(a,o,n.node(e))}),{graph:n,buckets:a,zeroIdx:o}}function yo(e,t,n){var r,i,a;n.out?n.in?(a=e[n.out-n.in+t])==null||a.enqueue(n):(i=e[e.length-1])==null||i.enqueue(n):(r=e[0])==null||r.enqueue(n)}function bo(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}function xo(e,t){(e.graph().acyclicer===`greedy`?ho(e,n(e)):So(e,t??null)).forEach(t=>{let n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,to(`rev`))});function n(e){return t=>e.edge(t).weight}}function So(e,t){let n=[],r={},i={};function a(t){Object.hasOwn(i,t)||(i[t]=!0,r[t]=!0,e.outEdges(t).forEach(e=>{Object.hasOwn(r,e.w)?n.push(e):a(e.w)}),delete r[t])}function o(a){var s;Object.hasOwn(i,a)||(i[a]=!0,r[a]=!0,(s=e.outEdges(a))==null||s.forEach(i=>{Object.hasOwn(r,i.w)||t.node(a)?.rank>t.node(i.w)?.rank&&wo(e,i.w,i)?n.push(i):o(i.w)}),delete r[a])}let s=a;return t&&typeof t.node==`function`&&(s=o),e.sources().forEach(s),e.nodes().forEach(s),n}function Co(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}function wo(e,t,n){let r=new Set;function i(t){if(e.sources().includes(t))return!0;r.add(t);for(let a of e.inEdges(t)??[])if((a.v!==n.v||a.w!==n.w)&&!r.has(a.v)&&i(a.v))return!0;return!1}return i(t)}function To(e){e.graph().dummyChains=[],e.edges().forEach(t=>Eo(e,t))}function Eo(e,t){let n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a===r+1)return;e.removeEdge(t);let l,u,d;for(d=0,++r;r<a;++d,++r)s.points=[],u={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},l=za(e,`edge`,u,`_d`),r===c&&(u.width=s.width,u.height=s.height,u.dummy=`edge-label`,u.labelpos=s.labelpos),e.setEdge(n,l,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(l),n=l;e.setEdge(n,i,{weight:s.weight},o)}function Do(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}function Oo(e){let t={};function n(r){let i=e.node(r);if(Object.hasOwn(t,r))return i.rank;t[r]=!0;let a=e.outEdges(r),o=a?a.map(t=>t==null?1/0:n(t.w)-e.edge(t).minlen):[],s=Ya(Math.min,o);return s===1/0&&(s=0),i.rank=s}e.sources().forEach(n)}function ko(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var Ao=jo;function jo(e){let t=new Ra({directed:!1}),n=e.nodes();if(n.length===0)throw Error(`Graph must have at least one node`);let r=n[0],i=e.nodeCount();t.setNode(r,{});let a,o;for(;Mo(t,e)<i&&(a=No(t,e),a);)o=t.hasNode(a.v)?ko(e,a):-ko(e,a),Po(t,e,o);return t}function Mo(e,t){function n(r){let i=t.nodeEdges(r);i&&i.forEach(i=>{let a=i.v,o=r===a?i.w:a;!e.hasNode(o)&&!ko(t,i)&&(e.setNode(o,{}),e.setEdge(r,o,{}),n(o))})}return e.nodes().forEach(n),e.nodeCount()}function No(e,t){return t.edges().reduce((n,r)=>{let i=1/0;return e.hasNode(r.v)!==e.hasNode(r.w)&&(i=ko(t,r)),i<n[0]?[i,r]:n},[1/0,null])[1]}function Po(e,t,n){e.nodes().forEach(e=>t.node(e).rank+=n)}var{preorder:Fo,postorder:Io}=fa,Lo=Ro;Ro.initLowLimValues=Ho,Ro.initCutValues=zo,Ro.calcCutValue=Vo,Ro.leaveEdge=Wo,Ro.enterEdge=Go,Ro.exchangeEdges=Ko;function Ro(e){e=Ba(e),Oo(e);let t=Ao(e);Ho(t),zo(t,e);let n,r;for(;n=Wo(t);)r=Go(t,e,n),Ko(t,e,n,r)}function zo(e,t){let n=Io(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(n=>Bo(e,t,n))}function Bo(e,t,n){let r=e.node(n).parent,i=e.edge(n,r);i.cutvalue=Vo(e,t,n)}function Vo(e,t,n){let r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;a||=(i=!1,t.edge(r,n)),o=a.weight;let s=t.nodeEdges(n);return s&&s.forEach(a=>{let s=a.v===n,c=s?a.w:a.v;if(c!==r){let r=s===i,l=t.edge(a).weight;if(o+=r?l:-l,Jo(e,n,c)){let t=e.edge(n,c).cutvalue;o+=r?-t:t}}}),o}function Ho(e,t){arguments.length<2&&(t=e.nodes()[0]),Uo(e,{},1,t)}function Uo(e,t,n,r,i){let a=n,o=e.node(r);t[r]=!0;let s=e.neighbors(r);return s&&s.forEach(i=>{Object.hasOwn(t,i)||(n=Uo(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function Wo(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function Go(e,t,n){let r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);let a=e.node(r),o=e.node(i),s=a,c=!1;return a.lim>o.lim&&(s=o,c=!0),t.edges().filter(t=>c===Yo(e,e.node(t.v),s)&&c!==Yo(e,e.node(t.w),s)).reduce((e,n)=>ko(t,n)<ko(t,e)?n:e)}function Ko(e,t,n,r){let i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),Ho(e),zo(e,t),qo(e,t)}function qo(e,t){let n=e.nodes().find(t=>!e.node(t).parent);if(!n)return;let r=Fo(e,[n]);r=r.slice(1),r.forEach(n=>{let r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function Jo(e,t,n){return e.hasEdge(t,n)}function Yo(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var Xo=Zo;function Zo(e){let t=e.graph().ranker;if(typeof t==`function`)return t(e);switch(t){case`network-simplex`:es(e);break;case`tight-tree`:$o(e);break;case`longest-path`:Qo(e);break;case`none`:break;default:es(e)}}var Qo=Oo;function $o(e){Oo(e),Ao(e)}function es(e){Lo(e)}var ts=ns;function ns(e){let t=is(e),n=e.graph();Array.isArray(n.dummyChains)&&n.dummyChains.forEach(n=>{let r=e.node(n),i=r.edgeObj,a=rs(e,t,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;for(;n!==i.w;){if(r=e.node(n),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(o[c+1]).minRank<=r.rank;)c++;l=o[c]}l!==void 0&&e.setParent(n,l),n=e.successors(n)[0]}})}function rs(e,t,n,r){let i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c;c=n;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));let l=c,u=r;for(;(u=e.parent(u))!==l;)a.push(u);return{path:i.concat(a.reverse()),lca:l}}function is(e){let t={},n=0;function r(i){let a=n;e.children(i).forEach(r),t[i]={low:a,lim:n++}}return e.children(oo).forEach(r),t}function as(e){let t=za(e,`root`,{},`_root`),n=ss(e),r=Object.values(n),i=Ya(Math.max,r)-1,a=2*i+1;e.graph().nestingRoot=t,e.edges().forEach(t=>e.edge(t).minlen*=a);let o=cs(e)+1;e.children(oo).forEach(r=>{os(e,t,a,o,i,n,r)}),e.graph().nodeRankFactor=a}function os(e,t,n,r,i,a,o){let s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}let c=Ka(e,`_bt`),l=Ka(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,s.forEach(s=>{os(e,t,n,r,i,a,s);let u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-(a[o]??0)+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+(a[o]??0)})}function ss(e){let t={};function n(r,i){let a=e.children(r);a&&a.length&&a.forEach(e=>n(e,i+1)),t[r]=i}return e.children(oo).forEach(e=>n(e,1)),t}function cs(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function ls(e){let t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}var us=ds;function ds(e){function t(n){let r=e.children(n),i=e.node(n);if(r.length&&r.forEach(t),i&&Object.hasOwn(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(let t=i.minRank,r=i.maxRank+1;t<r;++t)fs(e,`borderLeft`,`_bl`,n,i,t),fs(e,`borderRight`,`_br`,n,i,t)}}e.children(oo).forEach(t)}function fs(e,t,n,r,i,a){let o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=za(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function ps(e){let t=e.graph().rankdir?.toLowerCase();(t===`lr`||t===`rl`)&&hs(e)}function ms(e){let t=e.graph().rankdir?.toLowerCase();(t===`bt`||t===`rl`)&&_s(e),(t===`lr`||t===`rl`)&&(ys(e),hs(e))}function hs(e){e.nodes().forEach(t=>gs(e.node(t))),e.edges().forEach(t=>gs(e.edge(t)))}function gs(e){let t=e.width;e.width=e.height,e.height=t}function _s(e){e.nodes().forEach(t=>vs(e.node(t))),e.edges().forEach(t=>{var n;let r=e.edge(t);(n=r.points)==null||n.forEach(vs),Object.hasOwn(r,`y`)&&vs(r)})}function vs(e){e.y=-e.y}function ys(e){e.nodes().forEach(t=>bs(e.node(t))),e.edges().forEach(t=>{var n;let r=e.edge(t);(n=r.points)==null||n.forEach(bs),Object.hasOwn(r,`x`)&&bs(r)})}function bs(e){let t=e.x;e.x=e.y,e.y=t}function xs(e,t=null){let n={},r=e.nodes().filter(t=>!e.children(t).length),i=r.map(t=>e.node(t).rank),a=no(Ya(Math.max,i)+1).map(()=>[]);function o(t){if(n[t])return;n[t]=!0;let r=e.node(t);a[r.rank].push(t);let i=e.successors(t);i&&[...i].sort((e,t)=>s(e,t)).forEach(o)}r.sort((t,n)=>e.node(t).rank-e.node(n).rank).forEach(o);function s(n,r){return so(t,e.node(n),e.node(r))}return a}function Ss(e,t){let n=0;for(let r=1;r<t.length;++r)n+=Cs(e,t[r-1],t[r]);return n}function Cs(e,t,n){let r=ao(n,n.map((e,t)=>t)),i=t.flatMap(t=>{let n=e.outEdges(t);return n?n.map(t=>({pos:r[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos):[]}),a=1;for(;a<n.length;)a<<=1;let o=2*a-1;--a;let s=Array(o).fill(0),c=0;return i.forEach(e=>{let t=e.pos+a;s[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=s[t+1]),t=t-1>>1,s[t]+=e.weight;c+=e.weight*n}),c}function ws(e,t=[]){return t.map(t=>{let n=e.inEdges(t);if(!n||!n.length)return{v:t};{let r=n.reduce((t,n)=>{let r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}})}function Ts(e,t){let n={};return e.forEach((e,t)=>{let r={indegree:0,in:[],out:[],vs:[e.v],i:t};e.barycenter!==void 0&&(r.barycenter=e.barycenter,r.weight=e.weight),n[e.v]=r}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];t!==void 0&&r!==void 0&&(r.indegree++,t.out.push(r))}),Es(Object.values(n).filter(e=>!e.indegree))}function Es(e){let t=[];function n(e){return t=>{t.merged||(t.barycenter===void 0||e.barycenter===void 0||t.barycenter>=e.barycenter)&&Ds(e,t)}}function r(t){return n=>{n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){let i=e.pop();t.push(i),i.in.reverse().forEach(n(i)),i.out.forEach(r(i))}return t.filter(e=>!e.merged).map(e=>ro(e,[`vs`,`i`,`barycenter`,`weight`]))}function Ds(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function Os(e,t,n,r,i){let a={},o=null,s=null,c=i;typeof t==`boolean`?(c=t,a={}):t&&(a=t,o=n??null,s=r??null);let l=Za(e,e=>Object.hasOwn(e,`barycenter`)),u=l.lhs,d=l.rhs.sort((e,t)=>t.i-e.i),f=[],p=0,m=0,h=0;u.sort(As(s,o,!!c));for(let[e,t]of Object.entries(a)){let n=u.findIndex(t=>t.vs[0]===e);u.splice(n+1,0,t)}h=ks(f,d,h),u.forEach(e=>{h+=e.vs.length,f.push(e.vs),p+=e.barycenter*e.weight,m+=e.weight,h=ks(f,d,h)});let g={vs:f.flat(1)};return m&&(g.barycenter=p/m,g.weight=m),g}function ks(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function As(e,t,n){return(r,i)=>{if(r.barycenter<i.barycenter)return-1;if(r.barycenter>i.barycenter)return 1;if(e&&(typeof r.vs[0]==`string`||typeof i.vs[0]==`string`)){let n=so(t,e.node(r.vs[0]),e.node(i.vs[0]));if(n!==0)return n}return n?i.i-r.i:r.i-i.i}}function js(e,t,n,r,i){var a,o;let s=null,c=i;typeof r==`boolean`?(c=r,s=null):r!==void 0&&(s=r);let l=e.children(t),u=e.node(t),d=u?u.borderLeft:void 0,f=u?u.borderRight:void 0,p={};d&&(l=l.filter(e=>e!==d&&e!==f));let m=ws(e,l);m.forEach(t=>{if(e.children(t.v).length){let{result:r}=js(e,t.v,n,s,c);p[t.v]=r,Object.hasOwn(r,`barycenter`)&&Ns(t,r)}});let h=Ts(m,n);Ms(h,p);let g={},_=!1;for(let t=0;t<h.length;t++)for(let n=t+1;n<h.length;n++)if(!(!h[t]||!h[n]||!((a=h[t])!=null&&a.barycenter)||!((o=h[n])!=null&&o.barycenter))&&h[t]?.barycenter===h[n].barycenter){let r=h[t]?.vs[0]??``,i=h[n]?.vs[0]??``,a=e.node(r),o=e.node(i);if(a.dummy===`edge`&&o.dummy===`edge`&&a.edgeObj?.v===o.edgeObj?.v&&a.edgeObj?.w===o.edgeObj?.w){if(a.edgeLabel.reversed){g[i]=h[t],h.splice(t,1),t--;break}g[r]=h[n],h.splice(n,1),n--}else _=!0}let v=Os(h,g,s,e,c);if(d&&f){v.vs=[d,v.vs,f].flat(1);let t=e.predecessors(d);if(t&&t.length){let n=e.node(t[0]),r=e.predecessors(f),i=e.node(r[0]);Object.hasOwn(v,`barycenter`)||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+n.order+i.order)/(v.weight+2),v.weight+=2}}return Object.defineProperty(v,"result",{value:v,enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(v,"usedBias",{value:_,enumerable:!1,configurable:!0,writable:!0}),v}function Ms(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}function Ns(e,t){e.barycenter===void 0?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}function Ps(e,t,n,r){r||=e.nodes();let i=Fs(e),a=new Ra({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(t=>e.node(t));return r.forEach(r=>{let o=e.node(r),s=e.parent(r);if(o.rank===t||o.minRank<=t&&t<=o.maxRank){a.setNode(r),a.setParent(r,s||i);let c=e[n](r);c&&c.forEach(t=>{let n=t.v===r?t.w:t.v,i=a.edge(n,r),o=i===void 0?0:i.weight;a.setEdge(n,r,{weight:e.edge(t).weight+o})}),Object.hasOwn(o,`minRank`)&&a.setNode(r,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]})}}),a}function Fs(e){let t;for(;e.hasNode(t=to(`_root`)););return t}function Is(e,t,n){let r={},i;n.forEach(n=>{let a=e.parent(n),o,s;for(;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}function Ls(e,t={},n=null){if(typeof t.customOrder==`function`){t.customOrder(e,Ls);return}let r=Xa(e),i=Rs(e,no(1,r+1),`inEdges`),a=Rs(e,no(r-1,-1,-1),`outEdges`),o=xs(e,n);if(Bs(e,o),t.disableOptimalOrderHeuristic)return;let s=1/0,c,l=t.constraints||[];for(let t=0,r=0;r<4;++t,++r){zs(t%2?i:a,t%4>=2,l,n),o=Ua(e);let u=Ss(e,o);u<s?(r=0,c=Object.assign({},o),s=u):u===s&&(c=structuredClone(o))}Bs(e,c)}function Rs(e,t,n){let r=new Map,i=(e,t)=>{r.has(e)||r.set(e,[]),r.get(e).push(t)};for(let t of e.nodes()){let n=e.node(t);if(typeof n.rank==`number`&&i(n.rank,t),typeof n.minRank==`number`&&typeof n.maxRank==`number`)for(let e=n.minRank;e<=n.maxRank;e++)e!==n.rank&&i(e,t)}return t.map(function(t){return Ps(e,t,n,r.get(t)||[])})}function zs(e,t,n,r){let i=!0,a=new Ra;e.forEach(function(e){n.forEach(e=>a.setEdge(e.left,e.right));let o=e.graph().root,{result:s,usedBias:c}=js(e,o,a,r,i);t&&c&&(i=!i),s.vs.forEach((t,n)=>e.node(t).order=n),Is(e,a,s.vs)})}function Bs(e,t){Object.values(t).forEach(t=>t.forEach((t,n)=>e.node(t).order=n))}function Vs(e,t){let n={};function r(t,r){let i=0,a=0,o=t.length,s=r[r.length-1];return r.forEach((t,c)=>{let l=Us(e,t),u=l?e.node(l).order:o;(l||t===s)&&(r.slice(a,c+1).forEach(t=>{let r=e.predecessors(t);r&&r.forEach(r=>{let a=e.node(r),o=a.order;(o<i||u<o)&&!(a.dummy&&e.node(t).dummy)&&Ws(n,r,t)})}),a=c+1,i=u)}),r}return t.length&&t.reduce(r),n}function Hs(e,t){let n={};function r(t,r,i,a,o){no(r,i).forEach(r=>{let i=t[r];if(i!==void 0&&e.node(i).dummy){let t=e.predecessors(i);t&&t.forEach(t=>{if(t===void 0)return;let r=e.node(t);r.dummy&&(r.order<a||r.order>o)&&Ws(n,t,i)})}})}function i(t,n){let i=-1,a=-1,o=0;return n.forEach((s,c)=>{if(e.node(s).dummy===`border`){let t=e.predecessors(s);if(t&&t.length){let s=t[0];if(s===void 0)return;a=e.node(s).order,r(n,o,c,i,a),o=c,i=a}}r(n,o,n.length,a,t.length)}),n}return t.length&&t.reduce(i),n}function Us(e,t){if(e.node(t).dummy){let n=e.predecessors(t);if(n)return n.find(t=>e.node(t).dummy)}}function Ws(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function Gs(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];return r!==void 0&&Object.hasOwn(r,n)}function Ks(e,t,n,r,i){let a={},o={},s={};return t.forEach(e=>{e.forEach((e,t)=>{a[e]=e,o[e]=e,s[e]=t})}),t.forEach(t=>{let c=-1,l=-1,u=!1,d=t,f=t.findIndex(t=>i?.includes(t)||tc(t,e,i));f>0&&(d=[t[f],...t.slice(0,f),...t.slice(f+1)],u=!0),d.forEach(t=>{let d=r(t);if(d&&d.length){i!=null&&i.includes(t)&&(d=d.filter(t=>tc(t,e,i)));let r=d.sort((e,t)=>{let n=s[e],r=s[t];return(n===void 0?0:n)-(r===void 0?0:r)}),f=(r.length-1)/2;for(let e=Math.floor(f),i=Math.ceil(f);e<=i;++e){let i=r[e];if(i===void 0)continue;let d=s[i];if(d!==void 0&&o[t]===t&&c<d&&s[i]!==l&&!Gs(n,t,i)){let e=a[i];e!==void 0&&(o[i]=t,o[t]=a[t]=e,c=d,u&&=(c=-1,l=s[i]??-1,!1))}}}})}),{root:a,align:o}}function qs(e,t,n,r,i=!1){let a={},o=Js(e,t,n,i),s=i?`borderLeft`:`borderRight`;function c(e,t){let n=o.nodes().slice(),r={},i=n.pop();for(;i;){if(r[i])e(i);else{r[i]=!0,n.push(i);for(let e of t(i))n.push(e)}i=n.pop()}}function l(e){let t=o.inEdges(e);t?a[e]=t.reduce((e,t)=>{let n=a[t.v]??0,r=o.edge(t);return Math.max(e,n+(r===void 0?0:r))},0):a[e]=0}function u(t){let n=o.outEdges(t),r=1/0;n&&(r=n.reduce((e,t)=>{let n=a[t.w],r=o.edge(t);return Math.min(e,(n===void 0?0:n)-(r===void 0?0:r))},1/0));let i=e.node(t);r!==1/0&&i.borderType!==s&&(a[t]=Math.max(a[t]===void 0?0:a[t],r))}function d(e){return o.predecessors(e)||[]}function f(e){return o.successors(e)||[]}return c(l,d),c(u,f),Object.keys(r).forEach(e=>{let t=n[e];t!==void 0&&(a[e]=a[t]??0)}),a}function Js(e,t,n,r){let i=new Ra,a=e.graph(),o=$s(a.nodesep,a.edgesep,r);return t.forEach(t=>{let r;t.forEach(t=>{let a=n[t];if(a!==void 0){if(i.setNode(a),r!==void 0){let s=n[r];if(s!==void 0){let n=i.edge(s,a);i.setEdge(s,a,Math.max(o(e,t,r),n||0))}}r=t}})}),i}function Ys(e,t){return Object.values(t).reduce((t,n)=>{let r=-1/0,i=1/0;Object.entries(n).forEach(([t,n])=>{let a=ec(e,t)/2;r=Math.max(n+a,r),i=Math.min(n-a,i)});let a=r-i;return a<t[0]&&(t=[a,n]),t},[1/0,null])[1]}function Xs(e,t){let n=Object.values(t),r=Ya(Math.min,n),i=Ya(Math.max,n);[`u`,`d`].forEach(n=>{[`l`,`r`].forEach(a=>{let o=n+a,s=e[o];if(!s||s===t)return;let c=Object.values(s),l=r-Ya(Math.min,c);a!==`l`&&(l=i-Ya(Math.max,c)),l&&(e[o]=io(s,e=>e+l))})})}function Zs(e,t=void 0){let n=e.ul;return n?io(n,(n,r)=>{if(t){let n=e[t.toLowerCase()];if(n&&n[r]!==void 0)return n[r]}let i=Object.values(e).map(e=>{let t=e[r];return t===void 0?0:t}).sort((e,t)=>e-t);return((i[1]??0)+(i[2]??0))/2}):{}}function Qs(e,t){let n=Ua(e),r=Object.assign(Vs(e,n),Hs(e,n)),i={},a;return[`u`,`d`].forEach(o=>{a=o===`u`?n:Object.values(n).reverse(),[`l`,`r`].forEach(n=>{n===`r`&&(a=a.map(e=>Object.values(e).reverse()));let s=Ks(e,a,r,t=>(o===`u`?e.predecessors(t):e.successors(t))||[],t),c=qs(e,a,s.root,s.align,n===`r`);n===`r`&&(c=io(c,e=>-e)),i[o+n]=c})}),Xs(i,Ys(e,i)),Zs(i,e.graph().align)}function $s(e,t,n){return(r,i,a)=>{let o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.hasOwn(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2;break}if(l&&(c+=n?l:-l),l=void 0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.hasOwn(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2;break}return l&&(c+=n?l:-l),c}}function ec(e,t){return e.node(t).width}function tc(e,t,n){if(!n)return!1;let r=t.node(e)?.edgeObj;if(!r||t.node(e).edgeLabel.reversed)return!1;let i=n.indexOf(r?.v),a=n.indexOf(r?.w);return i!==-1&&a!==-1&&i===(a+1)%n.length||i===(a-1)%n.length}function nc(e,t){e=Va(e),rc(e),Object.entries(Qs(e,t)).forEach(([t,n])=>e.node(t).x=n)}function rc(e){let t=Ua(e),n=e.graph(),r=n.ranksep,i=n.rankalign,a=0;t.forEach(t=>{let n=t.reduce((t,n)=>{let r=e.node(n).height??0;return t>r?t:r},0);t.forEach(t=>{let r=e.node(t);r.y=i===`top`?a+r.height/2:i===`bottom`?a+n-r.height/2:a+n/2}),a+=n+r})}var ic=new WeakMap;function ac(e,t={}){return sc(e,$a,t),e}function oc(e,t,n){let r=t;for(;r!==void 0;){let t=e.parent(r);if(t===n)return r;r=t}}function sc(e,t,n){let r=e.nodes().filter(t=>e.children(t).length),i={};r.forEach(r=>{let a=e.node(r);if(a&&a.rankdir){let o=new Ra({multigraph:!0,compound:!0});o.setGraph({rankdir:a.rankdir});let s=e.children(r);s.forEach(t=>{let n={...e.node(t)};o.setNode(t,n);let i=e.parent(t);i&&i!==r&&s.includes(i)&&o.setParent(t,i)});let c=new Set;e.edges().forEach(t=>{let n=oc(e,t.v,r),i=oc(e,t.w,r);if(n&&i&&n!==i){let r=`${n}\0${i}`;c.has(r)||(c.add(r),o.setEdge(n,i,{...e.edge(t)}))}}),sc(o,t,n);let l=vc(o);cc(l,t,n,null),lc(o,l);let u=1/0,d=1/0,f=-1/0,p=-1/0;o.nodes().forEach(e=>{if(e===r)return;let t=o.node(e);t&&typeof t.x==`number`&&typeof t.y==`number`&&typeof t.width==`number`&&typeof t.height==`number`&&(u=Math.min(u,t.x-t.width/2),f=Math.max(f,t.x+t.width/2),d=Math.min(d,t.y-t.height/2),p=Math.max(p,t.y+t.height/2))}),(!isFinite(u)||!isFinite(d)||!isFinite(f)||!isFinite(p))&&(u=d=0,f=p=0);let m=f-u,h=p-d;i[r]={minX:u,minY:d,maxX:f,maxY:p,width:m,height:h,offsetX:u,offsetY:d},a._dagreClusterSubgraph=o}});let a=[],o=t=>{let n=[],r=(e.children(t)||[]).filter(e=>e!==t);for(;r.length>0;){let t=r.shift();n.push(t),(e.children(t)||[]).filter(e=>e!==t).forEach(e=>r.push(e))}return n},s=new Map;r.forEach(t=>{let n=e.node(t);n&&n.rankdir&&i[t]&&s.set(t,(e.children(t)||[]).filter(e=>e!==t))});let c=new Set([...s.values()].flat()),l=new Map;s.forEach((e,t)=>{c.has(t)||l.set(t,o(t))});let u=new Set([...l.values()].flat()),d=e=>{for(let[t,n]of l)if(n.includes(e))return t;return e},f=[];e.edges().forEach(t=>{(u.has(t.v)||u.has(t.w))&&f.push({edge:t,label:e.edge(t)})});let p=new Map;u.forEach(t=>{let n=e.parent(t);p.set(t,typeof n==`string`?n:void 0)}),l.forEach((t,n)=>{let r=e.node(n),o=[];t.forEach(t=>{let n=e.node(t);n&&(o.push({id:t,node:n,parent:p.get(t)}),e.removeNode(t))});let s=f.filter(({edge:e})=>t.includes(e.v)||t.includes(e.w)),c=i[n];r&&(a.push({clusterId:n,subgraph:r._dagreClusterSubgraph,bounds:c,children:t,removedNodes:o,removedEdges:s}),r.width=c.width,r.height=c.height)});let m=new Set;f.forEach(({edge:t,label:n})=>{let r=d(t.v),i=d(t.w);if(r!==i&&e.hasNode(r)&&e.hasNode(i)){let t=`${r}\0${i}`;m.has(t)||(m.add(t),e.setEdge(r,i,{...n,width:0,height:0}))}});let h=vc(e),g=cc(h,t,n,ic.get(e)??null);ic.set(e,g),lc(e,h),m.forEach(t=>{let n=t.indexOf(`\0`),r=t.slice(0,n),i=t.slice(n+1);e.hasEdge(r,i)&&e.removeEdge(r,i)}),a.forEach(({clusterId:t,subgraph:n,bounds:r,removedNodes:i,removedEdges:a})=>{let o=e.node(t),s=o?.x??0,c=o?.y??0,l=(r.minX+r.maxX)/2,u=(r.minY+r.maxY)/2;i.forEach(({id:t,node:n,parent:r})=>{e.setNode(t,n),r!==void 0&&e.setParent(t,r)}),a.forEach(({edge:t,label:n})=>{e.setEdge(t,n)}),n.nodes().forEach(r=>{if(r===t)return;let i=n.node(r),a=e.node(r);a&&i&&typeof i.x==`number`&&typeof i.y==`number`&&(a.x=s+(i.x-l),a.y=c+(i.y-u))}),delete o._dagreClusterSubgraph}),r.forEach(t=>{let n=e.node(t),r=i[t];if(n&&n.rankdir&&n._dagreClusterSubgraph&&r){let i=n._dagreClusterSubgraph,a=n.x??0,o=n.y??0,s=(r.minX+r.maxX)/2,c=(r.minY+r.maxY)/2;i.nodes().forEach(n=>{if(n===t)return;let r=i.node(n),l=e.node(n);if(l&&r&&typeof r.x==`number`&&typeof r.y==`number`){let e=r.x-s,t=r.y-c;l.x=a+e,l.y=o+t}}),delete n._dagreClusterSubgraph}})}function cc(e,t,n,r=null){var i,a;let o=n?.useDynamic!==!1,s=o&&(i=r?.graph)!=null?i:null,c=o&&(a=r?.rawNodes)!=null?a:null;t(` makeSpaceForEdgeLabels`,()=>yc(e)),t(` removeSelfEdges`,()=>Oc(e)),t(` acyclic`,()=>xo(e,s)),t(` nestingGraph.run`,()=>as(e)),t(` rank`,()=>Xo(Va(e))),t(` injectEdgeLabelProxies`,()=>bc(e)),t(` removeEmptyRanks`,()=>Ga(e)),t(` nestingGraph.cleanup`,()=>ls(e)),t(` normalizeRanks`,()=>Wa(e)),t(` assignRankMinMax`,()=>xc(e)),t(` removeEdgeLabelProxies`,()=>Sc(e)),t(` normalize.run`,()=>To(e)),t(` parentDummyChains`,()=>ts(e)),t(` addBorderSegments`,()=>us(e)),t(` order`,()=>Ls(e,n,c)),t(` insertSelfEdges`,()=>kc(e)),t(` adjustCoordinateSystem`,()=>ps(e)),t(` position`,()=>nc(e,n.corePath)),t(` positionSelfEdges`,()=>Ac(e));let l=JSON.parse(JSON.stringify(e._nodes));return t(` removeBorderNodes`,()=>Dc(e)),t(` normalize.undo`,()=>Do(e)),t(` fixupEdgeLabelCoords`,()=>Tc(e)),t(` undoCoordinateSystem`,()=>ms(e)),t(` translateGraph`,()=>Cc(e)),t(` assignNodeIntersects`,()=>wc(e)),t(` reversePoints`,()=>Ec(e)),t(` acyclic.undo`,()=>Co(e)),{graph:e,rawNodes:l}}function lc(e,t){e.nodes().forEach(n=>{let r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,r.order=i.order,r.rank=i.rank,t.children(n).length&&(r.width=i.width,r.height=i.height))}),e.edges().forEach(n=>{let r=e.edge(n),i=t.edge(n);r.points=i.points,Object.hasOwn(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var uc=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],dc={ranksep:50,edgesep:20,nodesep:50,rankdir:`TB`,rankalign:`center`},fc=[`acyclicer`,`ranker`,`rankdir`,`align`,`rankalign`],pc=[`width`,`height`,`rank`],mc={width:0,height:0},hc=[`minlen`,`weight`,`width`,`height`,`labeloffset`],gc={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},_c=[`labelpos`];function vc(e){let t=new Ra({multigraph:!0,compound:!0}),n=Mc(e.graph());return t.setGraph(Object.assign({},dc,jc(n,uc),ro(n,fc))),e.nodes().forEach(n=>{let r=jc(Mc(e.node(n)),pc);Object.keys(mc).forEach(e=>{r[e]===void 0&&(r[e]=mc[e])}),t.setNode(n,r);let i=e.parent(n);i!==void 0&&t.setParent(n,i)}),e.edges().forEach(n=>{let r=Mc(e.edge(n));t.setEdge(n,Object.assign({},gc,jc(r,hc),ro(r,_c)))}),t}function yc(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,(r.labelpos??`r`).toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function bc(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v);za(e,`edge-proxy`,{rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t},`_ep`)}})}function xc(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function Sc(e){e.nodes().forEach(t=>{let n=e.node(t);if(n.dummy===`edge-proxy`){let r=n;e.edge(r.e).labelRank=n.rank,e.removeNode(t)}})}function Cc(e){let t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){let a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}e.nodes().forEach(t=>c(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);Object.hasOwn(n,`x`)&&c(n)}),t-=o,r-=s,e.nodes().forEach(n=>{let i=e.node(n);i.x-=t,i.y-=r}),e.edges().forEach(n=>{let i=e.edge(n);i.points.forEach(e=>{e.x-=t,e.y-=r}),Object.hasOwn(i,`x`)&&(i.x-=t),Object.hasOwn(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function wc(e){e.edges().forEach(t=>{if(t.v===t.w)return;let n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(Ha(r,a)),n.points.push(Ha(i,o))})}function Tc(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset;break}})}function Ec(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function Dc(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(n.borderLeft[n.borderLeft.length-1]),o=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy===`border`&&e.removeNode(t)})}function Oc(e){e.edges().forEach(t=>{if(t.v===t.w){let n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function kc(e){Ua(e).forEach(t=>{let n=0;t.forEach((t,r)=>{let i=e.node(t);typeof i.rank!=`number`&&(i.rank=0),i.order=r+n,(i.selfEdges||[]).forEach(t=>{za(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,edgeLabel:t.label},`_se`),(!Array.isArray(t.label.points)||t.label.points.length!==7)&&(t.label.points=[{x:0,y:-10},{x:0,y:-10},{x:0,y:0},{x:0,y:10},{x:0,y:10},{x:0,y:0},{x:0,y:0}])}),delete i.selfEdges})})}function Ac(e){e.nodes().forEach(t=>{let n=e.node(t),r=e=>typeof e==`number`&&isFinite(e);if(n.dummy===`selfedge`){let i=n,a=e.node(i.e.v),o=r(a?.x)?a.x:0,s=r(a?.y)?a.y:0,c=r(a?.width)?a.width:0,l=r(a?.height)?a.height:0,u=r(n.x)?n.x:o,d=r(n.y)?n.y:s,f=c/2,p=l/2;i.edgeLabel.points=[{x:u+f,y:d-p},{x:u+f,y:d-p},{x:u,y:d},{x:u-f,y:d+p},{x:u-f,y:d+p},{x:u,y:d},{x:u,y:d}],i.edgeLabel.x=u,i.edgeLabel.y=d,e.setEdge(i.e,i.edgeLabel),e.removeNode(t)}else n&&Array.isArray(n.selfEdges)&&n.selfEdges.forEach(e=>{if(!Array.isArray(e.label.points)||e.label.points.length!==7){let t=r(n.x)?n.x:0,i=r(n.y)?n.y:0,a=r(n.width)?n.width:0,o=r(n.height)?n.height:0,s=a/2,c=o/2;e.label.points=[{x:t+s,y:i-c},{x:t+s,y:i-c},{x:t,y:i},{x:t-s,y:i+c},{x:t-s,y:i+c},{x:t,y:i},{x:t,y:i}]}})})}function jc(e,t){return io(ro(e,t),Number)}function Mc(e){let t={};return e&&Object.entries(e).forEach(([e,n])=>{typeof e==`string`&&(e=e.toLowerCase()),t[e]=n}),t}function Nc(e){let t=Ua(e),n=new Ra({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{n.setNode(t,{label:t}),n.setParent(t,`layer`+e.node(t).rank)}),e.edges().forEach(e=>n.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{let r=`layer`+t;n.setNode(r,{rank:`same`}),e.reduce((e,t)=>(n.setEdge(e,t,{style:`invis`}),t))}),n}var Pc={graphlib:$i,version:co,layout:ac,debug:Nc,util:{time:Qa,notime:$a}};function Fc(e,t){return t?e.ref===void 0?`added`:e.set===void 0?`context`:`changed`:`unchanged`}function Ic(e,t){if(t&&e.heading===void 0)return e.ref===void 0?`added`:e.set===void 0?`context`:`changed`}function Lc(e,t){return t?e.ref===void 0?`added`:e.set===void 0?`context`:`changed`:`unchanged`}function Rc(e){let t=e.set;if(t===void 0)return[];let n=e;return Object.entries(t).filter(([e])=>e!==`attributes`&&e!==`removeAttributes`).map(([e,t])=>{let r=n[e];return{field:e,...typeof r==`string`?{from:r}:{},to:String(t)}})}var zc={added:`added`,changed:`changed`,context:`existing`,unchanged:``},Bc={added:`added`,changed:`changed`,context:`existing`,removed:`removed`},Vc=[`added`,`changed`,`context`,`removed`];function Hc(e){return e.rows.some(e=>ue(e).role!==void 0)}function Uc(e,t){if(t)return ue(e).role??`context`}function Wc(e){if(e.length===0)return;let t=Math.min(...e.map(e=>e.x)),n=Math.min(...e.map(e=>e.y)),r=Math.max(...e.map(e=>e.x+e.width)),i=Math.max(...e.map(e=>e.y+e.height));return{x:t-Jc,y:n-Jc-Yc,width:r-t+Jc*2,height:i-n+Jc*2+Yc}}var Gc=64,Kc=24,qc=12,Jc=10,Yc=16,Xc=16,Zc=160,Qc=52;function $c(e,t,n=`landscape`){let r=new Pc.graphlib.Graph({compound:!0,multigraph:!0});r.setGraph({rankdir:n===`portrait`?`TB`:`LR`,ranksep:Gc,nodesep:Kc,marginx:qc,marginy:qc}),r.setDefaultEdgeLabel(()=>({}));for(let n of e.nodes)r.setNode(n.id,t(n));let i=e.containers??[],a=new Map;for(let t of e.nodes)t.container!==void 0&&i.some(e=>e.id===t.container)&&(r.setNode(t.container,{label:t.container}),r.setParent(t.id,t.container),a.set(t.container,[...a.get(t.container)??[],t.id]));e.edges.forEach((e,t)=>{e.from!==e.to&&r.hasNode(e.from)&&r.hasNode(e.to)&&r.setEdge(e.from,e.to,{},String(t))}),Pc.layout(r);let o=e.nodes.map(e=>{let n=r.node(e.id),{width:i,height:a}=t(e);return{id:e.id,x:(n?.x??qc+i/2)-i/2,y:(n?.y??qc+a/2)-a/2,width:i,height:a}}),s=[];e.edges.forEach((e,t)=>{if(e.from===e.to)return;let n=r.edge(e.from,e.to,String(t));n?.points!==void 0&&n.points.length>0&&s.push({index:t,points:n.points.map(e=>({x:e.x,y:e.y}))})});let c=[],l=o.reduce((e,t)=>Math.max(e,t.y+t.height),qc)+Xc,u=new Map(o.map(e=>[e.id,e]));for(let e of i){let t=Wc((a.get(e.id)??[]).flatMap(e=>{let t=u.get(e);return t===void 0?[]:[t]}));t===void 0?(c.push({id:e.id,label:e.label,x:qc,y:l,width:Zc,height:Qc}),l+=68):c.push({id:e.id,label:e.label,...t})}let d=[...o.map(e=>({x:e.x,y:e.y,width:e.width,height:e.height})),...c],f=Math.min(0,...d.map(e=>e.x))-qc,p=Math.min(0,...d.map(e=>e.y))-qc;if(f<0||p<0){for(let e of o)e.x-=f,e.y-=p;for(let e of c)e.x-=f,e.y-=p;for(let e of s)for(let t of e.points)t.x-=f,t.y-=p}let m=[...o.map(e=>({x:e.x,y:e.y,width:e.width,height:e.height})),...c].reduce((e,t)=>({width:Math.max(e.width,t.x+t.width),height:Math.max(e.height,t.y+t.height)}),{width:0,height:0});return{nodes:o,edges:s,containers:c,width:m.width+qc,height:m.height+qc}}var el={attributes:[],expectations:[],assignments:[],removedAttributes:[],locations:[],artifacts:[]};function tl(e){if(typeof e!=`object`||!e)return el;let t=e,n=e=>typeof e==`object`&&e&&!Array.isArray(e)?Object.entries(e):[],r=t.set,i=r?.removeAttributes;return{attributes:n(t.attributes),expectations:n(t.expect?.attributes),assignments:n(r?.attributes),removedAttributes:Array.isArray(i)?i.filter(e=>typeof e==`string`):[],locations:Array.isArray(t.locations)?t.locations:[],artifacts:Array.isArray(t.artifacts)?t.artifacts:[]}}function nl(e){let t=e.target;if(typeof t==`string`)return{ref:t};if(typeof t!=`object`||!t)return;let n=t;if(typeof n.ref==`string`)return{ref:n.ref,...typeof n.revision==`string`?{revision:n.revision}:{}}}function rl(e,t){let n=(e.removals??[]).map(e=>({type:e.type,ref:e.ref})),r=e.profile,i=e.artifacts,a={...typeof r==`string`?{profile:r}:{},...(()=>{let t=nl(e);return t===void 0?{}:{target:t}})(),artifacts:Array.isArray(i)?i:[]};if(e.kind===`table`){let r=e.data,i=Hc(r),o=r.rows.map(e=>{let n=Array.isArray(e)?{}:e,r=(Array.isArray(e)?void 0:e.role)??Ic({ref:typeof n.ref==`string`?n.ref:void 0,set:n.set,heading:typeof n.heading==`string`?n.heading:void 0},t)??Uc(e,i),{cells:a,heading:o}=ue(e),s=Array.isArray(e)?{}:e;return{cells:a,...r===void 0?{}:{role:r},...o===void 0?{}:{heading:o},...typeof s.depth==`number`?{depth:s.depth}:{},...typeof s.id==`string`?{id:s.id}:{},...typeof s.ref==`string`?{ref:s.ref}:{},...typeof s.kind==`string`?{kind:s.kind}:{},changes:Rc(s),...tl(e)}}),s=new Map;for(let e of o){if(e.id===void 0)continue;let t=e.cells.find(e=>typeof e==`string`&&e!==``);s.set(e.id,(typeof t==`string`?t:void 0)??e.ref??e.id)}let c=r.relations,l=(Array.isArray(c)?c:[]).map(e=>{let t=e,n=e=>{let t=typeof e?.id==`string`?e.id:void 0,n=typeof e?.ref==`string`?e.ref:void 0;return{id:t,ref:n,label:(t===void 0?void 0:s.get(t))??n??t??``}},r=n(t.from),i=n(t.to);return{kind:t.kind??``,...typeof t.label==`string`?{label:t.label}:{},...r.id===void 0?{}:{fromRow:r.id},...i.id===void 0?{}:{toRow:i.id},...r.ref===void 0?{}:{fromRef:r.ref},...i.ref===void 0?{}:{toRef:i.ref},fromLabel:r.label,toLabel:i.label}});return{thingNoun:`column`,linkNoun:`row`,things:[],links:[],columns:r.columns,rows:o,containers:[],removals:n,traces:l,...a}}if(e.kind===`timeline`)return{thingNoun:`task`,linkNoun:`dependency`,things:[],links:[],containers:[],removals:n,traces:[],...a};let o=e.kind===`graph`,s=o?e.data.nodes:e.data.participants,c=o?e.data.edges:e.data.messages,l=new Map(s.map(e=>[e.id,il(e)]));return{thingNoun:o?`element`:`participant`,linkNoun:o?`relationship`:`message`,things:s.map(e=>({id:e.id,label:il(e),kind:e.kind,role:Fc(e,t),changes:Rc(e),container:e.container,...tl(e)})),links:c.map(e=>({from:e.from,to:e.to,fromLabel:l.get(e.from)??e.from,toLabel:l.get(e.to)??e.to,label:e.label,kind:`kind`in e?e.kind:void 0,role:Lc(e,t),changes:Rc(e),isLoop:e.from===e.to,...tl(e)})),containers:e.data.containers??[],removals:n,traces:[],...a}}function il(e){return e.label??e.ref??e.id}function al(e){if(e.kind===`graph`){let t=e.data,n=[`flowchart TD`],r=t.containers??[],i=new Set(r.map(e=>e.id)),a=e=>t.nodes.filter(t=>t.container===e);for(let e of r){n.push(` subgraph ${ol(e.id)}["${cl(e.label)}"]`);for(let t of a(e.id))n.push(` ${ol(t.id)}["${cl(il(t))}"]`);n.push(` end`)}for(let e of t.nodes)e.container!==void 0&&i.has(e.container)||n.push(` ${ol(e.id)}["${cl(il(e))}"]`);for(let e of t.edges){let t=e.label??e.kind,r=t===void 0?`-->`:`-- "${cl(t)}" -->`;n.push(` ${ol(e.from)} ${r} ${ol(e.to)}`)}return n.join(`
|
|
7
7
|
`)}if(e.kind===`sequence`){let t=e.data,n=[`sequenceDiagram`],r=t.containers??[],i=new Set(r.map(e=>e.id)),a=(e,t)=>`${t}participant ${ol(e.id)} as "${cl(il(e))}"`;for(let e of r){n.push(` box ${cl(e.label)}`);for(let r of t.participants.filter(t=>t.container===e.id))n.push(a(r,` `));n.push(` end`)}for(let e of t.participants)e.container!==void 0&&i.has(e.container)||n.push(a(e,` `));for(let e of t.messages)n.push(` ${ol(e.from)}->>${ol(e.to)}: ${cl(e.label??``)}`);return n.join(`
|
|
8
|
-
`)}}function ol(e){return`n${[...e].map(e=>e.charCodeAt(0).toString(36)).join(``)}`}var sl={"#":`#35;`,'"':`#quot;`,";":`#59;`,"<":`#60;`,">":`#62;`};function cl(e){return e.replace(/[#";<>]/g,e=>sl[e]).replace(/[\r\n\t\f\v\u0000-\u001f\u2028\u2029]+/g,` `)}function ll(e,t){return`${e}:${t}`}var ul=new Set;function dl(e,t,n){return n===void 0||n===``?!1:e.has(ll(t,n))}function fl(e){let t=e?.viewpoints;return Array.isArray(t)?t:[]}function pl(e,t){let n=new Set,r=(e,t,r)=>{if(t===void 0)return;let i=new Set(t);for(let t of e)t.kind!==void 0&&t.kind!==``&&!i.has(t.kind)&&n.add(ll(r,t.kind))};return r(e.nodes,t.elementKinds,`element`),r(e.edges,t.relationshipKinds,`relationship`),n}function ml(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}var hl=40,gl=22;function _l(e){let t=e.containers??[],n;if(t.length===0)n=e.participants;else{let r=new Set(t.map(e=>e.id)),i=new Set;n=[];for(let t of e.participants){if(i.has(t.id))continue;let a=t.container;if(a===void 0||!r.has(a)){n.push(t),i.add(t.id);continue}for(let t of e.participants)t.container!==a||i.has(t.id)||(n.push(t),i.add(t.id))}}let r=[];n.forEach((e,n)=>{let i=t.find(t=>t.id===e.container);if(i===void 0)return;let a=r.at(-1);a!==void 0&&a.container.id===i.id&&a.to===n-1?a.to=n:r.push({container:i,from:n,to:n})});let i=t.length>0?gl:0,a=new Map(n.map((e,t)=>[e.id,t])),o=Math.max(...e.participants.map(e=>je([il(e)],Rc(e),110,240)),Ae(e.messages.map(e=>e.label??``),110,240)*.8),s=o-14,c=e.participants.reduce((e,t)=>Math.max(e,Ne(Me(il(t),s).length,Pe(Rc(t),s).length)),Ne(1,0))+8;return{columns:n,bands:r,bandHeight:i,lifelineX:o,boxW:s,headerHeight:c,messageGap:hl,width:Math.max(e.participants.length*o,240),height:i+c+(e.messages.length+1)*hl,xOf:e=>(a.get(e)??0)*o+o/2}}function vl(e,t){let n=[il(e)];t!==`unchanged`&&n.push(`(${zc[t]})`),e.ref!==void 0&&n.push(`[${e.ref}]`);for(let t of Rc(e))n.push(Fe(t));return n.join(` `)}function yl(e,t){let n=t.cx-e.cx,r=t.cy-e.cy;if(n===0&&r===0)return{x:e.cx,y:e.cy};let i=Math.min(n===0?1/0:e.w/2/Math.abs(n),r===0?1/0:e.h/2/Math.abs(r));return{x:e.cx+n*i,y:e.cy+r*i}}function bl(e,t){if(e.length<3)return e.map((e,t)=>`${t===0?`M`:`L`} ${e.x} ${e.y}`).join(` `);let n=[`M ${e[0].x} ${e[0].y}`];for(let r=1;r<e.length-1;r++){let i=e[r-1],a=e[r],o=e[r+1],s=Math.hypot(a.x-i.x,a.y-i.y),c=Math.hypot(o.x-a.x,o.y-a.y);if(s===0||c===0)continue;let l=((a.x-i.x)*(o.y-a.y)-(a.y-i.y)*(o.x-a.x))/(s*c);if(Math.abs(l)<.02)continue;let u=Math.min(t,s/2,c/2),d={x:a.x-(a.x-i.x)/s*u,y:a.y-(a.y-i.y)/s*u},f={x:a.x+(o.x-a.x)/c*u,y:a.y+(o.y-a.y)/c*u};n.push(`L ${d.x} ${d.y}`,`Q ${a.x} ${a.y} ${f.x} ${f.y}`)}let r=e[e.length-1];return n.push(`L ${r.x} ${r.y}`),n.join(` `)}function xl(e,t,n,r,i){if(e===t){let t=26+r*12,n=e.cx-e.w/4,i=e.cx+e.w/4,a=e.y;return{d:`M ${n} ${a} C ${n} ${a-t}, ${i} ${a-t}, ${i} ${a}`,labelAt:{x:e.cx,y:a-t*.75},span:t*2}}let a=yl(e,t),o=yl(t,e),s=Math.hypot(o.x-a.x,o.y-a.y),c=(n??[]).slice(1,-1),l=i===void 0?c:c.map((e,t)=>{let n=c.length===1?.5:t/(c.length-1);return{x:e.x+i.from.dx*(1-n)+i.to.dx*n,y:e.y+i.from.dy*(1-n)+i.to.dy*n}});if(l.length>0&&r===0){let e=l[Math.floor((l.length-1)/2)];return{d:bl([a,...l,o],12),labelAt:e,span:s}}let u=r===0?0:Math.ceil(r/2)*22*(r%2==1?1:-1),d=(a.x+o.x)/2,f=(a.y+o.y)/2;if(u===0)return{d:`M ${a.x} ${a.y} L ${o.x} ${o.y}`,labelAt:{x:d,y:f},span:s};let p=s===0?0:-(o.y-a.y)/s,m=s===0?0:(o.x-a.x)/s,h=d+p*u*2,g=f+m*u*2;return{d:`M ${a.x} ${a.y} Q ${h} ${g} ${o.x} ${o.y}`,labelAt:{x:d+p*u,y:f+m*u},span:s}}function Sl(e){let t=(e.match(/-?\d+(?:\.\d+)?/g)??[]).map(Number);if(t.length<2)return;let n=1/0,r=1/0,i=-1/0,a=-1/0;for(let e=0;e+1<t.length;e+=2)n=Math.min(n,t[e]),i=Math.max(i,t[e]),r=Math.min(r,t[e+1]),a=Math.max(a,t[e+1]);return{minX:n,minY:r,maxX:i,maxY:a}}function Cl(e,t,n,r){let i=t=>{let n=e.participants.find(e=>e.id===t);return n===void 0?t:il(n)},a=t.label===void 0||t.label===``?``:`: ${t.label}`;return[`${n+1}.`,`${i(t.from)} → ${i(t.to)}${a}`,t.from===t.to?`(to itself)`:``,r===`unchanged`?``:`[${zc[r]}]`,Rc(t).map(Fe).join(`, `)].filter(e=>e!==``).join(` `)}function wl(e,t,n){let r=t=>{let n=e.nodes.find(e=>e.id===t);return n===void 0?t:il(n)},i=t.label??t.kind;return[`${r(t.from)} → ${r(t.to)}`,i===void 0?``:`(${i})`,n===`unchanged`?``:`[${zc[n]}]`,Rc(t).map(Fe).join(`, `)].filter(e=>e!==``).join(` `)}function Tl(e){if(e===void 0||e===``)return;let t=Vt(e,Ji);return t.valid?{valid:!0,envelope:t.envelope,issues:[]}:t}function El(e){let t=Tl(e);return t?.valid===!0?t.envelope:void 0}function Dl(e){return Ut(e,Ji)}var Ol=`#ffffff`,kl=`#27272a`,Al=`#71717a`,jl={added:{fill:`#ecfdf5`,stroke:`#059669`,text:`#065f46`},changed:{fill:`#fffbeb`,stroke:`#d97706`,text:`#92400e`},context:{fill:`#fafafa`,stroke:`#d4d4d8`,text:`#71717a`},unchanged:{fill:`#ffffff`,stroke:`#a1a1aa`,text:kl}},Ml={added:`#059669`,changed:`#d97706`,context:`#d4d4d8`,unchanged:`#a1a1aa`},Nl=[`added`,`changed`,`context`,`unchanged`],Pl=[{fill:`#eff6ff`,stroke:`#2563eb`},{fill:`#f5f3ff`,stroke:`#7c3aed`},{fill:`#ecfeff`,stroke:`#0891b2`},{fill:`#fff1f2`,stroke:`#e11d48`},{fill:`#f7fee7`,stroke:`#65a30d`},{fill:`#fff7ed`,stroke:`#ea580c`},{fill:`#f0fdfa`,stroke:`#0d9488`},{fill:`#fdf4ff`,stroke:`#c026d3`},{fill:`#fefce8`,stroke:`#ca8a04`},{fill:`#f8fafc`,stroke:`#475569`},{fill:`#eef2ff`,stroke:`#4f46e5`},{fill:`#fef2f2`,stroke:`#b91c1c`},{fill:`#f0fdf4`,stroke:`#16a34a`},{fill:`#fdf2f8`,stroke:`#db2777`},{fill:`#f5f5f4`,stroke:`#78716c`},{fill:`#f0f9ff`,stroke:`#0369a1`}],Fl=[void 0,`7 3`,`2 3`,`9 3 2 3`],Il=Pl.length*Fl.length;function Ll(e,t=.88){let n=n=>{let r=Number.parseInt(e.slice(1+n*2,3+n*2),16);return Math.round(r+(255-r)*t).toString(16).padStart(2,`0`)};return`#${n(0)}${n(1)}${n(2)}`}function Rl(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619)>>>0;return t}Pl.length;function zl(e,t,n={}){let r=n.dashes===!1,i=Il,a=new Map,o=new Set,s=e=>t!==void 0&&Object.hasOwn(t,e)?t[e].color:void 0,c=new Set;for(let t of e){let e=s(t);e!==void 0&&(a.set(t,{fill:Ll(e),stroke:e,declared:!0}),c.add(e.toLowerCase()))}for(let e=0;e<i;e++)c.has(Pl[e%Pl.length].stroke.toLowerCase())&&o.add(e);for(let t of e){if(a.has(t))continue;let e;if(r){e=-1;let n=Rl(t)%Pl.length;for(let t=0;t<Pl.length&&e===-1;t++){let r=(n+t)%Pl.length;o.has(r)||(e=r)}for(let t=Pl.length;t<Il&&e===-1;t++){let r=Pl.length+(n+t)%(Il-Pl.length);o.has(r)||(e=r)}e===-1&&(e=n)}else{e=Rl(t)%i;for(let t=0;t<i&&o.has(e);t++)e=(e+1)%i}o.add(e);let n=Pl[e%Pl.length],s=Math.floor(e/Pl.length)%Fl.length;if(r)a.set(t,{...n,...s===0?{}:{hatch:s}});else{let e=Fl[s];a.set(t,{...n,...e===void 0?{}:{dash:e}})}}return a}function Bl(e,t){let n=new Map;for(let r of e){let e=t.get(r);if(e?.declared!==!0)continue;let i=e.stroke.toLowerCase();n.set(i,[...n.get(i)??[],r])}let r=new Map;for(let e of n.values())if(!(e.length<2))for(let t of e)r.set(t,e.filter(e=>e!==t));return r}function Vl(e){let t=[];for(let n of e)n.kind!==void 0&&n.kind!==``&&!t.includes(n.kind)&&t.push(n.kind);return t}var Hl=`system-ui, sans-serif`;function Ul(e){let t=jl[e.role],n={fill:e.tint?.fill??t.fill,stroke:e.role===`unchanged`?e.tint?.stroke??t.stroke:t.stroke,text:t.text===`#71717a`?Al:kl},r=e.role===`added`||e.role===`changed`?2:1.2,i=e.role===`context`?.62:1,a=e.anchor??`start`,o=Me(e.label,e.width),s=Pe(e.changes,e.width),c=o.length+s.length,l=e.y+e.height/2-(c-1)*15/2+4,u=a===`middle`?e.x+e.width/2:e.x+8,d=[{shape:`rect`,x:e.x,y:e.y,width:e.width,height:e.height,rx:5,fill:n.fill,stroke:n.stroke,strokeWidth:r,...e.tint?.dash===void 0?{}:{strokeDasharray:e.tint.dash},opacity:i}];return o.forEach((e,t)=>{d.push({shape:`text`,x:u,y:l+t*15,text:e,fontSize:11,fill:n.text,fontFamily:Hl,textAnchor:a,opacity:i})}),s.forEach((e,t)=>{d.push({shape:`text`,x:u,y:l+(o.length+t)*15,text:e,fontSize:9,fontWeight:600,fill:n.text,fontFamily:Hl,textAnchor:a,opacity:i,testId:`field-changes`})}),d}function Wl(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function Gl(e){return Wl(e).replace(/"/g,`"`)}function Kl(e){return e.filter(([,e])=>e!==void 0).map(([e,t])=>` ${e}="${Gl(String(t))}"`).join(``)}function ql(e){let t=Object.entries(e.data??{}).map(([e,t])=>[`data-${e}`,t]);switch(e.shape){case`rect`:return`<rect${Kl([[`x`,e.x],[`y`,e.y],[`width`,e.width],[`height`,e.height],[`rx`,e.rx],[`fill`,e.fill],[`fill-opacity`,e.fillOpacity],[`stroke`,e.stroke],[`stroke-width`,e.strokeWidth],[`stroke-dasharray`,e.strokeDasharray],[`opacity`,e.opacity],...t])} />`;case`text`:return`<text${Kl([[`x`,e.x],[`y`,e.y],[`font-size`,e.fontSize],[`font-family`,e.fontFamily],[`font-weight`,e.fontWeight],[`font-style`,e.fontStyle],[`text-anchor`,e.textAnchor],[`fill`,e.fill],[`stroke`,e.stroke],[`stroke-width`,e.strokeWidth],[`paint-order`,e.paintOrder],[`text-decoration`,e.textDecoration],[`opacity`,e.opacity],[`data-testid`,e.testId],...t])}>${Wl(e.text)}${e.note===void 0?``:` <tspan font-style="italic">${Wl(e.note)}</tspan>`}</text>`;case`line`:return`<line${Kl([[`x1`,e.x1],[`y1`,e.y1],[`x2`,e.x2],[`y2`,e.y2],[`stroke`,e.stroke],[`stroke-width`,e.strokeWidth],[`stroke-dasharray`,e.strokeDasharray],[`opacity`,e.opacity],[`marker-end`,e.markerEnd===void 0?void 0:`url(#${e.markerEnd})`],...t])} />`;case`path`:return`<path${Kl([[`d`,e.d],[`stroke`,e.stroke],[`fill`,e.fill??`none`],[`stroke-width`,e.strokeWidth],[`stroke-dasharray`,e.strokeDasharray],[`stroke-linecap`,e.strokeLinecap],[`opacity`,e.opacity],[`marker-end`,e.markerEnd===void 0?void 0:`url(#${e.markerEnd})`],...t])} />`}}function Jl(e){return`<marker id="${Gl(e.id)}" markerWidth="7" markerHeight="7" refX="9" refY="5" viewBox="0 0 10 10" markerUnits="userSpaceOnUse" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="${Gl(e.paint)}" /></marker>`}function Yl(e){let t=e=>{let n=Object.entries(e.data??{}).map(([e,t])=>[`data-${e}`,t]),r=e.title===void 0?``:`<title>${Wl(e.title)}</title>`,i=[[`opacity`,e.opacity],[`data-testid`,e.testId]];return`<g${Kl([...n,...i])}>${r}`+e.primitives.map(ql).join(``)+(e.groups??[]).map(t).join(``)+`</g>`},n=e.groups.map(t).join(``),r=e.markers.length===0?``:`<defs>${e.markers.map(Jl).join(``)}</defs>`;return`<svg xmlns="http://www.w3.org/2000/svg" role="img"`+Kl([[`aria-label`,e.ariaLabel],[`viewBox`,e.viewBox],[`width`,e.width],[`height`,e.height]])+`><rect${Kl([[`x`,e.viewBox.split(` `)[0]],[`y`,e.viewBox.split(` `)[1]],[`width`,e.width],[`height`,e.height],[`fill`,e.background]])} />`+r+n+`</svg>`}var Xl=17,Zl=18,Ql=92,$l=860;function eu(e){return Math.min(e,$l)}function tu(e){return 21+(e.length+9)*5.6+Zl}function nu(e,t){let n=eu(t),r=1,i=0;for(let t of e.entries){let e=tu(t.label);i>0&&Ql+i+e>n-20&&(r+=1,i=0),i+=e}return r}function ru(e){let t=e.flatMap(e=>e.entries).reduce((e,t)=>Math.max(e,tu(t.label)),0);return t===0?0:Math.min(Ql+t+32,$l)}function iu(e,t){let n=e.filter(e=>e.entries.length>0);return n.length===0?0:n.reduce((e,n)=>e+nu(n,t),0)*Xl+12}function au(e,t,n,r){let i=e.filter(e=>e.entries.length>0);if(i.length===0)return[];let a=eu(r),o=[],s=0;for(let e of i){let r=s,i=0,c=[];for(let r of e.entries){let o=tu(r.label);i>0&&Ql+i+o>a-20&&(s+=1,i=0);let l=t+Ql+i,u=n+s*Xl;i+=o;let d=e.sample===`line`?{shape:`line`,x1:l,y1:u+5,x2:l+16,y2:u+5,stroke:r.stroke,strokeWidth:1.6,...r.dashed===void 0?{}:{strokeDasharray:r.dashed}}:{shape:`rect`,x:l,y:u,width:16,height:10,rx:2,fill:r.fill,stroke:r.stroke,strokeWidth:1.2,...r.dashed===void 0?{}:{strokeDasharray:r.dashed}};c.push({id:`legend-${r.key??r.label}`,...r.projectColour===!0?{title:`${r.label} — project colour`}:{},data:{"legend-entry":r.key??r.label,...r.projectColour===!0?{"colour-source":`project`}:{},...r.toggles===!0&&r.key!==void 0?{toggles:`true`}:{},...r.faded===!0?{faded:`true`}:{},...r.hidden===!0?{hidden:`true`}:{}},opacity:r.hidden===!0?.45:r.faded===!0?.62:1,primitives:[d,{shape:`text`,x:l+21,y:u+9,text:r.hidden===!0?`${r.label} (hidden)`:r.label,fontSize:9,fill:Al,fontFamily:Hl}]})}o.push({id:`legend-title-${e.title}`,primitives:[{shape:`text`,x:t,y:n+r*Xl+9,text:e.title,fontSize:9,fontWeight:600,fill:Al,fontFamily:Hl,testId:`legend-group`}]}),o.push(...c),s+=1}return[{id:`diagram-legend`,testId:`diagram-legend`,primitives:[],groups:o}]}var ou=12,su=5.2;function cu(e,t){let n=Math.max(Math.floor((t-24)/su),20),r=[],i=``;for(let t of e.split(/\s+/).filter(e=>e!==``))for(i===``?i=t:i.length+1+t.length<=n?i=`${i} ${t}`:(r.push(i),i=t);i.length>n;)r.push(i.slice(0,n)),i=i.slice(n);return i!==``&&r.push(i),r}function lu(e){let t=e.length;for(;t>0&&(e[t-1]===`.`||/\s/.test(e[t-1]));)--t;return e.slice(0,t)}function uu(e,t,n,r,i){let a=`${t.nodes.length} of ${e.nodes.length} elements and ${t.edges.length} of ${e.edges.length} relationships shown.`+(r?` Hidden types are still part of the proposal.`:``);if(i===void 0)return n.size===0?void 0:`Filtered view: ${a}`;let o=!ml(n,pl(e,i));return`Viewpoint: ${i.label} — ${lu(i.concern)}`+(o?` (adjusted).`:`.`)+(n.size===0?``:` ${a}`)}function du(e,t){return`${e}-${t.replace(`#`,``)}`}function fu(e){let t=je([il(e)],Rc(e),120,260);return{width:t,height:Ne(Me(il(e),t).length,Pe(Rc(e),t).length)}}function pu(e,t){let n=e.nodes.filter(e=>!dl(t,`element`,e.kind)),r=new Set(n.map(e=>e.id));return{nodes:n,edges:e.edges.filter(e=>!dl(t,`relationship`,e.kind)&&r.has(e.from)&&r.has(e.to)),containers:e.containers}}function mu(e,t,n){return{label:n===void 0?e:`${e} (same colour as ${n.join(`, `)})`,fill:t.fill,stroke:t.stroke,...t.dash===void 0?{}:{dashed:t.dash},...t.declared===!0?{projectColour:!0}:{}}}function hu(e,t){if(t!==void 0)return{layout:$c(e,fu,t),orientation:t};let n=$c(e,fu,`landscape`);if(n.width<=710)return{layout:n,orientation:`landscape`};let r=$c(e,fu,`portrait`);return p(n.width,r.width)===`portrait`?{layout:r,orientation:`portrait`}:{layout:n,orientation:`landscape`}}function gu(e,t=ul){return hu(pu(e,t),void 0).orientation}function _u(e,t){let n=t.hidden??ul,r=t.nudges??new Map,i=t.isProposal,a=pu(e,n),{layout:o,orientation:s}=hu(a,t.orientation),c=new Map(o.nodes.map(e=>[e.id,e])),l=e=>{let t=c.get(e);if(t===void 0)return;let n=r.get(e),i=t.x+(n?.dx??0),a=t.y+(n?.dy??0);return{x:i,y:a,cx:i+t.width/2,cy:a+t.height/2,w:t.width,h:t.height}},u=o.containers.map(e=>{let t=Wc(a.nodes.filter(t=>t.container===e.id).flatMap(e=>{let t=l(e.id);return t===void 0?[]:[{x:t.x,y:t.y,width:t.w,height:t.h}]}));return t===void 0?e:{...e,...t}}),d=zl(Vl(e.nodes),t.appearance?.kinds),f=zl(Vl(e.edges),t.appearance?.relationshipKinds),p=Bl(Vl(e.nodes),d),m=Bl(Vl(e.edges),f),h=e=>t=>({...mu(t,(e===`element`?d:f).get(t),(e===`element`?p:m).get(t)),toggles:!0,key:ll(e,t),hidden:n.has(ll(e,t))}),g=[{title:`elements`,sample:`box`,entries:Vl(e.nodes).map(h(`element`))},{title:`relationships`,sample:`line`,entries:Vl(e.edges).map(h(`relationship`))}];if(i){let e=new Set([...a.nodes.map(e=>Fc(e,!0)),...a.edges.map(e=>Lc(e,!0))]);g.push({title:`changes`,sample:`box`,entries:Nl.filter(t=>t!==`unchanged`&&e.has(t)).map(e=>({label:zc[e],fill:Ol,stroke:jl[e].stroke,faded:e===`context`}))})}let _=new Map,v=new Map;for(let e of a.edges){let t=JSON.stringify([e.from,e.to]),n=v.get(t)??0;_.set(e,n),v.set(t,n+1)}let y=new Map(o.edges.map(e=>[e.index,e.points])),b=new Map;a.edges.forEach((e,t)=>{let n=y.get(t);n!==void 0&&b.set(e,n)});let x={dx:0,dy:0},ee=a.edges.map(e=>{let t=l(e.from),n=l(e.to);if(t===void 0||n===void 0)return;let i=r.has(e.from)||r.has(e.to);return xl(t,e.from===e.to?t:n,b.get(e),_.get(e)??0,i?{from:r.get(e.from)??x,to:r.get(e.to)??x}:void 0)}),te=o.nodes.map(e=>l(e.id)),ne=ee.flatMap(e=>{let t=e===void 0?void 0:Sl(e.d);return t===void 0?[]:[t]}),re=Math.min(0,...te.map(e=>e.x-12),...ne.map(e=>e.minX-12)),ie=Math.min(0,...te.map(e=>e.y-12),...ne.map(e=>e.minY-14)),ae=Math.max(o.width,...te.map(e=>e.x+e.w+12),...ne.map(e=>e.maxX+12)),oe=Math.max(o.height,...te.map(e=>e.y+e.h+12),...ne.map(e=>e.maxY+12)),se=e=>{let t=Lc(e,i),n=e.kind===void 0?void 0:f.get(e.kind);return{role:t,stroke:n?.stroke??Ml.unchanged,dash:n?.dash,halo:t===`added`||t===`changed`?Ml[t]:void 0,width:t===`context`?1:t===`unchanged`?1.5:1.8,opacity:t===`context`?.6:1}},ce=[...new Set(a.edges.map(e=>se(e).stroke))],le=oe+4,ue=Math.max(ae-re,ru(g)),de=uu(e,a,n,i,t.viewpoint),fe=t.viewpoint===void 0||de===void 0?0:cu(de,ue).length*ou+4,pe=oe-ie+iu(g,ue)+fe,me=[];for(let e of u)me.push({id:`container-${e.id}`,data:{container:e.id},primitives:[{shape:`rect`,x:e.x,y:e.y,width:e.width,height:e.height,rx:8,fill:`none`,stroke:Al,strokeDasharray:`5 3`,opacity:.55},{shape:`text`,x:e.x+8,y:e.y+12,text:e.label,fontSize:10,fill:Al}]});a.edges.forEach((t,n)=>{let r=l(t.from),i=l(t.to),a=ee[n];if(r===void 0||i===void 0||a===void 0)return;let o=se(t),s=o.stroke,c=Rc(t),u=t.label??t.kind,d=e=>e.length*5.2+8<=a.span,f=[];o.halo!==void 0&&f.push({shape:`path`,data:{edge:`role`},d:a.d,fill:`none`,stroke:o.halo,strokeWidth:o.width+4,strokeLinecap:`round`,opacity:.3}),f.push({shape:`path`,data:{edge:`line`},d:a.d,fill:`none`,stroke:s,strokeWidth:o.width,...o.dash===void 0?{}:{strokeDasharray:o.dash},opacity:o.opacity,markerEnd:du(`se-arrow`,s)}),u!==void 0&&d(u)&&f.push({shape:`text`,x:a.labelAt.x,y:a.labelAt.y-5,text:u,textAnchor:`middle`,fontSize:9,fill:s,fontFamily:Hl,stroke:Ol,strokeWidth:3,paintOrder:`stroke`});let p=c.map(Fe).join(`, `);c.length>0&&d(p)&&f.push({shape:`text`,x:a.labelAt.x,y:a.labelAt.y+10,text:p,textAnchor:`middle`,fontSize:9,fontWeight:600,fill:s,fontFamily:Hl,stroke:Ol,strokeWidth:3,paintOrder:`stroke`,testId:`relationship-change`}),me.push({id:`edge-${n}`,data:{"relationship-role":o.role,"relationship-shape":t.from===t.to?`loop`:`open`},title:wl(e,t,o.role),primitives:f})});for(let e of a.nodes){let t=l(e.id);if(t===void 0)continue;let n=Fc(e,i);me.push({id:e.id,data:{"element-role":n,"element-id":e.id,draggable:`node`},title:vl(e,n),primitives:Ul({x:t.x,y:t.y,width:t.w,height:t.h,role:n,label:il(e),...e.kind===void 0?{}:{tint:d.get(e.kind)},changes:Rc(e)})})}let he=t.viewpoint,ge=de;if(ge!==void 0&&he!==void 0){let e=cu(ge,ue);me.push({id:`filter-note`,testId:`diagram-filter-note`,data:{viewpoint:he.id},primitives:e.map((t,n)=>({shape:`text`,x:re+12,y:le+iu(g,ue)+ou*n+ou-4,text:n<e.length-1?`${t} `:t,fontSize:9,fontWeight:600,fill:`#92400e`,fontFamily:Hl}))})}else ge!==void 0&&me.push({id:`filter-note`,primitives:[{shape:`text`,x:re+12,y:le+iu(g,ue)-4,text:ge,fontSize:9,fontWeight:600,fill:`#92400e`,fontFamily:Hl,testId:`diagram-filter-note`}]});return me.push(...au(g,re+12,le,ue)),{width:ue,height:pe,viewBox:`${re} ${ie} ${ue} ${pe}`,ariaLabel:a.nodes.length===e.nodes.length&&a.edges.length===e.edges.length?`Graph of ${e.nodes.length} elements and ${e.edges.length} relationships`:`Graph of ${e.nodes.length} elements and ${e.edges.length} relationships, filtered to ${a.nodes.length} elements and ${a.edges.length} relationships`,background:Ol,markers:ce.map(e=>({id:du(`se-arrow`,e),paint:e})),groups:me,...ge===void 0?{}:{narrowing:ge},orientation:s}}function vu(e,t){let n=t.isProposal,r=_l(e),{columns:i,bands:a,bandHeight:o,lifelineX:s,boxW:c,headerHeight:l,messageGap:u}=r,d=o,f=r.xOf,p=zl(Vl(e.participants),t.appearance?.kinds),m=Bl(Vl(e.participants),p),h=[{title:`participants`,sample:`box`,entries:Vl(e.participants).map(e=>({...mu(e,p.get(e),m.get(e)),key:ll(`element`,e)}))}];if(n){let t=new Set([...e.participants.map(e=>Fc(e,!0)),...e.messages.map(e=>Lc(e,!0))]);h.push({title:`changes`,sample:`box`,entries:Nl.filter(e=>e!==`unchanged`&&t.has(e)).map(e=>({label:zc[e],fill:Ol,stroke:jl[e].stroke,faded:e===`context`}))})}let g=r.height+4,_=Math.max(r.width,ru(h)),v=r.height+iu(h,_),y=[];for(let e of a){let t=e.from*s+(s-c)/2,n=e.to*s+(s+c)/2;y.push({id:`band-${e.container.id}-${e.from}`,data:{container:e.container.id},primitives:[{shape:`rect`,x:t,y:2,width:n-t,height:d-6,rx:5,fill:`none`,stroke:Al,strokeDasharray:`5 3`,opacity:.55},{shape:`text`,x:(t+n)/2,y:d-9,text:e.container.label,fontSize:10,textAnchor:`middle`,fill:Al}]})}for(let e of i)y.push({id:`life-${e.id}`,primitives:[{shape:`line`,x1:f(e.id),y1:o+l,x2:f(e.id),y2:r.height-6,stroke:`#d4d4d8`,strokeDasharray:`3 3`,strokeWidth:1}]});for(let e of i){let t=Fc(e,n);y.push({id:e.id,data:{"element-role":t,"element-id":e.id},title:vl(e,t),primitives:Ul({x:f(e.id)-c/2,y:o+4,width:c,height:l-8,role:t,label:il(e),...e.kind===void 0?{}:{tint:p.get(e.kind)},changes:Rc(e),anchor:`middle`})})}return e.messages.forEach((t,r)=>{let i=Lc(t,n),a=Ml[i],s=o+l+(r+1)*u,c=f(t.from),d=f(t.to),p=t.from===t.to,m=Rc(t),h=p?c+26+6:(c+d)/2,g=p?`start`:`middle`,_=[];p?_.push({shape:`path`,d:`M ${c} ${s} h 26 v ${u/2} h -26`,fill:`none`,stroke:a,strokeWidth:1.4,markerEnd:du(`se-msg`,a)}):_.push({shape:`line`,x1:c,y1:s,x2:d,y2:s,stroke:a,strokeWidth:1.4,markerEnd:du(`se-msg`,a)}),t.label!==void 0&&_.push({shape:`text`,x:h,y:s-5,text:t.label,textAnchor:g,fontSize:10,fill:kl,fontFamily:Hl,stroke:Ol,strokeWidth:3,paintOrder:`stroke`}),m.length>0&&_.push({shape:`text`,x:h,y:s+11,text:m.map(Fe).join(`, `),textAnchor:g,fontSize:9,fontWeight:600,fill:a,fontFamily:Hl,stroke:Ol,strokeWidth:3,paintOrder:`stroke`,testId:`relationship-change`}),_.push({shape:`text`,x:4,y:s+3,text:String(r+1),fontSize:9,fill:Al,fontFamily:Hl}),y.push({id:`message-${r}`,data:{"relationship-role":i,"message-index":String(r),"message-from":t.from,"message-to":t.to},title:Cl(e,t,r,i),primitives:_})}),y.push(...au(h,12,g,_)),{width:_,height:v,viewBox:`0 0 ${_} ${v}`,ariaLabel:`Sequence of ${e.participants.length} participants and ${e.messages.length} messages`,background:Ol,markers:Nl.map(e=>({id:du(`se-msg`,Ml[e]),paint:Ml[e]})),groups:y}}var yu=`change`,bu=`section`,xu=`level`;function Su(e,t,n){let r=Hc(e),i=(e,t)=>n?.[t]?.role??Uc(e,r),a=e.rows.some((e,t)=>i(e,t)!==void 0),o=e.rows.map((e,t)=>({row:e,role:i(e,t)})).filter(({role:e})=>e===void 0||!t.has(ll(`role`,e)));return{shown:o,anyRole:a,withheld:e.rows.length-o.length}}function Cu(e,t,n){let{shown:r,anyRole:i,withheld:a}=Su(e,t,n),o=e.rows.some(e=>ue(e).heading!==void 0);return{columns:[...o?[bu,xu]:[],...e.columns,...i?[yu]:[]],rows:r.map(({row:t,role:n})=>{let{cells:r,heading:a}=ue(t),s=Array.isArray(t)?void 0:t.depth,c=o?a===void 0?[null,null]:[a,s??1]:[],l=a===void 0?r:e.columns.map(()=>null);return[...c,...l,...i?[n===void 0?null:Bc[n]]:[]]}),withheld:a}}function wu(e){if(e===null)return``;let t=String(e);return/[",\n\r]/.test(t)?`"${t.replaceAll(`"`,`""`)}"`:t}function Tu(e){return[e.columns,...e.rows].map(e=>e.map(wu).join(`,`)).join(`\r
|
|
8
|
+
`)}}function ol(e){return`n${[...e].map(e=>e.charCodeAt(0).toString(36)).join(``)}`}var sl={"#":`#35;`,'"':`#quot;`,";":`#59;`,"<":`#60;`,">":`#62;`};function cl(e){return e.replace(/[#";<>]/g,e=>sl[e]).replace(/[\r\n\t\f\v\u0000-\u001f\u2028\u2029]+/g,` `)}function ll(e,t){return`${e}:${t}`}var ul=new Set;function dl(e,t,n){return n===void 0||n===``?!1:e.has(ll(t,n))}function fl(e){let t=e?.viewpoints;return Array.isArray(t)?t:[]}function pl(e,t){let n=new Set,r=(e,t,r)=>{if(t===void 0)return;let i=new Set(t);for(let t of e)t.kind!==void 0&&t.kind!==``&&!i.has(t.kind)&&n.add(ll(r,t.kind))};return r(e.nodes,t.elementKinds,`element`),r(e.edges,t.relationshipKinds,`relationship`),n}function ml(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}var hl=40,gl=22;function _l(e){let t=e.containers??[],n;if(t.length===0)n=e.participants;else{let r=new Set(t.map(e=>e.id)),i=new Set;n=[];for(let t of e.participants){if(i.has(t.id))continue;let a=t.container;if(a===void 0||!r.has(a)){n.push(t),i.add(t.id);continue}for(let t of e.participants)t.container!==a||i.has(t.id)||(n.push(t),i.add(t.id))}}let r=[];n.forEach((e,n)=>{let i=t.find(t=>t.id===e.container);if(i===void 0)return;let a=r.at(-1);a!==void 0&&a.container.id===i.id&&a.to===n-1?a.to=n:r.push({container:i,from:n,to:n})});let i=t.length>0?gl:0,a=new Map(n.map((e,t)=>[e.id,t])),o=Math.max(...e.participants.map(e=>je([il(e)],Rc(e),110,240)),Ae(e.messages.map(e=>e.label??``),110,240)*.8),s=o-14,c=e.participants.reduce((e,t)=>Math.max(e,Ne(Me(il(t),s).length,Pe(Rc(t),s).length)),Ne(1,0))+8;return{columns:n,bands:r,bandHeight:i,lifelineX:o,boxW:s,headerHeight:c,messageGap:hl,width:Math.max(e.participants.length*o,240),height:i+c+(e.messages.length+1)*hl,xOf:e=>(a.get(e)??0)*o+o/2}}function vl(e,t){let n=[il(e)];t!==`unchanged`&&n.push(`(${zc[t]})`),e.ref!==void 0&&n.push(`[${e.ref}]`);for(let t of Rc(e))n.push(Fe(t));return n.join(` `)}function yl(e,t){let n=t.cx-e.cx,r=t.cy-e.cy;if(n===0&&r===0)return{x:e.cx,y:e.cy};let i=Math.min(n===0?1/0:e.w/2/Math.abs(n),r===0?1/0:e.h/2/Math.abs(r));return{x:e.cx+n*i,y:e.cy+r*i}}function bl(e,t){if(e.length<3)return e.map((e,t)=>`${t===0?`M`:`L`} ${e.x} ${e.y}`).join(` `);let n=[`M ${e[0].x} ${e[0].y}`];for(let r=1;r<e.length-1;r++){let i=e[r-1],a=e[r],o=e[r+1],s=Math.hypot(a.x-i.x,a.y-i.y),c=Math.hypot(o.x-a.x,o.y-a.y);if(s===0||c===0)continue;let l=((a.x-i.x)*(o.y-a.y)-(a.y-i.y)*(o.x-a.x))/(s*c);if(Math.abs(l)<.02)continue;let u=Math.min(t,s/2,c/2),d={x:a.x-(a.x-i.x)/s*u,y:a.y-(a.y-i.y)/s*u},f={x:a.x+(o.x-a.x)/c*u,y:a.y+(o.y-a.y)/c*u};n.push(`L ${d.x} ${d.y}`,`Q ${a.x} ${a.y} ${f.x} ${f.y}`)}let r=e[e.length-1];return n.push(`L ${r.x} ${r.y}`),n.join(` `)}function xl(e,t,n,r,i){if(e===t){let t=26+r*12,n=e.cx-e.w/4,i=e.cx+e.w/4,a=e.y;return{d:`M ${n} ${a} C ${n} ${a-t}, ${i} ${a-t}, ${i} ${a}`,labelAt:{x:e.cx,y:a-t*.75},span:t*2}}let a=yl(e,t),o=yl(t,e),s=Math.hypot(o.x-a.x,o.y-a.y),c=(n??[]).slice(1,-1),l=i===void 0?c:c.map((e,t)=>{let n=c.length===1?.5:t/(c.length-1);return{x:e.x+i.from.dx*(1-n)+i.to.dx*n,y:e.y+i.from.dy*(1-n)+i.to.dy*n}});if(l.length>0&&r===0){let e=l[Math.floor((l.length-1)/2)];return{d:bl([a,...l,o],12),labelAt:e,span:s}}let u=r===0?0:Math.ceil(r/2)*22*(r%2==1?1:-1),d=(a.x+o.x)/2,f=(a.y+o.y)/2;if(u===0)return{d:`M ${a.x} ${a.y} L ${o.x} ${o.y}`,labelAt:{x:d,y:f},span:s};let p=s===0?0:-(o.y-a.y)/s,m=s===0?0:(o.x-a.x)/s,h=d+p*u*2,g=f+m*u*2;return{d:`M ${a.x} ${a.y} Q ${h} ${g} ${o.x} ${o.y}`,labelAt:{x:d+p*u,y:f+m*u},span:s}}function Sl(e){let t=(e.match(/-?\d+(?:\.\d+)?/g)??[]).map(Number);if(t.length<2)return;let n=1/0,r=1/0,i=-1/0,a=-1/0;for(let e=0;e+1<t.length;e+=2)n=Math.min(n,t[e]),i=Math.max(i,t[e]),r=Math.min(r,t[e+1]),a=Math.max(a,t[e+1]);return{minX:n,minY:r,maxX:i,maxY:a}}function Cl(e,t,n,r){let i=t=>{let n=e.participants.find(e=>e.id===t);return n===void 0?t:il(n)},a=t.label===void 0||t.label===``?``:`: ${t.label}`;return[`${n+1}.`,`${i(t.from)} → ${i(t.to)}${a}`,t.from===t.to?`(to itself)`:``,r===`unchanged`?``:`[${zc[r]}]`,Rc(t).map(Fe).join(`, `)].filter(e=>e!==``).join(` `)}function wl(e,t,n){let r=t=>{let n=e.nodes.find(e=>e.id===t);return n===void 0?t:il(n)},i=t.label??t.kind;return[`${r(t.from)} → ${r(t.to)}`,i===void 0?``:`(${i})`,n===`unchanged`?``:`[${zc[n]}]`,Rc(t).map(Fe).join(`, `)].filter(e=>e!==``).join(` `)}function Tl(e){if(e===void 0||e===``)return;let t=Vt(e,Ji);return t.valid?{valid:!0,envelope:t.envelope,issues:[]}:t}function El(e){let t=Tl(e);return t?.valid===!0?t.envelope:void 0}function Dl(e){return Ut(e,Ji)}var Ol=`#ffffff`,kl=`#27272a`,Al=`#71717a`,jl={added:{fill:`#ecfdf5`,stroke:`#059669`,text:`#065f46`},changed:{fill:`#fffbeb`,stroke:`#d97706`,text:`#92400e`},context:{fill:`#fafafa`,stroke:`#d4d4d8`,text:`#71717a`},unchanged:{fill:`#ffffff`,stroke:`#a1a1aa`,text:kl}},Ml={added:`#059669`,changed:`#d97706`,context:`#d4d4d8`,unchanged:`#a1a1aa`},Nl=[`added`,`changed`,`context`,`unchanged`],Pl=[{fill:`#eff6ff`,stroke:`#2563eb`},{fill:`#f5f3ff`,stroke:`#7c3aed`},{fill:`#ecfeff`,stroke:`#0891b2`},{fill:`#fff1f2`,stroke:`#e11d48`},{fill:`#f7fee7`,stroke:`#65a30d`},{fill:`#fff7ed`,stroke:`#ea580c`},{fill:`#f0fdfa`,stroke:`#0d9488`},{fill:`#fdf4ff`,stroke:`#c026d3`},{fill:`#fefce8`,stroke:`#ca8a04`},{fill:`#f8fafc`,stroke:`#475569`},{fill:`#eef2ff`,stroke:`#4f46e5`},{fill:`#fef2f2`,stroke:`#b91c1c`},{fill:`#f0fdf4`,stroke:`#16a34a`},{fill:`#fdf2f8`,stroke:`#db2777`},{fill:`#f5f5f4`,stroke:`#78716c`},{fill:`#f0f9ff`,stroke:`#0369a1`}],Fl=[void 0,`7 3`,`2 3`,`9 3 2 3`],Il=Pl.length*Fl.length;function Ll(e,t=.88){let n=n=>{let r=Number.parseInt(e.slice(1+n*2,3+n*2),16);return Math.round(r+(255-r)*t).toString(16).padStart(2,`0`)};return`#${n(0)}${n(1)}${n(2)}`}function Rl(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619)>>>0;return t}Pl.length;function zl(e,t,n={}){let r=n.dashes===!1,i=Il,a=new Map,o=new Set,s=e=>t!==void 0&&Object.hasOwn(t,e)?t[e].color:void 0,c=new Set;for(let t of e){let e=s(t);e!==void 0&&(a.set(t,{fill:Ll(e),stroke:e,declared:!0}),c.add(e.toLowerCase()))}for(let e=0;e<i;e++)c.has(Pl[e%Pl.length].stroke.toLowerCase())&&o.add(e);for(let t of e){if(a.has(t))continue;let e;if(r){e=-1;let n=Rl(t)%Pl.length;for(let t=0;t<Pl.length&&e===-1;t++){let r=(n+t)%Pl.length;o.has(r)||(e=r)}for(let t=Pl.length;t<Il&&e===-1;t++){let r=Pl.length+(n+t)%(Il-Pl.length);o.has(r)||(e=r)}e===-1&&(e=n)}else{e=Rl(t)%i;for(let t=0;t<i&&o.has(e);t++)e=(e+1)%i}o.add(e);let n=Pl[e%Pl.length],s=Math.floor(e/Pl.length)%Fl.length;if(r)a.set(t,{...n,...s===0?{}:{hatch:s}});else{let e=Fl[s];a.set(t,{...n,...e===void 0?{}:{dash:e}})}}return a}function Bl(e,t){let n=new Map;for(let r of e){let e=t.get(r);if(e?.declared!==!0)continue;let i=e.stroke.toLowerCase();n.set(i,[...n.get(i)??[],r])}let r=new Map;for(let e of n.values())if(!(e.length<2))for(let t of e)r.set(t,e.filter(e=>e!==t));return r}function Vl(e){let t=[];for(let n of e)n.kind!==void 0&&n.kind!==``&&!t.includes(n.kind)&&t.push(n.kind);return t}var Hl=`system-ui, sans-serif`;function Ul(e){let t=jl[e.role],n={fill:e.tint?.fill??t.fill,stroke:e.role===`unchanged`?e.tint?.stroke??t.stroke:t.stroke,text:t.text===`#71717a`?Al:kl},r=e.role===`added`||e.role===`changed`?2:1.2,i=e.role===`context`?.62:1,a=e.anchor??`start`,o=Me(e.label,e.width),s=Pe(e.changes,e.width),c=o.length+s.length,l=e.y+e.height/2-(c-1)*15/2+4,u=a===`middle`?e.x+e.width/2:e.x+8,d=[{shape:`rect`,x:e.x,y:e.y,width:e.width,height:e.height,rx:5,fill:n.fill,stroke:n.stroke,strokeWidth:r,...e.tint?.dash===void 0?{}:{strokeDasharray:e.tint.dash},opacity:i}];return o.forEach((e,t)=>{d.push({shape:`text`,x:u,y:l+t*15,text:e,fontSize:11,fill:n.text,fontFamily:Hl,textAnchor:a,opacity:i})}),s.forEach((e,t)=>{d.push({shape:`text`,x:u,y:l+(o.length+t)*15,text:e,fontSize:9,fontWeight:600,fill:n.text,fontFamily:Hl,textAnchor:a,opacity:i,testId:`field-changes`})}),d}function Wl(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function Gl(e){return Wl(e).replace(/"/g,`"`)}function Kl(e){return e.filter(([,e])=>e!==void 0).map(([e,t])=>` ${e}="${Gl(String(t))}"`).join(``)}function ql(e){let t=Object.entries(e.data??{}).map(([e,t])=>[`data-${e}`,t]);switch(e.shape){case`rect`:return`<rect${Kl([[`x`,e.x],[`y`,e.y],[`width`,e.width],[`height`,e.height],[`rx`,e.rx],[`fill`,e.fill],[`fill-opacity`,e.fillOpacity],[`stroke`,e.stroke],[`stroke-width`,e.strokeWidth],[`stroke-dasharray`,e.strokeDasharray],[`opacity`,e.opacity],...t])} />`;case`text`:return`<text${Kl([[`x`,e.x],[`y`,e.y],[`font-size`,e.fontSize],[`font-family`,e.fontFamily],[`font-weight`,e.fontWeight],[`font-style`,e.fontStyle],[`text-anchor`,e.textAnchor],[`fill`,e.fill],[`stroke`,e.stroke],[`stroke-width`,e.strokeWidth],[`paint-order`,e.paintOrder],[`text-decoration`,e.textDecoration],[`opacity`,e.opacity],[`data-testid`,e.testId],...t])}>${Wl(e.text)}${e.note===void 0?``:` <tspan font-style="italic">${Wl(e.note)}</tspan>`}</text>`;case`line`:return`<line${Kl([[`x1`,e.x1],[`y1`,e.y1],[`x2`,e.x2],[`y2`,e.y2],[`stroke`,e.stroke],[`stroke-width`,e.strokeWidth],[`stroke-dasharray`,e.strokeDasharray],[`opacity`,e.opacity],[`marker-end`,e.markerEnd===void 0?void 0:`url(#${e.markerEnd})`],...t])} />`;case`path`:return`<path${Kl([[`d`,e.d],[`stroke`,e.stroke],[`fill`,e.fill??`none`],[`stroke-width`,e.strokeWidth],[`stroke-dasharray`,e.strokeDasharray],[`stroke-linecap`,e.strokeLinecap],[`opacity`,e.opacity],[`marker-end`,e.markerEnd===void 0?void 0:`url(#${e.markerEnd})`],...t])} />`}}function Jl(e){return`<marker id="${Gl(e.id)}" markerWidth="7" markerHeight="7" refX="9" refY="5" viewBox="0 0 10 10" markerUnits="userSpaceOnUse" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="${Gl(e.paint)}" /></marker>`}function Yl(e){let t=e=>{let n=Object.entries(e.data??{}).map(([e,t])=>[`data-${e}`,t]),r=e.title===void 0?``:`<title>${Wl(e.title)}</title>`,i=[[`opacity`,e.opacity],[`data-testid`,e.testId]];return`<g${Kl([...n,...i])}>${r}`+e.primitives.map(ql).join(``)+(e.groups??[]).map(t).join(``)+`</g>`},n=e.groups.map(t).join(``),r=e.markers.length===0?``:`<defs>${e.markers.map(Jl).join(``)}</defs>`;return`<svg xmlns="http://www.w3.org/2000/svg" role="img"`+Kl([[`aria-label`,e.ariaLabel],[`viewBox`,e.viewBox],[`width`,e.width],[`height`,e.height]])+`><rect${Kl([[`x`,e.viewBox.split(` `)[0]],[`y`,e.viewBox.split(` `)[1]],[`width`,e.width],[`height`,e.height],[`fill`,e.background]])} />`+r+n+`</svg>`}var Xl=17,Zl=18,Ql=92,$l=860;function eu(e){return Math.min(e,$l)}function tu(e){return 21+(e.length+9)*5.6+Zl}function nu(e,t){let n=eu(t),r=1,i=0;for(let t of e.entries){let e=tu(t.label);i>0&&Ql+i+e>n-20&&(r+=1,i=0),i+=e}return r}function ru(e){let t=e.flatMap(e=>e.entries).reduce((e,t)=>Math.max(e,tu(t.label)),0);return t===0?0:Math.min(Ql+t+32,$l)}function iu(e,t){let n=e.filter(e=>e.entries.length>0);return n.length===0?0:n.reduce((e,n)=>e+nu(n,t),0)*Xl+12}function au(e,t,n,r){let i=e.filter(e=>e.entries.length>0);if(i.length===0)return[];let a=eu(r),o=[],s=0;for(let e of i){let r=s,i=0,c=[];for(let r of e.entries){let o=tu(r.label);i>0&&Ql+i+o>a-20&&(s+=1,i=0);let l=t+Ql+i,u=n+s*Xl;i+=o;let d=e.sample===`line`?{shape:`line`,x1:l,y1:u+5,x2:l+16,y2:u+5,stroke:r.stroke,strokeWidth:1.6,...r.dashed===void 0?{}:{strokeDasharray:r.dashed}}:{shape:`rect`,x:l,y:u,width:16,height:10,rx:2,fill:r.fill,stroke:r.stroke,strokeWidth:1.2,...r.dashed===void 0?{}:{strokeDasharray:r.dashed}};c.push({id:`legend-${r.key??r.label}`,...r.projectColour===!0?{title:`${r.label} — project colour`}:{},data:{"legend-entry":r.key??r.label,...r.projectColour===!0?{"colour-source":`project`}:{},...r.toggles===!0&&r.key!==void 0?{toggles:`true`}:{},...r.faded===!0?{faded:`true`}:{},...r.hidden===!0?{hidden:`true`}:{}},opacity:r.hidden===!0?.45:r.faded===!0?.62:1,primitives:[d,{shape:`text`,x:l+21,y:u+9,text:r.hidden===!0?`${r.label} (hidden)`:r.label,fontSize:9,fill:Al,fontFamily:Hl}]})}o.push({id:`legend-title-${e.title}`,primitives:[{shape:`text`,x:t,y:n+r*Xl+9,text:e.title,fontSize:9,fontWeight:600,fill:Al,fontFamily:Hl,testId:`legend-group`}]}),o.push(...c),s+=1}return[{id:`diagram-legend`,testId:`diagram-legend`,primitives:[],groups:o}]}var ou=12,su=5.2;function cu(e,t){let n=Math.max(Math.floor((t-24)/su),20),r=[],i=``;for(let t of e.split(/\s+/).filter(e=>e!==``))for(i===``?i=t:i.length+1+t.length<=n?i=`${i} ${t}`:(r.push(i),i=t);i.length>n;)r.push(i.slice(0,n)),i=i.slice(n);return i!==``&&r.push(i),r}function lu(e){let t=e.length;for(;t>0&&(e[t-1]===`.`||/\s/.test(e[t-1]));)--t;return e.slice(0,t)}function uu(e,t,n,r,i){let a=`${t.nodes.length} of ${e.nodes.length} elements and ${t.edges.length} of ${e.edges.length} relationships shown.`+(r?` Hidden types are still part of the proposal.`:``);if(i===void 0)return n.size===0?void 0:`Filtered view: ${a}`;let o=!ml(n,pl(e,i));return`Viewpoint: ${i.label} — ${lu(i.concern)}`+(o?` (adjusted).`:`.`)+(n.size===0?``:` ${a}`)}function du(e,t){return`${e}-${t.replace(`#`,``)}`}function fu(e){let t=je([il(e)],Rc(e),120,260);return{width:t,height:Ne(Me(il(e),t).length,Pe(Rc(e),t).length)}}function pu(e,t){let n=e.nodes.filter(e=>!dl(t,`element`,e.kind)),r=new Set(n.map(e=>e.id));return{nodes:n,edges:e.edges.filter(e=>!dl(t,`relationship`,e.kind)&&r.has(e.from)&&r.has(e.to)),containers:e.containers}}function mu(e,t,n){return{label:n===void 0?e:`${e} (same colour as ${n.join(`, `)})`,fill:t.fill,stroke:t.stroke,...t.dash===void 0?{}:{dashed:t.dash},...t.declared===!0?{projectColour:!0}:{}}}function hu(e,t){if(t!==void 0)return{layout:$c(e,fu,t),orientation:t};let n=$c(e,fu,`landscape`);if(n.width<=710)return{layout:n,orientation:`landscape`};let r=$c(e,fu,`portrait`);return p(n.width,r.width)===`portrait`?{layout:r,orientation:`portrait`}:{layout:n,orientation:`landscape`}}function gu(e,t=ul){return hu(pu(e,t),void 0).orientation}function _u(e,t){let n=t.hidden??ul,r=t.nudges??new Map,i=t.isProposal,a=pu(e,n),{layout:o,orientation:s}=hu(a,t.orientation),c=new Map(o.nodes.map(e=>[e.id,e])),l=e=>{let t=c.get(e);if(t===void 0)return;let n=r.get(e),i=t.x+(n?.dx??0),a=t.y+(n?.dy??0);return{x:i,y:a,cx:i+t.width/2,cy:a+t.height/2,w:t.width,h:t.height}},u=o.containers.map(e=>{let t=Wc(a.nodes.filter(t=>t.container===e.id).flatMap(e=>{let t=l(e.id);return t===void 0?[]:[{x:t.x,y:t.y,width:t.w,height:t.h}]}));return t===void 0?e:{...e,...t}}),d=zl(Vl(e.nodes),t.appearance?.kinds),f=zl(Vl(e.edges),t.appearance?.relationshipKinds),p=Bl(Vl(e.nodes),d),m=Bl(Vl(e.edges),f),h=e=>t=>({...mu(t,(e===`element`?d:f).get(t),(e===`element`?p:m).get(t)),toggles:!0,key:ll(e,t),hidden:n.has(ll(e,t))}),g=[{title:`elements`,sample:`box`,entries:Vl(e.nodes).map(h(`element`))},{title:`relationships`,sample:`line`,entries:Vl(e.edges).map(h(`relationship`))}];if(i){let e=new Set([...a.nodes.map(e=>Fc(e,!0)),...a.edges.map(e=>Lc(e,!0))]);g.push({title:`changes`,sample:`box`,entries:Nl.filter(t=>t!==`unchanged`&&e.has(t)).map(e=>({label:zc[e],fill:Ol,stroke:jl[e].stroke,faded:e===`context`}))})}let _=new Map,v=new Map;for(let e of a.edges){let t=JSON.stringify([e.from,e.to]),n=v.get(t)??0;_.set(e,n),v.set(t,n+1)}let y=new Map(o.edges.map(e=>[e.index,e.points])),b=new Map;a.edges.forEach((e,t)=>{let n=y.get(t);n!==void 0&&b.set(e,n)});let ee={dx:0,dy:0},x=a.edges.map(e=>{let t=l(e.from),n=l(e.to);if(t===void 0||n===void 0)return;let i=r.has(e.from)||r.has(e.to);return xl(t,e.from===e.to?t:n,b.get(e),_.get(e)??0,i?{from:r.get(e.from)??ee,to:r.get(e.to)??ee}:void 0)}),te=o.nodes.map(e=>l(e.id)),ne=x.flatMap(e=>{let t=e===void 0?void 0:Sl(e.d);return t===void 0?[]:[t]}),re=Math.min(0,...te.map(e=>e.x-12),...ne.map(e=>e.minX-12)),ie=Math.min(0,...te.map(e=>e.y-12),...ne.map(e=>e.minY-14)),ae=Math.max(o.width,...te.map(e=>e.x+e.w+12),...ne.map(e=>e.maxX+12)),oe=Math.max(o.height,...te.map(e=>e.y+e.h+12),...ne.map(e=>e.maxY+12)),se=e=>{let t=Lc(e,i),n=e.kind===void 0?void 0:f.get(e.kind);return{role:t,stroke:n?.stroke??Ml.unchanged,dash:n?.dash,halo:t===`added`||t===`changed`?Ml[t]:void 0,width:t===`context`?1:t===`unchanged`?1.5:1.8,opacity:t===`context`?.6:1}},ce=[...new Set(a.edges.map(e=>se(e).stroke))],le=oe+4,ue=Math.max(ae-re,ru(g)),de=uu(e,a,n,i,t.viewpoint),fe=t.viewpoint===void 0||de===void 0?0:cu(de,ue).length*ou+4,pe=oe-ie+iu(g,ue)+fe,me=[];for(let e of u)me.push({id:`container-${e.id}`,data:{container:e.id},primitives:[{shape:`rect`,x:e.x,y:e.y,width:e.width,height:e.height,rx:8,fill:`none`,stroke:Al,strokeDasharray:`5 3`,opacity:.55},{shape:`text`,x:e.x+8,y:e.y+12,text:e.label,fontSize:10,fill:Al}]});a.edges.forEach((t,n)=>{let r=l(t.from),i=l(t.to),a=x[n];if(r===void 0||i===void 0||a===void 0)return;let o=se(t),s=o.stroke,c=Rc(t),u=t.label??t.kind,d=e=>e.length*5.2+8<=a.span,f=[];o.halo!==void 0&&f.push({shape:`path`,data:{edge:`role`},d:a.d,fill:`none`,stroke:o.halo,strokeWidth:o.width+4,strokeLinecap:`round`,opacity:.3}),f.push({shape:`path`,data:{edge:`line`},d:a.d,fill:`none`,stroke:s,strokeWidth:o.width,...o.dash===void 0?{}:{strokeDasharray:o.dash},opacity:o.opacity,markerEnd:du(`se-arrow`,s)}),u!==void 0&&d(u)&&f.push({shape:`text`,x:a.labelAt.x,y:a.labelAt.y-5,text:u,textAnchor:`middle`,fontSize:9,fill:s,fontFamily:Hl,stroke:Ol,strokeWidth:3,paintOrder:`stroke`});let p=c.map(Fe).join(`, `);c.length>0&&d(p)&&f.push({shape:`text`,x:a.labelAt.x,y:a.labelAt.y+10,text:p,textAnchor:`middle`,fontSize:9,fontWeight:600,fill:s,fontFamily:Hl,stroke:Ol,strokeWidth:3,paintOrder:`stroke`,testId:`relationship-change`}),me.push({id:`edge-${n}`,data:{"relationship-role":o.role,"relationship-shape":t.from===t.to?`loop`:`open`},title:wl(e,t,o.role),primitives:f})});for(let e of a.nodes){let t=l(e.id);if(t===void 0)continue;let n=Fc(e,i);me.push({id:e.id,data:{"element-role":n,"element-id":e.id,draggable:`node`},title:vl(e,n),primitives:Ul({x:t.x,y:t.y,width:t.w,height:t.h,role:n,label:il(e),...e.kind===void 0?{}:{tint:d.get(e.kind)},changes:Rc(e)})})}let he=t.viewpoint,ge=de;if(ge!==void 0&&he!==void 0){let e=cu(ge,ue);me.push({id:`filter-note`,testId:`diagram-filter-note`,data:{viewpoint:he.id},primitives:e.map((t,n)=>({shape:`text`,x:re+12,y:le+iu(g,ue)+ou*n+ou-4,text:n<e.length-1?`${t} `:t,fontSize:9,fontWeight:600,fill:`#92400e`,fontFamily:Hl}))})}else ge!==void 0&&me.push({id:`filter-note`,primitives:[{shape:`text`,x:re+12,y:le+iu(g,ue)-4,text:ge,fontSize:9,fontWeight:600,fill:`#92400e`,fontFamily:Hl,testId:`diagram-filter-note`}]});return me.push(...au(g,re+12,le,ue)),{width:ue,height:pe,viewBox:`${re} ${ie} ${ue} ${pe}`,ariaLabel:a.nodes.length===e.nodes.length&&a.edges.length===e.edges.length?`Graph of ${e.nodes.length} elements and ${e.edges.length} relationships`:`Graph of ${e.nodes.length} elements and ${e.edges.length} relationships, filtered to ${a.nodes.length} elements and ${a.edges.length} relationships`,background:Ol,markers:ce.map(e=>({id:du(`se-arrow`,e),paint:e})),groups:me,...ge===void 0?{}:{narrowing:ge},orientation:s}}function vu(e,t){let n=t.isProposal,r=_l(e),{columns:i,bands:a,bandHeight:o,lifelineX:s,boxW:c,headerHeight:l,messageGap:u}=r,d=o,f=r.xOf,p=zl(Vl(e.participants),t.appearance?.kinds),m=Bl(Vl(e.participants),p),h=[{title:`participants`,sample:`box`,entries:Vl(e.participants).map(e=>({...mu(e,p.get(e),m.get(e)),key:ll(`element`,e)}))}];if(n){let t=new Set([...e.participants.map(e=>Fc(e,!0)),...e.messages.map(e=>Lc(e,!0))]);h.push({title:`changes`,sample:`box`,entries:Nl.filter(e=>e!==`unchanged`&&t.has(e)).map(e=>({label:zc[e],fill:Ol,stroke:jl[e].stroke,faded:e===`context`}))})}let g=r.height+4,_=Math.max(r.width,ru(h)),v=r.height+iu(h,_),y=[];for(let e of a){let t=e.from*s+(s-c)/2,n=e.to*s+(s+c)/2;y.push({id:`band-${e.container.id}-${e.from}`,data:{container:e.container.id},primitives:[{shape:`rect`,x:t,y:2,width:n-t,height:d-6,rx:5,fill:`none`,stroke:Al,strokeDasharray:`5 3`,opacity:.55},{shape:`text`,x:(t+n)/2,y:d-9,text:e.container.label,fontSize:10,textAnchor:`middle`,fill:Al}]})}for(let e of i)y.push({id:`life-${e.id}`,primitives:[{shape:`line`,x1:f(e.id),y1:o+l,x2:f(e.id),y2:r.height-6,stroke:`#d4d4d8`,strokeDasharray:`3 3`,strokeWidth:1}]});for(let e of i){let t=Fc(e,n);y.push({id:e.id,data:{"element-role":t,"element-id":e.id},title:vl(e,t),primitives:Ul({x:f(e.id)-c/2,y:o+4,width:c,height:l-8,role:t,label:il(e),...e.kind===void 0?{}:{tint:p.get(e.kind)},changes:Rc(e),anchor:`middle`})})}return e.messages.forEach((t,r)=>{let i=Lc(t,n),a=Ml[i],s=o+l+(r+1)*u,c=f(t.from),d=f(t.to),p=t.from===t.to,m=Rc(t),h=p?c+26+6:(c+d)/2,g=p?`start`:`middle`,_=[];p?_.push({shape:`path`,d:`M ${c} ${s} h 26 v ${u/2} h -26`,fill:`none`,stroke:a,strokeWidth:1.4,markerEnd:du(`se-msg`,a)}):_.push({shape:`line`,x1:c,y1:s,x2:d,y2:s,stroke:a,strokeWidth:1.4,markerEnd:du(`se-msg`,a)}),t.label!==void 0&&_.push({shape:`text`,x:h,y:s-5,text:t.label,textAnchor:g,fontSize:10,fill:kl,fontFamily:Hl,stroke:Ol,strokeWidth:3,paintOrder:`stroke`}),m.length>0&&_.push({shape:`text`,x:h,y:s+11,text:m.map(Fe).join(`, `),textAnchor:g,fontSize:9,fontWeight:600,fill:a,fontFamily:Hl,stroke:Ol,strokeWidth:3,paintOrder:`stroke`,testId:`relationship-change`}),_.push({shape:`text`,x:4,y:s+3,text:String(r+1),fontSize:9,fill:Al,fontFamily:Hl}),y.push({id:`message-${r}`,data:{"relationship-role":i,"message-index":String(r),"message-from":t.from,"message-to":t.to},title:Cl(e,t,r,i),primitives:_})}),y.push(...au(h,12,g,_)),{width:_,height:v,viewBox:`0 0 ${_} ${v}`,ariaLabel:`Sequence of ${e.participants.length} participants and ${e.messages.length} messages`,background:Ol,markers:Nl.map(e=>({id:du(`se-msg`,Ml[e]),paint:Ml[e]})),groups:y}}var yu=`change`,bu=`section`,xu=`level`;function Su(e,t,n){let r=Hc(e),i=(e,t)=>n?.[t]?.role??Uc(e,r),a=e.rows.some((e,t)=>i(e,t)!==void 0),o=e.rows.map((e,t)=>({row:e,role:i(e,t)})).filter(({role:e})=>e===void 0||!t.has(ll(`role`,e)));return{shown:o,anyRole:a,withheld:e.rows.length-o.length}}function Cu(e,t,n){let{shown:r,anyRole:i,withheld:a}=Su(e,t,n),o=e.rows.some(e=>ue(e).heading!==void 0);return{columns:[...o?[bu,xu]:[],...e.columns,...i?[yu]:[]],rows:r.map(({row:t,role:n})=>{let{cells:r,heading:a}=ue(t),s=Array.isArray(t)?void 0:t.depth,c=o?a===void 0?[null,null]:[a,s??1]:[],l=a===void 0?r:e.columns.map(()=>null);return[...c,...l,...i?[n===void 0?null:Bc[n]]:[]]}),withheld:a}}function wu(e){if(e===null)return``;let t=String(e);return/[",\n\r]/.test(t)?`"${t.replaceAll(`"`,`""`)}"`:t}function Tu(e){return[e.columns,...e.rows].map(e=>e.map(wu).join(`,`)).join(`\r
|
|
9
9
|
`)}function Eu(e){return e===null?``:String(e).replaceAll(`\\`,`\\\\`).replaceAll(`|`,`\\|`).replace(/\r\n|\r|\n/g,`<br>`)}function Du(e){return e.replaceAll(`\\`,`\\\\`).replace(/\r\n|\r|\n/g,` `)}function Ou(e,t=new Set,n){let{shown:r,anyRole:i}=Su(e,t,n),a=[...e.columns,...i?[yu]:[]],o=`| ${a.map(e=>Eu(e)).join(` | `)} |`,s=`| ${a.map(()=>`---`).join(` | `)} |`,c=[],l=[],u=!1,d=()=>{l.length!==0&&(c.push([o,s,...l].join(`
|
|
10
10
|
`)),l=[],u=!0)};for(let{row:e,role:t}of r){let{cells:n,heading:r}=ue(e);if(r!==void 0){d();let t=Array.isArray(e)?1:e.depth??1;c.push(`${`#`.repeat(Math.min(t+1,6))} ${Du(r)}`);continue}let a=[...n,...i?[t===void 0?null:Bc[t]]:[]];l.push(`| ${a.map(Eu).join(` | `)} |`)}return d(),!u&&c.length===0&&c.push([o,s].join(`
|
|
11
11
|
`)),`${c.join(`
|
|
12
12
|
|
|
13
|
-
`)}\n`}function ku(e,n){t.h(new Blob([``,Tu(e)],{type:`text/csv;charset=utf-8`}),n)}async function Au(e,n){let{default:r}=await Promise.resolve().then(()=>require("./browser-CUQnQIhV.cjs")),i=await r([e.columns.map(e=>({value:e,fontWeight:`bold`})),...e.rows.map(e=>e.map(e=>e===null?{value:void 0}:typeof e==`number`?{value:e,type:Number}:typeof e==`boolean`?{value:e,type:Boolean}:{value:e,type:String}))]).toBlob();t.h(i,n)}function ju(e,n,r,i){t.h(new Blob([Ou(e,n,r)],{type:`text/markdown;charset=utf-8`}),i)}var Mu=e=>JSON.parse(JSON.stringify(e));function Nu(e){let t=Mu(e);return delete t.comparedTo,t.rows=t.rows.filter(e=>e.type!==`task`||e.role!==`removed`).map(e=>e.type===`task`?(delete e.role,e.items=e.items.filter(e=>e.role!==`removed`).map(e=>(delete e.role,delete e.previous,e)),e):e),t}var Pu=`#e4e4e7`,Fu=`#ea580c`,Iu=`#dc2626`,Lu=`#2563eb`,Ru={fill:`#e4e4e7`,stroke:`#52525b`},zu=.35,Bu=.25,Vu=8,Hu=24,Uu=18,Wu=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];function Gu(e,t,n){let r=[];for(let i=0;i<10;i++){let a=i%2==0?n:n*.45,o=-Math.PI/2+i*Math.PI/5;r.push(`${(e+a*Math.cos(o)).toFixed(2)},${(t+a*Math.sin(o)).toFixed(2)}`)}return`M${r.join(`L`)}Z`}function Ku(e,t,n,r,i=1,a=`#a1a1aa`,o=6,s=.5){let c=[],l=i=>{for(let l=o;l<n+r;l+=o){let o=Math.min(l,n),u=Math.max(0,l-n),d=Math.max(0,l-r),f=Math.min(l,r);c.push({shape:`line`,x1:e+(i?n-o:o),y1:t+u,x2:e+(i?n-d:d),y2:t+f,stroke:a,strokeWidth:.6,opacity:s})}};return(i===1||i===3)&&l(!1),(i===2||i===3)&&l(!0),c}function qu(e){let[t,n,r]=Ue(e).split(`-`);return`${Number(r)} ${Wu[Number(n)-1]} ${t}`}function Ju(e,t){let n=Math.floor(t/Oe);return e.length<=n?e:`${e.slice(0,Math.max(1,n-1))}…`}function Yu(e,t,n){let r=e.rows[n.row];if(r?.type!==`task`)return``;let i=r.items[n.item],a=i.type===`activity`?`${i.start} to ${i.end}`:i.date,o=i.id===void 0?[]:t.dependencies.filter(e=>e.from===i.id||e.to===i.id),s=o.filter(e=>!e.satisfied).length;return[`${i.type} ${a}`,i.label,i.kind===void 0?void 0:`kind ${i.kind}`,`task "${r.label}" (${r.id})`,o.length===0?void 0:`${o.length} ${o.length===1?`dependency`:`dependencies`}${s>0?`, ${s} not satisfied`:``}`].filter(e=>e!==void 0).join(`, `)}function Xu(e,t){let n=t.comparison===`new`?Nu(e):e,r=bt(n),i=(()=>{let e=_t(n,t.today,{compact:t.compact,pxPerDay:1,onlyChanged:t.onlyChanged});return e.end-e.start+1})(),a=rt[t.scale??n.time.scale]??rt.month,o=!1;if(t.pxPerDay!==void 0)a=t.pxPerDay;else if(t.width!==void 0){let e=(t.width-r-16)/i;a=Math.max(Bu,e),o=e<Bu}let s=t.unit??(t.pxPerDay!==void 0||t.width!==void 0?t.scale:t.scale??n.time.scale),c=_t(n,t.today,{compact:t.compact,pxPerDay:a,onlyChanged:t.onlyChanged,...s===void 0?{}:{unit:s}}),l=zl(c.kinds,t.appearance?.kinds,{dashes:!1}),u=e=>e===void 0?Ru:l.get(e)??Ru,d=t.referenceLine??`today`,f=t.showDependencies??!0,p=[Al,Iu,Lu].map(e=>({id:du(`tl`,e),paint:e})),m=[{id:`header-ground`,primitives:[{shape:`rect`,x:0,y:0,width:c.width,height:58,fill:`#ffffff`},...c.unitLines.map(e=>({shape:`line`,x1:e,x2:e,y1:38,y2:58,stroke:Pu})),{shape:`line`,x1:0,x2:c.width,y1:57.5,y2:57.5,stroke:Al}]},...c.upper.map(e=>({id:`upper-${e.x}`,testId:`timeline-upper`,primitives:[{shape:`line`,x1:e.x,x2:e.x,y1:18,y2:58,stroke:Al},{shape:`text`,x:e.x+4,y:32,text:e.label,fontSize:11,fontWeight:600,fill:kl,fontFamily:Hl,testId:`timeline-upper`}]})),{id:`year-repeats`,primitives:(c.unit===`month`?c.months:[]).filter((e,t)=>t>0&&e.month%3==0&&e.month!==0).map(e=>({shape:`text`,x:e.x+4,y:32,text:String(e.year),fontSize:11,fill:Al,fontFamily:Hl,testId:`timeline-year-repeat`}))},{id:`units`,primitives:c.lower.map(e=>({shape:`text`,x:e.x+e.width/2,y:52,text:st(e,c.unit),fontSize:10,textAnchor:`middle`,fill:Al,fontFamily:Hl,testId:`timeline-unit`}))}];c.periods.length>0&&m.push({id:`calendar-bands`,primitives:c.periods.map(e=>({shape:`rect`,x:e.x,y:18,width:e.width,height:40,fill:e.kind===void 0?`#a1a1aa`:u(e.kind).stroke,fillOpacity:e.kind===void 0?.1:.12}))}),c.headerLabels.length>0&&m.push({id:`calendar-names`,primitives:c.headerLabels.map(e=>{let t=e.of===`period`?c.periods.find(t=>t.index===e.index)?.kind:c.references.find(t=>t.index===e.index)?.kind;return{shape:`text`,...e.of===`reference`?{x:e.x+e.width/2,textAnchor:`middle`}:{x:e.x},y:12,text:e.text,fontSize:10,fill:t===void 0?Al:u(t).stroke,fontFamily:Hl,testId:`timeline-${e.of}-name`}})});let h=d===`dated`?qu(t.today):`Today`;if(d!==`none`&&`x`in c.today){let e=c.today.x,t=Math.max(44,h.length*6+10);m.push({id:`today-tag`,testId:`timeline-today-tag`,primitives:[{shape:`rect`,x:e-t/2,y:1,width:t,height:15,rx:3,fill:Fu},{shape:`text`,x:e,y:12,text:h,fontSize:10,fontWeight:600,textAnchor:`middle`,fill:`#ffffff`,fontFamily:Hl},{shape:`line`,x1:e,x2:e,y1:16,y2:58,stroke:Fu,strokeWidth:2}]})}if(d!==`none`&&`outside`in c.today){let e=c.today.outside===`before`,t=d===`dated`?qu(c.today.day):`Today (${Ue(c.today.day)})`;m.push({id:`today-outside`,primitives:[{shape:`text`,x:e?4:c.width-4,y:12,text:e?`◂ ${t} is before this range`:`${t} is after this range ▸`,fontSize:10,fontWeight:600,textAnchor:e?`start`:`end`,fill:Fu,fontFamily:Hl,testId:`timeline-today-outside`,data:{side:c.today.outside}}]})}let g=(()=>{if(t.selection===void 0)return;let e=n.rows[t.selection.row];if(e?.type===`task`)return t.selection.item===void 0?e.id:e.items[t.selection.item]?.id})(),_=e=>g!==void 0&&(e.from===g||e.to===g),v=[{id:`rows-ground`,primitives:[{shape:`rect`,x:0,y:0,width:c.width,height:c.height,fill:`#ffffff`},...c.unitLines.map(e=>({shape:`line`,x1:e,x2:e,y1:0,y2:c.height,stroke:Pu}))]},...c.rows.map(e=>e.type===`separator`?{id:`separator-${e.row}`,testId:`timeline-separator`,primitives:[{shape:`rect`,x:0,y:e.y,width:c.width,height:e.height,fill:`#f4f4f5`},{shape:`line`,x1:0,x2:c.width,y1:e.y+.5,y2:e.y+.5,stroke:`#a1a1aa`,strokeWidth:1.5}]}:e.type===`section`?{id:`section-${e.row}`,testId:`timeline-section`,primitives:[{shape:`line`,x1:0,x2:c.width,y1:e.y+.5,y2:e.y+.5,stroke:`#a1a1aa`,strokeWidth:1.5}]}:{id:`row-${e.row}`,primitives:[{shape:`line`,x1:0,x2:c.width,y1:e.y+.5,y2:e.y+.5,stroke:`#f4f4f5`}]})];for(let e of c.periods){let t=n.periods[e.index],r=`${t.label??`Period`}: ${qu(He(t.start))} – ${qu(He(t.end))}`,i=[{shape:`rect`,x:e.x,y:0,width:e.width,height:c.height,fill:e.kind===void 0?`#a1a1aa`:u(e.kind).stroke,fillOpacity:e.kind===void 0?.1:.12}];e.kind===void 0&&i.push(...Ku(e.x,0,e.width,c.height)),v.push({id:`period-${e.index}`,testId:`timeline-period`,title:r,data:{...e.kind?{kind:e.kind}:{}},primitives:i})}for(let e of c.references){let t=e.kind===void 0?`#3f3f46`:u(e.kind).stroke;v.push({id:`reference-${e.index}`,testId:`timeline-reference`,title:`${e.label}: ${qu(He(e.date))}`,data:{...e.kind?{kind:e.kind}:{}},primitives:[{shape:`line`,x1:e.x,x2:e.x,y1:0,y2:c.height,stroke:t,strokeWidth:1.5,strokeDasharray:`6 3`}]})}if(f)for(let e of c.dependencies){let t=_(e),r=t?Lu:e.satisfied?Al:Iu,i=n.dependencies[e.index];v.push({id:`dependency-${e.index}`,testId:`timeline-dependency`,title:St(n,i,e.satisfied),data:{from:e.from,to:e.to,type:e.type,satisfied:String(e.satisfied),emphasised:String(t)},primitives:[{shape:`path`,d:`M${e.points.map(e=>`${e.x},${e.y}`).join(` L`)}`,stroke:r,strokeWidth:t?2.25:1.25,...e.satisfied?{}:{strokeDasharray:`4 3`},markerEnd:du(`tl`,r)}]})}for(let e of c.items){let r=u(e.kind),i=t.selection?.row===e.row&&t.selection.item===e.item,a=[],o=e.change===`removed`;if(e.ghost!==void 0&&(e.type===`activity`?a.push({shape:`rect`,x:e.ghost.x,y:e.ghost.y,width:e.ghost.width,height:e.ghost.height,rx:3,fill:`none`,stroke:r.stroke,strokeWidth:1.25,strokeDasharray:`4 3`,data:{previous:`true`}}):e.ghostCenter!==void 0&&(e.ghostCenter.y===e.center.y&&a.push({shape:`line`,x1:e.ghostCenter.x,x2:e.center.x,y1:e.center.y,y2:e.center.y,stroke:Al,strokeWidth:1,strokeDasharray:`2 2`}),a.push({shape:`path`,d:Gu(e.ghostCenter.x,e.ghostCenter.y,7),fill:`none`,stroke:r.stroke,strokeWidth:1,strokeDasharray:`2 2`,data:{previous:`true`}}))),o)a.push(e.type===`activity`?{shape:`rect`,x:e.glyph.x,y:e.glyph.y,width:e.glyph.width,height:e.glyph.height,rx:3,fill:`none`,stroke:r.stroke,strokeWidth:1.25,strokeDasharray:`4 3`}:{shape:`path`,d:Gu(e.center.x,e.center.y,7),fill:`none`,stroke:r.stroke,strokeWidth:1,strokeDasharray:`2 2`});else if(e.type===`activity`){let t=e.kind!==void 0;a.push({shape:`rect`,x:e.glyph.x,y:e.glyph.y,width:e.glyph.width,height:e.glyph.height,rx:3,fill:t?r.stroke:r.fill,...t?{fillOpacity:zu}:{},stroke:i?Lu:r.stroke,strokeWidth:i?2.5:1.25}),r.hatch!==void 0&&a.push(...Ku(e.glyph.x,e.glyph.y,e.glyph.width,e.glyph.height,r.hatch,r.stroke,4,.8))}else a.push({shape:`path`,d:Gu(e.center.x,e.center.y,7),fill:r.stroke,stroke:i?Lu:`#ffffff`,strokeWidth:i?2:.75});e.label!==void 0&&a.push({shape:`text`,x:e.label.x,y:e.label.y+12,...e.label.note!==void 0&&e.label.text.endsWith(e.label.note)?{text:e.label.text.slice(0,-e.label.note.length).trimEnd(),note:e.label.note}:{text:e.label.text},fontSize:11,fill:kl,fontFamily:Hl,testId:`timeline-annotation`,...e.label.struck?{textDecoration:`line-through`}:{},...e.label.inside?{}:{stroke:`#ffffff`,strokeWidth:3,paintOrder:`stroke`}}),v.push({id:`item-${e.row}-${e.item}`,testId:`timeline-${e.type}`,title:Yu(n,c,e),data:{row:String(e.row),item:String(e.item),...e.kind===void 0?{}:{kind:e.kind},...e.change===void 0?{}:{change:e.change},selected:String(i)},primitives:a})}d!==`none`&&`x`in c.today&&v.push({id:`today`,testId:`timeline-today`,primitives:[{shape:`line`,x1:c.today.x,x2:c.today.x,y1:0,y2:c.height,stroke:Fu,strokeWidth:2,opacity:.85}]});let y=c.rows.map(e=>{let t=58+e.y,n=e.type===`section`?`${e.label??``} (${e.tasks.length})`.trim():e.type===`separator`?e.label??``:e.label,i=e.type!==`task`;return{id:`label-${e.row}`,primitives:[...i?[{shape:`line`,x1:0,x2:r,y1:t+.5,y2:t+.5,stroke:`#a1a1aa`,strokeWidth:1}]:[],{shape:`text`,x:8,y:e.type===`separator`?t+e.height-6:t+e.height/2+4,text:Ju(n,r-12),fontSize:11,...i?{fontWeight:600}:{},fill:i?Al:kl,fontFamily:Hl}]}}),b=new Map;for(let e of n.rows)if(e.type===`task`)for(let t of e.items){if(t.kind===void 0)continue;let e=b.get(t.kind)??{activity:!1,milestone:!1};e[t.type]=!0,b.set(t.kind,e)}let x=Bl(c.kinds,l),ee=[],te=0,ne=0,re=r+c.width;for(let e of c.kinds){let t=u(e),n=b.get(e);if(n===void 0)continue;let r=x.has(e)?`${e} (same colour as ${x.get(e).join(`, `)})`:e,i=(n.activity?22:0)+(n.milestone?16:0)+r.length*Oe+18;te>0&&te+i>re&&(te=0,ne+=1);let a=ne*Uu,o=[],s=te;n.activity&&(o.push({shape:`rect`,x:s,y:a+4,width:16,height:8,rx:2,fill:t.stroke,stroke:t.stroke,fillOpacity:zu}),t.hatch!==void 0&&o.push(...Ku(s,a+4,16,8,t.hatch,t.stroke,4,.8)),s+=22),n.milestone&&(o.push({shape:`path`,d:Gu(s+6,a+8,6),fill:t.stroke}),s+=16),o.push({shape:`text`,x:s,y:a+12,text:r,fontSize:10,fill:Al,fontFamily:Hl}),ee.push({id:`legend-${e}`,...t.declared===!0?{title:`${e} — project colour`,data:{kind:e,"colour-source":`project`}}:{data:{kind:e}},primitives:o}),te+=i}let ie=[...c.periods.map(e=>({kind:e.kind,line:!1,text:n.periods[e.index].label??`Period`})),...c.references.map(e=>({kind:e.kind,line:!0,text:e.label}))];if(ie.length>0&&(te>0&&(te=0,ne+=1),ie.forEach((e,t)=>{let n=22+e.text.length*Oe+18;te>0&&te+n>re&&(te=0,ne+=1);let r=ne*Uu,i=e.kind===void 0?e.line?`#3f3f46`:`#a1a1aa`:u(e.kind).stroke;ee.push({id:`legend-calendar-${t}`,testId:`timeline-calendar-legend`,primitives:[e.line?{shape:`line`,x1:te+8,x2:te+8,y1:r+2,y2:r+14,stroke:i,strokeWidth:1.5,strokeDasharray:`3 2`}:{shape:`rect`,x:te,y:r+3,width:16,height:10,fill:i,fillOpacity:.25},{shape:`text`,x:te+22,y:r+12,text:e.text,fontSize:10,fill:Al,fontFamily:Hl}]}),te+=n})),n.comparedTo!==void 0){te>0&&(te=0,ne+=1);let e=ne*Uu,t=[{shape:`rect`,x:0,y:e+4,width:16,height:8,rx:2,fill:`none`,stroke:Al,strokeDasharray:`4 3`},{shape:`text`,x:22,y:e+12,text:`previous dates (${n.comparedTo.label})`,fontSize:10,fill:Al,fontFamily:Hl}],r=22+(`previous dates (${n.comparedTo.label})`.length+3)*Oe;t.push({shape:`text`,x:r,y:e+12,text:`(new)`,fontStyle:`italic`,fontSize:10,fill:Al,fontFamily:Hl},{shape:`text`,x:r+5*Oe,y:e+12,text:`: added since`,fontSize:10,fill:Al,fontFamily:Hl},{shape:`text`,x:r+20*Oe,y:e+12,text:`removed`,fontSize:10,fill:Al,fontFamily:Hl,textDecoration:`line-through`},{shape:`text`,x:r+28*Oe,y:e+12,text:`: dropped since`,fontSize:10,fill:Al,fontFamily:Hl}),ee.push({id:`legend-comparison`,testId:`timeline-comparison-legend`,primitives:t})}let ae=ee.length===0?0:(ne+1)*Uu+6;return{layout:c,pxPerDay:a,overWidth:o,labelWidth:r,tints:l,markers:p,header:m,rows:v,labels:y,legend:{groups:ee,height:ae}}}function Zu(e,t,n){let r=e=>{switch(e.shape){case`rect`:case`text`:return{...e,x:e.x+t,y:e.y+n};case`line`:return{...e,x1:e.x1+t,x2:e.x2+t,y1:e.y1+n,y2:e.y2+n};case`path`:return{...e,d:Qu(e.d,t,n)}}};return{...e,primitives:e.primitives.map(r),...e.groups?{groups:e.groups.map(e=>Zu(e,t,n))}:{}}}function Qu(e,t,n){return e.replace(/(-?\d+(?:\.\d+)?),(-?\d+(?:\.\d+)?)/g,(e,r,i)=>`${+(Number(r)+t).toFixed(2)},${+(Number(i)+n).toFixed(2)}`)}function $u(e,t){let n=Xu(e,{...t,selection:void 0}),r=t.comparison===`new`?void 0:e.comparedTo,i=Vu+(e.title?Hu:0)+(r?18:0),a=Vu,o=a+n.labelWidth,s=[];if(e.title&&s.push({id:`title`,primitives:[{shape:`text`,x:a,y:23,text:e.title,fontSize:13,fontWeight:600,fill:kl,fontFamily:Hl}]}),r){let t=Vu+(e.title?Hu:0)+12;s.push({id:`compared-to`,testId:`timeline-compared-to`,primitives:[{shape:`text`,x:a,y:t,text:`Compared with ${r.label}${r.date?` (${qu(He(r.date)??0)})`:``}`,fontSize:11,fill:Al,fontFamily:Hl}]})}s.push(...n.header.map(e=>Zu(e,o,i))),s.push(...n.rows.map(e=>Zu(e,o,i+58))),s.push(...n.labels.map(e=>Zu(e,a,i)));let c=i+58+n.layout.height+10;s.push(...n.legend.groups.map(e=>Zu(e,a,c)));let l=Math.ceil(o+n.layout.width+Vu),u=Math.ceil(c+n.legend.height+Vu);return{width:l,height:u,viewBox:`0 0 ${l} ${u}`,ariaLabel:`Timeline${e.title?` "${e.title}"`:``} from ${e.time.start} to ${e.time.end}`,background:`#ffffff`,markers:n.markers,groups:s,overWidth:n.overWidth}}function ed({primitive:e}){let t=Object.fromEntries(Object.entries(e.data??{}).map(([e,t])=>[`data-${e}`,t]));switch(e.shape){case`rect`:return(0,i.jsx)(`rect`,{...t,x:e.x,y:e.y,width:e.width,height:e.height,rx:e.rx,fill:e.fill,fillOpacity:e.fillOpacity,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.strokeDasharray,opacity:e.opacity});case`text`:return(0,i.jsxs)(`text`,{...t,"data-testid":e.testId,x:e.x,y:e.y,fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontStyle:e.fontStyle,textAnchor:e.textAnchor,fill:e.fill,stroke:e.stroke,strokeWidth:e.strokeWidth,paintOrder:e.paintOrder,textDecoration:e.textDecoration,opacity:e.opacity,children:[e.text,e.note!==void 0&&(0,i.jsxs)(i.Fragment,{children:[` `,(0,i.jsx)(`tspan`,{fontStyle:`italic`,children:e.note})]})]});case`line`:return(0,i.jsx)(`line`,{...t,x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.strokeDasharray,opacity:e.opacity,markerEnd:e.markerEnd===void 0?void 0:`url(#${e.markerEnd})`});case`path`:return(0,i.jsx)(`path`,{...t,d:e.d,fill:e.fill??`none`,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.strokeDasharray,strokeLinecap:e.strokeLinecap,opacity:e.opacity,markerEnd:e.markerEnd===void 0?void 0:`url(#${e.markerEnd})`,pointerEvents:`none`})}}function td({group:e,interaction:t}){let n=Object.fromEntries(Object.entries(e.data??{}).map(([e,t])=>[`data-${e}`,t])),{extra:r,before:a}=t?.(e)??{};return(0,i.jsxs)(`g`,{...n,"data-testid":e.testId,opacity:e.opacity,...r,children:[e.title===void 0?null:(0,i.jsx)(`title`,{children:e.title}),a,e.primitives.map((e,t)=>(0,i.jsx)(ed,{primitive:e},t)),(e.groups??[]).map(e=>(0,i.jsx)(td,{group:e,interaction:t},e.id))]})}function nd({markers:e}){return(0,i.jsx)(`defs`,{children:e.map(e=>(0,i.jsx)(`marker`,{id:e.id,markerWidth:`7`,markerHeight:`7`,refX:`9`,refY:`5`,viewBox:`0 0 10 10`,markerUnits:`userSpaceOnUse`,orient:`auto`,children:(0,i.jsx)(`path`,{d:`M0,0 L10,5 L0,10 z`,fill:e.paint})},e.id))})}var rd=`#2563eb`,id={fill:`#e4e4e7`,stroke:`#52525b`};function ad(e){let t=e.replace(/[^\p{L}\p{N}._-]+/gu,`-`),n=0,r=t.length;for(;n<r&&t[n]===`-`;)n+=1;for(;r>n&&t[r-1]===`-`;)--r;return t.slice(n,r)}var od=[`week`,`month`,`quarter`,`fit`];function sd(e){return{scale:e.time.scale,compact:!1,showDependencies:!0,comparison:`compare`,onlyChanged:!1}}function cd(e){return e.type===`activity`?`${e.start} to ${e.end}`:e.date}function ld({data:e,today:t,appearance:n,display:a,onDisplayChange:o}){let s=t??We(),[c,l]=(0,r.useState)(()=>sd(e)),u=a??c,d=o??l,f=e=>t=>d(n=>({...n,[e]:typeof t==`function`?t(n[e]):t})),p=e.comparedTo!==void 0,{comparison:m,onlyChanged:h,compact:g,showDependencies:_,scale:v}=u,y=f(`comparison`),b=f(`onlyChanged`),x=(0,r.useMemo)(()=>p&&m===`new`?Nu(e):e,[e,p,m]),ee=p&&m===`compare`&&h,te=f(`compact`),ne=f(`showDependencies`),[re,ie]=(0,r.useState)(void 0),ae=f(`scale`),oe=(0,r.useRef)(null),[se,ce]=(0,r.useState)(0);(0,r.useEffect)(()=>{let e=oe.current;if(e===null||(ce(e.clientWidth),typeof ResizeObserver>`u`))return;let t=0,n=new ResizeObserver(()=>{cancelAnimationFrame(t),t=requestAnimationFrame(()=>ce(e.clientWidth))});return n.observe(e),()=>{cancelAnimationFrame(t),n.disconnect()}},[]);let le=(He(x.time.end)??0)-(He(x.time.start)??0)+1,ue=se>0?se/le:0,de=v===`fit`?{pxPerDay:Math.max(Bu,ue)}:{pxPerDay:Math.max(rt[v],ue),unit:v},[fe,pe]=(0,r.useState)(void 0),me=(0,r.useMemo)(()=>Xu(x,{today:s,compact:g,showDependencies:_,appearance:n??null,referenceLine:`today`,onlyChanged:ee,...de,...re===void 0?{}:{selection:re.type===`item`?{row:re.row,item:re.item}:{row:re.row}}}),[x,s,g,_,n,re,ee,v,se]),he=me.layout,ge=me.tints,_e=(0,r.useMemo)(()=>{let e=!1;for(let t of x.rows)if(t.type===`separator`)e=!0;else if(e)return!0;return!1},[x]),ve=(0,r.useMemo)(()=>Bl(he.kinds,ge),[he.kinds,ge]),ye=(0,r.useMemo)(()=>bt(x),[x]),be=(0,r.useMemo)(()=>{let e=new Map;for(let t of x.rows)if(t.type===`task`)for(let n of t.items){if(n.kind===void 0)continue;let t=e.get(n.kind)??{activity:!1,milestone:!1};t[n.type]=!0,e.set(n.kind,t)}return e},[x]),xe=e=>e===void 0?id:ge.get(e)??id,Se=e=>ie(t=>t!==void 0&&t.type===e.type&&t.row===e.row&&(t.type===`task`||e.type===`item`&&t.item===e.item)?void 0:e),Ce=(e,t)=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),Se(t))},we=e=>{let t=e.data?.row,n=e.data?.item;if(e.testId!==`timeline-activity`&&e.testId!==`timeline-milestone`||t===void 0||n===void 0)return{};let r={type:`item`,row:Number(t),item:Number(n)},a=`${t}:${n}`,o=he.items.find(e=>e.row===r.row&&e.item===r.item);return{extra:{role:`button`,tabIndex:0,"aria-label":e.title,"aria-pressed":e.data?.selected===`true`,style:{cursor:`pointer`,outline:`none`},onClick:()=>Se(r),onKeyDown:e=>Ce(e,r),onFocus:()=>pe(a),onBlur:()=>pe(e=>e===a?void 0:e)},before:o===void 0?void 0:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`rect`,{"data-testid":`timeline-hit`,x:o.glyph.x,y:o.glyph.y,width:o.glyph.width,height:o.glyph.height,fill:`transparent`}),fe===a&&(0,i.jsx)(`rect`,{"data-testid":`timeline-focus-ring`,x:o.glyph.x-3,y:o.glyph.y-3,width:o.glyph.width+6,height:o.glyph.height+6,rx:4,fill:`none`,stroke:rd,strokeWidth:1.5,strokeDasharray:`3 2`})]})}},[Te,Ee]=(0,r.useState)(null),De=()=>Yl($u(x,{today:s,compact:g,showDependencies:_,onlyChanged:ee,appearance:n??null,referenceLine:`dated`,...de})),Oe=`timeline-${ad(x.title??`plan`)||`plan`}.svg`,ke=()=>{let e=URL.createObjectURL(new Blob([De()],{type:`image/svg+xml`})),t=document.createElement(`a`);t.href=e,t.download=Oe,t.click(),URL.revokeObjectURL(e),Ee(`SVG downloaded`),window.setTimeout(()=>Ee(null),2500)},Ae=async()=>{try{await navigator.clipboard.writeText(De()),Ee(`SVG markup copied`)}catch{Ee(`could not copy`)}window.setTimeout(()=>Ee(null),2500)};(0,r.useEffect)(()=>{let e=oe.current;if(e===null)return;let t=gt(he,e.clientWidth);t!==void 0&&(e.scrollLeft=t)},[]);let je=(0,r.useRef)(void 0),Me=e=>{let t=oe.current;t!==null&&(je.current=he.start+(t.scrollLeft+t.clientWidth/2)/me.pxPerDay),ae(e)};return(0,r.useLayoutEffect)(()=>{let e=oe.current,t=je.current;je.current=void 0,e!==null&&t!==void 0&&(e.scrollLeft=Math.max(0,(t-he.start)*me.pxPerDay-e.clientWidth/2))},[me.pxPerDay,he.start]),(0,i.jsxs)(`div`,{"data-testid":`timeline`,className:`w-full min-w-0 rounded border border-zinc-200 bg-white text-zinc-800 dark:border-zinc-700`,onKeyDown:e=>{e.key===`Escape`&&ie(void 0)},children:[x.title!==void 0&&x.title!==``&&(0,i.jsx)(`p`,{className:`border-b border-zinc-200 px-2 py-1 text-sm font-medium`,"data-testid":`timeline-title`,children:x.title}),p&&m===`compare`&&(0,i.jsxs)(`p`,{className:`border-b border-zinc-200 px-2 py-0.5 text-xs text-zinc-500`,"data-testid":`timeline-compared-to`,children:[`Compared with `,(0,i.jsx)(`span`,{className:`font-medium text-zinc-700`,children:e.comparedTo.label}),e.comparedTo.date===void 0?``:` (${e.comparedTo.date})`]}),(0,i.jsxs)(`div`,{className:`flex`,children:[(0,i.jsxs)(`div`,{className:`shrink-0 border-r border-zinc-200 text-xs`,style:{width:ye},"data-testid":`timeline-labels`,children:[(0,i.jsx)(`div`,{style:{height:58}}),he.rows.map(e=>e.type===`section`?(0,i.jsxs)(`div`,{"data-testid":`timeline-section-label`,className:`flex items-center border-t border-zinc-400 px-2 font-semibold text-zinc-600`,style:{height:e.height},title:`${e.label??`Untitled section`}: ${e.tasks.length} ${e.tasks.length===1?`task`:`tasks`}`,children:[(0,i.jsx)(`span`,{className:`truncate`,children:e.label??``}),(0,i.jsxs)(`span`,{className:`ml-1 shrink-0 font-normal text-zinc-400`,children:[`(`,e.tasks.length,`)`]})]},e.row):e.type===`separator`?(0,i.jsx)(`div`,{"data-testid":`timeline-separator-label`,className:`flex items-end border-t border-zinc-400 px-2 font-semibold text-zinc-600`,style:{height:e.height},children:e.label??``},e.row):(0,i.jsx)(`button`,{type:`button`,"data-testid":`timeline-task-label`,"aria-pressed":re?.type===`task`&&re.row===e.row,className:`block w-full truncate border-t border-zinc-100 px-2 text-left hover:bg-zinc-50 `+(re?.type===`task`&&re.row===e.row?`bg-blue-50 font-medium`:``),style:{height:e.height},title:`${e.label} (${e.id})`,onClick:()=>Se({type:`task`,row:e.row}),children:e.label},e.row))]}),(0,i.jsxs)(`div`,{ref:oe,className:`min-w-0 flex-1 overflow-x-auto`,"data-testid":`timeline-scroller`,children:[(0,i.jsx)(`svg`,{width:he.width,height:58,role:`img`,"aria-label":`Calendar from ${x.time.start} to ${x.time.end}`,"data-testid":`timeline-header`,xmlns:`http://www.w3.org/2000/svg`,style:{display:`block`},children:me.header.map(e=>(0,i.jsx)(td,{group:e},e.id))}),(0,i.jsxs)(`svg`,{width:he.width,height:he.height,role:`group`,"aria-label":`Tasks and items${x.title?` of ${x.title}`:``}`,"data-testid":`timeline-body`,xmlns:`http://www.w3.org/2000/svg`,style:{display:`block`},children:[(0,i.jsx)(nd,{markers:me.markers}),me.rows.map(e=>(0,i.jsx)(td,{group:e,interaction:we},e.id))]})]})]}),(0,i.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-t border-zinc-200 px-2 py-1 text-xs`,children:[(0,i.jsx)(`span`,{className:`flex items-center gap-1 text-zinc-500`,role:`group`,"aria-label":`Scale`,"data-testid":`timeline-scale`,children:od.map((e,t)=>(0,i.jsxs)(`span`,{className:`flex items-center gap-1`,children:[t>0&&(0,i.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,i.jsx)(`button`,{type:`button`,"data-scale":e,"aria-pressed":v===e,className:v===e?`font-semibold text-zinc-800`:`text-zinc-600 underline`,onClick:()=>Me(e),children:e})]},e))}),p&&(0,i.jsx)(`button`,{type:`button`,"data-testid":`timeline-comparison-toggle`,"aria-pressed":m===`new`,className:`text-zinc-600 underline`,onClick:()=>{ie(void 0),y(e=>e===`compare`?`new`:`compare`)},children:m===`compare`?`new version only`:`show the comparison`}),p&&m===`compare`&&(0,i.jsx)(`button`,{type:`button`,"data-testid":`timeline-only-changed-toggle`,"aria-pressed":h,className:`text-zinc-600 underline`,onClick:()=>{ie(void 0),b(e=>!e)},children:h?`show every task`:`only what moved`}),ee&&he.hiddenTasks>0&&(0,i.jsxs)(`span`,{className:`text-amber-700`,"data-testid":`timeline-unchanged-hidden`,children:[he.hiddenTasks,` unchanged `,he.hiddenTasks===1?`task`:`tasks`,` hidden`]}),_e&&(0,i.jsx)(`button`,{type:`button`,"data-testid":`timeline-compact-toggle`,"aria-pressed":g,className:`text-zinc-600 underline`,onClick:()=>{ie(e=>e?.type===`task`?void 0:e),te(e=>!e)},children:g?`one row per task`:`one row per section`}),(x.dependencies??[]).length>0&&(0,i.jsx)(`button`,{type:`button`,"data-testid":`timeline-dependencies-toggle`,"aria-pressed":!_,className:`text-zinc-600 underline`,onClick:()=>ne(e=>!e),children:_?`hide dependencies`:`show dependencies`}),!_&&(0,i.jsxs)(`span`,{className:`text-amber-700`,"data-testid":`timeline-dependencies-hidden`,children:[he.dependencies.length,` `,he.dependencies.length===1?`dependency`:`dependencies`,` hidden`,he.dependencies.some(e=>!e.satisfied)?`, some not satisfied by the dates`:``]}),(0,i.jsx)(`button`,{type:`button`,"data-testid":`timeline-download-svg`,className:`text-zinc-600 underline`,onClick:ke,children:`⤓ download SVG`}),(0,i.jsx)(`button`,{type:`button`,"data-testid":`timeline-copy-svg`,className:`text-zinc-600 underline`,onClick:()=>void Ae(),children:`copy markup`}),Te!==null&&(0,i.jsx)(`span`,{role:`status`,className:`text-emerald-700`,children:Te})]}),p&&m===`compare`&&(0,i.jsxs)(`p`,{className:`flex flex-wrap items-center gap-3 border-t border-zinc-200 px-2 py-1 text-xs text-zinc-500`,"data-testid":`timeline-comparison-key`,children:[(0,i.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,i.jsx)(`svg`,{width:18,height:12,"aria-hidden":`true`,children:(0,i.jsx)(`rect`,{x:1,y:2,width:16,height:8,rx:2,fill:`none`,stroke:`#71717a`,strokeDasharray:`4 3`})}),`previous dates`]}),(0,i.jsxs)(`span`,{children:[(0,i.jsx)(`i`,{children:`(new)`}),`: added since`]}),(0,i.jsxs)(`span`,{children:[(0,i.jsx)(`span`,{className:`line-through`,children:`removed`}),`: dropped since`]})]}),(he.periods.length>0||he.references.length>0)&&(0,i.jsxs)(`ul`,{className:`flex flex-wrap gap-3 border-t border-zinc-200 px-2 py-1 text-xs text-zinc-600`,"data-testid":`timeline-calendar-legend`,children:[he.periods.map(e=>{let t=x.periods[e.index];return(0,i.jsxs)(`li`,{className:`flex items-center gap-1`,"data-period":e.index,title:`${t.label??`Period`}: ${t.start} – ${t.end}`,children:[(0,i.jsx)(`span`,{"aria-hidden":`true`,className:`inline-block h-2.5 w-4 rounded-sm`,style:{background:e.kind===void 0?`#a1a1aa`:xe(e.kind).stroke,opacity:.35}}),t.label??`Period`]},`p${e.index}`)}),he.references.map(e=>(0,i.jsxs)(`li`,{className:`flex items-center gap-1`,"data-reference":e.index,title:`${e.label}: ${x.references[e.index].date}`,children:[(0,i.jsx)(`span`,{"aria-hidden":`true`,className:`inline-block h-3 border-l-2 border-dashed`,style:{borderColor:e.kind===void 0?`#3f3f46`:xe(e.kind).stroke}}),e.label]},`r${e.index}`))]}),he.kinds.some(e=>be.has(e))&&(0,i.jsx)(`ul`,{className:`flex flex-wrap gap-3 border-t border-zinc-200 px-2 py-1 text-xs`,"data-testid":`timeline-legend`,children:he.kinds.filter(e=>be.has(e)).map(e=>{let t=xe(e);return(0,i.jsxs)(`li`,{className:`flex items-center gap-1`,"data-kind":e,...t.declared===!0?{"data-colour-source":`project`,title:`${e} — project colour`}:{},children:[be.get(e)?.activity&&(0,i.jsxs)(`svg`,{width:18,height:12,"aria-hidden":`true`,"data-testid":`timeline-legend-bar`,children:[(0,i.jsx)(`rect`,{x:1,y:2,width:16,height:8,rx:2,fill:t.stroke,fillOpacity:.35,stroke:t.stroke}),t.hatch!==void 0&&Ku(1,2,16,8,t.hatch,t.stroke,4,.8).map((e,t)=>e.shape===`line`?(0,i.jsx)(`line`,{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity},t):null)]}),be.get(e)?.milestone&&(0,i.jsx)(`svg`,{width:14,height:14,"aria-hidden":`true`,"data-testid":`timeline-legend-star`,children:(0,i.jsx)(`path`,{d:Gu(7,7,6),fill:t.stroke})}),(0,i.jsx)(`span`,{className:`font-mono`,children:e}),t.declared===!0&&(0,i.jsx)(`span`,{className:`sr-only`,children:` (project colour)`}),ve.has(e)&&(0,i.jsxs)(`span`,{className:`text-zinc-500`,"data-testid":`timeline-legend-shared`,children:[`(same colour as `,ve.get(e).join(`, `),`)`]})]},e)})}),re!==void 0&&(0,i.jsx)(ud,{data:x,selection:re,dependencies:he.dependencies})]})}function ud({data:e,selection:t,dependencies:n}){let r=e.rows[t.row];if(r?.type!==`task`)return null;let a=t.type===`item`?r.items[t.item]:void 0,o=t.type===`task`?r.id:a?.id,s=o===void 0?[]:n.filter(e=>e.to===o),c=o===void 0?[]:n.filter(e=>e.from===o),l=(t,n)=>(0,i.jsxs)(`li`,{"data-satisfied":String(t.satisfied),className:t.satisfied?``:`text-red-700`,children:[xt(e,n),` — `,t.type,t.satisfied?``:` — not satisfied by the dates`]},t.index);return(0,i.jsx)(`div`,{className:`border-t border-zinc-200 px-2 py-1 text-xs`,"data-testid":`timeline-details`,role:`status`,children:(0,i.jsxs)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5`,children:[(0,i.jsx)(`dt`,{className:`text-zinc-500`,children:`Task`}),(0,i.jsxs)(`dd`,{children:[r.label,` `,(0,i.jsxs)(`span`,{className:`font-mono text-zinc-500`,children:[`(`,r.id,`)`]})]}),a!==void 0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`dt`,{className:`text-zinc-500`,children:`Type`}),(0,i.jsx)(`dd`,{children:a.type}),(0,i.jsx)(`dt`,{className:`text-zinc-500`,children:a.type===`activity`?`Dates`:`Date`}),(0,i.jsx)(`dd`,{className:`font-mono`,children:cd(a)}),a.label!==void 0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`dt`,{className:`text-zinc-500`,children:`Label`}),(0,i.jsx)(`dd`,{children:a.label})]}),a.kind!==void 0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`dt`,{className:`text-zinc-500`,children:`Kind`}),(0,i.jsx)(`dd`,{className:`font-mono`,children:a.kind})]}),a.id!==void 0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`dt`,{className:`text-zinc-500`,children:`Identifier`}),(0,i.jsx)(`dd`,{className:`font-mono`,children:a.id})]})]}),s.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`dt`,{className:`text-zinc-500`,children:`Waits on`}),(0,i.jsx)(`dd`,{children:(0,i.jsx)(`ul`,{"data-testid":`timeline-predecessors`,children:s.map(e=>l(e,e.from))})})]}),c.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`dt`,{className:`text-zinc-500`,children:`Needed by`}),(0,i.jsx)(`dd`,{children:(0,i.jsx)(`ul`,{"data-testid":`timeline-successors`,children:c.map(e=>l(e,e.to))})})]})]})})}var dd=(0,r.createContext)(null);function fd(e){let t=e.startsWith(`workspace:`)?e.slice(10):/^[a-z][a-z0-9+.-]*:/i.test(e)?null:e;if(t===null||t===``||/^(?:[\\/]|[a-z]:[\\/])/i.test(t))return null;let n=t.replaceAll(`\\`,`/`);return n.split(`/`).includes(`..`)?null:n}function pd(e){let t=fd(e);if(t!==null)return{kind:`workspace-file`,path:t};if(/^https?:\/\//i.test(e))return{kind:`external-url`,url:e}}function md(){let[e,t]=(0,r.useState)(void 0);return{hover:e=>({onPointerEnter:n=>t({text:e,x:n.clientX,y:n.clientY}),onPointerMove:n=>t({text:e,x:n.clientX,y:n.clientY}),onPointerLeave:()=>t(void 0)}),Tooltip:()=>e===void 0?null:(0,i.jsx)(`div`,{"data-testid":`diagram-tooltip`,role:`tooltip`,style:{position:`fixed`,left:e.x+14,top:e.y+14,zIndex:120},className:`pointer-events-none max-w-sm rounded bg-zinc-900 px-2 py-1 text-xs text-white shadow-lg dark:bg-zinc-100 dark:text-zinc-900`,children:e.text})}}function hd({data:e,isProposal:t,nudges:n,setNudges:a,hidden:o,setHidden:s,orientation:c,viewpoint:l}){let u=(0,r.useRef)(null),[d,f]=(0,r.useState)(void 0),[p,m]=(0,r.useState)(!1),{hover:h,Tooltip:g}=md(),_=(0,r.useRef)(void 0);(0,r.useEffect)(()=>()=>_.current?.(),[]);let v=(0,r.useContext)(dd),y=(0,r.useMemo)(()=>_u(e,{isProposal:t,hidden:o,nudges:n,orientation:c,...l===void 0?{}:{viewpoint:l},...v===null?{}:{appearance:v}}),[e,t,o,n,c,l,v]),b=e=>{if(e.button!==0)return;let t=e.target;if(t.closest(`[data-draggable="node"]`)!==null||t.closest(`[data-legend-entry]`)!==null)return;let n=u.current?.parentElement??null;for(;n!==null&&n.scrollWidth<=n.clientWidth&&n.scrollHeight<=n.clientHeight;)n=n.parentElement;if(n===null)return;e.preventDefault();let r=e.clientX,i=e.clientY,a=n.scrollLeft,o=n.scrollTop,s=e.currentTarget;s.setPointerCapture?.(e.pointerId),m(!0);let c=e=>{n.scrollLeft=a-(e.clientX-r),n.scrollTop=o-(e.clientY-i)},l=()=>{_.current=void 0,s.releasePointerCapture?.(e.pointerId),s.removeEventListener(`pointermove`,c),s.removeEventListener(`pointerup`,l),s.removeEventListener(`pointercancel`,l),m(!1)};_.current?.(),_.current=l,s.addEventListener(`pointermove`,c),s.addEventListener(`pointerup`,l),s.addEventListener(`pointercancel`,l)},x=e=>t=>{if(t.button!==0)return;t.preventDefault();let r=u.current,i=r===null?1:(r.getBoundingClientRect().width||y.width)/y.width,o=t.clientX,s=t.clientY,c=n.get(e)??{dx:0,dy:0},l=t.currentTarget;l.setPointerCapture?.(t.pointerId),f(e);let d=t=>{let r=new Map(n);r.set(e,{dx:c.dx+(t.clientX-o)/i,dy:c.dy+(t.clientY-s)/i}),a(r)},p=()=>{_.current=void 0,l.releasePointerCapture?.(t.pointerId),l.removeEventListener(`pointermove`,d),l.removeEventListener(`pointerup`,p),l.removeEventListener(`pointercancel`,p),f(void 0)};_.current?.(),_.current=p,l.addEventListener(`pointermove`,d),l.addEventListener(`pointerup`,p),l.addEventListener(`pointercancel`,p)},ee=e=>{let t=new Set(o);t.delete(e)||t.add(e),s(t)},te=e=>{let t=e.data?.[`element-id`];if(e.data?.draggable===`node`&&t!==void 0)return{extra:{onPointerDown:x(t),style:{cursor:d===t?`grabbing`:`grab`},...e.title===void 0?{}:h(e.title)}};if(e.data?.[`relationship-role`]!==void 0){let t=e.primitives.find(e=>e.shape===`path`&&e.data?.edge===`line`);return{extra:e.title===void 0?{}:h(e.title),before:t===void 0||t.shape!==`path`?null:(0,i.jsx)(`path`,{"data-edge":`hit`,"data-hit":`edge`,d:t.d,fill:`none`,stroke:`transparent`,strokeWidth:14,pointerEvents:`stroke`})}}let n=e.data?.[`legend-entry`];if(n!==void 0&&e.data?.toggles===`true`){let t=e.primitives[0],r=t.shape===`rect`?t.x:t.shape===`line`?t.x1:0,a=t.shape===`rect`?t.y:t.shape===`line`?t.y1-5:0,o=e.primitives.find(e=>e.shape===`text`),s=o?.shape===`text`?tu(o.text.replace(` (hidden)`,``))-8:0;return{extra:{onClick:()=>ee(n),style:{cursor:`pointer`}},before:(0,i.jsx)(`rect`,{"data-hit":`legend`,x:r-3,y:a-3,width:s,height:16,fill:`transparent`})}}return{}};return(0,i.jsxs)(i.Fragment,{children:[n.size>0&&(0,i.jsx)(`button`,{type:`button`,className:`mb-1 text-xs underline text-neutral-500 hover:text-neutral-800 dark:hover:text-neutral-200`,onClick:()=>a(new Map),children:`reset layout`}),(0,i.jsx)(g,{}),(0,i.jsxs)(`svg`,{ref:u,role:`img`,"aria-label":y.ariaLabel,viewBox:y.viewBox,width:y.width,height:y.height,xmlns:`http://www.w3.org/2000/svg`,onPointerDown:b,style:{cursor:p?`grabbing`:`grab`,touchAction:`none`},children:[(0,i.jsx)(`rect`,{x:Number(y.viewBox.split(` `)[0]),y:Number(y.viewBox.split(` `)[1]),width:y.width,height:y.height,fill:y.background}),(0,i.jsx)(nd,{markers:y.markers}),y.groups.map(e=>(0,i.jsx)(td,{group:e,interaction:te},e.id))]})]})}function gd({data:e,isProposal:t}){let{hover:n,Tooltip:a}=md(),o=(0,r.useContext)(dd),s=(0,r.useMemo)(()=>vu(e,{isProposal:t,...o===null?{}:{appearance:o}}),[e,t,o]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(`svg`,{role:`img`,"aria-label":s.ariaLabel,viewBox:s.viewBox,width:s.width,height:s.height,xmlns:`http://www.w3.org/2000/svg`,children:[(0,i.jsx)(`rect`,{x:0,y:0,width:s.width,height:s.height,fill:s.background}),(0,i.jsx)(nd,{markers:s.markers}),s.groups.map(e=>(0,i.jsx)(td,{group:e,interaction:e=>e.title===void 0?{}:{extra:n(e.title)}},e.id))]}),(0,i.jsx)(a,{})]})}var _d={added:`bg-emerald-50 dark:bg-emerald-950/40`,changed:`bg-amber-50 dark:bg-amber-950/40`,context:`bg-zinc-50 text-zinc-500 dark:bg-zinc-900/60 dark:text-zinc-400`,removed:`bg-red-50 text-red-800 dark:bg-red-950/40 dark:text-red-200`},vd=48,yd=16,bd={attribute:{label:`is`,className:`text-zinc-600 dark:text-zinc-300`},expects:{label:`expects`,className:`text-amber-700 dark:text-amber-400`},assigns:{label:`asks to set`,className:`text-blue-700 dark:text-blue-400`},removes:{label:`asks to unset`,className:`text-rose-700 line-through dark:text-rose-400`}};function xd({uri:e,text:t,dispatch:n,sha256:r}){let a=pd(e);return a===void 0||n===void 0?(0,i.jsx)(`span`,{"data-followable":`no`,children:t}):a.kind===`workspace-file`?(0,i.jsx)(`button`,{type:`button`,"data-followable":`workspace-file`,className:`text-left underline decoration-dotted underline-offset-2 hover:decoration-solid`,onClick:()=>n({kind:`openFile`,path:a.path,...r===void 0?{}:{sha256:r}}),children:t}):(0,i.jsx)(`a`,{"data-followable":`external-url`,className:`underline decoration-dotted underline-offset-2 hover:decoration-solid`,href:a.url,target:`_blank`,rel:`noreferrer`,children:t})}function Sd({item:e,traces:t,dispatch:n}){let a=[...e.attributes.map(([e,t])=>[`attribute`,e,Le(t)]),...e.expectations.map(([e,t])=>[`expects`,e,Le(t)]),...e.assignments.map(([e,t])=>[`assigns`,e,Le(t)]),...e.removedAttributes.map(e=>[`removes`,e,``])],o=t??[];if(a.length===0&&e.locations.length===0&&e.artifacts.length===0&&o.length===0)return null;let s=[a.length>0?`${a.length} attribute${a.length===1?``:`s`}`:``,o.length>0?`${o.length} relation${o.length===1?``:`s`}`:``,e.locations.length>0?`${e.locations.length} location${e.locations.length===1?``:`s`}`:``,e.artifacts.length>0?`${e.artifacts.length} artifact${e.artifacts.length===1?``:`s`}`:``].filter(Boolean);return(0,i.jsxs)(`details`,{className:`mt-1 text-[11px]`,"data-testid":`structured-enrichment`,children:[(0,i.jsx)(`summary`,{className:`cursor-pointer text-zinc-500 dark:text-zinc-400`,children:s.join(`, `)}),(0,i.jsxs)(`dl`,{className:`mt-1 grid grid-cols-[auto_auto_1fr] gap-x-2 gap-y-0.5`,children:[a.map(([e,t,n],a)=>(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(`dt`,{className:`font-medium ${bd[e].className}`,"data-claim":e,children:bd[e].label}),(0,i.jsx)(`dd`,{className:`font-mono text-zinc-700 dark:text-zinc-200`,children:t}),(0,i.jsx)(`dd`,{className:`break-words text-zinc-600 dark:text-zinc-300`,children:n})]},`${e}-${t}-${a}`)),o.map((e,t)=>(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(`dt`,{className:`font-medium text-violet-700 dark:text-violet-400`,"data-claim":`relates`,children:e.kind}),(0,i.jsxs)(`dd`,{className:`col-span-2 break-words text-zinc-600 dark:text-zinc-300`,children:[e.fromLabel,` → `,e.toLabel,e.toRow===void 0&&e.toRef!==void 0?` (outside this document)`:``]})]},`trace-${t}`)),e.locations.map((e,t)=>(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(`dt`,{className:`font-medium text-zinc-500 dark:text-zinc-400`,"data-claim":`location`,children:`at`}),(0,i.jsx)(`dd`,{className:`col-span-2 break-all font-mono text-zinc-600 dark:text-zinc-300`,children:(0,i.jsx)(xd,{uri:e.uri,text:Re(e),dispatch:n})})]},`location-${t}`)),e.artifacts.map((e,t)=>(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(`dt`,{className:`font-medium text-zinc-500 dark:text-zinc-400`,"data-claim":`artifact`,children:e.rel}),(0,i.jsx)(`dd`,{className:`col-span-2 break-all font-mono text-zinc-600 dark:text-zinc-300`,children:(0,i.jsx)(xd,{uri:e.uri,text:ze(e),dispatch:n,sha256:e.sha256})})]},`artifact-${t}`))]})]})}function Cd({data:e,hidden:t,setHidden:n,rows:a,traces:o=[],dispatch:s}){let[c,l]=(0,r.useState)(null),u=(0,r.useRef)(null),d=(0,r.useCallback)(()=>[...u.current?.querySelectorAll(`th`)??[]].map(e=>Math.max(vd,Math.round(e.getBoundingClientRect().width))),[]),f=(0,r.useCallback)((e,t)=>l(n=>{let r=n??d(),i=[...r];return i[e]=Math.max(vd,Math.round(t(r[e]??vd))),i}),[d]);function p(e,t){e.preventDefault();let n=e.clientX,r=c??d();l(r);let i=e=>{let i=r[t]??vd;f(t,()=>i+(e.clientX-n))},a=()=>{window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a),window.removeEventListener(`pointercancel`,a)};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a),window.addEventListener(`pointercancel`,a)}let m=c?.reduce((e,t)=>e+t,0),h=(e,t,n)=>(0,i.jsx)(`div`,{role:n?`separator`:`presentation`,"aria-orientation":n?`vertical`:void 0,"aria-label":n?`Resize column ${t}`:void 0,"aria-hidden":!n||void 0,tabIndex:n?0:void 0,onPointerDown:t=>p(t,e),onKeyDown:t=>{if(t.key!==`ArrowLeft`&&t.key!==`ArrowRight`)return;t.preventDefault();let n=t.key===`ArrowRight`?yd:-16;f(e,e=>e+n)},className:`absolute -right-px top-0 h-full w-1.5 cursor-col-resize touch-none hover:bg-zinc-400 focus:bg-zinc-400 focus:outline-none dark:hover:bg-zinc-500 dark:focus:bg-zinc-500`}),g=Hc(e),_=(e,t)=>a?.[t]?.role??Uc(e,g),v=[...new Set(e.rows.map(_).filter(e=>e!==void 0))].sort((e,t)=>Vc.indexOf(e)-Vc.indexOf(t)),y=e.rows.map((e,t)=>({row:e,index:t})).filter(({row:e,index:n})=>{let r=_(e,n);return r===void 0||!t.has(ll(`role`,r))}),b=new Map;for(let e of o)for(let t of[e.fromRow,e.toRow]){if(t===void 0)continue;let n=b.get(t);n===void 0?b.set(t,[e]):n.includes(e)||n.push(e)}let x=e=>{let r=new Set(t),i=ll(`role`,e);r.has(i)?r.delete(i):r.add(i),n(r)};return(0,i.jsxs)(`div`,{className:`overflow-x-auto`,children:[v.length>0&&(0,i.jsx)(`div`,{className:`mb-2 flex flex-wrap items-center gap-2 text-[11px]`,"data-testid":`table-role-key`,children:v.map(e=>{let n=t.has(ll(`role`,e));return(0,i.jsxs)(`button`,{type:`button`,onClick:()=>x(e),"aria-pressed":!n,className:`flex items-center gap-1 rounded border border-zinc-300 px-1.5 py-0.5 dark:border-zinc-700 ${n?`opacity-50`:``}`,children:[(0,i.jsx)(`span`,{className:`inline-block h-2.5 w-2.5 rounded-sm ${_d[e].split(` `)[0]}`}),(0,i.jsxs)(`span`,{children:[Bc[e],n?` (hidden)`:``]})]},e)})}),(0,i.jsxs)(`table`,{className:`border-collapse text-xs ${c?``:`w-full`}`,style:m===void 0?void 0:{tableLayout:`fixed`,width:m},children:[(0,i.jsx)(`colgroup`,{children:e.columns.map((e,t)=>(0,i.jsx)(`col`,{style:c?{width:c[t]}:void 0},t))}),(0,i.jsx)(`thead`,{children:(0,i.jsx)(`tr`,{ref:u,children:e.columns.map((e,t)=>(0,i.jsxs)(`th`,{className:`relative border border-zinc-300 px-2 py-1 text-left font-medium dark:border-zinc-700`,children:[(0,i.jsx)(`span`,{className:`block truncate`,children:e}),h(t,e,!0)]},t))})}),(0,i.jsx)(`tbody`,{children:y.map(({row:t,index:n},r)=>{let{cells:o,heading:c}=ue(t),l=a?.[n],u=l?.role??Uc(t,g),d=l?.id===void 0?[]:b.get(l.id)??[];if(c!==void 0){let t=Math.min(Math.max(l?.depth??1,1),6);return(0,i.jsx)(`tr`,{"data-row-heading":t,className:u===void 0?void 0:_d[u],children:(0,i.jsx)(`th`,{scope:`colgroup`,colSpan:e.columns.length,style:{paddingLeft:`${.5+(t-1)*.75}rem`},className:`border border-zinc-200 bg-zinc-50 py-1 text-left font-semibold dark:border-zinc-800 dark:bg-zinc-900 ${t===1?`text-xs`:`text-[11px] font-medium`} ${u===`removed`?`line-through`:``}`,children:c})},r)}return(0,i.jsx)(`tr`,{className:u===void 0?void 0:_d[u],"data-row-role":u,"data-row-kind":l?.kind,"data-row-ref":l?.ref,children:o.map((t,n)=>(0,i.jsxs)(`td`,{className:`relative border border-zinc-200 px-2 py-1 align-top break-words dark:border-zinc-800 ${u===`removed`?`line-through`:``}`,children:[t===null?(0,i.jsx)(`span`,{className:`opacity-40`,children:`—`}):String(t),n===0&&l!==void 0?(0,i.jsx)(Sd,{item:l,traces:d,dispatch:s}):null,h(n,e.columns[n]??``,!1)]},n))},r)})})]})]})}function wd(e,t){if(e===void 0)return JSON.stringify(t,null,2);try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function Td(e,t=` `){let n=[],r=(e,r)=>{for(let i of r)n.push(`${t}${e}: ${i}`)};return r(`attribute`,e.attributes.map(([e,t])=>Ie(e,t))),r(`expects`,e.expectations.map(([e,t])=>Ie(e,t))),r(`asks to set`,e.assignments.map(([e,t])=>Ie(e,t))),r(`asks to unset`,e.removedAttributes),r(`at`,e.locations.map(e=>Re(e))),r(`artifact`,e.artifacts.map(e=>ze(e))),n}function Ed(e){let t=e.profile===void 0?``:` "${e.profile}"`;if(e.state===`unchecked`)return`Could not be checked against this project's profile${t}: the project's profile registry cannot be used right now.`;if(e.state===`strays`)return`Does not conform to this project's profile${t} as it stands now.`;let n=e.openValues,r=e.findings??0,i=[n===0?void 0:`${n} value${n===1?``:`s`} outside its open enumerations`,r===0?void 0:`${r} finding${r===1?``:`s`} to check`].filter(e=>e!==void 0);return`Conforms to this project's profile${t}${i.length===0?``:`, with ${i.join(` and `)}`}.`}function Dd(e,t,n=ul,r){let i=rl(e,t),a=[];if(i.profile!==void 0&&a.push(`Profile: ${i.profile}`),r!==void 0&&a.push(`Conformance: ${Ed(r)}`),i.target!==void 0){let e=i.target.revision===void 0?``:`, prepared against ${i.target.revision}`;a.push(`Proposes changes to ${i.target.ref}${e}`),a.push(`Expectations below are the producer's; the receiving authority checks them before applying.`)}for(let e of i.artifacts)a.push(`Artifact — ${ze(e)}`);if(a.length>0&&a.push(``),e.kind===`timeline`)return a.push(...Ct(e.data)),a.join(`
|
|
13
|
+
`)}\n`}function ku(e,n){t.h(new Blob([``,Tu(e)],{type:`text/csv;charset=utf-8`}),n)}async function Au(e,n){let{default:r}=await Promise.resolve().then(()=>require("./browser-CUQnQIhV.cjs")),i=await r([e.columns.map(e=>({value:e,fontWeight:`bold`})),...e.rows.map(e=>e.map(e=>e===null?{value:void 0}:typeof e==`number`?{value:e,type:Number}:typeof e==`boolean`?{value:e,type:Boolean}:{value:e,type:String}))]).toBlob();t.h(i,n)}function ju(e,n,r,i){t.h(new Blob([Ou(e,n,r)],{type:`text/markdown;charset=utf-8`}),i)}var Mu=e=>JSON.parse(JSON.stringify(e));function Nu(e){let t=Mu(e);return delete t.comparedTo,t.rows=t.rows.filter(e=>e.type!==`task`||e.role!==`removed`).map(e=>e.type===`task`?(delete e.role,e.items=e.items.filter(e=>e.role!==`removed`).map(e=>(delete e.role,delete e.previous,e)),e):e),t}var Pu=`#e4e4e7`,Fu=`#ea580c`,Iu=`#dc2626`,Lu=`#2563eb`,Ru={fill:`#e4e4e7`,stroke:`#52525b`},zu=.35,Bu=.25,Vu=8,Hu=24,Uu=18,Wu=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`];function Gu(e,t,n){let r=[];for(let i=0;i<10;i++){let a=i%2==0?n:n*.45,o=-Math.PI/2+i*Math.PI/5;r.push(`${(e+a*Math.cos(o)).toFixed(2)},${(t+a*Math.sin(o)).toFixed(2)}`)}return`M${r.join(`L`)}Z`}function Ku(e,t,n,r,i=1,a=`#a1a1aa`,o=6,s=.5){let c=[],l=i=>{for(let l=o;l<n+r;l+=o){let o=Math.min(l,n),u=Math.max(0,l-n),d=Math.max(0,l-r),f=Math.min(l,r);c.push({shape:`line`,x1:e+(i?n-o:o),y1:t+u,x2:e+(i?n-d:d),y2:t+f,stroke:a,strokeWidth:.6,opacity:s})}};return(i===1||i===3)&&l(!1),(i===2||i===3)&&l(!0),c}function qu(e){let[t,n,r]=Ue(e).split(`-`);return`${Number(r)} ${Wu[Number(n)-1]} ${t}`}function Ju(e,t){let n=Math.floor(t/Oe);return e.length<=n?e:`${e.slice(0,Math.max(1,n-1))}…`}function Yu(e,t,n){let r=e.rows[n.row];if(r?.type!==`task`)return``;let i=r.items[n.item],a=i.type===`activity`?`${i.start} to ${i.end}`:i.date,o=i.id===void 0?[]:t.dependencies.filter(e=>e.from===i.id||e.to===i.id),s=o.filter(e=>!e.satisfied).length;return[`${i.type} ${a}`,i.label,i.kind===void 0?void 0:`kind ${i.kind}`,`task "${r.label}" (${r.id})`,o.length===0?void 0:`${o.length} ${o.length===1?`dependency`:`dependencies`}${s>0?`, ${s} not satisfied`:``}`].filter(e=>e!==void 0).join(`, `)}function Xu(e,t){let n=t.comparison===`new`?Nu(e):e,r=bt(n),i=(()=>{let e=_t(n,t.today,{compact:t.compact,pxPerDay:1,onlyChanged:t.onlyChanged});return e.end-e.start+1})(),a=rt[t.scale??n.time.scale]??rt.month,o=!1;if(t.pxPerDay!==void 0)a=t.pxPerDay;else if(t.width!==void 0){let e=(t.width-r-16)/i;a=Math.max(Bu,e),o=e<Bu}let s=t.unit??(t.pxPerDay!==void 0||t.width!==void 0?t.scale:t.scale??n.time.scale),c=_t(n,t.today,{compact:t.compact,pxPerDay:a,onlyChanged:t.onlyChanged,...s===void 0?{}:{unit:s}}),l=zl(c.kinds,t.appearance?.kinds,{dashes:!1}),u=e=>e===void 0?Ru:l.get(e)??Ru,d=t.referenceLine??`today`,f=t.showDependencies??!0,p=[Al,Iu,Lu].map(e=>({id:du(`tl`,e),paint:e})),m=[{id:`header-ground`,primitives:[{shape:`rect`,x:0,y:0,width:c.width,height:58,fill:`#ffffff`},...c.unitLines.map(e=>({shape:`line`,x1:e,x2:e,y1:38,y2:58,stroke:Pu})),{shape:`line`,x1:0,x2:c.width,y1:57.5,y2:57.5,stroke:Al}]},...c.upper.map(e=>({id:`upper-${e.x}`,testId:`timeline-upper`,primitives:[{shape:`line`,x1:e.x,x2:e.x,y1:18,y2:58,stroke:Al},{shape:`text`,x:e.x+4,y:32,text:e.label,fontSize:11,fontWeight:600,fill:kl,fontFamily:Hl,testId:`timeline-upper`}]})),{id:`year-repeats`,primitives:(c.unit===`month`?c.months:[]).filter((e,t)=>t>0&&e.month%3==0&&e.month!==0).map(e=>({shape:`text`,x:e.x+4,y:32,text:String(e.year),fontSize:11,fill:Al,fontFamily:Hl,testId:`timeline-year-repeat`}))},{id:`units`,primitives:c.lower.map(e=>({shape:`text`,x:e.x+e.width/2,y:52,text:st(e,c.unit),fontSize:10,textAnchor:`middle`,fill:Al,fontFamily:Hl,testId:`timeline-unit`}))}];c.periods.length>0&&m.push({id:`calendar-bands`,primitives:c.periods.map(e=>({shape:`rect`,x:e.x,y:18,width:e.width,height:40,fill:e.kind===void 0?`#a1a1aa`:u(e.kind).stroke,fillOpacity:e.kind===void 0?.1:.12}))}),c.headerLabels.length>0&&m.push({id:`calendar-names`,primitives:c.headerLabels.map(e=>{let t=e.of===`period`?c.periods.find(t=>t.index===e.index)?.kind:c.references.find(t=>t.index===e.index)?.kind;return{shape:`text`,...e.of===`reference`?{x:e.x+e.width/2,textAnchor:`middle`}:{x:e.x},y:12,text:e.text,fontSize:10,fill:t===void 0?Al:u(t).stroke,fontFamily:Hl,testId:`timeline-${e.of}-name`}})});let h=d===`dated`?qu(t.today):`Today`;if(d!==`none`&&`x`in c.today){let e=c.today.x,t=Math.max(44,h.length*6+10);m.push({id:`today-tag`,testId:`timeline-today-tag`,primitives:[{shape:`rect`,x:e-t/2,y:1,width:t,height:15,rx:3,fill:Fu},{shape:`text`,x:e,y:12,text:h,fontSize:10,fontWeight:600,textAnchor:`middle`,fill:`#ffffff`,fontFamily:Hl},{shape:`line`,x1:e,x2:e,y1:16,y2:58,stroke:Fu,strokeWidth:2}]})}if(d!==`none`&&`outside`in c.today){let e=c.today.outside===`before`,t=d===`dated`?qu(c.today.day):`Today (${Ue(c.today.day)})`;m.push({id:`today-outside`,primitives:[{shape:`text`,x:e?4:c.width-4,y:12,text:e?`◂ ${t} is before this range`:`${t} is after this range ▸`,fontSize:10,fontWeight:600,textAnchor:e?`start`:`end`,fill:Fu,fontFamily:Hl,testId:`timeline-today-outside`,data:{side:c.today.outside}}]})}let g=(()=>{if(t.selection===void 0)return;let e=n.rows[t.selection.row];if(e?.type===`task`)return t.selection.item===void 0?e.id:e.items[t.selection.item]?.id})(),_=e=>g!==void 0&&(e.from===g||e.to===g),v=[{id:`rows-ground`,primitives:[{shape:`rect`,x:0,y:0,width:c.width,height:c.height,fill:`#ffffff`},...c.unitLines.map(e=>({shape:`line`,x1:e,x2:e,y1:0,y2:c.height,stroke:Pu}))]},...c.rows.map(e=>e.type===`separator`?{id:`separator-${e.row}`,testId:`timeline-separator`,primitives:[{shape:`rect`,x:0,y:e.y,width:c.width,height:e.height,fill:`#f4f4f5`},{shape:`line`,x1:0,x2:c.width,y1:e.y+.5,y2:e.y+.5,stroke:`#a1a1aa`,strokeWidth:1.5}]}:e.type===`section`?{id:`section-${e.row}`,testId:`timeline-section`,primitives:[{shape:`line`,x1:0,x2:c.width,y1:e.y+.5,y2:e.y+.5,stroke:`#a1a1aa`,strokeWidth:1.5}]}:{id:`row-${e.row}`,primitives:[{shape:`line`,x1:0,x2:c.width,y1:e.y+.5,y2:e.y+.5,stroke:`#f4f4f5`}]})];for(let e of c.periods){let t=n.periods[e.index],r=`${t.label??`Period`}: ${qu(He(t.start))} – ${qu(He(t.end))}`,i=[{shape:`rect`,x:e.x,y:0,width:e.width,height:c.height,fill:e.kind===void 0?`#a1a1aa`:u(e.kind).stroke,fillOpacity:e.kind===void 0?.1:.12}];e.kind===void 0&&i.push(...Ku(e.x,0,e.width,c.height)),v.push({id:`period-${e.index}`,testId:`timeline-period`,title:r,data:{...e.kind?{kind:e.kind}:{}},primitives:i})}for(let e of c.references){let t=e.kind===void 0?`#3f3f46`:u(e.kind).stroke;v.push({id:`reference-${e.index}`,testId:`timeline-reference`,title:`${e.label}: ${qu(He(e.date))}`,data:{...e.kind?{kind:e.kind}:{}},primitives:[{shape:`line`,x1:e.x,x2:e.x,y1:0,y2:c.height,stroke:t,strokeWidth:1.5,strokeDasharray:`6 3`}]})}if(f)for(let e of c.dependencies){let t=_(e),r=t?Lu:e.satisfied?Al:Iu,i=n.dependencies[e.index];v.push({id:`dependency-${e.index}`,testId:`timeline-dependency`,title:St(n,i,e.satisfied),data:{from:e.from,to:e.to,type:e.type,satisfied:String(e.satisfied),emphasised:String(t)},primitives:[{shape:`path`,d:`M${e.points.map(e=>`${e.x},${e.y}`).join(` L`)}`,stroke:r,strokeWidth:t?2.25:1.25,...e.satisfied?{}:{strokeDasharray:`4 3`},markerEnd:du(`tl`,r)}]})}for(let e of c.items){let r=u(e.kind),i=t.selection?.row===e.row&&t.selection.item===e.item,a=[],o=e.change===`removed`;if(e.ghost!==void 0&&(e.type===`activity`?a.push({shape:`rect`,x:e.ghost.x,y:e.ghost.y,width:e.ghost.width,height:e.ghost.height,rx:3,fill:`none`,stroke:r.stroke,strokeWidth:1.25,strokeDasharray:`4 3`,data:{previous:`true`}}):e.ghostCenter!==void 0&&(e.ghostCenter.y===e.center.y&&a.push({shape:`line`,x1:e.ghostCenter.x,x2:e.center.x,y1:e.center.y,y2:e.center.y,stroke:Al,strokeWidth:1,strokeDasharray:`2 2`}),a.push({shape:`path`,d:Gu(e.ghostCenter.x,e.ghostCenter.y,7),fill:`none`,stroke:r.stroke,strokeWidth:1,strokeDasharray:`2 2`,data:{previous:`true`}}))),o)a.push(e.type===`activity`?{shape:`rect`,x:e.glyph.x,y:e.glyph.y,width:e.glyph.width,height:e.glyph.height,rx:3,fill:`none`,stroke:r.stroke,strokeWidth:1.25,strokeDasharray:`4 3`}:{shape:`path`,d:Gu(e.center.x,e.center.y,7),fill:`none`,stroke:r.stroke,strokeWidth:1,strokeDasharray:`2 2`});else if(e.type===`activity`){let t=e.kind!==void 0;a.push({shape:`rect`,x:e.glyph.x,y:e.glyph.y,width:e.glyph.width,height:e.glyph.height,rx:3,fill:t?r.stroke:r.fill,...t?{fillOpacity:zu}:{},stroke:i?Lu:r.stroke,strokeWidth:i?2.5:1.25}),r.hatch!==void 0&&a.push(...Ku(e.glyph.x,e.glyph.y,e.glyph.width,e.glyph.height,r.hatch,r.stroke,4,.8))}else a.push({shape:`path`,d:Gu(e.center.x,e.center.y,7),fill:r.stroke,stroke:i?Lu:`#ffffff`,strokeWidth:i?2:.75});e.label!==void 0&&a.push({shape:`text`,x:e.label.x,y:e.label.y+12,...e.label.note!==void 0&&e.label.text.endsWith(e.label.note)?{text:e.label.text.slice(0,-e.label.note.length).trimEnd(),note:e.label.note}:{text:e.label.text},fontSize:11,fill:kl,fontFamily:Hl,testId:`timeline-annotation`,...e.label.struck?{textDecoration:`line-through`}:{},...e.label.inside?{}:{stroke:`#ffffff`,strokeWidth:3,paintOrder:`stroke`}}),v.push({id:`item-${e.row}-${e.item}`,testId:`timeline-${e.type}`,title:Yu(n,c,e),data:{row:String(e.row),item:String(e.item),...e.kind===void 0?{}:{kind:e.kind},...e.change===void 0?{}:{change:e.change},selected:String(i)},primitives:a})}d!==`none`&&`x`in c.today&&v.push({id:`today`,testId:`timeline-today`,primitives:[{shape:`line`,x1:c.today.x,x2:c.today.x,y1:0,y2:c.height,stroke:Fu,strokeWidth:2,opacity:.85}]});let y=c.rows.map(e=>{let t=58+e.y,n=e.type===`section`?`${e.label??``} (${e.tasks.length})`.trim():e.type===`separator`?e.label??``:e.label,i=e.type!==`task`;return{id:`label-${e.row}`,primitives:[...i?[{shape:`line`,x1:0,x2:r,y1:t+.5,y2:t+.5,stroke:`#a1a1aa`,strokeWidth:1}]:[],{shape:`text`,x:8,y:e.type===`separator`?t+e.height-6:t+e.height/2+4,text:Ju(n,r-12),fontSize:11,...i?{fontWeight:600}:{},fill:i?Al:kl,fontFamily:Hl}]}}),b=new Map;for(let e of n.rows)if(e.type===`task`)for(let t of e.items){if(t.kind===void 0)continue;let e=b.get(t.kind)??{activity:!1,milestone:!1};e[t.type]=!0,b.set(t.kind,e)}let ee=Bl(c.kinds,l),x=[],te=0,ne=0,re=r+c.width;for(let e of c.kinds){let t=u(e),n=b.get(e);if(n===void 0)continue;let r=ee.has(e)?`${e} (same colour as ${ee.get(e).join(`, `)})`:e,i=(n.activity?22:0)+(n.milestone?16:0)+r.length*Oe+18;te>0&&te+i>re&&(te=0,ne+=1);let a=ne*Uu,o=[],s=te;n.activity&&(o.push({shape:`rect`,x:s,y:a+4,width:16,height:8,rx:2,fill:t.stroke,stroke:t.stroke,fillOpacity:zu}),t.hatch!==void 0&&o.push(...Ku(s,a+4,16,8,t.hatch,t.stroke,4,.8)),s+=22),n.milestone&&(o.push({shape:`path`,d:Gu(s+6,a+8,6),fill:t.stroke}),s+=16),o.push({shape:`text`,x:s,y:a+12,text:r,fontSize:10,fill:Al,fontFamily:Hl}),x.push({id:`legend-${e}`,...t.declared===!0?{title:`${e} — project colour`,data:{kind:e,"colour-source":`project`}}:{data:{kind:e}},primitives:o}),te+=i}let ie=[...c.periods.map(e=>({kind:e.kind,line:!1,text:n.periods[e.index].label??`Period`})),...c.references.map(e=>({kind:e.kind,line:!0,text:e.label}))];if(ie.length>0&&(te>0&&(te=0,ne+=1),ie.forEach((e,t)=>{let n=22+e.text.length*Oe+18;te>0&&te+n>re&&(te=0,ne+=1);let r=ne*Uu,i=e.kind===void 0?e.line?`#3f3f46`:`#a1a1aa`:u(e.kind).stroke;x.push({id:`legend-calendar-${t}`,testId:`timeline-calendar-legend`,primitives:[e.line?{shape:`line`,x1:te+8,x2:te+8,y1:r+2,y2:r+14,stroke:i,strokeWidth:1.5,strokeDasharray:`3 2`}:{shape:`rect`,x:te,y:r+3,width:16,height:10,fill:i,fillOpacity:.25},{shape:`text`,x:te+22,y:r+12,text:e.text,fontSize:10,fill:Al,fontFamily:Hl}]}),te+=n})),n.comparedTo!==void 0){te>0&&(te=0,ne+=1);let e=ne*Uu,t=[{shape:`rect`,x:0,y:e+4,width:16,height:8,rx:2,fill:`none`,stroke:Al,strokeDasharray:`4 3`},{shape:`text`,x:22,y:e+12,text:`previous dates (${n.comparedTo.label})`,fontSize:10,fill:Al,fontFamily:Hl}],r=22+(`previous dates (${n.comparedTo.label})`.length+3)*Oe;t.push({shape:`text`,x:r,y:e+12,text:`(new)`,fontStyle:`italic`,fontSize:10,fill:Al,fontFamily:Hl},{shape:`text`,x:r+5*Oe,y:e+12,text:`: added since`,fontSize:10,fill:Al,fontFamily:Hl},{shape:`text`,x:r+20*Oe,y:e+12,text:`removed`,fontSize:10,fill:Al,fontFamily:Hl,textDecoration:`line-through`},{shape:`text`,x:r+28*Oe,y:e+12,text:`: dropped since`,fontSize:10,fill:Al,fontFamily:Hl}),x.push({id:`legend-comparison`,testId:`timeline-comparison-legend`,primitives:t})}let ae=x.length===0?0:(ne+1)*Uu+6;return{layout:c,pxPerDay:a,overWidth:o,labelWidth:r,tints:l,markers:p,header:m,rows:v,labels:y,legend:{groups:x,height:ae}}}function Zu(e,t,n){let r=e=>{switch(e.shape){case`rect`:case`text`:return{...e,x:e.x+t,y:e.y+n};case`line`:return{...e,x1:e.x1+t,x2:e.x2+t,y1:e.y1+n,y2:e.y2+n};case`path`:return{...e,d:Qu(e.d,t,n)}}};return{...e,primitives:e.primitives.map(r),...e.groups?{groups:e.groups.map(e=>Zu(e,t,n))}:{}}}function Qu(e,t,n){return e.replace(/(-?\d+(?:\.\d+)?),(-?\d+(?:\.\d+)?)/g,(e,r,i)=>`${+(Number(r)+t).toFixed(2)},${+(Number(i)+n).toFixed(2)}`)}function $u(e,t){let n=Xu(e,{...t,selection:void 0}),r=t.comparison===`new`?void 0:e.comparedTo,i=Vu+(e.title?Hu:0)+(r?18:0),a=Vu,o=a+n.labelWidth,s=[];if(e.title&&s.push({id:`title`,primitives:[{shape:`text`,x:a,y:23,text:e.title,fontSize:13,fontWeight:600,fill:kl,fontFamily:Hl}]}),r){let t=Vu+(e.title?Hu:0)+12;s.push({id:`compared-to`,testId:`timeline-compared-to`,primitives:[{shape:`text`,x:a,y:t,text:`Compared with ${r.label}${r.date?` (${qu(He(r.date)??0)})`:``}`,fontSize:11,fill:Al,fontFamily:Hl}]})}s.push(...n.header.map(e=>Zu(e,o,i))),s.push(...n.rows.map(e=>Zu(e,o,i+58))),s.push(...n.labels.map(e=>Zu(e,a,i)));let c=i+58+n.layout.height+10;s.push(...n.legend.groups.map(e=>Zu(e,a,c)));let l=Math.ceil(o+n.layout.width+Vu),u=Math.ceil(c+n.legend.height+Vu);return{width:l,height:u,viewBox:`0 0 ${l} ${u}`,ariaLabel:`Timeline${e.title?` "${e.title}"`:``} from ${e.time.start} to ${e.time.end}`,background:`#ffffff`,markers:n.markers,groups:s,overWidth:n.overWidth}}function ed({primitive:e}){let t=Object.fromEntries(Object.entries(e.data??{}).map(([e,t])=>[`data-${e}`,t]));switch(e.shape){case`rect`:return(0,i.jsx)(`rect`,{...t,x:e.x,y:e.y,width:e.width,height:e.height,rx:e.rx,fill:e.fill,fillOpacity:e.fillOpacity,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.strokeDasharray,opacity:e.opacity});case`text`:return(0,i.jsxs)(`text`,{...t,"data-testid":e.testId,x:e.x,y:e.y,fontSize:e.fontSize,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontStyle:e.fontStyle,textAnchor:e.textAnchor,fill:e.fill,stroke:e.stroke,strokeWidth:e.strokeWidth,paintOrder:e.paintOrder,textDecoration:e.textDecoration,opacity:e.opacity,children:[e.text,e.note!==void 0&&(0,i.jsxs)(i.Fragment,{children:[` `,(0,i.jsx)(`tspan`,{fontStyle:`italic`,children:e.note})]})]});case`line`:return(0,i.jsx)(`line`,{...t,x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.strokeDasharray,opacity:e.opacity,markerEnd:e.markerEnd===void 0?void 0:`url(#${e.markerEnd})`});case`path`:return(0,i.jsx)(`path`,{...t,d:e.d,fill:e.fill??`none`,stroke:e.stroke,strokeWidth:e.strokeWidth,strokeDasharray:e.strokeDasharray,strokeLinecap:e.strokeLinecap,opacity:e.opacity,markerEnd:e.markerEnd===void 0?void 0:`url(#${e.markerEnd})`,pointerEvents:`none`})}}function td({group:e,interaction:t}){let n=Object.fromEntries(Object.entries(e.data??{}).map(([e,t])=>[`data-${e}`,t])),{extra:r,before:a}=t?.(e)??{};return(0,i.jsxs)(`g`,{...n,"data-testid":e.testId,opacity:e.opacity,...r,children:[e.title===void 0?null:(0,i.jsx)(`title`,{children:e.title}),a,e.primitives.map((e,t)=>(0,i.jsx)(ed,{primitive:e},t)),(e.groups??[]).map(e=>(0,i.jsx)(td,{group:e,interaction:t},e.id))]})}function nd({markers:e}){return(0,i.jsx)(`defs`,{children:e.map(e=>(0,i.jsx)(`marker`,{id:e.id,markerWidth:`7`,markerHeight:`7`,refX:`9`,refY:`5`,viewBox:`0 0 10 10`,markerUnits:`userSpaceOnUse`,orient:`auto`,children:(0,i.jsx)(`path`,{d:`M0,0 L10,5 L0,10 z`,fill:e.paint})},e.id))})}var rd=`#2563eb`,id={fill:`#e4e4e7`,stroke:`#52525b`};function ad(e){let t=e.replace(/[^\p{L}\p{N}._-]+/gu,`-`),n=0,r=t.length;for(;n<r&&t[n]===`-`;)n+=1;for(;r>n&&t[r-1]===`-`;)--r;return t.slice(n,r)}var od=[`week`,`month`,`quarter`,`fit`];function sd(e){return{scale:e.time.scale,compact:!1,showDependencies:!0,comparison:`compare`,onlyChanged:!1}}function cd(e){return e.type===`activity`?`${e.start} to ${e.end}`:e.date}function ld({data:e,today:t,appearance:n,display:a,onDisplayChange:o,onSelect:s}){let c=t??We(),[l,u]=(0,r.useState)(()=>sd(e)),d=a??l,f=o??u,p=e=>t=>f(n=>({...n,[e]:typeof t==`function`?t(n[e]):t})),m=e.comparedTo!==void 0,{comparison:h,onlyChanged:g,compact:_,showDependencies:v,scale:y}=d,b=p(`comparison`),ee=p(`onlyChanged`),x=(0,r.useMemo)(()=>m&&h===`new`?Nu(e):e,[e,m,h]),te=m&&h===`compare`&&g,ne=p(`compact`),re=p(`showDependencies`),[ie,ae]=(0,r.useState)(void 0),oe=p(`scale`),se=(0,r.useRef)(null),[ce,le]=(0,r.useState)(0);(0,r.useEffect)(()=>{let e=se.current;if(e===null||(le(e.clientWidth),typeof ResizeObserver>`u`))return;let t=0,n=new ResizeObserver(()=>{cancelAnimationFrame(t),t=requestAnimationFrame(()=>le(e.clientWidth))});return n.observe(e),()=>{cancelAnimationFrame(t),n.disconnect()}},[]);let ue=(He(x.time.end)??0)-(He(x.time.start)??0)+1,de=ce>0?ce/ue:0,fe=y===`fit`?{pxPerDay:Math.max(Bu,de)}:{pxPerDay:Math.max(rt[y],de),unit:y},[pe,me]=(0,r.useState)(void 0),he=(0,r.useMemo)(()=>Xu(x,{today:c,compact:_,showDependencies:v,appearance:n??null,referenceLine:`today`,onlyChanged:te,...fe,...ie===void 0?{}:{selection:ie.type===`item`?{row:ie.row,item:ie.item}:{row:ie.row}}}),[x,c,_,v,n,ie,te,y,ce]),ge=he.layout,_e=he.tints,ve=(0,r.useMemo)(()=>{let e=!1;for(let t of x.rows)if(t.type===`separator`)e=!0;else if(e)return!0;return!1},[x]),ye=(0,r.useMemo)(()=>Bl(ge.kinds,_e),[ge.kinds,_e]),be=(0,r.useMemo)(()=>bt(x),[x]),xe=(0,r.useMemo)(()=>{let e=new Map;for(let t of x.rows)if(t.type===`task`)for(let n of t.items){if(n.kind===void 0)continue;let t=e.get(n.kind)??{activity:!1,milestone:!1};t[n.type]=!0,e.set(n.kind,t)}return e},[x]),Se=e=>e===void 0?id:_e.get(e)??id,Ce=(e,t)=>e!==void 0&&e.type===t.type&&e.row===t.row&&(e.type===`task`||t.type===`item`&&e.item===t.item),we=e=>{let t=Ce(ie,e);if(ae(t=>Ce(t,e)?void 0:e),!s)return;let n=x.rows[e.row];if(t||n?.type!==`task`)return s(void 0);s(e.type===`item`?{task:n,item:n.items[e.item]}:{task:n})},Te=(e,t)=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),we(t))},Ee=e=>{let t=e.data?.row,n=e.data?.item;if(e.testId!==`timeline-activity`&&e.testId!==`timeline-milestone`||t===void 0||n===void 0)return{};let r={type:`item`,row:Number(t),item:Number(n)},a=`${t}:${n}`,o=ge.items.find(e=>e.row===r.row&&e.item===r.item);return{extra:{role:`button`,tabIndex:0,"aria-label":e.title,"aria-pressed":e.data?.selected===`true`,style:{cursor:`pointer`,outline:`none`},onClick:()=>we(r),onKeyDown:e=>Te(e,r),onFocus:()=>me(a),onBlur:()=>me(e=>e===a?void 0:e)},before:o===void 0?void 0:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`rect`,{"data-testid":`timeline-hit`,x:o.glyph.x,y:o.glyph.y,width:o.glyph.width,height:o.glyph.height,fill:`transparent`}),pe===a&&(0,i.jsx)(`rect`,{"data-testid":`timeline-focus-ring`,x:o.glyph.x-3,y:o.glyph.y-3,width:o.glyph.width+6,height:o.glyph.height+6,rx:4,fill:`none`,stroke:rd,strokeWidth:1.5,strokeDasharray:`3 2`})]})}},[De,Oe]=(0,r.useState)(null),ke=()=>Yl($u(x,{today:c,compact:_,showDependencies:v,onlyChanged:te,appearance:n??null,referenceLine:`dated`,...fe})),Ae=`timeline-${ad(x.title??`plan`)||`plan`}.svg`,je=()=>{let e=URL.createObjectURL(new Blob([ke()],{type:`image/svg+xml`})),t=document.createElement(`a`);t.href=e,t.download=Ae,t.click(),URL.revokeObjectURL(e),Oe(`SVG downloaded`),window.setTimeout(()=>Oe(null),2500)},Me=async()=>{try{await navigator.clipboard.writeText(ke()),Oe(`SVG markup copied`)}catch{Oe(`could not copy`)}window.setTimeout(()=>Oe(null),2500)};(0,r.useEffect)(()=>{let e=se.current;if(e===null)return;let t=gt(ge,e.clientWidth);t!==void 0&&(e.scrollLeft=t)},[]);let Ne=(0,r.useRef)(void 0),Pe=e=>{let t=se.current;t!==null&&(Ne.current=ge.start+(t.scrollLeft+t.clientWidth/2)/he.pxPerDay),oe(e)};return(0,r.useLayoutEffect)(()=>{let e=se.current,t=Ne.current;Ne.current=void 0,e!==null&&t!==void 0&&(e.scrollLeft=Math.max(0,(t-ge.start)*he.pxPerDay-e.clientWidth/2))},[he.pxPerDay,ge.start]),(0,i.jsxs)(`div`,{"data-testid":`timeline`,className:`w-full min-w-0 rounded border border-zinc-200 bg-white text-zinc-800 dark:border-zinc-700`,onKeyDown:e=>{e.key===`Escape`&&ae(void 0)},children:[x.title!==void 0&&x.title!==``&&(0,i.jsx)(`p`,{className:`border-b border-zinc-200 px-2 py-1 text-sm font-medium`,"data-testid":`timeline-title`,children:x.title}),m&&h===`compare`&&(0,i.jsxs)(`p`,{className:`border-b border-zinc-200 px-2 py-0.5 text-xs text-zinc-500`,"data-testid":`timeline-compared-to`,children:[`Compared with `,(0,i.jsx)(`span`,{className:`font-medium text-zinc-700`,children:e.comparedTo.label}),e.comparedTo.date===void 0?``:` (${e.comparedTo.date})`]}),(0,i.jsxs)(`div`,{className:`flex`,children:[(0,i.jsxs)(`div`,{className:`shrink-0 border-r border-zinc-200 text-xs`,style:{width:be},"data-testid":`timeline-labels`,children:[(0,i.jsx)(`div`,{style:{height:58}}),ge.rows.map(e=>e.type===`section`?(0,i.jsxs)(`div`,{"data-testid":`timeline-section-label`,className:`flex items-center border-t border-zinc-400 px-2 font-semibold text-zinc-600`,style:{height:e.height},title:`${e.label??`Untitled section`}: ${e.tasks.length} ${e.tasks.length===1?`task`:`tasks`}`,children:[(0,i.jsx)(`span`,{className:`truncate`,children:e.label??``}),(0,i.jsxs)(`span`,{className:`ml-1 shrink-0 font-normal text-zinc-400`,children:[`(`,e.tasks.length,`)`]})]},e.row):e.type===`separator`?(0,i.jsx)(`div`,{"data-testid":`timeline-separator-label`,className:`flex items-end border-t border-zinc-400 px-2 font-semibold text-zinc-600`,style:{height:e.height},children:e.label??``},e.row):(0,i.jsx)(`button`,{type:`button`,"data-testid":`timeline-task-label`,"aria-pressed":ie?.type===`task`&&ie.row===e.row,className:`block w-full truncate border-t border-zinc-100 px-2 text-left hover:bg-zinc-50 `+(ie?.type===`task`&&ie.row===e.row?`bg-blue-50 font-medium`:``),style:{height:e.height},title:`${e.label} (${e.id})`,onClick:()=>we({type:`task`,row:e.row}),children:e.label},e.row))]}),(0,i.jsxs)(`div`,{ref:se,className:`min-w-0 flex-1 overflow-x-auto`,"data-testid":`timeline-scroller`,children:[(0,i.jsx)(`svg`,{width:ge.width,height:58,role:`img`,"aria-label":`Calendar from ${x.time.start} to ${x.time.end}`,"data-testid":`timeline-header`,xmlns:`http://www.w3.org/2000/svg`,style:{display:`block`},children:he.header.map(e=>(0,i.jsx)(td,{group:e},e.id))}),(0,i.jsxs)(`svg`,{width:ge.width,height:ge.height,role:`group`,"aria-label":`Tasks and items${x.title?` of ${x.title}`:``}`,"data-testid":`timeline-body`,xmlns:`http://www.w3.org/2000/svg`,style:{display:`block`},children:[(0,i.jsx)(nd,{markers:he.markers}),he.rows.map(e=>(0,i.jsx)(td,{group:e,interaction:Ee},e.id))]})]})]}),(0,i.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 border-t border-zinc-200 px-2 py-1 text-xs`,children:[(0,i.jsx)(`span`,{className:`flex items-center gap-1 text-zinc-500`,role:`group`,"aria-label":`Scale`,"data-testid":`timeline-scale`,children:od.map((e,t)=>(0,i.jsxs)(`span`,{className:`flex items-center gap-1`,children:[t>0&&(0,i.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,i.jsx)(`button`,{type:`button`,"data-scale":e,"aria-pressed":y===e,className:y===e?`font-semibold text-zinc-800`:`text-zinc-600 underline`,onClick:()=>Pe(e),children:e})]},e))}),m&&(0,i.jsx)(`button`,{type:`button`,"data-testid":`timeline-comparison-toggle`,"aria-pressed":h===`new`,className:`text-zinc-600 underline`,onClick:()=>{ae(void 0),b(e=>e===`compare`?`new`:`compare`)},children:h===`compare`?`new version only`:`show the comparison`}),m&&h===`compare`&&(0,i.jsx)(`button`,{type:`button`,"data-testid":`timeline-only-changed-toggle`,"aria-pressed":g,className:`text-zinc-600 underline`,onClick:()=>{ae(void 0),ee(e=>!e)},children:g?`show every task`:`only what moved`}),te&&ge.hiddenTasks>0&&(0,i.jsxs)(`span`,{className:`text-amber-700`,"data-testid":`timeline-unchanged-hidden`,children:[ge.hiddenTasks,` unchanged `,ge.hiddenTasks===1?`task`:`tasks`,` hidden`]}),ve&&(0,i.jsx)(`button`,{type:`button`,"data-testid":`timeline-compact-toggle`,"aria-pressed":_,className:`text-zinc-600 underline`,onClick:()=>{ae(e=>e?.type===`task`?void 0:e),ne(e=>!e)},children:_?`one row per task`:`one row per section`}),(x.dependencies??[]).length>0&&(0,i.jsx)(`button`,{type:`button`,"data-testid":`timeline-dependencies-toggle`,"aria-pressed":!v,className:`text-zinc-600 underline`,onClick:()=>re(e=>!e),children:v?`hide dependencies`:`show dependencies`}),!v&&(0,i.jsxs)(`span`,{className:`text-amber-700`,"data-testid":`timeline-dependencies-hidden`,children:[ge.dependencies.length,` `,ge.dependencies.length===1?`dependency`:`dependencies`,` hidden`,ge.dependencies.some(e=>!e.satisfied)?`, some not satisfied by the dates`:``]}),(0,i.jsx)(`button`,{type:`button`,"data-testid":`timeline-download-svg`,className:`text-zinc-600 underline`,onClick:je,children:`⤓ download SVG`}),(0,i.jsx)(`button`,{type:`button`,"data-testid":`timeline-copy-svg`,className:`text-zinc-600 underline`,onClick:()=>void Me(),children:`copy markup`}),De!==null&&(0,i.jsx)(`span`,{role:`status`,className:`text-emerald-700`,children:De})]}),m&&h===`compare`&&(0,i.jsxs)(`p`,{className:`flex flex-wrap items-center gap-3 border-t border-zinc-200 px-2 py-1 text-xs text-zinc-500`,"data-testid":`timeline-comparison-key`,children:[(0,i.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,i.jsx)(`svg`,{width:18,height:12,"aria-hidden":`true`,children:(0,i.jsx)(`rect`,{x:1,y:2,width:16,height:8,rx:2,fill:`none`,stroke:`#71717a`,strokeDasharray:`4 3`})}),`previous dates`]}),(0,i.jsxs)(`span`,{children:[(0,i.jsx)(`i`,{children:`(new)`}),`: added since`]}),(0,i.jsxs)(`span`,{children:[(0,i.jsx)(`span`,{className:`line-through`,children:`removed`}),`: dropped since`]})]}),(ge.periods.length>0||ge.references.length>0)&&(0,i.jsxs)(`ul`,{className:`flex flex-wrap gap-3 border-t border-zinc-200 px-2 py-1 text-xs text-zinc-600`,"data-testid":`timeline-calendar-legend`,children:[ge.periods.map(e=>{let t=x.periods[e.index];return(0,i.jsxs)(`li`,{className:`flex items-center gap-1`,"data-period":e.index,title:`${t.label??`Period`}: ${t.start} – ${t.end}`,children:[(0,i.jsx)(`span`,{"aria-hidden":`true`,className:`inline-block h-2.5 w-4 rounded-sm`,style:{background:e.kind===void 0?`#a1a1aa`:Se(e.kind).stroke,opacity:.35}}),t.label??`Period`]},`p${e.index}`)}),ge.references.map(e=>(0,i.jsxs)(`li`,{className:`flex items-center gap-1`,"data-reference":e.index,title:`${e.label}: ${x.references[e.index].date}`,children:[(0,i.jsx)(`span`,{"aria-hidden":`true`,className:`inline-block h-3 border-l-2 border-dashed`,style:{borderColor:e.kind===void 0?`#3f3f46`:Se(e.kind).stroke}}),e.label]},`r${e.index}`))]}),ge.kinds.some(e=>xe.has(e))&&(0,i.jsx)(`ul`,{className:`flex flex-wrap gap-3 border-t border-zinc-200 px-2 py-1 text-xs`,"data-testid":`timeline-legend`,children:ge.kinds.filter(e=>xe.has(e)).map(e=>{let t=Se(e);return(0,i.jsxs)(`li`,{className:`flex items-center gap-1`,"data-kind":e,...t.declared===!0?{"data-colour-source":`project`,title:`${e} — project colour`}:{},children:[xe.get(e)?.activity&&(0,i.jsxs)(`svg`,{width:18,height:12,"aria-hidden":`true`,"data-testid":`timeline-legend-bar`,children:[(0,i.jsx)(`rect`,{x:1,y:2,width:16,height:8,rx:2,fill:t.stroke,fillOpacity:.35,stroke:t.stroke}),t.hatch!==void 0&&Ku(1,2,16,8,t.hatch,t.stroke,4,.8).map((e,t)=>e.shape===`line`?(0,i.jsx)(`line`,{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,stroke:e.stroke,strokeWidth:e.strokeWidth,opacity:e.opacity},t):null)]}),xe.get(e)?.milestone&&(0,i.jsx)(`svg`,{width:14,height:14,"aria-hidden":`true`,"data-testid":`timeline-legend-star`,children:(0,i.jsx)(`path`,{d:Gu(7,7,6),fill:t.stroke})}),(0,i.jsx)(`span`,{className:`font-mono`,children:e}),t.declared===!0&&(0,i.jsx)(`span`,{className:`sr-only`,children:` (project colour)`}),ye.has(e)&&(0,i.jsxs)(`span`,{className:`text-zinc-500`,"data-testid":`timeline-legend-shared`,children:[`(same colour as `,ye.get(e).join(`, `),`)`]})]},e)})}),ie!==void 0&&(0,i.jsx)(ud,{data:x,selection:ie,dependencies:ge.dependencies})]})}function ud({data:e,selection:t,dependencies:n}){let r=e.rows[t.row];if(r?.type!==`task`)return null;let a=t.type===`item`?r.items[t.item]:void 0,o=t.type===`task`?r.id:a?.id,s=o===void 0?[]:n.filter(e=>e.to===o),c=o===void 0?[]:n.filter(e=>e.from===o),l=(t,n)=>(0,i.jsxs)(`li`,{"data-satisfied":String(t.satisfied),className:t.satisfied?``:`text-red-700`,children:[xt(e,n),` — `,t.type,t.satisfied?``:` — not satisfied by the dates`]},t.index);return(0,i.jsx)(`div`,{className:`border-t border-zinc-200 px-2 py-1 text-xs`,"data-testid":`timeline-details`,role:`status`,children:(0,i.jsxs)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5`,children:[(0,i.jsx)(`dt`,{className:`text-zinc-500`,children:`Task`}),(0,i.jsxs)(`dd`,{children:[r.label,` `,(0,i.jsxs)(`span`,{className:`font-mono text-zinc-500`,children:[`(`,r.id,`)`]})]}),a!==void 0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`dt`,{className:`text-zinc-500`,children:`Type`}),(0,i.jsx)(`dd`,{children:a.type}),(0,i.jsx)(`dt`,{className:`text-zinc-500`,children:a.type===`activity`?`Dates`:`Date`}),(0,i.jsx)(`dd`,{className:`font-mono`,children:cd(a)}),a.label!==void 0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`dt`,{className:`text-zinc-500`,children:`Label`}),(0,i.jsx)(`dd`,{children:a.label})]}),a.kind!==void 0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`dt`,{className:`text-zinc-500`,children:`Kind`}),(0,i.jsx)(`dd`,{className:`font-mono`,children:a.kind})]}),a.id!==void 0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`dt`,{className:`text-zinc-500`,children:`Identifier`}),(0,i.jsx)(`dd`,{className:`font-mono`,children:a.id})]})]}),s.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`dt`,{className:`text-zinc-500`,children:`Waits on`}),(0,i.jsx)(`dd`,{children:(0,i.jsx)(`ul`,{"data-testid":`timeline-predecessors`,children:s.map(e=>l(e,e.from))})})]}),c.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`dt`,{className:`text-zinc-500`,children:`Needed by`}),(0,i.jsx)(`dd`,{children:(0,i.jsx)(`ul`,{"data-testid":`timeline-successors`,children:c.map(e=>l(e,e.to))})})]})]})})}var dd=(0,r.createContext)(null);function fd(e){let t=e.startsWith(`workspace:`)?e.slice(10):/^[a-z][a-z0-9+.-]*:/i.test(e)?null:e;if(t===null||t===``||/^(?:[\\/]|[a-z]:[\\/])/i.test(t))return null;let n=t.replaceAll(`\\`,`/`);return n.split(`/`).includes(`..`)?null:n}function pd(e){let t=fd(e);if(t!==null)return{kind:`workspace-file`,path:t};if(/^https?:\/\//i.test(e))return{kind:`external-url`,url:e}}function md(){let[e,t]=(0,r.useState)(void 0);return{hover:e=>({onPointerEnter:n=>t({text:e,x:n.clientX,y:n.clientY}),onPointerMove:n=>t({text:e,x:n.clientX,y:n.clientY}),onPointerLeave:()=>t(void 0)}),Tooltip:()=>e===void 0?null:(0,i.jsx)(`div`,{"data-testid":`diagram-tooltip`,role:`tooltip`,style:{position:`fixed`,left:e.x+14,top:e.y+14,zIndex:120},className:`pointer-events-none max-w-sm rounded bg-zinc-900 px-2 py-1 text-xs text-white shadow-lg dark:bg-zinc-100 dark:text-zinc-900`,children:e.text})}}function hd({data:e,isProposal:t,nudges:n,setNudges:a,hidden:o,setHidden:s,orientation:c,viewpoint:l}){let u=(0,r.useRef)(null),[d,f]=(0,r.useState)(void 0),[p,m]=(0,r.useState)(!1),{hover:h,Tooltip:g}=md(),_=(0,r.useRef)(void 0);(0,r.useEffect)(()=>()=>_.current?.(),[]);let v=(0,r.useContext)(dd),y=(0,r.useMemo)(()=>_u(e,{isProposal:t,hidden:o,nudges:n,orientation:c,...l===void 0?{}:{viewpoint:l},...v===null?{}:{appearance:v}}),[e,t,o,n,c,l,v]),b=e=>{if(e.button!==0)return;let t=e.target;if(t.closest(`[data-draggable="node"]`)!==null||t.closest(`[data-legend-entry]`)!==null)return;let n=u.current?.parentElement??null;for(;n!==null&&n.scrollWidth<=n.clientWidth&&n.scrollHeight<=n.clientHeight;)n=n.parentElement;if(n===null)return;e.preventDefault();let r=e.clientX,i=e.clientY,a=n.scrollLeft,o=n.scrollTop,s=e.currentTarget;s.setPointerCapture?.(e.pointerId),m(!0);let c=e=>{n.scrollLeft=a-(e.clientX-r),n.scrollTop=o-(e.clientY-i)},l=()=>{_.current=void 0,s.releasePointerCapture?.(e.pointerId),s.removeEventListener(`pointermove`,c),s.removeEventListener(`pointerup`,l),s.removeEventListener(`pointercancel`,l),m(!1)};_.current?.(),_.current=l,s.addEventListener(`pointermove`,c),s.addEventListener(`pointerup`,l),s.addEventListener(`pointercancel`,l)},ee=e=>t=>{if(t.button!==0)return;t.preventDefault();let r=u.current,i=r===null?1:(r.getBoundingClientRect().width||y.width)/y.width,o=t.clientX,s=t.clientY,c=n.get(e)??{dx:0,dy:0},l=t.currentTarget;l.setPointerCapture?.(t.pointerId),f(e);let d=t=>{let r=new Map(n);r.set(e,{dx:c.dx+(t.clientX-o)/i,dy:c.dy+(t.clientY-s)/i}),a(r)},p=()=>{_.current=void 0,l.releasePointerCapture?.(t.pointerId),l.removeEventListener(`pointermove`,d),l.removeEventListener(`pointerup`,p),l.removeEventListener(`pointercancel`,p),f(void 0)};_.current?.(),_.current=p,l.addEventListener(`pointermove`,d),l.addEventListener(`pointerup`,p),l.addEventListener(`pointercancel`,p)},x=e=>{let t=new Set(o);t.delete(e)||t.add(e),s(t)},te=e=>{let t=e.data?.[`element-id`];if(e.data?.draggable===`node`&&t!==void 0)return{extra:{onPointerDown:ee(t),style:{cursor:d===t?`grabbing`:`grab`},...e.title===void 0?{}:h(e.title)}};if(e.data?.[`relationship-role`]!==void 0){let t=e.primitives.find(e=>e.shape===`path`&&e.data?.edge===`line`);return{extra:e.title===void 0?{}:h(e.title),before:t===void 0||t.shape!==`path`?null:(0,i.jsx)(`path`,{"data-edge":`hit`,"data-hit":`edge`,d:t.d,fill:`none`,stroke:`transparent`,strokeWidth:14,pointerEvents:`stroke`})}}let n=e.data?.[`legend-entry`];if(n!==void 0&&e.data?.toggles===`true`){let t=e.primitives[0],r=t.shape===`rect`?t.x:t.shape===`line`?t.x1:0,a=t.shape===`rect`?t.y:t.shape===`line`?t.y1-5:0,o=e.primitives.find(e=>e.shape===`text`),s=o?.shape===`text`?tu(o.text.replace(` (hidden)`,``))-8:0;return{extra:{onClick:()=>x(n),style:{cursor:`pointer`}},before:(0,i.jsx)(`rect`,{"data-hit":`legend`,x:r-3,y:a-3,width:s,height:16,fill:`transparent`})}}return{}};return(0,i.jsxs)(i.Fragment,{children:[n.size>0&&(0,i.jsx)(`button`,{type:`button`,className:`mb-1 text-xs underline text-neutral-500 hover:text-neutral-800 dark:hover:text-neutral-200`,onClick:()=>a(new Map),children:`reset layout`}),(0,i.jsx)(g,{}),(0,i.jsxs)(`svg`,{ref:u,role:`img`,"aria-label":y.ariaLabel,viewBox:y.viewBox,width:y.width,height:y.height,xmlns:`http://www.w3.org/2000/svg`,onPointerDown:b,style:{cursor:p?`grabbing`:`grab`,touchAction:`none`},children:[(0,i.jsx)(`rect`,{x:Number(y.viewBox.split(` `)[0]),y:Number(y.viewBox.split(` `)[1]),width:y.width,height:y.height,fill:y.background}),(0,i.jsx)(nd,{markers:y.markers}),y.groups.map(e=>(0,i.jsx)(td,{group:e,interaction:te},e.id))]})]})}function gd({data:e,isProposal:t}){let{hover:n,Tooltip:a}=md(),o=(0,r.useContext)(dd),s=(0,r.useMemo)(()=>vu(e,{isProposal:t,...o===null?{}:{appearance:o}}),[e,t,o]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(`svg`,{role:`img`,"aria-label":s.ariaLabel,viewBox:s.viewBox,width:s.width,height:s.height,xmlns:`http://www.w3.org/2000/svg`,children:[(0,i.jsx)(`rect`,{x:0,y:0,width:s.width,height:s.height,fill:s.background}),(0,i.jsx)(nd,{markers:s.markers}),s.groups.map(e=>(0,i.jsx)(td,{group:e,interaction:e=>e.title===void 0?{}:{extra:n(e.title)}},e.id))]}),(0,i.jsx)(a,{})]})}var _d={added:`bg-emerald-50 dark:bg-emerald-950/40`,changed:`bg-amber-50 dark:bg-amber-950/40`,context:`bg-zinc-50 text-zinc-500 dark:bg-zinc-900/60 dark:text-zinc-400`,removed:`bg-red-50 text-red-800 dark:bg-red-950/40 dark:text-red-200`},vd=48,yd=16,bd={attribute:{label:`is`,className:`text-zinc-600 dark:text-zinc-300`},expects:{label:`expects`,className:`text-amber-700 dark:text-amber-400`},assigns:{label:`asks to set`,className:`text-blue-700 dark:text-blue-400`},removes:{label:`asks to unset`,className:`text-rose-700 line-through dark:text-rose-400`}};function xd({uri:e,text:t,dispatch:n,sha256:r}){let a=pd(e);return a===void 0||n===void 0?(0,i.jsx)(`span`,{"data-followable":`no`,children:t}):a.kind===`workspace-file`?(0,i.jsx)(`button`,{type:`button`,"data-followable":`workspace-file`,className:`text-left underline decoration-dotted underline-offset-2 hover:decoration-solid`,onClick:()=>n({kind:`openFile`,path:a.path,...r===void 0?{}:{sha256:r}}),children:t}):(0,i.jsx)(`a`,{"data-followable":`external-url`,className:`underline decoration-dotted underline-offset-2 hover:decoration-solid`,href:a.url,target:`_blank`,rel:`noreferrer`,children:t})}function Sd({item:e,traces:t,dispatch:n}){let a=[...e.attributes.map(([e,t])=>[`attribute`,e,Le(t)]),...e.expectations.map(([e,t])=>[`expects`,e,Le(t)]),...e.assignments.map(([e,t])=>[`assigns`,e,Le(t)]),...e.removedAttributes.map(e=>[`removes`,e,``])],o=t??[];if(a.length===0&&e.locations.length===0&&e.artifacts.length===0&&o.length===0)return null;let s=[a.length>0?`${a.length} attribute${a.length===1?``:`s`}`:``,o.length>0?`${o.length} relation${o.length===1?``:`s`}`:``,e.locations.length>0?`${e.locations.length} location${e.locations.length===1?``:`s`}`:``,e.artifacts.length>0?`${e.artifacts.length} artifact${e.artifacts.length===1?``:`s`}`:``].filter(Boolean);return(0,i.jsxs)(`details`,{className:`mt-1 text-[11px]`,"data-testid":`structured-enrichment`,children:[(0,i.jsx)(`summary`,{className:`cursor-pointer text-zinc-500 dark:text-zinc-400`,children:s.join(`, `)}),(0,i.jsxs)(`dl`,{className:`mt-1 grid grid-cols-[auto_auto_1fr] gap-x-2 gap-y-0.5`,children:[a.map(([e,t,n],a)=>(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(`dt`,{className:`font-medium ${bd[e].className}`,"data-claim":e,children:bd[e].label}),(0,i.jsx)(`dd`,{className:`font-mono text-zinc-700 dark:text-zinc-200`,children:t}),(0,i.jsx)(`dd`,{className:`break-words text-zinc-600 dark:text-zinc-300`,children:n})]},`${e}-${t}-${a}`)),o.map((e,t)=>(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(`dt`,{className:`font-medium text-violet-700 dark:text-violet-400`,"data-claim":`relates`,children:e.kind}),(0,i.jsxs)(`dd`,{className:`col-span-2 break-words text-zinc-600 dark:text-zinc-300`,children:[e.fromLabel,` → `,e.toLabel,e.toRow===void 0&&e.toRef!==void 0?` (outside this document)`:``]})]},`trace-${t}`)),e.locations.map((e,t)=>(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(`dt`,{className:`font-medium text-zinc-500 dark:text-zinc-400`,"data-claim":`location`,children:`at`}),(0,i.jsx)(`dd`,{className:`col-span-2 break-all font-mono text-zinc-600 dark:text-zinc-300`,children:(0,i.jsx)(xd,{uri:e.uri,text:Re(e),dispatch:n})})]},`location-${t}`)),e.artifacts.map((e,t)=>(0,i.jsxs)(r.Fragment,{children:[(0,i.jsx)(`dt`,{className:`font-medium text-zinc-500 dark:text-zinc-400`,"data-claim":`artifact`,children:e.rel}),(0,i.jsx)(`dd`,{className:`col-span-2 break-all font-mono text-zinc-600 dark:text-zinc-300`,children:(0,i.jsx)(xd,{uri:e.uri,text:ze(e),dispatch:n,sha256:e.sha256})})]},`artifact-${t}`))]})]})}function Cd({data:e,hidden:t,setHidden:n,rows:a,traces:o=[],dispatch:s}){let[c,l]=(0,r.useState)(null),u=(0,r.useRef)(null),d=(0,r.useCallback)(()=>[...u.current?.querySelectorAll(`th`)??[]].map(e=>Math.max(vd,Math.round(e.getBoundingClientRect().width))),[]),f=(0,r.useCallback)((e,t)=>l(n=>{let r=n??d(),i=[...r];return i[e]=Math.max(vd,Math.round(t(r[e]??vd))),i}),[d]);function p(e,t){e.preventDefault();let n=e.clientX,r=c??d();l(r);let i=e=>{let i=r[t]??vd;f(t,()=>i+(e.clientX-n))},a=()=>{window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a),window.removeEventListener(`pointercancel`,a)};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a),window.addEventListener(`pointercancel`,a)}let m=c?.reduce((e,t)=>e+t,0),h=(e,t,n)=>(0,i.jsx)(`div`,{role:n?`separator`:`presentation`,"aria-orientation":n?`vertical`:void 0,"aria-label":n?`Resize column ${t}`:void 0,"aria-hidden":!n||void 0,tabIndex:n?0:void 0,onPointerDown:t=>p(t,e),onKeyDown:t=>{if(t.key!==`ArrowLeft`&&t.key!==`ArrowRight`)return;t.preventDefault();let n=t.key===`ArrowRight`?yd:-16;f(e,e=>e+n)},className:`absolute -right-px top-0 h-full w-1.5 cursor-col-resize touch-none hover:bg-zinc-400 focus:bg-zinc-400 focus:outline-none dark:hover:bg-zinc-500 dark:focus:bg-zinc-500`}),g=Hc(e),_=(e,t)=>a?.[t]?.role??Uc(e,g),v=[...new Set(e.rows.map(_).filter(e=>e!==void 0))].sort((e,t)=>Vc.indexOf(e)-Vc.indexOf(t)),y=e.rows.map((e,t)=>({row:e,index:t})).filter(({row:e,index:n})=>{let r=_(e,n);return r===void 0||!t.has(ll(`role`,r))}),b=new Map;for(let e of o)for(let t of[e.fromRow,e.toRow]){if(t===void 0)continue;let n=b.get(t);n===void 0?b.set(t,[e]):n.includes(e)||n.push(e)}let ee=e=>{let r=new Set(t),i=ll(`role`,e);r.has(i)?r.delete(i):r.add(i),n(r)};return(0,i.jsxs)(`div`,{className:`overflow-x-auto`,children:[v.length>0&&(0,i.jsx)(`div`,{className:`mb-2 flex flex-wrap items-center gap-2 text-[11px]`,"data-testid":`table-role-key`,children:v.map(e=>{let n=t.has(ll(`role`,e));return(0,i.jsxs)(`button`,{type:`button`,onClick:()=>ee(e),"aria-pressed":!n,className:`flex items-center gap-1 rounded border border-zinc-300 px-1.5 py-0.5 dark:border-zinc-700 ${n?`opacity-50`:``}`,children:[(0,i.jsx)(`span`,{className:`inline-block h-2.5 w-2.5 rounded-sm ${_d[e].split(` `)[0]}`}),(0,i.jsxs)(`span`,{children:[Bc[e],n?` (hidden)`:``]})]},e)})}),(0,i.jsxs)(`table`,{className:`border-collapse text-xs ${c?``:`w-full`}`,style:m===void 0?void 0:{tableLayout:`fixed`,width:m},children:[(0,i.jsx)(`colgroup`,{children:e.columns.map((e,t)=>(0,i.jsx)(`col`,{style:c?{width:c[t]}:void 0},t))}),(0,i.jsx)(`thead`,{children:(0,i.jsx)(`tr`,{ref:u,children:e.columns.map((e,t)=>(0,i.jsxs)(`th`,{className:`relative border border-zinc-300 px-2 py-1 text-left font-medium dark:border-zinc-700`,children:[(0,i.jsx)(`span`,{className:`block truncate`,children:e}),h(t,e,!0)]},t))})}),(0,i.jsx)(`tbody`,{children:y.map(({row:t,index:n},r)=>{let{cells:o,heading:c}=ue(t),l=a?.[n],u=l?.role??Uc(t,g),d=l?.id===void 0?[]:b.get(l.id)??[];if(c!==void 0){let t=Math.min(Math.max(l?.depth??1,1),6);return(0,i.jsx)(`tr`,{"data-row-heading":t,className:u===void 0?void 0:_d[u],children:(0,i.jsx)(`th`,{scope:`colgroup`,colSpan:e.columns.length,style:{paddingLeft:`${.5+(t-1)*.75}rem`},className:`border border-zinc-200 bg-zinc-50 py-1 text-left font-semibold dark:border-zinc-800 dark:bg-zinc-900 ${t===1?`text-xs`:`text-[11px] font-medium`} ${u===`removed`?`line-through`:``}`,children:c})},r)}return(0,i.jsx)(`tr`,{className:u===void 0?void 0:_d[u],"data-row-role":u,"data-row-kind":l?.kind,"data-row-ref":l?.ref,children:o.map((t,n)=>(0,i.jsxs)(`td`,{className:`relative border border-zinc-200 px-2 py-1 align-top break-words dark:border-zinc-800 ${u===`removed`?`line-through`:``}`,children:[t===null?(0,i.jsx)(`span`,{className:`opacity-40`,children:`—`}):String(t),n===0&&l!==void 0?(0,i.jsx)(Sd,{item:l,traces:d,dispatch:s}):null,h(n,e.columns[n]??``,!1)]},n))},r)})})]})]})}function wd(e,t){if(e===void 0)return JSON.stringify(t,null,2);try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function Td(e,t=` `){let n=[],r=(e,r)=>{for(let i of r)n.push(`${t}${e}: ${i}`)};return r(`attribute`,e.attributes.map(([e,t])=>Ie(e,t))),r(`expects`,e.expectations.map(([e,t])=>Ie(e,t))),r(`asks to set`,e.assignments.map(([e,t])=>Ie(e,t))),r(`asks to unset`,e.removedAttributes),r(`at`,e.locations.map(e=>Re(e))),r(`artifact`,e.artifacts.map(e=>ze(e))),n}function Ed(e){let t=e.profile===void 0?``:` "${e.profile}"`;if(e.state===`unchecked`)return`Could not be checked against this project's profile${t}: the project's profile registry cannot be used right now.`;if(e.state===`strays`)return`Does not conform to this project's profile${t} as it stands now.`;let n=e.openValues,r=e.findings??0,i=[n===0?void 0:`${n} value${n===1?``:`s`} outside its open enumerations`,r===0?void 0:`${r} finding${r===1?``:`s`} to check`].filter(e=>e!==void 0);return`Conforms to this project's profile${t}${i.length===0?``:`, with ${i.join(` and `)}`}.`}function Dd(e,t,n=ul,r){let i=rl(e,t),a=[];if(i.profile!==void 0&&a.push(`Profile: ${i.profile}`),r!==void 0&&a.push(`Conformance: ${Ed(r)}`),i.target!==void 0){let e=i.target.revision===void 0?``:`, prepared against ${i.target.revision}`;a.push(`Proposes changes to ${i.target.ref}${e}`),a.push(`Expectations below are the producer's; the receiving authority checks them before applying.`)}for(let e of i.artifacts)a.push(`Artifact — ${ze(e)}`);if(a.length>0&&a.push(``),e.kind===`timeline`)return a.push(...Ct(e.data)),a.join(`
|
|
14
14
|
`);if(i.columns!==void 0&&i.rows!==void 0){let e=e=>e!==void 0&&n.has(ll(`role`,e)),t=i.rows.filter(t=>e(t.role));t.length>0&&(a.push(`Filtered view — ${t.length} of ${i.rows.length} rows hidden (${[...new Set(t.map(e=>Bc[e.role]))].join(`, `)}).`),a.push(``)),a.push(i.columns.join(` | `));for(let t of i.rows){if(e(t.role))continue;if(t.heading!==void 0){a.push(``),a.push(`${`#`.repeat(t.depth??1)} ${t.heading}${t.role===void 0?``:` (${Bc[t.role]})`}`);continue}let n=t.cells.map(e=>e===null?``:String(e)).join(` | `),r=t.kind===void 0?``:` [${t.kind}]`;a.push(`${n}${r}${t.role===void 0?``:` (${Bc[t.role]})`}`);for(let e of t.changes)a.push(` ${Fe(e)}`);a.push(...Td(t))}if(i.traces.length>0){a.push(``);for(let e of i.traces){let t=e.label===void 0?``:`: ${e.label}`;a.push(`${e.fromLabel} —${e.kind}${t}→ ${e.toLabel}`)}}}else{if(a.push([`${i.things.length} ${i.thingNoun}s`,`${i.links.length} ${i.linkNoun}s`,...i.containers.length>0?[`${i.containers.length} containers`]:[]].join(`, `)),a.push(``),i.containers.length>0){for(let e of i.containers){let t=i.things.filter(t=>t.container===e.id);a.push(`${e.label}: ${t.length===0?`no members`:t.map(e=>e.label).join(`, `)}`)}a.push(``)}let e=new Map(i.containers.map(e=>[e.id,e.label]));for(let t of i.things){let n=t.container===void 0?void 0:e.get(t.container);a.push([t.label,t.kind===void 0?``:` [${t.kind}]`,n===void 0?``:` in ${n}`,t.role===`unchanged`?``:` (${zc[t.role]})`,t.changes.length===0?``:` — ${t.changes.map(Fe).join(`, `)}`].join(``)),a.push(...Td(t))}i.links.length>0&&a.push(``),i.links.forEach((e,t)=>{let n=[e.kind,e.label].filter(e=>e!==void 0&&e!==``),r=n.length===0?`→`:`—${n.join(`: `)}→`;a.push([i.linkNoun===`message`?`${t+1}. `:``,`${e.fromLabel} ${r} ${e.toLabel}`,e.isLoop?` (to itself)`:``,e.role===`unchanged`?``:` (${zc[e.role]})`,e.changes.length===0?``:` — ${e.changes.map(Fe).join(`, `)}`].join(``)),a.push(...Td(e))})}if(i.removals.length>0){a.push(``);for(let e of i.removals)a.push(`removed ${e.type}: ${e.ref}`)}return a.join(`
|
|
15
|
-
`)}function Od(e,t){let n=e=>{if(e===void 0)return;let n=t.data,r=[...n.nodes??[],...n.participants??[]].find(t=>t.id===e||t.ref===e);return r===void 0?e:il(r)},r=t.data,i=[...r.nodes??[],...r.participants??[],...r.edges??[],...r.messages??[]].find(t=>`ref`in t&&t.ref===e.ref),a=e.from!==void 0||e.to!==void 0?`${n(e.from)??`?`} → ${n(e.to)??`?`}`:i!==void 0&&`from`in i?`${n(i.from)} → ${n(i.to)}`:void 0,o=e.label??(i===void 0?void 0:i.label),s=e.kind??(i===void 0?void 0:i.kind),c=[o,s===void 0?void 0:`[${s}]`,a].filter(e=>e!==void 0&&e!==``);return c.length===0?e.ref:`${c.join(` `)} (${e.ref})`}var kd=`text-xs text-zinc-500 underline hover:text-zinc-800 dark:hover:text-zinc-200`;function Ad(e){let t=e.target;if(typeof t!=`object`||!t)return;let n=t.revision;return typeof n==`string`?n:void 0}function jd(e){let t=e.target;if(typeof t==`string`)return t;if(typeof t==`object`&&t&&typeof t.ref==`string`)return t.ref}function Md({envelope:e,source:t,rawOutput:n,dispatch:a,conformance:o}){let s=(0,r.useContext)(dd),[c,l]=(0,r.useState)(!1),[d,p]=(0,r.useState)(!1),[m,h]=(0,r.useState)(!1),[g,_]=(0,r.useState)(!1),[v,y]=(0,r.useState)(!1),[b,x]=(0,r.useState)(null),ee=(0,r.useRef)(null),te=(0,r.useRef)(null),[ne,re]=(0,r.useState)(new Map),[ie,ae]=(0,r.useState)(ul),[oe,se]=(0,r.useState)(void 0),[ce,le]=(0,r.useState)(void 0),[ue,de]=(0,r.useState)(void 0),fe=(0,r.useMemo)(()=>al(e),[e]),pe=e.target!==void 0,me=e.removals??[],he=(0,r.useMemo)(()=>rl(e,pe),[e,pe]),ge=(0,r.useMemo)(()=>e.kind===`graph`?gu(e.data,ie):`landscape`,[e,ie]),_e=oe??ge,ve=(0,r.useMemo)(()=>e.kind===`graph`?fl(e):[],[e]),ye=ve.find(e=>e.id===ce),be=ye!==void 0&&!ml(ie,pl(e.data,ye)),xe=t=>{let n=ve.find(e=>e.id===t);le(n?.id),ae(n===void 0?ul:pl(e.data,n))},Se=()=>{se(e=>f(e??ge)),re(new Map)},Ce=e.kind===`graph`?(0,i.jsx)(hd,{data:e.data,isProposal:pe,nudges:ne,setNudges:re,hidden:ie,setHidden:ae,orientation:_e,viewpoint:ye}):e.kind===`sequence`?(0,i.jsx)(gd,{data:e.data,isProposal:pe}):e.kind===`timeline`?(0,i.jsx)(ld,{data:e.data,appearance:s,display:ue??sd(e.data),onDisplayChange:t=>de(n=>t(n??sd(e.data)))}):(0,i.jsx)(Cd,{data:e.data,hidden:ie,setHidden:ae,rows:he.rows,traces:he.traces,dispatch:a}),we=`${e.kind}-${jd(e)??`diagram`}.svg`.replace(/[^\w.-]+/g,`-`),Te=`${e.kind}-${jd(e)??`data`}`.replace(/[^\w.-]+/g,`-`),Ee=()=>Cu(e.data,ie,he.rows),De=e.kind===`table`?Ee().withheld:0;function Oe(e){let t=e.cloneNode(!0);for(let e of t.querySelectorAll(`[data-hit]`))e.remove();for(let e of[t,...t.querySelectorAll(`[style]`)])e.style.removeProperty(`cursor`),e.style.removeProperty(`touch-action`),e.getAttribute(`style`)===``&&e.removeAttribute(`style`);return t}function ke(){let e=(te.current??ee.current)?.querySelector(`svg`);return e?new XMLSerializer().serializeToString(Oe(e)):void 0}function Ae(){let e=ke();if(e===void 0)return;let t=URL.createObjectURL(new Blob([e],{type:`image/svg+xml`})),n=document.createElement(`a`);n.href=t,n.download=we,n.click(),URL.revokeObjectURL(t),x(`SVG downloaded`),window.setTimeout(()=>x(null),2500)}async function je(){let e=ke();if(e!==void 0){try{await navigator.clipboard.writeText(e),x(`SVG markup copied`)}catch{x(`could not copy`)}window.setTimeout(()=>x(null),2500)}}return(0,i.jsxs)(`div`,{className:`space-y-3 text-sm`,"data-testid":`structured-document`,children:[pe&&(0,i.jsxs)(`p`,{className:`text-xs text-zinc-500`,"data-testid":`structured-proposal-note`,children:[`Proposed changes to `,(0,i.jsx)(`span`,{className:`font-mono`,children:jd(e)}),Ad(e)===void 0?null:(0,i.jsxs)(i.Fragment,{children:[`, prepared against `,(0,i.jsx)(`span`,{className:`font-mono`,children:Ad(e)})]}),`. Anything not mentioned is left as it is; anything shown without a change is here for context.`]}),he.profile===void 0?null:(0,i.jsxs)(`p`,{className:`text-xs text-zinc-500`,"data-testid":`structured-profile`,children:[`Vocabulary: `,(0,i.jsx)(`span`,{className:`font-mono`,children:he.profile}),(0,i.jsx)(`span`,{className:`ml-1 text-zinc-400`,children:`— names what the kinds and attributes mean; not resolved here`})]}),o===void 0?null:(0,i.jsx)(`p`,{className:o.state===`conforms`?`text-xs text-emerald-700 dark:text-emerald-400`:`text-xs text-amber-700 dark:text-amber-400`,"data-testid":`structured-conformance`,"data-state":o.state,children:Ed(o)}),he.artifacts.length>0&&(0,i.jsx)(`ul`,{className:`text-xs text-zinc-500`,"data-testid":`structured-document-artifacts`,children:he.artifacts.map((e,t)=>(0,i.jsx)(`li`,{className:`break-all font-mono`,children:ze(e)},t))}),he.traces.length>0&&(0,i.jsxs)(`p`,{className:`text-xs text-zinc-500`,"data-testid":`structured-relation-key`,children:[`Relations:`,` `,[...new Set(he.traces.map(e=>e.kind))].map((e,t)=>(0,i.jsxs)(`span`,{className:`font-mono`,children:[t>0?`, `:``,e]},e)),(0,i.jsx)(`span`,{className:`ml-1 text-zinc-400`,children:`— declared by the producer; nothing is inferred about what is missing`})]}),(ie.size>0||ye!==void 0)&&(0,i.jsxs)(`p`,{"data-testid":`structured-filtered`,className:`flex flex-wrap items-center gap-2 rounded border border-amber-300 bg-amber-50 px-2 py-1 text-xs text-amber-900 dark:border-amber-700 dark:bg-amber-950/40 dark:text-amber-200`,children:[ye!==void 0&&(0,i.jsxs)(`span`,{"data-testid":`structured-viewpoint`,children:[`Viewpoint: `,(0,i.jsx)(`strong`,{children:ye.label}),` — `,ye.concern,be?` Adjusted with the key.`:``]}),ie.size>0&&(0,i.jsxs)(`span`,{children:[`Filtered view — `,[...ie].map(e=>e.replace(/^(element|relationship|role):/,``)).join(`, `),` hidden.`,` `,pe?`The full proposal still applies.`:``]}),(0,i.jsx)(`button`,{type:`button`,className:`underline`,onClick:()=>xe(``),children:`show everything`})]}),(0,i.jsx)(`div`,{ref:ee,className:`overflow-x-auto`,children:Ce}),(0,i.jsx)(u,{label:`${e.kind} view`,open:c,onClose:()=>l(!1),containerRef:te,anchorRef:ee,actions:(e.kind===`graph`||e.kind===`sequence`)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`button`,{type:`button`,onClick:Ae,className:kd,children:`⤓ download SVG`}),(0,i.jsx)(`button`,{type:`button`,onClick:je,className:kd,children:`copy markup`}),b!==null&&(0,i.jsx)(`span`,{className:`text-xs text-zinc-500`,children:b})]}),children:Ce}),me.length>0&&(0,i.jsx)(`ul`,{className:`space-y-1`,"data-testid":`structured-removals`,children:me.map((t,n)=>(0,i.jsxs)(`li`,{"data-relationship-role":`removed`,className:`rounded border border-red-300 bg-red-50 px-2 py-1 text-xs text-red-800 dark:border-red-800 dark:bg-red-950/40 dark:text-red-200`,children:[(0,i.jsx)(`span`,{className:`line-through`,children:Od(t,e)}),Od(t,e)===t.ref&&(0,i.jsx)(`span`,{className:`ml-2 not-italic opacity-70`,"data-testid":`removal-undescribed`,children:`— the proposal does not say what this is`}),(0,i.jsx)(`span`,{className:`ml-2 font-mono opacity-60`,children:t.type})]},n))}),(0,i.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 text-xs`,children:[ve.length>0&&(0,i.jsxs)(`label`,{className:`flex items-center gap-1 text-zinc-500`,children:[`viewpoint`,(0,i.jsxs)(`select`,{"data-testid":`viewpoint-select`,className:`rounded border border-zinc-300 bg-white px-1 py-0.5 text-xs text-zinc-700 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-300`,value:ye?.id??``,onChange:e=>xe(e.target.value),children:[(0,i.jsx)(`option`,{value:``,children:`Whole document`}),ve.map(e=>(0,i.jsx)(`option`,{value:e.id,children:e.label},e.id))]})]}),(0,i.jsx)(`button`,{type:`button`,className:`text-zinc-500 underline`,"aria-label":`Show ${e.kind} view at full size`,onClick:()=>l(!0),children:`⤢ enlarge`}),e.kind===`graph`&&(0,i.jsx)(`button`,{type:`button`,className:`text-zinc-500 underline`,"data-testid":`diagram-orientation`,title:_e===`portrait`?`Turn it across the page — it is drawn down`:`Turn it down the page — it is drawn across`,"aria-label":`Turn the diagram ${f(_e)}`,onClick:Se,children:_e===`portrait`?`↔ landscape`:`↕ portrait`}),e.kind===`table`?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`button`,{type:`button`,className:`text-zinc-500 underline`,title:De===0?`Save as .csv — opens in any spreadsheet`:`Save as .csv — ${De} hidden rows are left out`,onClick:()=>ku(Ee(),`${Te}.csv`),children:`⤓ download CSV`}),(0,i.jsx)(`button`,{type:`button`,className:`text-zinc-500 underline`,title:De===0?`Save as .xlsx — one sheet, values typed as they are declared`:`Save as .xlsx — ${De} hidden rows are left out`,onClick:()=>void Au(Ee(),`${Te}.xlsx`),children:`⤓ download XLSX`}),(0,i.jsx)(`button`,{type:`button`,className:`text-zinc-500 underline`,title:De===0?`Save as .md — each chapter a heading, its rows a table`:`Save as .md — ${De} hidden rows are left out`,onClick:()=>ju(e.data,ie,he.rows,`${Te}.md`),children:`⤓ download Markdown`}),De>0&&(0,i.jsxs)(`span`,{className:`text-xs text-amber-700 dark:text-amber-300`,"data-testid":`table-export-narrowed`,children:[`exports `,De,` rows fewer than the table declares`]})]}):e.kind===`timeline`?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`button`,{type:`button`,className:`text-zinc-500 underline`,title:`Save as .svg — insert it as a picture in a document`,onClick:Ae,children:`⤓ download SVG`}),(0,i.jsx)(`button`,{type:`button`,className:`text-zinc-500 underline`,title:`Copy the SVG markup, for somewhere that takes it directly`,onClick:()=>void je(),children:`copy markup`})]}),(0,i.jsxs)(`button`,{type:`button`,className:`text-zinc-500 underline`,onClick:()=>p(e=>!e),children:[d?`hide`:`show`,` text equivalent`]}),fe!==void 0&&(0,i.jsxs)(`button`,{type:`button`,className:`text-zinc-500 underline`,onClick:()=>h(e=>!e),children:[m?`hide`:`show`,` derived diagram syntax`]}),(0,i.jsxs)(`button`,{type:`button`,className:`text-zinc-500 underline`,onClick:()=>y(e=>!e),children:[v?`hide`:`show`,` envelope`]}),n!==void 0&&(0,i.jsxs)(`button`,{type:`button`,className:`text-zinc-500 underline`,onClick:()=>_(e=>!e),children:[g?`hide`:`show`,` original output`]}),b!==null&&(0,i.jsx)(`span`,{role:`status`,className:`text-emerald-600 dark:text-emerald-400`,children:b})]}),d&&(0,i.jsx)(`pre`,{"data-testid":`structured-text-equivalent`,className:`overflow-x-auto rounded bg-zinc-100 p-2 text-xs dark:bg-zinc-800`,children:Dd(e,pe,ie,o)}),m&&fe!==void 0&&(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`p`,{className:`mb-1 text-[11px] text-zinc-500`,children:`Derived from the structured data above. It is an export, not the source.`}),(0,i.jsx)(`pre`,{"data-testid":`structured-derived-export`,className:`overflow-x-auto rounded bg-zinc-100 p-2 text-xs dark:bg-zinc-800`,children:fe})]}),v&&(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`p`,{className:`mb-1 text-[11px] text-zinc-500`,children:`The validated document this view is drawn from. It is not sent to the model.`}),(0,i.jsx)(`pre`,{"data-testid":`structured-envelope`,className:`max-h-80 overflow-auto rounded bg-zinc-100 p-2 text-xs dark:bg-zinc-800`,children:t})]}),g&&n!==void 0&&(0,i.jsx)(`pre`,{"data-testid":`structured-raw-output`,className:`overflow-x-auto rounded bg-zinc-100 p-2 text-xs dark:bg-zinc-800`,children:n})]})}function Nd({item:e,dispatch:t}){let n=El(e.structured);return n===void 0?null:(0,i.jsx)(Md,{envelope:n,source:wd(e.structured,n),rawOutput:e.output,dispatch:t,...e.structuredConformance===void 0?{}:{conformance:e.structuredConformance}})}var Pd={id:`structured-exchange`,match:e=>El(e.structured)!==void 0,stable:!1,showsRawReveal:!0,startsExpanded:!0,Expanded:Nd},Fd=class extends r.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e,t){console.error(`[pi-outpost] viewer crashed:`,e,t.componentStack)}render(){return this.state.failed?(0,i.jsx)(`div`,{className:`flex h-full items-center justify-center p-6`,children:(0,i.jsxs)(`p`,{className:`max-w-md text-center text-sm text-zinc-600 dark:text-zinc-400`,children:[this.props.label??`This file`,` could not be displayed. Close and reopen it to try again.`]})}):this.props.children}},Id=(0,r.createContext)({});function Ld(e){let t=ne(e.children,`json`);return t===null?(0,i.jsx)(ie,{...e}):(0,i.jsx)(Rd,{code:t,pre:e})}function Rd({code:e,pre:t}){let n=(0,r.useContext)(Id),a=(0,r.useMemo)(()=>Dl(e),[e]);if(a.status===`not-a-document`)return(0,i.jsx)(ie,{...t});if(a.status===`valid`){let t=n[Wt(e)];return(0,i.jsx)(Fd,{label:`This diagram`,children:(0,i.jsx)(`div`,{className:`my-2`,"data-testid":`reply-structured-exchange`,children:(0,i.jsx)(Md,{envelope:a.envelope,source:e,...t?{conformance:t}:{}})})})}return(0,i.jsxs)(`div`,{children:[(0,i.jsxs)(`p`,{"data-testid":`reply-structured-exchange-refused`,className:`mb-1 text-xs text-amber-700 dark:text-amber-400`,children:[`This structured-exchange document could not be drawn: `,zd(a)]}),(0,i.jsx)(ie,{...t})]})}function zd(e){if(e.status===`unsupported-version`)return`${e.schema} is not a version this application implements.`;let t=e.status===`invalid`?e.issues[0]:e.issue;return t===void 0?`it does not satisfy the schema it declares.`:`${t.message} (${t.rule}${t.path?` at ${t.path}`:``})`}function Bd(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Vd(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Hd=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ud=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wd={};function Gd(e,t){return((t||Wd).jsx?Ud:Hd).test(e)}var Kd=/[ \t\n\f\r]/g;function qd(e){return typeof e==`object`?e.type===`text`&&Jd(e.value):Jd(e)}function Jd(e){return e.replace(Kd,``)===``}var Yd=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Yd.prototype.normal={},Yd.prototype.property={},Yd.prototype.space=void 0;function Xd(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Yd(n,r,t)}function Zd(e){return e.toLowerCase()}var Qd=class{constructor(e,t){this.attribute=t,this.property=e}};Qd.prototype.attribute=``,Qd.prototype.booleanish=!1,Qd.prototype.boolean=!1,Qd.prototype.commaOrSpaceSeparated=!1,Qd.prototype.commaSeparated=!1,Qd.prototype.defined=!1,Qd.prototype.mustUseProperty=!1,Qd.prototype.number=!1,Qd.prototype.overloadedBoolean=!1,Qd.prototype.property=``,Qd.prototype.spaceSeparated=!1,Qd.prototype.space=void 0;var $d=e.n({boolean:()=>tf,booleanish:()=>nf,commaOrSpaceSeparated:()=>sf,commaSeparated:()=>of,number:()=>S,overloadedBoolean:()=>rf,spaceSeparated:()=>af}),ef=0,tf=cf(),nf=cf(),rf=cf(),S=cf(),af=cf(),of=cf(),sf=cf();function cf(){return 2**++ef}var lf=Object.keys($d),uf=class extends Qd{constructor(e,t,n,r){let i=-1;if(super(e,t),df(this,`space`,r),typeof n==`number`)for(;++i<lf.length;){let e=lf[i];df(this,lf[i],(n&$d[e])===$d[e])}}};uf.prototype.defined=!0;function df(e,t,n){n&&(e[t]=n)}function ff(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new uf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Zd(r)]=r,n[Zd(a.attribute)]=r}return new Yd(t,n,e.space)}var pf=ff({properties:{ariaActiveDescendant:null,ariaAtomic:nf,ariaAutoComplete:null,ariaBusy:nf,ariaChecked:nf,ariaColCount:S,ariaColIndex:S,ariaColSpan:S,ariaControls:af,ariaCurrent:null,ariaDescribedBy:af,ariaDetails:null,ariaDisabled:nf,ariaDropEffect:af,ariaErrorMessage:null,ariaExpanded:nf,ariaFlowTo:af,ariaGrabbed:nf,ariaHasPopup:null,ariaHidden:nf,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:af,ariaLevel:S,ariaLive:null,ariaModal:nf,ariaMultiLine:nf,ariaMultiSelectable:nf,ariaOrientation:null,ariaOwns:af,ariaPlaceholder:null,ariaPosInSet:S,ariaPressed:nf,ariaReadOnly:nf,ariaRelevant:null,ariaRequired:nf,ariaRoleDescription:af,ariaRowCount:S,ariaRowIndex:S,ariaRowSpan:S,ariaSelected:nf,ariaSetSize:S,ariaSort:null,ariaValueMax:S,ariaValueMin:S,ariaValueNow:S,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function mf(e,t){return t in e?e[t]:t}function hf(e,t){return mf(e,t.toLowerCase())}var gf=ff({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:of,acceptCharset:af,accessKey:af,action:null,allow:null,allowFullScreen:tf,allowPaymentRequest:tf,allowUserMedia:tf,alpha:tf,alt:null,as:null,async:tf,autoCapitalize:null,autoComplete:af,autoFocus:tf,autoPlay:tf,blocking:af,capture:null,charSet:null,checked:tf,cite:null,className:af,closedBy:null,colorSpace:null,cols:S,colSpan:S,command:null,commandFor:null,content:null,contentEditable:nf,controls:tf,controlsList:af,coords:S|of,crossOrigin:null,data:null,dateTime:null,decoding:null,default:tf,defer:tf,dir:null,dirName:null,disabled:tf,download:rf,draggable:nf,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:tf,formTarget:null,headers:af,height:S,hidden:rf,high:S,href:null,hrefLang:null,htmlFor:af,httpEquiv:af,id:null,imageSizes:null,imageSrcSet:null,inert:tf,inputMode:null,integrity:null,is:null,isMap:tf,itemId:null,itemProp:af,itemRef:af,itemScope:tf,itemType:af,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:tf,low:S,manifest:null,max:null,maxLength:S,media:null,method:null,min:null,minLength:S,multiple:tf,muted:tf,name:null,nonce:null,noModule:tf,noValidate:tf,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:tf,optimum:S,pattern:null,ping:af,placeholder:null,playsInline:tf,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:tf,referrerPolicy:null,rel:af,required:tf,reversed:tf,rows:S,rowSpan:S,sandbox:af,scope:null,scoped:tf,seamless:tf,selected:tf,shadowRootClonable:tf,shadowRootCustomElementRegistry:tf,shadowRootDelegatesFocus:tf,shadowRootMode:null,shadowRootSerializable:tf,shape:null,size:S,sizes:null,slot:null,span:S,spellCheck:nf,src:null,srcDoc:null,srcLang:null,srcSet:null,start:S,step:null,style:null,tabIndex:S,target:null,title:null,translate:null,type:null,typeMustMatch:tf,useMap:null,value:nf,width:S,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:af,axis:null,background:null,bgColor:null,border:S,borderColor:null,bottomMargin:S,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:tf,declare:tf,event:null,face:null,frame:null,frameBorder:null,hSpace:S,leftMargin:S,link:null,longDesc:null,lowSrc:null,marginHeight:S,marginWidth:S,noResize:tf,noHref:tf,noShade:tf,noWrap:tf,object:null,profile:null,prompt:null,rev:null,rightMargin:S,rules:null,scheme:null,scrolling:nf,standby:null,summary:null,text:null,topMargin:S,valueType:null,version:null,vAlign:null,vLink:null,vSpace:S,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:tf,disablePictureInPicture:tf,disableRemotePlayback:tf,exportParts:of,part:af,prefix:null,property:null,results:S,security:null,unselectable:null},space:`html`,transform:hf}),_f=ff({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:sf,accentHeight:S,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:S,amplitude:S,arabicForm:null,ascent:S,attributeName:null,attributeType:null,azimuth:S,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:S,by:null,calcMode:null,capHeight:S,className:af,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:S,diffuseConstant:S,direction:null,display:null,dur:null,divisor:S,dominantBaseline:null,download:tf,dx:null,dy:null,edgeMode:null,editable:null,elevation:S,enableBackground:null,end:null,event:null,exponent:S,externalResourcesRequired:null,fill:null,fillOpacity:S,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:of,g2:of,glyphName:of,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:S,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:S,horizOriginX:S,horizOriginY:S,id:null,ideographic:S,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:S,k:S,k1:S,k2:S,k3:S,k4:S,kernelMatrix:sf,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:S,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:S,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:S,overlineThickness:S,paintOrder:null,panose1:null,path:null,pathLength:S,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:af,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:S,pointsAtY:S,pointsAtZ:S,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:sf,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:sf,rev:sf,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:sf,requiredFeatures:sf,requiredFonts:sf,requiredFormats:sf,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:S,specularExponent:S,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:S,strikethroughThickness:S,string:null,stroke:null,strokeDashArray:sf,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:S,strokeOpacity:S,strokeWidth:null,style:null,surfaceScale:S,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:sf,tabIndex:S,tableValues:null,target:null,targetX:S,targetY:S,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:sf,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:S,underlineThickness:S,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:S,values:null,vAlphabetic:S,vMathematical:S,vectorEffect:null,vHanging:S,vIdeographic:S,version:null,vertAdvY:S,vertOriginX:S,vertOriginY:S,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:S,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:mf}),vf=ff({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),yf=ff({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:hf}),bf=ff({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),xf={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Sf=/[A-Z]/g,Cf=/-[a-z]/g,wf=/^data[-\w.:]+$/i;function Tf(e,t){let n=Zd(t),r=t,i=Qd;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&wf.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Cf,Df);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Cf.test(e)){let n=e.replace(Sf,Ef);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=uf}return new i(r,t)}function Ef(e){return`-`+e.toLowerCase()}function Df(e){return e.charAt(1).toUpperCase()}var Of=Xd([pf,gf,vf,yf,bf],`html`),kf=Xd([pf,_f,vf,yf,bf],`svg`);function Af(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function jf(e){return e.join(` `).trim()}var Mf=e.t(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
16
|
-
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function
|
|
15
|
+
`)}function Od(e,t){let n=e=>{if(e===void 0)return;let n=t.data,r=[...n.nodes??[],...n.participants??[]].find(t=>t.id===e||t.ref===e);return r===void 0?e:il(r)},r=t.data,i=[...r.nodes??[],...r.participants??[],...r.edges??[],...r.messages??[]].find(t=>`ref`in t&&t.ref===e.ref),a=e.from!==void 0||e.to!==void 0?`${n(e.from)??`?`} → ${n(e.to)??`?`}`:i!==void 0&&`from`in i?`${n(i.from)} → ${n(i.to)}`:void 0,o=e.label??(i===void 0?void 0:i.label),s=e.kind??(i===void 0?void 0:i.kind),c=[o,s===void 0?void 0:`[${s}]`,a].filter(e=>e!==void 0&&e!==``);return c.length===0?e.ref:`${c.join(` `)} (${e.ref})`}var kd=`text-xs text-zinc-500 underline hover:text-zinc-800 dark:hover:text-zinc-200`;function Ad(e){let t=e.target;if(typeof t!=`object`||!t)return;let n=t.revision;return typeof n==`string`?n:void 0}function jd(e){let t=e.target;if(typeof t==`string`)return t;if(typeof t==`object`&&t&&typeof t.ref==`string`)return t.ref}function Md({envelope:e,source:t,rawOutput:n,dispatch:a,conformance:o}){let s=(0,r.useContext)(dd),[c,l]=(0,r.useState)(!1),[d,p]=(0,r.useState)(!1),[m,h]=(0,r.useState)(!1),[g,_]=(0,r.useState)(!1),[v,y]=(0,r.useState)(!1),[b,ee]=(0,r.useState)(null),x=(0,r.useRef)(null),te=(0,r.useRef)(null),[ne,re]=(0,r.useState)(new Map),[ie,ae]=(0,r.useState)(ul),[oe,se]=(0,r.useState)(void 0),[ce,le]=(0,r.useState)(void 0),[ue,de]=(0,r.useState)(void 0),fe=(0,r.useMemo)(()=>al(e),[e]),pe=e.target!==void 0,me=e.removals??[],he=(0,r.useMemo)(()=>rl(e,pe),[e,pe]),ge=(0,r.useMemo)(()=>e.kind===`graph`?gu(e.data,ie):`landscape`,[e,ie]),_e=oe??ge,ve=(0,r.useMemo)(()=>e.kind===`graph`?fl(e):[],[e]),ye=ve.find(e=>e.id===ce),be=ye!==void 0&&!ml(ie,pl(e.data,ye)),xe=t=>{let n=ve.find(e=>e.id===t);le(n?.id),ae(n===void 0?ul:pl(e.data,n))},Se=()=>{se(e=>f(e??ge)),re(new Map)},Ce=e.kind===`graph`?(0,i.jsx)(hd,{data:e.data,isProposal:pe,nudges:ne,setNudges:re,hidden:ie,setHidden:ae,orientation:_e,viewpoint:ye}):e.kind===`sequence`?(0,i.jsx)(gd,{data:e.data,isProposal:pe}):e.kind===`timeline`?(0,i.jsx)(ld,{data:e.data,appearance:s,display:ue??sd(e.data),onDisplayChange:t=>de(n=>t(n??sd(e.data)))}):(0,i.jsx)(Cd,{data:e.data,hidden:ie,setHidden:ae,rows:he.rows,traces:he.traces,dispatch:a}),we=`${e.kind}-${jd(e)??`diagram`}.svg`.replace(/[^\w.-]+/g,`-`),Te=`${e.kind}-${jd(e)??`data`}`.replace(/[^\w.-]+/g,`-`),Ee=()=>Cu(e.data,ie,he.rows),De=e.kind===`table`?Ee().withheld:0;function Oe(e){let t=e.cloneNode(!0);for(let e of t.querySelectorAll(`[data-hit]`))e.remove();for(let e of[t,...t.querySelectorAll(`[style]`)])e.style.removeProperty(`cursor`),e.style.removeProperty(`touch-action`),e.getAttribute(`style`)===``&&e.removeAttribute(`style`);return t}function ke(){let e=(te.current??x.current)?.querySelector(`svg`);return e?new XMLSerializer().serializeToString(Oe(e)):void 0}function Ae(){let e=ke();if(e===void 0)return;let t=URL.createObjectURL(new Blob([e],{type:`image/svg+xml`})),n=document.createElement(`a`);n.href=t,n.download=we,n.click(),URL.revokeObjectURL(t),ee(`SVG downloaded`),window.setTimeout(()=>ee(null),2500)}async function je(){let e=ke();if(e!==void 0){try{await navigator.clipboard.writeText(e),ee(`SVG markup copied`)}catch{ee(`could not copy`)}window.setTimeout(()=>ee(null),2500)}}return(0,i.jsxs)(`div`,{className:`space-y-3 text-sm`,"data-testid":`structured-document`,children:[pe&&(0,i.jsxs)(`p`,{className:`text-xs text-zinc-500`,"data-testid":`structured-proposal-note`,children:[`Proposed changes to `,(0,i.jsx)(`span`,{className:`font-mono`,children:jd(e)}),Ad(e)===void 0?null:(0,i.jsxs)(i.Fragment,{children:[`, prepared against `,(0,i.jsx)(`span`,{className:`font-mono`,children:Ad(e)})]}),`. Anything not mentioned is left as it is; anything shown without a change is here for context.`]}),he.profile===void 0?null:(0,i.jsxs)(`p`,{className:`text-xs text-zinc-500`,"data-testid":`structured-profile`,children:[`Vocabulary: `,(0,i.jsx)(`span`,{className:`font-mono`,children:he.profile}),(0,i.jsx)(`span`,{className:`ml-1 text-zinc-400`,children:`— names what the kinds and attributes mean; not resolved here`})]}),o===void 0?null:(0,i.jsx)(`p`,{className:o.state===`conforms`?`text-xs text-emerald-700 dark:text-emerald-400`:`text-xs text-amber-700 dark:text-amber-400`,"data-testid":`structured-conformance`,"data-state":o.state,children:Ed(o)}),he.artifacts.length>0&&(0,i.jsx)(`ul`,{className:`text-xs text-zinc-500`,"data-testid":`structured-document-artifacts`,children:he.artifacts.map((e,t)=>(0,i.jsx)(`li`,{className:`break-all font-mono`,children:ze(e)},t))}),he.traces.length>0&&(0,i.jsxs)(`p`,{className:`text-xs text-zinc-500`,"data-testid":`structured-relation-key`,children:[`Relations:`,` `,[...new Set(he.traces.map(e=>e.kind))].map((e,t)=>(0,i.jsxs)(`span`,{className:`font-mono`,children:[t>0?`, `:``,e]},e)),(0,i.jsx)(`span`,{className:`ml-1 text-zinc-400`,children:`— declared by the producer; nothing is inferred about what is missing`})]}),(ie.size>0||ye!==void 0)&&(0,i.jsxs)(`p`,{"data-testid":`structured-filtered`,className:`flex flex-wrap items-center gap-2 rounded border border-amber-300 bg-amber-50 px-2 py-1 text-xs text-amber-900 dark:border-amber-700 dark:bg-amber-950/40 dark:text-amber-200`,children:[ye!==void 0&&(0,i.jsxs)(`span`,{"data-testid":`structured-viewpoint`,children:[`Viewpoint: `,(0,i.jsx)(`strong`,{children:ye.label}),` — `,ye.concern,be?` Adjusted with the key.`:``]}),ie.size>0&&(0,i.jsxs)(`span`,{children:[`Filtered view — `,[...ie].map(e=>e.replace(/^(element|relationship|role):/,``)).join(`, `),` hidden.`,` `,pe?`The full proposal still applies.`:``]}),(0,i.jsx)(`button`,{type:`button`,className:`underline`,onClick:()=>xe(``),children:`show everything`})]}),(0,i.jsx)(`div`,{ref:x,className:`overflow-x-auto`,children:Ce}),(0,i.jsx)(u,{label:`${e.kind} view`,open:c,onClose:()=>l(!1),containerRef:te,anchorRef:x,actions:(e.kind===`graph`||e.kind===`sequence`)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`button`,{type:`button`,onClick:Ae,className:kd,children:`⤓ download SVG`}),(0,i.jsx)(`button`,{type:`button`,onClick:je,className:kd,children:`copy markup`}),b!==null&&(0,i.jsx)(`span`,{className:`text-xs text-zinc-500`,children:b})]}),children:Ce}),me.length>0&&(0,i.jsx)(`ul`,{className:`space-y-1`,"data-testid":`structured-removals`,children:me.map((t,n)=>(0,i.jsxs)(`li`,{"data-relationship-role":`removed`,className:`rounded border border-red-300 bg-red-50 px-2 py-1 text-xs text-red-800 dark:border-red-800 dark:bg-red-950/40 dark:text-red-200`,children:[(0,i.jsx)(`span`,{className:`line-through`,children:Od(t,e)}),Od(t,e)===t.ref&&(0,i.jsx)(`span`,{className:`ml-2 not-italic opacity-70`,"data-testid":`removal-undescribed`,children:`— the proposal does not say what this is`}),(0,i.jsx)(`span`,{className:`ml-2 font-mono opacity-60`,children:t.type})]},n))}),(0,i.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 text-xs`,children:[ve.length>0&&(0,i.jsxs)(`label`,{className:`flex items-center gap-1 text-zinc-500`,children:[`viewpoint`,(0,i.jsxs)(`select`,{"data-testid":`viewpoint-select`,className:`rounded border border-zinc-300 bg-white px-1 py-0.5 text-xs text-zinc-700 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-300`,value:ye?.id??``,onChange:e=>xe(e.target.value),children:[(0,i.jsx)(`option`,{value:``,children:`Whole document`}),ve.map(e=>(0,i.jsx)(`option`,{value:e.id,children:e.label},e.id))]})]}),(0,i.jsx)(`button`,{type:`button`,className:`text-zinc-500 underline`,"aria-label":`Show ${e.kind} view at full size`,onClick:()=>l(!0),children:`⤢ enlarge`}),e.kind===`graph`&&(0,i.jsx)(`button`,{type:`button`,className:`text-zinc-500 underline`,"data-testid":`diagram-orientation`,title:_e===`portrait`?`Turn it across the page — it is drawn down`:`Turn it down the page — it is drawn across`,"aria-label":`Turn the diagram ${f(_e)}`,onClick:Se,children:_e===`portrait`?`↔ landscape`:`↕ portrait`}),e.kind===`table`?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`button`,{type:`button`,className:`text-zinc-500 underline`,title:De===0?`Save as .csv — opens in any spreadsheet`:`Save as .csv — ${De} hidden rows are left out`,onClick:()=>ku(Ee(),`${Te}.csv`),children:`⤓ download CSV`}),(0,i.jsx)(`button`,{type:`button`,className:`text-zinc-500 underline`,title:De===0?`Save as .xlsx — one sheet, values typed as they are declared`:`Save as .xlsx — ${De} hidden rows are left out`,onClick:()=>void Au(Ee(),`${Te}.xlsx`),children:`⤓ download XLSX`}),(0,i.jsx)(`button`,{type:`button`,className:`text-zinc-500 underline`,title:De===0?`Save as .md — each chapter a heading, its rows a table`:`Save as .md — ${De} hidden rows are left out`,onClick:()=>ju(e.data,ie,he.rows,`${Te}.md`),children:`⤓ download Markdown`}),De>0&&(0,i.jsxs)(`span`,{className:`text-xs text-amber-700 dark:text-amber-300`,"data-testid":`table-export-narrowed`,children:[`exports `,De,` rows fewer than the table declares`]})]}):e.kind===`timeline`?null:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`button`,{type:`button`,className:`text-zinc-500 underline`,title:`Save as .svg — insert it as a picture in a document`,onClick:Ae,children:`⤓ download SVG`}),(0,i.jsx)(`button`,{type:`button`,className:`text-zinc-500 underline`,title:`Copy the SVG markup, for somewhere that takes it directly`,onClick:()=>void je(),children:`copy markup`})]}),(0,i.jsxs)(`button`,{type:`button`,className:`text-zinc-500 underline`,onClick:()=>p(e=>!e),children:[d?`hide`:`show`,` text equivalent`]}),fe!==void 0&&(0,i.jsxs)(`button`,{type:`button`,className:`text-zinc-500 underline`,onClick:()=>h(e=>!e),children:[m?`hide`:`show`,` derived diagram syntax`]}),(0,i.jsxs)(`button`,{type:`button`,className:`text-zinc-500 underline`,onClick:()=>y(e=>!e),children:[v?`hide`:`show`,` envelope`]}),n!==void 0&&(0,i.jsxs)(`button`,{type:`button`,className:`text-zinc-500 underline`,onClick:()=>_(e=>!e),children:[g?`hide`:`show`,` original output`]}),b!==null&&(0,i.jsx)(`span`,{role:`status`,className:`text-emerald-600 dark:text-emerald-400`,children:b})]}),d&&(0,i.jsx)(`pre`,{"data-testid":`structured-text-equivalent`,className:`overflow-x-auto rounded bg-zinc-100 p-2 text-xs dark:bg-zinc-800`,children:Dd(e,pe,ie,o)}),m&&fe!==void 0&&(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`p`,{className:`mb-1 text-[11px] text-zinc-500`,children:`Derived from the structured data above. It is an export, not the source.`}),(0,i.jsx)(`pre`,{"data-testid":`structured-derived-export`,className:`overflow-x-auto rounded bg-zinc-100 p-2 text-xs dark:bg-zinc-800`,children:fe})]}),v&&(0,i.jsxs)(`div`,{children:[(0,i.jsx)(`p`,{className:`mb-1 text-[11px] text-zinc-500`,children:`The validated document this view is drawn from. It is not sent to the model.`}),(0,i.jsx)(`pre`,{"data-testid":`structured-envelope`,className:`max-h-80 overflow-auto rounded bg-zinc-100 p-2 text-xs dark:bg-zinc-800`,children:t})]}),g&&n!==void 0&&(0,i.jsx)(`pre`,{"data-testid":`structured-raw-output`,className:`overflow-x-auto rounded bg-zinc-100 p-2 text-xs dark:bg-zinc-800`,children:n})]})}function Nd({item:e,dispatch:t}){let n=El(e.structured);return n===void 0?null:(0,i.jsx)(Md,{envelope:n,source:wd(e.structured,n),rawOutput:e.output,dispatch:t,...e.structuredConformance===void 0?{}:{conformance:e.structuredConformance}})}var Pd={id:`structured-exchange`,match:e=>El(e.structured)!==void 0,stable:!1,showsRawReveal:!0,startsExpanded:!0,Expanded:Nd},Fd=class extends r.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidCatch(e,t){console.error(`[pi-outpost] viewer crashed:`,e,t.componentStack)}render(){return this.state.failed?(0,i.jsx)(`div`,{className:`flex h-full items-center justify-center p-6`,children:(0,i.jsxs)(`p`,{className:`max-w-md text-center text-sm text-zinc-600 dark:text-zinc-400`,children:[this.props.label??`This file`,` could not be displayed. Close and reopen it to try again.`]})}):this.props.children}},Id=(0,r.createContext)({});function Ld(e){let t=ne(e.children,`json`);return t===null?(0,i.jsx)(ie,{...e}):(0,i.jsx)(Rd,{code:t,pre:e})}function Rd({code:e,pre:t}){let n=(0,r.useContext)(Id),a=(0,r.useMemo)(()=>Dl(e),[e]);if(a.status===`not-a-document`)return(0,i.jsx)(ie,{...t});if(a.status===`valid`){let t=n[Wt(e)];return(0,i.jsx)(Fd,{label:`This diagram`,children:(0,i.jsx)(`div`,{className:`my-2`,"data-testid":`reply-structured-exchange`,children:(0,i.jsx)(Md,{envelope:a.envelope,source:e,...t?{conformance:t}:{}})})})}return(0,i.jsxs)(`div`,{children:[(0,i.jsxs)(`p`,{"data-testid":`reply-structured-exchange-refused`,className:`mb-1 text-xs text-amber-700 dark:text-amber-400`,children:[`This structured-exchange document could not be drawn: `,zd(a)]}),(0,i.jsx)(ie,{...t})]})}function zd(e){if(e.status===`unsupported-version`)return`${e.schema} is not a version this application implements.`;let t=e.status===`invalid`?e.issues[0]:e.issue;return t===void 0?`it does not satisfy the schema it declares.`:`${t.message} (${t.rule}${t.path?` at ${t.path}`:``})`}function Bd(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Vd(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Hd=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ud=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Wd={};function Gd(e,t){return((t||Wd).jsx?Ud:Hd).test(e)}var Kd=/[ \t\n\f\r]/g;function qd(e){return typeof e==`object`?e.type===`text`&&Jd(e.value):Jd(e)}function Jd(e){return e.replace(Kd,``)===``}var Yd=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Yd.prototype.normal={},Yd.prototype.property={},Yd.prototype.space=void 0;function Xd(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Yd(n,r,t)}function Zd(e){return e.toLowerCase()}var Qd=class{constructor(e,t){this.attribute=t,this.property=e}};Qd.prototype.attribute=``,Qd.prototype.booleanish=!1,Qd.prototype.boolean=!1,Qd.prototype.commaOrSpaceSeparated=!1,Qd.prototype.commaSeparated=!1,Qd.prototype.defined=!1,Qd.prototype.mustUseProperty=!1,Qd.prototype.number=!1,Qd.prototype.overloadedBoolean=!1,Qd.prototype.property=``,Qd.prototype.spaceSeparated=!1,Qd.prototype.space=void 0;var $d=e.n({boolean:()=>tf,booleanish:()=>nf,commaOrSpaceSeparated:()=>sf,commaSeparated:()=>of,number:()=>S,overloadedBoolean:()=>rf,spaceSeparated:()=>af}),ef=0,tf=cf(),nf=cf(),rf=cf(),S=cf(),af=cf(),of=cf(),sf=cf();function cf(){return 2**++ef}var lf=Object.keys($d),uf=class extends Qd{constructor(e,t,n,r){let i=-1;if(super(e,t),df(this,`space`,r),typeof n==`number`)for(;++i<lf.length;){let e=lf[i];df(this,lf[i],(n&$d[e])===$d[e])}}};uf.prototype.defined=!0;function df(e,t,n){n&&(e[t]=n)}function ff(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new uf(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Zd(r)]=r,n[Zd(a.attribute)]=r}return new Yd(t,n,e.space)}var pf=ff({properties:{ariaActiveDescendant:null,ariaAtomic:nf,ariaAutoComplete:null,ariaBusy:nf,ariaChecked:nf,ariaColCount:S,ariaColIndex:S,ariaColSpan:S,ariaControls:af,ariaCurrent:null,ariaDescribedBy:af,ariaDetails:null,ariaDisabled:nf,ariaDropEffect:af,ariaErrorMessage:null,ariaExpanded:nf,ariaFlowTo:af,ariaGrabbed:nf,ariaHasPopup:null,ariaHidden:nf,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:af,ariaLevel:S,ariaLive:null,ariaModal:nf,ariaMultiLine:nf,ariaMultiSelectable:nf,ariaOrientation:null,ariaOwns:af,ariaPlaceholder:null,ariaPosInSet:S,ariaPressed:nf,ariaReadOnly:nf,ariaRelevant:null,ariaRequired:nf,ariaRoleDescription:af,ariaRowCount:S,ariaRowIndex:S,ariaRowSpan:S,ariaSelected:nf,ariaSetSize:S,ariaSort:null,ariaValueMax:S,ariaValueMin:S,ariaValueNow:S,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function mf(e,t){return t in e?e[t]:t}function hf(e,t){return mf(e,t.toLowerCase())}var gf=ff({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:of,acceptCharset:af,accessKey:af,action:null,allow:null,allowFullScreen:tf,allowPaymentRequest:tf,allowUserMedia:tf,alpha:tf,alt:null,as:null,async:tf,autoCapitalize:null,autoComplete:af,autoFocus:tf,autoPlay:tf,blocking:af,capture:null,charSet:null,checked:tf,cite:null,className:af,closedBy:null,colorSpace:null,cols:S,colSpan:S,command:null,commandFor:null,content:null,contentEditable:nf,controls:tf,controlsList:af,coords:S|of,crossOrigin:null,data:null,dateTime:null,decoding:null,default:tf,defer:tf,dir:null,dirName:null,disabled:tf,download:rf,draggable:nf,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:tf,formTarget:null,headers:af,height:S,hidden:rf,high:S,href:null,hrefLang:null,htmlFor:af,httpEquiv:af,id:null,imageSizes:null,imageSrcSet:null,inert:tf,inputMode:null,integrity:null,is:null,isMap:tf,itemId:null,itemProp:af,itemRef:af,itemScope:tf,itemType:af,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:tf,low:S,manifest:null,max:null,maxLength:S,media:null,method:null,min:null,minLength:S,multiple:tf,muted:tf,name:null,nonce:null,noModule:tf,noValidate:tf,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:tf,optimum:S,pattern:null,ping:af,placeholder:null,playsInline:tf,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:tf,referrerPolicy:null,rel:af,required:tf,reversed:tf,rows:S,rowSpan:S,sandbox:af,scope:null,scoped:tf,seamless:tf,selected:tf,shadowRootClonable:tf,shadowRootCustomElementRegistry:tf,shadowRootDelegatesFocus:tf,shadowRootMode:null,shadowRootSerializable:tf,shape:null,size:S,sizes:null,slot:null,span:S,spellCheck:nf,src:null,srcDoc:null,srcLang:null,srcSet:null,start:S,step:null,style:null,tabIndex:S,target:null,title:null,translate:null,type:null,typeMustMatch:tf,useMap:null,value:nf,width:S,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:af,axis:null,background:null,bgColor:null,border:S,borderColor:null,bottomMargin:S,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:tf,declare:tf,event:null,face:null,frame:null,frameBorder:null,hSpace:S,leftMargin:S,link:null,longDesc:null,lowSrc:null,marginHeight:S,marginWidth:S,noResize:tf,noHref:tf,noShade:tf,noWrap:tf,object:null,profile:null,prompt:null,rev:null,rightMargin:S,rules:null,scheme:null,scrolling:nf,standby:null,summary:null,text:null,topMargin:S,valueType:null,version:null,vAlign:null,vLink:null,vSpace:S,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:tf,disablePictureInPicture:tf,disableRemotePlayback:tf,exportParts:of,part:af,prefix:null,property:null,results:S,security:null,unselectable:null},space:`html`,transform:hf}),_f=ff({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:sf,accentHeight:S,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:S,amplitude:S,arabicForm:null,ascent:S,attributeName:null,attributeType:null,azimuth:S,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:S,by:null,calcMode:null,capHeight:S,className:af,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:S,diffuseConstant:S,direction:null,display:null,dur:null,divisor:S,dominantBaseline:null,download:tf,dx:null,dy:null,edgeMode:null,editable:null,elevation:S,enableBackground:null,end:null,event:null,exponent:S,externalResourcesRequired:null,fill:null,fillOpacity:S,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:of,g2:of,glyphName:of,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:S,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:S,horizOriginX:S,horizOriginY:S,id:null,ideographic:S,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:S,k:S,k1:S,k2:S,k3:S,k4:S,kernelMatrix:sf,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:S,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:S,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:S,overlineThickness:S,paintOrder:null,panose1:null,path:null,pathLength:S,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:af,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:S,pointsAtY:S,pointsAtZ:S,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:sf,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:sf,rev:sf,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:sf,requiredFeatures:sf,requiredFonts:sf,requiredFormats:sf,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:S,specularExponent:S,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:S,strikethroughThickness:S,string:null,stroke:null,strokeDashArray:sf,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:S,strokeOpacity:S,strokeWidth:null,style:null,surfaceScale:S,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:sf,tabIndex:S,tableValues:null,target:null,targetX:S,targetY:S,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:sf,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:S,underlineThickness:S,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:S,values:null,vAlphabetic:S,vMathematical:S,vectorEffect:null,vHanging:S,vIdeographic:S,version:null,vertAdvY:S,vertOriginX:S,vertOriginY:S,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:S,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:mf}),vf=ff({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),yf=ff({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:hf}),bf=ff({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),xf={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},Sf=/[A-Z]/g,Cf=/-[a-z]/g,wf=/^data[-\w.:]+$/i;function Tf(e,t){let n=Zd(t),r=t,i=Qd;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&wf.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Cf,Df);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Cf.test(e)){let n=e.replace(Sf,Ef);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=uf}return new i(r,t)}function Ef(e){return`-`+e.toLowerCase()}function Df(e){return e.charAt(1).toUpperCase()}var Of=Xd([pf,gf,vf,yf,bf],`html`),kf=Xd([pf,_f,vf,yf,bf],`svg`);function Af(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function jf(e){return e.join(` `).trim()}var Mf=e.t(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
16
|
+
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function ee(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),ee()}function d(e){return e?e.replace(l,``):``}t.exports=u})),Nf=e.t((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(Mf());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Pf=e.t((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Ff=e.t(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Nf()),r=Pf();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),If=Rf(`end`),Lf=Rf(`start`);function Rf(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function zf(e){let t=Lf(e),n=If(e);if(t&&n)return{start:t,end:n}}var Bf=e.r(Ff(),1),Vf={}.hasOwnProperty,Hf=new Map,Uf=/[A-Z]/g,Wf=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Gf=new Set([`td`,`th`]),Kf=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function qf(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=ip(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=rp(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?kf:Of,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Jf(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Jf(e,t,n){if(t.type===`element`)return Yf(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Xf(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Qf(e,t,n);if(t.type===`mdxjsEsm`)return Zf(e,t);if(t.type===`root`)return $f(e,t,n);if(t.type===`text`)return ep(e,t)}function Yf(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=kf,e.schema=i),e.ancestors.push(t);let a=up(e,t.tagName,!1),o=ap(e,t),s=sp(e,t);return Wf.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!qd(e)})),tp(e,o,a,t),np(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Xf(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}dp(e,t.position)}function Zf(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);dp(e,t.position)}function Qf(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=kf,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:up(e,t.name,!0),o=op(e,t),s=sp(e,t);return tp(e,o,a,t),np(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function $f(e,t,n){let r={};return np(r,sp(e,t)),e.create(t,e.Fragment,r,n)}function ep(e,t){return t.value}function tp(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function np(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function rp(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function ip(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Lf(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function ap(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Vf.call(t.properties,i)){let a=cp(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Gf.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function op(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else dp(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else dp(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function sp(e,t){let n=[],r=-1,i=e.passKeys?new Map:Hf;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Jf(e,a,o);s!==void 0&&n.push(s)}return n}function cp(e,t,n){let r=Tf(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Vd(n):jf(n)),r.property===`style`){let t=typeof n==`object`?n:lp(e,String(n));return e.stylePropertyNameCase===`css`&&(t=fp(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?xf[r.property]||r.property:r.attribute,n]}}function lp(e,n){try{return(0,Bf.default)(n,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let r=n,i=new t.f("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw i.file=e.filePath||void 0,i.url=Kf+`#cannot-parse-style-attribute`,i}}function up(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Gd(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Gd(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Vf.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);dp(e)}function dp(e,n){let r=new t.f("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Kf+`#cannot-handle-mdx-estrees-without-createevaluater`,r}function fp(e){let t={},n;for(n in e)Vf.call(e,n)&&(t[pp(n)]=e[n]);return t}function pp(e){let t=e.replace(Uf,mp);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function mp(e){return`-`+e.toLowerCase()}var hp={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]};function gp(e){let n=[],r=-1,i=0,a=0;for(;++r<e.length;){let o=e.charCodeAt(r),s=``;if(o===37&&t.d(e.charCodeAt(r+1))&&t.d(e.charCodeAt(r+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){let t=e.charCodeAt(r+1);o<56320&&t>56319&&t<57344?(s=String.fromCharCode(o,t),a=1):s=`�`}else s=String.fromCharCode(o);s&&=(n.push(e.slice(i,r),encodeURIComponent(s)),i=r+a+1,``),a&&=(r+=a,0)}return n.join(``)+e.slice(i)}function _p(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function vp(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
17
17
|
`}]}function yp(e,t){let n=t.value?t.value+`
|
|
18
18
|
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function bp(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xp(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Sp(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=gp(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Cp(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wp(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Tp(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Ep(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Tp(e,t);let i={src:gp(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Dp(e,t){let n={src:gp(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Op(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function kp(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Tp(e,t);let i={href:gp(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Ap(e,t){let n={href:gp(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function jp(e,t,n){let r=e.all(t),i=n?Mp(n):Np(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
19
19
|
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
@@ -276,8 +276,8 @@ c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6
|
|
|
276
276
|
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
|
277
277
|
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
278
278
|
l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
279
|
-
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}};function Bb(e){return`toText`in e}var Vb=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e=``,t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>{if(Bb(e))return e.toText();throw Error(`Expected MathDomNode with toText, got `+e.constructor.name)}).join(``)}},Hb={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Ub={ex:!0,em:!0,mu:!0},Wb=function(e){return typeof e!=`string`&&(e=e.unit),e in Hb||e in Ub||e===`ex`},Gb=function(e,t){var n;if(e.unit in Hb)n=Hb[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new j(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},M=function(e){return+e.toFixed(4)+`em`},Kb=function(e){return e.filter(e=>e).join(` `)},qb=function(e){var t=``;for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=qy(n)+`:`+r+`;`)}return t},Jb=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},Yb=function(e){var t=document.createElement(e);t.className=Kb(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t},Xb=/[\s"'>/=\x00-\x1f]/,Zb=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+Xy(Kb(this.classes))+`"`);var n=qb(this.style);n&&(t+=` style="`+Xy(n)+`"`);for(var r of Object.keys(this.attributes)){if(Xb.test(r))throw new j(`Invalid attribute name '`+r+`'`);t+=` `+r+`="`+Xy(this.attributes[r])+`"`}t+=`>`;for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+=`</`+e+`>`,t},Qb=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,Jb.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Yb.call(this,`span`)}toMarkup(){return Zb.call(this,`span`)}},$b=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Jb.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Yb.call(this,`a`)}toMarkup(){return Zb.call(this,`a`)}},ex=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);return e.src=this.src,e.alt=this.alt,e.className=`mord`,Object.assign(e.style,this.style),e}toMarkup(){var e=`<img src="`+Xy(this.src)+`"`+(` alt="`+Xy(this.alt)+`"`),t=qb(this.style);return t&&(e+=` style="`+Xy(t)+`"`),e+=`'/>`,e}},tx={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},nx=class{constructor(e,t,n,r,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=wb(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=tx[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=M(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=Kb(this.classes)),Object.keys(this.style).length>0&&(t||=document.createElement(`span`),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`<span`;this.classes.length&&(e=!0,t+=` class="`,t+=Xy(Kb(this.classes)),t+=`"`);var n=``;this.italic>0&&(n+=`margin-right:`+M(this.italic)+`;`),n+=qb(this.style),n&&(e=!0,t+=` style="`+Xy(n)+`"`);var r=Xy(this.text);return e?(t+=`>`,t+=r,t+=`</span>`,t):r}},rx=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<svg xmlns="http://www.w3.org/2000/svg"`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+Xy(this.attributes[t])+`"`;e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</svg>`,e}},ix=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,Rb[this.pathName]),e}toMarkup(){return this.alternate?`<path d="`+Xy(this.alternate)+`"/>`:`<path d="`+Xy(Rb[this.pathName])+`"/>`}},ax=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=`<line`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+Xy(this.attributes[t])+`"`;return e+=`/>`,e}};function ox(e){if(e instanceof nx)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function sx(e){if(e instanceof Qb)return e;throw Error(`Expected span<HtmlDomNode> but got `+String(e)+`.`)}var cx=e=>e instanceof Qb||e instanceof $b||e instanceof Vb,lx={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},ux={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},dx={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`};function fx(e,t){lx[e]=t}function px(e,t,n){if(!lx[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=lx[t][r];if(!i&&e[0]in dx&&(r=dx[e[0]].charCodeAt(0),i=lx[t][r]),!i&&n===`text`&&Eb(r)&&(i=lx[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var mx={};function hx(e){var t=e>=5?0:e>=3?1:2;if(!mx[t]){var n=mx[t]={cssEmPerMu:ux.quad[t]/18};for(var r in ux)ux.hasOwnProperty(r)&&(n[r]=ux[r][t])}return mx[t]}var gx={math:{},text:{}};function N(e,t,n,r,i,a){gx[e][i]={font:t,group:n,replace:r},a&&r&&(gx[e][r]=gx[e][i])}var P=`math`,F=`text`,I=`main`,L=`ams`,_x=`accent-token`,R=`bin`,vx=`close`,yx=`inner`,z=`mathord`,bx=`op-token`,xx=`open`,Sx=`punct`,B=`rel`,Cx=`spacing`,V=`textord`;N(P,I,B,`≡`,`\\equiv`,!0),N(P,I,B,`≺`,`\\prec`,!0),N(P,I,B,`≻`,`\\succ`,!0),N(P,I,B,`∼`,`\\sim`,!0),N(P,I,B,`⊥`,`\\perp`),N(P,I,B,`⪯`,`\\preceq`,!0),N(P,I,B,`⪰`,`\\succeq`,!0),N(P,I,B,`≃`,`\\simeq`,!0),N(P,I,B,`∣`,`\\mid`,!0),N(P,I,B,`≪`,`\\ll`,!0),N(P,I,B,`≫`,`\\gg`,!0),N(P,I,B,`≍`,`\\asymp`,!0),N(P,I,B,`∥`,`\\parallel`),N(P,I,B,`⋈`,`\\bowtie`,!0),N(P,I,B,`⌣`,`\\smile`,!0),N(P,I,B,`⊑`,`\\sqsubseteq`,!0),N(P,I,B,`⊒`,`\\sqsupseteq`,!0),N(P,I,B,`≐`,`\\doteq`,!0),N(P,I,B,`⌢`,`\\frown`,!0),N(P,I,B,`∋`,`\\ni`,!0),N(P,I,B,`∝`,`\\propto`,!0),N(P,I,B,`⊢`,`\\vdash`,!0),N(P,I,B,`⊣`,`\\dashv`,!0),N(P,I,B,`∋`,`\\owns`),N(P,I,Sx,`.`,`\\ldotp`),N(P,I,Sx,`⋅`,`\\cdotp`),N(P,I,Sx,`⋅`,`·`),N(F,I,V,`⋅`,`·`),N(P,I,V,`#`,`\\#`),N(F,I,V,`#`,`\\#`),N(P,I,V,`&`,`\\&`),N(F,I,V,`&`,`\\&`),N(P,I,V,`ℵ`,`\\aleph`,!0),N(P,I,V,`∀`,`\\forall`,!0),N(P,I,V,`ℏ`,`\\hbar`,!0),N(P,I,V,`∃`,`\\exists`,!0),N(P,I,V,`∇`,`\\nabla`,!0),N(P,I,V,`♭`,`\\flat`,!0),N(P,I,V,`ℓ`,`\\ell`,!0),N(P,I,V,`♮`,`\\natural`,!0),N(P,I,V,`♣`,`\\clubsuit`,!0),N(P,I,V,`℘`,`\\wp`,!0),N(P,I,V,`♯`,`\\sharp`,!0),N(P,I,V,`♢`,`\\diamondsuit`,!0),N(P,I,V,`ℜ`,`\\Re`,!0),N(P,I,V,`♡`,`\\heartsuit`,!0),N(P,I,V,`ℑ`,`\\Im`,!0),N(P,I,V,`♠`,`\\spadesuit`,!0),N(P,I,V,`§`,`\\S`,!0),N(F,I,V,`§`,`\\S`),N(P,I,V,`¶`,`\\P`,!0),N(F,I,V,`¶`,`\\P`),N(P,I,V,`†`,`\\dag`),N(F,I,V,`†`,`\\dag`),N(F,I,V,`†`,`\\textdagger`),N(P,I,V,`‡`,`\\ddag`),N(F,I,V,`‡`,`\\ddag`),N(F,I,V,`‡`,`\\textdaggerdbl`),N(P,I,vx,`⎱`,`\\rmoustache`,!0),N(P,I,xx,`⎰`,`\\lmoustache`,!0),N(P,I,vx,`⟯`,`\\rgroup`,!0),N(P,I,xx,`⟮`,`\\lgroup`,!0),N(P,I,R,`∓`,`\\mp`,!0),N(P,I,R,`⊖`,`\\ominus`,!0),N(P,I,R,`⊎`,`\\uplus`,!0),N(P,I,R,`⊓`,`\\sqcap`,!0),N(P,I,R,`∗`,`\\ast`),N(P,I,R,`⊔`,`\\sqcup`,!0),N(P,I,R,`◯`,`\\bigcirc`,!0),N(P,I,R,`∙`,`\\bullet`,!0),N(P,I,R,`‡`,`\\ddagger`),N(P,I,R,`≀`,`\\wr`,!0),N(P,I,R,`⨿`,`\\amalg`),N(P,I,R,`&`,`\\And`),N(P,I,B,`⟵`,`\\longleftarrow`,!0),N(P,I,B,`⇐`,`\\Leftarrow`,!0),N(P,I,B,`⟸`,`\\Longleftarrow`,!0),N(P,I,B,`⟶`,`\\longrightarrow`,!0),N(P,I,B,`⇒`,`\\Rightarrow`,!0),N(P,I,B,`⟹`,`\\Longrightarrow`,!0),N(P,I,B,`↔`,`\\leftrightarrow`,!0),N(P,I,B,`⟷`,`\\longleftrightarrow`,!0),N(P,I,B,`⇔`,`\\Leftrightarrow`,!0),N(P,I,B,`⟺`,`\\Longleftrightarrow`,!0),N(P,I,B,`↦`,`\\mapsto`,!0),N(P,I,B,`⟼`,`\\longmapsto`,!0),N(P,I,B,`↗`,`\\nearrow`,!0),N(P,I,B,`↩`,`\\hookleftarrow`,!0),N(P,I,B,`↪`,`\\hookrightarrow`,!0),N(P,I,B,`↘`,`\\searrow`,!0),N(P,I,B,`↼`,`\\leftharpoonup`,!0),N(P,I,B,`⇀`,`\\rightharpoonup`,!0),N(P,I,B,`↙`,`\\swarrow`,!0),N(P,I,B,`↽`,`\\leftharpoondown`,!0),N(P,I,B,`⇁`,`\\rightharpoondown`,!0),N(P,I,B,`↖`,`\\nwarrow`,!0),N(P,I,B,`⇌`,`\\rightleftharpoons`,!0),N(P,L,B,`≮`,`\\nless`,!0),N(P,L,B,``,`\\@nleqslant`),N(P,L,B,``,`\\@nleqq`),N(P,L,B,`⪇`,`\\lneq`,!0),N(P,L,B,`≨`,`\\lneqq`,!0),N(P,L,B,``,`\\@lvertneqq`),N(P,L,B,`⋦`,`\\lnsim`,!0),N(P,L,B,`⪉`,`\\lnapprox`,!0),N(P,L,B,`⊀`,`\\nprec`,!0),N(P,L,B,`⋠`,`\\npreceq`,!0),N(P,L,B,`⋨`,`\\precnsim`,!0),N(P,L,B,`⪹`,`\\precnapprox`,!0),N(P,L,B,`≁`,`\\nsim`,!0),N(P,L,B,``,`\\@nshortmid`),N(P,L,B,`∤`,`\\nmid`,!0),N(P,L,B,`⊬`,`\\nvdash`,!0),N(P,L,B,`⊭`,`\\nvDash`,!0),N(P,L,B,`⋪`,`\\ntriangleleft`),N(P,L,B,`⋬`,`\\ntrianglelefteq`,!0),N(P,L,B,`⊊`,`\\subsetneq`,!0),N(P,L,B,``,`\\@varsubsetneq`),N(P,L,B,`⫋`,`\\subsetneqq`,!0),N(P,L,B,``,`\\@varsubsetneqq`),N(P,L,B,`≯`,`\\ngtr`,!0),N(P,L,B,``,`\\@ngeqslant`),N(P,L,B,``,`\\@ngeqq`),N(P,L,B,`⪈`,`\\gneq`,!0),N(P,L,B,`≩`,`\\gneqq`,!0),N(P,L,B,``,`\\@gvertneqq`),N(P,L,B,`⋧`,`\\gnsim`,!0),N(P,L,B,`⪊`,`\\gnapprox`,!0),N(P,L,B,`⊁`,`\\nsucc`,!0),N(P,L,B,`⋡`,`\\nsucceq`,!0),N(P,L,B,`⋩`,`\\succnsim`,!0),N(P,L,B,`⪺`,`\\succnapprox`,!0),N(P,L,B,`≆`,`\\ncong`,!0),N(P,L,B,``,`\\@nshortparallel`),N(P,L,B,`∦`,`\\nparallel`,!0),N(P,L,B,`⊯`,`\\nVDash`,!0),N(P,L,B,`⋫`,`\\ntriangleright`),N(P,L,B,`⋭`,`\\ntrianglerighteq`,!0),N(P,L,B,``,`\\@nsupseteqq`),N(P,L,B,`⊋`,`\\supsetneq`,!0),N(P,L,B,``,`\\@varsupsetneq`),N(P,L,B,`⫌`,`\\supsetneqq`,!0),N(P,L,B,``,`\\@varsupsetneqq`),N(P,L,B,`⊮`,`\\nVdash`,!0),N(P,L,B,`⪵`,`\\precneqq`,!0),N(P,L,B,`⪶`,`\\succneqq`,!0),N(P,L,B,``,`\\@nsubseteqq`),N(P,L,R,`⊴`,`\\unlhd`),N(P,L,R,`⊵`,`\\unrhd`),N(P,L,B,`↚`,`\\nleftarrow`,!0),N(P,L,B,`↛`,`\\nrightarrow`,!0),N(P,L,B,`⇍`,`\\nLeftarrow`,!0),N(P,L,B,`⇏`,`\\nRightarrow`,!0),N(P,L,B,`↮`,`\\nleftrightarrow`,!0),N(P,L,B,`⇎`,`\\nLeftrightarrow`,!0),N(P,L,B,`△`,`\\vartriangle`),N(P,L,V,`ℏ`,`\\hslash`),N(P,L,V,`▽`,`\\triangledown`),N(P,L,V,`◊`,`\\lozenge`),N(P,L,V,`Ⓢ`,`\\circledS`),N(P,L,V,`®`,`\\circledR`),N(F,L,V,`®`,`\\circledR`),N(P,L,V,`∡`,`\\measuredangle`,!0),N(P,L,V,`∄`,`\\nexists`),N(P,L,V,`℧`,`\\mho`),N(P,L,V,`Ⅎ`,`\\Finv`,!0),N(P,L,V,`⅁`,`\\Game`,!0),N(P,L,V,`‵`,`\\backprime`),N(P,L,V,`▲`,`\\blacktriangle`),N(P,L,V,`▼`,`\\blacktriangledown`),N(P,L,V,`■`,`\\blacksquare`),N(P,L,V,`⧫`,`\\blacklozenge`),N(P,L,V,`★`,`\\bigstar`),N(P,L,V,`∢`,`\\sphericalangle`,!0),N(P,L,V,`∁`,`\\complement`,!0),N(P,L,V,`ð`,`\\eth`,!0),N(F,I,V,`ð`,`ð`),N(P,L,V,`╱`,`\\diagup`),N(P,L,V,`╲`,`\\diagdown`),N(P,L,V,`□`,`\\square`),N(P,L,V,`□`,`\\Box`),N(P,L,V,`◊`,`\\Diamond`),N(P,L,V,`¥`,`\\yen`,!0),N(F,L,V,`¥`,`\\yen`,!0),N(P,L,V,`✓`,`\\checkmark`,!0),N(F,L,V,`✓`,`\\checkmark`),N(P,L,V,`ℶ`,`\\beth`,!0),N(P,L,V,`ℸ`,`\\daleth`,!0),N(P,L,V,`ℷ`,`\\gimel`,!0),N(P,L,V,`ϝ`,`\\digamma`,!0),N(P,L,V,`ϰ`,`\\varkappa`),N(P,L,xx,`┌`,`\\@ulcorner`,!0),N(P,L,vx,`┐`,`\\@urcorner`,!0),N(P,L,xx,`└`,`\\@llcorner`,!0),N(P,L,vx,`┘`,`\\@lrcorner`,!0),N(P,L,B,`≦`,`\\leqq`,!0),N(P,L,B,`⩽`,`\\leqslant`,!0),N(P,L,B,`⪕`,`\\eqslantless`,!0),N(P,L,B,`≲`,`\\lesssim`,!0),N(P,L,B,`⪅`,`\\lessapprox`,!0),N(P,L,B,`≊`,`\\approxeq`,!0),N(P,L,R,`⋖`,`\\lessdot`),N(P,L,B,`⋘`,`\\lll`,!0),N(P,L,B,`≶`,`\\lessgtr`,!0),N(P,L,B,`⋚`,`\\lesseqgtr`,!0),N(P,L,B,`⪋`,`\\lesseqqgtr`,!0),N(P,L,B,`≑`,`\\doteqdot`),N(P,L,B,`≓`,`\\risingdotseq`,!0),N(P,L,B,`≒`,`\\fallingdotseq`,!0),N(P,L,B,`∽`,`\\backsim`,!0),N(P,L,B,`⋍`,`\\backsimeq`,!0),N(P,L,B,`⫅`,`\\subseteqq`,!0),N(P,L,B,`⋐`,`\\Subset`,!0),N(P,L,B,`⊏`,`\\sqsubset`,!0),N(P,L,B,`≼`,`\\preccurlyeq`,!0),N(P,L,B,`⋞`,`\\curlyeqprec`,!0),N(P,L,B,`≾`,`\\precsim`,!0),N(P,L,B,`⪷`,`\\precapprox`,!0),N(P,L,B,`⊲`,`\\vartriangleleft`),N(P,L,B,`⊴`,`\\trianglelefteq`),N(P,L,B,`⊨`,`\\vDash`,!0),N(P,L,B,`⊪`,`\\Vvdash`,!0),N(P,L,B,`⌣`,`\\smallsmile`),N(P,L,B,`⌢`,`\\smallfrown`),N(P,L,B,`≏`,`\\bumpeq`,!0),N(P,L,B,`≎`,`\\Bumpeq`,!0),N(P,L,B,`≧`,`\\geqq`,!0),N(P,L,B,`⩾`,`\\geqslant`,!0),N(P,L,B,`⪖`,`\\eqslantgtr`,!0),N(P,L,B,`≳`,`\\gtrsim`,!0),N(P,L,B,`⪆`,`\\gtrapprox`,!0),N(P,L,R,`⋗`,`\\gtrdot`),N(P,L,B,`⋙`,`\\ggg`,!0),N(P,L,B,`≷`,`\\gtrless`,!0),N(P,L,B,`⋛`,`\\gtreqless`,!0),N(P,L,B,`⪌`,`\\gtreqqless`,!0),N(P,L,B,`≖`,`\\eqcirc`,!0),N(P,L,B,`≗`,`\\circeq`,!0),N(P,L,B,`≜`,`\\triangleq`,!0),N(P,L,B,`∼`,`\\thicksim`),N(P,L,B,`≈`,`\\thickapprox`),N(P,L,B,`⫆`,`\\supseteqq`,!0),N(P,L,B,`⋑`,`\\Supset`,!0),N(P,L,B,`⊐`,`\\sqsupset`,!0),N(P,L,B,`≽`,`\\succcurlyeq`,!0),N(P,L,B,`⋟`,`\\curlyeqsucc`,!0),N(P,L,B,`≿`,`\\succsim`,!0),N(P,L,B,`⪸`,`\\succapprox`,!0),N(P,L,B,`⊳`,`\\vartriangleright`),N(P,L,B,`⊵`,`\\trianglerighteq`),N(P,L,B,`⊩`,`\\Vdash`,!0),N(P,L,B,`∣`,`\\shortmid`),N(P,L,B,`∥`,`\\shortparallel`),N(P,L,B,`≬`,`\\between`,!0),N(P,L,B,`⋔`,`\\pitchfork`,!0),N(P,L,B,`∝`,`\\varpropto`),N(P,L,B,`◀`,`\\blacktriangleleft`),N(P,L,B,`∴`,`\\therefore`,!0),N(P,L,B,`∍`,`\\backepsilon`),N(P,L,B,`▶`,`\\blacktriangleright`),N(P,L,B,`∵`,`\\because`,!0),N(P,L,B,`⋘`,`\\llless`),N(P,L,B,`⋙`,`\\gggtr`),N(P,L,R,`⊲`,`\\lhd`),N(P,L,R,`⊳`,`\\rhd`),N(P,L,B,`≂`,`\\eqsim`,!0),N(P,I,B,`⋈`,`\\Join`),N(P,L,B,`≑`,`\\Doteq`,!0),N(P,L,R,`∔`,`\\dotplus`,!0),N(P,L,R,`∖`,`\\smallsetminus`),N(P,L,R,`⋒`,`\\Cap`,!0),N(P,L,R,`⋓`,`\\Cup`,!0),N(P,L,R,`⩞`,`\\doublebarwedge`,!0),N(P,L,R,`⊟`,`\\boxminus`,!0),N(P,L,R,`⊞`,`\\boxplus`,!0),N(P,L,R,`⋇`,`\\divideontimes`,!0),N(P,L,R,`⋉`,`\\ltimes`,!0),N(P,L,R,`⋊`,`\\rtimes`,!0),N(P,L,R,`⋋`,`\\leftthreetimes`,!0),N(P,L,R,`⋌`,`\\rightthreetimes`,!0),N(P,L,R,`⋏`,`\\curlywedge`,!0),N(P,L,R,`⋎`,`\\curlyvee`,!0),N(P,L,R,`⊝`,`\\circleddash`,!0),N(P,L,R,`⊛`,`\\circledast`,!0),N(P,L,R,`⋅`,`\\centerdot`),N(P,L,R,`⊺`,`\\intercal`,!0),N(P,L,R,`⋒`,`\\doublecap`),N(P,L,R,`⋓`,`\\doublecup`),N(P,L,R,`⊠`,`\\boxtimes`,!0),N(P,L,B,`⇢`,`\\dashrightarrow`,!0),N(P,L,B,`⇠`,`\\dashleftarrow`,!0),N(P,L,B,`⇇`,`\\leftleftarrows`,!0),N(P,L,B,`⇆`,`\\leftrightarrows`,!0),N(P,L,B,`⇚`,`\\Lleftarrow`,!0),N(P,L,B,`↞`,`\\twoheadleftarrow`,!0),N(P,L,B,`↢`,`\\leftarrowtail`,!0),N(P,L,B,`↫`,`\\looparrowleft`,!0),N(P,L,B,`⇋`,`\\leftrightharpoons`,!0),N(P,L,B,`↶`,`\\curvearrowleft`,!0),N(P,L,B,`↺`,`\\circlearrowleft`,!0),N(P,L,B,`↰`,`\\Lsh`,!0),N(P,L,B,`⇈`,`\\upuparrows`,!0),N(P,L,B,`↿`,`\\upharpoonleft`,!0),N(P,L,B,`⇃`,`\\downharpoonleft`,!0),N(P,I,B,`⊶`,`\\origof`,!0),N(P,I,B,`⊷`,`\\imageof`,!0),N(P,L,B,`⊸`,`\\multimap`,!0),N(P,L,B,`↭`,`\\leftrightsquigarrow`,!0),N(P,L,B,`⇉`,`\\rightrightarrows`,!0),N(P,L,B,`⇄`,`\\rightleftarrows`,!0),N(P,L,B,`↠`,`\\twoheadrightarrow`,!0),N(P,L,B,`↣`,`\\rightarrowtail`,!0),N(P,L,B,`↬`,`\\looparrowright`,!0),N(P,L,B,`↷`,`\\curvearrowright`,!0),N(P,L,B,`↻`,`\\circlearrowright`,!0),N(P,L,B,`↱`,`\\Rsh`,!0),N(P,L,B,`⇊`,`\\downdownarrows`,!0),N(P,L,B,`↾`,`\\upharpoonright`,!0),N(P,L,B,`⇂`,`\\downharpoonright`,!0),N(P,L,B,`⇝`,`\\rightsquigarrow`,!0),N(P,L,B,`⇝`,`\\leadsto`),N(P,L,B,`⇛`,`\\Rrightarrow`,!0),N(P,L,B,`↾`,`\\restriction`),N(P,I,V,`‘`,"`"),N(P,I,V,`$`,`\\$`),N(F,I,V,`$`,`\\$`),N(F,I,V,`$`,`\\textdollar`),N(P,I,V,`%`,`\\%`),N(F,I,V,`%`,`\\%`),N(P,I,V,`_`,`\\_`),N(F,I,V,`_`,`\\_`),N(F,I,V,`_`,`\\textunderscore`),N(P,I,V,`∠`,`\\angle`,!0),N(P,I,V,`∞`,`\\infty`,!0),N(P,I,V,`′`,`\\prime`),N(P,I,V,`△`,`\\triangle`),N(P,I,V,`Γ`,`\\Gamma`,!0),N(P,I,V,`Δ`,`\\Delta`,!0),N(P,I,V,`Θ`,`\\Theta`,!0),N(P,I,V,`Λ`,`\\Lambda`,!0),N(P,I,V,`Ξ`,`\\Xi`,!0),N(P,I,V,`Π`,`\\Pi`,!0),N(P,I,V,`Σ`,`\\Sigma`,!0),N(P,I,V,`Υ`,`\\Upsilon`,!0),N(P,I,V,`Φ`,`\\Phi`,!0),N(P,I,V,`Ψ`,`\\Psi`,!0),N(P,I,V,`Ω`,`\\Omega`,!0),N(P,I,V,`A`,`Α`),N(P,I,V,`B`,`Β`),N(P,I,V,`E`,`Ε`),N(P,I,V,`Z`,`Ζ`),N(P,I,V,`H`,`Η`),N(P,I,V,`I`,`Ι`),N(P,I,V,`K`,`Κ`),N(P,I,V,`M`,`Μ`),N(P,I,V,`N`,`Ν`),N(P,I,V,`O`,`Ο`),N(P,I,V,`P`,`Ρ`),N(P,I,V,`T`,`Τ`),N(P,I,V,`X`,`Χ`),N(P,I,V,`¬`,`\\neg`,!0),N(P,I,V,`¬`,`\\lnot`),N(P,I,V,`⊤`,`\\top`),N(P,I,V,`⊥`,`\\bot`),N(P,I,V,`∅`,`\\emptyset`),N(P,L,V,`∅`,`\\varnothing`),N(P,I,z,`α`,`\\alpha`,!0),N(P,I,z,`β`,`\\beta`,!0),N(P,I,z,`γ`,`\\gamma`,!0),N(P,I,z,`δ`,`\\delta`,!0),N(P,I,z,`ϵ`,`\\epsilon`,!0),N(P,I,z,`ζ`,`\\zeta`,!0),N(P,I,z,`η`,`\\eta`,!0),N(P,I,z,`θ`,`\\theta`,!0),N(P,I,z,`ι`,`\\iota`,!0),N(P,I,z,`κ`,`\\kappa`,!0),N(P,I,z,`λ`,`\\lambda`,!0),N(P,I,z,`μ`,`\\mu`,!0),N(P,I,z,`ν`,`\\nu`,!0),N(P,I,z,`ξ`,`\\xi`,!0),N(P,I,z,`ο`,`\\omicron`,!0),N(P,I,z,`π`,`\\pi`,!0),N(P,I,z,`ρ`,`\\rho`,!0),N(P,I,z,`σ`,`\\sigma`,!0),N(P,I,z,`τ`,`\\tau`,!0),N(P,I,z,`υ`,`\\upsilon`,!0),N(P,I,z,`ϕ`,`\\phi`,!0),N(P,I,z,`χ`,`\\chi`,!0),N(P,I,z,`ψ`,`\\psi`,!0),N(P,I,z,`ω`,`\\omega`,!0),N(P,I,z,`ε`,`\\varepsilon`,!0),N(P,I,z,`ϑ`,`\\vartheta`,!0),N(P,I,z,`ϖ`,`\\varpi`,!0),N(P,I,z,`ϱ`,`\\varrho`,!0),N(P,I,z,`ς`,`\\varsigma`,!0),N(P,I,z,`φ`,`\\varphi`,!0),N(P,I,R,`∗`,`*`,!0),N(P,I,R,`+`,`+`),N(P,I,R,`−`,`-`,!0),N(P,I,R,`⋅`,`\\cdot`,!0),N(P,I,R,`∘`,`\\circ`,!0),N(P,I,R,`÷`,`\\div`,!0),N(P,I,R,`±`,`\\pm`,!0),N(P,I,R,`×`,`\\times`,!0),N(P,I,R,`∩`,`\\cap`,!0),N(P,I,R,`∪`,`\\cup`,!0),N(P,I,R,`∖`,`\\setminus`,!0),N(P,I,R,`∧`,`\\land`),N(P,I,R,`∨`,`\\lor`),N(P,I,R,`∧`,`\\wedge`,!0),N(P,I,R,`∨`,`\\vee`,!0),N(P,I,V,`√`,`\\surd`),N(P,I,xx,`⟨`,`\\langle`,!0),N(P,I,xx,`∣`,`\\lvert`),N(P,I,xx,`∥`,`\\lVert`),N(P,I,vx,`?`,`?`),N(P,I,vx,`!`,`!`),N(P,I,vx,`⟩`,`\\rangle`,!0),N(P,I,vx,`∣`,`\\rvert`),N(P,I,vx,`∥`,`\\rVert`),N(P,I,B,`=`,`=`),N(P,I,B,`:`,`:`),N(P,I,B,`≈`,`\\approx`,!0),N(P,I,B,`≅`,`\\cong`,!0),N(P,I,B,`≥`,`\\ge`),N(P,I,B,`≥`,`\\geq`,!0),N(P,I,B,`←`,`\\gets`),N(P,I,B,`>`,`\\gt`,!0),N(P,I,B,`∈`,`\\in`,!0),N(P,I,B,``,`\\@not`),N(P,I,B,`⊂`,`\\subset`,!0),N(P,I,B,`⊃`,`\\supset`,!0),N(P,I,B,`⊆`,`\\subseteq`,!0),N(P,I,B,`⊇`,`\\supseteq`,!0),N(P,L,B,`⊈`,`\\nsubseteq`,!0),N(P,L,B,`⊉`,`\\nsupseteq`,!0),N(P,I,B,`⊨`,`\\models`),N(P,I,B,`←`,`\\leftarrow`,!0),N(P,I,B,`≤`,`\\le`),N(P,I,B,`≤`,`\\leq`,!0),N(P,I,B,`<`,`\\lt`,!0),N(P,I,B,`→`,`\\rightarrow`,!0),N(P,I,B,`→`,`\\to`),N(P,L,B,`≱`,`\\ngeq`,!0),N(P,L,B,`≰`,`\\nleq`,!0),N(P,I,Cx,`\xA0`,`\\ `),N(P,I,Cx,`\xA0`,`\\space`),N(P,I,Cx,`\xA0`,`\\nobreakspace`),N(F,I,Cx,`\xA0`,`\\ `),N(F,I,Cx,`\xA0`,` `),N(F,I,Cx,`\xA0`,`\\space`),N(F,I,Cx,`\xA0`,`\\nobreakspace`),N(P,I,Cx,``,`\\nobreak`),N(P,I,Cx,``,`\\allowbreak`),N(P,I,Sx,`,`,`,`),N(P,I,Sx,`;`,`;`),N(P,L,R,`⊼`,`\\barwedge`,!0),N(P,L,R,`⊻`,`\\veebar`,!0),N(P,I,R,`⊙`,`\\odot`,!0),N(P,I,R,`⊕`,`\\oplus`,!0),N(P,I,R,`⊗`,`\\otimes`,!0),N(P,I,V,`∂`,`\\partial`,!0),N(P,I,R,`⊘`,`\\oslash`,!0),N(P,L,R,`⊚`,`\\circledcirc`,!0),N(P,L,R,`⊡`,`\\boxdot`,!0),N(P,I,R,`△`,`\\bigtriangleup`),N(P,I,R,`▽`,`\\bigtriangledown`),N(P,I,R,`†`,`\\dagger`),N(P,I,R,`⋄`,`\\diamond`),N(P,I,R,`⋆`,`\\star`),N(P,I,R,`◃`,`\\triangleleft`),N(P,I,R,`▹`,`\\triangleright`),N(P,I,xx,`{`,`\\{`),N(F,I,V,`{`,`\\{`),N(F,I,V,`{`,`\\textbraceleft`),N(P,I,vx,`}`,`\\}`),N(F,I,V,`}`,`\\}`),N(F,I,V,`}`,`\\textbraceright`),N(P,I,xx,`{`,`\\lbrace`),N(P,I,vx,`}`,`\\rbrace`),N(P,I,xx,`[`,`\\lbrack`,!0),N(F,I,V,`[`,`\\lbrack`,!0),N(P,I,vx,`]`,`\\rbrack`,!0),N(F,I,V,`]`,`\\rbrack`,!0),N(P,I,xx,`(`,`\\lparen`,!0),N(P,I,vx,`)`,`\\rparen`,!0),N(F,I,V,`<`,`\\textless`,!0),N(F,I,V,`>`,`\\textgreater`,!0),N(P,I,xx,`⌊`,`\\lfloor`,!0),N(P,I,vx,`⌋`,`\\rfloor`,!0),N(P,I,xx,`⌈`,`\\lceil`,!0),N(P,I,vx,`⌉`,`\\rceil`,!0),N(P,I,V,`\\`,`\\backslash`),N(P,I,V,`∣`,`|`),N(P,I,V,`∣`,`\\vert`),N(F,I,V,`|`,`\\textbar`,!0),N(P,I,V,`∥`,`\\|`),N(P,I,V,`∥`,`\\Vert`),N(F,I,V,`∥`,`\\textbardbl`),N(F,I,V,`~`,`\\textasciitilde`),N(F,I,V,`\\`,`\\textbackslash`),N(F,I,V,`^`,`\\textasciicircum`),N(P,I,B,`↑`,`\\uparrow`,!0),N(P,I,B,`⇑`,`\\Uparrow`,!0),N(P,I,B,`↓`,`\\downarrow`,!0),N(P,I,B,`⇓`,`\\Downarrow`,!0),N(P,I,B,`↕`,`\\updownarrow`,!0),N(P,I,B,`⇕`,`\\Updownarrow`,!0),N(P,I,bx,`∐`,`\\coprod`),N(P,I,bx,`⋁`,`\\bigvee`),N(P,I,bx,`⋀`,`\\bigwedge`),N(P,I,bx,`⨄`,`\\biguplus`),N(P,I,bx,`⋂`,`\\bigcap`),N(P,I,bx,`⋃`,`\\bigcup`),N(P,I,bx,`∫`,`\\int`),N(P,I,bx,`∫`,`\\intop`),N(P,I,bx,`∬`,`\\iint`),N(P,I,bx,`∭`,`\\iiint`),N(P,I,bx,`∏`,`\\prod`),N(P,I,bx,`∑`,`\\sum`),N(P,I,bx,`⨂`,`\\bigotimes`),N(P,I,bx,`⨁`,`\\bigoplus`),N(P,I,bx,`⨀`,`\\bigodot`),N(P,I,bx,`∮`,`\\oint`),N(P,I,bx,`∯`,`\\oiint`),N(P,I,bx,`∰`,`\\oiiint`),N(P,I,bx,`⨆`,`\\bigsqcup`),N(P,I,bx,`∫`,`\\smallint`),N(F,I,yx,`…`,`\\textellipsis`),N(P,I,yx,`…`,`\\mathellipsis`),N(F,I,yx,`…`,`\\ldots`,!0),N(P,I,yx,`…`,`\\ldots`,!0),N(P,I,yx,`⋯`,`\\@cdots`,!0),N(P,I,yx,`⋱`,`\\ddots`,!0),N(P,I,V,`⋮`,`\\varvdots`),N(F,I,V,`⋮`,`\\varvdots`),N(P,I,_x,`ˊ`,`\\acute`),N(P,I,_x,`ˋ`,`\\grave`),N(P,I,_x,`¨`,`\\ddot`),N(P,I,_x,`~`,`\\tilde`),N(P,I,_x,`ˉ`,`\\bar`),N(P,I,_x,`˘`,`\\breve`),N(P,I,_x,`ˇ`,`\\check`),N(P,I,_x,`^`,`\\hat`),N(P,I,_x,`⃗`,`\\vec`),N(P,I,_x,`˙`,`\\dot`),N(P,I,_x,`˚`,`\\mathring`),N(P,I,z,``,`\\@imath`),N(P,I,z,``,`\\@jmath`),N(P,I,V,`ı`,`ı`),N(P,I,V,`ȷ`,`ȷ`),N(F,I,V,`ı`,`\\i`,!0),N(F,I,V,`ȷ`,`\\j`,!0),N(F,I,V,`ß`,`\\ss`,!0),N(F,I,V,`æ`,`\\ae`,!0),N(F,I,V,`œ`,`\\oe`,!0),N(F,I,V,`ø`,`\\o`,!0),N(F,I,V,`Æ`,`\\AE`,!0),N(F,I,V,`Œ`,`\\OE`,!0),N(F,I,V,`Ø`,`\\O`,!0),N(F,I,_x,`ˊ`,`\\'`),N(F,I,_x,`ˋ`,"\\`"),N(F,I,_x,`ˆ`,`\\^`),N(F,I,_x,`˜`,`\\~`),N(F,I,_x,`ˉ`,`\\=`),N(F,I,_x,`˘`,`\\u`),N(F,I,_x,`˙`,`\\.`),N(F,I,_x,`¸`,`\\c`),N(F,I,_x,`˚`,`\\r`),N(F,I,_x,`ˇ`,`\\v`),N(F,I,_x,`¨`,`\\"`),N(F,I,_x,`˝`,`\\H`),N(F,I,_x,`◯`,`\\textcircled`);var wx={"--":!0,"---":!0,"``":!0,"''":!0};N(F,I,V,`–`,`--`,!0),N(F,I,V,`–`,`\\textendash`),N(F,I,V,`—`,`---`,!0),N(F,I,V,`—`,`\\textemdash`),N(F,I,V,`‘`,"`",!0),N(F,I,V,`‘`,`\\textquoteleft`),N(F,I,V,`’`,`'`,!0),N(F,I,V,`’`,`\\textquoteright`),N(F,I,V,`“`,"``",!0),N(F,I,V,`“`,`\\textquotedblleft`),N(F,I,V,`”`,`''`,!0),N(F,I,V,`”`,`\\textquotedblright`),N(P,I,V,`°`,`\\degree`,!0),N(F,I,V,`°`,`\\degree`),N(F,I,V,`°`,`\\textdegree`,!0),N(P,I,V,`£`,`\\pounds`),N(P,I,V,`£`,`\\mathsterling`,!0),N(F,I,V,`£`,`\\pounds`),N(F,I,V,`£`,`\\textsterling`,!0),N(P,L,V,`✠`,`\\maltese`),N(F,L,V,`✠`,`\\maltese`);for(var Tx=`0123456789/@."`,Ex=0;Ex<Tx.length;Ex++){var Dx=Tx.charAt(Ex);N(P,I,V,Dx,Dx)}for(var Ox=`0123456789!@*()-=+";:?/.,`,kx=0;kx<Ox.length;kx++){var Ax=Ox.charAt(kx);N(F,I,V,Ax,Ax)}for(var jx=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,Mx=0;Mx<jx.length;Mx++){var Nx=jx.charAt(Mx);N(P,I,z,Nx,Nx),N(F,I,V,Nx,Nx)}N(P,L,V,`C`,`ℂ`),N(F,L,V,`C`,`ℂ`),N(P,L,V,`H`,`ℍ`),N(F,L,V,`H`,`ℍ`),N(P,L,V,`N`,`ℕ`),N(F,L,V,`N`,`ℕ`),N(P,L,V,`P`,`ℙ`),N(F,L,V,`P`,`ℙ`),N(P,L,V,`Q`,`ℚ`),N(F,L,V,`Q`,`ℚ`),N(P,L,V,`R`,`ℝ`),N(F,L,V,`R`,`ℝ`),N(P,L,V,`Z`,`ℤ`),N(F,L,V,`Z`,`ℤ`),N(P,I,z,`h`,`ℎ`),N(F,I,z,`h`,`ℎ`);for(var Px,Fx=0;Fx<jx.length;Fx++){var Ix=jx.charAt(Fx);Px=String.fromCharCode(55349,56320+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Px=String.fromCharCode(55349,56372+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Px=String.fromCharCode(55349,56424+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Px=String.fromCharCode(55349,56580+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Px=String.fromCharCode(55349,56684+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Px=String.fromCharCode(55349,56736+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Px=String.fromCharCode(55349,56788+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Px=String.fromCharCode(55349,56840+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Px=String.fromCharCode(55349,56944+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Fx<26&&(Px=String.fromCharCode(55349,56632+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Px=String.fromCharCode(55349,56476+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px))}Px=String.fromCharCode(55349,56668),N(P,I,z,`k`,Px),N(F,I,V,`k`,Px);for(var Lx=0;Lx<10;Lx++){var Rx=Lx.toString();Px=String.fromCharCode(55349,57294+Lx),N(P,I,z,Rx,Px),N(F,I,V,Rx,Px),Px=String.fromCharCode(55349,57314+Lx),N(P,I,z,Rx,Px),N(F,I,V,Rx,Px),Px=String.fromCharCode(55349,57324+Lx),N(P,I,z,Rx,Px),N(F,I,V,Rx,Px),Px=String.fromCharCode(55349,57334+Lx),N(P,I,z,Rx,Px),N(F,I,V,Rx,Px)}for(var zx=`ÐÞþ`,Bx=0;Bx<zx.length;Bx++){var Vx=zx.charAt(Bx);N(P,I,z,Vx,Vx),N(F,I,V,Vx,Vx)}var Hx={mathClass:`mathbf`,textClass:`textbf`,font:`Main-Bold`},Ux={mathClass:`mathnormal`,textClass:`textit`,font:`Math-Italic`},Wx={mathClass:`boldsymbol`,textClass:`boldsymbol`,font:`Main-BoldItalic`},Gx={mathClass:`mathscr`,textClass:`textscr`,font:`Script-Regular`},Kx={mathClass:``,textClass:``,font:``},qx={mathClass:`mathfrak`,textClass:`textfrak`,font:`Fraktur-Regular`},Jx={mathClass:`mathbb`,textClass:`textbb`,font:`AMS-Regular`},Yx={mathClass:`mathboldfrak`,textClass:`textboldfrak`,font:`Fraktur-Regular`},Xx={mathClass:`mathsf`,textClass:`textsf`,font:`SansSerif-Regular`},Zx={mathClass:`mathboldsf`,textClass:`textboldsf`,font:`SansSerif-Bold`},Qx={mathClass:`mathitsf`,textClass:`textitsf`,font:`SansSerif-Italic`},$x={mathClass:`mathtt`,textClass:`texttt`,font:`Typewriter-Regular`},eS=[Hx,Hx,Ux,Ux,Wx,Wx,Gx,Kx,Kx,Kx,qx,qx,Jx,Jx,Yx,Yx,Xx,Xx,Zx,Zx,Qx,Qx,Kx,Kx,$x,$x],tS=[Hx,Kx,Xx,Zx,$x],nS=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484)return eS[Math.floor((r-119808)/26)];if(120782<=r&&r<=120831)return tS[Math.floor((r-120782)/10)];if(r===120485||r===120486)return eS[0];if(120486<r&&r<120782)return Kx;throw new j(`Unsupported character: `+e)},rS=function(e,t,n){if(gx[n][e]){var r=gx[n][e].replace;r&&(e=r)}return{value:e,metrics:px(e,t,n)}},iS=function(e,t,n,r,i){var a=rS(e,t,n),o=a.metrics;e=a.value;var s;if(o){var c=o.italic;(n===`text`||r&&r.font===`mathit`)&&(c=0),s=new nx(e,o.height,o.depth,c,o.skew,o.width,i)}else typeof console<`u`&&console.warn(`No character metrics `+(`for '`+e+`' in style '`+t+`' and mode '`+n+`'`)),s=new nx(e,0,0,0,0,0,i);if(r){s.maxFontSize=r.sizeMultiplier,r.style.isTight()&&s.classes.push(`mtight`);var l=r.getColor();l&&(s.style.color=l)}return s},aS=function(e,t,n,r){return r===void 0&&(r=[]),n.font===`boldsymbol`&&rS(e,`Main-Bold`,t).metrics?iS(e,`Main-Bold`,t,n,r.concat([`mathbf`])):e===`\\`||gx[t][e].font===`main`?iS(e,`Main-Regular`,t,n,r):iS(e,`AMS-Regular`,t,n,r.concat([`amsrm`]))},oS=function(e,t,n){return n!==`textord`&&rS(e,`Math-BoldItalic`,t).metrics?{fontName:`Math-BoldItalic`,fontClass:`boldsymbol`}:{fontName:`Main-Bold`,fontClass:`mathbf`}},sS=function(e,t,n){var r=e.mode,i=e.text,a=[`mord`],{font:o,fontFamily:s,fontWeight:c,fontShape:l}=t,u=r===`math`||r===`text`&&!!o,d=u?o:s,f=``,p=``;if(i.charCodeAt(0)===55349){var m=nS(i);f=m.font,p=m[r+`Class`]}if(f)return iS(i,f,r,t,a.concat(p));if(d){var h,g;if(d===`boldsymbol`){var _=oS(i,r,n);h=_.fontName,g=[_.fontClass]}else u?(h=bS[o].fontName,g=[o]):(h=yS(s,c,l),g=[s,c,l]);if(rS(i,h,r).metrics)return iS(i,h,r,t,a.concat(g));if(wx.hasOwnProperty(i)&&h.slice(0,10)===`Typewriter`){for(var v=[],y=0;y<i.length;y++)v.push(iS(i[y],h,r,t,a.concat(g)));return mS(v)}}if(n===`mathord`)return iS(i,`Math-Italic`,r,t,a.concat([`mathnormal`]));if(n===`textord`){var b=gx[r][i]&&gx[r][i].font;if(b===`ams`)return iS(i,yS(`amsrm`,c,l),r,t,a.concat(`amsrm`,c,l));if(b===`main`||!b)return iS(i,yS(`textrm`,c,l),r,t,a.concat(c,l));var x=yS(b,c,l);return iS(i,x,r,t,a.concat(x,c,l))}throw Error(`unexpected type: `+n+` in makeOrd`)},cS=(e,t)=>{if(Kb(e.classes)!==Kb(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},lS=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof nx&&r instanceof nx&&cS(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},uS=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var a=e.children[i];a.height>t&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},H=function(e,t,n,r){var i=new Qb(e,t,n,r);return uS(i),i},dS=(e,t,n,r)=>new Qb(e,t,n,r),fS=function(e,t,n){var r=H([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=M(r.height),r.maxFontSize=1,r},pS=function(e,t,n,r){var i=new $b(e,t,n,r);return uS(i),i},mS=function(e){var t=new Vb(e);return uS(t),t},hS=function(e,t){return e instanceof Vb?H([],[e],t):e},gS=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a<t.length;a++){var o=-t[a].shift-i-t[a].elem.depth,s=o-(t[a-1].elem.height+t[a-1].elem.depth);i+=o,n.push({type:`kern`,size:s}),n.push(t[a])}return{children:n,depth:r}}var c;if(e.positionType===`top`){for(var l=e.positionData,u=0;u<e.children.length;u++){var d=e.children[u];l-=d.type===`kern`?d.size:d.elem.height+d.elem.depth}c=l}else if(e.positionType===`bottom`)c=-e.positionData;else{var f=e.children[0];if(f.type!==`elem`)throw Error(`First child must have type "elem".`);if(e.positionType===`shift`)c=-f.elem.depth-e.positionData;else if(e.positionType===`firstBaseline`)c=-f.elem.depth;else throw Error(`Invalid positionType `+e.positionType+`.`)}return{children:e.children,depth:c}},_S=function(e,t){for(var{children:n,depth:r}=gS(e),i=0,a=0;a<n.length;a++){var o=n[a];if(o.type===`elem`){var s=o.elem;i=Math.max(i,s.maxFontSize,s.height)}}i+=2;var c=H([`pstrut`],[]);c.style.height=M(i);for(var l=[],u=r,d=r,f=r,p=0;p<n.length;p++){var m=n[p];if(m.type===`kern`)f+=m.size;else{var h=m.elem,g=m.wrapperClasses||[],_=m.wrapperStyle||{},v=H(g,[c,h],void 0,_);v.style.top=M(-i-f-h.depth),m.marginLeft&&(v.style.marginLeft=m.marginLeft),m.marginRight&&(v.style.marginRight=m.marginRight),l.push(v),f+=h.height+h.depth}u=Math.min(u,f),d=Math.max(d,f)}var y=H([`vlist`],l);y.style.height=M(d);var b;if(u<0){var x=H([`vlist`],[H([],[])]);x.style.height=M(-u),b=[H([`vlist-r`],[y,H([`vlist-s`],[new nx(``)])]),H([`vlist-r`],[x])]}else b=[H([`vlist-r`],[y])];var ee=H([`vlist-t`],b);return b.length===2&&ee.classes.push(`vlist-t2`),ee.height=d,ee.depth=-u,ee},vS=(e,t)=>{var n=H([`mspace`],[],t),r=Gb(e,t);return n.style.marginRight=M(r),n},yS=(e,t,n)=>{var r,i;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}return i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:n===`textit`?`Italic`:`Regular`,r+`-`+i},bS={mathbf:{variant:`bold`,fontName:`Main-Bold`},mathrm:{variant:`normal`,fontName:`Main-Regular`},textit:{variant:`italic`,fontName:`Main-Italic`},mathit:{variant:`italic`,fontName:`Main-Italic`},mathnormal:{variant:`italic`,fontName:`Math-Italic`},mathsfit:{variant:`sans-serif-italic`,fontName:`SansSerif-Italic`},mathbb:{variant:`double-struck`,fontName:`AMS-Regular`},mathcal:{variant:`script`,fontName:`Caligraphic-Regular`},mathfrak:{variant:`fraktur`,fontName:`Fraktur-Regular`},mathscr:{variant:`script`,fontName:`Script-Regular`},mathsf:{variant:`sans-serif`,fontName:`SansSerif-Regular`},mathtt:{variant:`monospace`,fontName:`Typewriter-Regular`}},xS={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},SS=function(e,t){var[n,r,i]=xS[e],a=dS([`overlay`],[new rx([new ix(n)],{width:M(r),height:M(i),style:`width:`+M(r),viewBox:`0 0 `+1e3*r+` `+1e3*i,preserveAspectRatio:`xMinYMin`})],t);return a.height=i,a.style.height=M(i),a.style.width=M(r),a},CS={number:3,unit:`mu`},wS={number:4,unit:`mu`},TS={number:5,unit:`mu`},ES={mord:{mop:CS,mbin:wS,mrel:TS,minner:CS},mop:{mord:CS,mop:CS,mrel:TS,minner:CS},mbin:{mord:wS,mop:wS,mopen:wS,minner:wS},mrel:{mord:TS,mop:TS,mopen:TS,minner:TS},mopen:{},mclose:{mop:CS,mbin:wS,mrel:TS,minner:CS},mpunct:{mord:CS,mop:CS,mrel:TS,mopen:CS,mclose:CS,mpunct:CS,minner:CS},minner:{mord:CS,mop:CS,mbin:wS,mrel:TS,mopen:CS,mpunct:CS,minner:CS}},DS={mord:{mop:CS},mop:{mord:CS,mop:CS},mbin:{},mrel:{},mopen:{},mclose:{mop:CS},mpunct:{},minner:{mop:CS}},OS={},kS={},AS={};function U(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},c=0;c<n.length;++c)OS[n[c]]=s;t&&(a&&(kS[t]=a),o&&(AS[t]=o))}function jS(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;U({type:t,names:[],props:{numArgs:0},handler(){throw Error(`Should never be called.`)},htmlBuilder:n,mathmlBuilder:r})}var MS=function(e){return e.type===`ordgroup`&&e.body.length===1?e.body[0]:e},NS=function(e){return e.type===`ordgroup`?e.body:[e]},PS=new Set([`leftmost`,`mbin`,`mopen`,`mrel`,`mop`,`mpunct`]),FS=new Set([`rightmost`,`mrel`,`mclose`,`mpunct`]),IS={display:Sb.DISPLAY,text:Sb.TEXT,script:Sb.SCRIPT,scriptscript:Sb.SCRIPTSCRIPT},LS={mord:`mord`,mop:`mop`,mbin:`mbin`,mrel:`mrel`,mopen:`mopen`,mclose:`mclose`,mpunct:`mpunct`,minner:`minner`},RS=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var i=[],a=0;a<e.length;a++){var o=WS(e[a],t);if(o instanceof Vb){var s=o.children;i.push(...s)}else i.push(o)}if(lS(i),!n)return i;var c=t;if(e.length===1){var l=e[0];l.type===`sizing`?c=t.havingSize(l.size):l.type===`styling`&&(c=t.havingStyle(IS[l.style]))}var u=H([r[0]||`leftmost`],[],t),d=H([r[1]||`rightmost`],[],t),f=n===`root`;return zS(i,(e,t)=>{var n=t.classes[0],r=e.classes[0];n===`mbin`&&FS.has(r)?t.classes[0]=`mord`:r===`mbin`&&PS.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),zS(i,(e,t)=>{var n=HS(t),r=HS(e),i=n&&r?e.hasClass(`mtight`)?DS[n]?.[r]:ES[n]?.[r]:null;if(i)return vS(i,c)},{node:u},d,f),i},zS=function(e,t,n,r,i){r&&e.push(r);for(var a=0;a<e.length;a++){var o=e[a],s=BS(o);if(s){zS(s.children,t,n,null,i);continue}var c=!o.hasClass(`mspace`);if(c){var l=t(o,n.node);l&&(n.insertAfter?n.insertAfter(l):(e.unshift(l),a++))}c?n.node=o:i&&o.hasClass(`newline`)&&(n.node=H([`leftmost`])),n.insertAfter=(t=>n=>{e.splice(t+1,0,n),a++})(a)}r&&e.pop()},BS=function(e){return e instanceof Vb||e instanceof $b||e instanceof Qb&&e.hasClass(`enclosing`)?e:null},VS=function(e,t){var n=BS(e);if(n){var r=n.children;if(r.length){if(t===`right`)return VS(r[r.length-1],`right`);if(t===`left`)return VS(r[0],`left`)}}return e},HS=function(e,t){return e?(t&&(e=VS(e,t)),LS[e.classes[0]]||null):null},US=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return H(t.concat(n))},WS=function(e,t,n){if(!e)return H();if(kS[e.type]){var r=kS[e.type](e,t);if(n&&t.size!==n.size){r=H(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}throw new j(`Got group of unknown type: '`+e.type+`'`)};function GS(e,t){var n=H([`base`],e,t),r=H([`strut`]);return r.style.height=M(n.height+n.depth),n.depth&&(r.style.verticalAlign=M(-n.depth)),n.children.unshift(r),n}function KS(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=RS(e,t,`root`),i;r.length===2&&r[1].hasClass(`tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s<r.length;s++)if(o.push(r[s]),r[s].hasClass(`mbin`)||r[s].hasClass(`mrel`)||r[s].hasClass(`allowbreak`)){for(var c=!1;s<r.length-1&&r[s+1].hasClass(`mspace`)&&!r[s+1].hasClass(`newline`);)s++,o.push(r[s]),r[s].hasClass(`nobreak`)&&(c=!0);c||(a.push(GS(o,t)),o=[])}else r[s].hasClass(`newline`)&&(o.pop(),o.length>0&&(a.push(GS(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(GS(o,t));var l;n?(l=GS(RS(n,t,!0),t),l.classes=[`tag`],a.push(l)):i&&a.push(i);var u=H([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=M(u.height+u.depth),u.depth&&(d.style.verticalAlign=M(-u.depth))}return u}function qS(e){return new Vb(e)}var W=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Kb(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof JS&&this.children[n+1]instanceof JS){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof JS;)r+=this.children[++n].toText();e.appendChild(new JS(r).toNode())}else e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<`+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=` `+t+`="`,e+=Xy(this.attributes[t]),e+=`"`);this.classes.length>0&&(e+=` class ="`+Xy(Kb(this.classes))+`"`),e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</`+this.type+`>`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},JS=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Xy(this.toText())}toText(){return this.text}},YS=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?` `:e>=.1666&&e<=.1667?` `:e>=.2222&&e<=.2223?` `:e>=.2777&&e<=.2778?` `:e>=-.05556&&e<=-.05555?` `:e>=-.1667&&e<=-.1666?` `:e>=-.2223&&e<=-.2222?` `:e>=-.2778&&e<=-.2777?` `:null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,M(this.width)),e}toMarkup(){return this.character?`<mtext>`+this.character+`</mtext>`:`<mspace width="`+M(this.width)+`"/>`}toText(){return this.character?this.character:` `}},XS=new Set([`\\imath`,`\\jmath`]),ZS=new Set([`mrow`,`mtable`]),QS=function(e,t,n){return gx[t][e]&&gx[t][e].replace&&e.charCodeAt(0)!==55349&&!(wx.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)===`tt`||n.font&&n.font.slice(4,6)===`tt`))&&(e=gx[t][e].replace),new JS(e)},$S=function(e){return e.length===1?e[0]:new W(`mrow`,e)},eC={mathit:`italic`,boldsymbol:e=>e.type===`textord`?`bold`:`bold-italic`,mathbf:`bold`,mathbb:`double-struck`,mathsfit:`sans-serif-italic`,mathfrak:`fraktur`,mathscr:`script`,mathcal:`script`,mathsf:`sans-serif`,mathtt:`monospace`},tC=(e,t)=>{if(e.mode===`text`){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`}var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode,i=eC[n];if(i)return typeof i==`function`?i(e):i;var a=e.text;if(XS.has(a))return null;if(gx[r][a]){var o=gx[r][a].replace;o&&(a=o)}var s=bS[n].fontName;return px(a,s,r)?bS[n].variant:null};function nC(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof JS&&t.text===`.`}if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof JS&&n.text===`,`}return!1}var rC=function(e,t,n){if(e.length===1){var r=aC(e[0],t);return n&&r instanceof W&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o<e.length;o++){var s=aC(e[o],t);if(s instanceof W&&a instanceof W){if(s.type===`mtext`&&a.type===`mtext`&&s.getAttribute(`mathvariant`)===a.getAttribute(`mathvariant`)){a.children.push(...s.children);continue}if(s.type===`mn`&&a.type===`mn`){a.children.push(...s.children);continue}if(nC(s)&&a.type===`mn`){a.children.push(...s.children);continue}if(s.type===`mn`&&nC(a))s.children=[...a.children,...s.children],i.pop();else if((s.type===`msup`||s.type===`msub`)&&s.children.length>=1&&(a.type===`mn`||nC(a))){var c=s.children[0];c instanceof W&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof JS&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof JS&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},iC=function(e,t,n){return $S(rC(e,t,n))},aC=function(e,t){if(!e)return new W(`mrow`);if(AS[e.type])return AS[e.type](e,t);throw new j(`Got group of unknown type: '`+e.type+`'`)};function oC(e,t,n,r,i){var a=rC(e,n),o=a.length===1&&a[0]instanceof W&&ZS.has(a[0].type)?a[0]:new W(`mrow`,a),s=new W(`annotation`,[new JS(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new W(`math`,[new W(`semantics`,[o,s])]);return c.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&c.setAttribute(`display`,`block`),H([i?`katex`:`katex-mathml`],[c])}var sC=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],cC=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],lC=function(e,t){return t.size<2?e:sC[e-1][t.size-1]},uC=class e{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=cC[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:lC(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:cC[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=lC(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=hx(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};uC.BASESIZE=6;var dC=function(e){return new uC({style:e.displayMode?Sb.DISPLAY:Sb.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},fC=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=H(n,[e])}return e},pC=function(e,t,n){var r=dC(n),i;return n.output===`mathml`?oC(e,t,r,n.displayMode,!0):(i=n.output===`html`?H([`katex`],[KS(e,r)]):H([`katex`],[oC(e,t,r,n.displayMode,!1),KS(e,r)]),fC(i,n))},mC=function(e,t,n){return fC(H([`katex`],[KS(e,dC(n))]),n)},hC={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,underbracket:`⎵`,overbracket:`⎴`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},gC=function(e){var t=new W(`mo`,[new JS(hC[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},_C={overrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],overleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],underrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],underleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],xrightarrow:[[`rightarrow`],1.469,522,`xMaxYMin`],"\\cdrightarrow":[[`rightarrow`],3,522,`xMaxYMin`],xleftarrow:[[`leftarrow`],1.469,522,`xMinYMin`],"\\cdleftarrow":[[`leftarrow`],3,522,`xMinYMin`],Overrightarrow:[[`doublerightarrow`],.888,560,`xMaxYMin`],xRightarrow:[[`doublerightarrow`],1.526,560,`xMaxYMin`],xLeftarrow:[[`doubleleftarrow`],1.526,560,`xMinYMin`],overleftharpoon:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoonup:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoondown:[[`leftharpoondown`],.888,522,`xMinYMin`],overrightharpoon:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoonup:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoondown:[[`rightharpoondown`],.888,522,`xMaxYMin`],xlongequal:[[`longequal`],.888,334,`xMinYMin`],"\\cdlongequal":[[`longequal`],3,334,`xMinYMin`],xtwoheadleftarrow:[[`twoheadleftarrow`],.888,334,`xMinYMin`],xtwoheadrightarrow:[[`twoheadrightarrow`],.888,334,`xMaxYMin`],overleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],overbrace:[[`leftbrace`,`midbrace`,`rightbrace`],1.6,548],underbrace:[[`leftbraceunder`,`midbraceunder`,`rightbraceunder`],1.6,548],underleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],xleftrightarrow:[[`leftarrow`,`rightarrow`],1.75,522],xLeftrightarrow:[[`doubleleftarrow`,`doublerightarrow`],1.75,560],xrightleftharpoons:[[`leftharpoondownplus`,`rightharpoonplus`],1.75,716],xleftrightharpoons:[[`leftharpoonplus`,`rightharpoondownplus`],1.75,716],xhookleftarrow:[[`leftarrow`,`righthook`],1.08,522],xhookrightarrow:[[`lefthook`,`rightarrow`],1.08,522],overlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],underlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],overbracket:[[`leftbracketover`,`rightbracketover`],1.6,440],underbracket:[[`leftbracketunder`,`rightbracketunder`],1.6,410],overgroup:[[`leftgroup`,`rightgroup`],.888,342],undergroup:[[`leftgroupunder`,`rightgroupunder`],.888,342],xmapsto:[[`leftmapsto`,`rightarrow`],1.5,522],xtofrom:[[`leftToFrom`,`rightToFrom`],1.75,528],xrightleftarrows:[[`baraboveleftarrow`,`rightarrowabovebar`],1.75,901],xrightequilibrium:[[`baraboveshortleftharpoon`,`rightharpoonaboveshortbar`],1.75,716],xleftequilibrium:[[`shortbaraboveleftharpoon`,`shortrightharpoonabovebar`],1.75,716]},vC=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),yC=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(vC.has(r)&&`base`in e){var i=e.base.type===`ordgroup`?e.base.body.length:1,a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var c=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][c],a=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],a=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],o=`tilde`+c)}return{span:dS([],[new rx([new ix(o)],{width:`100%`,height:M(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`})],t),minWidth:0,height:s}}var l=[],u=_C[r];if(!u)throw Error(`No SVG data for "`+r+`".`);var[d,f,p]=u,m=p/1e3,h=d.length,g,_;if(h===1){if(u.length!==4)throw Error(`Expected 4-tuple for single-path SVG data "`+r+`".`);g=[`hide-tail`],_=[u[3]]}else if(h===2)g=[`halfarrow-left`,`halfarrow-right`],_=[`xMinYMin`,`xMaxYMin`];else if(h===3)g=[`brace-left`,`brace-center`,`brace-right`],_=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support
|
|
280
|
-
`+h+` children.`);for(var v=0;v<h;v++){var y=new rx([new ix(d[v])],{width:`400em`,height:M(m),viewBox:`0 0 `+n+` `+p,preserveAspectRatio:_[v]+` slice`}),b=dS([g[v]],[y],t);if(h===1)return{span:b,minWidth:f,height:m};b.style.height=M(m),l.push(b)}return{span:H([`stretchy`],l,t),minWidth:f,height:m}}var{span:r,minWidth:i,height:a}=n();return r.height=a,r.style.height=M(a),i>0&&(r.style.minWidth=M(i)),r},bC=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=H([`stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new ax({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new ax({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=dS([],[new rx(c,{width:`100%`,height:M(o)})],i)}return a.height=o,a.style.height=M(o),a},xC={bin:1,close:1,inner:1,open:1,punct:1,rel:1},SC={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function CC(e){return e in xC}function wC(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function TC(e){var t=EC(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function EC(e){return e&&(e.type===`atom`||SC.hasOwnProperty(e.type))?e:null}var DC=e=>{if(e instanceof nx)return e;if(cx(e)&&e.children.length===1)return DC(e.children[0])},OC=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=wC(e.base,`accent`),n=r.base,e.base=n,i=sx(WS(e,t)),e.base=r):(r=wC(e,`accent`),n=r.base);var a=WS(n,t.havingCrampedStyle()),o=r.isShifty&&$y(n),s=0;o&&(s=DC(a)?.skew??0);var c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=yC(r,t),u=_S({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+M(2*s)+`)`,marginLeft:M(2*s)}:void 0}]});else{var d,f;r.label===`\\vec`?(d=SS(`vec`,t),f=xS.vec[1]):(d=sS({type:`textord`,mode:r.mode,text:r.label},t,`textord`),d=ox(d),d.italic=0,f=d.width,c&&(l+=d.depth)),u=H([`accent-body`],[d]);var p=r.label===`\\textcircled`;p&&(u.classes.push(`accent-full`),l=a.height);var m=s;p||(m-=f/2),u.style.left=M(m),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=_S({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]})}var h=H([`mord`,`accent`],[u],t);return i?(i.children[0]=h,i.height=Math.max(h.height,i.height),i.classes[0]=`mord`,i):h},kC=(e,t)=>{var n=e.isStretchy?gC(e.label):new W(`mo`,[QS(e.label,e.mode)]),r=new W(`mover`,[aC(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},AC=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));U({type:`accent`,names:[`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`,`\\widecheck`,`\\widehat`,`\\widetilde`,`\\overrightarrow`,`\\overleftarrow`,`\\Overrightarrow`,`\\overleftrightarrow`,`\\overgroup`,`\\overlinesegment`,`\\overleftharpoon`,`\\overrightharpoon`],props:{numArgs:1},handler:(e,t)=>{var n=MS(t[0]),r=!AC.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:OC,mathmlBuilder:kC}),U({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(e.parser.settings.reportNonstrict(`mathVsTextAccents`,`LaTeX's accent `+e.funcName+` works only in text mode`),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:OC,mathmlBuilder:kC}),U({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=WS(e.base,t),r=yC(e,t),i=e.label===`\\utilde`?.12:0;return H([`mord`,`accentunder`],[_S({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=gC(e.label),r=new W(`munder`,[aC(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var jC=e=>{var t=new W(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};U({type:`xArrow`,names:[`\\xleftarrow`,`\\xrightarrow`,`\\xLeftarrow`,`\\xRightarrow`,`\\xleftrightarrow`,`\\xLeftrightarrow`,`\\xhookleftarrow`,`\\xhookrightarrow`,`\\xmapsto`,`\\xrightharpoondown`,`\\xrightharpoonup`,`\\xleftharpoondown`,`\\xleftharpoonup`,`\\xrightleftharpoons`,`\\xleftrightharpoons`,`\\xlongequal`,`\\xtwoheadrightarrow`,`\\xtwoheadleftarrow`,`\\xtofrom`,`\\xrightleftarrows`,`\\xrightequilibrium`,`\\xleftequilibrium`,`\\\\cdrightarrow`,`\\\\cdleftarrow`,`\\\\cdlongequal`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=hS(WS(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=hS(WS(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=yC(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=_S({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]},{type:`elem`,elem:o,shift:d}]})}else u=_S({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]}]});return H([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=gC(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=jC(aC(e.body,t));r=e.below?new W(`munderover`,[n,jC(aC(e.below,t)),i]):new W(`mover`,[n,i])}else e.below?r=new W(`munder`,[n,jC(aC(e.below,t))]):(r=jC(),r=new W(`mover`,[n,r]));return r}});function MC(e,t){var n=RS(e.body,t,!0);return H([e.mclass],n,t)}function NC(e,t){var n,r=rC(e.body,t);return e.mclass===`minner`?n=new W(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new W(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new W(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):e.mclass===`mopen`||e.mclass===`mclose`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`):e.mclass===`minner`&&(n.attributes.lspace=`0.0556em`,n.attributes.width=`+0.1111em`)),n}U({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:NS(i),isCharacterBox:$y(i)}},htmlBuilder:MC,mathmlBuilder:NC});var PC=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`};U({type:`mclass`,names:[`\\@binrel`],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:`mclass`,mode:n.mode,mclass:PC(t[0]),body:NS(t[1]),isCharacterBox:$y(t[1])}}}),U({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:PC(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:NS(i)},c={type:`supsub`,mode:a.mode,base:s,sup:r===`\\underset`?null:a,sub:r===`\\underset`?a:null};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:$y(c)}},htmlBuilder:MC,mathmlBuilder:NC}),U({type:`pmb`,names:[`\\pmb`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`pmb`,mode:n.mode,mclass:PC(t[0]),body:NS(t[0])}},htmlBuilder(e,t){var n=RS(e.body,t,!0),r=H([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=new W(`mstyle`,rC(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}});var FC={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},IC=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),LC=e=>e.type===`textord`&&e.text===`@`,RC=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function zC(e,t,n){var r=FC[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function BC(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new j(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;a<t.length;a++){for(var o=t[a],s=IC(),c=0;c<o.length;c++)if(!LC(o[c]))s.body.push(o[c]);else{r.push(s),c+=1;var l=TC(o[c]).text,u=[,,];if(u[0]={type:`ordgroup`,mode:`math`,body:[]},u[1]={type:`ordgroup`,mode:`math`,body:[]},!`=|.`.includes(l)){if(`<>AV`.includes(l))for(var d=0;d<2;d++){for(var f=!0,p=c+1;p<o.length;p++){if(RC(o[p],l)){f=!1,c=p;break}if(LC(o[p]))throw new j(`Missing a `+l+` character to complete a CD arrow.`,o[p]);u[d].body.push(o[p])}if(f)throw new j(`Missing a `+l+` character to complete a CD arrow.`,o[c])}else throw new j(`Expected one of "<>AV=|." after @`,o[c])}var m={type:`styling`,body:[zC(l,u,e)],mode:`math`,style:`display`,resetFont:!0};r.push(m),s=IC()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}U({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=hS(WS(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=M(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new W(`mrow`,[aC(e.label,t)]);return n=new W(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new W(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),U({type:`cdlabelparent`,names:[`\\\\cdparent`],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:`cdlabelparent`,mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=hS(WS(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new W(`mrow`,[aC(e.fragment,t)])}}),U({type:`textord`,names:[`\\@char`],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=wC(t[0],`ordgroup`).body,i=``,a=0;a<r.length;a++){var o=wC(r[a],`textord`);i+=o.text}var s=parseInt(i),c;if(isNaN(s))throw new j(`\\@char has non-numeric argument `+i);if(s<0||s>=1114111)throw new j(`\\@char with invalid code point `+i);return s<=65535?c=String.fromCharCode(s):(s-=65536,c=String.fromCharCode((s>>10)+55296,(s&1023)+56320)),{type:`textord`,mode:n.mode,text:c}}});var VC=(e,t)=>mS(RS(e.body,t.withColor(e.color),!1)),HC=(e,t)=>{var n=new W(`mstyle`,rC(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n};U({type:`color`,names:[`\\textcolor`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`original`]},handler(e,t){var{parser:n}=e,r=wC(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:NS(i)}},htmlBuilder:VC,mathmlBuilder:HC}),U({type:`color`,names:[`\\color`],props:{numArgs:1,allowedInText:!0,argTypes:[`color`]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=wC(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}},htmlBuilder:VC,mathmlBuilder:HC}),U({type:`cr`,names:[`\\\\`],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text===`[`?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior(`newLineInDisplayMode`,`In LaTeX, \\\\ or \\newline does nothing in display mode`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&wC(i,`size`).value}},htmlBuilder(e,t){var n=H([`mspace`],[],t);return e.newLine&&(n.classes.push(`newline`),e.size&&(n.style.marginTop=M(Gb(e.size,t)))),n},mathmlBuilder(e,t){var n=new W(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,M(Gb(e.size,t)))),n}});var UC={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},WC=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new j(`Expected a control sequence`,e);return t},GC=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},KC=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};U({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(UC[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=UC[r.text]),wC(t.parseFunction(),`internal`);throw new j(`Invalid token after macro prefix`,r)}}),U({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new j(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){o=t.gullet.future(),s[a].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new j(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new j(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new j(`Expected a macro definition`);else s[a].push(r.text);var{tokens:c}=t.gullet.consumeArg();return o&&c.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(i,{tokens:c,numArgs:a,delimiters:s},n===UC[n]),{type:`internal`,mode:t.mode}}}),U({type:`internal`,names:[`\\let`,`\\\\globallet`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=WC(t.gullet.popToken());return t.gullet.consumeSpaces(),KC(t,r,GC(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),U({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=WC(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return KC(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var qC=function(e,t,n){var r=px(gx.math[e]&&gx.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},JC=function(e,t,n,r){var i=n.havingBaseStyle(t),a=H(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},YC=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=M(i),e.height-=i,e.depth+=i},XC=function(e,t,n,r,i,a){var o=JC(iS(e,`Main-Regular`,i,r),t,r,a);return n&&YC(o,r,t),o},ZC=function(e,t,n,r){return iS(e,`Size`+t+`-Regular`,n,r)},QC=function(e,t,n,r,i,a){var o=ZC(e,t,i,r),s=JC(H([`delimsizing`,`size`+t],[o],r),Sb.TEXT,r,a);return n&&YC(s,r,Sb.TEXT),s},$C=function(e,t,n){return{type:`elem`,elem:H([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[H([],[iS(e,t,n)])])}},ew=function(e,t,n){var r=lx[`Size4-Regular`][e.charCodeAt(0)]?lx[`Size4-Regular`][e.charCodeAt(0)][4]:lx[`Size1-Regular`][e.charCodeAt(0)][4],i=dS([],[new rx([new ix(`inner`,Lb(e,Math.round(1e3*t)))],{width:M(r),height:M(t),style:`width:`+M(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return i.height=t,i.style.height=M(t),i.style.width=M(r),{type:`elem`,elem:i}},tw=.008,nw={type:`kern`,size:-1*tw},rw=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),iw=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),aw=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;e===`\\uparrow`?c=l=`⏐`:e===`\\Uparrow`?c=l=`‖`:e===`\\downarrow`?o=c=`⏐`:e===`\\Downarrow`?o=c=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,c=`⏐`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`‖`,l=`\\Downarrow`):rw.has(e)?(c=`∣`,u=`vert`,d=333):iw.has(e)?(c=`∥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`⎡`,c=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`⎤`,c=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`⌊`?(c=o=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,c=l=`⎢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`⌋`?(c=o=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,c=l=`⎥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`⎛`,c=`⎜`,l=`⎝`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`⎞`,c=`⎟`,l=`⎠`,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,l=`⎩`,c=`⎪`,f=`Size4-Regular`);var p=qC(o,f,i),m=p.height+p.depth,h=qC(c,f,i),g=h.height+h.depth,_=qC(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=qC(s,f,i);y=x.height+x.depth,b=2}var ee=m+v+y,te=ee+Math.max(0,Math.ceil((t-ee)/(b*g)))*b*g,ne=r.fontMetrics().axisHeight;n&&(ne*=r.sizeMultiplier);var re=te/2-ne,ie=[];if(u.length>0){var ae=te-m-v,oe=Math.round(te*1e3),se=zb(u,Math.round(ae*1e3)),ce=new ix(u,se),le=M(d/1e3),ue=M(oe/1e3),de=dS([],[new rx([ce],{width:le,height:ue,viewBox:`0 0 `+d+` `+oe})],r);de.height=oe/1e3,de.style.width=le,de.style.height=ue,ie.push({type:`elem`,elem:de})}else{if(ie.push($C(l,f,i)),ie.push(nw),s===null){var fe=te-m-v+2*tw;ie.push(ew(c,fe,r))}else{var pe=(te-m-v-y)/2+2*tw;ie.push(ew(c,pe,r)),ie.push(nw),ie.push($C(s,f,i)),ie.push(nw),ie.push(ew(c,pe,r))}ie.push(nw),ie.push($C(o,f,i))}var me=r.havingBaseStyle(Sb.TEXT);return JC(H([`delimsizing`,`mult`],[_S({positionType:`bottom`,positionData:re,children:ie})],me),Sb.TEXT,r,a)},ow=80,sw=.08,cw=function(e,t,n,r,i){return dS([`hide-tail`],[new rx([new ix(e,Ib(e,r,n))],{width:`400em`,height:M(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},lw=function(e,t){var n=t.havingBaseSizing(),r=yw(`\\surd`,e*n.sizeMultiplier,_w,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s,c,l,u;return r.type===`small`?(l=1e3+1e3*a+ow,e<1?i=1:e<1.4&&(i=.7),s=(1+a+sw)/i,c=(1+a)/i,o=cw(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+ow)*pw[r.size],c=(pw[r.size]+a)/i,s=(pw[r.size]+a+sw)/i,o=cw(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+sw,c=e+a,l=Math.floor(1e3*e+a)+ow,o=cw(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=M(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},uw=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),dw=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),fw=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),pw=[0,1.2,1.8,2.4,3],mw=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),uw.has(e)||fw.has(e))return QC(e,t,!1,n,r,i);if(dw.has(e))return aw(e,pw[t],!1,n,r,i);throw new j(`Illegal delimiter: '`+e+`'`)},hw=[{type:`small`,style:Sb.SCRIPTSCRIPT},{type:`small`,style:Sb.SCRIPT},{type:`small`,style:Sb.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],gw=[{type:`small`,style:Sb.SCRIPTSCRIPT},{type:`small`,style:Sb.SCRIPT},{type:`small`,style:Sb.TEXT},{type:`stack`}],_w=[{type:`small`,style:Sb.SCRIPTSCRIPT},{type:`small`,style:Sb.SCRIPT},{type:`small`,style:Sb.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],vw=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;var t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},yw=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);i<n.length;i++){var a=n[i];if(a.type===`stack`)break;var o=qC(e,vw(a),`math`),s=o.height+o.depth;if(a.type===`small`){var c=r.havingBaseStyle(a.style);s*=c.sizeMultiplier}if(s>t)return a}return n[n.length-1]},bw=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=fw.has(e)?hw:uw.has(e)?_w:gw,s=yw(e,t,o,r);return s.type===`small`?XC(e,s.style,n,r,i,a):s.type===`large`?QC(e,s.size,n,r,i,a):aw(e,t,n,r,i,a)},xw=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return bw(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},Sw={"\\bigl":{mclass:`mopen`,size:1},"\\Bigl":{mclass:`mopen`,size:2},"\\biggl":{mclass:`mopen`,size:3},"\\Biggl":{mclass:`mopen`,size:4},"\\bigr":{mclass:`mclose`,size:1},"\\Bigr":{mclass:`mclose`,size:2},"\\biggr":{mclass:`mclose`,size:3},"\\Biggr":{mclass:`mclose`,size:4},"\\bigm":{mclass:`mrel`,size:1},"\\Bigm":{mclass:`mrel`,size:2},"\\biggm":{mclass:`mrel`,size:3},"\\Biggm":{mclass:`mrel`,size:4},"\\big":{mclass:`mord`,size:1},"\\Big":{mclass:`mord`,size:2},"\\bigg":{mclass:`mord`,size:3},"\\Bigg":{mclass:`mord`,size:4}},Cw=new Set(`(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.`.split(`,`));function ww(e){return`isMiddle`in e}function Tw(e,t){var n=EC(e);if(n&&Cw.has(n.text))return n;throw n?new j(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new j(`Invalid delimiter type '`+e.type+`'`,e)}U({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],props:{numArgs:1,argTypes:[`primitive`]},handler:(e,t)=>{var n=Tw(t[0],e);return{type:`delimsizing`,mode:e.parser.mode,size:Sw[e.funcName].size,mclass:Sw[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?H([e.mclass]):mw(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(QS(e.delim,e.mode));var n=new W(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=M(pw[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function Ew(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}U({type:`leftright-right`,names:[`\\right`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new j(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:Tw(t[0],e).text,color:n}}}),U({type:`leftright`,names:[`\\left`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Tw(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=wC(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{Ew(e);for(var n=RS(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o<n.length;o++){var s=n[o];ww(s)?a=!0:(r=Math.max(n[o].height,r),i=Math.max(n[o].depth,i))}r*=t.sizeMultiplier,i*=t.sizeMultiplier;var c=e.left===`.`?US(t,[`mopen`]):xw(e.left,r,i,t,e.mode,[`mopen`]);if(n.unshift(c),a)for(var l=1;l<n.length;l++){var u=n[l];if(ww(u)){var d=u.isMiddle;n[l]=xw(d.delim,r,i,d.options,e.mode,[])}}var f;if(e.right===`.`)f=US(t,[`mclose`]);else{var p=e.rightColor?t.withColor(e.rightColor):t;f=xw(e.right,r,i,p,e.mode,[`mclose`])}return n.push(f),H([`minner`],n,t)},mathmlBuilder:(e,t)=>{Ew(e);var n=rC(e.body,t);if(e.left!==`.`){var r=new W(`mo`,[QS(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new W(`mo`,[QS(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return $S(n)}}),U({type:`middle`,names:[`\\middle`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Tw(t[0],e);if(!e.parser.leftrightDepth)throw new j(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim===`.`?n=US(t,[]):(n=mw(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=new W(`mo`,[e.delim===`\\vert`||e.delim===`|`?QS(`|`,`text`):QS(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n}});var Dw=(e,t)=>{var n=hS(WS(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=$y(e.body);if(r===`sout`)a=H([`stretchy`,`sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=Gb({number:.6,unit:`pt`},t),l=Gb({number:.35,unit:`ex`},t),u=t.havingBaseSizing();i/=u.sizeMultiplier;var d=n.height+n.depth+c+l;n.style.paddingLeft=M(d/2+c);var f=Math.floor(1e3*d*i);a=dS([`hide-tail`],[new rx([new ix(`phase`,Pb(f))],{width:`400em`,height:M(f/1e3),viewBox:`0 0 400000 `+f,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=M(d),o=n.depth+c+l}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var p,m,h=0;/box/.test(r)?(h=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=t.fontMetrics().fboxsep+(r===`colorbox`?0:h),m=p):r===`angl`?(h=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),p=4*h,m=Math.max(0,.25-n.depth)):(p=s?.2:0,m=p),a=bC(n,r,p,m,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=M(h)):r===`angl`&&h!==.049&&(a.style.borderTopWidth=M(h),a.style.borderRightWidth=M(h)),o=n.depth+m,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var g;if(e.backgroundColor)g=_S({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var _=/cancel|phase/.test(r)?[`svg-align`]:[];g=_S({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:_}]})}return/cancel/.test(r)&&(g.height=n.height,g.depth=n.depth),/cancel/.test(r)&&!s?H([`mord`,`cancel-lap`],[g],t):H([`mord`],[g],t)},Ow=(e,t)=>{var n,r=new W(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[aC(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+M(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`)}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r};U({type:`enclose`,names:[`\\colorbox`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=wC(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:Dw,mathmlBuilder:Ow}),U({type:`enclose`,names:[`\\fcolorbox`],props:{numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=wC(t[0],`color-token`).color,o=wC(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:Dw,mathmlBuilder:Ow}),U({type:`enclose`,names:[`\\fbox`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\fbox`,body:t[0]}}}),U({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:Dw,mathmlBuilder:Ow}),U({type:`enclose`,names:[`\\sout`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e;n.mode===`math`&&n.settings.reportNonstrict(`mathVsSout`,`LaTeX's \\sout works only in text mode`);var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:Dw,mathmlBuilder:Ow}),U({type:`enclose`,names:[`\\angl`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\angl`,body:t[0]}}});var kw={};function Aw(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c<n.length;++c)kw[n[c]]=s;a&&(kS[t]=a),o&&(AS[t]=o)}var jw={};function G(e,t){jw[e]=t}var Mw=class e{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new e(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}},Nw=class e{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(t,n){return new e(n,Mw.range(this,t))}};function Pw(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n===`\\relax`&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n===`\\hline`||n===`\\hdashline`;)e.consume(),t.push(n===`\\hdashline`),e.consumeSpaces(),n=e.fetch().text;return t}var Fw=e=>{if(!e.parser.settings.displayMode)throw new j(`{`+e.envName+`} can be used only in display mode.`)},Iw=new Set([`gather`,`gather*`]);function Lw(e){if(!e.includes(`ed`))return!e.includes(`*`)}function Rw(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:a,arraystretch:o,colSeparationType:s,autoTag:c,singleRow:l,emptySingleRow:u,maxNumCols:d,leqno:f}=t;if(e.gullet.beginGroup(),l||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var p=e.gullet.expandMacroAsText(`\\arraystretch`);if(p==null)o=1;else if(o=parseFloat(p),!o||o<0)throw new j(`Invalid \\arraystretch: `+p)}e.gullet.beginGroup();var m=[],h=[m],g=[],_=[],v=c==null?void 0:[];function y(){c&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function b(){v&&(e.gullet.macros.get(`\\df@tag`)?(v.push(e.subparse([new Nw(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!c&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(Pw(e));;){var x=e.parseExpression(!1,l?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();var ee={type:`ordgroup`,mode:e.mode,body:x};n&&(ee={type:`styling`,mode:e.mode,style:n,resetFont:!0,body:[ee]}),m.push(ee);var te=e.fetch().text;if(te===`&`){if(d&&m.length===d){if(l||s)throw new j(`Too many tab characters: &`,e.nextToken);e.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}e.consume()}else if(te===`\\end`){b(),m.length===1&&ee.type===`styling`&&ee.body.length===1&&ee.body[0].type===`ordgroup`&&ee.body[0].body.length===0&&(h.length>1||!u)&&h.pop(),_.length<h.length+1&&_.push([]);break}else if(te===`\\\\`){e.consume();var ne=void 0;e.gullet.future().text!==` `&&(ne=e.parseSizeGroup(!0)),g.push(ne?ne.value:null),b(),_.push(Pw(e)),m=[],h.push(m),y()}else throw new j(`Expected & or \\\\ or \\cr or \\end`,e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:e.mode,addJot:i,arraystretch:o,body:h,cols:a,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:_,colSeparationType:s,tags:v,leqno:f}}function zw(e){return e.slice(0,1)===`d`?`display`:`text`}var Bw=function(e,t){var n,r,i=e.body.length,a=e.hLinesBeforeRow,o=0,s=Array(i),c=[],l=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,d=5*u;e.colSeparationType&&e.colSeparationType===`small`&&(d=.2778*(t.havingStyle(Sb.SCRIPT).sizeMultiplier/t.sizeMultiplier));var f=e.colSeparationType===`CD`?Gb({number:3,unit:`ex`},t):12*u,p=3*u,m=e.arraystretch*f,h=.7*m,g=.3*m,_=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(_+=.25),c.push({pos:_,isDashed:e[t]})}for(v(a[0]),n=0;n<e.body.length;++n){var y=e.body[n],b=h,x=g;o<y.length&&(o=y.length);var ee={cells:Array(y.length),height:0,depth:0,pos:0};for(r=0;r<y.length;++r){var te=WS(y[r],t);x<te.depth&&(x=te.depth),b<te.height&&(b=te.height),ee.cells[r]=te}var ne=e.rowGaps[n],re=0;ne&&(re=Gb(ne,t),re>0&&(re+=g,x<re&&(x=re),re=0)),e.addJot&&n<e.body.length-1&&(x+=p),ee.height=b,ee.depth=x,_+=b,ee.pos=_,_+=x+re,s[n]=ee,v(a[n+1])}var ie=_/2+t.fontMetrics().axisHeight,ae=e.cols||[],oe=[],se,ce,le=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<i;++n){var ue=s[n],de=ue.pos-ie,fe=e.tags[n],pe=void 0;pe=fe===!0?H([`eqn-num`],[],t):fe===!1?H([],[],t):H([],RS(fe,t,!0),t),pe.depth=ue.depth,pe.height=ue.height,le.push({type:`elem`,elem:pe,shift:de})}for(r=0,ce=0;r<o||ce<ae.length;++r,++ce){for(var me=ae[ce],he=!0;(ge=me)?.type===`separator`;){var ge;if(he||(se=H([`arraycolsep`],[]),se.style.width=M(t.fontMetrics().doubleRuleSep),oe.push(se)),me.separator===`|`||me.separator===`:`){var _e=me.separator===`|`?`solid`:`dashed`,ve=H([`vertical-separator`],[],t);ve.style.height=M(_),ve.style.borderRightWidth=M(l),ve.style.borderRightStyle=_e,ve.style.margin=`0 `+M(-l/2);var ye=_-ie;ye&&(ve.style.verticalAlign=M(-ye)),oe.push(ve)}else throw new j(`Invalid separator type: `+me.separator);ce++,me=ae[ce],he=!1}if(!(r>=o)){var be=void 0;(r>0||e.hskipBeforeAndAfter)&&(be=me?.pregap??d,be!==0&&(se=H([`arraycolsep`],[]),se.style.width=M(be),oe.push(se)));var xe=[];for(n=0;n<i;++n){var Se=s[n],Ce=Se.cells[r];if(Ce){var we=Se.pos-ie;Ce.depth=Se.depth,Ce.height=Se.height,xe.push({type:`elem`,elem:Ce,shift:we})}}var Te=_S({positionType:`individualShift`,children:xe}),Ee=H([`col-align-`+(me?.align||`c`)],[Te]);oe.push(Ee),(r<o-1||e.hskipBeforeAndAfter)&&(be=me?.postgap??d,be!==0&&(se=H([`arraycolsep`],[]),se.style.width=M(be),oe.push(se)))}}var De=H([`mtable`],oe);if(c.length>0){for(var Oe=fS(`hline`,t,l),ke=fS(`hdashline`,t,l),Ae=[{type:`elem`,elem:De,shift:0}];c.length>0;){var je=c.pop(),Me=je.pos-ie;je.isDashed?Ae.push({type:`elem`,elem:ke,shift:Me}):Ae.push({type:`elem`,elem:Oe,shift:Me})}De=_S({positionType:`individualShift`,children:Ae})}if(le.length===0)return H([`mord`],[De],t);var Ne=H([`tag`],[_S({positionType:`individualShift`,children:le})],t);return mS([De,Ne])},Vw={c:`center `,l:`left `,r:`right `},Hw=function(e,t){for(var n=[],r=new W(`mtd`,[],[`mtr-glue`]),i=new W(`mtd`,[],[`mml-eqn-num`]),a=0;a<e.body.length;a++){for(var o=e.body[a],s=[],c=0;c<o.length;c++)s.push(new W(`mtd`,[aC(o[c],t)]));e.tags&&e.tags[a]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new W(`mtr`,s))}var l=new W(`mtable`,n),u=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);l.setAttribute(`rowspacing`,M(u));var d=``,f=``;if(e.cols&&e.cols.length>0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++){var y=p[v];y.type===`align`?(f+=Vw[y.align],h&&(m+=`none `),h=!0):y.type===`separator`&&(h&&=(m+=y.separator===`|`?`solid `:`dashed `,!1))}l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var b=e.cols||[],x=``,ee=1;ee<b.length;ee++)x+=ee%2?`0em `:`1em `;l.setAttribute(`columnspacing`,x.trim())}else e.colSeparationType===`alignat`||e.colSeparationType===`gather`?l.setAttribute(`columnspacing`,`0em`):e.colSeparationType===`small`?l.setAttribute(`columnspacing`,`0.2778em`):e.colSeparationType===`CD`?l.setAttribute(`columnspacing`,`0.5em`):l.setAttribute(`columnspacing`,`1em`);var te=``,ne=e.hLinesBeforeRow;d+=ne[0].length>0?`left `:``,d+=ne[ne.length-1].length>0?`right `:``;for(var re=1;re<ne.length-1;re++)te+=ne[re].length===0?`none `:ne[re][0]?`dashed `:`solid `;return/[sd]/.test(te)&&l.setAttribute(`rowlines`,te.trim()),d!==``&&(l=new W(`menclose`,[l]),l.setAttribute(`notation`,d.trim())),e.arraystretch&&e.arraystretch<1&&(l=new W(`mstyle`,[l]),l.setAttribute(`scriptlevel`,`1`)),l},Uw=function(e,t){e.envName.includes(`ed`)||Fw(e);var n=[],r=e.envName.includes(`at`)?`alignat`:`align`,i=e.envName===`split`,a=Rw(e.parser,{cols:n,addJot:!0,autoTag:i?void 0:Lw(e.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},`display`),o=0,s=0,c={type:`ordgroup`,mode:e.mode,body:[]};if(t[0]&&t[0].type===`ordgroup`){for(var l=``,u=0;u<t[0].body.length;u++){var d=wC(t[0].body[u],`textord`);l+=d.text}o=Number(l),s=o*2}var f=!s;a.body.forEach(function(e){for(var t=1;t<e.length;t+=2)wC(wC(e[t],`styling`).body[0],`ordgroup`).body.unshift(c);if(f)s<e.length&&(s=e.length);else{var n=e.length/2;if(o<n)throw new j(`Too many math in a row: `+(`expected `+o+`, but got `+n),e[0])}});for(var p=0;p<s;++p){var m=`r`,h=0;p%2==1?m=`l`:p>0&&f&&(h=1),n[p]={type:`align`,align:m,pregap:h,postgap:0}}return a.colSeparationType=f?`align`:`alignat`,a};Aw({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(EC(t[0])?[t[0]]:wC(t[0],`ordgroup`).body).map(function(e){var t=TC(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new j(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return Rw(e.parser,r,zw(e.envName))},htmlBuilder:Bw,mathmlBuilder:Hw}),Aw({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!`lcr`.includes(n))throw new j(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=Rw(e.parser,r,zw(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:Bw,mathmlBuilder:Hw}),Aw({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=Rw(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:Bw,mathmlBuilder:Hw}),Aw({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(EC(t[0])?[t[0]]:wC(t[0],`ordgroup`).body).map(function(e){var t=TC(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new j(`Unknown column alignment: `+t,e)});if(n.length>1)throw new j(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},i=Rw(e.parser,r,`script`);if(i.body.length>0&&i.body[0].length>1)throw new j(`{subarray} can contain only one column`);return i},htmlBuilder:Bw,mathmlBuilder:Hw}),Aw({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=Rw(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},zw(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:Bw,mathmlBuilder:Hw}),Aw({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:Uw,htmlBuilder:Bw,mathmlBuilder:Hw}),Aw({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){Iw.has(e.envName)&&Fw(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:Lw(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Rw(e.parser,t,`display`)},htmlBuilder:Bw,mathmlBuilder:Hw}),Aw({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:Uw,htmlBuilder:Bw,mathmlBuilder:Hw}),Aw({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){Fw(e);var t={autoTag:Lw(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Rw(e.parser,t,`display`)},htmlBuilder:Bw,mathmlBuilder:Hw}),Aw({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return Fw(e),BC(e.parser)},htmlBuilder:Bw,mathmlBuilder:Hw}),G(`\\nonumber`,`\\gdef\\@eqnsw{0}`),G(`\\notag`,`\\nonumber`),U({type:`text`,names:[`\\hline`,`\\hdashline`],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new j(e.funcName+` valid only within array environment`)}});var Ww=kw;U({type:`environment`,names:[`\\begin`,`\\end`],props:{numArgs:1,argTypes:[`text`]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!==`ordgroup`)throw new j(`Invalid environment name`,i);for(var a=``,o=0;o<i.body.length;++o)a+=wC(i.body[o],`textord`).text;if(r===`\\begin`){if(!Ww.hasOwnProperty(a))throw new j(`No such environment: `+a,i);var s=Ww[a],{args:c,optArgs:l}=n.parseArguments(`\\begin{`+a+`}`,s),u={mode:n.mode,envName:a,parser:n},d=s.handler(u,c,l);n.expect(`\\end`,!1);var f=n.nextToken,p=wC(n.parseFunction(),`environment`);if(p.name!==a)throw new j(`Mismatch: \\begin{`+a+`} matched by \\end{`+p.name+`}`,f);return d}return{type:`environment`,mode:n.mode,name:a,nameGroup:i}}});var Gw=(e,t)=>{var n=e.font,r=t.withFont(n);return WS(e.body,r)},Kw=(e,t)=>{var n=e.font,r=t.withFont(n);return aC(e.body,r)},qw={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`};U({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=MS(t[0]),a=r;return a in qw&&(a=qw[a]),{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:Gw,mathmlBuilder:Kw}),U({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`mclass`,mode:n.mode,mclass:PC(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:$y(r)}}}),U({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:a}=n,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}},htmlBuilder:Gw,mathmlBuilder:Kw});var Jw=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=WS(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<c?c:o.depth}a=t.havingStyle(i);var l=WS(e.denom,a,t),u,d,f;e.hasBarLine?(e.barSize?(d=Gb(e.barSize,t),u=fS(`frac-line`,t,d)):u=fS(`frac-line`,t),d=u.height,f=u.height):(u=null,d=0,f=t.fontMetrics().defaultRuleThickness);var p,m,h;n.size===Sb.DISPLAY.size?(p=t.fontMetrics().num1,m=d>0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d)<m&&(p+=m-(p-o.depth-(_+.5*d))),_-.5*d-(l.height-h)<m&&(h+=m-(_-.5*d-(l.height-h)));var v=-(_-.5*d);g=_S({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:u,shift:v},{type:`elem`,elem:o,shift:-p}]})}else{var y=p-o.depth-(l.height-h);y<m&&(p+=.5*(m-y),h+=.5*(m-y)),g=_S({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:o,shift:-p}]})}a=t.havingStyle(n),g.height*=a.sizeMultiplier/t.sizeMultiplier,g.depth*=a.sizeMultiplier/t.sizeMultiplier;var b=n.size===Sb.DISPLAY.size?t.fontMetrics().delim1:n.size===Sb.SCRIPTSCRIPT.size?t.havingStyle(Sb.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,x=e.leftDelim==null?US(t,[`mopen`]):bw(e.leftDelim,b,!0,t.havingStyle(n),e.mode,[`mopen`]),ee=e.continued?H([]):e.rightDelim==null?US(t,[`mclose`]):bw(e.rightDelim,b,!0,t.havingStyle(n),e.mode,[`mclose`]);return H([`mord`].concat(a.sizingClasses(t)),[x,H([`mfrac`],[g]),ee],t)},Yw=(e,t)=>{var n=new W(`mfrac`,[aC(e.numer,t),aC(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=Gb(e.barSize,t);n.setAttribute(`linethickness`,M(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new W(`mo`,[new JS(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new W(`mo`,[new JS(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return $S(i)}return n},Xw=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e;U({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),Xw({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:Jw,mathmlBuilder:Yw}),U({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var Zw=[`display`,`text`,`script`,`scriptscript`],Qw=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};U({type:`genfrac`,names:[`\\genfrac`],props:{numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],a=MS(t[0]),o=a.type===`atom`&&a.family===`open`?Qw(a.text):null,s=MS(t[1]),c=s.type===`atom`&&s.family===`close`?Qw(s.text):null,l=wC(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=wC(p.body[0],`textord`);f=Zw[Number(m.text)]}}else p=wC(p,`textord`),f=Zw[Number(p.text)];return Xw({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),U({type:`infix`,names:[`\\above`],props:{numArgs:1,argTypes:[`size`],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:wC(t[0],`size`).value,token:i}}}),U({type:`genfrac`,names:[`\\\\abovefrac`],props:{numArgs:3,argTypes:[`math`,`size`,`math`]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=wC(t[1],`infix`).size;if(!a)throw Error(`\\\\abovefrac expected size, but got `+String(a));var o=t[2],s=a.number>0;return{type:`genfrac`,mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null}}});var $w=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?WS(e.sup,t.havingStyle(n.sup()),t):WS(e.sub,t.havingStyle(n.sub()),t),i=wC(e.base,`horizBrace`)):i=wC(e,`horizBrace`);var a=WS(i.base,t.havingBaseStyle(Sb.DISPLAY)),o=yC(i,t),s=i.isOver?_S({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]}):_S({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o,wrapperClasses:[`svg-align`]},{type:`kern`,size:.1},{type:`elem`,elem:a}]});if(r){var c=H([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?_S({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):_S({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]})}return H([`minner`,i.isOver?`mover`:`munder`],[s],t)};U({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:$w,mathmlBuilder:(e,t)=>{var n=gC(e.label);return new W(e.isOver?`mover`:`munder`,[aC(e.base,t),n])}}),U({type:`href`,names:[`\\href`],props:{numArgs:2,argTypes:[`url`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=wC(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:NS(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=RS(e.body,t,!1);return pS(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=iC(e.body,t);return n instanceof W||(n=new W(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),U({type:`href`,names:[`\\url`],props:{numArgs:1,argTypes:[`url`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=wC(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a<r.length;a++){var o=r[a];o===`~`&&(o=`\\textasciitilde`),i.push({type:`textord`,mode:`text`,text:o})}var s={type:`text`,mode:n.mode,font:`\\texttt`,body:i};return{type:`href`,mode:n.mode,href:r,body:NS(s)}}}),U({type:`hbox`,names:[`\\hbox`],props:{numArgs:1,argTypes:[`text`],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:`hbox`,mode:n.mode,body:NS(t[0])}},htmlBuilder(e,t){return mS(RS(e.body,t.withFont(``),!1))},mathmlBuilder(e,t){return new W(`mrow`,rC(e.body,t.withFont(``)))}}),U({type:`html`,names:[`\\htmlClass`,`\\htmlId`,`\\htmlStyle`,`\\htmlData`],props:{numArgs:2,argTypes:[`raw`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,token:i}=e,a=wC(t[0],`raw`).string,o=t[1];n.settings.strict&&n.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);var s,c={};switch(r){case`\\htmlClass`:c.class=a,s={command:`\\htmlClass`,class:a};break;case`\\htmlId`:c.id=a,s={command:`\\htmlId`,id:a};break;case`\\htmlStyle`:c.style=a,s={command:`\\htmlStyle`,style:a};break;case`\\htmlData`:for(var l=a.split(`,`),u=0;u<l.length;u++){var d=l[u],f=d.indexOf(`=`);if(f<0)throw new j(`\\htmlData key/value '`+d+`' missing equals sign`);var p=d.slice(0,f),m=d.slice(f+1);c[`data-`+p.trim()]=m}s={command:`\\htmlData`,attributes:c};break;default:throw Error(`Unrecognized html command`)}return n.settings.isTrusted(s)?{type:`html`,mode:n.mode,attributes:c,body:NS(o)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=RS(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=H(r,n,t);for(var a in e.attributes)a!==`class`&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>iC(e.body,t)}),U({type:`htmlmathml`,names:[`\\html@mathml`],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`htmlmathml`,mode:n.mode,html:NS(t[0]),mathml:NS(t[1])}},htmlBuilder:(e,t)=>mS(RS(e.html,t,!1)),mathmlBuilder:(e,t)=>iC(e.mathml,t)});var eT=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new j(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!Wb(n))throw new j(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n};U({type:`includegraphics`,names:[`\\includegraphics`],props:{numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var c=wC(n[0],`raw`).string.split(`,`),l=0;l<c.length;l++){var u=c[l].split(`=`);if(u.length===2){var d=u[1].trim();switch(u[0].trim()){case`alt`:s=d;break;case`width`:i=eT(d);break;case`height`:a=eT(d);break;case`totalheight`:o=eT(d);break;default:throw new j(`Invalid key: '`+u[0]+`' in \\includegraphics.`)}}}var f=wC(t[0],`url`).url;return s===``&&(s=f,s=s.replace(/^.*[\\/]/,``),s=s.substring(0,s.lastIndexOf(`.`))),r.settings.isTrusted({command:`\\includegraphics`,url:f})?{type:`includegraphics`,mode:r.mode,alt:s,width:i,height:a,totalheight:o,src:f}:r.formatUnsupportedCmd(`\\includegraphics`)},htmlBuilder:(e,t)=>{var n=Gb(e.height,t),r=0;e.totalheight.number>0&&(r=Gb(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=Gb(e.width,t));var a={height:M(n+r)};i>0&&(a.width=M(i)),r>0&&(a.verticalAlign=M(-r));var o=new ex(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new W(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=Gb(e.height,t),i=0;if(e.totalheight.number>0&&(i=Gb(e.totalheight,t)-r,n.setAttribute(`valign`,M(-i))),n.setAttribute(`height`,M(r+i)),e.width.number>0){var a=Gb(e.width,t);n.setAttribute(`width`,M(a))}return n.setAttribute(`src`,e.src),n}}),U({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],props:{numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=wC(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`)),n.mode!==`math`&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` works only in math mode`)):o&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` doesn't support mu units`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return vS(e.dimension,t)},mathmlBuilder(e,t){return new YS(Gb(e.dimension,t))}}),U({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=H([],[WS(e.body,t)]),n=H([`inner`],[n],t)):n=H([`inner`],[WS(e.body,t)]);var r=H([`fix`],[]),i=H([e.alignment],[n,r],t),a=H([`strut`]);return a.style.height=M(i.height+i.depth),i.depth&&(a.style.verticalAlign=M(-i.depth)),i.children.unshift(a),i=H([`thinbox`],[i],t),H([`mord`,`vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new W(`mpadded`,[aC(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),U({type:`styling`,names:[`\\(`,`$`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,resetFont:!0,body:o}}}),U({type:`text`,names:[`\\)`,`\\]`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new j(`Mismatched `+e.funcName)}});var tT=(e,t)=>{switch(t.style.size){case Sb.DISPLAY.size:return e.display;case Sb.TEXT.size:return e.text;case Sb.SCRIPT.size:return e.script;case Sb.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};U({type:`mathchoice`,names:[`\\mathchoice`],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`mathchoice`,mode:n.mode,display:NS(t[0]),text:NS(t[1]),script:NS(t[2]),scriptscript:NS(t[3])}},htmlBuilder:(e,t)=>mS(RS(tT(e,t),t,!1)),mathmlBuilder:(e,t)=>iC(tT(e,t),t)});var nT=(e,t,n,r,i,a,o)=>{e=H([],[e]);var s=n&&$y(n),c,l;if(t){var u=WS(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=WS(n,r.havingStyle(i.sub()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(l&&c)f=_S({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:M(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:M(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(c)f=_S({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:M(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]});else if(l)f=_S({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:M(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var p=[f];if(c&&a!==0&&!s){var m=H([`mspace`],[],r);m.style.marginRight=M(a),p.unshift(m)}return H([`mop`,`op-limits`],p,r)},rT=new Set([`\\smallint`]),iT=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=wC(e.base,`op`),i=!0):a=wC(e,`op`);var o=t.style,s=!1;o.size===Sb.DISPLAY.size&&a.symbol&&!rT.has(a.name)&&(s=!0);var c,l;if(a.symbol){var u=s?`Size2-Regular`:`Size1-Regular`,d=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(d=a.name.slice(1),a.name=d===`oiint`?`\\iint`:`\\iiint`),c=iS(a.name,u,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),l=c.italic,d.length>0){var f=SS(d+`Size`+(s?`2`:`1`),t);c=_S({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]}),a.name=`\\`+d,c.classes.unshift(`mop`),c.italic=l}}else if(a.body){var p=RS(a.body,t,!0);p.length===1&&p[0]instanceof nx?(c=p[0],c.classes[0]=`mop`):c=H([`mop`],p,t)}else{for(var m=[],h=1;h<a.name.length;h++)m.push(aS(a.name[h],a.mode,t));c=H([`mop`],m,t)}var g=0,_=0;return(c instanceof nx||a.name===`\\oiint`||a.name===`\\oiiint`)&&!a.suppressBaseShift&&(g=(c.height-c.depth)/2-t.fontMetrics().axisHeight,_=c.italic??0),i?nT(c,n,r,t,o,_,g):(g&&(c.style.position=`relative`,c.style.top=M(g)),c)},aT=(e,t)=>{var n;if(e.symbol)n=new W(`mo`,[QS(e.name,e.mode)]),rT.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new W(`mo`,rC(e.body,t));else{n=new W(`mi`,[new JS(e.name.slice(1))]);var r=new W(`mo`,[QS(``,`text`)]);n=e.parentIsSupSub?new W(`mrow`,[n,r]):qS([n,r])}return n},oT={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};U({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=oT[i]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:iT,mathmlBuilder:aT}),U({type:`op`,names:[`\\mathop`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:NS(r)}},htmlBuilder:iT,mathmlBuilder:aT});var sT={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};U({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:iT,mathmlBuilder:aT}),U({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:iT,mathmlBuilder:aT}),U({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=sT[r]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:iT,mathmlBuilder:aT});var cT=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=wC(e.base,`operatorname`),i=!0):a=wC(e,`operatorname`);var o;if(a.body.length>0){for(var s=RS(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c<s.length;c++){var l=s[c];l instanceof nx&&(l.text=l.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`))}o=H([`mop`],s,t)}else o=H([`mop`],[],t);return i?nT(o,n,r,t,t.style,0,0):o};U({type:`operatorname`,names:[`\\operatorname@`,`\\operatornamewithlimits`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`operatorname`,mode:n.mode,body:NS(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:cT,mathmlBuilder:(e,t)=>{for(var n=rC(e.body,t.withFont(`mathrm`)),r=!0,i=0;i<n.length;i++){var a=n[i];if(!(a instanceof YS)){if(a instanceof W)switch(a.type){case`mi`:case`mn`:case`mspace`:case`mtext`:break;case`mo`:var o=a.children[0];a.children.length===1&&o instanceof JS?o.text=o.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`):r=!1;break;default:r=!1}else r=!1}}r&&(n=[new JS(n.map(e=>e.toText()).join(``))]);var s=new W(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new W(`mo`,[QS(``,`text`)]);return e.parentIsSupSub?new W(`mrow`,[s,c]):qS([s,c])}}),G(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),jS({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?mS(RS(e.body,t,!1)):H([`mord`],RS(e.body,t,!0),t)},mathmlBuilder(e,t){return iC(e.body,t,!0)}}),U({type:`overline`,names:[`\\overline`],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=WS(e.body,t.havingCrampedStyle()),r=fS(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return H([`mord`,`overline`],[_S({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new W(`mo`,[new JS(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new W(`mover`,[aC(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),U({type:`phantom`,names:[`\\phantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`phantom`,mode:n.mode,body:NS(r)}},htmlBuilder:(e,t)=>mS(RS(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new W(`mphantom`,rC(e.body,t))}),G(`\\hphantom`,`\\smash{\\phantom{#1}}`),U({type:`vphantom`,names:[`\\vphantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>H([`mord`,`rlap`],[H([`inner`],[WS(e.body,t.withPhantom())]),H([`fix`],[])],t),mathmlBuilder:(e,t)=>{var n=new W(`mpadded`,[new W(`mphantom`,rC(NS(e.body),t))]);return n.setAttribute(`width`,`0px`),n}}),U({type:`raisebox`,names:[`\\raisebox`],props:{numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e,r=wC(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=WS(e.body,t);return _S({positionType:`shift`,positionData:-Gb(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new W(`mpadded`,[aC(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),U({type:`internal`,names:[`\\relax`],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:`internal`,mode:t.mode}}}),U({type:`rule`,names:[`\\rule`],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`]},handler(e,t,n){var{parser:r}=e,i=n[0],a=wC(t[0],`size`),o=wC(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&wC(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=H([`mord`,`rule`],[],t),r=Gb(e.width,t),i=Gb(e.height,t),a=e.shift?Gb(e.shift,t):0;return n.style.borderRightWidth=M(r),n.style.borderTopWidth=M(i),n.style.bottom=M(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=Gb(e.width,t),r=Gb(e.height,t),i=e.shift?Gb(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new W(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,M(n)),o.setAttribute(`height`,M(r));var s=new W(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,M(i)):(s.setAttribute(`height`,M(i)),s.setAttribute(`depth`,M(-i))),s.setAttribute(`voffset`,M(i)),s}});function lT(e,t,n){for(var r=RS(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a<r.length;a++){var o=r[a].classes.indexOf(`sizing`);o<0?Array.prototype.push.apply(r[a].classes,t.sizingClasses(n)):r[a].classes[o+1]===`reset-size`+t.size&&(r[a].classes[o+1]=`reset-size`+n.size),r[a].height*=i,r[a].depth*=i}return mS(r)}var uT=[`\\tiny`,`\\sixptsize`,`\\scriptsize`,`\\footnotesize`,`\\small`,`\\normalsize`,`\\large`,`\\Large`,`\\LARGE`,`\\huge`,`\\Huge`];U({type:`sizing`,names:uT,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:uT.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return lT(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new W(`mstyle`,rC(e.body,n));return r.setAttribute(`mathsize`,M(n.sizeMultiplier)),r}}),U({type:`smash`,names:[`\\smash`],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,a=!1,o=n[0]&&wC(n[0],`ordgroup`);if(o)for(var s,c=0;c<o.body.length;++c){var l=o.body[c];if(s=TC(l).text,s===`t`)i=!0;else if(s===`b`)a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var u=t[0];return{type:`smash`,mode:r.mode,body:u,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{var n=H([],[WS(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return H([`mord`,`smash`],[n],t);if(n.children)for(var r=0;r<n.children.length;r++)e.smashHeight&&(n.children[r].height=0),e.smashDepth&&(n.children[r].depth=0);return H([`mord`],[_S({positionType:`firstBaseline`,children:[{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=new W(`mpadded`,[aC(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),U({type:`sqrt`,names:[`\\sqrt`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=WS(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=hS(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<Sb.TEXT.id&&(i=t.fontMetrics().xHeight);var a=r+i/4,{span:o,ruleWidth:s,advanceWidth:c}=lw(n.height+n.depth+a+r,t),l=o.height-s;l>n.height+n.depth+a&&(a=(a+l-n.height-n.depth)/2);var u=o.height-n.height-a-s;n.style.paddingLeft=M(c);var d=_S({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+u)},{type:`elem`,elem:o},{type:`kern`,size:s}]});if(e.index){var f=t.havingStyle(Sb.SCRIPTSCRIPT),p=WS(e.index,f,t);return H([`mord`,`sqrt`],[H([`root`],[_S({positionType:`shift`,positionData:-(.6*(d.height-d.depth)),children:[{type:`elem`,elem:p}]})]),d],t)}return H([`mord`,`sqrt`],[d],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new W(`mroot`,[aC(n,t),aC(r,t)]):new W(`msqrt`,[aC(n,t)])}});var dT={display:Sb.DISPLAY,text:Sb.TEXT,script:Sb.SCRIPT,scriptscript:Sb.SCRIPTSCRIPT};function fT(e){return e in dT}U({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!fT(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=dT[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),lT(e.body,r,t)},mathmlBuilder(e,t){var n=dT[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));var i=new W(`mstyle`,rC(e.body,r)),a={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return i.setAttribute(`scriptlevel`,a[0]),i.setAttribute(`displaystyle`,a[1]),i}});var pT=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===Sb.DISPLAY.size||n.alwaysHandleSupSub)?iT:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===Sb.DISPLAY.size||n.limits)?cT:null:n.type===`accent`?$y(n.base)?OC:null:n.type===`horizBrace`&&!e.sub===n.isOver?$w:null:null};jS({type:`supsub`,htmlBuilder(e,t){var n=pT(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:a}=e,o=WS(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&$y(r);if(i){var p=t.havingStyle(t.style.sup());s=WS(i,p,t),f||(u=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());c=WS(a,m,t),f||(d=o.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h=t.style===Sb.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,g=t.sizeMultiplier,_=M(.5/l.ptPerEm/g),v=null;if(c){var y=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof nx||y)&&(v=M(-(o.italic??0)))}var b;if(s&&c){u=Math.max(u,h,s.depth+.25*l.xHeight),d=Math.max(d,l.sub2);var x=4*l.defaultRuleThickness;if(u-s.depth-(c.height-d)<x){d=x-(u-s.depth)+c.height;var ee=.8*l.xHeight-(u-s.depth);ee>0&&(u+=ee,d-=ee)}b=_S({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:d,marginRight:_,marginLeft:v},{type:`elem`,elem:s,shift:-u,marginRight:_}]})}else if(c)d=Math.max(d,l.sub1,c.height-.8*l.xHeight),b=_S({positionType:`shift`,positionData:d,children:[{type:`elem`,elem:c,marginLeft:v,marginRight:_}]});else if(s)u=Math.max(u,h,s.depth+.25*l.xHeight),b=_S({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:_}]});else throw Error(`supsub must have either sup or sub.`);return H([HS(o,`right`)||`mord`],[o,H([`msupsub`],[b])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[aC(e.base,t)];e.sub&&a.push(aC(e.sub,t)),e.sup&&a.push(aC(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===Sb.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===Sb.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===Sb.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===Sb.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===Sb.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===Sb.DISPLAY)?`munder`:`msub`}return new W(o,a)}}),jS({type:`atom`,htmlBuilder(e,t){return aS(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new W(`mo`,[QS(e.text,e.mode)]);if(e.family===`bin`){var r=tC(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var mT={mi:`italic`,mn:`normal`,mtext:`normal`};jS({type:`mathord`,htmlBuilder(e,t){return sS(e,t,`mathord`)},mathmlBuilder(e,t){var n=new W(`mi`,[QS(e.text,e.mode,t)]),r=tC(e,t)||`italic`;return r!==mT[n.type]&&n.setAttribute(`mathvariant`,r),n}}),jS({type:`textord`,htmlBuilder(e,t){return sS(e,t,`textord`)},mathmlBuilder(e,t){var n=QS(e.text,e.mode,t),r=tC(e,t)||`normal`,i=e.mode===`text`?new W(`mtext`,[n]):/[0-9]/.test(e.text)?new W(`mn`,[n]):e.text===`\\prime`?new W(`mo`,[n]):new W(`mi`,[n]);return r!==mT[i.type]&&i.setAttribute(`mathvariant`,r),i}});var hT={"\\nobreak":`nobreak`,"\\allowbreak":`allowbreak`},gT={" ":{},"\\ ":{},"~":{className:`nobreak`},"\\space":{},"\\nobreakspace":{className:`nobreak`}};jS({type:`spacing`,htmlBuilder(e,t){if(gT.hasOwnProperty(e.text)){var n=gT[e.text].className||``;if(e.mode===`text`){var r=sS(e,t,`textord`);return r.classes.push(n),r}return H([`mspace`,n],[aS(e.text,e.mode,t)],t)}if(hT.hasOwnProperty(e.text))return H([`mspace`,hT[e.text]],[],t);throw new j(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(gT.hasOwnProperty(e.text))n=new W(`mtext`,[new JS(`\xA0`)]);else if(hT.hasOwnProperty(e.text))return new W(`mspace`);else throw new j(`Unknown type of space "`+e.text+`"`);return n}});var _T=()=>{var e=new W(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};jS({type:`tag`,mathmlBuilder(e,t){var n=new W(`mtable`,[new W(`mtr`,[_T(),new W(`mtd`,[iC(e.body,t)]),_T(),new W(`mtd`,[iC(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var vT={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},yT={"\\textbf":`textbf`,"\\textmd":`textmd`},bT={"\\textit":`textit`,"\\textup":`textup`},xT=(e,t)=>{var n=e.font;return n?vT[n]?t.withTextFontFamily(vT[n]):yT[n]?t.withTextFontWeight(yT[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(bT[n]):t};U({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],props:{numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`text`,mode:n.mode,body:NS(i),font:r}},htmlBuilder(e,t){var n=xT(e,t);return H([`mord`,`text`],RS(e.body,n,!0),n)},mathmlBuilder(e,t){var n=xT(e,t);return iC(e.body,n)}}),U({type:`underline`,names:[`\\underline`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`underline`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=WS(e.body,t),r=fS(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return H([`mord`,`underline`],[_S({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new W(`mo`,[new JS(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new W(`munder`,[aC(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),U({type:`vcenter`,names:[`\\vcenter`],props:{numArgs:1,argTypes:[`original`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`vcenter`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=WS(e.body,t),r=t.fontMetrics().axisHeight;return _S({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){return new W(`mrow`,[new W(`mpadded`,[aC(e.body,t)],[`vcenter`])])}}),U({type:`verb`,names:[`\\verb`],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new j(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=ST(e),r=[],i=t.havingStyle(t.style.text()),a=0;a<n.length;a++){var o=n[a];o===`~`&&(o=`\\textasciitilde`),r.push(iS(o,`Typewriter-Regular`,e.mode,i,[`mord`,`texttt`]))}return H([`mord`,`text`].concat(i.sizingClasses(t)),lS(r),i)},mathmlBuilder(e,t){var n=new W(`mtext`,[new JS(ST(e))]);return n.setAttribute(`mathvariant`,`monospace`),n}});var ST=e=>e.body.replace(/ /g,e.star?`␣`:`\xA0`),CT=OS,wT=`[ \r
|
|
279
|
+
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}};function Bb(e){return`toText`in e}var Vb=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e=``,t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>{if(Bb(e))return e.toText();throw Error(`Expected MathDomNode with toText, got `+e.constructor.name)}).join(``)}},Hb={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Ub={ex:!0,em:!0,mu:!0},Wb=function(e){return typeof e!=`string`&&(e=e.unit),e in Hb||e in Ub||e===`ex`},Gb=function(e,t){var n;if(e.unit in Hb)n=Hb[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new j(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},M=function(e){return+e.toFixed(4)+`em`},Kb=function(e){return e.filter(e=>e).join(` `)},qb=function(e){var t=``;for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=qy(n)+`:`+r+`;`)}return t},Jb=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},Yb=function(e){var t=document.createElement(e);t.className=Kb(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t},Xb=/[\s"'>/=\x00-\x1f]/,Zb=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+Xy(Kb(this.classes))+`"`);var n=qb(this.style);n&&(t+=` style="`+Xy(n)+`"`);for(var r of Object.keys(this.attributes)){if(Xb.test(r))throw new j(`Invalid attribute name '`+r+`'`);t+=` `+r+`="`+Xy(this.attributes[r])+`"`}t+=`>`;for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+=`</`+e+`>`,t},Qb=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,Jb.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Yb.call(this,`span`)}toMarkup(){return Zb.call(this,`span`)}},$b=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Jb.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Yb.call(this,`a`)}toMarkup(){return Zb.call(this,`a`)}},ex=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);return e.src=this.src,e.alt=this.alt,e.className=`mord`,Object.assign(e.style,this.style),e}toMarkup(){var e=`<img src="`+Xy(this.src)+`"`+(` alt="`+Xy(this.alt)+`"`),t=qb(this.style);return t&&(e+=` style="`+Xy(t)+`"`),e+=`'/>`,e}},tx={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},nx=class{constructor(e,t,n,r,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=wb(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=tx[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=M(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=Kb(this.classes)),Object.keys(this.style).length>0&&(t||=document.createElement(`span`),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`<span`;this.classes.length&&(e=!0,t+=` class="`,t+=Xy(Kb(this.classes)),t+=`"`);var n=``;this.italic>0&&(n+=`margin-right:`+M(this.italic)+`;`),n+=qb(this.style),n&&(e=!0,t+=` style="`+Xy(n)+`"`);var r=Xy(this.text);return e?(t+=`>`,t+=r,t+=`</span>`,t):r}},rx=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<svg xmlns="http://www.w3.org/2000/svg"`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+Xy(this.attributes[t])+`"`;e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</svg>`,e}},ix=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,Rb[this.pathName]),e}toMarkup(){return this.alternate?`<path d="`+Xy(this.alternate)+`"/>`:`<path d="`+Xy(Rb[this.pathName])+`"/>`}},ax=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=`<line`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+Xy(this.attributes[t])+`"`;return e+=`/>`,e}};function ox(e){if(e instanceof nx)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function sx(e){if(e instanceof Qb)return e;throw Error(`Expected span<HtmlDomNode> but got `+String(e)+`.`)}var cx=e=>e instanceof Qb||e instanceof $b||e instanceof Vb,lx={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},ux={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},dx={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`};function fx(e,t){lx[e]=t}function px(e,t,n){if(!lx[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=lx[t][r];if(!i&&e[0]in dx&&(r=dx[e[0]].charCodeAt(0),i=lx[t][r]),!i&&n===`text`&&Eb(r)&&(i=lx[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var mx={};function hx(e){var t=e>=5?0:e>=3?1:2;if(!mx[t]){var n=mx[t]={cssEmPerMu:ux.quad[t]/18};for(var r in ux)ux.hasOwnProperty(r)&&(n[r]=ux[r][t])}return mx[t]}var gx={math:{},text:{}};function N(e,t,n,r,i,a){gx[e][i]={font:t,group:n,replace:r},a&&r&&(gx[e][r]=gx[e][i])}var P=`math`,F=`text`,I=`main`,L=`ams`,_x=`accent-token`,R=`bin`,vx=`close`,yx=`inner`,z=`mathord`,bx=`op-token`,xx=`open`,Sx=`punct`,B=`rel`,Cx=`spacing`,V=`textord`;N(P,I,B,`≡`,`\\equiv`,!0),N(P,I,B,`≺`,`\\prec`,!0),N(P,I,B,`≻`,`\\succ`,!0),N(P,I,B,`∼`,`\\sim`,!0),N(P,I,B,`⊥`,`\\perp`),N(P,I,B,`⪯`,`\\preceq`,!0),N(P,I,B,`⪰`,`\\succeq`,!0),N(P,I,B,`≃`,`\\simeq`,!0),N(P,I,B,`∣`,`\\mid`,!0),N(P,I,B,`≪`,`\\ll`,!0),N(P,I,B,`≫`,`\\gg`,!0),N(P,I,B,`≍`,`\\asymp`,!0),N(P,I,B,`∥`,`\\parallel`),N(P,I,B,`⋈`,`\\bowtie`,!0),N(P,I,B,`⌣`,`\\smile`,!0),N(P,I,B,`⊑`,`\\sqsubseteq`,!0),N(P,I,B,`⊒`,`\\sqsupseteq`,!0),N(P,I,B,`≐`,`\\doteq`,!0),N(P,I,B,`⌢`,`\\frown`,!0),N(P,I,B,`∋`,`\\ni`,!0),N(P,I,B,`∝`,`\\propto`,!0),N(P,I,B,`⊢`,`\\vdash`,!0),N(P,I,B,`⊣`,`\\dashv`,!0),N(P,I,B,`∋`,`\\owns`),N(P,I,Sx,`.`,`\\ldotp`),N(P,I,Sx,`⋅`,`\\cdotp`),N(P,I,Sx,`⋅`,`·`),N(F,I,V,`⋅`,`·`),N(P,I,V,`#`,`\\#`),N(F,I,V,`#`,`\\#`),N(P,I,V,`&`,`\\&`),N(F,I,V,`&`,`\\&`),N(P,I,V,`ℵ`,`\\aleph`,!0),N(P,I,V,`∀`,`\\forall`,!0),N(P,I,V,`ℏ`,`\\hbar`,!0),N(P,I,V,`∃`,`\\exists`,!0),N(P,I,V,`∇`,`\\nabla`,!0),N(P,I,V,`♭`,`\\flat`,!0),N(P,I,V,`ℓ`,`\\ell`,!0),N(P,I,V,`♮`,`\\natural`,!0),N(P,I,V,`♣`,`\\clubsuit`,!0),N(P,I,V,`℘`,`\\wp`,!0),N(P,I,V,`♯`,`\\sharp`,!0),N(P,I,V,`♢`,`\\diamondsuit`,!0),N(P,I,V,`ℜ`,`\\Re`,!0),N(P,I,V,`♡`,`\\heartsuit`,!0),N(P,I,V,`ℑ`,`\\Im`,!0),N(P,I,V,`♠`,`\\spadesuit`,!0),N(P,I,V,`§`,`\\S`,!0),N(F,I,V,`§`,`\\S`),N(P,I,V,`¶`,`\\P`,!0),N(F,I,V,`¶`,`\\P`),N(P,I,V,`†`,`\\dag`),N(F,I,V,`†`,`\\dag`),N(F,I,V,`†`,`\\textdagger`),N(P,I,V,`‡`,`\\ddag`),N(F,I,V,`‡`,`\\ddag`),N(F,I,V,`‡`,`\\textdaggerdbl`),N(P,I,vx,`⎱`,`\\rmoustache`,!0),N(P,I,xx,`⎰`,`\\lmoustache`,!0),N(P,I,vx,`⟯`,`\\rgroup`,!0),N(P,I,xx,`⟮`,`\\lgroup`,!0),N(P,I,R,`∓`,`\\mp`,!0),N(P,I,R,`⊖`,`\\ominus`,!0),N(P,I,R,`⊎`,`\\uplus`,!0),N(P,I,R,`⊓`,`\\sqcap`,!0),N(P,I,R,`∗`,`\\ast`),N(P,I,R,`⊔`,`\\sqcup`,!0),N(P,I,R,`◯`,`\\bigcirc`,!0),N(P,I,R,`∙`,`\\bullet`,!0),N(P,I,R,`‡`,`\\ddagger`),N(P,I,R,`≀`,`\\wr`,!0),N(P,I,R,`⨿`,`\\amalg`),N(P,I,R,`&`,`\\And`),N(P,I,B,`⟵`,`\\longleftarrow`,!0),N(P,I,B,`⇐`,`\\Leftarrow`,!0),N(P,I,B,`⟸`,`\\Longleftarrow`,!0),N(P,I,B,`⟶`,`\\longrightarrow`,!0),N(P,I,B,`⇒`,`\\Rightarrow`,!0),N(P,I,B,`⟹`,`\\Longrightarrow`,!0),N(P,I,B,`↔`,`\\leftrightarrow`,!0),N(P,I,B,`⟷`,`\\longleftrightarrow`,!0),N(P,I,B,`⇔`,`\\Leftrightarrow`,!0),N(P,I,B,`⟺`,`\\Longleftrightarrow`,!0),N(P,I,B,`↦`,`\\mapsto`,!0),N(P,I,B,`⟼`,`\\longmapsto`,!0),N(P,I,B,`↗`,`\\nearrow`,!0),N(P,I,B,`↩`,`\\hookleftarrow`,!0),N(P,I,B,`↪`,`\\hookrightarrow`,!0),N(P,I,B,`↘`,`\\searrow`,!0),N(P,I,B,`↼`,`\\leftharpoonup`,!0),N(P,I,B,`⇀`,`\\rightharpoonup`,!0),N(P,I,B,`↙`,`\\swarrow`,!0),N(P,I,B,`↽`,`\\leftharpoondown`,!0),N(P,I,B,`⇁`,`\\rightharpoondown`,!0),N(P,I,B,`↖`,`\\nwarrow`,!0),N(P,I,B,`⇌`,`\\rightleftharpoons`,!0),N(P,L,B,`≮`,`\\nless`,!0),N(P,L,B,``,`\\@nleqslant`),N(P,L,B,``,`\\@nleqq`),N(P,L,B,`⪇`,`\\lneq`,!0),N(P,L,B,`≨`,`\\lneqq`,!0),N(P,L,B,``,`\\@lvertneqq`),N(P,L,B,`⋦`,`\\lnsim`,!0),N(P,L,B,`⪉`,`\\lnapprox`,!0),N(P,L,B,`⊀`,`\\nprec`,!0),N(P,L,B,`⋠`,`\\npreceq`,!0),N(P,L,B,`⋨`,`\\precnsim`,!0),N(P,L,B,`⪹`,`\\precnapprox`,!0),N(P,L,B,`≁`,`\\nsim`,!0),N(P,L,B,``,`\\@nshortmid`),N(P,L,B,`∤`,`\\nmid`,!0),N(P,L,B,`⊬`,`\\nvdash`,!0),N(P,L,B,`⊭`,`\\nvDash`,!0),N(P,L,B,`⋪`,`\\ntriangleleft`),N(P,L,B,`⋬`,`\\ntrianglelefteq`,!0),N(P,L,B,`⊊`,`\\subsetneq`,!0),N(P,L,B,``,`\\@varsubsetneq`),N(P,L,B,`⫋`,`\\subsetneqq`,!0),N(P,L,B,``,`\\@varsubsetneqq`),N(P,L,B,`≯`,`\\ngtr`,!0),N(P,L,B,``,`\\@ngeqslant`),N(P,L,B,``,`\\@ngeqq`),N(P,L,B,`⪈`,`\\gneq`,!0),N(P,L,B,`≩`,`\\gneqq`,!0),N(P,L,B,``,`\\@gvertneqq`),N(P,L,B,`⋧`,`\\gnsim`,!0),N(P,L,B,`⪊`,`\\gnapprox`,!0),N(P,L,B,`⊁`,`\\nsucc`,!0),N(P,L,B,`⋡`,`\\nsucceq`,!0),N(P,L,B,`⋩`,`\\succnsim`,!0),N(P,L,B,`⪺`,`\\succnapprox`,!0),N(P,L,B,`≆`,`\\ncong`,!0),N(P,L,B,``,`\\@nshortparallel`),N(P,L,B,`∦`,`\\nparallel`,!0),N(P,L,B,`⊯`,`\\nVDash`,!0),N(P,L,B,`⋫`,`\\ntriangleright`),N(P,L,B,`⋭`,`\\ntrianglerighteq`,!0),N(P,L,B,``,`\\@nsupseteqq`),N(P,L,B,`⊋`,`\\supsetneq`,!0),N(P,L,B,``,`\\@varsupsetneq`),N(P,L,B,`⫌`,`\\supsetneqq`,!0),N(P,L,B,``,`\\@varsupsetneqq`),N(P,L,B,`⊮`,`\\nVdash`,!0),N(P,L,B,`⪵`,`\\precneqq`,!0),N(P,L,B,`⪶`,`\\succneqq`,!0),N(P,L,B,``,`\\@nsubseteqq`),N(P,L,R,`⊴`,`\\unlhd`),N(P,L,R,`⊵`,`\\unrhd`),N(P,L,B,`↚`,`\\nleftarrow`,!0),N(P,L,B,`↛`,`\\nrightarrow`,!0),N(P,L,B,`⇍`,`\\nLeftarrow`,!0),N(P,L,B,`⇏`,`\\nRightarrow`,!0),N(P,L,B,`↮`,`\\nleftrightarrow`,!0),N(P,L,B,`⇎`,`\\nLeftrightarrow`,!0),N(P,L,B,`△`,`\\vartriangle`),N(P,L,V,`ℏ`,`\\hslash`),N(P,L,V,`▽`,`\\triangledown`),N(P,L,V,`◊`,`\\lozenge`),N(P,L,V,`Ⓢ`,`\\circledS`),N(P,L,V,`®`,`\\circledR`),N(F,L,V,`®`,`\\circledR`),N(P,L,V,`∡`,`\\measuredangle`,!0),N(P,L,V,`∄`,`\\nexists`),N(P,L,V,`℧`,`\\mho`),N(P,L,V,`Ⅎ`,`\\Finv`,!0),N(P,L,V,`⅁`,`\\Game`,!0),N(P,L,V,`‵`,`\\backprime`),N(P,L,V,`▲`,`\\blacktriangle`),N(P,L,V,`▼`,`\\blacktriangledown`),N(P,L,V,`■`,`\\blacksquare`),N(P,L,V,`⧫`,`\\blacklozenge`),N(P,L,V,`★`,`\\bigstar`),N(P,L,V,`∢`,`\\sphericalangle`,!0),N(P,L,V,`∁`,`\\complement`,!0),N(P,L,V,`ð`,`\\eth`,!0),N(F,I,V,`ð`,`ð`),N(P,L,V,`╱`,`\\diagup`),N(P,L,V,`╲`,`\\diagdown`),N(P,L,V,`□`,`\\square`),N(P,L,V,`□`,`\\Box`),N(P,L,V,`◊`,`\\Diamond`),N(P,L,V,`¥`,`\\yen`,!0),N(F,L,V,`¥`,`\\yen`,!0),N(P,L,V,`✓`,`\\checkmark`,!0),N(F,L,V,`✓`,`\\checkmark`),N(P,L,V,`ℶ`,`\\beth`,!0),N(P,L,V,`ℸ`,`\\daleth`,!0),N(P,L,V,`ℷ`,`\\gimel`,!0),N(P,L,V,`ϝ`,`\\digamma`,!0),N(P,L,V,`ϰ`,`\\varkappa`),N(P,L,xx,`┌`,`\\@ulcorner`,!0),N(P,L,vx,`┐`,`\\@urcorner`,!0),N(P,L,xx,`└`,`\\@llcorner`,!0),N(P,L,vx,`┘`,`\\@lrcorner`,!0),N(P,L,B,`≦`,`\\leqq`,!0),N(P,L,B,`⩽`,`\\leqslant`,!0),N(P,L,B,`⪕`,`\\eqslantless`,!0),N(P,L,B,`≲`,`\\lesssim`,!0),N(P,L,B,`⪅`,`\\lessapprox`,!0),N(P,L,B,`≊`,`\\approxeq`,!0),N(P,L,R,`⋖`,`\\lessdot`),N(P,L,B,`⋘`,`\\lll`,!0),N(P,L,B,`≶`,`\\lessgtr`,!0),N(P,L,B,`⋚`,`\\lesseqgtr`,!0),N(P,L,B,`⪋`,`\\lesseqqgtr`,!0),N(P,L,B,`≑`,`\\doteqdot`),N(P,L,B,`≓`,`\\risingdotseq`,!0),N(P,L,B,`≒`,`\\fallingdotseq`,!0),N(P,L,B,`∽`,`\\backsim`,!0),N(P,L,B,`⋍`,`\\backsimeq`,!0),N(P,L,B,`⫅`,`\\subseteqq`,!0),N(P,L,B,`⋐`,`\\Subset`,!0),N(P,L,B,`⊏`,`\\sqsubset`,!0),N(P,L,B,`≼`,`\\preccurlyeq`,!0),N(P,L,B,`⋞`,`\\curlyeqprec`,!0),N(P,L,B,`≾`,`\\precsim`,!0),N(P,L,B,`⪷`,`\\precapprox`,!0),N(P,L,B,`⊲`,`\\vartriangleleft`),N(P,L,B,`⊴`,`\\trianglelefteq`),N(P,L,B,`⊨`,`\\vDash`,!0),N(P,L,B,`⊪`,`\\Vvdash`,!0),N(P,L,B,`⌣`,`\\smallsmile`),N(P,L,B,`⌢`,`\\smallfrown`),N(P,L,B,`≏`,`\\bumpeq`,!0),N(P,L,B,`≎`,`\\Bumpeq`,!0),N(P,L,B,`≧`,`\\geqq`,!0),N(P,L,B,`⩾`,`\\geqslant`,!0),N(P,L,B,`⪖`,`\\eqslantgtr`,!0),N(P,L,B,`≳`,`\\gtrsim`,!0),N(P,L,B,`⪆`,`\\gtrapprox`,!0),N(P,L,R,`⋗`,`\\gtrdot`),N(P,L,B,`⋙`,`\\ggg`,!0),N(P,L,B,`≷`,`\\gtrless`,!0),N(P,L,B,`⋛`,`\\gtreqless`,!0),N(P,L,B,`⪌`,`\\gtreqqless`,!0),N(P,L,B,`≖`,`\\eqcirc`,!0),N(P,L,B,`≗`,`\\circeq`,!0),N(P,L,B,`≜`,`\\triangleq`,!0),N(P,L,B,`∼`,`\\thicksim`),N(P,L,B,`≈`,`\\thickapprox`),N(P,L,B,`⫆`,`\\supseteqq`,!0),N(P,L,B,`⋑`,`\\Supset`,!0),N(P,L,B,`⊐`,`\\sqsupset`,!0),N(P,L,B,`≽`,`\\succcurlyeq`,!0),N(P,L,B,`⋟`,`\\curlyeqsucc`,!0),N(P,L,B,`≿`,`\\succsim`,!0),N(P,L,B,`⪸`,`\\succapprox`,!0),N(P,L,B,`⊳`,`\\vartriangleright`),N(P,L,B,`⊵`,`\\trianglerighteq`),N(P,L,B,`⊩`,`\\Vdash`,!0),N(P,L,B,`∣`,`\\shortmid`),N(P,L,B,`∥`,`\\shortparallel`),N(P,L,B,`≬`,`\\between`,!0),N(P,L,B,`⋔`,`\\pitchfork`,!0),N(P,L,B,`∝`,`\\varpropto`),N(P,L,B,`◀`,`\\blacktriangleleft`),N(P,L,B,`∴`,`\\therefore`,!0),N(P,L,B,`∍`,`\\backepsilon`),N(P,L,B,`▶`,`\\blacktriangleright`),N(P,L,B,`∵`,`\\because`,!0),N(P,L,B,`⋘`,`\\llless`),N(P,L,B,`⋙`,`\\gggtr`),N(P,L,R,`⊲`,`\\lhd`),N(P,L,R,`⊳`,`\\rhd`),N(P,L,B,`≂`,`\\eqsim`,!0),N(P,I,B,`⋈`,`\\Join`),N(P,L,B,`≑`,`\\Doteq`,!0),N(P,L,R,`∔`,`\\dotplus`,!0),N(P,L,R,`∖`,`\\smallsetminus`),N(P,L,R,`⋒`,`\\Cap`,!0),N(P,L,R,`⋓`,`\\Cup`,!0),N(P,L,R,`⩞`,`\\doublebarwedge`,!0),N(P,L,R,`⊟`,`\\boxminus`,!0),N(P,L,R,`⊞`,`\\boxplus`,!0),N(P,L,R,`⋇`,`\\divideontimes`,!0),N(P,L,R,`⋉`,`\\ltimes`,!0),N(P,L,R,`⋊`,`\\rtimes`,!0),N(P,L,R,`⋋`,`\\leftthreetimes`,!0),N(P,L,R,`⋌`,`\\rightthreetimes`,!0),N(P,L,R,`⋏`,`\\curlywedge`,!0),N(P,L,R,`⋎`,`\\curlyvee`,!0),N(P,L,R,`⊝`,`\\circleddash`,!0),N(P,L,R,`⊛`,`\\circledast`,!0),N(P,L,R,`⋅`,`\\centerdot`),N(P,L,R,`⊺`,`\\intercal`,!0),N(P,L,R,`⋒`,`\\doublecap`),N(P,L,R,`⋓`,`\\doublecup`),N(P,L,R,`⊠`,`\\boxtimes`,!0),N(P,L,B,`⇢`,`\\dashrightarrow`,!0),N(P,L,B,`⇠`,`\\dashleftarrow`,!0),N(P,L,B,`⇇`,`\\leftleftarrows`,!0),N(P,L,B,`⇆`,`\\leftrightarrows`,!0),N(P,L,B,`⇚`,`\\Lleftarrow`,!0),N(P,L,B,`↞`,`\\twoheadleftarrow`,!0),N(P,L,B,`↢`,`\\leftarrowtail`,!0),N(P,L,B,`↫`,`\\looparrowleft`,!0),N(P,L,B,`⇋`,`\\leftrightharpoons`,!0),N(P,L,B,`↶`,`\\curvearrowleft`,!0),N(P,L,B,`↺`,`\\circlearrowleft`,!0),N(P,L,B,`↰`,`\\Lsh`,!0),N(P,L,B,`⇈`,`\\upuparrows`,!0),N(P,L,B,`↿`,`\\upharpoonleft`,!0),N(P,L,B,`⇃`,`\\downharpoonleft`,!0),N(P,I,B,`⊶`,`\\origof`,!0),N(P,I,B,`⊷`,`\\imageof`,!0),N(P,L,B,`⊸`,`\\multimap`,!0),N(P,L,B,`↭`,`\\leftrightsquigarrow`,!0),N(P,L,B,`⇉`,`\\rightrightarrows`,!0),N(P,L,B,`⇄`,`\\rightleftarrows`,!0),N(P,L,B,`↠`,`\\twoheadrightarrow`,!0),N(P,L,B,`↣`,`\\rightarrowtail`,!0),N(P,L,B,`↬`,`\\looparrowright`,!0),N(P,L,B,`↷`,`\\curvearrowright`,!0),N(P,L,B,`↻`,`\\circlearrowright`,!0),N(P,L,B,`↱`,`\\Rsh`,!0),N(P,L,B,`⇊`,`\\downdownarrows`,!0),N(P,L,B,`↾`,`\\upharpoonright`,!0),N(P,L,B,`⇂`,`\\downharpoonright`,!0),N(P,L,B,`⇝`,`\\rightsquigarrow`,!0),N(P,L,B,`⇝`,`\\leadsto`),N(P,L,B,`⇛`,`\\Rrightarrow`,!0),N(P,L,B,`↾`,`\\restriction`),N(P,I,V,`‘`,"`"),N(P,I,V,`$`,`\\$`),N(F,I,V,`$`,`\\$`),N(F,I,V,`$`,`\\textdollar`),N(P,I,V,`%`,`\\%`),N(F,I,V,`%`,`\\%`),N(P,I,V,`_`,`\\_`),N(F,I,V,`_`,`\\_`),N(F,I,V,`_`,`\\textunderscore`),N(P,I,V,`∠`,`\\angle`,!0),N(P,I,V,`∞`,`\\infty`,!0),N(P,I,V,`′`,`\\prime`),N(P,I,V,`△`,`\\triangle`),N(P,I,V,`Γ`,`\\Gamma`,!0),N(P,I,V,`Δ`,`\\Delta`,!0),N(P,I,V,`Θ`,`\\Theta`,!0),N(P,I,V,`Λ`,`\\Lambda`,!0),N(P,I,V,`Ξ`,`\\Xi`,!0),N(P,I,V,`Π`,`\\Pi`,!0),N(P,I,V,`Σ`,`\\Sigma`,!0),N(P,I,V,`Υ`,`\\Upsilon`,!0),N(P,I,V,`Φ`,`\\Phi`,!0),N(P,I,V,`Ψ`,`\\Psi`,!0),N(P,I,V,`Ω`,`\\Omega`,!0),N(P,I,V,`A`,`Α`),N(P,I,V,`B`,`Β`),N(P,I,V,`E`,`Ε`),N(P,I,V,`Z`,`Ζ`),N(P,I,V,`H`,`Η`),N(P,I,V,`I`,`Ι`),N(P,I,V,`K`,`Κ`),N(P,I,V,`M`,`Μ`),N(P,I,V,`N`,`Ν`),N(P,I,V,`O`,`Ο`),N(P,I,V,`P`,`Ρ`),N(P,I,V,`T`,`Τ`),N(P,I,V,`X`,`Χ`),N(P,I,V,`¬`,`\\neg`,!0),N(P,I,V,`¬`,`\\lnot`),N(P,I,V,`⊤`,`\\top`),N(P,I,V,`⊥`,`\\bot`),N(P,I,V,`∅`,`\\emptyset`),N(P,L,V,`∅`,`\\varnothing`),N(P,I,z,`α`,`\\alpha`,!0),N(P,I,z,`β`,`\\beta`,!0),N(P,I,z,`γ`,`\\gamma`,!0),N(P,I,z,`δ`,`\\delta`,!0),N(P,I,z,`ϵ`,`\\epsilon`,!0),N(P,I,z,`ζ`,`\\zeta`,!0),N(P,I,z,`η`,`\\eta`,!0),N(P,I,z,`θ`,`\\theta`,!0),N(P,I,z,`ι`,`\\iota`,!0),N(P,I,z,`κ`,`\\kappa`,!0),N(P,I,z,`λ`,`\\lambda`,!0),N(P,I,z,`μ`,`\\mu`,!0),N(P,I,z,`ν`,`\\nu`,!0),N(P,I,z,`ξ`,`\\xi`,!0),N(P,I,z,`ο`,`\\omicron`,!0),N(P,I,z,`π`,`\\pi`,!0),N(P,I,z,`ρ`,`\\rho`,!0),N(P,I,z,`σ`,`\\sigma`,!0),N(P,I,z,`τ`,`\\tau`,!0),N(P,I,z,`υ`,`\\upsilon`,!0),N(P,I,z,`ϕ`,`\\phi`,!0),N(P,I,z,`χ`,`\\chi`,!0),N(P,I,z,`ψ`,`\\psi`,!0),N(P,I,z,`ω`,`\\omega`,!0),N(P,I,z,`ε`,`\\varepsilon`,!0),N(P,I,z,`ϑ`,`\\vartheta`,!0),N(P,I,z,`ϖ`,`\\varpi`,!0),N(P,I,z,`ϱ`,`\\varrho`,!0),N(P,I,z,`ς`,`\\varsigma`,!0),N(P,I,z,`φ`,`\\varphi`,!0),N(P,I,R,`∗`,`*`,!0),N(P,I,R,`+`,`+`),N(P,I,R,`−`,`-`,!0),N(P,I,R,`⋅`,`\\cdot`,!0),N(P,I,R,`∘`,`\\circ`,!0),N(P,I,R,`÷`,`\\div`,!0),N(P,I,R,`±`,`\\pm`,!0),N(P,I,R,`×`,`\\times`,!0),N(P,I,R,`∩`,`\\cap`,!0),N(P,I,R,`∪`,`\\cup`,!0),N(P,I,R,`∖`,`\\setminus`,!0),N(P,I,R,`∧`,`\\land`),N(P,I,R,`∨`,`\\lor`),N(P,I,R,`∧`,`\\wedge`,!0),N(P,I,R,`∨`,`\\vee`,!0),N(P,I,V,`√`,`\\surd`),N(P,I,xx,`⟨`,`\\langle`,!0),N(P,I,xx,`∣`,`\\lvert`),N(P,I,xx,`∥`,`\\lVert`),N(P,I,vx,`?`,`?`),N(P,I,vx,`!`,`!`),N(P,I,vx,`⟩`,`\\rangle`,!0),N(P,I,vx,`∣`,`\\rvert`),N(P,I,vx,`∥`,`\\rVert`),N(P,I,B,`=`,`=`),N(P,I,B,`:`,`:`),N(P,I,B,`≈`,`\\approx`,!0),N(P,I,B,`≅`,`\\cong`,!0),N(P,I,B,`≥`,`\\ge`),N(P,I,B,`≥`,`\\geq`,!0),N(P,I,B,`←`,`\\gets`),N(P,I,B,`>`,`\\gt`,!0),N(P,I,B,`∈`,`\\in`,!0),N(P,I,B,``,`\\@not`),N(P,I,B,`⊂`,`\\subset`,!0),N(P,I,B,`⊃`,`\\supset`,!0),N(P,I,B,`⊆`,`\\subseteq`,!0),N(P,I,B,`⊇`,`\\supseteq`,!0),N(P,L,B,`⊈`,`\\nsubseteq`,!0),N(P,L,B,`⊉`,`\\nsupseteq`,!0),N(P,I,B,`⊨`,`\\models`),N(P,I,B,`←`,`\\leftarrow`,!0),N(P,I,B,`≤`,`\\le`),N(P,I,B,`≤`,`\\leq`,!0),N(P,I,B,`<`,`\\lt`,!0),N(P,I,B,`→`,`\\rightarrow`,!0),N(P,I,B,`→`,`\\to`),N(P,L,B,`≱`,`\\ngeq`,!0),N(P,L,B,`≰`,`\\nleq`,!0),N(P,I,Cx,`\xA0`,`\\ `),N(P,I,Cx,`\xA0`,`\\space`),N(P,I,Cx,`\xA0`,`\\nobreakspace`),N(F,I,Cx,`\xA0`,`\\ `),N(F,I,Cx,`\xA0`,` `),N(F,I,Cx,`\xA0`,`\\space`),N(F,I,Cx,`\xA0`,`\\nobreakspace`),N(P,I,Cx,``,`\\nobreak`),N(P,I,Cx,``,`\\allowbreak`),N(P,I,Sx,`,`,`,`),N(P,I,Sx,`;`,`;`),N(P,L,R,`⊼`,`\\barwedge`,!0),N(P,L,R,`⊻`,`\\veebar`,!0),N(P,I,R,`⊙`,`\\odot`,!0),N(P,I,R,`⊕`,`\\oplus`,!0),N(P,I,R,`⊗`,`\\otimes`,!0),N(P,I,V,`∂`,`\\partial`,!0),N(P,I,R,`⊘`,`\\oslash`,!0),N(P,L,R,`⊚`,`\\circledcirc`,!0),N(P,L,R,`⊡`,`\\boxdot`,!0),N(P,I,R,`△`,`\\bigtriangleup`),N(P,I,R,`▽`,`\\bigtriangledown`),N(P,I,R,`†`,`\\dagger`),N(P,I,R,`⋄`,`\\diamond`),N(P,I,R,`⋆`,`\\star`),N(P,I,R,`◃`,`\\triangleleft`),N(P,I,R,`▹`,`\\triangleright`),N(P,I,xx,`{`,`\\{`),N(F,I,V,`{`,`\\{`),N(F,I,V,`{`,`\\textbraceleft`),N(P,I,vx,`}`,`\\}`),N(F,I,V,`}`,`\\}`),N(F,I,V,`}`,`\\textbraceright`),N(P,I,xx,`{`,`\\lbrace`),N(P,I,vx,`}`,`\\rbrace`),N(P,I,xx,`[`,`\\lbrack`,!0),N(F,I,V,`[`,`\\lbrack`,!0),N(P,I,vx,`]`,`\\rbrack`,!0),N(F,I,V,`]`,`\\rbrack`,!0),N(P,I,xx,`(`,`\\lparen`,!0),N(P,I,vx,`)`,`\\rparen`,!0),N(F,I,V,`<`,`\\textless`,!0),N(F,I,V,`>`,`\\textgreater`,!0),N(P,I,xx,`⌊`,`\\lfloor`,!0),N(P,I,vx,`⌋`,`\\rfloor`,!0),N(P,I,xx,`⌈`,`\\lceil`,!0),N(P,I,vx,`⌉`,`\\rceil`,!0),N(P,I,V,`\\`,`\\backslash`),N(P,I,V,`∣`,`|`),N(P,I,V,`∣`,`\\vert`),N(F,I,V,`|`,`\\textbar`,!0),N(P,I,V,`∥`,`\\|`),N(P,I,V,`∥`,`\\Vert`),N(F,I,V,`∥`,`\\textbardbl`),N(F,I,V,`~`,`\\textasciitilde`),N(F,I,V,`\\`,`\\textbackslash`),N(F,I,V,`^`,`\\textasciicircum`),N(P,I,B,`↑`,`\\uparrow`,!0),N(P,I,B,`⇑`,`\\Uparrow`,!0),N(P,I,B,`↓`,`\\downarrow`,!0),N(P,I,B,`⇓`,`\\Downarrow`,!0),N(P,I,B,`↕`,`\\updownarrow`,!0),N(P,I,B,`⇕`,`\\Updownarrow`,!0),N(P,I,bx,`∐`,`\\coprod`),N(P,I,bx,`⋁`,`\\bigvee`),N(P,I,bx,`⋀`,`\\bigwedge`),N(P,I,bx,`⨄`,`\\biguplus`),N(P,I,bx,`⋂`,`\\bigcap`),N(P,I,bx,`⋃`,`\\bigcup`),N(P,I,bx,`∫`,`\\int`),N(P,I,bx,`∫`,`\\intop`),N(P,I,bx,`∬`,`\\iint`),N(P,I,bx,`∭`,`\\iiint`),N(P,I,bx,`∏`,`\\prod`),N(P,I,bx,`∑`,`\\sum`),N(P,I,bx,`⨂`,`\\bigotimes`),N(P,I,bx,`⨁`,`\\bigoplus`),N(P,I,bx,`⨀`,`\\bigodot`),N(P,I,bx,`∮`,`\\oint`),N(P,I,bx,`∯`,`\\oiint`),N(P,I,bx,`∰`,`\\oiiint`),N(P,I,bx,`⨆`,`\\bigsqcup`),N(P,I,bx,`∫`,`\\smallint`),N(F,I,yx,`…`,`\\textellipsis`),N(P,I,yx,`…`,`\\mathellipsis`),N(F,I,yx,`…`,`\\ldots`,!0),N(P,I,yx,`…`,`\\ldots`,!0),N(P,I,yx,`⋯`,`\\@cdots`,!0),N(P,I,yx,`⋱`,`\\ddots`,!0),N(P,I,V,`⋮`,`\\varvdots`),N(F,I,V,`⋮`,`\\varvdots`),N(P,I,_x,`ˊ`,`\\acute`),N(P,I,_x,`ˋ`,`\\grave`),N(P,I,_x,`¨`,`\\ddot`),N(P,I,_x,`~`,`\\tilde`),N(P,I,_x,`ˉ`,`\\bar`),N(P,I,_x,`˘`,`\\breve`),N(P,I,_x,`ˇ`,`\\check`),N(P,I,_x,`^`,`\\hat`),N(P,I,_x,`⃗`,`\\vec`),N(P,I,_x,`˙`,`\\dot`),N(P,I,_x,`˚`,`\\mathring`),N(P,I,z,``,`\\@imath`),N(P,I,z,``,`\\@jmath`),N(P,I,V,`ı`,`ı`),N(P,I,V,`ȷ`,`ȷ`),N(F,I,V,`ı`,`\\i`,!0),N(F,I,V,`ȷ`,`\\j`,!0),N(F,I,V,`ß`,`\\ss`,!0),N(F,I,V,`æ`,`\\ae`,!0),N(F,I,V,`œ`,`\\oe`,!0),N(F,I,V,`ø`,`\\o`,!0),N(F,I,V,`Æ`,`\\AE`,!0),N(F,I,V,`Œ`,`\\OE`,!0),N(F,I,V,`Ø`,`\\O`,!0),N(F,I,_x,`ˊ`,`\\'`),N(F,I,_x,`ˋ`,"\\`"),N(F,I,_x,`ˆ`,`\\^`),N(F,I,_x,`˜`,`\\~`),N(F,I,_x,`ˉ`,`\\=`),N(F,I,_x,`˘`,`\\u`),N(F,I,_x,`˙`,`\\.`),N(F,I,_x,`¸`,`\\c`),N(F,I,_x,`˚`,`\\r`),N(F,I,_x,`ˇ`,`\\v`),N(F,I,_x,`¨`,`\\"`),N(F,I,_x,`˝`,`\\H`),N(F,I,_x,`◯`,`\\textcircled`);var wx={"--":!0,"---":!0,"``":!0,"''":!0};N(F,I,V,`–`,`--`,!0),N(F,I,V,`–`,`\\textendash`),N(F,I,V,`—`,`---`,!0),N(F,I,V,`—`,`\\textemdash`),N(F,I,V,`‘`,"`",!0),N(F,I,V,`‘`,`\\textquoteleft`),N(F,I,V,`’`,`'`,!0),N(F,I,V,`’`,`\\textquoteright`),N(F,I,V,`“`,"``",!0),N(F,I,V,`“`,`\\textquotedblleft`),N(F,I,V,`”`,`''`,!0),N(F,I,V,`”`,`\\textquotedblright`),N(P,I,V,`°`,`\\degree`,!0),N(F,I,V,`°`,`\\degree`),N(F,I,V,`°`,`\\textdegree`,!0),N(P,I,V,`£`,`\\pounds`),N(P,I,V,`£`,`\\mathsterling`,!0),N(F,I,V,`£`,`\\pounds`),N(F,I,V,`£`,`\\textsterling`,!0),N(P,L,V,`✠`,`\\maltese`),N(F,L,V,`✠`,`\\maltese`);for(var Tx=`0123456789/@."`,Ex=0;Ex<Tx.length;Ex++){var Dx=Tx.charAt(Ex);N(P,I,V,Dx,Dx)}for(var Ox=`0123456789!@*()-=+";:?/.,`,kx=0;kx<Ox.length;kx++){var Ax=Ox.charAt(kx);N(F,I,V,Ax,Ax)}for(var jx=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,Mx=0;Mx<jx.length;Mx++){var Nx=jx.charAt(Mx);N(P,I,z,Nx,Nx),N(F,I,V,Nx,Nx)}N(P,L,V,`C`,`ℂ`),N(F,L,V,`C`,`ℂ`),N(P,L,V,`H`,`ℍ`),N(F,L,V,`H`,`ℍ`),N(P,L,V,`N`,`ℕ`),N(F,L,V,`N`,`ℕ`),N(P,L,V,`P`,`ℙ`),N(F,L,V,`P`,`ℙ`),N(P,L,V,`Q`,`ℚ`),N(F,L,V,`Q`,`ℚ`),N(P,L,V,`R`,`ℝ`),N(F,L,V,`R`,`ℝ`),N(P,L,V,`Z`,`ℤ`),N(F,L,V,`Z`,`ℤ`),N(P,I,z,`h`,`ℎ`),N(F,I,z,`h`,`ℎ`);for(var Px,Fx=0;Fx<jx.length;Fx++){var Ix=jx.charAt(Fx);Px=String.fromCharCode(55349,56320+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Px=String.fromCharCode(55349,56372+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Px=String.fromCharCode(55349,56424+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Px=String.fromCharCode(55349,56580+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Px=String.fromCharCode(55349,56684+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Px=String.fromCharCode(55349,56736+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Px=String.fromCharCode(55349,56788+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Px=String.fromCharCode(55349,56840+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Px=String.fromCharCode(55349,56944+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Fx<26&&(Px=String.fromCharCode(55349,56632+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px),Px=String.fromCharCode(55349,56476+Fx),N(P,I,z,Ix,Px),N(F,I,V,Ix,Px))}Px=String.fromCharCode(55349,56668),N(P,I,z,`k`,Px),N(F,I,V,`k`,Px);for(var Lx=0;Lx<10;Lx++){var Rx=Lx.toString();Px=String.fromCharCode(55349,57294+Lx),N(P,I,z,Rx,Px),N(F,I,V,Rx,Px),Px=String.fromCharCode(55349,57314+Lx),N(P,I,z,Rx,Px),N(F,I,V,Rx,Px),Px=String.fromCharCode(55349,57324+Lx),N(P,I,z,Rx,Px),N(F,I,V,Rx,Px),Px=String.fromCharCode(55349,57334+Lx),N(P,I,z,Rx,Px),N(F,I,V,Rx,Px)}for(var zx=`ÐÞþ`,Bx=0;Bx<zx.length;Bx++){var Vx=zx.charAt(Bx);N(P,I,z,Vx,Vx),N(F,I,V,Vx,Vx)}var Hx={mathClass:`mathbf`,textClass:`textbf`,font:`Main-Bold`},Ux={mathClass:`mathnormal`,textClass:`textit`,font:`Math-Italic`},Wx={mathClass:`boldsymbol`,textClass:`boldsymbol`,font:`Main-BoldItalic`},Gx={mathClass:`mathscr`,textClass:`textscr`,font:`Script-Regular`},Kx={mathClass:``,textClass:``,font:``},qx={mathClass:`mathfrak`,textClass:`textfrak`,font:`Fraktur-Regular`},Jx={mathClass:`mathbb`,textClass:`textbb`,font:`AMS-Regular`},Yx={mathClass:`mathboldfrak`,textClass:`textboldfrak`,font:`Fraktur-Regular`},Xx={mathClass:`mathsf`,textClass:`textsf`,font:`SansSerif-Regular`},Zx={mathClass:`mathboldsf`,textClass:`textboldsf`,font:`SansSerif-Bold`},Qx={mathClass:`mathitsf`,textClass:`textitsf`,font:`SansSerif-Italic`},$x={mathClass:`mathtt`,textClass:`texttt`,font:`Typewriter-Regular`},eS=[Hx,Hx,Ux,Ux,Wx,Wx,Gx,Kx,Kx,Kx,qx,qx,Jx,Jx,Yx,Yx,Xx,Xx,Zx,Zx,Qx,Qx,Kx,Kx,$x,$x],tS=[Hx,Kx,Xx,Zx,$x],nS=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484)return eS[Math.floor((r-119808)/26)];if(120782<=r&&r<=120831)return tS[Math.floor((r-120782)/10)];if(r===120485||r===120486)return eS[0];if(120486<r&&r<120782)return Kx;throw new j(`Unsupported character: `+e)},rS=function(e,t,n){if(gx[n][e]){var r=gx[n][e].replace;r&&(e=r)}return{value:e,metrics:px(e,t,n)}},iS=function(e,t,n,r,i){var a=rS(e,t,n),o=a.metrics;e=a.value;var s;if(o){var c=o.italic;(n===`text`||r&&r.font===`mathit`)&&(c=0),s=new nx(e,o.height,o.depth,c,o.skew,o.width,i)}else typeof console<`u`&&console.warn(`No character metrics `+(`for '`+e+`' in style '`+t+`' and mode '`+n+`'`)),s=new nx(e,0,0,0,0,0,i);if(r){s.maxFontSize=r.sizeMultiplier,r.style.isTight()&&s.classes.push(`mtight`);var l=r.getColor();l&&(s.style.color=l)}return s},aS=function(e,t,n,r){return r===void 0&&(r=[]),n.font===`boldsymbol`&&rS(e,`Main-Bold`,t).metrics?iS(e,`Main-Bold`,t,n,r.concat([`mathbf`])):e===`\\`||gx[t][e].font===`main`?iS(e,`Main-Regular`,t,n,r):iS(e,`AMS-Regular`,t,n,r.concat([`amsrm`]))},oS=function(e,t,n){return n!==`textord`&&rS(e,`Math-BoldItalic`,t).metrics?{fontName:`Math-BoldItalic`,fontClass:`boldsymbol`}:{fontName:`Main-Bold`,fontClass:`mathbf`}},sS=function(e,t,n){var r=e.mode,i=e.text,a=[`mord`],{font:o,fontFamily:s,fontWeight:c,fontShape:l}=t,u=r===`math`||r===`text`&&!!o,d=u?o:s,f=``,p=``;if(i.charCodeAt(0)===55349){var m=nS(i);f=m.font,p=m[r+`Class`]}if(f)return iS(i,f,r,t,a.concat(p));if(d){var h,g;if(d===`boldsymbol`){var _=oS(i,r,n);h=_.fontName,g=[_.fontClass]}else u?(h=bS[o].fontName,g=[o]):(h=yS(s,c,l),g=[s,c,l]);if(rS(i,h,r).metrics)return iS(i,h,r,t,a.concat(g));if(wx.hasOwnProperty(i)&&h.slice(0,10)===`Typewriter`){for(var v=[],y=0;y<i.length;y++)v.push(iS(i[y],h,r,t,a.concat(g)));return mS(v)}}if(n===`mathord`)return iS(i,`Math-Italic`,r,t,a.concat([`mathnormal`]));if(n===`textord`){var b=gx[r][i]&&gx[r][i].font;if(b===`ams`)return iS(i,yS(`amsrm`,c,l),r,t,a.concat(`amsrm`,c,l));if(b===`main`||!b)return iS(i,yS(`textrm`,c,l),r,t,a.concat(c,l));var ee=yS(b,c,l);return iS(i,ee,r,t,a.concat(ee,c,l))}throw Error(`unexpected type: `+n+` in makeOrd`)},cS=(e,t)=>{if(Kb(e.classes)!==Kb(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},lS=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof nx&&r instanceof nx&&cS(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},uS=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var a=e.children[i];a.height>t&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},H=function(e,t,n,r){var i=new Qb(e,t,n,r);return uS(i),i},dS=(e,t,n,r)=>new Qb(e,t,n,r),fS=function(e,t,n){var r=H([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=M(r.height),r.maxFontSize=1,r},pS=function(e,t,n,r){var i=new $b(e,t,n,r);return uS(i),i},mS=function(e){var t=new Vb(e);return uS(t),t},hS=function(e,t){return e instanceof Vb?H([],[e],t):e},gS=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a<t.length;a++){var o=-t[a].shift-i-t[a].elem.depth,s=o-(t[a-1].elem.height+t[a-1].elem.depth);i+=o,n.push({type:`kern`,size:s}),n.push(t[a])}return{children:n,depth:r}}var c;if(e.positionType===`top`){for(var l=e.positionData,u=0;u<e.children.length;u++){var d=e.children[u];l-=d.type===`kern`?d.size:d.elem.height+d.elem.depth}c=l}else if(e.positionType===`bottom`)c=-e.positionData;else{var f=e.children[0];if(f.type!==`elem`)throw Error(`First child must have type "elem".`);if(e.positionType===`shift`)c=-f.elem.depth-e.positionData;else if(e.positionType===`firstBaseline`)c=-f.elem.depth;else throw Error(`Invalid positionType `+e.positionType+`.`)}return{children:e.children,depth:c}},_S=function(e,t){for(var{children:n,depth:r}=gS(e),i=0,a=0;a<n.length;a++){var o=n[a];if(o.type===`elem`){var s=o.elem;i=Math.max(i,s.maxFontSize,s.height)}}i+=2;var c=H([`pstrut`],[]);c.style.height=M(i);for(var l=[],u=r,d=r,f=r,p=0;p<n.length;p++){var m=n[p];if(m.type===`kern`)f+=m.size;else{var h=m.elem,g=m.wrapperClasses||[],_=m.wrapperStyle||{},v=H(g,[c,h],void 0,_);v.style.top=M(-i-f-h.depth),m.marginLeft&&(v.style.marginLeft=m.marginLeft),m.marginRight&&(v.style.marginRight=m.marginRight),l.push(v),f+=h.height+h.depth}u=Math.min(u,f),d=Math.max(d,f)}var y=H([`vlist`],l);y.style.height=M(d);var b;if(u<0){var ee=H([`vlist`],[H([],[])]);ee.style.height=M(-u),b=[H([`vlist-r`],[y,H([`vlist-s`],[new nx(``)])]),H([`vlist-r`],[ee])]}else b=[H([`vlist-r`],[y])];var x=H([`vlist-t`],b);return b.length===2&&x.classes.push(`vlist-t2`),x.height=d,x.depth=-u,x},vS=(e,t)=>{var n=H([`mspace`],[],t),r=Gb(e,t);return n.style.marginRight=M(r),n},yS=(e,t,n)=>{var r,i;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}return i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:n===`textit`?`Italic`:`Regular`,r+`-`+i},bS={mathbf:{variant:`bold`,fontName:`Main-Bold`},mathrm:{variant:`normal`,fontName:`Main-Regular`},textit:{variant:`italic`,fontName:`Main-Italic`},mathit:{variant:`italic`,fontName:`Main-Italic`},mathnormal:{variant:`italic`,fontName:`Math-Italic`},mathsfit:{variant:`sans-serif-italic`,fontName:`SansSerif-Italic`},mathbb:{variant:`double-struck`,fontName:`AMS-Regular`},mathcal:{variant:`script`,fontName:`Caligraphic-Regular`},mathfrak:{variant:`fraktur`,fontName:`Fraktur-Regular`},mathscr:{variant:`script`,fontName:`Script-Regular`},mathsf:{variant:`sans-serif`,fontName:`SansSerif-Regular`},mathtt:{variant:`monospace`,fontName:`Typewriter-Regular`}},xS={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},SS=function(e,t){var[n,r,i]=xS[e],a=dS([`overlay`],[new rx([new ix(n)],{width:M(r),height:M(i),style:`width:`+M(r),viewBox:`0 0 `+1e3*r+` `+1e3*i,preserveAspectRatio:`xMinYMin`})],t);return a.height=i,a.style.height=M(i),a.style.width=M(r),a},CS={number:3,unit:`mu`},wS={number:4,unit:`mu`},TS={number:5,unit:`mu`},ES={mord:{mop:CS,mbin:wS,mrel:TS,minner:CS},mop:{mord:CS,mop:CS,mrel:TS,minner:CS},mbin:{mord:wS,mop:wS,mopen:wS,minner:wS},mrel:{mord:TS,mop:TS,mopen:TS,minner:TS},mopen:{},mclose:{mop:CS,mbin:wS,mrel:TS,minner:CS},mpunct:{mord:CS,mop:CS,mrel:TS,mopen:CS,mclose:CS,mpunct:CS,minner:CS},minner:{mord:CS,mop:CS,mbin:wS,mrel:TS,mopen:CS,mpunct:CS,minner:CS}},DS={mord:{mop:CS},mop:{mord:CS,mop:CS},mbin:{},mrel:{},mopen:{},mclose:{mop:CS},mpunct:{},minner:{mop:CS}},OS={},kS={},AS={};function U(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},c=0;c<n.length;++c)OS[n[c]]=s;t&&(a&&(kS[t]=a),o&&(AS[t]=o))}function jS(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;U({type:t,names:[],props:{numArgs:0},handler(){throw Error(`Should never be called.`)},htmlBuilder:n,mathmlBuilder:r})}var MS=function(e){return e.type===`ordgroup`&&e.body.length===1?e.body[0]:e},NS=function(e){return e.type===`ordgroup`?e.body:[e]},PS=new Set([`leftmost`,`mbin`,`mopen`,`mrel`,`mop`,`mpunct`]),FS=new Set([`rightmost`,`mrel`,`mclose`,`mpunct`]),IS={display:Sb.DISPLAY,text:Sb.TEXT,script:Sb.SCRIPT,scriptscript:Sb.SCRIPTSCRIPT},LS={mord:`mord`,mop:`mop`,mbin:`mbin`,mrel:`mrel`,mopen:`mopen`,mclose:`mclose`,mpunct:`mpunct`,minner:`minner`},RS=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var i=[],a=0;a<e.length;a++){var o=WS(e[a],t);if(o instanceof Vb){var s=o.children;i.push(...s)}else i.push(o)}if(lS(i),!n)return i;var c=t;if(e.length===1){var l=e[0];l.type===`sizing`?c=t.havingSize(l.size):l.type===`styling`&&(c=t.havingStyle(IS[l.style]))}var u=H([r[0]||`leftmost`],[],t),d=H([r[1]||`rightmost`],[],t),f=n===`root`;return zS(i,(e,t)=>{var n=t.classes[0],r=e.classes[0];n===`mbin`&&FS.has(r)?t.classes[0]=`mord`:r===`mbin`&&PS.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),zS(i,(e,t)=>{var n=HS(t),r=HS(e),i=n&&r?e.hasClass(`mtight`)?DS[n]?.[r]:ES[n]?.[r]:null;if(i)return vS(i,c)},{node:u},d,f),i},zS=function(e,t,n,r,i){r&&e.push(r);for(var a=0;a<e.length;a++){var o=e[a],s=BS(o);if(s){zS(s.children,t,n,null,i);continue}var c=!o.hasClass(`mspace`);if(c){var l=t(o,n.node);l&&(n.insertAfter?n.insertAfter(l):(e.unshift(l),a++))}c?n.node=o:i&&o.hasClass(`newline`)&&(n.node=H([`leftmost`])),n.insertAfter=(t=>n=>{e.splice(t+1,0,n),a++})(a)}r&&e.pop()},BS=function(e){return e instanceof Vb||e instanceof $b||e instanceof Qb&&e.hasClass(`enclosing`)?e:null},VS=function(e,t){var n=BS(e);if(n){var r=n.children;if(r.length){if(t===`right`)return VS(r[r.length-1],`right`);if(t===`left`)return VS(r[0],`left`)}}return e},HS=function(e,t){return e?(t&&(e=VS(e,t)),LS[e.classes[0]]||null):null},US=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return H(t.concat(n))},WS=function(e,t,n){if(!e)return H();if(kS[e.type]){var r=kS[e.type](e,t);if(n&&t.size!==n.size){r=H(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}throw new j(`Got group of unknown type: '`+e.type+`'`)};function GS(e,t){var n=H([`base`],e,t),r=H([`strut`]);return r.style.height=M(n.height+n.depth),n.depth&&(r.style.verticalAlign=M(-n.depth)),n.children.unshift(r),n}function KS(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=RS(e,t,`root`),i;r.length===2&&r[1].hasClass(`tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s<r.length;s++)if(o.push(r[s]),r[s].hasClass(`mbin`)||r[s].hasClass(`mrel`)||r[s].hasClass(`allowbreak`)){for(var c=!1;s<r.length-1&&r[s+1].hasClass(`mspace`)&&!r[s+1].hasClass(`newline`);)s++,o.push(r[s]),r[s].hasClass(`nobreak`)&&(c=!0);c||(a.push(GS(o,t)),o=[])}else r[s].hasClass(`newline`)&&(o.pop(),o.length>0&&(a.push(GS(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(GS(o,t));var l;n?(l=GS(RS(n,t,!0),t),l.classes=[`tag`],a.push(l)):i&&a.push(i);var u=H([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=M(u.height+u.depth),u.depth&&(d.style.verticalAlign=M(-u.depth))}return u}function qS(e){return new Vb(e)}var W=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Kb(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof JS&&this.children[n+1]instanceof JS){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof JS;)r+=this.children[++n].toText();e.appendChild(new JS(r).toNode())}else e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<`+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=` `+t+`="`,e+=Xy(this.attributes[t]),e+=`"`);this.classes.length>0&&(e+=` class ="`+Xy(Kb(this.classes))+`"`),e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</`+this.type+`>`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},JS=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Xy(this.toText())}toText(){return this.text}},YS=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?` `:e>=.1666&&e<=.1667?` `:e>=.2222&&e<=.2223?` `:e>=.2777&&e<=.2778?` `:e>=-.05556&&e<=-.05555?` `:e>=-.1667&&e<=-.1666?` `:e>=-.2223&&e<=-.2222?` `:e>=-.2778&&e<=-.2777?` `:null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,M(this.width)),e}toMarkup(){return this.character?`<mtext>`+this.character+`</mtext>`:`<mspace width="`+M(this.width)+`"/>`}toText(){return this.character?this.character:` `}},XS=new Set([`\\imath`,`\\jmath`]),ZS=new Set([`mrow`,`mtable`]),QS=function(e,t,n){return gx[t][e]&&gx[t][e].replace&&e.charCodeAt(0)!==55349&&!(wx.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)===`tt`||n.font&&n.font.slice(4,6)===`tt`))&&(e=gx[t][e].replace),new JS(e)},$S=function(e){return e.length===1?e[0]:new W(`mrow`,e)},eC={mathit:`italic`,boldsymbol:e=>e.type===`textord`?`bold`:`bold-italic`,mathbf:`bold`,mathbb:`double-struck`,mathsfit:`sans-serif-italic`,mathfrak:`fraktur`,mathscr:`script`,mathcal:`script`,mathsf:`sans-serif`,mathtt:`monospace`},tC=(e,t)=>{if(e.mode===`text`){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`}var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode,i=eC[n];if(i)return typeof i==`function`?i(e):i;var a=e.text;if(XS.has(a))return null;if(gx[r][a]){var o=gx[r][a].replace;o&&(a=o)}var s=bS[n].fontName;return px(a,s,r)?bS[n].variant:null};function nC(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof JS&&t.text===`.`}if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof JS&&n.text===`,`}return!1}var rC=function(e,t,n){if(e.length===1){var r=aC(e[0],t);return n&&r instanceof W&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o<e.length;o++){var s=aC(e[o],t);if(s instanceof W&&a instanceof W){if(s.type===`mtext`&&a.type===`mtext`&&s.getAttribute(`mathvariant`)===a.getAttribute(`mathvariant`)){a.children.push(...s.children);continue}if(s.type===`mn`&&a.type===`mn`){a.children.push(...s.children);continue}if(nC(s)&&a.type===`mn`){a.children.push(...s.children);continue}if(s.type===`mn`&&nC(a))s.children=[...a.children,...s.children],i.pop();else if((s.type===`msup`||s.type===`msub`)&&s.children.length>=1&&(a.type===`mn`||nC(a))){var c=s.children[0];c instanceof W&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof JS&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof JS&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},iC=function(e,t,n){return $S(rC(e,t,n))},aC=function(e,t){if(!e)return new W(`mrow`);if(AS[e.type])return AS[e.type](e,t);throw new j(`Got group of unknown type: '`+e.type+`'`)};function oC(e,t,n,r,i){var a=rC(e,n),o=a.length===1&&a[0]instanceof W&&ZS.has(a[0].type)?a[0]:new W(`mrow`,a),s=new W(`annotation`,[new JS(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new W(`math`,[new W(`semantics`,[o,s])]);return c.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&c.setAttribute(`display`,`block`),H([i?`katex`:`katex-mathml`],[c])}var sC=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],cC=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],lC=function(e,t){return t.size<2?e:sC[e-1][t.size-1]},uC=class e{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=cC[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:lC(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:cC[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=lC(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=hx(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};uC.BASESIZE=6;var dC=function(e){return new uC({style:e.displayMode?Sb.DISPLAY:Sb.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},fC=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=H(n,[e])}return e},pC=function(e,t,n){var r=dC(n),i;return n.output===`mathml`?oC(e,t,r,n.displayMode,!0):(i=n.output===`html`?H([`katex`],[KS(e,r)]):H([`katex`],[oC(e,t,r,n.displayMode,!1),KS(e,r)]),fC(i,n))},mC=function(e,t,n){return fC(H([`katex`],[KS(e,dC(n))]),n)},hC={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,underbracket:`⎵`,overbracket:`⎴`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},gC=function(e){var t=new W(`mo`,[new JS(hC[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},_C={overrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],overleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],underrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],underleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],xrightarrow:[[`rightarrow`],1.469,522,`xMaxYMin`],"\\cdrightarrow":[[`rightarrow`],3,522,`xMaxYMin`],xleftarrow:[[`leftarrow`],1.469,522,`xMinYMin`],"\\cdleftarrow":[[`leftarrow`],3,522,`xMinYMin`],Overrightarrow:[[`doublerightarrow`],.888,560,`xMaxYMin`],xRightarrow:[[`doublerightarrow`],1.526,560,`xMaxYMin`],xLeftarrow:[[`doubleleftarrow`],1.526,560,`xMinYMin`],overleftharpoon:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoonup:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoondown:[[`leftharpoondown`],.888,522,`xMinYMin`],overrightharpoon:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoonup:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoondown:[[`rightharpoondown`],.888,522,`xMaxYMin`],xlongequal:[[`longequal`],.888,334,`xMinYMin`],"\\cdlongequal":[[`longequal`],3,334,`xMinYMin`],xtwoheadleftarrow:[[`twoheadleftarrow`],.888,334,`xMinYMin`],xtwoheadrightarrow:[[`twoheadrightarrow`],.888,334,`xMaxYMin`],overleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],overbrace:[[`leftbrace`,`midbrace`,`rightbrace`],1.6,548],underbrace:[[`leftbraceunder`,`midbraceunder`,`rightbraceunder`],1.6,548],underleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],xleftrightarrow:[[`leftarrow`,`rightarrow`],1.75,522],xLeftrightarrow:[[`doubleleftarrow`,`doublerightarrow`],1.75,560],xrightleftharpoons:[[`leftharpoondownplus`,`rightharpoonplus`],1.75,716],xleftrightharpoons:[[`leftharpoonplus`,`rightharpoondownplus`],1.75,716],xhookleftarrow:[[`leftarrow`,`righthook`],1.08,522],xhookrightarrow:[[`lefthook`,`rightarrow`],1.08,522],overlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],underlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],overbracket:[[`leftbracketover`,`rightbracketover`],1.6,440],underbracket:[[`leftbracketunder`,`rightbracketunder`],1.6,410],overgroup:[[`leftgroup`,`rightgroup`],.888,342],undergroup:[[`leftgroupunder`,`rightgroupunder`],.888,342],xmapsto:[[`leftmapsto`,`rightarrow`],1.5,522],xtofrom:[[`leftToFrom`,`rightToFrom`],1.75,528],xrightleftarrows:[[`baraboveleftarrow`,`rightarrowabovebar`],1.75,901],xrightequilibrium:[[`baraboveshortleftharpoon`,`rightharpoonaboveshortbar`],1.75,716],xleftequilibrium:[[`shortbaraboveleftharpoon`,`shortrightharpoonabovebar`],1.75,716]},vC=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),yC=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(vC.has(r)&&`base`in e){var i=e.base.type===`ordgroup`?e.base.body.length:1,a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var c=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][c],a=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],a=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],o=`tilde`+c)}return{span:dS([],[new rx([new ix(o)],{width:`100%`,height:M(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`})],t),minWidth:0,height:s}}var l=[],u=_C[r];if(!u)throw Error(`No SVG data for "`+r+`".`);var[d,f,p]=u,m=p/1e3,h=d.length,g,_;if(h===1){if(u.length!==4)throw Error(`Expected 4-tuple for single-path SVG data "`+r+`".`);g=[`hide-tail`],_=[u[3]]}else if(h===2)g=[`halfarrow-left`,`halfarrow-right`],_=[`xMinYMin`,`xMaxYMin`];else if(h===3)g=[`brace-left`,`brace-center`,`brace-right`],_=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support
|
|
280
|
+
`+h+` children.`);for(var v=0;v<h;v++){var y=new rx([new ix(d[v])],{width:`400em`,height:M(m),viewBox:`0 0 `+n+` `+p,preserveAspectRatio:_[v]+` slice`}),b=dS([g[v]],[y],t);if(h===1)return{span:b,minWidth:f,height:m};b.style.height=M(m),l.push(b)}return{span:H([`stretchy`],l,t),minWidth:f,height:m}}var{span:r,minWidth:i,height:a}=n();return r.height=a,r.style.height=M(a),i>0&&(r.style.minWidth=M(i)),r},bC=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=H([`stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new ax({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new ax({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=dS([],[new rx(c,{width:`100%`,height:M(o)})],i)}return a.height=o,a.style.height=M(o),a},xC={bin:1,close:1,inner:1,open:1,punct:1,rel:1},SC={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function CC(e){return e in xC}function wC(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function TC(e){var t=EC(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function EC(e){return e&&(e.type===`atom`||SC.hasOwnProperty(e.type))?e:null}var DC=e=>{if(e instanceof nx)return e;if(cx(e)&&e.children.length===1)return DC(e.children[0])},OC=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=wC(e.base,`accent`),n=r.base,e.base=n,i=sx(WS(e,t)),e.base=r):(r=wC(e,`accent`),n=r.base);var a=WS(n,t.havingCrampedStyle()),o=r.isShifty&&$y(n),s=0;o&&(s=DC(a)?.skew??0);var c=r.label===`\\c`,l=c?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),u;if(r.isStretchy)u=yC(r,t),u=_S({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:u,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+M(2*s)+`)`,marginLeft:M(2*s)}:void 0}]});else{var d,f;r.label===`\\vec`?(d=SS(`vec`,t),f=xS.vec[1]):(d=sS({type:`textord`,mode:r.mode,text:r.label},t,`textord`),d=ox(d),d.italic=0,f=d.width,c&&(l+=d.depth)),u=H([`accent-body`],[d]);var p=r.label===`\\textcircled`;p&&(u.classes.push(`accent-full`),l=a.height);var m=s;p||(m-=f/2),u.style.left=M(m),r.label===`\\textcircled`&&(u.style.top=`.2em`),u=_S({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-l},{type:`elem`,elem:u}]})}var h=H([`mord`,`accent`],[u],t);return i?(i.children[0]=h,i.height=Math.max(h.height,i.height),i.classes[0]=`mord`,i):h},kC=(e,t)=>{var n=e.isStretchy?gC(e.label):new W(`mo`,[QS(e.label,e.mode)]),r=new W(`mover`,[aC(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},AC=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));U({type:`accent`,names:[`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`,`\\widecheck`,`\\widehat`,`\\widetilde`,`\\overrightarrow`,`\\overleftarrow`,`\\Overrightarrow`,`\\overleftrightarrow`,`\\overgroup`,`\\overlinesegment`,`\\overleftharpoon`,`\\overrightharpoon`],props:{numArgs:1},handler:(e,t)=>{var n=MS(t[0]),r=!AC.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:OC,mathmlBuilder:kC}),U({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(e.parser.settings.reportNonstrict(`mathVsTextAccents`,`LaTeX's accent `+e.funcName+` works only in text mode`),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:OC,mathmlBuilder:kC}),U({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=WS(e.base,t),r=yC(e,t),i=e.label===`\\utilde`?.12:0;return H([`mord`,`accentunder`],[_S({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=gC(e.label),r=new W(`munder`,[aC(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var jC=e=>{var t=new W(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};U({type:`xArrow`,names:[`\\xleftarrow`,`\\xrightarrow`,`\\xLeftarrow`,`\\xRightarrow`,`\\xleftrightarrow`,`\\xLeftrightarrow`,`\\xhookleftarrow`,`\\xhookrightarrow`,`\\xmapsto`,`\\xrightharpoondown`,`\\xrightharpoonup`,`\\xleftharpoondown`,`\\xleftharpoonup`,`\\xrightleftharpoons`,`\\xleftrightharpoons`,`\\xlongequal`,`\\xtwoheadrightarrow`,`\\xtwoheadleftarrow`,`\\xtofrom`,`\\xrightleftarrows`,`\\xrightequilibrium`,`\\xleftequilibrium`,`\\\\cdrightarrow`,`\\\\cdleftarrow`,`\\\\cdlongequal`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=hS(WS(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=hS(WS(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=yC(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=_S({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]},{type:`elem`,elem:o,shift:d}]})}else u=_S({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]}]});return H([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=gC(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=jC(aC(e.body,t));r=e.below?new W(`munderover`,[n,jC(aC(e.below,t)),i]):new W(`mover`,[n,i])}else e.below?r=new W(`munder`,[n,jC(aC(e.below,t))]):(r=jC(),r=new W(`mover`,[n,r]));return r}});function MC(e,t){var n=RS(e.body,t,!0);return H([e.mclass],n,t)}function NC(e,t){var n,r=rC(e.body,t);return e.mclass===`minner`?n=new W(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new W(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new W(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):e.mclass===`mopen`||e.mclass===`mclose`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`):e.mclass===`minner`&&(n.attributes.lspace=`0.0556em`,n.attributes.width=`+0.1111em`)),n}U({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:NS(i),isCharacterBox:$y(i)}},htmlBuilder:MC,mathmlBuilder:NC});var PC=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`};U({type:`mclass`,names:[`\\@binrel`],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:`mclass`,mode:n.mode,mclass:PC(t[0]),body:NS(t[1]),isCharacterBox:$y(t[1])}}}),U({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:PC(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:NS(i)},c={type:`supsub`,mode:a.mode,base:s,sup:r===`\\underset`?null:a,sub:r===`\\underset`?a:null};return{type:`mclass`,mode:n.mode,mclass:o,body:[c],isCharacterBox:$y(c)}},htmlBuilder:MC,mathmlBuilder:NC}),U({type:`pmb`,names:[`\\pmb`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`pmb`,mode:n.mode,mclass:PC(t[0]),body:NS(t[0])}},htmlBuilder(e,t){var n=RS(e.body,t,!0),r=H([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=new W(`mstyle`,rC(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}});var FC={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},IC=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),LC=e=>e.type===`textord`&&e.text===`@`,RC=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function zC(e,t,n){var r=FC[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function BC(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new j(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;a<t.length;a++){for(var o=t[a],s=IC(),c=0;c<o.length;c++)if(!LC(o[c]))s.body.push(o[c]);else{r.push(s),c+=1;var l=TC(o[c]).text,u=[,,];if(u[0]={type:`ordgroup`,mode:`math`,body:[]},u[1]={type:`ordgroup`,mode:`math`,body:[]},!`=|.`.includes(l)){if(`<>AV`.includes(l))for(var d=0;d<2;d++){for(var f=!0,p=c+1;p<o.length;p++){if(RC(o[p],l)){f=!1,c=p;break}if(LC(o[p]))throw new j(`Missing a `+l+` character to complete a CD arrow.`,o[p]);u[d].body.push(o[p])}if(f)throw new j(`Missing a `+l+` character to complete a CD arrow.`,o[c])}else throw new j(`Expected one of "<>AV=|." after @`,o[c])}var m={type:`styling`,body:[zC(l,u,e)],mode:`math`,style:`display`,resetFont:!0};r.push(m),s=IC()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}U({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=hS(WS(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=M(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new W(`mrow`,[aC(e.label,t)]);return n=new W(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new W(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),U({type:`cdlabelparent`,names:[`\\\\cdparent`],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:`cdlabelparent`,mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=hS(WS(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new W(`mrow`,[aC(e.fragment,t)])}}),U({type:`textord`,names:[`\\@char`],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=wC(t[0],`ordgroup`).body,i=``,a=0;a<r.length;a++){var o=wC(r[a],`textord`);i+=o.text}var s=parseInt(i),c;if(isNaN(s))throw new j(`\\@char has non-numeric argument `+i);if(s<0||s>=1114111)throw new j(`\\@char with invalid code point `+i);return s<=65535?c=String.fromCharCode(s):(s-=65536,c=String.fromCharCode((s>>10)+55296,(s&1023)+56320)),{type:`textord`,mode:n.mode,text:c}}});var VC=(e,t)=>mS(RS(e.body,t.withColor(e.color),!1)),HC=(e,t)=>{var n=new W(`mstyle`,rC(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n};U({type:`color`,names:[`\\textcolor`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`original`]},handler(e,t){var{parser:n}=e,r=wC(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:NS(i)}},htmlBuilder:VC,mathmlBuilder:HC}),U({type:`color`,names:[`\\color`],props:{numArgs:1,allowedInText:!0,argTypes:[`color`]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=wC(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}},htmlBuilder:VC,mathmlBuilder:HC}),U({type:`cr`,names:[`\\\\`],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text===`[`?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior(`newLineInDisplayMode`,`In LaTeX, \\\\ or \\newline does nothing in display mode`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&wC(i,`size`).value}},htmlBuilder(e,t){var n=H([`mspace`],[],t);return e.newLine&&(n.classes.push(`newline`),e.size&&(n.style.marginTop=M(Gb(e.size,t)))),n},mathmlBuilder(e,t){var n=new W(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,M(Gb(e.size,t)))),n}});var UC={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},WC=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new j(`Expected a control sequence`,e);return t},GC=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},KC=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};U({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(UC[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=UC[r.text]),wC(t.parseFunction(),`internal`);throw new j(`Invalid token after macro prefix`,r)}}),U({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new j(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){o=t.gullet.future(),s[a].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new j(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new j(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new j(`Expected a macro definition`);else s[a].push(r.text);var{tokens:c}=t.gullet.consumeArg();return o&&c.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(c=t.gullet.expandTokens(c),c.reverse()),t.gullet.macros.set(i,{tokens:c,numArgs:a,delimiters:s},n===UC[n]),{type:`internal`,mode:t.mode}}}),U({type:`internal`,names:[`\\let`,`\\\\globallet`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=WC(t.gullet.popToken());return t.gullet.consumeSpaces(),KC(t,r,GC(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),U({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=WC(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return KC(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var qC=function(e,t,n){var r=px(gx.math[e]&&gx.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},JC=function(e,t,n,r){var i=n.havingBaseStyle(t),a=H(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},YC=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=M(i),e.height-=i,e.depth+=i},XC=function(e,t,n,r,i,a){var o=JC(iS(e,`Main-Regular`,i,r),t,r,a);return n&&YC(o,r,t),o},ZC=function(e,t,n,r){return iS(e,`Size`+t+`-Regular`,n,r)},QC=function(e,t,n,r,i,a){var o=ZC(e,t,i,r),s=JC(H([`delimsizing`,`size`+t],[o],r),Sb.TEXT,r,a);return n&&YC(s,r,Sb.TEXT),s},$C=function(e,t,n){return{type:`elem`,elem:H([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[H([],[iS(e,t,n)])])}},ew=function(e,t,n){var r=lx[`Size4-Regular`][e.charCodeAt(0)]?lx[`Size4-Regular`][e.charCodeAt(0)][4]:lx[`Size1-Regular`][e.charCodeAt(0)][4],i=dS([],[new rx([new ix(`inner`,Lb(e,Math.round(1e3*t)))],{width:M(r),height:M(t),style:`width:`+M(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return i.height=t,i.style.height=M(t),i.style.width=M(r),{type:`elem`,elem:i}},tw=.008,nw={type:`kern`,size:-1*tw},rw=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),iw=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),aw=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;e===`\\uparrow`?c=l=`⏐`:e===`\\Uparrow`?c=l=`‖`:e===`\\downarrow`?o=c=`⏐`:e===`\\Downarrow`?o=c=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,c=`⏐`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`‖`,l=`\\Downarrow`):rw.has(e)?(c=`∣`,u=`vert`,d=333):iw.has(e)?(c=`∥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`⎡`,c=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`⎤`,c=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`⌊`?(c=o=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,c=l=`⎢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`⌋`?(c=o=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,c=l=`⎥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`⎛`,c=`⎜`,l=`⎝`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`⎞`,c=`⎟`,l=`⎠`,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,l=`⎩`,c=`⎪`,f=`Size4-Regular`);var p=qC(o,f,i),m=p.height+p.depth,h=qC(c,f,i),g=h.height+h.depth,_=qC(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var ee=qC(s,f,i);y=ee.height+ee.depth,b=2}var x=m+v+y,te=x+Math.max(0,Math.ceil((t-x)/(b*g)))*b*g,ne=r.fontMetrics().axisHeight;n&&(ne*=r.sizeMultiplier);var re=te/2-ne,ie=[];if(u.length>0){var ae=te-m-v,oe=Math.round(te*1e3),se=zb(u,Math.round(ae*1e3)),ce=new ix(u,se),le=M(d/1e3),ue=M(oe/1e3),de=dS([],[new rx([ce],{width:le,height:ue,viewBox:`0 0 `+d+` `+oe})],r);de.height=oe/1e3,de.style.width=le,de.style.height=ue,ie.push({type:`elem`,elem:de})}else{if(ie.push($C(l,f,i)),ie.push(nw),s===null){var fe=te-m-v+2*tw;ie.push(ew(c,fe,r))}else{var pe=(te-m-v-y)/2+2*tw;ie.push(ew(c,pe,r)),ie.push(nw),ie.push($C(s,f,i)),ie.push(nw),ie.push(ew(c,pe,r))}ie.push(nw),ie.push($C(o,f,i))}var me=r.havingBaseStyle(Sb.TEXT);return JC(H([`delimsizing`,`mult`],[_S({positionType:`bottom`,positionData:re,children:ie})],me),Sb.TEXT,r,a)},ow=80,sw=.08,cw=function(e,t,n,r,i){return dS([`hide-tail`],[new rx([new ix(e,Ib(e,r,n))],{width:`400em`,height:M(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},lw=function(e,t){var n=t.havingBaseSizing(),r=yw(`\\surd`,e*n.sizeMultiplier,_w,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s,c,l,u;return r.type===`small`?(l=1e3+1e3*a+ow,e<1?i=1:e<1.4&&(i=.7),s=(1+a+sw)/i,c=(1+a)/i,o=cw(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+ow)*pw[r.size],c=(pw[r.size]+a)/i,s=(pw[r.size]+a+sw)/i,o=cw(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+sw,c=e+a,l=Math.floor(1e3*e+a)+ow,o=cw(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=M(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},uw=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),dw=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),fw=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),pw=[0,1.2,1.8,2.4,3],mw=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),uw.has(e)||fw.has(e))return QC(e,t,!1,n,r,i);if(dw.has(e))return aw(e,pw[t],!1,n,r,i);throw new j(`Illegal delimiter: '`+e+`'`)},hw=[{type:`small`,style:Sb.SCRIPTSCRIPT},{type:`small`,style:Sb.SCRIPT},{type:`small`,style:Sb.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],gw=[{type:`small`,style:Sb.SCRIPTSCRIPT},{type:`small`,style:Sb.SCRIPT},{type:`small`,style:Sb.TEXT},{type:`stack`}],_w=[{type:`small`,style:Sb.SCRIPTSCRIPT},{type:`small`,style:Sb.SCRIPT},{type:`small`,style:Sb.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],vw=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;var t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},yw=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);i<n.length;i++){var a=n[i];if(a.type===`stack`)break;var o=qC(e,vw(a),`math`),s=o.height+o.depth;if(a.type===`small`){var c=r.havingBaseStyle(a.style);s*=c.sizeMultiplier}if(s>t)return a}return n[n.length-1]},bw=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=fw.has(e)?hw:uw.has(e)?_w:gw,s=yw(e,t,o,r);return s.type===`small`?XC(e,s.style,n,r,i,a):s.type===`large`?QC(e,s.size,n,r,i,a):aw(e,t,n,r,i,a)},xw=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return bw(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},Sw={"\\bigl":{mclass:`mopen`,size:1},"\\Bigl":{mclass:`mopen`,size:2},"\\biggl":{mclass:`mopen`,size:3},"\\Biggl":{mclass:`mopen`,size:4},"\\bigr":{mclass:`mclose`,size:1},"\\Bigr":{mclass:`mclose`,size:2},"\\biggr":{mclass:`mclose`,size:3},"\\Biggr":{mclass:`mclose`,size:4},"\\bigm":{mclass:`mrel`,size:1},"\\Bigm":{mclass:`mrel`,size:2},"\\biggm":{mclass:`mrel`,size:3},"\\Biggm":{mclass:`mrel`,size:4},"\\big":{mclass:`mord`,size:1},"\\Big":{mclass:`mord`,size:2},"\\bigg":{mclass:`mord`,size:3},"\\Bigg":{mclass:`mord`,size:4}},Cw=new Set(`(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.`.split(`,`));function ww(e){return`isMiddle`in e}function Tw(e,t){var n=EC(e);if(n&&Cw.has(n.text))return n;throw n?new j(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new j(`Invalid delimiter type '`+e.type+`'`,e)}U({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],props:{numArgs:1,argTypes:[`primitive`]},handler:(e,t)=>{var n=Tw(t[0],e);return{type:`delimsizing`,mode:e.parser.mode,size:Sw[e.funcName].size,mclass:Sw[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?H([e.mclass]):mw(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(QS(e.delim,e.mode));var n=new W(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=M(pw[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function Ew(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}U({type:`leftright-right`,names:[`\\right`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new j(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:Tw(t[0],e).text,color:n}}}),U({type:`leftright`,names:[`\\left`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Tw(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=wC(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{Ew(e);for(var n=RS(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o<n.length;o++){var s=n[o];ww(s)?a=!0:(r=Math.max(n[o].height,r),i=Math.max(n[o].depth,i))}r*=t.sizeMultiplier,i*=t.sizeMultiplier;var c=e.left===`.`?US(t,[`mopen`]):xw(e.left,r,i,t,e.mode,[`mopen`]);if(n.unshift(c),a)for(var l=1;l<n.length;l++){var u=n[l];if(ww(u)){var d=u.isMiddle;n[l]=xw(d.delim,r,i,d.options,e.mode,[])}}var f;if(e.right===`.`)f=US(t,[`mclose`]);else{var p=e.rightColor?t.withColor(e.rightColor):t;f=xw(e.right,r,i,p,e.mode,[`mclose`])}return n.push(f),H([`minner`],n,t)},mathmlBuilder:(e,t)=>{Ew(e);var n=rC(e.body,t);if(e.left!==`.`){var r=new W(`mo`,[QS(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new W(`mo`,[QS(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return $S(n)}}),U({type:`middle`,names:[`\\middle`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Tw(t[0],e);if(!e.parser.leftrightDepth)throw new j(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim===`.`?n=US(t,[]):(n=mw(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=new W(`mo`,[e.delim===`\\vert`||e.delim===`|`?QS(`|`,`text`):QS(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n}});var Dw=(e,t)=>{var n=hS(WS(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=$y(e.body);if(r===`sout`)a=H([`stretchy`,`sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var c=Gb({number:.6,unit:`pt`},t),l=Gb({number:.35,unit:`ex`},t),u=t.havingBaseSizing();i/=u.sizeMultiplier;var d=n.height+n.depth+c+l;n.style.paddingLeft=M(d/2+c);var f=Math.floor(1e3*d*i);a=dS([`hide-tail`],[new rx([new ix(`phase`,Pb(f))],{width:`400em`,height:M(f/1e3),viewBox:`0 0 400000 `+f,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=M(d),o=n.depth+c+l}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var p,m,h=0;/box/.test(r)?(h=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),p=t.fontMetrics().fboxsep+(r===`colorbox`?0:h),m=p):r===`angl`?(h=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),p=4*h,m=Math.max(0,.25-n.depth)):(p=s?.2:0,m=p),a=bC(n,r,p,m,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=M(h)):r===`angl`&&h!==.049&&(a.style.borderTopWidth=M(h),a.style.borderRightWidth=M(h)),o=n.depth+m,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var g;if(e.backgroundColor)g=_S({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var _=/cancel|phase/.test(r)?[`svg-align`]:[];g=_S({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:_}]})}return/cancel/.test(r)&&(g.height=n.height,g.depth=n.depth),/cancel/.test(r)&&!s?H([`mord`,`cancel-lap`],[g],t):H([`mord`],[g],t)},Ow=(e,t)=>{var n,r=new W(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[aC(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+M(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`)}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r};U({type:`enclose`,names:[`\\colorbox`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=wC(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:Dw,mathmlBuilder:Ow}),U({type:`enclose`,names:[`\\fcolorbox`],props:{numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=wC(t[0],`color-token`).color,o=wC(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:Dw,mathmlBuilder:Ow}),U({type:`enclose`,names:[`\\fbox`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\fbox`,body:t[0]}}}),U({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:Dw,mathmlBuilder:Ow}),U({type:`enclose`,names:[`\\sout`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e;n.mode===`math`&&n.settings.reportNonstrict(`mathVsSout`,`LaTeX's \\sout works only in text mode`);var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:Dw,mathmlBuilder:Ow}),U({type:`enclose`,names:[`\\angl`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\angl`,body:t[0]}}});var kw={};function Aw(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c<n.length;++c)kw[n[c]]=s;a&&(kS[t]=a),o&&(AS[t]=o)}var jw={};function G(e,t){jw[e]=t}var Mw=class e{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new e(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}},Nw=class e{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(t,n){return new e(n,Mw.range(this,t))}};function Pw(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n===`\\relax`&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n===`\\hline`||n===`\\hdashline`;)e.consume(),t.push(n===`\\hdashline`),e.consumeSpaces(),n=e.fetch().text;return t}var Fw=e=>{if(!e.parser.settings.displayMode)throw new j(`{`+e.envName+`} can be used only in display mode.`)},Iw=new Set([`gather`,`gather*`]);function Lw(e){if(!e.includes(`ed`))return!e.includes(`*`)}function Rw(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:a,arraystretch:o,colSeparationType:s,autoTag:c,singleRow:l,emptySingleRow:u,maxNumCols:d,leqno:f}=t;if(e.gullet.beginGroup(),l||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var p=e.gullet.expandMacroAsText(`\\arraystretch`);if(p==null)o=1;else if(o=parseFloat(p),!o||o<0)throw new j(`Invalid \\arraystretch: `+p)}e.gullet.beginGroup();var m=[],h=[m],g=[],_=[],v=c==null?void 0:[];function y(){c&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function b(){v&&(e.gullet.macros.get(`\\df@tag`)?(v.push(e.subparse([new Nw(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):v.push(!!c&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(y(),_.push(Pw(e));;){var ee=e.parseExpression(!1,l?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();var x={type:`ordgroup`,mode:e.mode,body:ee};n&&(x={type:`styling`,mode:e.mode,style:n,resetFont:!0,body:[x]}),m.push(x);var te=e.fetch().text;if(te===`&`){if(d&&m.length===d){if(l||s)throw new j(`Too many tab characters: &`,e.nextToken);e.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}e.consume()}else if(te===`\\end`){b(),m.length===1&&x.type===`styling`&&x.body.length===1&&x.body[0].type===`ordgroup`&&x.body[0].body.length===0&&(h.length>1||!u)&&h.pop(),_.length<h.length+1&&_.push([]);break}else if(te===`\\\\`){e.consume();var ne=void 0;e.gullet.future().text!==` `&&(ne=e.parseSizeGroup(!0)),g.push(ne?ne.value:null),b(),_.push(Pw(e)),m=[],h.push(m),y()}else throw new j(`Expected & or \\\\ or \\cr or \\end`,e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:e.mode,addJot:i,arraystretch:o,body:h,cols:a,rowGaps:g,hskipBeforeAndAfter:r,hLinesBeforeRow:_,colSeparationType:s,tags:v,leqno:f}}function zw(e){return e.slice(0,1)===`d`?`display`:`text`}var Bw=function(e,t){var n,r,i=e.body.length,a=e.hLinesBeforeRow,o=0,s=Array(i),c=[],l=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),u=1/t.fontMetrics().ptPerEm,d=5*u;e.colSeparationType&&e.colSeparationType===`small`&&(d=.2778*(t.havingStyle(Sb.SCRIPT).sizeMultiplier/t.sizeMultiplier));var f=e.colSeparationType===`CD`?Gb({number:3,unit:`ex`},t):12*u,p=3*u,m=e.arraystretch*f,h=.7*m,g=.3*m,_=0;function v(e){for(var t=0;t<e.length;++t)t>0&&(_+=.25),c.push({pos:_,isDashed:e[t]})}for(v(a[0]),n=0;n<e.body.length;++n){var y=e.body[n],b=h,ee=g;o<y.length&&(o=y.length);var x={cells:Array(y.length),height:0,depth:0,pos:0};for(r=0;r<y.length;++r){var te=WS(y[r],t);ee<te.depth&&(ee=te.depth),b<te.height&&(b=te.height),x.cells[r]=te}var ne=e.rowGaps[n],re=0;ne&&(re=Gb(ne,t),re>0&&(re+=g,ee<re&&(ee=re),re=0)),e.addJot&&n<e.body.length-1&&(ee+=p),x.height=b,x.depth=ee,_+=b,x.pos=_,_+=ee+re,s[n]=x,v(a[n+1])}var ie=_/2+t.fontMetrics().axisHeight,ae=e.cols||[],oe=[],se,ce,le=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<i;++n){var ue=s[n],de=ue.pos-ie,fe=e.tags[n],pe=void 0;pe=fe===!0?H([`eqn-num`],[],t):fe===!1?H([],[],t):H([],RS(fe,t,!0),t),pe.depth=ue.depth,pe.height=ue.height,le.push({type:`elem`,elem:pe,shift:de})}for(r=0,ce=0;r<o||ce<ae.length;++r,++ce){for(var me=ae[ce],he=!0;(ge=me)?.type===`separator`;){var ge;if(he||(se=H([`arraycolsep`],[]),se.style.width=M(t.fontMetrics().doubleRuleSep),oe.push(se)),me.separator===`|`||me.separator===`:`){var _e=me.separator===`|`?`solid`:`dashed`,ve=H([`vertical-separator`],[],t);ve.style.height=M(_),ve.style.borderRightWidth=M(l),ve.style.borderRightStyle=_e,ve.style.margin=`0 `+M(-l/2);var ye=_-ie;ye&&(ve.style.verticalAlign=M(-ye)),oe.push(ve)}else throw new j(`Invalid separator type: `+me.separator);ce++,me=ae[ce],he=!1}if(!(r>=o)){var be=void 0;(r>0||e.hskipBeforeAndAfter)&&(be=me?.pregap??d,be!==0&&(se=H([`arraycolsep`],[]),se.style.width=M(be),oe.push(se)));var xe=[];for(n=0;n<i;++n){var Se=s[n],Ce=Se.cells[r];if(Ce){var we=Se.pos-ie;Ce.depth=Se.depth,Ce.height=Se.height,xe.push({type:`elem`,elem:Ce,shift:we})}}var Te=_S({positionType:`individualShift`,children:xe}),Ee=H([`col-align-`+(me?.align||`c`)],[Te]);oe.push(Ee),(r<o-1||e.hskipBeforeAndAfter)&&(be=me?.postgap??d,be!==0&&(se=H([`arraycolsep`],[]),se.style.width=M(be),oe.push(se)))}}var De=H([`mtable`],oe);if(c.length>0){for(var Oe=fS(`hline`,t,l),ke=fS(`hdashline`,t,l),Ae=[{type:`elem`,elem:De,shift:0}];c.length>0;){var je=c.pop(),Me=je.pos-ie;je.isDashed?Ae.push({type:`elem`,elem:ke,shift:Me}):Ae.push({type:`elem`,elem:Oe,shift:Me})}De=_S({positionType:`individualShift`,children:Ae})}if(le.length===0)return H([`mord`],[De],t);var Ne=H([`tag`],[_S({positionType:`individualShift`,children:le})],t);return mS([De,Ne])},Vw={c:`center `,l:`left `,r:`right `},Hw=function(e,t){for(var n=[],r=new W(`mtd`,[],[`mtr-glue`]),i=new W(`mtd`,[],[`mml-eqn-num`]),a=0;a<e.body.length;a++){for(var o=e.body[a],s=[],c=0;c<o.length;c++)s.push(new W(`mtd`,[aC(o[c],t)]));e.tags&&e.tags[a]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new W(`mtr`,s))}var l=new W(`mtable`,n),u=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);l.setAttribute(`rowspacing`,M(u));var d=``,f=``;if(e.cols&&e.cols.length>0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++){var y=p[v];y.type===`align`?(f+=Vw[y.align],h&&(m+=`none `),h=!0):y.type===`separator`&&(h&&=(m+=y.separator===`|`?`solid `:`dashed `,!1))}l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var b=e.cols||[],ee=``,x=1;x<b.length;x++)ee+=x%2?`0em `:`1em `;l.setAttribute(`columnspacing`,ee.trim())}else e.colSeparationType===`alignat`||e.colSeparationType===`gather`?l.setAttribute(`columnspacing`,`0em`):e.colSeparationType===`small`?l.setAttribute(`columnspacing`,`0.2778em`):e.colSeparationType===`CD`?l.setAttribute(`columnspacing`,`0.5em`):l.setAttribute(`columnspacing`,`1em`);var te=``,ne=e.hLinesBeforeRow;d+=ne[0].length>0?`left `:``,d+=ne[ne.length-1].length>0?`right `:``;for(var re=1;re<ne.length-1;re++)te+=ne[re].length===0?`none `:ne[re][0]?`dashed `:`solid `;return/[sd]/.test(te)&&l.setAttribute(`rowlines`,te.trim()),d!==``&&(l=new W(`menclose`,[l]),l.setAttribute(`notation`,d.trim())),e.arraystretch&&e.arraystretch<1&&(l=new W(`mstyle`,[l]),l.setAttribute(`scriptlevel`,`1`)),l},Uw=function(e,t){e.envName.includes(`ed`)||Fw(e);var n=[],r=e.envName.includes(`at`)?`alignat`:`align`,i=e.envName===`split`,a=Rw(e.parser,{cols:n,addJot:!0,autoTag:i?void 0:Lw(e.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},`display`),o=0,s=0,c={type:`ordgroup`,mode:e.mode,body:[]};if(t[0]&&t[0].type===`ordgroup`){for(var l=``,u=0;u<t[0].body.length;u++){var d=wC(t[0].body[u],`textord`);l+=d.text}o=Number(l),s=o*2}var f=!s;a.body.forEach(function(e){for(var t=1;t<e.length;t+=2)wC(wC(e[t],`styling`).body[0],`ordgroup`).body.unshift(c);if(f)s<e.length&&(s=e.length);else{var n=e.length/2;if(o<n)throw new j(`Too many math in a row: `+(`expected `+o+`, but got `+n),e[0])}});for(var p=0;p<s;++p){var m=`r`,h=0;p%2==1?m=`l`:p>0&&f&&(h=1),n[p]={type:`align`,align:m,pregap:h,postgap:0}}return a.colSeparationType=f?`align`:`alignat`,a};Aw({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(EC(t[0])?[t[0]]:wC(t[0],`ordgroup`).body).map(function(e){var t=TC(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new j(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return Rw(e.parser,r,zw(e.envName))},htmlBuilder:Bw,mathmlBuilder:Hw}),Aw({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!`lcr`.includes(n))throw new j(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=Rw(e.parser,r,zw(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:Bw,mathmlBuilder:Hw}),Aw({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=Rw(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:Bw,mathmlBuilder:Hw}),Aw({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(EC(t[0])?[t[0]]:wC(t[0],`ordgroup`).body).map(function(e){var t=TC(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new j(`Unknown column alignment: `+t,e)});if(n.length>1)throw new j(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},i=Rw(e.parser,r,`script`);if(i.body.length>0&&i.body[0].length>1)throw new j(`{subarray} can contain only one column`);return i},htmlBuilder:Bw,mathmlBuilder:Hw}),Aw({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=Rw(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},zw(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:Bw,mathmlBuilder:Hw}),Aw({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:Uw,htmlBuilder:Bw,mathmlBuilder:Hw}),Aw({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){Iw.has(e.envName)&&Fw(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:Lw(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Rw(e.parser,t,`display`)},htmlBuilder:Bw,mathmlBuilder:Hw}),Aw({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:Uw,htmlBuilder:Bw,mathmlBuilder:Hw}),Aw({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){Fw(e);var t={autoTag:Lw(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Rw(e.parser,t,`display`)},htmlBuilder:Bw,mathmlBuilder:Hw}),Aw({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return Fw(e),BC(e.parser)},htmlBuilder:Bw,mathmlBuilder:Hw}),G(`\\nonumber`,`\\gdef\\@eqnsw{0}`),G(`\\notag`,`\\nonumber`),U({type:`text`,names:[`\\hline`,`\\hdashline`],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new j(e.funcName+` valid only within array environment`)}});var Ww=kw;U({type:`environment`,names:[`\\begin`,`\\end`],props:{numArgs:1,argTypes:[`text`]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!==`ordgroup`)throw new j(`Invalid environment name`,i);for(var a=``,o=0;o<i.body.length;++o)a+=wC(i.body[o],`textord`).text;if(r===`\\begin`){if(!Ww.hasOwnProperty(a))throw new j(`No such environment: `+a,i);var s=Ww[a],{args:c,optArgs:l}=n.parseArguments(`\\begin{`+a+`}`,s),u={mode:n.mode,envName:a,parser:n},d=s.handler(u,c,l);n.expect(`\\end`,!1);var f=n.nextToken,p=wC(n.parseFunction(),`environment`);if(p.name!==a)throw new j(`Mismatch: \\begin{`+a+`} matched by \\end{`+p.name+`}`,f);return d}return{type:`environment`,mode:n.mode,name:a,nameGroup:i}}});var Gw=(e,t)=>{var n=e.font,r=t.withFont(n);return WS(e.body,r)},Kw=(e,t)=>{var n=e.font,r=t.withFont(n);return aC(e.body,r)},qw={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`};U({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=MS(t[0]),a=r;return a in qw&&(a=qw[a]),{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:Gw,mathmlBuilder:Kw}),U({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`mclass`,mode:n.mode,mclass:PC(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:$y(r)}}}),U({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:a}=n,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}},htmlBuilder:Gw,mathmlBuilder:Kw});var Jw=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=WS(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<c?c:o.depth}a=t.havingStyle(i);var l=WS(e.denom,a,t),u,d,f;e.hasBarLine?(e.barSize?(d=Gb(e.barSize,t),u=fS(`frac-line`,t,d)):u=fS(`frac-line`,t),d=u.height,f=u.height):(u=null,d=0,f=t.fontMetrics().defaultRuleThickness);var p,m,h;n.size===Sb.DISPLAY.size?(p=t.fontMetrics().num1,m=d>0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d)<m&&(p+=m-(p-o.depth-(_+.5*d))),_-.5*d-(l.height-h)<m&&(h+=m-(_-.5*d-(l.height-h)));var v=-(_-.5*d);g=_S({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:u,shift:v},{type:`elem`,elem:o,shift:-p}]})}else{var y=p-o.depth-(l.height-h);y<m&&(p+=.5*(m-y),h+=.5*(m-y)),g=_S({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:h},{type:`elem`,elem:o,shift:-p}]})}a=t.havingStyle(n),g.height*=a.sizeMultiplier/t.sizeMultiplier,g.depth*=a.sizeMultiplier/t.sizeMultiplier;var b=n.size===Sb.DISPLAY.size?t.fontMetrics().delim1:n.size===Sb.SCRIPTSCRIPT.size?t.havingStyle(Sb.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,ee=e.leftDelim==null?US(t,[`mopen`]):bw(e.leftDelim,b,!0,t.havingStyle(n),e.mode,[`mopen`]),x=e.continued?H([]):e.rightDelim==null?US(t,[`mclose`]):bw(e.rightDelim,b,!0,t.havingStyle(n),e.mode,[`mclose`]);return H([`mord`].concat(a.sizingClasses(t)),[ee,H([`mfrac`],[g]),x],t)},Yw=(e,t)=>{var n=new W(`mfrac`,[aC(e.numer,t),aC(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=Gb(e.barSize,t);n.setAttribute(`linethickness`,M(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new W(`mo`,[new JS(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new W(`mo`,[new JS(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return $S(i)}return n},Xw=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e;U({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),Xw({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:Jw,mathmlBuilder:Yw}),U({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var Zw=[`display`,`text`,`script`,`scriptscript`],Qw=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};U({type:`genfrac`,names:[`\\genfrac`],props:{numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],a=MS(t[0]),o=a.type===`atom`&&a.family===`open`?Qw(a.text):null,s=MS(t[1]),c=s.type===`atom`&&s.family===`close`?Qw(s.text):null,l=wC(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=wC(p.body[0],`textord`);f=Zw[Number(m.text)]}}else p=wC(p,`textord`),f=Zw[Number(p.text)];return Xw({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),U({type:`infix`,names:[`\\above`],props:{numArgs:1,argTypes:[`size`],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:wC(t[0],`size`).value,token:i}}}),U({type:`genfrac`,names:[`\\\\abovefrac`],props:{numArgs:3,argTypes:[`math`,`size`,`math`]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=wC(t[1],`infix`).size;if(!a)throw Error(`\\\\abovefrac expected size, but got `+String(a));var o=t[2],s=a.number>0;return{type:`genfrac`,mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null}}});var $w=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?WS(e.sup,t.havingStyle(n.sup()),t):WS(e.sub,t.havingStyle(n.sub()),t),i=wC(e.base,`horizBrace`)):i=wC(e,`horizBrace`);var a=WS(i.base,t.havingBaseStyle(Sb.DISPLAY)),o=yC(i,t),s=i.isOver?_S({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]}):_S({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o,wrapperClasses:[`svg-align`]},{type:`kern`,size:.1},{type:`elem`,elem:a}]});if(r){var c=H([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?_S({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):_S({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]})}return H([`minner`,i.isOver?`mover`:`munder`],[s],t)};U({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:$w,mathmlBuilder:(e,t)=>{var n=gC(e.label);return new W(e.isOver?`mover`:`munder`,[aC(e.base,t),n])}}),U({type:`href`,names:[`\\href`],props:{numArgs:2,argTypes:[`url`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=wC(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:NS(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=RS(e.body,t,!1);return pS(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=iC(e.body,t);return n instanceof W||(n=new W(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),U({type:`href`,names:[`\\url`],props:{numArgs:1,argTypes:[`url`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=wC(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a<r.length;a++){var o=r[a];o===`~`&&(o=`\\textasciitilde`),i.push({type:`textord`,mode:`text`,text:o})}var s={type:`text`,mode:n.mode,font:`\\texttt`,body:i};return{type:`href`,mode:n.mode,href:r,body:NS(s)}}}),U({type:`hbox`,names:[`\\hbox`],props:{numArgs:1,argTypes:[`text`],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:`hbox`,mode:n.mode,body:NS(t[0])}},htmlBuilder(e,t){return mS(RS(e.body,t.withFont(``),!1))},mathmlBuilder(e,t){return new W(`mrow`,rC(e.body,t.withFont(``)))}}),U({type:`html`,names:[`\\htmlClass`,`\\htmlId`,`\\htmlStyle`,`\\htmlData`],props:{numArgs:2,argTypes:[`raw`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,token:i}=e,a=wC(t[0],`raw`).string,o=t[1];n.settings.strict&&n.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);var s,c={};switch(r){case`\\htmlClass`:c.class=a,s={command:`\\htmlClass`,class:a};break;case`\\htmlId`:c.id=a,s={command:`\\htmlId`,id:a};break;case`\\htmlStyle`:c.style=a,s={command:`\\htmlStyle`,style:a};break;case`\\htmlData`:for(var l=a.split(`,`),u=0;u<l.length;u++){var d=l[u],f=d.indexOf(`=`);if(f<0)throw new j(`\\htmlData key/value '`+d+`' missing equals sign`);var p=d.slice(0,f),m=d.slice(f+1);c[`data-`+p.trim()]=m}s={command:`\\htmlData`,attributes:c};break;default:throw Error(`Unrecognized html command`)}return n.settings.isTrusted(s)?{type:`html`,mode:n.mode,attributes:c,body:NS(o)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=RS(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=H(r,n,t);for(var a in e.attributes)a!==`class`&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>iC(e.body,t)}),U({type:`htmlmathml`,names:[`\\html@mathml`],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`htmlmathml`,mode:n.mode,html:NS(t[0]),mathml:NS(t[1])}},htmlBuilder:(e,t)=>mS(RS(e.html,t,!1)),mathmlBuilder:(e,t)=>iC(e.mathml,t)});var eT=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new j(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!Wb(n))throw new j(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n};U({type:`includegraphics`,names:[`\\includegraphics`],props:{numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var c=wC(n[0],`raw`).string.split(`,`),l=0;l<c.length;l++){var u=c[l].split(`=`);if(u.length===2){var d=u[1].trim();switch(u[0].trim()){case`alt`:s=d;break;case`width`:i=eT(d);break;case`height`:a=eT(d);break;case`totalheight`:o=eT(d);break;default:throw new j(`Invalid key: '`+u[0]+`' in \\includegraphics.`)}}}var f=wC(t[0],`url`).url;return s===``&&(s=f,s=s.replace(/^.*[\\/]/,``),s=s.substring(0,s.lastIndexOf(`.`))),r.settings.isTrusted({command:`\\includegraphics`,url:f})?{type:`includegraphics`,mode:r.mode,alt:s,width:i,height:a,totalheight:o,src:f}:r.formatUnsupportedCmd(`\\includegraphics`)},htmlBuilder:(e,t)=>{var n=Gb(e.height,t),r=0;e.totalheight.number>0&&(r=Gb(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=Gb(e.width,t));var a={height:M(n+r)};i>0&&(a.width=M(i)),r>0&&(a.verticalAlign=M(-r));var o=new ex(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new W(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=Gb(e.height,t),i=0;if(e.totalheight.number>0&&(i=Gb(e.totalheight,t)-r,n.setAttribute(`valign`,M(-i))),n.setAttribute(`height`,M(r+i)),e.width.number>0){var a=Gb(e.width,t);n.setAttribute(`width`,M(a))}return n.setAttribute(`src`,e.src),n}}),U({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],props:{numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=wC(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`)),n.mode!==`math`&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` works only in math mode`)):o&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` doesn't support mu units`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return vS(e.dimension,t)},mathmlBuilder(e,t){return new YS(Gb(e.dimension,t))}}),U({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=H([],[WS(e.body,t)]),n=H([`inner`],[n],t)):n=H([`inner`],[WS(e.body,t)]);var r=H([`fix`],[]),i=H([e.alignment],[n,r],t),a=H([`strut`]);return a.style.height=M(i.height+i.depth),i.depth&&(a.style.verticalAlign=M(-i.depth)),i.children.unshift(a),i=H([`thinbox`],[i],t),H([`mord`,`vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new W(`mpadded`,[aC(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),U({type:`styling`,names:[`\\(`,`$`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,resetFont:!0,body:o}}}),U({type:`text`,names:[`\\)`,`\\]`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new j(`Mismatched `+e.funcName)}});var tT=(e,t)=>{switch(t.style.size){case Sb.DISPLAY.size:return e.display;case Sb.TEXT.size:return e.text;case Sb.SCRIPT.size:return e.script;case Sb.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};U({type:`mathchoice`,names:[`\\mathchoice`],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`mathchoice`,mode:n.mode,display:NS(t[0]),text:NS(t[1]),script:NS(t[2]),scriptscript:NS(t[3])}},htmlBuilder:(e,t)=>mS(RS(tT(e,t),t,!1)),mathmlBuilder:(e,t)=>iC(tT(e,t),t)});var nT=(e,t,n,r,i,a,o)=>{e=H([],[e]);var s=n&&$y(n),c,l;if(t){var u=WS(t,r.havingStyle(i.sup()),r);l={elem:u,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-u.depth)}}if(n){var d=WS(n,r.havingStyle(i.sub()),r);c={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-d.height)}}var f;if(l&&c)f=_S({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:M(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:M(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(c)f=_S({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:c.elem,marginLeft:M(-a)},{type:`kern`,size:c.kern},{type:`elem`,elem:e}]});else if(l)f=_S({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:l.kern},{type:`elem`,elem:l.elem,marginLeft:M(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var p=[f];if(c&&a!==0&&!s){var m=H([`mspace`],[],r);m.style.marginRight=M(a),p.unshift(m)}return H([`mop`,`op-limits`],p,r)},rT=new Set([`\\smallint`]),iT=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=wC(e.base,`op`),i=!0):a=wC(e,`op`);var o=t.style,s=!1;o.size===Sb.DISPLAY.size&&a.symbol&&!rT.has(a.name)&&(s=!0);var c,l;if(a.symbol){var u=s?`Size2-Regular`:`Size1-Regular`,d=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(d=a.name.slice(1),a.name=d===`oiint`?`\\iint`:`\\iiint`),c=iS(a.name,u,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),l=c.italic,d.length>0){var f=SS(d+`Size`+(s?`2`:`1`),t);c=_S({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]}),a.name=`\\`+d,c.classes.unshift(`mop`),c.italic=l}}else if(a.body){var p=RS(a.body,t,!0);p.length===1&&p[0]instanceof nx?(c=p[0],c.classes[0]=`mop`):c=H([`mop`],p,t)}else{for(var m=[],h=1;h<a.name.length;h++)m.push(aS(a.name[h],a.mode,t));c=H([`mop`],m,t)}var g=0,_=0;return(c instanceof nx||a.name===`\\oiint`||a.name===`\\oiiint`)&&!a.suppressBaseShift&&(g=(c.height-c.depth)/2-t.fontMetrics().axisHeight,_=c.italic??0),i?nT(c,n,r,t,o,_,g):(g&&(c.style.position=`relative`,c.style.top=M(g)),c)},aT=(e,t)=>{var n;if(e.symbol)n=new W(`mo`,[QS(e.name,e.mode)]),rT.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new W(`mo`,rC(e.body,t));else{n=new W(`mi`,[new JS(e.name.slice(1))]);var r=new W(`mo`,[QS(``,`text`)]);n=e.parentIsSupSub?new W(`mrow`,[n,r]):qS([n,r])}return n},oT={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};U({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=oT[i]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:iT,mathmlBuilder:aT}),U({type:`op`,names:[`\\mathop`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:NS(r)}},htmlBuilder:iT,mathmlBuilder:aT});var sT={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};U({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:iT,mathmlBuilder:aT}),U({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:iT,mathmlBuilder:aT}),U({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=sT[r]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:iT,mathmlBuilder:aT});var cT=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=wC(e.base,`operatorname`),i=!0):a=wC(e,`operatorname`);var o;if(a.body.length>0){for(var s=RS(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c<s.length;c++){var l=s[c];l instanceof nx&&(l.text=l.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`))}o=H([`mop`],s,t)}else o=H([`mop`],[],t);return i?nT(o,n,r,t,t.style,0,0):o};U({type:`operatorname`,names:[`\\operatorname@`,`\\operatornamewithlimits`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`operatorname`,mode:n.mode,body:NS(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:cT,mathmlBuilder:(e,t)=>{for(var n=rC(e.body,t.withFont(`mathrm`)),r=!0,i=0;i<n.length;i++){var a=n[i];if(!(a instanceof YS)){if(a instanceof W)switch(a.type){case`mi`:case`mn`:case`mspace`:case`mtext`:break;case`mo`:var o=a.children[0];a.children.length===1&&o instanceof JS?o.text=o.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`):r=!1;break;default:r=!1}else r=!1}}r&&(n=[new JS(n.map(e=>e.toText()).join(``))]);var s=new W(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new W(`mo`,[QS(``,`text`)]);return e.parentIsSupSub?new W(`mrow`,[s,c]):qS([s,c])}}),G(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),jS({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?mS(RS(e.body,t,!1)):H([`mord`],RS(e.body,t,!0),t)},mathmlBuilder(e,t){return iC(e.body,t,!0)}}),U({type:`overline`,names:[`\\overline`],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=WS(e.body,t.havingCrampedStyle()),r=fS(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return H([`mord`,`overline`],[_S({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new W(`mo`,[new JS(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new W(`mover`,[aC(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),U({type:`phantom`,names:[`\\phantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`phantom`,mode:n.mode,body:NS(r)}},htmlBuilder:(e,t)=>mS(RS(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new W(`mphantom`,rC(e.body,t))}),G(`\\hphantom`,`\\smash{\\phantom{#1}}`),U({type:`vphantom`,names:[`\\vphantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>H([`mord`,`rlap`],[H([`inner`],[WS(e.body,t.withPhantom())]),H([`fix`],[])],t),mathmlBuilder:(e,t)=>{var n=new W(`mpadded`,[new W(`mphantom`,rC(NS(e.body),t))]);return n.setAttribute(`width`,`0px`),n}}),U({type:`raisebox`,names:[`\\raisebox`],props:{numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e,r=wC(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=WS(e.body,t);return _S({positionType:`shift`,positionData:-Gb(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new W(`mpadded`,[aC(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),U({type:`internal`,names:[`\\relax`],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:`internal`,mode:t.mode}}}),U({type:`rule`,names:[`\\rule`],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`]},handler(e,t,n){var{parser:r}=e,i=n[0],a=wC(t[0],`size`),o=wC(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&wC(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=H([`mord`,`rule`],[],t),r=Gb(e.width,t),i=Gb(e.height,t),a=e.shift?Gb(e.shift,t):0;return n.style.borderRightWidth=M(r),n.style.borderTopWidth=M(i),n.style.bottom=M(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=Gb(e.width,t),r=Gb(e.height,t),i=e.shift?Gb(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new W(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,M(n)),o.setAttribute(`height`,M(r));var s=new W(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,M(i)):(s.setAttribute(`height`,M(i)),s.setAttribute(`depth`,M(-i))),s.setAttribute(`voffset`,M(i)),s}});function lT(e,t,n){for(var r=RS(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a<r.length;a++){var o=r[a].classes.indexOf(`sizing`);o<0?Array.prototype.push.apply(r[a].classes,t.sizingClasses(n)):r[a].classes[o+1]===`reset-size`+t.size&&(r[a].classes[o+1]=`reset-size`+n.size),r[a].height*=i,r[a].depth*=i}return mS(r)}var uT=[`\\tiny`,`\\sixptsize`,`\\scriptsize`,`\\footnotesize`,`\\small`,`\\normalsize`,`\\large`,`\\Large`,`\\LARGE`,`\\huge`,`\\Huge`];U({type:`sizing`,names:uT,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:uT.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return lT(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new W(`mstyle`,rC(e.body,n));return r.setAttribute(`mathsize`,M(n.sizeMultiplier)),r}}),U({type:`smash`,names:[`\\smash`],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,a=!1,o=n[0]&&wC(n[0],`ordgroup`);if(o)for(var s,c=0;c<o.body.length;++c){var l=o.body[c];if(s=TC(l).text,s===`t`)i=!0;else if(s===`b`)a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var u=t[0];return{type:`smash`,mode:r.mode,body:u,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{var n=H([],[WS(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return H([`mord`,`smash`],[n],t);if(n.children)for(var r=0;r<n.children.length;r++)e.smashHeight&&(n.children[r].height=0),e.smashDepth&&(n.children[r].depth=0);return H([`mord`],[_S({positionType:`firstBaseline`,children:[{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=new W(`mpadded`,[aC(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),U({type:`sqrt`,names:[`\\sqrt`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=WS(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=hS(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<Sb.TEXT.id&&(i=t.fontMetrics().xHeight);var a=r+i/4,{span:o,ruleWidth:s,advanceWidth:c}=lw(n.height+n.depth+a+r,t),l=o.height-s;l>n.height+n.depth+a&&(a=(a+l-n.height-n.depth)/2);var u=o.height-n.height-a-s;n.style.paddingLeft=M(c);var d=_S({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+u)},{type:`elem`,elem:o},{type:`kern`,size:s}]});if(e.index){var f=t.havingStyle(Sb.SCRIPTSCRIPT),p=WS(e.index,f,t);return H([`mord`,`sqrt`],[H([`root`],[_S({positionType:`shift`,positionData:-(.6*(d.height-d.depth)),children:[{type:`elem`,elem:p}]})]),d],t)}return H([`mord`,`sqrt`],[d],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new W(`mroot`,[aC(n,t),aC(r,t)]):new W(`msqrt`,[aC(n,t)])}});var dT={display:Sb.DISPLAY,text:Sb.TEXT,script:Sb.SCRIPT,scriptscript:Sb.SCRIPTSCRIPT};function fT(e){return e in dT}U({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!fT(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=dT[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),lT(e.body,r,t)},mathmlBuilder(e,t){var n=dT[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));var i=new W(`mstyle`,rC(e.body,r)),a={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return i.setAttribute(`scriptlevel`,a[0]),i.setAttribute(`displaystyle`,a[1]),i}});var pT=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===Sb.DISPLAY.size||n.alwaysHandleSupSub)?iT:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===Sb.DISPLAY.size||n.limits)?cT:null:n.type===`accent`?$y(n.base)?OC:null:n.type===`horizBrace`&&!e.sub===n.isOver?$w:null:null};jS({type:`supsub`,htmlBuilder(e,t){var n=pT(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:a}=e,o=WS(r,t),s,c,l=t.fontMetrics(),u=0,d=0,f=r&&$y(r);if(i){var p=t.havingStyle(t.style.sup());s=WS(i,p,t),f||(u=o.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());c=WS(a,m,t),f||(d=o.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var h=t.style===Sb.DISPLAY?l.sup1:t.style.cramped?l.sup3:l.sup2,g=t.sizeMultiplier,_=M(.5/l.ptPerEm/g),v=null;if(c){var y=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof nx||y)&&(v=M(-(o.italic??0)))}var b;if(s&&c){u=Math.max(u,h,s.depth+.25*l.xHeight),d=Math.max(d,l.sub2);var ee=4*l.defaultRuleThickness;if(u-s.depth-(c.height-d)<ee){d=ee-(u-s.depth)+c.height;var x=.8*l.xHeight-(u-s.depth);x>0&&(u+=x,d-=x)}b=_S({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:d,marginRight:_,marginLeft:v},{type:`elem`,elem:s,shift:-u,marginRight:_}]})}else if(c)d=Math.max(d,l.sub1,c.height-.8*l.xHeight),b=_S({positionType:`shift`,positionData:d,children:[{type:`elem`,elem:c,marginLeft:v,marginRight:_}]});else if(s)u=Math.max(u,h,s.depth+.25*l.xHeight),b=_S({positionType:`shift`,positionData:-u,children:[{type:`elem`,elem:s,marginRight:_}]});else throw Error(`supsub must have either sup or sub.`);return H([HS(o,`right`)||`mord`],[o,H([`msupsub`],[b])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[aC(e.base,t)];e.sub&&a.push(aC(e.sub,t)),e.sup&&a.push(aC(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===Sb.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===Sb.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===Sb.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===Sb.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===Sb.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===Sb.DISPLAY)?`munder`:`msub`}return new W(o,a)}}),jS({type:`atom`,htmlBuilder(e,t){return aS(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new W(`mo`,[QS(e.text,e.mode)]);if(e.family===`bin`){var r=tC(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var mT={mi:`italic`,mn:`normal`,mtext:`normal`};jS({type:`mathord`,htmlBuilder(e,t){return sS(e,t,`mathord`)},mathmlBuilder(e,t){var n=new W(`mi`,[QS(e.text,e.mode,t)]),r=tC(e,t)||`italic`;return r!==mT[n.type]&&n.setAttribute(`mathvariant`,r),n}}),jS({type:`textord`,htmlBuilder(e,t){return sS(e,t,`textord`)},mathmlBuilder(e,t){var n=QS(e.text,e.mode,t),r=tC(e,t)||`normal`,i=e.mode===`text`?new W(`mtext`,[n]):/[0-9]/.test(e.text)?new W(`mn`,[n]):e.text===`\\prime`?new W(`mo`,[n]):new W(`mi`,[n]);return r!==mT[i.type]&&i.setAttribute(`mathvariant`,r),i}});var hT={"\\nobreak":`nobreak`,"\\allowbreak":`allowbreak`},gT={" ":{},"\\ ":{},"~":{className:`nobreak`},"\\space":{},"\\nobreakspace":{className:`nobreak`}};jS({type:`spacing`,htmlBuilder(e,t){if(gT.hasOwnProperty(e.text)){var n=gT[e.text].className||``;if(e.mode===`text`){var r=sS(e,t,`textord`);return r.classes.push(n),r}return H([`mspace`,n],[aS(e.text,e.mode,t)],t)}if(hT.hasOwnProperty(e.text))return H([`mspace`,hT[e.text]],[],t);throw new j(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if(gT.hasOwnProperty(e.text))n=new W(`mtext`,[new JS(`\xA0`)]);else if(hT.hasOwnProperty(e.text))return new W(`mspace`);else throw new j(`Unknown type of space "`+e.text+`"`);return n}});var _T=()=>{var e=new W(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};jS({type:`tag`,mathmlBuilder(e,t){var n=new W(`mtable`,[new W(`mtr`,[_T(),new W(`mtd`,[iC(e.body,t)]),_T(),new W(`mtd`,[iC(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var vT={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},yT={"\\textbf":`textbf`,"\\textmd":`textmd`},bT={"\\textit":`textit`,"\\textup":`textup`},xT=(e,t)=>{var n=e.font;return n?vT[n]?t.withTextFontFamily(vT[n]):yT[n]?t.withTextFontWeight(yT[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(bT[n]):t};U({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],props:{numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`text`,mode:n.mode,body:NS(i),font:r}},htmlBuilder(e,t){var n=xT(e,t);return H([`mord`,`text`],RS(e.body,n,!0),n)},mathmlBuilder(e,t){var n=xT(e,t);return iC(e.body,n)}}),U({type:`underline`,names:[`\\underline`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`underline`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=WS(e.body,t),r=fS(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return H([`mord`,`underline`],[_S({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new W(`mo`,[new JS(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new W(`munder`,[aC(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),U({type:`vcenter`,names:[`\\vcenter`],props:{numArgs:1,argTypes:[`original`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`vcenter`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=WS(e.body,t),r=t.fontMetrics().axisHeight;return _S({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){return new W(`mrow`,[new W(`mpadded`,[aC(e.body,t)],[`vcenter`])])}}),U({type:`verb`,names:[`\\verb`],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new j(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=ST(e),r=[],i=t.havingStyle(t.style.text()),a=0;a<n.length;a++){var o=n[a];o===`~`&&(o=`\\textasciitilde`),r.push(iS(o,`Typewriter-Regular`,e.mode,i,[`mord`,`texttt`]))}return H([`mord`,`text`].concat(i.sizingClasses(t)),lS(r),i)},mathmlBuilder(e,t){var n=new W(`mtext`,[new JS(ST(e))]);return n.setAttribute(`mathvariant`,`monospace`),n}});var ST=e=>e.body.replace(/ /g,e.star?`␣`:`\xA0`),CT=OS,wT=`[ \r
|
|
281
281
|
]`,TT=`\\\\[a-zA-Z@]+`,ET=`\\\\[^\ud800-\udfff]`,DT=`(`+TT+`)`+wT+`*`,OT=`\\\\(
|
|
282
282
|
|[ \r ]+
|
|
283
283
|
?)[ \r ]*`,kT=`[̀-ͯ]`,AT=RegExp(kT+`+$`),jT=`(`+wT+`+)|`+(OT+`|`)+`([!-\\[\\]-‧-豈-]`+(kT+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(kT+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+DT)+(`|`+ET+`)`),MT=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(jT,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new Nw(`EOF`,new Mw(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new j(`Unexpected character: '`+e[t]+`'`,new Nw(e[t],new Mw(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(`
|