@nickduy/agent-studio 0.1.1 → 0.1.3
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/package.json
CHANGED
|
@@ -357,7 +357,7 @@ Any CRITICAL or REQUIRED finding, or any failed check → \`"status": "failed"\`
|
|
|
357
357
|
- Is the verdict consistent with the Rule?
|
|
358
358
|
- Did I check every checklist category?
|
|
359
359
|
- Is every Must-fix item specific enough for the Coding agent to act on without asking?
|
|
360
|
-
`,Wc=[{id:"planner",label:"Planner",agent:{name:"Planner",description:"Asks the open questions, takes the answers and writes the solution",instructions:Pb,model:"sonnet",permissions:Uy,review:"human"}},{id:"coding",label:"Coding",agent:{name:"Coding",description:"Implements the approved solution; never writes tests",instructions:Rb,model:"opus",permissions:ju,review:"auto"}},{id:"unit-test",label:"Unit Test",agent:{name:"Unit Test",description:"Tests the diff with 100% line and branch coverage and runs the suite",instructions:Ab,model:"sonnet",permissions:ju,review:"auto"}},{id:"code-review",label:"Code Review",agent:{name:"Code Review",description:"Solution-architect review: CRITICAL/REQUIRED go back to Coding, OPTIONAL noted for later",instructions:Lb,model:"sonnet",permissions:ju,review:"auto"}}];function Ib(e){const t=Wc.find(r=>r.id===e);if(!t)throw new Error(`Unknown agent template: ${e}`);const n=t.agent.permissions;return{...t.agent,skills:[],claudeMdSections:[],permissions:{...n,deniedCommands:[...n.deniedCommands],protectedPaths:[...n.protectedPaths]}}}function dt({status:e,children:t}){return e?s.jsx("span",{className:`badge ${e}`,children:t??e}):s.jsx("span",{className:"badge",children:"—"})}function kn({status:e}){return s.jsx(dt,{status:e,children:e==="passed"?"done":e==="waiting"?"waiting for review":void 0})}function ti({status:e,children:t,title:n}){return e?s.jsxs("span",{className:`pill ${e}`,title:n,children:[s.jsx("i",{}),t??e]}):s.jsx("span",{className:"pill",children:"—"})}function Pe({error:e}){return e?s.jsx("div",{className:"error-box",role:"alert",children:e}):null}function bn({value:e,onChange:t,items:n}){return s.jsx("div",{className:"tabs",role:"tablist",children:n.map(r=>s.jsx("button",{role:"tab","aria-selected":e===r.id,className:`tab ${e===r.id?"active":""}`,onClick:()=>t(r.id),children:r.label},r.id))})}const By={explorer:Ty,generator:vh,validator:jh,healer:Py,runner:rb,specwriter:fl,contextwriter:kh,custom:fl};function Ot({agent:e,size:t=36}){const n=By[e];return s.jsx("span",{className:`agent-icon ${e}`,style:{width:t,height:t,borderRadius:t/3},title:Se[e].label,children:s.jsx(n,{size:Math.round(t*.5)})})}function Db({agents:e}){return s.jsx("span",{className:"row",style:{gap:0},children:e.map(t=>{const n=By[t.agent];return s.jsx("span",{className:`agent-chip agent-icon ${t.agent} ${t.status}`,title:`${Se[t.agent].label}: ${t.status}`,children:s.jsx(n,{size:12})},t.id)})})}function Pt(e){if(!e)return"—";const t=new Date(e),n=(Date.now()-t.getTime())/1e3;return n<60?"just now":n<3600?`${Math.floor(n/60)} min ago`:n<86400?`${Math.floor(n/3600)} h ago`:t.toLocaleString("en-US",{hour12:!1})}function us(e,t){if(!e)return"—";const n=(t?Date.parse(t):Date.now())-Date.parse(e);if(n<1e3)return`${Math.max(n,0)} ms`;const r=Math.round(n/1e3);return r<60?`${r}s`:`${Math.floor(r/60)}m ${r%60}s`}const kr={explore:"Explore",generate:"Generate",heal:"Heal",spec:"Write spec",testrun:"Test run",context:"Project context",custom:"Custom agent",pipeline:"Pipeline"};function Mb(e){var t;return e.label??((t=Se[e.agent])==null?void 0:t.label)??e.agent}function sn(e){return e==null?"—":e<1e3?String(e):e<1e6?`${(e/1e3).toFixed(e<1e4?1:0)}k`:`${(e/1e6).toFixed(2)}M`}function Gt(e){return e==null?"—":e>0&&e<.01?"<$0.01":`$${e.toFixed(2)}`}function zb({onClose:e,onNewSpec:t}){const n=ut(),{specs:r}=un(),i=Ie(()=>q.jobs()),[l,a]=j.useState(""),[o,u]=j.useState(0),c=m=>{e(),n(m)},h=j.useMemo(()=>{const m=[{group:"Actions",key:"new",label:"Create new spec",text:"new spec create",icon:s.jsx(Qt,{size:16}),run:t},{group:"Actions",key:"runall",label:"Run all tests",text:"run all tests",icon:s.jsx(ft,{size:16}),run:()=>void q.createJob({type:"testrun",repeatEach:1}).then(g=>c(`/runs/${g.id}`))},...r.map(g=>({group:"Specs",key:`s-${g.file}`,label:s.jsxs(s.Fragment,{children:[g.file," ",s.jsx("span",{className:"muted small",children:g.parsed.title})]}),text:`${g.file} ${g.parsed.title}`,icon:s.jsx(jr,{size:16}),run:()=>c(`/specs/${g.file}`)})),...r.flatMap(g=>g.parsed.tcs.map(w=>({group:"Test case",key:`t-${g.file}-${w.id}`,label:s.jsxs(s.Fragment,{children:[s.jsx("code",{children:w.id})," ",w.title]}),text:`${w.id} ${w.title} ${g.file}`,icon:s.jsx(jr,{size:16}),run:()=>c(`/specs/${g.file}`)}))),...(i.data??[]).slice(0,20).map(g=>({group:"Jobs",key:`j-${g.id}`,label:s.jsxs(s.Fragment,{children:["#",g.id," ",kr[g.type]," · ",g.target," ",s.jsx(kn,{status:g.status})]}),text:`#${g.id} ${g.type} ${g.target} ${g.status}`,icon:s.jsx(ft,{size:16}),run:()=>c(`/runs/${g.id}`)}))],p=l.trim().toLowerCase();return p?m.filter(g=>g.text.toLowerCase().includes(p)):m},[l,r,i.data]);j.useEffect(()=>u(0),[l]);const d=m=>{var p;m.key==="ArrowDown"?(m.preventDefault(),u(g=>Math.min(g+1,h.length-1))):m.key==="ArrowUp"?(m.preventDefault(),u(g=>Math.max(g-1,0))):m.key==="Enter"&&((p=h[o])==null||p.run())};let f="";return s.jsx("div",{className:"overlay",onClick:e,children:s.jsxs("div",{className:"palette",onClick:m=>m.stopPropagation(),role:"dialog","aria-label":"Command palette",children:[s.jsx("input",{autoFocus:!0,placeholder:"Search specs, test cases, jobs, actions…",value:l,onChange:m=>a(m.target.value),onKeyDown:d}),s.jsxs("ul",{role:"listbox",children:[h.map((m,p)=>{const g=m.group!==f;return f=m.group,s.jsxs("div",{children:[g&&s.jsx("li",{className:"group",children:m.group}),s.jsxs("li",{role:"option","aria-selected":p===o,className:p===o?"active":"",onMouseEnter:()=>u(p),onClick:m.run,children:[m.icon,s.jsx("span",{children:m.label})]})]},m.key)}),h.length===0&&s.jsx("li",{className:"group",children:"No results"})]})]})})}const Hy=j.createContext(async()=>!1),Kn=()=>j.useContext(Hy);function _b({children:e}){const[t,n]=j.useState([]),r=j.useRef(1),i=j.useCallback(u=>{const c=r.current++;return new Promise(h=>n(d=>[...d,{...u,id:c,resolve:h}]))},[]),l=t[0],a=j.useCallback(u=>{n(c=>{var h;return(h=c[0])==null||h.resolve(u),c.slice(1)})},[]),o=j.useMemo(()=>i,[i]);return s.jsxs(Hy.Provider,{value:o,children:[e,l&&as.createPortal(s.jsx($b,{opts:l,onClose:a},l.id),document.body)]})}function $b({opts:e,onClose:t}){const n=j.useRef(null),r=j.useRef(null);return j.useEffect(()=>{var l;(l=(e.danger?n:r).current)==null||l.focus();const i=a=>{var o;if(a.key==="Escape"&&(a.stopPropagation(),t(!1)),a.key==="Tab"){const u=[n.current,r.current].filter(Boolean),c=u.indexOf(document.activeElement);a.preventDefault(),(o=u[(c+(a.shiftKey?-1:1)+u.length)%u.length])==null||o.focus()}};return window.addEventListener("keydown",i,!0),()=>window.removeEventListener("keydown",i,!0)},[e.danger,t]),s.jsx("div",{className:"overlay confirm-overlay",onClick:()=>t(!1),children:s.jsx("div",{className:"modal confirm-modal",role:"alertdialog","aria-modal":"true","aria-labelledby":"confirm-title","aria-describedby":"confirm-msg",onClick:i=>i.stopPropagation(),children:s.jsxs("div",{className:"modal-body",children:[s.jsxs("div",{className:"confirm-head",children:[e.danger&&s.jsx("span",{className:"confirm-icon","aria-hidden":"true",children:s.jsx(Rr,{size:18})}),s.jsxs("div",{children:[s.jsx("h3",{id:"confirm-title",children:e.title}),e.message&&s.jsx("div",{id:"confirm-msg",className:"confirm-msg",children:e.message})]})]}),s.jsxs("div",{className:"confirm-actions",children:[s.jsx("button",{ref:n,type:"button",className:"btn ghost",onClick:()=>t(!1),children:e.cancelLabel??"Cancel"}),s.jsx("button",{ref:r,type:"button",className:`btn ${e.danger?"btn-danger-solid":""}`,onClick:()=>t(!0),children:e.confirmLabel??(e.danger?"Delete":"OK")})]})]})})})}function Th(e,t){const n=Kn(),r=j.useRef(!1),i=j.useRef(t);i.current=t,j.useEffect(()=>{e.state!=="blocked"||r.current||(r.current=!0,n(i.current).then(l=>{r.current=!1,l?e.proceed():e.reset()}))},[e,n])}const Si=()=>{},Wy=j.createContext({show:Si,info:Si,success:Si,warning:Si,error:Si}),cs=()=>j.useContext(Wy);function Ob({children:e}){const[t,n]=j.useState([]),r=j.useRef(1),i=j.useCallback(o=>n(u=>u.filter(c=>c.id!==o)),[]),l=j.useCallback((o,u)=>{const c=(u==null?void 0:u.kind)??"info",h={id:r.current++,kind:c,message:o,duration:(u==null?void 0:u.duration)??(c==="error"?6e3:3500)};n(d=>[...d,h].slice(-4))},[]),a=j.useMemo(()=>({show:l,info:o=>l(o,{kind:"info"}),success:o=>l(o,{kind:"success"}),warning:o=>l(o,{kind:"warning"}),error:o=>l(o,{kind:"error"})}),[l]);return s.jsxs(Wy.Provider,{value:a,children:[e,as.createPortal(s.jsx("div",{className:"toasts",role:"region","aria-label":"Notifications",children:t.map(o=>s.jsx(Fb,{item:o,onClose:()=>i(o.id)},o.id))}),document.body)]})}function Fb({item:e,onClose:t}){const[n,r]=j.useState(!1);return j.useEffect(()=>{if(n)return;const i=setTimeout(t,e.duration);return()=>clearTimeout(i)},[n,e.duration,t]),s.jsxs("div",{className:`toast ${e.kind}`,role:e.kind==="error"?"alert":"status",onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[s.jsx("span",{className:"toast-icon","aria-hidden":"true",children:e.kind==="success"?s.jsx(yh,{size:14}):e.kind==="error"?s.jsx(wr,{size:14}):e.kind==="warning"?"!":"i"}),s.jsx("span",{className:"toast-msg",children:e.message}),s.jsx("button",{className:"toast-close",onClick:t,"aria-label":"Dismiss notification",children:s.jsx(wr,{size:13})})]})}const Vy=j.createContext({refreshClaude:()=>{},openNewSpec:()=>{},openPalette:()=>{},theme:"light",toggleTheme:()=>{},crumbSlot:null,extraSlot:null}),ds=()=>j.useContext(Vy);function Ub(){try{return localStorage.getItem("qa-studio.sidebar")==="collapsed"}catch{return!1}}const Bb=.6;function Hb(e,t){j.useLayoutEffect(()=>{const n=e.current,r=t.current;if(!n||!r)return;const i=()=>{r.style.zoom="";const o=getComputedStyle(n),u=n.clientHeight-parseFloat(o.paddingTop)-parseFloat(o.paddingBottom),c=r.scrollHeight,h=c>u&&u>0?Math.max(Bb,u/c):1;r.style.zoom=h<1?h.toFixed(3):""};i();const l=new ResizeObserver(i);l.observe(n);const a=new MutationObserver(i);return a.observe(r,{childList:!0,subtree:!0,characterData:!0}),()=>{l.disconnect(),a.disconnect()}},[e,t])}function Wb({collapsed:e,mobileOpen:t,onCloseMobile:n}){var x;const r=j.useRef(null),i=j.useRef(null);Hb(r,i);const{specs:l,mapping:a}=un(),{openPalette:o}=ds(),u=Gn(),c=Ie(()=>q.jobs(),[u.pathname]),{reload:h}=c,d=(c.data??[]).some(y=>y.status==="queued"||y.status==="running"||y.status==="waiting");j.useEffect(()=>{if(!d)return;const y=setInterval(h,5e3);return()=>clearInterval(y)},[d,h]);const f=(c.data??[]).filter(y=>y.status==="running"||y.status==="queued").length,m=(c.data??[]).filter(y=>y.status==="waiting").length;j.useEffect(()=>(document.title=m?"● Agent Studio":"Agent Studio",()=>{document.title="Agent Studio"}),[m]);const p=a.filter(y=>y.status!=="orphan"&&y.testFile).length,g=a.filter(y=>y.status!=="orphan").length,w=(y,v,b,E,k,L)=>s.jsxs(U0,{to:y,end:k,className:({isActive:T})=>`side-link ${T&&!(L&&u.pathname.startsWith(L))?"active":""}`,title:e?b:void 0,children:[v,s.jsx("span",{className:"side-label",children:b}),E!==void 0&&s.jsx("span",{className:"count",children:E})]});return s.jsx("aside",{ref:r,id:"app-sidebar",className:`sidebar ${e?"collapsed":""} ${t?"mobile-open":""}`,"aria-label":"Main menu",children:s.jsxs("div",{ref:i,className:"side-inner",children:[s.jsxs("div",{className:"side-head",children:[s.jsx("span",{className:"logo",children:s.jsx(jh,{size:18})}),s.jsx("h2",{className:"side-label",children:"Agent Studio"}),s.jsx("button",{className:"side-close",onClick:n,"aria-label":"Close menu",children:s.jsx(wr,{size:18})})]}),s.jsxs("button",{className:"side-search",onClick:o,"aria-label":"Search (Ctrl+K)",children:[s.jsx(Po,{size:16}),s.jsx("span",{className:"side-label",children:"Search"}),s.jsx("span",{className:"kbd side-label",children:"⌘K"})]}),s.jsx("div",{className:"side-group side-label",children:"Overview"}),s.jsxs("nav",{className:"side-nav","aria-label":"Overview",children:[w("/",s.jsx(Z0,{size:17}),"Overview",void 0,!0),w("/chat",s.jsx(Sh,{size:17}),"Claude chat")]}),s.jsx("div",{className:"side-group side-label",children:"Specification"}),s.jsxs("nav",{className:"side-nav","aria-label":"Specification",children:[w("/specs",s.jsx(jr,{size:17}),"Specification",l.length,!1,"/specs/from-requirement"),w("/specs/from-requirement",s.jsx(fl,{size:17}),"Generator")]}),s.jsx("div",{className:"side-group side-label",children:"Testing"}),s.jsxs("nav",{className:"side-nav","aria-label":"Testing",children:[w("/mapping",s.jsx(xh,{size:17}),"Test cases",g?`${p}/${g}`:0),w("/test-runs",s.jsx(lb,{size:17}),"Test runs"),w("/runs",s.jsx(ft,{size:17}),"Recent runs",m?`${m} waiting`:f?`${f} running`:((x=c.data)==null?void 0:x.length)??0)]}),s.jsx("div",{className:"side-group side-label",children:"Settings"}),s.jsxs("nav",{className:"side-nav","aria-label":"Settings",children:[w("/agents",s.jsx(Iy,{size:17}),"Agents"),w("/usage",s.jsx(Dy,{size:17}),"Claude usage"),w("/project",s.jsx(kh,{size:17}),"Project context"),w("/settings",s.jsx(sb,{size:17}),"Settings")]})]})})}function Vb({setCrumbSlot:e,setExtraSlot:t,menuOpen:n,onMenu:r}){const{theme:i,toggleTheme:l,openPalette:a}=ds();return s.jsxs("header",{className:"topbar",children:[s.jsx("button",{className:"menu-btn",onClick:r,"aria-label":"Open menu","aria-expanded":n,"aria-controls":"app-sidebar",children:s.jsx(nb,{size:20})}),s.jsx("div",{className:"topbar-crumbs",ref:e}),s.jsx("div",{className:"topbar-spacer"}),s.jsx("div",{className:"topbar-extra",ref:t}),s.jsxs("button",{className:"top-search",onClick:a,"aria-label":"Search specs, TC-ID (Ctrl+K)",children:[s.jsx(Po,{size:15}),s.jsx("span",{children:"Search specs, TC-ID…"})]}),s.jsx("button",{className:"theme-btn",onClick:l,title:"Toggle light/dark theme","aria-label":"Toggle light/dark theme",children:i==="dark"?s.jsx(Ay,{size:17}):s.jsx(Ry,{size:17})})]})}const Qb=/^[a-z0-9][a-z0-9_-]*$/;function qb({initial:e,onClose:t}){const n=ut(),{refresh:r}=un(),[i,l]=j.useState((e==null?void 0:e.name)??""),[a,o]=j.useState(null),u=async c=>{c.preventDefault();const h=i.trim().replace(/\.md$/,"");if(!Qb.test(h))return o('Name may only contain lowercase letters, digits, "-" or "_", and must start with a letter or digit.');try{await q.createSpec(`${h}.md`,(e==null?void 0:e.content)??G0),r(),t(),n(`/specs/${h}.md`)}catch(d){o(d.message)}};return s.jsx("div",{className:"overlay",onClick:t,children:s.jsx("form",{className:"modal",onClick:c=>c.stopPropagation(),onSubmit:u,children:s.jsxs("div",{className:"modal-body",children:[s.jsx("h3",{style:{margin:0},children:e!=null&&e.content?"Import spec":"New spec"}),s.jsxs("div",{className:"row",children:[s.jsx("input",{className:"input grow",autoFocus:!0,placeholder:"spec-name",value:i,onChange:c=>l(c.target.value),"aria-label":"Spec name"}),s.jsx("span",{className:"muted",children:".md"})]}),s.jsx(Pe,{error:a}),s.jsxs("div",{className:"row",style:{justifyContent:"flex-end"},children:[s.jsx("button",{type:"button",className:"btn ghost",onClick:t,children:"Cancel"}),s.jsx("button",{type:"submit",className:"btn",children:e!=null&&e.content?"Import":"Create spec"})]})]})})})}function Gb(e){const[t,n]=j.useState(!1);return j.useEffect(()=>{const r=()=>n(!0);return window.addEventListener(Fc,r),()=>window.removeEventListener(Fc,r)},[]),j.useEffect(()=>{if(!t)return;let r=!1;const i=setInterval(()=>{V0().then(l=>{l&&!r&&(n(!1),e())})},3e3);return()=>{r=!0,clearInterval(i)}},[t,e]),t}function Kb(){var k;const e=K0(),[t,n]=J0(),[r,i]=j.useState(!1),[l,a]=j.useState(null),[o,u]=j.useState(Ub),[c,h]=j.useState(!1),{pathname:d}=Gn();j.useEffect(()=>h(!1),[d]);const[f,m]=j.useState(null),[p,g]=j.useState(null),[w,x]=j.useState(null),y=j.useCallback(()=>{q.claudeStatus().then(x).catch(()=>{})},[]),{refresh:v}=e,b=Gb(j.useCallback(()=>{v(),y()},[v,y]));j.useEffect(()=>{y();const L=setInterval(y,5*6e4);return()=>clearInterval(L)},[y]),j.useEffect(()=>{try{localStorage.setItem("qa-studio.sidebar",o?"collapsed":"open")}catch{}},[o]),j.useEffect(()=>{const L=T=>{(T.ctrlKey||T.metaKey)&&T.key.toLowerCase()==="k"&&(T.preventDefault(),i(D=>!D)),T.key==="Escape"&&(i(!1),a(null),h(!1))};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[]);const E=j.useMemo(()=>({openNewSpec:L=>a(L??{}),openPalette:()=>i(!0),theme:t,toggleTheme:n,crumbSlot:f,extraSlot:p,refreshClaude:y}),[t,n,f,p,y]);return s.jsx(Ey.Provider,{value:e,children:s.jsx(Vy.Provider,{value:E,children:s.jsx(Ob,{children:s.jsxs(_b,{children:[s.jsxs("div",{className:`shell ${o?"side-collapsed":""}`,children:[s.jsx(Wb,{collapsed:o,mobileOpen:c,onCloseMobile:()=>h(!1)}),c&&s.jsx("div",{className:"side-backdrop",onClick:()=>h(!1),"aria-hidden":"true"}),s.jsx("button",{className:"side-toggle-dot",onClick:()=>u(L=>!L),"aria-label":o?"Expand menu":"Collapse menu",title:o?"Expand menu":"Collapse menu",children:s.jsx("span",{style:{display:"inline-flex",transform:o?void 0:"rotate(180deg)"},children:s.jsx(ei,{size:10})})}),s.jsxs("div",{className:"main",children:[s.jsx(Vb,{setCrumbSlot:m,setExtraSlot:g,menuOpen:c,onMenu:()=>h(!0)}),b&&s.jsxs("div",{className:"claude-banner",role:"alert",children:[s.jsx("b",{children:"Agent Studio server is not running."})," Start it with ",s.jsx("code",{children:"npm run studio:start"})," (or ",s.jsx("code",{children:"start-studio.cmd"}),") in the repo folder; this page reconnects by itself."]}),!b&&(w==null?void 0:w.state)==="not-ready"&&s.jsxs("div",{className:"claude-banner",role:"alert",children:[s.jsx("b",{children:"Claude Code is not ready:"})," ",w.binary.ok?w.version.ok?(k=w.test)==null?void 0:k.message:w.version.detail:w.binary.detail,". Built-in agents (explore, generate, heal, spec generator, project context) cannot run. ",s.jsx(ye,{to:"/settings#claude",children:"Fix it in Settings"})]}),s.jsx("div",{className:"content",children:s.jsx(v0,{})})]})]}),r&&s.jsx(zb,{onClose:()=>i(!1),onNewSpec:()=>(i(!1),a({}))}),l&&s.jsx(qb,{initial:l,onClose:()=>a(null)})]})})})})}function ot({items:e}){const{crumbSlot:t}=ds();return t?as.createPortal(s.jsx("nav",{className:"crumbs","aria-label":"Breadcrumb",children:e.map((n,r)=>s.jsxs("span",{className:"crumb",children:[r>0&&s.jsx("span",{className:"sep",children:"/"}),n.to?s.jsx(ye,{to:n.to,children:n.label}):s.jsx("span",{className:"current",children:n.label}),n.count!==void 0&&s.jsx("span",{className:"pill-count",children:n.count})]},r))}),t):null}function Yb({children:e}){const{extraSlot:t}=ds();return t?as.createPortal(e,t):null}function Jb(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Xb=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Zb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eS={};function $p(e,t){return(eS.jsx?Zb:Xb).test(e)}const tS=/[ \t\n\f\r]/g;function nS(e){return typeof e=="object"?e.type==="text"?Op(e.value):!1:Op(e)}function Op(e){return e.replace(tS,"")===""}class Nl{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Nl.prototype.normal={};Nl.prototype.property={};Nl.prototype.space=void 0;function Qy(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Nl(n,r,t)}function Vc(e){return e.toLowerCase()}class Ft{constructor(t,n){this.attribute=n,this.property=t}}Ft.prototype.attribute="";Ft.prototype.booleanish=!1;Ft.prototype.boolean=!1;Ft.prototype.commaOrSpaceSeparated=!1;Ft.prototype.commaSeparated=!1;Ft.prototype.defined=!1;Ft.prototype.mustUseProperty=!1;Ft.prototype.number=!1;Ft.prototype.overloadedBoolean=!1;Ft.prototype.property="";Ft.prototype.spaceSeparated=!1;Ft.prototype.space=void 0;let rS=0;const ge=hs(),rt=hs(),Qc=hs(),Y=hs(),$e=hs(),Yr=hs(),Bt=hs();function hs(){return 2**++rS}const qc=Object.freeze(Object.defineProperty({__proto__:null,boolean:ge,booleanish:rt,commaOrSpaceSeparated:Bt,commaSeparated:Yr,number:Y,overloadedBoolean:Qc,spaceSeparated:$e},Symbol.toStringTag,{value:"Module"})),wu=Object.keys(qc);class Ph extends Ft{constructor(t,n,r,i){let l=-1;if(super(t,n),Fp(this,"space",i),typeof r=="number")for(;++l<wu.length;){const a=wu[l];Fp(this,wu[l],(r&qc[a])===qc[a])}}}Ph.prototype.defined=!0;function Fp(e,t,n){n&&(e[t]=n)}function ai(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const l=new Ph(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[Vc(r)]=r,n[Vc(l.attribute)]=r}return new Nl(t,n,e.space)}const qy=ai({properties:{ariaActiveDescendant:null,ariaAtomic:rt,ariaAutoComplete:null,ariaBusy:rt,ariaChecked:rt,ariaColCount:Y,ariaColIndex:Y,ariaColSpan:Y,ariaControls:$e,ariaCurrent:null,ariaDescribedBy:$e,ariaDetails:null,ariaDisabled:rt,ariaDropEffect:$e,ariaErrorMessage:null,ariaExpanded:rt,ariaFlowTo:$e,ariaGrabbed:rt,ariaHasPopup:null,ariaHidden:rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$e,ariaLevel:Y,ariaLive:null,ariaModal:rt,ariaMultiLine:rt,ariaMultiSelectable:rt,ariaOrientation:null,ariaOwns:$e,ariaPlaceholder:null,ariaPosInSet:Y,ariaPressed:rt,ariaReadOnly:rt,ariaRelevant:null,ariaRequired:rt,ariaRoleDescription:$e,ariaRowCount:Y,ariaRowIndex:Y,ariaRowSpan:Y,ariaSelected:rt,ariaSetSize:Y,ariaSort:null,ariaValueMax:Y,ariaValueMin:Y,ariaValueNow:Y,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Gy(e,t){return t in e?e[t]:t}function Ky(e,t){return Gy(e,t.toLowerCase())}const sS=ai({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Yr,acceptCharset:$e,accessKey:$e,action:null,allow:null,allowFullScreen:ge,allowPaymentRequest:ge,allowUserMedia:ge,alpha:ge,alt:null,as:null,async:ge,autoCapitalize:null,autoComplete:$e,autoFocus:ge,autoPlay:ge,blocking:$e,capture:null,charSet:null,checked:ge,cite:null,className:$e,closedBy:null,colorSpace:null,cols:Y,colSpan:Y,command:null,commandFor:null,content:null,contentEditable:rt,controls:ge,controlsList:$e,coords:Y|Yr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ge,defer:ge,dir:null,dirName:null,disabled:ge,download:Qc,draggable:rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ge,formTarget:null,headers:$e,height:Y,hidden:Qc,high:Y,href:null,hrefLang:null,htmlFor:$e,httpEquiv:$e,id:null,imageSizes:null,imageSrcSet:null,inert:ge,inputMode:null,integrity:null,is:null,isMap:ge,itemId:null,itemProp:$e,itemRef:$e,itemScope:ge,itemType:$e,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ge,low:Y,manifest:null,max:null,maxLength:Y,media:null,method:null,min:null,minLength:Y,multiple:ge,muted:ge,name:null,nonce:null,noModule:ge,noValidate:ge,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:ge,optimum:Y,pattern:null,ping:$e,placeholder:null,playsInline:ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ge,referrerPolicy:null,rel:$e,required:ge,reversed:ge,rows:Y,rowSpan:Y,sandbox:$e,scope:null,scoped:ge,seamless:ge,selected:ge,shadowRootClonable:ge,shadowRootCustomElementRegistry:ge,shadowRootDelegatesFocus:ge,shadowRootMode:null,shadowRootSerializable:ge,shape:null,size:Y,sizes:null,slot:null,span:Y,spellCheck:rt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Y,step:null,style:null,tabIndex:Y,target:null,title:null,translate:null,type:null,typeMustMatch:ge,useMap:null,value:rt,width:Y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$e,axis:null,background:null,bgColor:null,border:Y,borderColor:null,bottomMargin:Y,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ge,declare:ge,event:null,face:null,frame:null,frameBorder:null,hSpace:Y,leftMargin:Y,link:null,longDesc:null,lowSrc:null,marginHeight:Y,marginWidth:Y,noResize:ge,noHref:ge,noShade:ge,noWrap:ge,object:null,profile:null,prompt:null,rev:null,rightMargin:Y,rules:null,scheme:null,scrolling:rt,standby:null,summary:null,text:null,topMargin:Y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Y,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ge,disablePictureInPicture:ge,disableRemotePlayback:ge,exportParts:Yr,part:$e,prefix:null,property:null,results:Y,security:null,unselectable:null},space:"html",transform:Ky}),iS=ai({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:Bt,accentHeight:Y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Y,amplitude:Y,arabicForm:null,ascent:Y,attributeName:null,attributeType:null,azimuth:Y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Y,by:null,calcMode:null,capHeight:Y,className:$e,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:Y,diffuseConstant:Y,direction:null,display:null,dur:null,divisor:Y,dominantBaseline:null,download:ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:Y,enableBackground:null,end:null,event:null,exponent:Y,externalResourcesRequired:null,fill:null,fillOpacity:Y,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:Yr,g2:Yr,glyphName:Yr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Y,horizOriginX:Y,horizOriginY:Y,id:null,ideographic:Y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Y,k:Y,k1:Y,k2:Y,k3:Y,k4:Y,kernelMatrix:Bt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Y,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:Y,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:Y,overlineThickness:Y,paintOrder:null,panose1:null,path:null,pathLength:Y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$e,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Y,pointsAtY:Y,pointsAtZ:Y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Bt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Bt,rev:Bt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Bt,requiredFeatures:Bt,requiredFonts:Bt,requiredFormats:Bt,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:Y,specularExponent:Y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Y,strikethroughThickness:Y,string:null,stroke:null,strokeDashArray:Bt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Y,strokeOpacity:Y,strokeWidth:null,style:null,surfaceScale:Y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Bt,tabIndex:Y,tableValues:null,target:null,targetX:Y,targetY:Y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Bt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Y,underlineThickness:Y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Y,values:null,vAlphabetic:Y,vMathematical:Y,vectorEffect:null,vHanging:Y,vIdeographic:Y,version:null,vertAdvY:Y,vertOriginX:Y,vertOriginY:Y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Gy}),Yy=ai({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()}}),Jy=ai({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ky}),Xy=ai({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),lS={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"},aS=/[A-Z]/g,Up=/-[a-z]/g,oS=/^data[-\w.:]+$/i;function uS(e,t){const n=Vc(t);let r=t,i=Ft;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&oS.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Up,dS);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Up.test(l)){let a=l.replace(aS,cS);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Ph}return new i(r,t)}function cS(e){return"-"+e.toLowerCase()}function dS(e){return e.charAt(1).toUpperCase()}const hS=Qy([qy,sS,Yy,Jy,Xy],"html"),Rh=Qy([qy,iS,Yy,Jy,Xy],"svg");function fS(e){return e.join(" ").trim()}var Bp=/\/\*(?:[^*]|\*(?!\/))*\*\//g,pS=/\n/g,mS=/^\s*/,gS=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,xS=/^:\s*/,yS=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,vS=/^[;\s]*/,jS=`
|
|
360
|
+
`,Wc=[{id:"planner",label:"Planner",agent:{name:"Planner",description:"Asks the open questions, takes the answers and writes the solution",instructions:Pb,model:"sonnet",permissions:Uy,review:"human"}},{id:"coding",label:"Coding",agent:{name:"Coding",description:"Implements the approved solution; never writes tests",instructions:Rb,model:"opus",permissions:ju,review:"auto"}},{id:"unit-test",label:"Unit Test",agent:{name:"Unit Test",description:"Tests the diff with 100% line and branch coverage and runs the suite",instructions:Ab,model:"sonnet",permissions:ju,review:"auto"}},{id:"code-review",label:"Code Review",agent:{name:"Code Review",description:"Solution-architect review: CRITICAL/REQUIRED go back to Coding, OPTIONAL noted for later",instructions:Lb,model:"sonnet",permissions:ju,review:"auto"}}];function Ib(e){const t=Wc.find(r=>r.id===e);if(!t)throw new Error(`Unknown agent template: ${e}`);const n=t.agent.permissions;return{...t.agent,skills:[],claudeMdSections:[],permissions:{...n,deniedCommands:[...n.deniedCommands],protectedPaths:[...n.protectedPaths]}}}function dt({status:e,children:t}){return e?s.jsx("span",{className:`badge ${e}`,children:t??e}):s.jsx("span",{className:"badge",children:"—"})}function kn({status:e}){return s.jsx(dt,{status:e,children:e==="passed"?"done":e==="waiting"?"waiting for review":void 0})}function ti({status:e,children:t,title:n}){return e?s.jsxs("span",{className:`pill ${e}`,title:n,children:[s.jsx("i",{}),t??e]}):s.jsx("span",{className:"pill",children:"—"})}function Pe({error:e}){return e?s.jsx("div",{className:"error-box",role:"alert",children:e}):null}function bn({value:e,onChange:t,items:n}){return s.jsx("div",{className:"tabs",role:"tablist",children:n.map(r=>s.jsx("button",{role:"tab","aria-selected":e===r.id,className:`tab ${e===r.id?"active":""}`,onClick:()=>t(r.id),children:r.label},r.id))})}const By={explorer:Ty,generator:vh,validator:jh,healer:Py,runner:rb,specwriter:fl,contextwriter:kh,custom:fl};function Ot({agent:e,size:t=36}){const n=By[e];return s.jsx("span",{className:`agent-icon ${e}`,style:{width:t,height:t,borderRadius:t/3},title:Se[e].label,children:s.jsx(n,{size:Math.round(t*.5)})})}function Db({agents:e}){return s.jsx("span",{className:"row",style:{gap:0},children:e.map(t=>{const n=By[t.agent];return s.jsx("span",{className:`agent-chip agent-icon ${t.agent} ${t.status}`,title:`${Se[t.agent].label}: ${t.status}`,children:s.jsx(n,{size:12})},t.id)})})}function Pt(e){if(!e)return"—";const t=new Date(e),n=(Date.now()-t.getTime())/1e3;return n<60?"just now":n<3600?`${Math.floor(n/60)} min ago`:n<86400?`${Math.floor(n/3600)} h ago`:t.toLocaleString("en-US",{hour12:!1})}function us(e,t){if(!e)return"—";const n=(t?Date.parse(t):Date.now())-Date.parse(e);if(n<1e3)return`${Math.max(n,0)} ms`;const r=Math.round(n/1e3);return r<60?`${r}s`:`${Math.floor(r/60)}m ${r%60}s`}const kr={explore:"Explore",generate:"Generate",heal:"Heal",spec:"Write spec",testrun:"Test run",context:"Project context",custom:"Custom agent",pipeline:"Pipeline"};function Mb(e){var t;return e.label??((t=Se[e.agent])==null?void 0:t.label)??e.agent}function sn(e){return e==null?"—":e<1e3?String(e):e<1e6?`${(e/1e3).toFixed(e<1e4?1:0)}k`:`${(e/1e6).toFixed(2)}M`}function Gt(e){return e==null?"—":e>0&&e<.01?"<$0.01":`$${e.toFixed(2)}`}function zb({onClose:e,onNewSpec:t}){const n=ut(),{specs:r}=un(),i=Ie(()=>q.jobs()),[l,a]=j.useState(""),[o,u]=j.useState(0),c=m=>{e(),n(m)},h=j.useMemo(()=>{const m=[{group:"Actions",key:"new",label:"Create new spec",text:"new spec create",icon:s.jsx(Qt,{size:16}),run:t},{group:"Actions",key:"runall",label:"Run all tests",text:"run all tests",icon:s.jsx(ft,{size:16}),run:()=>void q.createJob({type:"testrun",repeatEach:1}).then(g=>c(`/runs/${g.id}`))},...r.map(g=>({group:"Specs",key:`s-${g.file}`,label:s.jsxs(s.Fragment,{children:[g.file," ",s.jsx("span",{className:"muted small",children:g.parsed.title})]}),text:`${g.file} ${g.parsed.title}`,icon:s.jsx(jr,{size:16}),run:()=>c(`/specs/${g.file}`)})),...r.flatMap(g=>g.parsed.tcs.map(w=>({group:"Test case",key:`t-${g.file}-${w.id}`,label:s.jsxs(s.Fragment,{children:[s.jsx("code",{children:w.id})," ",w.title]}),text:`${w.id} ${w.title} ${g.file}`,icon:s.jsx(jr,{size:16}),run:()=>c(`/specs/${g.file}`)}))),...(i.data??[]).slice(0,20).map(g=>({group:"Jobs",key:`j-${g.id}`,label:s.jsxs(s.Fragment,{children:["#",g.id," ",kr[g.type]," · ",g.target," ",s.jsx(kn,{status:g.status})]}),text:`#${g.id} ${g.type} ${g.target} ${g.status}`,icon:s.jsx(ft,{size:16}),run:()=>c(`/runs/${g.id}`)}))],p=l.trim().toLowerCase();return p?m.filter(g=>g.text.toLowerCase().includes(p)):m},[l,r,i.data]);j.useEffect(()=>u(0),[l]);const d=m=>{var p;m.key==="ArrowDown"?(m.preventDefault(),u(g=>Math.min(g+1,h.length-1))):m.key==="ArrowUp"?(m.preventDefault(),u(g=>Math.max(g-1,0))):m.key==="Enter"&&((p=h[o])==null||p.run())};let f="";return s.jsx("div",{className:"overlay",onClick:e,children:s.jsxs("div",{className:"palette",onClick:m=>m.stopPropagation(),role:"dialog","aria-label":"Command palette",children:[s.jsx("input",{autoFocus:!0,placeholder:"Search specs, test cases, jobs, actions…",value:l,onChange:m=>a(m.target.value),onKeyDown:d}),s.jsxs("ul",{role:"listbox",children:[h.map((m,p)=>{const g=m.group!==f;return f=m.group,s.jsxs("div",{children:[g&&s.jsx("li",{className:"group",children:m.group}),s.jsxs("li",{role:"option","aria-selected":p===o,className:p===o?"active":"",onMouseEnter:()=>u(p),onClick:m.run,children:[m.icon,s.jsx("span",{children:m.label})]})]},m.key)}),h.length===0&&s.jsx("li",{className:"group",children:"No results"})]})]})})}const Hy=j.createContext(async()=>!1),Kn=()=>j.useContext(Hy);function _b({children:e}){const[t,n]=j.useState([]),r=j.useRef(1),i=j.useCallback(u=>{const c=r.current++;return new Promise(h=>n(d=>[...d,{...u,id:c,resolve:h}]))},[]),l=t[0],a=j.useCallback(u=>{n(c=>{var h;return(h=c[0])==null||h.resolve(u),c.slice(1)})},[]),o=j.useMemo(()=>i,[i]);return s.jsxs(Hy.Provider,{value:o,children:[e,l&&as.createPortal(s.jsx($b,{opts:l,onClose:a},l.id),document.body)]})}function $b({opts:e,onClose:t}){const n=j.useRef(null),r=j.useRef(null);return j.useEffect(()=>{var l;(l=(e.danger?n:r).current)==null||l.focus();const i=a=>{var o;if(a.key==="Escape"&&(a.stopPropagation(),t(!1)),a.key==="Tab"){const u=[n.current,r.current].filter(Boolean),c=u.indexOf(document.activeElement);a.preventDefault(),(o=u[(c+(a.shiftKey?-1:1)+u.length)%u.length])==null||o.focus()}};return window.addEventListener("keydown",i,!0),()=>window.removeEventListener("keydown",i,!0)},[e.danger,t]),s.jsx("div",{className:"overlay confirm-overlay",onClick:()=>t(!1),children:s.jsx("div",{className:"modal confirm-modal",role:"alertdialog","aria-modal":"true","aria-labelledby":"confirm-title","aria-describedby":"confirm-msg",onClick:i=>i.stopPropagation(),children:s.jsxs("div",{className:"modal-body",children:[s.jsxs("div",{className:"confirm-head",children:[e.danger&&s.jsx("span",{className:"confirm-icon","aria-hidden":"true",children:s.jsx(Rr,{size:18})}),s.jsxs("div",{children:[s.jsx("h3",{id:"confirm-title",children:e.title}),e.message&&s.jsx("div",{id:"confirm-msg",className:"confirm-msg",children:e.message})]})]}),s.jsxs("div",{className:"confirm-actions",children:[s.jsx("button",{ref:n,type:"button",className:"btn ghost",onClick:()=>t(!1),children:e.cancelLabel??"Cancel"}),s.jsx("button",{ref:r,type:"button",className:`btn ${e.danger?"btn-danger-solid":""}`,onClick:()=>t(!0),children:e.confirmLabel??(e.danger?"Delete":"OK")})]})]})})})}function Th(e,t){const n=Kn(),r=j.useRef(!1),i=j.useRef(t);i.current=t,j.useEffect(()=>{e.state!=="blocked"||r.current||(r.current=!0,n(i.current).then(l=>{r.current=!1,l?e.proceed():e.reset()}))},[e,n])}const Si=()=>{},Wy=j.createContext({show:Si,info:Si,success:Si,warning:Si,error:Si}),cs=()=>j.useContext(Wy);function Ob({children:e}){const[t,n]=j.useState([]),r=j.useRef(1),i=j.useCallback(o=>n(u=>u.filter(c=>c.id!==o)),[]),l=j.useCallback((o,u)=>{const c=(u==null?void 0:u.kind)??"info",h={id:r.current++,kind:c,message:o,duration:(u==null?void 0:u.duration)??(c==="error"?6e3:3500)};n(d=>[...d,h].slice(-4))},[]),a=j.useMemo(()=>({show:l,info:o=>l(o,{kind:"info"}),success:o=>l(o,{kind:"success"}),warning:o=>l(o,{kind:"warning"}),error:o=>l(o,{kind:"error"})}),[l]);return s.jsxs(Wy.Provider,{value:a,children:[e,as.createPortal(s.jsx("div",{className:"toasts",role:"region","aria-label":"Notifications",children:t.map(o=>s.jsx(Fb,{item:o,onClose:()=>i(o.id)},o.id))}),document.body)]})}function Fb({item:e,onClose:t}){const[n,r]=j.useState(!1);return j.useEffect(()=>{if(n)return;const i=setTimeout(t,e.duration);return()=>clearTimeout(i)},[n,e.duration,t]),s.jsxs("div",{className:`toast ${e.kind}`,role:e.kind==="error"?"alert":"status",onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),children:[s.jsx("span",{className:"toast-icon","aria-hidden":"true",children:e.kind==="success"?s.jsx(yh,{size:14}):e.kind==="error"?s.jsx(wr,{size:14}):e.kind==="warning"?"!":"i"}),s.jsx("span",{className:"toast-msg",children:e.message}),s.jsx("button",{className:"toast-close",onClick:t,"aria-label":"Dismiss notification",children:s.jsx(wr,{size:13})})]})}const Vy=j.createContext({refreshClaude:()=>{},openNewSpec:()=>{},openPalette:()=>{},theme:"light",toggleTheme:()=>{},crumbSlot:null,extraSlot:null}),ds=()=>j.useContext(Vy);function Ub(){try{return localStorage.getItem("qa-studio.sidebar")==="collapsed"}catch{return!1}}const Bb=.6;function Hb(e,t){j.useLayoutEffect(()=>{const n=e.current,r=t.current;if(!n||!r)return;const i=()=>{r.style.zoom="";const o=getComputedStyle(n),u=n.clientHeight-parseFloat(o.paddingTop)-parseFloat(o.paddingBottom),c=r.scrollHeight,h=c>u&&u>0?Math.max(Bb,u/c):1;r.style.zoom=h<1?h.toFixed(3):""};i();const l=new ResizeObserver(i);l.observe(n);const a=new MutationObserver(i);return a.observe(r,{childList:!0,subtree:!0,characterData:!0}),()=>{l.disconnect(),a.disconnect()}},[e,t])}function Wb({collapsed:e,mobileOpen:t,onCloseMobile:n}){var x;const r=j.useRef(null),i=j.useRef(null);Hb(r,i);const{specs:l,mapping:a}=un(),{openPalette:o}=ds(),u=Gn(),c=Ie(()=>q.jobs(),[u.pathname]),{reload:h}=c,d=(c.data??[]).some(y=>y.status==="queued"||y.status==="running"||y.status==="waiting");j.useEffect(()=>{if(!d)return;const y=setInterval(h,5e3);return()=>clearInterval(y)},[d,h]);const f=(c.data??[]).filter(y=>y.status==="running"||y.status==="queued").length,m=(c.data??[]).filter(y=>y.status==="waiting").length;j.useEffect(()=>(document.title=m?"● Agent Studio":"Agent Studio",()=>{document.title="Agent Studio"}),[m]);const p=a.filter(y=>y.status!=="orphan"&&y.testFile).length,g=a.filter(y=>y.status!=="orphan").length,w=(y,v,b,E,k,L)=>s.jsxs(U0,{to:y,end:k,className:({isActive:T})=>`side-link ${T&&!(L&&u.pathname.startsWith(L))?"active":""}`,title:e?b:void 0,children:[v,s.jsx("span",{className:"side-label",children:b}),E!==void 0&&s.jsx("span",{className:"count",children:E})]});return s.jsx("aside",{ref:r,id:"app-sidebar",className:`sidebar ${e?"collapsed":""} ${t?"mobile-open":""}`,"aria-label":"Main menu",children:s.jsxs("div",{ref:i,className:"side-inner",children:[s.jsxs("div",{className:"side-head",children:[s.jsx("span",{className:"logo",children:s.jsx(jh,{size:18})}),s.jsx("h2",{className:"side-label",children:"Agent Studio"}),s.jsx("button",{className:"side-close",onClick:n,"aria-label":"Close menu",children:s.jsx(wr,{size:18})})]}),s.jsxs("button",{className:"side-search",onClick:o,"aria-label":"Search (Ctrl+K)",children:[s.jsx(Po,{size:16}),s.jsx("span",{className:"side-label",children:"Search"}),s.jsx("span",{className:"kbd side-label",children:"⌘K"})]}),s.jsx("div",{className:"side-group side-label",children:"Overview"}),s.jsxs("nav",{className:"side-nav","aria-label":"Overview",children:[w("/",s.jsx(Z0,{size:17}),"Overview",void 0,!0),w("/chat",s.jsx(Sh,{size:17}),"Claude chat")]}),s.jsx("div",{className:"side-group side-label",children:"Specification"}),s.jsxs("nav",{className:"side-nav","aria-label":"Specification",children:[w("/specs",s.jsx(jr,{size:17}),"Specification",l.length,!1,"/specs/from-requirement"),w("/specs/from-requirement",s.jsx(fl,{size:17}),"Generator")]}),s.jsx("div",{className:"side-group side-label",children:"Testing"}),s.jsxs("nav",{className:"side-nav","aria-label":"Testing",children:[w("/mapping",s.jsx(xh,{size:17}),"Test cases",g?`${p}/${g}`:0),w("/test-runs",s.jsx(lb,{size:17}),"Test runs"),w("/runs",s.jsx(ft,{size:17}),"Recent runs",m?`${m} waiting`:f?`${f} running`:((x=c.data)==null?void 0:x.length)??0)]}),s.jsx("div",{className:"side-group side-label",children:"Settings"}),s.jsxs("nav",{className:"side-nav","aria-label":"Settings",children:[w("/agents",s.jsx(Iy,{size:17}),"Agents"),w("/usage",s.jsx(Dy,{size:17}),"Claude usage"),w("/project",s.jsx(kh,{size:17}),"Project context"),w("/settings",s.jsx(sb,{size:17}),"Settings")]})]})})}function Vb({setCrumbSlot:e,setExtraSlot:t,menuOpen:n,onMenu:r}){const{theme:i,toggleTheme:l,openPalette:a}=ds();return s.jsxs("header",{className:"topbar",children:[s.jsx("button",{className:"menu-btn",onClick:r,"aria-label":"Open menu","aria-expanded":n,"aria-controls":"app-sidebar",children:s.jsx(nb,{size:20})}),s.jsx("div",{className:"topbar-crumbs",ref:e}),s.jsx("div",{className:"topbar-spacer"}),s.jsx("div",{className:"topbar-extra",ref:t}),s.jsxs("button",{className:"top-search",onClick:a,"aria-label":"Search specs, TC-ID (Ctrl+K)",children:[s.jsx(Po,{size:15}),s.jsx("span",{children:"Search specs, TC-ID…"})]}),s.jsx("button",{className:"theme-btn",onClick:l,title:"Toggle light/dark theme","aria-label":"Toggle light/dark theme",children:i==="dark"?s.jsx(Ay,{size:17}):s.jsx(Ry,{size:17})})]})}const Qb=/^[a-z0-9][a-z0-9_-]*$/;function qb({initial:e,onClose:t}){const n=ut(),{refresh:r}=un(),[i,l]=j.useState((e==null?void 0:e.name)??""),[a,o]=j.useState(null),u=async c=>{c.preventDefault();const h=i.trim().replace(/\.md$/,"");if(!Qb.test(h))return o('Name may only contain lowercase letters, digits, "-" or "_", and must start with a letter or digit.');try{await q.createSpec(`${h}.md`,(e==null?void 0:e.content)??G0),r(),t(),n(`/specs/${h}.md`)}catch(d){o(d.message)}};return s.jsx("div",{className:"overlay",onClick:t,children:s.jsx("form",{className:"modal",onClick:c=>c.stopPropagation(),onSubmit:u,children:s.jsxs("div",{className:"modal-body",children:[s.jsx("h3",{style:{margin:0},children:e!=null&&e.content?"Import spec":"New spec"}),s.jsxs("div",{className:"row",children:[s.jsx("input",{className:"input grow",autoFocus:!0,placeholder:"spec-name",value:i,onChange:c=>l(c.target.value),"aria-label":"Spec name"}),s.jsx("span",{className:"muted",children:".md"})]}),s.jsx(Pe,{error:a}),s.jsxs("div",{className:"row",style:{justifyContent:"flex-end"},children:[s.jsx("button",{type:"button",className:"btn ghost",onClick:t,children:"Cancel"}),s.jsx("button",{type:"submit",className:"btn",children:e!=null&&e.content?"Import":"Create spec"})]})]})})})}function Gb(e){const[t,n]=j.useState(!1);return j.useEffect(()=>{const r=()=>n(!0);return window.addEventListener(Fc,r),()=>window.removeEventListener(Fc,r)},[]),j.useEffect(()=>{if(!t)return;let r=!1;const i=setInterval(()=>{V0().then(l=>{l&&!r&&(n(!1),e())})},3e3);return()=>{r=!0,clearInterval(i)}},[t,e]),t}function Kb(){var k;const e=K0(),[t,n]=J0(),[r,i]=j.useState(!1),[l,a]=j.useState(null),[o,u]=j.useState(Ub),[c,h]=j.useState(!1),{pathname:d}=Gn();j.useEffect(()=>h(!1),[d]);const[f,m]=j.useState(null),[p,g]=j.useState(null),[w,x]=j.useState(null),y=j.useCallback(()=>{q.claudeStatus().then(x).catch(()=>{})},[]),{refresh:v}=e,b=Gb(j.useCallback(()=>{v(),y()},[v,y]));j.useEffect(()=>{y();const L=setInterval(y,5*6e4);return()=>clearInterval(L)},[y]),j.useEffect(()=>{try{localStorage.setItem("qa-studio.sidebar",o?"collapsed":"open")}catch{}},[o]),j.useEffect(()=>{const L=T=>{(T.ctrlKey||T.metaKey)&&T.key.toLowerCase()==="k"&&(T.preventDefault(),i(D=>!D)),T.key==="Escape"&&(i(!1),a(null),h(!1))};return window.addEventListener("keydown",L),()=>window.removeEventListener("keydown",L)},[]);const E=j.useMemo(()=>({openNewSpec:L=>a(L??{}),openPalette:()=>i(!0),theme:t,toggleTheme:n,crumbSlot:f,extraSlot:p,refreshClaude:y}),[t,n,f,p,y]);return s.jsx(Ey.Provider,{value:e,children:s.jsx(Vy.Provider,{value:E,children:s.jsx(Ob,{children:s.jsxs(_b,{children:[s.jsxs("div",{className:`shell ${o?"side-collapsed":""}`,children:[s.jsx(Wb,{collapsed:o,mobileOpen:c,onCloseMobile:()=>h(!1)}),c&&s.jsx("div",{className:"side-backdrop",onClick:()=>h(!1),"aria-hidden":"true"}),s.jsx("button",{className:"side-toggle-dot",onClick:()=>u(L=>!L),"aria-label":o?"Expand menu":"Collapse menu",title:o?"Expand menu":"Collapse menu",children:s.jsx("span",{style:{display:"inline-flex",transform:o?void 0:"rotate(180deg)"},children:s.jsx(ei,{size:10})})}),s.jsxs("div",{className:"main",children:[s.jsx(Vb,{setCrumbSlot:m,setExtraSlot:g,menuOpen:c,onMenu:()=>h(!0)}),b&&s.jsxs("div",{className:"claude-banner",role:"alert",children:[s.jsx("b",{children:"Agent Studio server is not running."})," Start it with ",s.jsx("code",{children:"npm run studio:start"})," in the repo folder; this page reconnects by itself."]}),!b&&(w==null?void 0:w.state)==="not-ready"&&s.jsxs("div",{className:"claude-banner",role:"alert",children:[s.jsx("b",{children:"Claude Code is not ready:"})," ",w.binary.ok?w.version.ok?(k=w.test)==null?void 0:k.message:w.version.detail:w.binary.detail,". Built-in agents (explore, generate, heal, spec generator, project context) cannot run. ",s.jsx(ye,{to:"/settings#claude",children:"Fix it in Settings"})]}),s.jsx("div",{className:"content",children:s.jsx(v0,{})})]})]}),r&&s.jsx(zb,{onClose:()=>i(!1),onNewSpec:()=>(i(!1),a({}))}),l&&s.jsx(qb,{initial:l,onClose:()=>a(null)})]})})})})}function ot({items:e}){const{crumbSlot:t}=ds();return t?as.createPortal(s.jsx("nav",{className:"crumbs","aria-label":"Breadcrumb",children:e.map((n,r)=>s.jsxs("span",{className:"crumb",children:[r>0&&s.jsx("span",{className:"sep",children:"/"}),n.to?s.jsx(ye,{to:n.to,children:n.label}):s.jsx("span",{className:"current",children:n.label}),n.count!==void 0&&s.jsx("span",{className:"pill-count",children:n.count})]},r))}),t):null}function Yb({children:e}){const{extraSlot:t}=ds();return t?as.createPortal(e,t):null}function Jb(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Xb=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Zb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eS={};function $p(e,t){return(eS.jsx?Zb:Xb).test(e)}const tS=/[ \t\n\f\r]/g;function nS(e){return typeof e=="object"?e.type==="text"?Op(e.value):!1:Op(e)}function Op(e){return e.replace(tS,"")===""}class Nl{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Nl.prototype.normal={};Nl.prototype.property={};Nl.prototype.space=void 0;function Qy(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Nl(n,r,t)}function Vc(e){return e.toLowerCase()}class Ft{constructor(t,n){this.attribute=n,this.property=t}}Ft.prototype.attribute="";Ft.prototype.booleanish=!1;Ft.prototype.boolean=!1;Ft.prototype.commaOrSpaceSeparated=!1;Ft.prototype.commaSeparated=!1;Ft.prototype.defined=!1;Ft.prototype.mustUseProperty=!1;Ft.prototype.number=!1;Ft.prototype.overloadedBoolean=!1;Ft.prototype.property="";Ft.prototype.spaceSeparated=!1;Ft.prototype.space=void 0;let rS=0;const ge=hs(),rt=hs(),Qc=hs(),Y=hs(),$e=hs(),Yr=hs(),Bt=hs();function hs(){return 2**++rS}const qc=Object.freeze(Object.defineProperty({__proto__:null,boolean:ge,booleanish:rt,commaOrSpaceSeparated:Bt,commaSeparated:Yr,number:Y,overloadedBoolean:Qc,spaceSeparated:$e},Symbol.toStringTag,{value:"Module"})),wu=Object.keys(qc);class Ph extends Ft{constructor(t,n,r,i){let l=-1;if(super(t,n),Fp(this,"space",i),typeof r=="number")for(;++l<wu.length;){const a=wu[l];Fp(this,wu[l],(r&qc[a])===qc[a])}}}Ph.prototype.defined=!0;function Fp(e,t,n){n&&(e[t]=n)}function ai(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const l=new Ph(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),t[r]=l,n[Vc(r)]=r,n[Vc(l.attribute)]=r}return new Nl(t,n,e.space)}const qy=ai({properties:{ariaActiveDescendant:null,ariaAtomic:rt,ariaAutoComplete:null,ariaBusy:rt,ariaChecked:rt,ariaColCount:Y,ariaColIndex:Y,ariaColSpan:Y,ariaControls:$e,ariaCurrent:null,ariaDescribedBy:$e,ariaDetails:null,ariaDisabled:rt,ariaDropEffect:$e,ariaErrorMessage:null,ariaExpanded:rt,ariaFlowTo:$e,ariaGrabbed:rt,ariaHasPopup:null,ariaHidden:rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:$e,ariaLevel:Y,ariaLive:null,ariaModal:rt,ariaMultiLine:rt,ariaMultiSelectable:rt,ariaOrientation:null,ariaOwns:$e,ariaPlaceholder:null,ariaPosInSet:Y,ariaPressed:rt,ariaReadOnly:rt,ariaRelevant:null,ariaRequired:rt,ariaRoleDescription:$e,ariaRowCount:Y,ariaRowIndex:Y,ariaRowSpan:Y,ariaSelected:rt,ariaSetSize:Y,ariaSort:null,ariaValueMax:Y,ariaValueMin:Y,ariaValueNow:Y,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Gy(e,t){return t in e?e[t]:t}function Ky(e,t){return Gy(e,t.toLowerCase())}const sS=ai({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Yr,acceptCharset:$e,accessKey:$e,action:null,allow:null,allowFullScreen:ge,allowPaymentRequest:ge,allowUserMedia:ge,alpha:ge,alt:null,as:null,async:ge,autoCapitalize:null,autoComplete:$e,autoFocus:ge,autoPlay:ge,blocking:$e,capture:null,charSet:null,checked:ge,cite:null,className:$e,closedBy:null,colorSpace:null,cols:Y,colSpan:Y,command:null,commandFor:null,content:null,contentEditable:rt,controls:ge,controlsList:$e,coords:Y|Yr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ge,defer:ge,dir:null,dirName:null,disabled:ge,download:Qc,draggable:rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ge,formTarget:null,headers:$e,height:Y,hidden:Qc,high:Y,href:null,hrefLang:null,htmlFor:$e,httpEquiv:$e,id:null,imageSizes:null,imageSrcSet:null,inert:ge,inputMode:null,integrity:null,is:null,isMap:ge,itemId:null,itemProp:$e,itemRef:$e,itemScope:ge,itemType:$e,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ge,low:Y,manifest:null,max:null,maxLength:Y,media:null,method:null,min:null,minLength:Y,multiple:ge,muted:ge,name:null,nonce:null,noModule:ge,noValidate:ge,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:ge,optimum:Y,pattern:null,ping:$e,placeholder:null,playsInline:ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ge,referrerPolicy:null,rel:$e,required:ge,reversed:ge,rows:Y,rowSpan:Y,sandbox:$e,scope:null,scoped:ge,seamless:ge,selected:ge,shadowRootClonable:ge,shadowRootCustomElementRegistry:ge,shadowRootDelegatesFocus:ge,shadowRootMode:null,shadowRootSerializable:ge,shape:null,size:Y,sizes:null,slot:null,span:Y,spellCheck:rt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Y,step:null,style:null,tabIndex:Y,target:null,title:null,translate:null,type:null,typeMustMatch:ge,useMap:null,value:rt,width:Y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:$e,axis:null,background:null,bgColor:null,border:Y,borderColor:null,bottomMargin:Y,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ge,declare:ge,event:null,face:null,frame:null,frameBorder:null,hSpace:Y,leftMargin:Y,link:null,longDesc:null,lowSrc:null,marginHeight:Y,marginWidth:Y,noResize:ge,noHref:ge,noShade:ge,noWrap:ge,object:null,profile:null,prompt:null,rev:null,rightMargin:Y,rules:null,scheme:null,scrolling:rt,standby:null,summary:null,text:null,topMargin:Y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Y,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ge,disablePictureInPicture:ge,disableRemotePlayback:ge,exportParts:Yr,part:$e,prefix:null,property:null,results:Y,security:null,unselectable:null},space:"html",transform:Ky}),iS=ai({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:Bt,accentHeight:Y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Y,amplitude:Y,arabicForm:null,ascent:Y,attributeName:null,attributeType:null,azimuth:Y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Y,by:null,calcMode:null,capHeight:Y,className:$e,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:Y,diffuseConstant:Y,direction:null,display:null,dur:null,divisor:Y,dominantBaseline:null,download:ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:Y,enableBackground:null,end:null,event:null,exponent:Y,externalResourcesRequired:null,fill:null,fillOpacity:Y,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:Yr,g2:Yr,glyphName:Yr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Y,horizOriginX:Y,horizOriginY:Y,id:null,ideographic:Y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Y,k:Y,k1:Y,k2:Y,k3:Y,k4:Y,kernelMatrix:Bt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Y,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:Y,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:Y,overlineThickness:Y,paintOrder:null,panose1:null,path:null,pathLength:Y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:$e,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Y,pointsAtY:Y,pointsAtZ:Y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Bt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Bt,rev:Bt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Bt,requiredFeatures:Bt,requiredFonts:Bt,requiredFormats:Bt,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:Y,specularExponent:Y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Y,strikethroughThickness:Y,string:null,stroke:null,strokeDashArray:Bt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Y,strokeOpacity:Y,strokeWidth:null,style:null,surfaceScale:Y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Bt,tabIndex:Y,tableValues:null,target:null,targetX:Y,targetY:Y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Bt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Y,underlineThickness:Y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Y,values:null,vAlphabetic:Y,vMathematical:Y,vectorEffect:null,vHanging:Y,vIdeographic:Y,version:null,vertAdvY:Y,vertOriginX:Y,vertOriginY:Y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Gy}),Yy=ai({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()}}),Jy=ai({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ky}),Xy=ai({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),lS={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"},aS=/[A-Z]/g,Up=/-[a-z]/g,oS=/^data[-\w.:]+$/i;function uS(e,t){const n=Vc(t);let r=t,i=Ft;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&oS.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Up,dS);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Up.test(l)){let a=l.replace(aS,cS);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Ph}return new i(r,t)}function cS(e){return"-"+e.toLowerCase()}function dS(e){return e.charAt(1).toUpperCase()}const hS=Qy([qy,sS,Yy,Jy,Xy],"html"),Rh=Qy([qy,iS,Yy,Jy,Xy],"svg");function fS(e){return e.join(" ").trim()}var Bp=/\/\*(?:[^*]|\*(?!\/))*\*\//g,pS=/\n/g,mS=/^\s*/,gS=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,xS=/^:\s*/,yS=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,vS=/^[;\s]*/,jS=`
|
|
361
361
|
`,Hp="/",Wp="*",Ni="",wS="comment",kS="declaration";function bS(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(p){var g=p.match(pS);g&&(n+=g.length);var w=p.lastIndexOf(jS);r=~w?p.length-w:r+p.length}function l(){var p={line:n,column:r};return function(g){return g.position=new a(p),c(),g}}function a(p){this.start=p,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function o(p){var g=new Error(t.source+":"+n+":"+r+": "+p);if(g.reason=p,g.filename=t.source,g.line=n,g.column=r,g.source=e,!t.silent)throw g}function u(p){var g=p.exec(e);if(g){var w=g[0];return i(w),e=e.slice(w.length),g}}function c(){u(mS)}function h(p){for(var g;g=d();)p.push(g);return p}function d(){var p=l();if(!(Hp!=e.charAt(0)||Wp!=e.charAt(1))){for(var g=2;Ni!=e.charAt(g)&&(Wp!=e.charAt(g)||Hp!=e.charAt(g+1));)++g;if(g+=2,Ni===e.charAt(g-1))return o("End of comment missing");var w=e.slice(2,g-2);return r+=2,i(w),e=e.slice(g),r+=2,p({type:wS,comment:w})}}function f(){var p=l(),g=u(gS);if(g){if(d(),!u(xS))return o("property missing ':'");var w=u(yS),x=p({type:kS,property:g[0].replace(Bp,Ni).trim(),value:w?w[0].replace(Bp,Ni).trim():Ni});return u(vS),x}}function m(){var p=[];h(p);for(var g;g=f();)p.push(g),h(p);return p}return c(),m()}function SS(e,t){let n=null;if(!e||typeof e!="string")return n;const r=bS(e),i=typeof t=="function";return r.forEach(l=>{if(l.type!=="declaration")return;const{property:a,value:o}=l;i?t(a,o,l):o&&(n=n??{},n[a]=o)}),n}const Zy=ev("end"),Ah=ev("start");function ev(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function NS(e){const t=Ah(e),n=Zy(e);if(t&&n)return{start:t,end:n}}function Wi(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Vp(e.position):"start"in e||"end"in e?Vp(e):"line"in e||"column"in e?Gc(e):""}function Gc(e){return Qp(e&&e.line)+":"+Qp(e&&e.column)}function Vp(e){return Gc(e&&e.start)+"-"+Gc(e&&e.end)}function Qp(e){return e&&typeof e=="number"?e:1}class Lo extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",l={},a=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?i=t:!l.cause&&t&&(a=!0,i=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?l.ruleId=r:(l.source=r.slice(0,u),l.ruleId=r.slice(u+1))}if(!l.place&&l.ancestors){const u=l.ancestors[l.ancestors.length-1];u&&(l.place=u.position)}const o=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=Wi(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=a&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Object.defineProperties(Lo.prototype,{file:{configurable:!0,enumerable:!0,value:"",writable:!0},name:{configurable:!0,enumerable:!0,value:"",writable:!0},reason:{configurable:!0,enumerable:!0,value:"",writable:!0},message:{configurable:!0,enumerable:!0,value:"",writable:!0},stack:{configurable:!0,enumerable:!0,value:"",writable:!0},column:{configurable:!0,enumerable:!0,writable:!0},line:{configurable:!0,enumerable:!0,writable:!0},ancestors:{configurable:!0,enumerable:!0,writable:!0},cause:{configurable:!0,enumerable:!0,writable:!0},fatal:{configurable:!0,enumerable:!0,writable:!0},place:{configurable:!0,enumerable:!0,writable:!0},ruleId:{configurable:!0,enumerable:!0,writable:!0},source:{configurable:!0,enumerable:!0,writable:!0}});const Lh={}.hasOwnProperty,CS=new Map,ES=/[A-Z]/g,TS=/-([a-z])/g,PS=new Set(["table","tbody","thead","tfoot","tr"]),RS=new Set(["td","th"]),tv="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function AS(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=OS(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=$S(n,t.jsx,t.jsxs)}const 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"?Rh:hS,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=nv(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function nv(e,t,n){if(t.type==="element")return LS(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return IS(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return MS(e,t,n);if(t.type==="mdxjsEsm")return DS(e,t);if(t.type==="root")return zS(e,t,n);if(t.type==="text")return _S(e,t)}function LS(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Rh,e.schema=i),e.ancestors.push(t);const l=sv(e,t.tagName,!1),a=FS(e,t);let o=Dh(e,t);return PS.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!nS(u):!0})),rv(e,a,l,t),Ih(a,o),e.ancestors.pop(),e.schema=r,e.create(t,l,a,n)}function IS(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ml(e,t.position)}function DS(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ml(e,t.position)}function MS(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Rh,e.schema=i),e.ancestors.push(t);const l=t.name===null?e.Fragment:sv(e,t.name,!0),a=US(e,t),o=Dh(e,t);return rv(e,a,l,t),Ih(a,o),e.ancestors.pop(),e.schema=r,e.create(t,l,a,n)}function zS(e,t,n){const r={};return Ih(r,Dh(e,t)),e.create(t,e.Fragment,r,n)}function _S(e,t){return t.value}function rv(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ih(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function $S(e,t,n){return r;function r(i,l,a,o){const c=Array.isArray(a.children)?n:t;return o?c(l,a,o):c(l,a)}}function OS(e,t){return n;function n(r,i,l,a){const o=Array.isArray(l.children),u=Ah(r);return t(i,l,a,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function FS(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Lh.call(t.properties,i)){const l=BS(e,i,t.properties[i]);if(l){const[a,o]=l;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&RS.has(t.tagName)?r=o:n[a]=o}}if(r){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function US(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const a=l.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else ml(e,t.position);else{const{name:i}=r;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,l=e.evaluater.evaluateExpression(o.expression)}else ml(e,t.position);else l=r.value===null?!0:r.value;n[i]=l}return n}function Dh(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:CS;for(;++r<t.children.length;){const l=t.children[r];let a;if(e.passKeys){const u=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(u){const c=i.get(u)||0;a=u+"-"+c,i.set(u,c+1)}}const o=nv(e,l,a);o!==void 0&&n.push(o)}return n}function BS(e,t,n){if(n==null||typeof n=="number"&&Number.isNaN(n))return;const r=uS(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?Jb(n):fS(n)),r.property==="style"?["style",typeof n=="object"?e.stylePropertyNameCase==="dom"?n:WS(n):HS(e,String(n))]:[e.elementAttributeNameCase==="react"&&r.space?lS[r.property]||r.property:r.attribute,n]}function HS(e,t){const n={};try{SS(t,function(r,i){if(r&&i){let l=r;l.slice(0,2)!=="--"&&(l=l.toLowerCase(),e.stylePropertyNameCase==="dom"&&(l.slice(0,4)==="-ms-"&&(l=l.slice(1)),l=l.replace(TS,qS))),n[l]=i}})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,l=new Lo("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=tv+"#cannot-parse-style-attribute",l}return n}function sv(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let l=-1,a;for(;++l<i.length;){const o=$p(i[l])?{type:"Identifier",name:i[l]}:{type:"Literal",value:i[l]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(l&&o.type==="Literal"),optional:!1}:o}r=a}else r=$p(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Lh.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ml(e)}function ml(e,t){const n=new Lo("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=tv+"#cannot-handle-mdx-estrees-without-createevaluater",n}function WS(e){const t={};let n;for(n in e)Lh.call(e,n)&&(t[VS(n)]=e[n]);return t}function VS(e){if(e.slice(0,2)==="--")return e;let t=e.replace(ES,QS);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function QS(e){return"-"+e.toLowerCase()}function qS(e,t){return t.toUpperCase()}const ku={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"]},GS={};function Io(e,t){const n=GS,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return iv(e,r,i)}function iv(e,t,n){if(KS(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return qp(e.children,t,n)}return Array.isArray(e)?qp(e,t,n):""}function qp(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=iv(e[i],t,n);return r.join("")}function KS(e){return!!(e&&typeof e=="object")}const Gp=document.createElement("i");function Mh(e){const t="&"+e+";";Gp.innerHTML=t;const n=Gp.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function yn(e,t,n,r){const i=e.length;let l=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);l<r.length;)a=r.slice(l,l+1e4),a.unshift(t,0),e.splice(...a),l+=1e4,t+=1e4}function nn(e,t){return e.length>0?(yn(e,e.length,0,t),e):t}const Kp={}.hasOwnProperty;function lv(e){const t={};let n=-1;for(;++n<e.length;)YS(t,e[n]);return t}function YS(e,t){let n;for(n in t){const i=(Kp.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let a;if(l)for(a in l){Kp.call(i,a)||(i[a]=[]);const o=l[a];JS(i[a],Array.isArray(o)?o:o?[o]:[])}}}function JS(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);yn(e,0,0,r)}function av(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function vn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const yt=Ar(/[A-Za-z]/),vt=Ar(/[\dA-Za-z]/),XS=Ar(/[#-'*+\--9=?A-Z^-~]/);function ro(e){return e!==null&&(e<32||e===127)}const Kc=Ar(/\d/),ZS=Ar(/[\dA-Fa-f]/),ov=Ar(/[!-/:-@[-`{-~]/);function de(e){return e!==null&&e<-2}function Oe(e){return e!==null&&(e<0||e===32)}function ve(e){return e===-2||e===-1||e===32}const Cl=Ar(new RegExp("\\p{P}|\\p{S}","u")),ss=Ar(/\s/);function Ar(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function oi(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const l=e.charCodeAt(n);let a="";if(l===37&&vt(e.charCodeAt(n+1))&&vt(e.charCodeAt(n+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(a=String.fromCharCode(l));else if(l>55295&&l<57344){const o=e.charCodeAt(n+1);l<56320&&o>56319&&o<57344?(a=String.fromCharCode(l,o),i=1):a="�"}else a=String.fromCharCode(l);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Ae(e,t,n,r){const i=r?r-1:1/0;let l=0;return a;function a(u){return ve(u)?(e.enter(n),o(u)):t(u)}function o(u){return ve(u)&&l++<i?(e.consume(u),o):(e.exit(n),t(u))}}function uv(e,t,n,r,i,l){let a=0;return o;function o(h){return ve(h)?(e.enter(r),u(h)):c(h)}function u(h){return ve(h)&&a<l?(e.consume(h),a++,u):(e.exit(r),c(h))}function c(h){return a>=i?t(h):n(h)}}const eN={tokenize:tN};function tN(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Ae(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),l(o)}function l(o){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return de(o)?(e.consume(o),e.exit("chunkText"),l):(e.consume(o),a)}}let so=class{constructor(){this.index=new Map,this.map=[]}add(t,n,r){Yp(this,t,n,r,!1)}addBefore(t,n,r){Yp(this,t,n,r,!0)}consume(t){if(this.map.sort(function(l,a){return l[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const l of i)t.push(l);i=r.pop()}this.map.length=0,this.index.clear()}};function Yp(e,t,n,r,i){if(n===0&&r.length===0)return;const l=e.index.get(t);if(l){l[1]+=n,i?(r.push(...l[2]),l[2]=r):l[2].push(...r);return}const a=[t,n,r];e.map.push(a),e.index.set(t,a)}const nN={tokenize:rN},Jp={tokenize:sN};function rN(e){const t=this,n=[];let r=0,i,l,a;return o;function o(v){if(r<n.length){const b=n[r];return t.containerState=b[1],e.attempt(b[0].continuation,u,c)(v)}return c(v)}function u(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const b=t.events.length;let E=b,k;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){k=t.events[E][1].end;break}x(r);let L=b;for(;L<t.events.length;)t.events[L][1].end={...k},L++;const T=new so;return T.add(E+1,0,t.events.slice(b)),T.add(b,L-b,[]),T.consume(t.events),c(v)}return o(v)}function c(v){if(r===n.length){if(!i)return f(v);if(i.currentConstruct&&i.currentConstruct.concrete)return p(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Jp,h,d)(v)}function h(v){return i&&y(),x(r),f(v)}function d(v){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,p(v)}function f(v){return t.containerState={},e.attempt(Jp,m,p)(v)}function m(v){return r++,n.push([t.currentConstruct,t.containerState]),f(v)}function p(v){if(v===null){i&&y(),x(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:l}),g(v)}function g(v){if(v===null){w(e.exit("chunkFlow"),!0),x(0),e.consume(v);return}return de(v)?(e.consume(v),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(v),g)}function w(v,b){const E=t.sliceStream(v);if(b&&E.push(null),v.previous=l,l&&(l.next=v),l=v,i.defineSkip(v.start),i.write(E),t.parser.lazy[v.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<a&&(!i.events[k][1].end||i.events[k][1].end.offset>a))return;const L=t.events.length;let T=L,D,N;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){if(D){N=t.events[T][1].end;break}D=!0}for(x(r),k=L;k<t.events.length;)t.events[k][1].end={...N},k++;const P=new so;P.add(T+1,0,t.events.slice(L)),P.add(L,k-L,[]),P.consume(t.events)}}function x(v){let b=n.length;for(;b-- >v;){const E=n[b];t.containerState=E[1],E[0].exit.call(t,e)}n.length=v}function y(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function sN(e,t,n){return Ae(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function br(e){if(e===null||Oe(e)||ss(e))return 1;if(Cl(e))return 2}function Do(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(t=l(t,n),r.push(l))}return t}const Yc={name:"attention",resolveAll:iN,tokenize:lN};function iN(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;const l=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,a={...e[i][1].end},o={...e[n][1].start};Xp(a,-l),Xp(o,l);const u={type:l>1?"strongSequence":"emphasisSequence",start:a,end:{...e[i][1].end}},c={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:o},h={type:l>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},d={type:l>1?"strong":"emphasis",start:{...u.start},end:{...c.end}};e[i][1].end={...u.start},e[n][1].start={...c.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=nn(r,[["enter",e[i][1],t],["exit",e[i][1],t]])),r=nn(r,[["enter",d,t],["enter",u,t],["exit",u,t],["enter",h,t]]),r=nn(r,Do(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=nn(r,[["exit",h,t],["enter",c,t],["exit",c,t],["exit",d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=nn(r,[["enter",e[n][1],t],["exit",e[n][1],t]])),yn(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function lN(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=br(r);let l;return a;function a(u){return l=u,e.enter("attentionSequence"),o(u)}function o(u){if(u===l)return e.consume(u),o;const c=e.exit("attentionSequence"),h=br(u),d=!h||h===2&&i||n.includes(u)&&u!==42&&u!==95,f=!i||i===2&&h||n.includes(r)&&r!==42&&r!==95;return c._open=!!(l===42?d:d&&(i||!f)),c._close=!!(l===42?f:f&&(h||!d)),t(u)}}function Xp(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const aN={name:"autolink",tokenize:oN};function oN(e,t,n){let r=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(m){return yt(m)?(e.consume(m),a):m===64?n(m):c(m)}function a(m){return m===43||m===45||m===46||vt(m)?(r=1,o(m)):c(m)}function o(m){return m===58?(e.consume(m),r=0,u):(m===43||m===45||m===46||vt(m))&&r++<32?(e.consume(m),o):(r=0,c(m))}function u(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||ro(m)?n(m):(e.consume(m),u)}function c(m){return m===64?(e.consume(m),h):XS(m)?(e.consume(m),c):n(m)}function h(m){return vt(m)?d(m):n(m)}function d(m){return m===46?(e.consume(m),r=0,h):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):f(m)}function f(m){if((m===45||vt(m))&&r++<63){const p=m===45?f:d;return e.consume(m),p}return n(m)}}const El={partial:!0,tokenize:uN};function uN(e,t,n){return r;function r(l){return ve(l)?Ae(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||de(l)?t(l):n(l)}}const cv={continuation:{tokenize:dN},exit:hN,name:"blockQuote",tokenize:cN};function cN(e,t,n){const r=this;return i;function i(a){if(a===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),l}return n(a)}function l(a){return ve(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function dN(e,t,n){const r=this;return i;function i(a){return ve(a)?Ae(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):l(a)}function l(a){return e.attempt(cv,t,n)(a)}}function hN(e){e.exit("blockQuote")}const dv={name:"characterEscape",tokenize:fN};function fN(e,t,n){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return ov(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const hv={name:"characterReference",tokenize:pN};function pN(e,t,n){const r=this;let i=0,l,a;return o;function o(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),u}function u(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),l=31,a=vt,h(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,a=ZS,h):(e.enter("characterReferenceValue"),l=7,a=Kc,h(d))}function h(d){if(d===59&&i){const f=e.exit("characterReferenceValue");return a===vt&&!Mh(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&i++<l?(e.consume(d),h):n(d)}}const Jc={partial:!0,tokenize:mN};function mN(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l)}function l(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Zp={concrete:!0,name:"codeFenced",tokenize:gN};function gN(e,t,n){const r=this,i={partial:!0,tokenize:E};let l=0,a=0,o;return u;function u(k){return c(k)}function c(k){const L=r.events[r.events.length-1];return l=L&&L[1].type==="linePrefix"?L[2].sliceSerialize(L[1],!0).length:0,o=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(k)}function h(k){return k===o?(a++,e.consume(k),h):a<3?n(k):(e.exit("codeFencedFenceSequence"),ve(k)?Ae(e,d,"whitespace")(k):d(k))}function d(k){return k===null||de(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(Jc,g,b)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(k))}function f(k){return k===null||de(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(k)):ve(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ae(e,m,"whitespace")(k)):k===96&&k===o?n(k):(e.consume(k),f)}function m(k){return k===null||de(k)?d(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===null||de(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(k)):k===96&&k===o?n(k):(e.consume(k),p)}function g(k){return e.attempt(i,b,w)(k)}function w(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),x}function x(k){return l>0&&ve(k)?Ae(e,y,"linePrefix",l+1)(k):y(k)}function y(k){return k===null||de(k)?e.check(Jc,g,b)(k):(e.enter("codeFlowValue"),v(k))}function v(k){return k===null||de(k)?(e.exit("codeFlowValue"),y(k)):(e.consume(k),v)}function b(k){return e.exit("codeFenced"),t(k)}function E(k,L,T){let D=0;return N;function N(I){return k.enter("lineEnding"),k.consume(I),k.exit("lineEnding"),P}function P(I){return k.enter("codeFencedFence"),ve(I)?Ae(k,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):A(I)}function A(I){return I===o?(k.enter("codeFencedFenceSequence"),z(I)):T(I)}function z(I){return I===o?(D++,k.consume(I),z):D>=a?(k.exit("codeFencedFenceSequence"),ve(I)?Ae(k,U,"whitespace")(I):U(I)):T(I)}function U(I){return I===null||de(I)?(k.exit("codeFencedFence"),L(I)):T(I)}}}const bu={name:"codeIndented",tokenize:yN},xN={partial:!0,tokenize:vN};function yN(e,t,n){return r;function r(o){return e.enter("codeIndented"),uv(e,i,n,"linePrefix",4,4)(o)}function i(o){return o===null?a(o):de(o)?e.attempt(xN,i,a)(o):(e.enter("codeFlowValue"),l(o))}function l(o){return o===null||de(o)?(e.exit("codeFlowValue"),i(o)):(e.consume(o),l)}function a(o){return e.exit("codeIndented"),t(o)}}function vN(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):de(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):uv(e,t,l,"linePrefix",4,4)(a)}function l(a){return de(a)?i(a):n(a)}}const jN={name:"codeText",previous:kN,resolve:wN,tokenize:bN};function wN(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function kN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function bN(e,t,n){let r=0,i,l;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),o(d)}function o(d){return d===96?(e.consume(d),r++,o):(e.exit("codeTextSequence"),u(d))}function u(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),u):d===96?(l=e.enter("codeTextSequence"),i=0,h(d)):de(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||de(d)?(e.exit("codeTextData"),u(d)):(e.consume(d),c)}function h(d){return d===96?(e.consume(d),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(l.type="codeTextData",c(d))}}class SN{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ci(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ci(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ci(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ci(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ci(this.left,n.reverse())}}}function Ci(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function fv(e){const t={};let n=-1,r,i,l,a,o,u,c;const h=new SN(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(u=r[1]._tokenizer.events,l=0,l<u.length&&u[l][1].type==="lineEndingBlank"&&(l+=2),l<u.length&&u[l][1].type==="content"))for(;++l<u.length&&u[l][1].type!=="content";)u[l][1].type==="chunkText"&&(u[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,NN(h,n)),n=t[n],c=!0);else if(r[1]._container){for(l=n,i=void 0;l--;)if(a=h.get(l),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=l);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},o=h.slice(i,n),o.unshift(r),h.splice(i,n-i+1,o))}}return yn(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!c}function NN(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const l=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,u=[],c={};let h,d,f=-1,m=n,p=0,g=0;const w=[g];for(;m;){for(;e.get(++i)[1]!==m;);l.push(i),m._tokenizer||(h=r.sliceStream(m),m.next||h.push(null),d&&a.defineSkip(m.start),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(h),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=m,m=m.next}for(m=n;++f<o.length;)o[f][0]==="exit"&&o[f-1][0]==="enter"&&o[f][1].type===o[f-1][1].type&&o[f][1].start.line!==o[f][1].end.line&&(g=f+1,w.push(g),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(a.events=[],m?(m._tokenizer=void 0,m.previous=void 0):w.pop(),f=w.length;f--;){const x=o.slice(w[f],w[f+1]),y=l.pop();u.push([y,y+x.length-1]),e.splice(y,2,x)}for(u.reverse(),f=-1;++f<u.length;)c[p+u[f][0]]=p+u[f][1],p+=u[f][1]-u[f][0]-1;return c}const CN={resolve:TN,tokenize:PN},EN={partial:!0,tokenize:RN};function TN(e){return fv(e),e}function PN(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?l(o):de(o)?e.check(EN,a,l)(o):(e.consume(o),i)}function l(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function RN(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ae(e,l,"linePrefix")}function l(a){if(a===null||de(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function pv(e,t,n,r,i,l,a,o,u){const c=u||Number.POSITIVE_INFINITY;let h=0;return d;function d(x){return x===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(x),e.exit(l),f):x===null||x===32||x===41||ro(x)?n(x):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),g(x))}function f(x){return x===62?(e.enter(l),e.consume(x),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===62?(e.exit("chunkString"),e.exit(o),f(x)):x===null||x===60||de(x)?n(x):(e.consume(x),x===92?p:m)}function p(x){return x===60||x===62||x===92?(e.consume(x),m):m(x)}function g(x){return!h&&(x===null||x===41||Oe(x))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(x)):h<c&&x===40?(e.consume(x),h++,g):x===41?(e.consume(x),h--,g):x===null||x===32||x===40||ro(x)?n(x):(e.consume(x),x===92?w:g)}function w(x){return x===40||x===41||x===92?(e.consume(x),g):g(x)}}function mv(e,t,n,r,i,l){const a=this;let o=0,u;return c;function c(m){return e.enter(r),e.enter(i),e.consume(m),e.exit(i),e.enter(l),h}function h(m){return o>999||m===null||m===91||m===93&&!u||m===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(m):m===93?(e.exit(l),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):de(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===null||m===91||m===93||de(m)||o++>999?(e.exit("chunkString"),h(m)):(e.consume(m),u||(u=!ve(m)),m===92?f:d)}function f(m){return m===91||m===92||m===93?(e.consume(m),o++,d):d(m)}}function gv(e,t,n,r,i,l){let a;return o;function o(f){return f===34||f===39||f===40?(e.enter(r),e.enter(i),e.consume(f),e.exit(i),a=f===40?41:f,u):n(f)}function u(f){return f===a?(e.enter(i),e.consume(f),e.exit(i),e.exit(r),t):(e.enter(l),c(f))}function c(f){return f===a?(e.exit(l),u(a)):f===null?n(f):de(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Ae(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===a||f===null||de(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:h)}function d(f){return f===a||f===92?(e.consume(f),h):h(f)}}function Vi(e,t){let n;return r;function r(i){return de(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ve(i)?Ae(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const AN={name:"definition",tokenize:IN},LN={partial:!0,tokenize:DN};function IN(e,t,n){const r=this;let i;return l;function l(m){return e.enter("definition"),a(m)}function a(m){return mv.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function o(m){return i=vn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),u):n(m)}function u(m){return Oe(m)?Vi(e,c)(m):c(m)}function c(m){return pv(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function h(m){return e.attempt(LN,d,d)(m)}function d(m){return ve(m)?Ae(e,f,"whitespace")(m):f(m)}function f(m){return m===null||de(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function DN(e,t,n){return r;function r(o){return Oe(o)?Vi(e,i)(o):n(o)}function i(o){return gv(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function l(o){return ve(o)?Ae(e,a,"whitespace")(o):a(o)}function a(o){return o===null||de(o)?t(o):n(o)}}const MN={name:"hardBreakEscape",tokenize:zN};function zN(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return de(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const _N={name:"headingAtx",resolve:$N,tokenize:ON};function $N(e,t){let n=e.length-2,r=3;if(e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r){const i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"};yn(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])}return e}function ON(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),l(h)}function l(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(e.consume(h),a):h===null||Oe(h)?(e.exit("atxHeadingSequence"),o(h)):n(h)}function o(h){return h===35?(e.enter("atxHeadingSequence"),u(h)):h===null||de(h)?(e.exit("atxHeading"),t(h)):ve(h)?Ae(e,o,"whitespace")(h):(e.enter("atxHeadingText"),c(h))}function u(h){return h===35?(e.consume(h),u):(e.exit("atxHeadingSequence"),o(h))}function c(h){return h===null||h===35||Oe(h)?(e.exit("atxHeadingText"),o(h)):(e.consume(h),c)}}const xv=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Xc=["pre","script","style","textarea"],FN={concrete:!0,name:"htmlFlow",resolveTo:BN,tokenize:HN},UN={partial:!0,tokenize:WN};function BN(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function HN(e,t,n){const r=this;let i,l,a,o,u;return c;function c(C){return h(C)}function h(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),d}function d(C){return C===33?(e.consume(C),f):C===47?(e.consume(C),l=!0,g):C===63?(e.consume(C),i=3,r.interrupt?t:S):yt(C)?(e.consume(C),a=String.fromCharCode(C),w):n(C)}function f(C){return C===45?(e.consume(C),i=2,m):C===91?(e.consume(C),i=5,o=0,p):yt(C)?(e.consume(C),i=4,r.interrupt?t:S):n(C)}function m(C){return C===45?(e.consume(C),r.interrupt?t:S):n(C)}function p(C){const F="CDATA[";return C===F.charCodeAt(o++)?(e.consume(C),o===F.length?r.interrupt?t:A:p):n(C)}function g(C){return yt(C)?(e.consume(C),a=String.fromCharCode(C),w):n(C)}function w(C){if(C===null||C===47||C===62||Oe(C)){const F=C===47,Z=a.toLowerCase();return!F&&!l&&Xc.includes(Z)?(i=1,r.interrupt?t(C):A(C)):xv.includes(a.toLowerCase())?(i=6,F?(e.consume(C),x):r.interrupt?t(C):A(C)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(C):l?y(C):v(C))}return C===45||vt(C)?(e.consume(C),a+=String.fromCharCode(C),w):n(C)}function x(C){return C===62?(e.consume(C),r.interrupt?t:A):n(C)}function y(C){return ve(C)?(e.consume(C),y):N(C)}function v(C){return C===47?(e.consume(C),N):C===58||C===95||yt(C)?(e.consume(C),b):ve(C)?(e.consume(C),v):N(C)}function b(C){return C===45||C===46||C===58||C===95||vt(C)?(e.consume(C),b):E(C)}function E(C){return C===61?(e.consume(C),k):ve(C)?(e.consume(C),E):v(C)}function k(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),u=C,L):ve(C)?(e.consume(C),k):T(C)}function L(C){return C===u?(e.consume(C),u=null,D):C===null||de(C)?n(C):(e.consume(C),L)}function T(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||Oe(C)?E(C):(e.consume(C),T)}function D(C){return C===47||C===62||ve(C)?v(C):n(C)}function N(C){return C===62?(e.consume(C),P):n(C)}function P(C){return C===null||de(C)?A(C):ve(C)?(e.consume(C),P):n(C)}function A(C){return C===45&&i===2?(e.consume(C),Q):C===60&&i===1?(e.consume(C),J):C===62&&i===4?(e.consume(C),ae):C===63&&i===3?(e.consume(C),S):C===93&&i===5?(e.consume(C),X):de(C)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(UN,O,z)(C)):C===null||de(C)?(e.exit("htmlFlowData"),z(C)):(e.consume(C),A)}function z(C){return e.check(Jc,U,O)(C)}function U(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),I}function I(C){return C===null||de(C)?z(C):(e.enter("htmlFlowData"),A(C))}function Q(C){return C===45?(e.consume(C),S):A(C)}function J(C){return C===47?(e.consume(C),a="",H):A(C)}function H(C){if(C===62){const F=a.toLowerCase();return Xc.includes(F)?(e.consume(C),ae):A(C)}return yt(C)&&a.length<8?(e.consume(C),a+=String.fromCharCode(C),H):A(C)}function X(C){return C===93?(e.consume(C),S):A(C)}function S(C){return C===62?(e.consume(C),ae):C===45&&i===2?(e.consume(C),S):A(C)}function ae(C){return C===null||de(C)?(e.exit("htmlFlowData"),O(C)):(e.consume(C),ae)}function O(C){return e.exit("htmlFlow"),t(C)}}function WN(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(El,t,n)}}const VN={name:"htmlText",tokenize:QN};function QN(e,t,n){const r=this;let i,l,a;return o;function o(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),u}function u(S){return S===33?(e.consume(S),c):S===47?(e.consume(S),E):S===63?(e.consume(S),v):yt(S)?(e.consume(S),T):n(S)}function c(S){return S===45?(e.consume(S),h):S===91?(e.consume(S),l=0,p):yt(S)?(e.consume(S),y):n(S)}function h(S){return S===45?(e.consume(S),m):n(S)}function d(S){return S===null?n(S):S===45?(e.consume(S),f):de(S)?(a=d,J(S)):(e.consume(S),d)}function f(S){return S===45?(e.consume(S),m):d(S)}function m(S){return S===62?Q(S):S===45?f(S):d(S)}function p(S){const ae="CDATA[";return S===ae.charCodeAt(l++)?(e.consume(S),l===ae.length?g:p):n(S)}function g(S){return S===null?n(S):S===93?(e.consume(S),w):de(S)?(a=g,J(S)):(e.consume(S),g)}function w(S){return S===93?(e.consume(S),x):g(S)}function x(S){return S===62?Q(S):S===93?(e.consume(S),x):g(S)}function y(S){return S===null||S===62?Q(S):de(S)?(a=y,J(S)):(e.consume(S),y)}function v(S){return S===null?n(S):S===63?(e.consume(S),b):de(S)?(a=v,J(S)):(e.consume(S),v)}function b(S){return S===62?Q(S):v(S)}function E(S){return yt(S)?(e.consume(S),k):n(S)}function k(S){return S===45||vt(S)?(e.consume(S),k):L(S)}function L(S){return de(S)?(a=L,J(S)):ve(S)?(e.consume(S),L):Q(S)}function T(S){return S===45||vt(S)?(e.consume(S),T):S===47||S===62||Oe(S)?D(S):n(S)}function D(S){return S===47?(e.consume(S),Q):S===58||S===95||yt(S)?(e.consume(S),N):de(S)?(a=D,J(S)):ve(S)?(e.consume(S),D):Q(S)}function N(S){return S===45||S===46||S===58||S===95||vt(S)?(e.consume(S),N):P(S)}function P(S){return S===61?(e.consume(S),A):de(S)?(a=P,J(S)):ve(S)?(e.consume(S),P):D(S)}function A(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),i=S,z):de(S)?(a=A,J(S)):ve(S)?(e.consume(S),A):(e.consume(S),U)}function z(S){return S===i?(e.consume(S),i=void 0,I):S===null?n(S):de(S)?(a=z,J(S)):(e.consume(S),z)}function U(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||Oe(S)?D(S):(e.consume(S),U)}function I(S){return S===47||S===62||Oe(S)?D(S):n(S)}function Q(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function J(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),H}function H(S){return ve(S)?Ae(e,X,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):X(S)}function X(S){return e.enter("htmlTextData"),a(S)}}const zh={name:"labelEnd",resolveAll:YN,resolveTo:JN,tokenize:XN},qN={tokenize:ZN},GN={tokenize:eC},KN={tokenize:tC};function YN(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&yn(e,0,e.length,n),e}function JN(e,t){let n=e.length,r=0,i,l,a;for(;n--;){const h=e[n][1];if(i){if(h.type==="link"||h.type==="labelLink"&&h._inactive)break;e[n][0]==="enter"&&h.type==="labelLink"&&(h._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(h.type==="labelImage"||h.type==="labelLink")&&!h._balanced&&(i=n,h.type!=="labelLink")){r=2;break}}else h.type==="labelEnd"&&(l=n)}const o={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[l][1].end}},c={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[l-2][1].start}};return a=[["enter",o,t],["enter",u,t]],a=nn(a,e.slice(i+1,i+r+3)),a=nn(a,[["enter",c,t]]),a=nn(a,Do(t.parser.constructs.insideSpan.null,e.slice(i+r+4,l-3),t)),a=nn(a,[["exit",c,t],e[l-2],e[l-1],["exit",u,t]]),a=nn(a,e.slice(l+1)),a=nn(a,[["exit",o,t]]),yn(e,i,e.length,a),e}function XN(e,t,n){const r=this,i=r._labelStarts;let l,a;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();l=i[i.length-1]}return o;function o(f){return l?l._inactive?d(f):(a=r.parser.defined.includes(vn(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),u):n(f)}function u(f){return f===40?e.attempt(qN,h,a?h:d)(f):f===91?e.attempt(GN,h,a?c:d)(f):a?h(f):d(f)}function c(f){return e.attempt(KN,h,d)(f)}function h(f){return i.pop(),t(f)}function d(f){return l._balanced=!0,n(f)}}function ZN(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return Oe(d)?Vi(e,l)(d):l(d)}function l(d){return d===41?h(d):pv(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return Oe(d)?Vi(e,u)(d):h(d)}function o(d){return n(d)}function u(d){return d===34||d===39||d===40?gv(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):h(d)}function c(d){return Oe(d)?Vi(e,h)(d):h(d)}function h(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function eC(e,t,n){const r=this;return i;function i(o){return mv.call(r,e,l,a,"reference","referenceMarker","referenceString")(o)}function l(o){return r.parser.defined.includes(vn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function tC(e,t,n){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const nC={name:"labelStartImage",resolveAll:zh.resolveAll,tokenize:rC};function rC(e,t,n){const r=this;let i;return l;function l(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),a}function a(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),i=e.exit("labelImage"),o):n(u)}function o(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(u))}}const sC={name:"labelStartLink",resolveAll:zh.resolveAll,tokenize:iC};function iC(e,t,n){const r=this;let i;return l;function l(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),i=e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(o))}}const Su={name:"lineEnding",tokenize:lC};function lC(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ae(e,t,"linePrefix")}}const Ca={name:"thematicBreak",tokenize:aC};function aC(e,t,n){let r=0,i;return l;function l(c){return e.enter("thematicBreak"),a(c)}function a(c){return i=c,o(c)}function o(c){return c===i?(e.enter("thematicBreakSequence"),u(c)):r>=3&&(c===null||de(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),ve(c)?Ae(e,o,"whitespace")(c):o(c))}}const Lt={continuation:{tokenize:dC},exit:fC,name:"list",tokenize:cC},oC={partial:!0,tokenize:pC},uC={partial:!0,tokenize:hC};function cC(e,t,n){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(m){const p=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:Kc(m)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(Ca,n,c)(m):c(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(m)}return n(m)}function u(m){return Kc(m)&&++a<10?(e.consume(m),u):(!r.interrupt||a<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),c(m)):n(m)}function c(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(El,r.interrupt?n:h,e.attempt(oC,f,d))}function h(m){return r.containerState.initialBlankLine=!0,l++,f(m)}function d(m){return ve(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),f):n(m)}function f(m){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function dC(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(El,i,l);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ae(e,t,"listItemIndent",r.containerState.size+1)(o)}function l(o){return r.containerState.furtherBlankLines||!ve(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(uC,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ae(e,e.attempt(Lt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function hC(e,t,n){const r=this;return Ae(e,i,"listItemIndent",r.containerState.size+1);function i(l){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(l):n(l)}}function fC(e){e.exit(this.containerState.type)}function pC(e,t,n){const r=this;return Ae(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const a=r.events[r.events.length-1];return!ve(l)&&a&&a[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const em={name:"setextUnderline",resolveTo:mC,tokenize:gC};function mC(e,t){const n=new so;let r=e.length,i,l,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(l=r)}else e[r][1].type==="content"&&n.add(r,1,[]),!a&&e[r][1].type==="definition"&&(a=r);const o={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",a?(n.add(l,0,[["enter",o,t]]),n.add(a+1,0,[["exit",e[i][1],t]]),e[i][1].end={...e[a][1].end}):e[i][1]=o,n.add(e.length,0,[["exit",o,t]]),n.consume(e),e}function gC(e,t,n){const r=this;let i;return l;function l(c){let h=r.events.length,d;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){d=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===i?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),ve(c)?Ae(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||de(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const xC={tokenize:yC};function yC(e){const t=this,n=e.attempt(El,r,e.attempt(this.parser.constructs.flowInitial,i,Ae(e,e.attempt(this.parser.constructs.flow,i,e.attempt(CN,i)),"linePrefix")));return n;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const vC={resolveAll:vv()},jC=yv("string"),wC=yv("text");function yv(e){return{resolveAll:vv(e==="text"?kC:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],l=n.attempt(i,a,o);return a;function a(h){return c(h)?l(h):o(h)}function o(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),u}function u(h){return c(h)?(n.exit("data"),l(h)):(n.consume(h),u)}function c(h){if(h===null)return!0;const d=i[h];let f=-1;if(d)for(;++f<d.length;){const m=d[f];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function vv(e){return t;function t(n,r){let i=-1,l;for(;++i<=n.length;)l===void 0?n[i]&&n[i][1].type==="data"&&(l=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==l+2&&(n[l][1].end=n[i-1][1].end,n.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(n,r):n}}function kC(e,t){const n=new so;let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],l=t.sliceStream(i);let a=l.length,o=-1,u=0,c;for(;a--;){const h=l[a];if(typeof h=="string"){for(o=h.length;h.charCodeAt(o-1)===32;)u++,o--;if(o)break;o=-1}else if(h===-2)c=!0,u++;else if(h!==-1){a++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(u=0),u){const h={type:r===e.length||c||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:i.start._bufferIndex+o,_index:i.start._index+a,line:i.end.line,column:i.end.column-u,offset:i.end.offset-u},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):n.add(r,0,[["enter",h,t],["exit",h,t]])}r++}return n.consume(e),e}const bC={42:Lt,43:Lt,45:Lt,48:Lt,49:Lt,50:Lt,51:Lt,52:Lt,53:Lt,54:Lt,55:Lt,56:Lt,57:Lt,62:cv},SC={91:AN},NC={[-2]:bu,[-1]:bu,32:bu},CC={35:_N,42:Ca,45:[em,Ca],60:FN,61:em,95:Ca,96:Zp,126:Zp},EC={38:hv,92:dv},TC={[-5]:Su,[-4]:Su,[-3]:Su,33:nC,38:hv,42:Yc,60:[aN,VN],91:sC,92:[MN,dv],93:zh,95:Yc,96:jN},PC={null:[Yc,vC]},RC={null:[42,95]},AC={null:[]},LC=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:RC,contentInitial:SC,disable:AC,document:bC,flow:CC,flowInitial:NC,insideSpan:PC,string:EC,text:TC},Symbol.toStringTag,{value:"Module"}));function IC(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},l=[];let a=[],o=[];const u={attempt:L(E),check:L(k),consume:y,enter:v,exit:b,interrupt:L(k,{interrupt:!0})},c={code:null,containerState:{},defineSkip:g,events:[],now:p,parser:e,previous:null,sliceSerialize:f,sliceStream:m,write:d};let h=t.tokenize.call(c,u);return t.resolveAll&&l.push(t),c;function d(P){return a=nn(a,P),w(),a[a.length-1]!==null?[]:(T(t,0),c.events=Do(l,c.events,c),c.events)}function f(P,A){return MC(m(P),A)}function m(P){return DC(a,P)}function p(){const{_bufferIndex:P,_index:A,line:z,column:U,offset:I}=r;return{_bufferIndex:P,_index:A,line:z,column:U,offset:I}}function g(P){i[P.line]=P.column,N()}function w(){for(;r._index<a.length;){const P=a[r._index];if(typeof P=="string"){const A=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===A&&r._bufferIndex<P.length;)x(P.charCodeAt(r._bufferIndex))}else x(P)}}function x(P){h=h(P)}function y(P){de(P)?(r.line++,r.column=1,r.offset+=P===-3?2:1,N()):P!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=P}function v(P,A){const z=A||{};return z.type=P,z.start=p(),c.events.push(["enter",z,c]),o.push(z),z}function b(P){const A=o.pop();return A.end=p(),c.events.push(["exit",A,c]),A}function E(P,A){T(P,A.from)}function k(P,A){A.restore()}function L(P,A){return z;function z(U,I,Q){let J,H,X,S;return Array.isArray(U)?O(U):"tokenize"in U?O([U]):ae(U);function ae(oe){return B;function B(he){const ze=he!==null&&oe[he],Ke=he!==null&&oe.null,W=[...Array.isArray(ze)?ze:ze?[ze]:[],...Array.isArray(Ke)?Ke:Ke?[Ke]:[]];return O(W)(he)}}function O(oe){return J=oe,H=0,oe.length===0?Q:C(oe[H])}function C(oe){return B;function B(he){return S=D(),X=oe,oe.partial||(c.currentConstruct=oe),oe.name&&c.parser.constructs.disable.null.includes(oe.name)?Z():oe.tokenize.call(A?Object.assign(Object.create(c),A):c,u,F,Z)(he)}}function F(oe){return P(X,S),I}function Z(oe){return S.restore(),++H<J.length?C(J[H]):Q}}}function T(P,A){P.resolveAll&&!l.includes(P)&&l.push(P),P.resolve&&yn(c.events,A,c.events.length-A,P.resolve(c.events.slice(A),c)),P.resolveTo&&(c.events=P.resolveTo(c.events,c))}function D(){const P=p(),A=c.previous,z=c.currentConstruct,U=c.events.length,I=Array.from(o);return{from:U,restore:Q};function Q(){r=P,c.previous=A,c.currentConstruct=z,c.events.length=U,o=I,N()}}function N(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function DC(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,l=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,l)];else{if(a=e.slice(n,i),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}l>0&&a.push(e[i].slice(0,l))}return a}function MC(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const l=e[n];let a;if(typeof l=="string")a=l;else switch(l){case-5:{a="\r";break}case-4:{a=`
|
|
362
362
|
`;break}case-3:{a=`\r
|
|
363
363
|
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(l)}i=l===-2,r.push(a)}return r.join("")}function zC(e){const r={constructs:lv([LC,...(e||{}).extensions||[]]),content:i(eN),defined:[],document:i(nN),flow:i(xC),lazy:{},string:i(jC),text:i(wC)};return r;function i(l){return a;function a(o){return IC(r,l,o)}}}function _C(e){for(;!fv(e););return e}const tm=/[\0\t\n\r]/g;function $C(){let e=1,t="",n=!0,r;return i;function i(l,a,o){l=t+(typeof l=="string"?l.toString():new TextDecoder(a||void 0).decode(l));const u=[];let c=0;for(t="",n&&(l.charCodeAt(0)===65279&&c++,n=void 0);c<l.length;){tm.lastIndex=c;const h=tm.exec(l),d=h&&h.index!==void 0?h.index:l.length,f=l.charCodeAt(d);if(!h){t=l.slice(c);break}if(f===10&&c===d&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),c<d&&(u.push(l.slice(c,d)),e+=d-c),f){case 0:{u.push(65533),e++;break}case 9:{const m=Math.ceil(e/4)*4;for(u.push(-2);e++<m;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:r=!0,e=1}c=d+1}return o&&(r&&u.push(-5),t&&u.push(t),u.push(null)),u}}const OC=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function FC(e){return e.replace(OC,UC)}function UC(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return av(n.slice(l?2:1),l?16:10)}return Mh(n)||e}const jv={}.hasOwnProperty;function BC(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),HC(n)(_C(zC(n).document().write($C()(e,t,!0))))}function HC(e){const t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Al),autolinkProtocol:N,autolinkEmail:N,atxHeading:a(ee),blockQuote:a(W),characterEscape:N,characterReference:N,codeFenced:a(fe),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(fe,o),codeText:a(Ze,o),codeTextData:N,data:N,codeFlowValue:N,definition:a(Xt),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(Zt),hardBreakEscape:a(Ne),hardBreakTrailing:a(Ne),htmlFlow:a(et,o),htmlFlowData:N,htmlText:a(et,o),htmlTextData:N,image:a(Lr),label:o,link:a(Al),listItem:a(Uo),listItemValue:m,listOrdered:a(Ll,f),listUnordered:a(Ll),paragraph:a(Dn),reference:F,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ee),strong:a(Ir),thematicBreak:a(ci)},exit:{atxHeading:c(),atxHeadingSequence:k,autolink:c(),autolinkEmail:Ke,autolinkProtocol:ze,blockQuote:c(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:B,characterReference:he,codeFenced:c(x),codeFencedFence:w,codeFencedFenceInfo:p,codeFencedFenceMeta:g,codeFlowValue:P,codeIndented:c(y),codeText:c(Q),codeTextData:P,data:P,definition:c(),definitionDestinationString:E,definitionLabelString:v,definitionTitleString:b,emphasis:c(),hardBreakEscape:c(z),hardBreakTrailing:c(z),htmlFlow:c(U),htmlFlowData:P,htmlText:c(I),htmlTextData:P,image:c(H),label:S,labelText:X,lineEnding:A,link:c(J),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Z,resourceDestinationString:ae,resourceTitleString:O,resource:C,setextHeading:c(D),setextHeadingLineSequence:T,setextHeadingText:L,strong:c(),thematicBreak:c()}};wv(t,(e||{}).mdastExtensions||[]);const n={};return r;function r($){let G={type:"root",children:[],position:void 0};const pe={stack:[G],tokenStack:[],config:t,enter:u,exit:h,buffer:o,resume:d,data:n},me=[],kt=[];let Ce=-1;for(;++Ce<$.length;)if(kt.push($[Ce]),$[Ce][1].type==="listOrdered"||$[Ce][1].type==="listUnordered")if($[Ce][0]==="enter")me.push(kt.length-1);else{const pt=me.pop();l(kt,pt)}for($=kt,Ce=-1;++Ce<$.length;){const pt=t[$[Ce][0]];$[Ce][0]==="enter"&&t.beforeEnter.length>0&&i(t.beforeEnter,{...pe,sliceSerialize:$[Ce][2].sliceSerialize},$[Ce][1]),jv.call(pt,$[Ce][1].type)&&pt[$[Ce][1].type].call({...pe,sliceSerialize:$[Ce][2].sliceSerialize},$[Ce][1]),$[Ce][0]==="exit"&&t.afterExit.length>0&&i(t.afterExit,{...pe,sliceSerialize:$[Ce][2].sliceSerialize},$[Ce][1])}if(pe.tokenStack.length>0){const pt=pe.tokenStack[pe.tokenStack.length-1];(pt[1]||nm).call(pe,void 0,pt[0])}for(G.position={start:er($.length>0?$[0][1].start:{line:1,column:1,offset:0}),end:er($.length>0?$[$.length-2][1].end:{line:1,column:1,offset:0})},Ce=-1;++Ce<t.transforms.length;)G=t.transforms[Ce](G)||G;return G}function i($,G,pe){let me=-1;for(;++me<$.length;)$[me].call(G,pe)}function l($,G){const pe=$.length-1;let me=G-1,kt=-1,Ce=!1,pt,Ut,Jn,Dr;const Xn=[];for(;++me<=pe;){const mt=$[me];switch(mt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{mt[0]==="enter"?kt++:kt--,Dr=void 0;break}case"lineEndingBlank":{mt[0]==="enter"&&(pt&&!Dr&&!kt&&!Jn&&(Jn=me),Dr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Dr=void 0}if(!kt&&mt[0]==="enter"&&mt[1].type==="listItemPrefix"||kt===-1&&mt[0]==="exit"&&(mt[1].type==="listUnordered"||mt[1].type==="listOrdered")){if(pt){let Sn=me;for(Ut=void 0;Sn--;){const cn=$[Sn];if(cn[1].type==="lineEnding"||cn[1].type==="lineEndingBlank"){if(cn[0]==="exit")continue;Ut&&($[Ut][1].type="lineEndingBlank",Ce=!0),cn[1].type="lineEnding",Ut=Sn}else if(!(cn[1].type==="linePrefix"||cn[1].type==="blockQuotePrefix"||cn[1].type==="blockQuotePrefixWhitespace"||cn[1].type==="blockQuoteMarker"||cn[1].type==="listItemIndent"))break}Jn&&(!Ut||Jn<Ut)&&(pt._spread=!0),pt.end=Object.assign({},Ut?$[Ut][1].start:mt[1].end),Xn.push({at:Ut||me,event:["exit",pt,mt[2]]})}if(mt[1].type==="listItemPrefix"){const Sn={type:"listItem",_spread:!1,start:Object.assign({},mt[1].start),end:void 0};pt=Sn,Xn.push({at:me,event:["enter",Sn,mt[2]]}),Jn=void 0,Dr=!0}}}const Mr=$.splice(G);let ps=0;for(me=-1;++me<Mr.length;){for(;ps<Xn.length&&Xn[ps].at===G+me;)$.push(Xn[ps++].event);$.push(Mr[me])}$[G][1]._spread=Ce}function a($,G){return pe;function pe(me){u.call(this,$(me),me),G&&G.call(this,me)}}function o(){this.stack.push({type:"fragment",children:[]})}function u($,G,pe){this.stack[this.stack.length-1].children.push($),this.stack.push($),this.tokenStack.push([G,pe||void 0]),$.position={start:er(G.start),end:void 0}}function c($){return G;function G(pe){$&&$.call(this,pe),h.call(this,pe)}}function h($,G){const pe=this.stack.pop(),me=this.tokenStack.pop();if(!me)throw new Error("Cannot close `"+$.type+"` ("+Wi({start:$.start,end:$.end})+"): it’s not open");me[0].type!==$.type&&(G?G.call(this,$,me[0]):(me[1]||nm).call(this,$,me[0])),pe.position.end=er($.end)}function d(){return Io(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function m($){if(this.data.expectingFirstListItemValue){const G=this.stack[this.stack.length-2];G.start=Number.parseInt(this.sliceSerialize($),10),this.data.expectingFirstListItemValue=void 0}}function p(){const $=this.resume(),G=this.stack[this.stack.length-1];G.lang=$}function g(){const $=this.resume(),G=this.stack[this.stack.length-1];G.meta=$}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const $=this.resume(),G=this.stack[this.stack.length-1];G.value=$.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const $=this.resume(),G=this.stack[this.stack.length-1];G.value=$.replace(/(\r?\n|\r)$/g,"")}function v($){const G=this.resume(),pe=this.stack[this.stack.length-1];pe.label=G,pe.identifier=vn(this.sliceSerialize($)).toLowerCase()}function b(){const $=this.resume(),G=this.stack[this.stack.length-1];G.title=$}function E(){const $=this.resume(),G=this.stack[this.stack.length-1];G.url=$}function k($){const G=this.stack[this.stack.length-1];if(!G.depth){const pe=this.sliceSerialize($).length;G.depth=pe}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function T($){const G=this.stack[this.stack.length-1];G.depth=this.sliceSerialize($).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function N($){const pe=this.stack[this.stack.length-1].children;let me=pe[pe.length-1];(!me||me.type!=="text")&&(me=Il(),me.position={start:er($.start),end:void 0},pe.push(me)),this.stack.push(me)}function P($){const G=this.stack.pop();G.value+=this.sliceSerialize($),G.position.end=er($.end)}function A($){const G=this.stack[this.stack.length-1];if(this.data.atHardBreak){const pe=G.children[G.children.length-1];pe.position.end=er($.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(G.type)&&(N.call(this,$),P.call(this,$))}function z(){this.data.atHardBreak=!0}function U(){const $=this.resume(),G=this.stack[this.stack.length-1];G.value=$}function I(){const $=this.resume(),G=this.stack[this.stack.length-1];G.value=$}function Q(){const $=this.resume(),G=this.stack[this.stack.length-1];G.value=$}function J(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=G,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function H(){const $=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";$.type+="Reference",$.referenceType=G,delete $.url,delete $.title}else delete $.identifier,delete $.label;this.data.referenceType=void 0}function X($){const G=this.sliceSerialize($),pe=this.stack[this.stack.length-2];pe.label=FC(G),pe.identifier=vn(G).toLowerCase()}function S(){const $=this.stack[this.stack.length-1],G=this.resume(),pe=this.stack[this.stack.length-1];if(this.data.inReference=!0,pe.type==="link"){const me=$.children;pe.children=me}else pe.alt=G}function ae(){const $=this.resume(),G=this.stack[this.stack.length-1];G.url=$}function O(){const $=this.resume(),G=this.stack[this.stack.length-1];G.title=$}function C(){this.data.inReference=void 0}function F(){this.data.referenceType="collapsed"}function Z($){const G=this.resume(),pe=this.stack[this.stack.length-1];pe.label=G,pe.identifier=vn(this.sliceSerialize($)).toLowerCase(),this.data.referenceType="full"}function oe($){this.data.characterReferenceType=$.type}function B($){const G=this.sliceSerialize($),pe=this.data.characterReferenceType;let me;pe?(me=av(G,pe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):me=Mh(G);const kt=this.stack[this.stack.length-1];kt.value+=me}function he($){const G=this.stack.pop();G.position.end=er($.end)}function ze($){P.call(this,$);const G=this.stack[this.stack.length-1];G.url=this.sliceSerialize($)}function Ke($){P.call(this,$);const G=this.stack[this.stack.length-1];G.url="mailto:"+this.sliceSerialize($)}function W(){return{type:"blockquote",children:[],position:void 0}}function fe(){return{type:"code",lang:null,meta:null,value:"",position:void 0}}function Ze(){return{type:"inlineCode",value:"",position:void 0}}function Xt(){return{type:"definition",identifier:"",label:null,title:null,url:"",position:void 0}}function Zt(){return{type:"emphasis",children:[],position:void 0}}function ee(){return{type:"heading",depth:0,children:[],position:void 0}}function Ne(){return{type:"break",position:void 0}}function et(){return{type:"html",value:"",position:void 0}}function Lr(){return{type:"image",title:null,url:"",alt:null,position:void 0}}function Al(){return{type:"link",title:null,url:"",children:[],position:void 0}}function Ll($){return{type:"list",ordered:$.type==="listOrdered",start:null,spread:$._spread,children:[],position:void 0}}function Uo($){return{type:"listItem",spread:$._spread,checked:null,children:[],position:void 0}}function Dn(){return{type:"paragraph",children:[],position:void 0}}function Ir(){return{type:"strong",children:[],position:void 0}}function Il(){return{type:"text",value:"",position:void 0}}function ci(){return{type:"thematicBreak",position:void 0}}}function er(e){return{line:e.line,column:e.column,offset:e.offset}}function wv(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?wv(e,r):WC(e,r)}}function WC(e,t){let n;for(n in t)if(jv.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"afterExit":case"beforeEnter":{const r=t[n];r&&e[n].push(r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function nm(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Wi({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Wi({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Wi({start:t.start,end:t.end})+") is still open")}function VC(e){const t=this;t.parser=n;function n(r){return BC(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function QC(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function qC(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
package/web/index.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
14
14
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
15
15
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
16
|
-
<script type="module" crossorigin src="/assets/index-
|
|
16
|
+
<script type="module" crossorigin src="/assets/index-UA4GinAe.js"></script>
|
|
17
17
|
<link rel="stylesheet" crossorigin href="/assets/index-CeK0TK15.css">
|
|
18
18
|
</head>
|
|
19
19
|
<body>
|