@inkeep/open-knowledge 0.15.1-beta.6 → 0.15.1-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/skills/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +2 -2
- package/dist/cli.mjs +39 -39
- package/dist/constants-Bobe-usB.mjs +2 -0
- package/dist/dist-By70vg0t.mjs +1 -0
- package/dist/{dist-Bl_tym1Z.mjs → dist-CTSVLMDV.mjs} +9 -9
- package/dist/{gh-detect-DRHds4VZ.mjs → gh-detect-wbzQ2Z5B.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{init-Bjqbi7tq.mjs → init-Cm5GW5mh.mjs} +4 -4
- package/dist/init-D-d4SGw0.mjs +1 -0
- package/dist/loader-DGNS5l_B.mjs +1 -0
- package/dist/{loader-BkYww0cx.mjs → loader-Dkfxwsah.mjs} +3 -3
- package/dist/{preview-D9LzF-Fr.mjs → preview-B-cCcCju.mjs} +2 -2
- package/dist/preview-tihHY5hY.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-CcoGE_xm.js → ActivityModeContent-DYW6IyGe.js} +1 -1
- package/dist/public/assets/{DocumentContext-BYFYD2OR.js → DocumentContext-FDflxKx1.js} +1 -1
- package/dist/public/assets/{GraphPanel-B-5AaMRg.js → GraphPanel-BgmjHl8X.js} +1 -1
- package/dist/public/assets/{OpenInAgentMenuRequestContext-Df4A0AvJ.js → OpenInAgentMenuRequestContext-DbnEO7GU.js} +1 -1
- package/dist/public/assets/{SettingsDialogBody-DEjtbwaA.js → SettingsDialogBody-Cw9UBlHN.js} +1 -1
- package/dist/public/assets/{SourceEditor-DLdOP88L.js → SourceEditor-Dt3ubo6_.js} +1 -1
- package/dist/public/assets/{TerminalPanel-yOVM28DS.js → TerminalPanel-Cs1MTR-8.js} +1 -1
- package/dist/public/assets/{config-validation-events-CRgM6DHS.js → config-validation-events-fxmQuSvc.js} +1 -1
- package/dist/public/assets/{dist-CVCWWNPG.js → dist-BRazL6Zi.js} +48 -48
- package/dist/public/assets/{index-H6g-q9oP.js → index-DnhI2qSt.js} +4 -4
- package/dist/public/assets/{keyboard-shortcuts-Bg9IdvnR.js → keyboard-shortcuts-73a1LeH2.js} +1 -1
- package/dist/public/assets/{prop-types-BSgyUl9p.js → prop-types-C2NMu-PZ.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-BMIQLSDV.js → target-navigation-intent-xCp4fypZ.js} +1 -1
- package/dist/public/index.html +8 -8
- package/dist/{repair-launch-json-hXlTjsfs.mjs → repair-launch-json-CV5266VW.mjs} +2 -2
- package/dist/{repair-mcp-configs-h-6B0X-K.mjs → repair-mcp-configs-CHXzSTzV.mjs} +2 -2
- package/dist/repair-skills-BQnVB088.mjs +1 -0
- package/dist/{repair-skills-GcwKI4g2.mjs → repair-skills-M719vrZS.mjs} +2 -2
- package/dist/{server-lock-BpjJj3OD-CrZDl-wH.mjs → server-lock-BpjJj3OD-DlYx_Xz-.mjs} +26 -26
- package/dist/server-lock-CyhBidkz-DUTkjNDG.mjs +1 -0
- package/dist/{src-BJmU1xUi.mjs → src-DKbIfvR1.mjs} +2 -2
- package/dist/start-BPtlwTTP.mjs +1 -0
- package/dist/{start-DL_BorjL.mjs → start-CY65wpTR.mjs} +2 -2
- package/dist/{write-project-skill-DyOqNMyv.mjs → write-project-skill-CD8uXqFq.mjs} +2 -2
- package/package.json +1 -1
- package/dist/constants-CzR7h6sJ.mjs +0 -2
- package/dist/dist-CPY1U8Js.mjs +0 -1
- package/dist/init-U6l1ZhLC.mjs +0 -1
- package/dist/loader-DTHLxJVE.mjs +0 -1
- package/dist/preview-BQT50xLD.mjs +0 -1
- package/dist/repair-skills-B4UCaBBt.mjs +0 -1
- package/dist/server-lock-CyhBidkz-DXuuHDkK.mjs +0 -1
- package/dist/start-83Z5Rbjk.mjs +0 -1
|
@@ -297,64 +297,64 @@ ${t.slice(l+2)}`,d+=1;else break}t.push({indent:l,number:parseInt(s,10),content:
|
|
|
297
297
|
`):``,markdownTokenizer:{name:`orderedList`,level:`block`,start:e=>{let t=e.match(/^(\s*)(\d+)\.\s+/)?.index;return t===void 0?-1:t},tokenize:(e,t,n)=>{let r=e.split(`
|
|
298
298
|
`),[i,a]=oO(r);if(i.length===0)return;let o=sO(i,0,n);if(o.length!==0)return{type:`list`,ordered:!0,start:i[0]?.number||1,items:o,raw:r.slice(0,a).join(`
|
|
299
299
|
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(lO,this.editor.getAttributes(uO)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=fS({find:dO,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=fS({find:dO,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(uO)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),pO=/^\s*(\[([( |x])?\])\s$/,mO=jS.create({name:`taskItem`,addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:`taskList`,a11y:void 0}},content(){return this.options.nested?`paragraph block*`:`paragraph+`},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute(`data-checked`);return t===``||t===`true`},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return[`li`,Sb(this.options.HTMLAttributes,t,{"data-type":this.name}),[`label`,[`input`,{type:`checkbox`,checked:e.attrs.checked?`checked`:null}],[`span`]],[`div`,0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode(`paragraph`,{},t.parseInline(e.tokens))):e.text?n.push(t.createNode(`paragraph`,{},[t.createNode(`text`,{text:e.text})])):n.push(t.createNode(`paragraph`,{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode(`taskItem`,{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>ES(e,t,`- [${e.attrs?.checked?`x`:` `}] `),addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let i=document.createElement(`li`),a=document.createElement(`label`),o=document.createElement(`span`),s=document.createElement(`input`),c=document.createElement(`div`),l=e=>{var t;s.ariaLabel=((t=this.options.a11y)?.checkboxLabel)?.call(t,e,s.checked)||`Task item checkbox for ${e.textContent||`empty task item`}`};l(e),a.contentEditable=`false`,s.type=`checkbox`,s.addEventListener(`mousedown`,e=>e.preventDefault()),s.addEventListener(`change`,t=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}let{checked:i}=t.target;r.isEditable&&typeof n==`function`&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if(typeof t!=`number`)return!1;let r=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...r?.attrs,checked:i}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,i)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{i.setAttribute(e,t)}),i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,a.append(s,o),i.append(a,c),Object.entries(t).forEach(([e,t])=>{i.setAttribute(e,t)});let u=new Set(Object.keys(t));return{dom:i,contentDOM:c,update:e=>{if(e.type!==this.type)return!1;i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,l(e);let t=r.extensionManager.attributes,n=Cb(e,t),a=new Set(Object.keys(n)),o=this.options.HTMLAttributes;return u.forEach(e=>{a.has(e)||(e in o?i.setAttribute(e,o[e]):i.removeAttribute(e))}),Object.entries(n).forEach(([e,t])=>{t==null?e in o?i.setAttribute(e,o[e]):i.removeAttribute(e):i.setAttribute(e,t)}),u=a,!0}}}},addInputRules(){return[fS({find:pO,type:this.type,getAttributes:e=>({checked:e[e.length-1]===`x`})})]}}),hO=jS.create({name:`taskList`,addOptions(){return{itemTypeName:`taskItem`,HTMLAttributes:{}}},group:`block list`,content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return[`ul`,Sb(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode(`taskList`,{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
|
|
300
|
-
`):``,markdownTokenizer:{name:`taskList`,level:`block`,start(e){let t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;return t===void 0?-1:t},tokenize(e,t,n){let r=e=>{let t=TS(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);return t?[{type:`taskList`,raw:t.raw,items:t.items}]:n.blockTokens(e)},i=TS(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:`taskList`,raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});qx.create({name:`listKit`,addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(GD.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(KD.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(rO.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(fO.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(mO.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(hO.configure(this.options.taskList)),e}});var gO=` `,_O=`\xA0`,vO=jS.create({name:`paragraph`,priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:`block`,content:`inline*`,parseHTML(){return[{tag:`p`}]},renderHTML({HTMLAttributes:e}){return[`p`,Sb(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(n.length===1&&n[0].type===`image`)return t.parseChildren([n[0]]);let r=t.parseInline(n);return n.length===1&&n[0].type===`text`&&(n[0].raw===gO||n[0].text===gO||n[0].raw===_O||n[0].text===_O)&&r.length===1&&r[0].type===`text`&&(r[0].text===gO||r[0].text===_O)?t.createNode(`paragraph`,void 0,[]):t.createNode(`paragraph`,void 0,r)},renderMarkdown:(e,t,n)=>{if(!e)return``;let r=Array.isArray(e.content)?e.content:[];if(r.length===0){let e=Array.isArray(n?.previousNode?.content)?n.previousNode.content:[];return n?.previousNode?.type===`paragraph`&&e.length===0?gO:``}return t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),yO=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,bO=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,xO=Rx.create({name:`strike`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`s`},{tag:`del`},{tag:`strike`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`line-through`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`s`,Sb(this.options.HTMLAttributes,e),0]},markdownTokenName:`del`,parseMarkdown:(e,t)=>t.applyMark(`strike`,t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[lS({find:yO,type:this.type})]},addPasteRules(){return[NS({find:bO,type:this.type})]}}),SO=xO,CO=jS.create({name:`text`,group:`inline`,parseMarkdown:e=>({type:`text`,text:e.text||``}),renderMarkdown:e=>e.text||``}),wO=Rx.create({name:`underline`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`u`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`underline`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`u`,Sb(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||`underline`,t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:`underline`,level:`inline`,start(e){return e.indexOf(`++`)},tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:`underline`,raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function TO(e={}){return new Hp({view(t){return new EO(t,e)}})}var EO=class{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=t.width??1,this.color=t.color===!1?void 0:t.color||`black`,this.class=t.class,this.handlers=[`dragover`,`dragend`,`drop`,`dragleave`].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,n,r=this.editorView.dom,i=r.getBoundingClientRect(),a=i.width/r.offsetWidth,o=i.height/r.offsetHeight;if(t){let t=e.nodeBefore,r=e.nodeAfter;if(t||r){let e=this.editorView.nodeDOM(this.cursorPos-(t?t.nodeSize:0));if(e){let i=e.getBoundingClientRect(),a=t?i.bottom:i.top;t&&r&&(a=(a+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let s=this.width/2*o;n={left:i.left,right:i.right,top:a-s,bottom:a+s}}}}if(!n){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*a;n={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let s=this.editorView.dom.offsetParent;this.element||(this.element=s.appendChild(document.createElement(`div`)),this.class&&(this.element.className=this.class),this.element.style.cssText=`position: absolute; z-index: 50; pointer-events: none;`,this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle(`prosemirror-dropcursor-block`,t),this.element.classList.toggle(`prosemirror-dropcursor-inline`,!t);let c,l;if(!s||s==document.body&&getComputedStyle(s).position==`static`)c=-pageXOffset,l=-pageYOffset;else{let e=s.getBoundingClientRect(),t=e.width/s.offsetWidth,n=e.height/s.offsetHeight;c=e.left-s.scrollLeft*t,l=e.top-s.scrollTop*n}this.element.style.left=(n.left-c)/a+`px`,this.element.style.top=(n.top-l)/o+`px`,this.element.style.width=(n.right-n.left)/a+`px`,this.element.style.height=(n.bottom-n.top)/o+`px`}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i=typeof r==`function`?r(this.editorView,t,e):r;if(t&&!i){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=np(this.editorView.state.doc,e,this.editorView.dragging.slice);t!=null&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}},DO=class e extends I{constructor(e){super(e,e)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):I.near(r)}content(){return F.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:`gapcursor`,pos:this.head}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for GapCursor.fromJSON`);return new e(t.resolve(n.pos))}getBookmark(){return new OO(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!AO(e)||!jO(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,r=!1){search:for(;;){if(!r&&e.valid(t))return t;let i=t.pos,a=null;for(let r=t.depth;;r--){let o=t.node(r);if(n>0?t.indexAfter(r)<o.childCount:t.index(r)>0){a=o.child(n>0?t.indexAfter(r):t.index(r)-1);break}else if(r==0)return null;i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}for(;;){let o=n>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!R.isSelectable(a)){t=t.doc.resolve(i+a.nodeSize*n),r=!1;continue search}break}a=o,i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}return null}}};DO.prototype.visible=!1,DO.findFrom=DO.findGapCursorFrom,I.jsonID(`gapcursor`,DO);var OO=class e{constructor(e){this.pos=e}map(t){return new e(t.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return DO.valid(t)?new DO(t):I.near(t)}};function kO(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function AO(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(e.childCount==0&&!e.inlineContent||kO(e.type))return!0;if(e.inlineContent)return!1}}return!0}function jO(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(e.childCount==0&&!e.inlineContent||kO(e.type))return!0;if(e.inlineContent)return!1}}return!0}function MO(){return new Hp({props:{decorations:LO,createSelectionBetween(e,t,n){return t.pos==n.pos&&DO.valid(n)?new DO(n):null},handleClick:FO,handleKeyDown:NO,handleDOMEvents:{beforeinput:IO}}})}var NO=iy({ArrowLeft:PO(`horiz`,-1),ArrowRight:PO(`horiz`,1),ArrowUp:PO(`vert`,-1),ArrowDown:PO(`vert`,1)});function PO(e,t){let n=e==`vert`?t>0?`down`:`up`:t>0?`right`:`left`;return function(e,r,i){let a=e.selection,o=t>0?a.$to:a.$from,s=a.empty;if(a instanceof L){if(!i.endOfTextblock(n)||o.depth==0)return!1;s=!1,o=e.doc.resolve(t>0?o.after():o.before())}let c=DO.findGapCursorFrom(o,t,s);return c?(r&&r(e.tr.setSelection(new DO(c))),!0):!1}}function FO(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!DO.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&R.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new DO(r))),!0)}function IO(e,t){if(t.inputType!=`insertCompositionText`||!(e.state.selection instanceof DO))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=P.empty;for(let e=r.length-1;e>=0;e--)i=P.from(r[e].createAndFill(null,i));let a=e.state.tr.replace(n.pos,n.pos,new F(i,0,0));return a.setSelection(L.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function LO(e){if(!(e.selection instanceof DO))return null;let t=document.createElement(`div`);return t.className=`ProseMirror-gapcursor`,uv.create(e.doc,[sv.widget(e.selection.head,t,{key:`gapcursor`})])}var RO=200,zO=function(){};zO.prototype.append=function(e){return e.length?(e=zO.from(e),!this.length&&e||e.length<RO&&this.leafAppend(e)||this.length<RO&&e.leafPrepend(this)||this.appendInner(e)):this},zO.prototype.prepend=function(e){return e.length?zO.from(e).append(this):this},zO.prototype.appendInner=function(e){return new VO(this,e)},zO.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?zO.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},zO.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},zO.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},zO.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},zO.from=function(e){return e instanceof zO?e:e&&e.length?new BO(e):zO.empty};var BO=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return e==0&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(e(this.values[i],r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(e(this.values[i],r+i)===!1)return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=RO)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=RO)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(zO);zO.empty=new BO([]);var VO=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&this.left.forEachInner(e,t,Math.min(n,i),r)===!1||n>i&&this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)===!1||n<i&&this.left.forEachInvertedInner(e,Math.min(t,i),n,r)===!1)return!1},t.prototype.sliceInner=function(e,t){if(e==0&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(zO),HO=500,UO=class e{constructor(e,t){this.items=e,this.eventCount=t}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,c,l=[],u=[];return this.items.forEach((t,n)=>{if(!t.step){i||(i=this.remapping(r,n+1),a=i.maps.length),a--,u.push(t);return}if(i){u.push(new GO(t.map));let e=t.step.map(i.slice(a)),n;e&&o.maybeStep(e).doc&&(n=o.mapping.maps[o.mapping.maps.length-1],l.push(new GO(n,void 0,void 0,l.length+u.length))),a--,n&&i.appendMap(n,a)}else o.maybeStep(t.step);if(t.selection)return s=i?t.selection.map(i.slice(a)):t.selection,c=new e(this.items.slice(0,r).append(u.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let e=0;e<t.steps.length;e++){let r=t.steps[e].invert(t.docs[e]),l=new GO(t.mapping.maps[e],r,n),u;(u=c&&c.merge(l))&&(l=u,e?a.pop():s=s.slice(0,s.length-1)),a.push(l),n&&=(o++,void 0),i||(c=l)}let l=o-r.depth;return l>qO&&(s=WO(s,l),o-=l),new e(s.append(a),o)}remapping(e,t){let n=new bf;return this.items.forEach((t,r)=>{let i=t.mirrorOffset!=null&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(e=>new GO(e))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let c=n;this.items.forEach(e=>{let n=a.getMirror(--c);if(n==null)return;o=Math.min(o,n);let i=a.maps[n];if(e.step){let o=t.steps[n].invert(t.docs[n]),l=e.selection&&e.selection.map(a.slice(c+1,n));l&&s++,r.push(new GO(i,o,l))}else r.push(new GO(i))},i);let l=[];for(let e=n;e<o;e++)l.push(new GO(a.maps[e]));let u=new e(this.items.slice(0,i).append(l).append(r),s);return u.emptyItemCount()>HO&&(u=u.compress(this.items.length-r.length)),u}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((e,o)=>{if(o>=t)i.push(e),e.selection&&a++;else if(e.step){let t=e.step.map(n.slice(r)),o=t&&t.getMap();if(r--,o&&n.appendMap(o,r),t){let s=e.selection&&e.selection.map(n.slice(r));s&&a++;let c=new GO(o.invert(),t,s),l,u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else e.map&&r--},this.items.length,0),new e(zO.from(i.reverse()),a)}};UO.empty=new UO(zO.empty,0);function WO(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&t--==0)return n=r,!1}),e.slice(n)}var GO=class e{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},KO=class{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}},qO=20;function JO(e,t,n,r){let i=n.getMeta(ek),a;if(i)return i.historyState;n.getMeta(ite)&&(e=new KO(e.done,e.undone,null,0,-1));let o=n.getMeta(`appendedTransaction`);if(n.steps.length==0)return e;if(o&&o.getMeta(ek))return o.getMeta(ek).redo?new KO(e.done.addTransform(n,void 0,r,$O(t)),e.undone,YO(n.mapping.maps),e.prevTime,e.prevComposition):new KO(e.done,e.undone.addTransform(n,void 0,r,$O(t)),null,e.prevTime,e.prevComposition);if(n.getMeta(`addToHistory`)!==!1&&!(o&&o.getMeta(`addToHistory`)===!1)){let i=n.getMeta(`composition`),a=e.prevTime==0||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!nte(n,e.prevRanges)),s=o?XO(e.prevRanges,n.mapping):YO(n.mapping.maps);return new KO(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,$O(t)),UO.empty,s,n.time,i??e.prevComposition)}else if(a=n.getMeta(`rebased`))return new KO(e.done.rebased(n,a),e.undone.rebased(n,a),XO(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new KO(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),XO(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function nte(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function YO(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function XO(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),a=t.map(e[r+1],-1);i<=a&&n.push(i,a)}return n}function rte(e,t,n){let r=$O(t),i=ek.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,r),c=new KO(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(ek,{redo:n,historyState:c})}var ZO=!1,QO=null;function $O(e){let t=e.plugins;if(QO!=t){ZO=!1,QO=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){ZO=!0;break}}return ZO}var ek=new Gp(`history`),ite=new Gp(`closeHistory`);function ate(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Hp({key:ek,state:{init(){return new KO(UO.empty,UO.empty,null,0,-1)},apply(t,n,r){return JO(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n==`historyUndo`?nk:n==`historyRedo`?rk:null;return!r||!e.editable?!1:(t.preventDefault(),r(e.state,e.dispatch))}}}})}function tk(e,t){return(n,r)=>{let i=ek.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let a=rte(i,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}var nk=tk(!1,!0),rk=tk(!0,!0);qx.create({name:`characterCount`,addOptions(){return{limit:null,mode:`textSize`,textCounter:e=>e.length,wordCounter:e=>e.split(` `).filter(e=>e!==``).length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)===`textSize`){let e=t.textBetween(0,t.content.size,void 0,` `);return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size,` `,` `);return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new Hp({key:new Gp(`characterCount`),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit;if(i==null||i===0){e=!0;return}let a=this.storage.characters({node:r.doc});if(a>i){let t=a-i;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let n=r.tr.deleteRange(0,t);return e=!0,n}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||n===0||n==null)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r||!e.getMeta(`paste`))return!1;let a=e.selection.$head.pos,o=a-(i-n),s=a;return e.deleteRange(o,s),!(this.storage.characters({node:e.doc})>n)}})]}});var ote=qx.create({name:`dropCursor`,addOptions(){return{color:`currentColor`,width:1,class:void 0}},addProseMirrorPlugins(){return[TO(this.options)]}});qx.create({name:`focus`,addOptions(){return{className:`has-focus`,mode:`all`}},addProseMirrorPlugins(){return[new Hp({key:new Gp(`focus`),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,a=[];if(!n||!r)return uv.create(e,[]);let o=0;this.options.mode===`deepest`&&e.descendants((e,t)=>{if(!e.isText){if(!(i>=t&&i<=t+e.nodeSize-1))return!1;o+=1}});let s=0;return e.descendants((e,t)=>{if(e.isText||!(i>=t&&i<=t+e.nodeSize-1))return!1;if(s+=1,this.options.mode===`deepest`&&o-s>0||this.options.mode===`shallowest`&&s>1)return this.options.mode===`deepest`;a.push(sv.node(t,t+e.nodeSize,{class:this.options.className}))}),uv.create(e,a)}}})]}});var ste=qx.create({name:`gapCursor`,addProseMirrorPlugins(){return[MO()]},extendNodeSchema(e){return{allowGapCursor:gb(z(e,`allowGapCursor`,{name:e.name,options:e.options,storage:e.storage}))??null}}}),ik=`placeholder`;function cte(e){return e.replace(/\s+/g,`-`).replace(/[^a-zA-Z0-9-]/g,``).replace(/^[0-9-]+/,``).replace(/^-+/,``).toLowerCase()}var lte=qx.create({name:`placeholder`,addOptions(){return{emptyEditorClass:`is-editor-empty`,emptyNodeClass:`is-empty`,dataAttribute:ik,placeholder:`Write something …`,showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){let e=this.options.dataAttribute?`data-${cte(this.options.dataAttribute)}`:`data-${ik}`;return[new Hp({key:new Gp(`placeholder`),props:{decorations:({doc:t,selection:n})=>{let r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=n,a=[];if(!r)return null;let o=this.editor.isEmpty;return t.descendants((t,n)=>{let r=i>=n&&i<=n+t.nodeSize,s=!t.isLeaf&&Qb(t);if(!t.type.isTextblock)return this.options.includeChildren;if((r||!this.options.showOnlyCurrent)&&s){let i=[this.options.emptyNodeClass];o&&i.push(this.options.emptyEditorClass);let s=sv.node(n,n+t.nodeSize,{class:i.join(` `),[e]:typeof this.options.placeholder==`function`?this.options.placeholder({editor:this.editor,node:t,pos:n,hasAnchor:r}):this.options.placeholder});a.push(s)}return this.options.includeChildren}),uv.create(t,a)}}})]}});qx.create({name:`selection`,addOptions(){return{className:`selection`}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new Hp({key:new Gp(`selection`),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||$b(n.selection)||e.view.dragging?null:uv.create(n.doc,[sv.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function ak({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var ute=qx.create({name:`trailingNode`,addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){let e=new Gp(this.name),t=this.options.node||this.editor.schema.topNodeType.contentMatch.defaultType?.name||`paragraph`,n=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(t).includes(e.name));return[new Hp({key:e,appendTransaction:(n,r,i)=>{let{doc:a,tr:o,schema:s}=i,c=e.getState(i),l=a.content.size,u=s.nodes[t];if(!n.some(e=>e.getMeta(`skipTrailingNode`))&&c)return o.insert(l,u.create())},state:{init:(e,t)=>{let r=t.tr.doc.lastChild;return!ak({node:r,types:n})},apply:(e,t)=>{if(!e.docChanged||e.getMeta(`__uniqueIDTransaction`))return t;let r=e.doc.lastChild;return!ak({node:r,types:n})}}})]}}),dte=qx.create({name:`undoRedo`,addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>nk(e,t),redo:()=>({state:e,dispatch:t})=>rk(e,t)}},addProseMirrorPlugins(){return[ate(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),fte=qx.create({name:`starterKit`,addExtensions(){let e=[];return this.options.bold!==!1&&e.push(WS.configure(this.options.bold)),this.options.blockquote!==!1&&e.push(jD.configure(this.options.blockquote)),this.options.bulletList!==!1&&e.push(GD.configure(this.options.bulletList)),this.options.code!==!1&&e.push(FD.configure(this.options.code)),this.options.codeBlock!==!1&&e.push(LS.configure(this.options.codeBlock)),this.options.document!==!1&&e.push(LD.configure(this.options.document)),this.options.dropcursor!==!1&&e.push(ote.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&e.push(ste.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&e.push(QS.configure(this.options.hardBreak)),this.options.heading!==!1&&e.push(eC.configure(this.options.heading)),this.options.undoRedo!==!1&&e.push(dte.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&e.push(RD.configure(this.options.horizontalRule)),this.options.italic!==!1&&e.push(XS.configure(this.options.italic)),this.options.listItem!==!1&&e.push(KD.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(rO.configure(this.options?.listKeymap)),this.options.link!==!1&&e.push(vT.configure(this.options?.link)),this.options.orderedList!==!1&&e.push(fO.configure(this.options.orderedList)),this.options.paragraph!==!1&&e.push(vO.configure(this.options.paragraph)),this.options.strike!==!1&&e.push(xO.configure(this.options.strike)),this.options.text!==!1&&e.push(CO.configure(this.options.text)),this.options.underline!==!1&&e.push(wO.configure(this.options?.underline)),this.options.trailingNode!==!1&&e.push(ute.configure(this.options?.trailingNode)),e}});function pte(){}var ok=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};ok.prototype.normal={},ok.prototype.property={},ok.prototype.space=void 0;function sk(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new ok(n,r,t)}function ck(e){return e.toLowerCase()}var lk=class{constructor(e,t){this.attribute=t,this.property=e}};lk.prototype.attribute=``,lk.prototype.booleanish=!1,lk.prototype.boolean=!1,lk.prototype.commaOrSpaceSeparated=!1,lk.prototype.commaSeparated=!1,lk.prototype.defined=!1,lk.prototype.mustUseProperty=!1,lk.prototype.number=!1,lk.prototype.overloadedBoolean=!1,lk.prototype.property=``,lk.prototype.spaceSeparated=!1,lk.prototype.space=void 0;var uk=t({boolean:()=>V,booleanish:()=>dk,commaOrSpaceSeparated:()=>hk,commaSeparated:()=>mk,number:()=>H,overloadedBoolean:()=>fk,spaceSeparated:()=>pk}),mte=0,V=gk(),dk=gk(),fk=gk(),H=gk(),pk=gk(),mk=gk(),hk=gk();function gk(){return 2**++mte}var _k=Object.keys(uk),vk=class extends lk{constructor(e,t,n,r){let i=-1;if(super(e,t),yk(this,`space`,r),typeof n==`number`)for(;++i<_k.length;){let e=_k[i];yk(this,_k[i],(n&uk[e])===uk[e])}}};vk.prototype.defined=!0;function yk(e,t,n){n&&(e[t]=n)}function bk(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new vk(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ck(r)]=r,n[ck(a.attribute)]=r}return new ok(t,n,e.space)}var xk=bk({properties:{ariaActiveDescendant:null,ariaAtomic:dk,ariaAutoComplete:null,ariaBusy:dk,ariaChecked:dk,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:pk,ariaCurrent:null,ariaDescribedBy:pk,ariaDetails:null,ariaDisabled:dk,ariaDropEffect:pk,ariaErrorMessage:null,ariaExpanded:dk,ariaFlowTo:pk,ariaGrabbed:dk,ariaHasPopup:null,ariaHidden:dk,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pk,ariaLevel:H,ariaLive:null,ariaModal:dk,ariaMultiLine:dk,ariaMultiSelectable:dk,ariaOrientation:null,ariaOwns:pk,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:dk,ariaReadOnly:dk,ariaRelevant:null,ariaRequired:dk,ariaRoleDescription:pk,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:dk,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Sk(e,t){return t in e?e[t]:t}function Ck(e,t){return Sk(e,t.toLowerCase())}var hte=bk({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:mk,acceptCharset:pk,accessKey:pk,action:null,allow:null,allowFullScreen:V,allowPaymentRequest:V,allowUserMedia:V,alt:null,as:null,async:V,autoCapitalize:null,autoComplete:pk,autoFocus:V,autoPlay:V,blocking:pk,capture:null,charSet:null,checked:V,cite:null,className:pk,cols:H,colSpan:null,content:null,contentEditable:dk,controls:V,controlsList:pk,coords:H|mk,crossOrigin:null,data:null,dateTime:null,decoding:null,default:V,defer:V,dir:null,dirName:null,disabled:V,download:fk,draggable:dk,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:V,formTarget:null,headers:pk,height:H,hidden:fk,high:H,href:null,hrefLang:null,htmlFor:pk,httpEquiv:pk,id:null,imageSizes:null,imageSrcSet:null,inert:V,inputMode:null,integrity:null,is:null,isMap:V,itemId:null,itemProp:pk,itemRef:pk,itemScope:V,itemType:pk,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:V,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:V,muted:V,name:null,nonce:null,noModule:V,noValidate:V,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:V,optimum:H,pattern:null,ping:pk,placeholder:null,playsInline:V,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:V,referrerPolicy:null,rel:pk,required:V,reversed:V,rows:H,rowSpan:H,sandbox:pk,scope:null,scoped:V,seamless:V,selected:V,shadowRootClonable:V,shadowRootDelegatesFocus:V,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:dk,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:V,useMap:null,value:dk,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pk,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:V,declare:V,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:V,noHref:V,noShade:V,noWrap:V,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:dk,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:V,disableRemotePlayback:V,prefix:null,property:null,results:H,security:null,unselectable:null},space:`html`,transform:Ck}),gte=bk({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`,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:hk,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:pk,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:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:V,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,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:mk,g2:mk,glyphName:mk,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:hk,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:H,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:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pk,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:hk,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:hk,rev:hk,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:hk,requiredFeatures:hk,requiredFonts:hk,requiredFormats:hk,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:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:hk,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:hk,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:hk,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Sk}),wk=bk({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()}}),Tk=bk({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Ck}),Ek=bk({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),_te=/[A-Z]/g,Dk=/-[a-z]/g,vte=/^data[-\w.:]+$/i;function Ok(e,t){let n=ck(t),r=t,i=lk;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&vte.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Dk,Ak);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Dk.test(e)){let n=e.replace(_te,kk);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=vk}return new i(r,t)}function kk(e){return`-`+e.toLowerCase()}function Ak(e){return e.charAt(1).toUpperCase()}var jk=sk([xk,hte,wk,Tk,Ek],`html`),Mk=sk([xk,gte,wk,Tk,Ek],`svg`);function Nk(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Pk(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Fk=/[#.]/g;function Ik(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){Fk.lastIndex=i;let e=Fk.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function Lk(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Rk(e){return e.join(` `).trim()}function zk(e,t,n){let r=n?Gk(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=Ik(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,Bk(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Vk(e,o.properties,t,n)}for(let e of a)Hk(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function Bk(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function Vk(e,t,n,r){let i=Ok(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?Lk(r):i.commaSeparated?Nk(r):i.commaOrSpaceSeparated?Lk(Nk(r).join(` `)):Uk(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Wk(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(Uk(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Hk(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)Hk(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?Hk(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function Uk(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||ck(n)===ck(t)))return!0}return n}function Wk(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Gk(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Kk=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),qk=zk(jk,`div`),Jk=zk(Mk,`g`,Kk);function Yk(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=Xk(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=Xk(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function Xk(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
|
|
301
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var Zk={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`},Qk={}.hasOwnProperty,$k=Object.prototype;function eA(e,t){let n=t||{};return tA({file:n.file||void 0,location:!1,schema:n.space===`svg`?Mk:jk,verbose:n.verbose||!1},e)}function tA(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},iA(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:nA(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=Yk(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},iA(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},iA(e,r,n),n}default:return n=rA(e,t),n}}function nA(e,t){let n=-1,r=[];for(;++n<t.length;){let i=tA(e,t[n]);r.push(i)}return r}function rA(e,t){let n=e.schema;e.schema=t.namespaceURI===Zk.svg?Mk:jk;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;Qk.call($k,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?Jk:qk)(t.tagName,i,nA(e,t.childNodes));if(iA(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&oA(r.startTag),o=r&&r.endTag&&oA(r.endTag),s=tA(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function iA(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=aA(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function aA(e,t,n){let r=oA(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)Qk.call(n.attrs,i)&&(r[Ok(e.schema,i).property]=oA(n.attrs[i]));n.startTag;let a=oA(n.startTag),o=n.endTag?oA(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function oA(e){let t=sA({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=sA({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function sA(e){return e.line&&e.column?e:void 0}var cA=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),U;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(U||={});var lA={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function uA(e){return e>=55296&&e<=57343}function dA(e){return e>=56320&&e<=57343}function fA(e,t){return(e-55296)*1024+9216+t}function pA(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function mA(e){return e>=64976&&e<=65007||cA.has(e)}var W;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(W||={});var hA=65536,gA=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=hA,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(dA(t))return this.pos++,this._addGap(),fA(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,U.EOF;return this._err(W.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,U.EOF;let n=this.html.charCodeAt(t);return n===U.CARRIAGE_RETURN?U.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,U.EOF;let e=this.html.charCodeAt(this.pos);return e===U.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,U.LINE_FEED):e===U.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,uA(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===U.LINE_FEED||e===U.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){pA(e)?this._err(W.controlCharacterInInputStream):mA(e)&&this._err(W.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},_A;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(_A||={});function vA(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var yA=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),bA=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function xA(e){return e>=55296&&e<=57343||e>1114111?65533:bA.get(e)??e}var SA;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(SA||={});var CA=32,wA;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(wA||={});function TA(e){return e>=SA.ZERO&&e<=SA.NINE}function EA(e){return e>=SA.UPPER_A&&e<=SA.UPPER_F||e>=SA.LOWER_A&&e<=SA.LOWER_F}function DA(e){return e>=SA.UPPER_A&&e<=SA.UPPER_Z||e>=SA.LOWER_A&&e<=SA.LOWER_Z||TA(e)}function OA(e){return e===SA.EQUALS||DA(e)}var kA;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(kA||={});var AA;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(AA||={});var jA=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=kA.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=AA.Strict}startEntity(e){this.decodeMode=e,this.state=kA.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case kA.EntityStart:return e.charCodeAt(t)===SA.NUM?(this.state=kA.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=kA.NamedEntity,this.stateNamedEntity(e,t));case kA.NumericStart:return this.stateNumericStart(e,t);case kA.NumericDecimal:return this.stateNumericDecimal(e,t);case kA.NumericHex:return this.stateNumericHex(e,t);case kA.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|CA)===SA.LOWER_X?(this.state=kA.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=kA.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(TA(r)||EA(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(TA(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===SA.SEMI)this.consumed+=1;else if(this.decodeMode===AA.Strict)return 0;return this.emitCodePoint(xA(this.result),this.consumed),this.errors&&(e!==SA.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&wA.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=MA(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===AA.Attribute&&(i===0||OA(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&wA.VALUE_LENGTH)>>14,i!==0){if(a===SA.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==AA.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&wA.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~wA.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case kA.NamedEntity:return this.result!==0&&(this.decodeMode!==AA.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case kA.NumericDecimal:return this.emitNumericEntity(0,2);case kA.NumericHex:return this.emitNumericEntity(0,3);case kA.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case kA.EntityStart:return 0}}};function MA(e,t,n,r){let i=(t&wA.BRANCH_LENGTH)>>7,a=t&wA.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var G;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(G||={});var NA;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(NA||={});var PA;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(PA||={});var K;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(K||={});var q;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(q||={});var FA=new Map([[K.A,q.A],[K.ADDRESS,q.ADDRESS],[K.ANNOTATION_XML,q.ANNOTATION_XML],[K.APPLET,q.APPLET],[K.AREA,q.AREA],[K.ARTICLE,q.ARTICLE],[K.ASIDE,q.ASIDE],[K.B,q.B],[K.BASE,q.BASE],[K.BASEFONT,q.BASEFONT],[K.BGSOUND,q.BGSOUND],[K.BIG,q.BIG],[K.BLOCKQUOTE,q.BLOCKQUOTE],[K.BODY,q.BODY],[K.BR,q.BR],[K.BUTTON,q.BUTTON],[K.CAPTION,q.CAPTION],[K.CENTER,q.CENTER],[K.CODE,q.CODE],[K.COL,q.COL],[K.COLGROUP,q.COLGROUP],[K.DD,q.DD],[K.DESC,q.DESC],[K.DETAILS,q.DETAILS],[K.DIALOG,q.DIALOG],[K.DIR,q.DIR],[K.DIV,q.DIV],[K.DL,q.DL],[K.DT,q.DT],[K.EM,q.EM],[K.EMBED,q.EMBED],[K.FIELDSET,q.FIELDSET],[K.FIGCAPTION,q.FIGCAPTION],[K.FIGURE,q.FIGURE],[K.FONT,q.FONT],[K.FOOTER,q.FOOTER],[K.FOREIGN_OBJECT,q.FOREIGN_OBJECT],[K.FORM,q.FORM],[K.FRAME,q.FRAME],[K.FRAMESET,q.FRAMESET],[K.H1,q.H1],[K.H2,q.H2],[K.H3,q.H3],[K.H4,q.H4],[K.H5,q.H5],[K.H6,q.H6],[K.HEAD,q.HEAD],[K.HEADER,q.HEADER],[K.HGROUP,q.HGROUP],[K.HR,q.HR],[K.HTML,q.HTML],[K.I,q.I],[K.IMG,q.IMG],[K.IMAGE,q.IMAGE],[K.INPUT,q.INPUT],[K.IFRAME,q.IFRAME],[K.KEYGEN,q.KEYGEN],[K.LABEL,q.LABEL],[K.LI,q.LI],[K.LINK,q.LINK],[K.LISTING,q.LISTING],[K.MAIN,q.MAIN],[K.MALIGNMARK,q.MALIGNMARK],[K.MARQUEE,q.MARQUEE],[K.MATH,q.MATH],[K.MENU,q.MENU],[K.META,q.META],[K.MGLYPH,q.MGLYPH],[K.MI,q.MI],[K.MO,q.MO],[K.MN,q.MN],[K.MS,q.MS],[K.MTEXT,q.MTEXT],[K.NAV,q.NAV],[K.NOBR,q.NOBR],[K.NOFRAMES,q.NOFRAMES],[K.NOEMBED,q.NOEMBED],[K.NOSCRIPT,q.NOSCRIPT],[K.OBJECT,q.OBJECT],[K.OL,q.OL],[K.OPTGROUP,q.OPTGROUP],[K.OPTION,q.OPTION],[K.P,q.P],[K.PARAM,q.PARAM],[K.PLAINTEXT,q.PLAINTEXT],[K.PRE,q.PRE],[K.RB,q.RB],[K.RP,q.RP],[K.RT,q.RT],[K.RTC,q.RTC],[K.RUBY,q.RUBY],[K.S,q.S],[K.SCRIPT,q.SCRIPT],[K.SEARCH,q.SEARCH],[K.SECTION,q.SECTION],[K.SELECT,q.SELECT],[K.SOURCE,q.SOURCE],[K.SMALL,q.SMALL],[K.SPAN,q.SPAN],[K.STRIKE,q.STRIKE],[K.STRONG,q.STRONG],[K.STYLE,q.STYLE],[K.SUB,q.SUB],[K.SUMMARY,q.SUMMARY],[K.SUP,q.SUP],[K.TABLE,q.TABLE],[K.TBODY,q.TBODY],[K.TEMPLATE,q.TEMPLATE],[K.TEXTAREA,q.TEXTAREA],[K.TFOOT,q.TFOOT],[K.TD,q.TD],[K.TH,q.TH],[K.THEAD,q.THEAD],[K.TITLE,q.TITLE],[K.TR,q.TR],[K.TRACK,q.TRACK],[K.TT,q.TT],[K.U,q.U],[K.UL,q.UL],[K.SVG,q.SVG],[K.VAR,q.VAR],[K.WBR,q.WBR],[K.XMP,q.XMP]]);function IA(e){return FA.get(e)??q.UNKNOWN}var J=q,LA={[G.HTML]:new Set([J.ADDRESS,J.APPLET,J.AREA,J.ARTICLE,J.ASIDE,J.BASE,J.BASEFONT,J.BGSOUND,J.BLOCKQUOTE,J.BODY,J.BR,J.BUTTON,J.CAPTION,J.CENTER,J.COL,J.COLGROUP,J.DD,J.DETAILS,J.DIR,J.DIV,J.DL,J.DT,J.EMBED,J.FIELDSET,J.FIGCAPTION,J.FIGURE,J.FOOTER,J.FORM,J.FRAME,J.FRAMESET,J.H1,J.H2,J.H3,J.H4,J.H5,J.H6,J.HEAD,J.HEADER,J.HGROUP,J.HR,J.HTML,J.IFRAME,J.IMG,J.INPUT,J.LI,J.LINK,J.LISTING,J.MAIN,J.MARQUEE,J.MENU,J.META,J.NAV,J.NOEMBED,J.NOFRAMES,J.NOSCRIPT,J.OBJECT,J.OL,J.P,J.PARAM,J.PLAINTEXT,J.PRE,J.SCRIPT,J.SECTION,J.SELECT,J.SOURCE,J.STYLE,J.SUMMARY,J.TABLE,J.TBODY,J.TD,J.TEMPLATE,J.TEXTAREA,J.TFOOT,J.TH,J.THEAD,J.TITLE,J.TR,J.TRACK,J.UL,J.WBR,J.XMP]),[G.MATHML]:new Set([J.MI,J.MO,J.MN,J.MS,J.MTEXT,J.ANNOTATION_XML]),[G.SVG]:new Set([J.TITLE,J.FOREIGN_OBJECT,J.DESC]),[G.XLINK]:new Set,[G.XML]:new Set,[G.XMLNS]:new Set},RA=new Set([J.H1,J.H2,J.H3,J.H4,J.H5,J.H6]);new Set([K.STYLE,K.SCRIPT,K.XMP,K.IFRAME,K.NOEMBED,K.NOFRAMES,K.PLAINTEXT]);var Y;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(Y||={});var zA={DATA:Y.DATA,RCDATA:Y.RCDATA,RAWTEXT:Y.RAWTEXT,SCRIPT_DATA:Y.SCRIPT_DATA,PLAINTEXT:Y.PLAINTEXT,CDATA_SECTION:Y.CDATA_SECTION};function BA(e){return e>=U.DIGIT_0&&e<=U.DIGIT_9}function VA(e){return e>=U.LATIN_CAPITAL_A&&e<=U.LATIN_CAPITAL_Z}function HA(e){return e>=U.LATIN_SMALL_A&&e<=U.LATIN_SMALL_Z}function UA(e){return HA(e)||VA(e)}function WA(e){return UA(e)||BA(e)}function GA(e){return e+32}function KA(e){return e===U.SPACE||e===U.LINE_FEED||e===U.TABULATION||e===U.FORM_FEED}function qA(e){return KA(e)||e===U.SOLIDUS||e===U.GREATER_THAN_SIGN}function JA(e){return e===U.NULL?W.nullCharacterReference:e>1114111?W.characterReferenceOutsideUnicodeRange:uA(e)?W.surrogateCharacterReference:mA(e)?W.noncharacterCharacterReference:pA(e)||e===U.CARRIAGE_RETURN?W.controlCharacterReference:null}var YA=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=Y.DATA,this.returnState=Y.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new gA(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new jA(yA,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(W.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(W.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=JA(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:_A.START_TAG,tagName:``,tagID:q.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:_A.END_TAG,tagName:``,tagID:q.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:_A.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:_A.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(vA(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(W.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=IA(e.tagName),e.type===_A.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(W.endTagWithAttributes),e.selfClosing&&this._err(W.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case _A.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case _A.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case _A.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:_A.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=KA(e)?_A.WHITESPACE_CHARACTER:e===U.NULL?_A.NULL_CHARACTER:_A.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(_A.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Y.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?AA.Attribute:AA.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Y.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Y.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Y.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Y.DATA:this._stateData(e);break;case Y.RCDATA:this._stateRcdata(e);break;case Y.RAWTEXT:this._stateRawtext(e);break;case Y.SCRIPT_DATA:this._stateScriptData(e);break;case Y.PLAINTEXT:this._statePlaintext(e);break;case Y.TAG_OPEN:this._stateTagOpen(e);break;case Y.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Y.TAG_NAME:this._stateTagName(e);break;case Y.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Y.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Y.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Y.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Y.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Y.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Y.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Y.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Y.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Y.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Y.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Y.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Y.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Y.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Y.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Y.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Y.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Y.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Y.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Y.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Y.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Y.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Y.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Y.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Y.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Y.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Y.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Y.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Y.BOGUS_COMMENT:this._stateBogusComment(e);break;case Y.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Y.COMMENT_START:this._stateCommentStart(e);break;case Y.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Y.COMMENT:this._stateComment(e);break;case Y.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Y.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Y.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Y.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Y.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Y.COMMENT_END:this._stateCommentEnd(e);break;case Y.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Y.DOCTYPE:this._stateDoctype(e);break;case Y.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Y.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Y.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Y.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Y.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Y.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Y.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Y.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Y.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Y.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Y.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Y.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Y.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Y.CDATA_SECTION:this._stateCdataSection(e);break;case Y.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Y.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Y.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Y.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case U.LESS_THAN_SIGN:this.state=Y.TAG_OPEN;break;case U.AMPERSAND:this._startCharacterReference();break;case U.NULL:this._err(W.unexpectedNullCharacter),this._emitCodePoint(e);break;case U.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case U.AMPERSAND:this._startCharacterReference();break;case U.LESS_THAN_SIGN:this.state=Y.RCDATA_LESS_THAN_SIGN;break;case U.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case U.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case U.LESS_THAN_SIGN:this.state=Y.RAWTEXT_LESS_THAN_SIGN;break;case U.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case U.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_LESS_THAN_SIGN;break;case U.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case U.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case U.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case U.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(UA(e))this._createStartTagToken(),this.state=Y.TAG_NAME,this._stateTagName(e);else switch(e){case U.EXCLAMATION_MARK:this.state=Y.MARKUP_DECLARATION_OPEN;break;case U.SOLIDUS:this.state=Y.END_TAG_OPEN;break;case U.QUESTION_MARK:this._err(W.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Y.BOGUS_COMMENT,this._stateBogusComment(e);break;case U.EOF:this._err(W.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(W.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=Y.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(UA(e))this._createEndTagToken(),this.state=Y.TAG_NAME,this._stateTagName(e);else switch(e){case U.GREATER_THAN_SIGN:this._err(W.missingEndTagName),this.state=Y.DATA;break;case U.EOF:this._err(W.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(W.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Y.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this.state=Y.BEFORE_ATTRIBUTE_NAME;break;case U.SOLIDUS:this.state=Y.SELF_CLOSING_START_TAG;break;case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentTagToken();break;case U.NULL:this._err(W.unexpectedNullCharacter),t.tagName+=`�`;break;case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(VA(e)?GA(e):e)}}_stateRcdataLessThanSign(e){e===U.SOLIDUS?this.state=Y.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=Y.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){UA(e)?(this.state=Y.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=Y.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Y.BEFORE_ATTRIBUTE_NAME,!1;case U.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Y.SELF_CLOSING_START_TAG,!1;case U.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Y.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Y.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===U.SOLIDUS?this.state=Y.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=Y.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){UA(e)?(this.state=Y.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=Y.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Y.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case U.SOLIDUS:this.state=Y.SCRIPT_DATA_END_TAG_OPEN;break;case U.EXCLAMATION_MARK:this.state=Y.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=Y.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){UA(e)?(this.state=Y.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=Y.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Y.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===U.HYPHEN_MINUS?(this.state=Y.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=Y.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===U.HYPHEN_MINUS?(this.state=Y.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=Y.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case U.HYPHEN_MINUS:this.state=Y.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case U.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case U.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case U.HYPHEN_MINUS:this.state=Y.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case U.NULL:this._err(W.unexpectedNullCharacter),this.state=Y.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case U.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Y.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case U.HYPHEN_MINUS:this._emitChars(`-`);break;case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case U.GREATER_THAN_SIGN:this.state=Y.SCRIPT_DATA,this._emitChars(`>`);break;case U.NULL:this._err(W.unexpectedNullCharacter),this.state=Y.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case U.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Y.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===U.SOLIDUS?this.state=Y.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:UA(e)?(this._emitChars(`<`),this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=Y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){UA(e)?(this.state=Y.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=Y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(lA.SCRIPT,!1)&&qA(this.preprocessor.peek(lA.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<lA.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case U.HYPHEN_MINUS:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case U.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case U.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case U.HYPHEN_MINUS:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case U.NULL:this._err(W.unexpectedNullCharacter),this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case U.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case U.HYPHEN_MINUS:this._emitChars(`-`);break;case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case U.GREATER_THAN_SIGN:this.state=Y.SCRIPT_DATA,this._emitChars(`>`);break;case U.NULL:this._err(W.unexpectedNullCharacter),this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case U.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===U.SOLIDUS?(this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(lA.SCRIPT,!1)&&qA(this.preprocessor.peek(lA.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<lA.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Y.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.SOLIDUS:case U.GREATER_THAN_SIGN:case U.EOF:this.state=Y.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case U.EQUALS_SIGN:this._err(W.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=Y.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=Y.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:case U.SOLIDUS:case U.GREATER_THAN_SIGN:case U.EOF:this._leaveAttrName(),this.state=Y.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case U.EQUALS_SIGN:this._leaveAttrName(),this.state=Y.BEFORE_ATTRIBUTE_VALUE;break;case U.QUOTATION_MARK:case U.APOSTROPHE:case U.LESS_THAN_SIGN:this._err(W.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case U.NULL:this._err(W.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(VA(e)?GA(e):e)}}_stateAfterAttributeName(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.SOLIDUS:this.state=Y.SELF_CLOSING_START_TAG;break;case U.EQUALS_SIGN:this.state=Y.BEFORE_ATTRIBUTE_VALUE;break;case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentTagToken();break;case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=Y.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:this.state=Y.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case U.APOSTROPHE:this.state=Y.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case U.GREATER_THAN_SIGN:this._err(W.missingAttributeValue),this.state=Y.DATA,this.emitCurrentTagToken();break;default:this.state=Y.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case U.QUOTATION_MARK:this.state=Y.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case U.AMPERSAND:this._startCharacterReference();break;case U.NULL:this._err(W.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case U.APOSTROPHE:this.state=Y.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case U.AMPERSAND:this._startCharacterReference();break;case U.NULL:this._err(W.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this._leaveAttrValue(),this.state=Y.BEFORE_ATTRIBUTE_NAME;break;case U.AMPERSAND:this._startCharacterReference();break;case U.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Y.DATA,this.emitCurrentTagToken();break;case U.NULL:this._err(W.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case U.QUOTATION_MARK:case U.APOSTROPHE:case U.LESS_THAN_SIGN:case U.EQUALS_SIGN:case U.GRAVE_ACCENT:this._err(W.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this._leaveAttrValue(),this.state=Y.BEFORE_ATTRIBUTE_NAME;break;case U.SOLIDUS:this._leaveAttrValue(),this.state=Y.SELF_CLOSING_START_TAG;break;case U.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Y.DATA,this.emitCurrentTagToken();break;case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this._err(W.missingWhitespaceBetweenAttributes),this.state=Y.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case U.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=Y.DATA,this.emitCurrentTagToken();break}case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this._err(W.unexpectedSolidusInTag),this.state=Y.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentComment(t);break;case U.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case U.NULL:this._err(W.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(lA.DASH_DASH,!0)?(this._createCommentToken(lA.DASH_DASH.length+1),this.state=Y.COMMENT_START):this._consumeSequenceIfMatch(lA.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(lA.DOCTYPE.length+1),this.state=Y.DOCTYPE):this._consumeSequenceIfMatch(lA.CDATA_START,!0)?this.inForeignNode?this.state=Y.CDATA_SECTION:(this._err(W.cdataInHtmlContent),this._createCommentToken(lA.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=Y.BOGUS_COMMENT):this._ensureHibernation()||(this._err(W.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Y.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case U.HYPHEN_MINUS:this.state=Y.COMMENT_START_DASH;break;case U.GREATER_THAN_SIGN:{this._err(W.abruptClosingOfEmptyComment),this.state=Y.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Y.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case U.HYPHEN_MINUS:this.state=Y.COMMENT_END;break;case U.GREATER_THAN_SIGN:this._err(W.abruptClosingOfEmptyComment),this.state=Y.DATA,this.emitCurrentComment(t);break;case U.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Y.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case U.HYPHEN_MINUS:this.state=Y.COMMENT_END_DASH;break;case U.LESS_THAN_SIGN:t.data+=`<`,this.state=Y.COMMENT_LESS_THAN_SIGN;break;case U.NULL:this._err(W.unexpectedNullCharacter),t.data+=`�`;break;case U.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case U.EXCLAMATION_MARK:t.data+=`!`,this.state=Y.COMMENT_LESS_THAN_SIGN_BANG;break;case U.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=Y.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===U.HYPHEN_MINUS?this.state=Y.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Y.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===U.HYPHEN_MINUS?this.state=Y.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Y.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==U.GREATER_THAN_SIGN&&e!==U.EOF&&this._err(W.nestedComment),this.state=Y.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case U.HYPHEN_MINUS:this.state=Y.COMMENT_END;break;case U.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Y.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentComment(t);break;case U.EXCLAMATION_MARK:this.state=Y.COMMENT_END_BANG;break;case U.HYPHEN_MINUS:t.data+=`-`;break;case U.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=Y.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case U.HYPHEN_MINUS:t.data+=`--!`,this.state=Y.COMMENT_END_DASH;break;case U.GREATER_THAN_SIGN:this._err(W.incorrectlyClosedComment),this.state=Y.DATA,this.emitCurrentComment(t);break;case U.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=Y.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this.state=Y.BEFORE_DOCTYPE_NAME;break;case U.GREATER_THAN_SIGN:this.state=Y.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case U.EOF:{this._err(W.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(W.missingWhitespaceBeforeDoctypeName),this.state=Y.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(VA(e))this._createDoctypeToken(String.fromCharCode(GA(e))),this.state=Y.DOCTYPE_NAME;else switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.NULL:this._err(W.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=Y.DOCTYPE_NAME;break;case U.GREATER_THAN_SIGN:{this._err(W.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Y.DATA;break}case U.EOF:{this._err(W.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=Y.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this.state=Y.AFTER_DOCTYPE_NAME;break;case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.NULL:this._err(W.unexpectedNullCharacter),t.name+=`�`;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(VA(e)?GA(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(lA.PUBLIC,!1)?this.state=Y.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(lA.SYSTEM,!1)?this.state=Y.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(W.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this.state=Y.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case U.QUOTATION_MARK:this._err(W.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Y.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case U.APOSTROPHE:this._err(W.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Y.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case U.GREATER_THAN_SIGN:this._err(W.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:t.publicId=``,this.state=Y.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case U.APOSTROPHE:t.publicId=``,this.state=Y.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case U.GREATER_THAN_SIGN:this._err(W.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case U.QUOTATION_MARK:this.state=Y.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case U.NULL:this._err(W.unexpectedNullCharacter),t.publicId+=`�`;break;case U.GREATER_THAN_SIGN:this._err(W.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case U.APOSTROPHE:this.state=Y.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case U.NULL:this._err(W.unexpectedNullCharacter),t.publicId+=`�`;break;case U.GREATER_THAN_SIGN:this._err(W.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this.state=Y.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.QUOTATION_MARK:this._err(W.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case U.APOSTROPHE:this._err(W.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.QUOTATION_MARK:t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case U.APOSTROPHE:t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this.state=Y.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case U.QUOTATION_MARK:this._err(W.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case U.APOSTROPHE:this._err(W.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case U.GREATER_THAN_SIGN:this._err(W.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case U.APOSTROPHE:t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case U.GREATER_THAN_SIGN:this._err(W.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case U.QUOTATION_MARK:this.state=Y.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case U.NULL:this._err(W.unexpectedNullCharacter),t.systemId+=`�`;break;case U.GREATER_THAN_SIGN:this._err(W.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case U.APOSTROPHE:this.state=Y.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case U.NULL:this._err(W.unexpectedNullCharacter),t.systemId+=`�`;break;case U.GREATER_THAN_SIGN:this._err(W.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case U.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.NULL:this._err(W.unexpectedNullCharacter);break;case U.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case U.RIGHT_SQUARE_BRACKET:this.state=Y.CDATA_SECTION_BRACKET;break;case U.EOF:this._err(W.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===U.RIGHT_SQUARE_BRACKET?this.state=Y.CDATA_SECTION_END:(this._emitChars(`]`),this.state=Y.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case U.GREATER_THAN_SIGN:this.state=Y.DATA;break;case U.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=Y.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(U.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&WA(this.preprocessor.peek(1))?Y.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){WA(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===U.SEMICOLON&&this._err(W.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},XA=new Set([q.DD,q.DT,q.LI,q.OPTGROUP,q.OPTION,q.P,q.RB,q.RP,q.RT,q.RTC]),ZA=new Set([...XA,q.CAPTION,q.COLGROUP,q.TBODY,q.TD,q.TFOOT,q.TH,q.THEAD,q.TR]),QA=new Set([q.APPLET,q.CAPTION,q.HTML,q.MARQUEE,q.OBJECT,q.TABLE,q.TD,q.TEMPLATE,q.TH]),$A=new Set([...QA,q.OL,q.UL]),ej=new Set([...QA,q.BUTTON]),tj=new Set([q.ANNOTATION_XML,q.MI,q.MN,q.MO,q.MS,q.MTEXT]),nj=new Set([q.DESC,q.FOREIGN_OBJECT,q.TITLE]),rj=new Set([q.TR,q.TEMPLATE,q.HTML]),ij=new Set([q.TBODY,q.TFOOT,q.THEAD,q.TEMPLATE,q.HTML]),aj=new Set([q.TABLE,q.TEMPLATE,q.HTML]),oj=new Set([q.TD,q.TH]),sj=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=q.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===q.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===G.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==G.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(RA,G.HTML)}popUntilTableCellPopped(){this.popUntilPopped(oj,G.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(aj,G.HTML)}clearBackToTableBodyContext(){this.clearBackTo(ij,G.HTML)}clearBackToTableRowContext(){this.clearBackTo(rj,G.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===q.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===q.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case G.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case G.SVG:if(nj.has(r))return!1;break;case G.MATHML:if(tj.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,QA)}hasInListItemScope(e){return this.hasInDynamicScope(e,$A)}hasInButtonScope(e){return this.hasInDynamicScope(e,ej)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case G.HTML:if(RA.has(t))return!0;if(QA.has(t))return!1;break;case G.SVG:if(nj.has(t))return!1;break;case G.MATHML:if(tj.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===G.HTML)switch(this.tagIDs[t]){case e:return!0;case q.TABLE:case q.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===G.HTML)switch(this.tagIDs[e]){case q.TBODY:case q.THEAD:case q.TFOOT:return!0;case q.TABLE:case q.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===G.HTML)switch(this.tagIDs[t]){case e:return!0;case q.OPTION:case q.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&XA.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ZA.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&ZA.has(this.currentTagId);)this.pop()}},cj=3,lj;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(lj||={});var uj={type:lj.Marker},dj=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===lj.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<cj)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<cj)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=cj&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(uj)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:lj.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:lj.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(uj);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===lj.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===lj.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===lj.Element&&t.element===e)}},fj={createDocument(){return{nodeName:`#document`,mode:PA.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};fj.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(fj.isTextNode(n)){n.value+=t;return}}fj.appendChild(e,fj.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&fj.isTextNode(r)?r.value+=t:fj.insertBefore(e,fj.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},pj=`html`,mj=`about:legacy-compat`,hj=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,gj=`+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`),_j=[...gj,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],vj=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),yj=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],bj=[...yj,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function xj(e,t){return t.some(t=>e.startsWith(t))}function Sj(e){return e.name===pj&&e.publicId===null&&(e.systemId===null||e.systemId===mj)}function Cj(e){if(e.name!==pj)return PA.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===hj)return PA.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),vj.has(n))return PA.QUIRKS;let e=t===null?_j:gj;if(xj(n,e))return PA.QUIRKS;if(e=t===null?yj:bj,xj(n,e))return PA.LIMITED_QUIRKS}return PA.NO_QUIRKS}var wj={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},Tj=`definitionurl`,Ej=`definitionURL`,Dj=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),Oj=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:G.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:G.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:G.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:G.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:G.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:G.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:G.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:G.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:G.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:G.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:G.XMLNS}]]),kj=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),Aj=new Set([q.B,q.BIG,q.BLOCKQUOTE,q.BODY,q.BR,q.CENTER,q.CODE,q.DD,q.DIV,q.DL,q.DT,q.EM,q.EMBED,q.H1,q.H2,q.H3,q.H4,q.H5,q.H6,q.HEAD,q.HR,q.I,q.IMG,q.LI,q.LISTING,q.MENU,q.META,q.NOBR,q.OL,q.P,q.PRE,q.RUBY,q.S,q.SMALL,q.SPAN,q.STRONG,q.STRIKE,q.SUB,q.SUP,q.TABLE,q.TT,q.U,q.UL,q.VAR]);function jj(e){let t=e.tagID;return t===q.FONT&&e.attrs.some(({name:e})=>e===NA.COLOR||e===NA.SIZE||e===NA.FACE)||Aj.has(t)}function Mj(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Tj){e.attrs[t].name=Ej;break}}function Nj(e){for(let t=0;t<e.attrs.length;t++){let n=Dj.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Pj(e){for(let t=0;t<e.attrs.length;t++){let n=Oj.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Fj(e){let t=kj.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=IA(e.tagName))}function Ij(e,t){return t===G.MATHML&&(e===q.MI||e===q.MO||e===q.MN||e===q.MS||e===q.MTEXT)}function Lj(e,t,n){if(t===G.MATHML&&e===q.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===NA.ENCODING){let t=n[e].value.toLowerCase();return t===wj.TEXT_HTML||t===wj.APPLICATION_XML}}return t===G.SVG&&(e===q.FOREIGN_OBJECT||e===q.DESC||e===q.TITLE)}function Rj(e,t,n,r){return(!r||r===G.HTML)&&Lj(e,t,n)||(!r||r===G.MATHML)&&Ij(e,t)}var zj=`hidden`,Bj=8,Vj=3,X;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})(X||={});var Hj={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Uj=new Set([q.TABLE,q.TBODY,q.TFOOT,q.THEAD,q.TR]),Wj={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:fj,onParseError:null},Gj=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=X.INITIAL,this.originalInsertionMode=X.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Wj,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new YA(this.options,this),this.activeFormattingElements=new dj(this.treeAdapter),this.fragmentContextID=n?IA(this.treeAdapter.getTagName(n)):q.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new sj(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...Wj,...t};e??=n.treeAdapter.createElement(K.TEMPLATE,G.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,G.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===q.TEMPLATE&&i.tmplInsertionModeStack.unshift(X.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??Hj,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===G.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,G.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=X.TEXT}switchToPlaintextParsing(){this.insertionMode=X.TEXT,this.originalInsertionMode=X.IN_BODY,this.tokenizer.state=zA.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===K.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==G.HTML))switch(this.fragmentContextID){case q.TITLE:case q.TEXTAREA:this.tokenizer.state=zA.RCDATA;break;case q.STYLE:case q.XMP:case q.IFRAME:case q.NOEMBED:case q.NOFRAMES:case q.NOSCRIPT:this.tokenizer.state=zA.RAWTEXT;break;case q.SCRIPT:this.tokenizer.state=zA.SCRIPT_DATA;break;case q.PLAINTEXT:this.tokenizer.state=zA.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,G.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,G.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(K.HTML,G.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,q.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===_A.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===q.SVG&&this.treeAdapter.getTagName(t)===K.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===G.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===q.MGLYPH||e.tagID===q.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,G.HTML)}_processToken(e){switch(e.type){case _A.CHARACTER:this.onCharacter(e);break;case _A.NULL_CHARACTER:this.onNullCharacter(e);break;case _A.COMMENT:this.onComment(e);break;case _A.DOCTYPE:this.onDoctype(e);break;case _A.START_TAG:this._processStartTag(e);break;case _A.END_TAG:this.onEndTag(e);break;case _A.EOF:this.onEof(e);break;case _A.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return Rj(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===lj.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=X.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(q.P),this.openElements.popUntilTagNamePopped(q.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case q.TR:this.insertionMode=X.IN_ROW;return;case q.TBODY:case q.THEAD:case q.TFOOT:this.insertionMode=X.IN_TABLE_BODY;return;case q.CAPTION:this.insertionMode=X.IN_CAPTION;return;case q.COLGROUP:this.insertionMode=X.IN_COLUMN_GROUP;return;case q.TABLE:this.insertionMode=X.IN_TABLE;return;case q.BODY:this.insertionMode=X.IN_BODY;return;case q.FRAMESET:this.insertionMode=X.IN_FRAMESET;return;case q.SELECT:this._resetInsertionModeForSelect(e);return;case q.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case q.HTML:this.insertionMode=this.headElement?X.AFTER_HEAD:X.BEFORE_HEAD;return;case q.TD:case q.TH:if(e>0){this.insertionMode=X.IN_CELL;return}break;case q.HEAD:if(e>0){this.insertionMode=X.IN_HEAD;return}break}this.insertionMode=X.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===q.TEMPLATE)break;if(e===q.TABLE){this.insertionMode=X.IN_SELECT_IN_TABLE;return}}this.insertionMode=X.IN_SELECT}_isElementCausesFosterParenting(e){return Uj.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case q.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===G.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case q.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return LA[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){lP(this,e);return}switch(this.insertionMode){case X.INITIAL:iM(this,e);break;case X.BEFORE_HTML:sM(this,e);break;case X.BEFORE_HEAD:uM(this,e);break;case X.IN_HEAD:mM(this,e);break;case X.IN_HEAD_NO_SCRIPT:_M(this,e);break;case X.AFTER_HEAD:bM(this,e);break;case X.IN_BODY:case X.IN_CAPTION:case X.IN_CELL:case X.IN_TEMPLATE:CM(this,e);break;case X.TEXT:case X.IN_SELECT:case X.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case X.IN_TABLE:case X.IN_TABLE_BODY:case X.IN_ROW:vN(this,e);break;case X.IN_TABLE_TEXT:jN(this,e);break;case X.IN_COLUMN_GROUP:RN(this,e);break;case X.AFTER_BODY:eP(this,e);break;case X.AFTER_AFTER_BODY:oP(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){cP(this,e);return}switch(this.insertionMode){case X.INITIAL:iM(this,e);break;case X.BEFORE_HTML:sM(this,e);break;case X.BEFORE_HEAD:uM(this,e);break;case X.IN_HEAD:mM(this,e);break;case X.IN_HEAD_NO_SCRIPT:_M(this,e);break;case X.AFTER_HEAD:bM(this,e);break;case X.TEXT:this._insertCharacters(e);break;case X.IN_TABLE:case X.IN_TABLE_BODY:case X.IN_ROW:vN(this,e);break;case X.IN_COLUMN_GROUP:RN(this,e);break;case X.AFTER_BODY:eP(this,e);break;case X.AFTER_AFTER_BODY:oP(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){$j(this,e);return}switch(this.insertionMode){case X.INITIAL:case X.BEFORE_HTML:case X.BEFORE_HEAD:case X.IN_HEAD:case X.IN_HEAD_NO_SCRIPT:case X.AFTER_HEAD:case X.IN_BODY:case X.IN_TABLE:case X.IN_CAPTION:case X.IN_COLUMN_GROUP:case X.IN_TABLE_BODY:case X.IN_ROW:case X.IN_CELL:case X.IN_SELECT:case X.IN_SELECT_IN_TABLE:case X.IN_TEMPLATE:case X.IN_FRAMESET:case X.AFTER_FRAMESET:$j(this,e);break;case X.IN_TABLE_TEXT:MN(this,e);break;case X.AFTER_BODY:eM(this,e);break;case X.AFTER_AFTER_BODY:case X.AFTER_AFTER_FRAMESET:tM(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case X.INITIAL:rM(this,e);break;case X.BEFORE_HEAD:case X.IN_HEAD:case X.IN_HEAD_NO_SCRIPT:case X.AFTER_HEAD:this._err(e,W.misplacedDoctype);break;case X.IN_TABLE_TEXT:MN(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,W.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?dP(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case X.INITIAL:iM(this,e);break;case X.BEFORE_HTML:aM(this,e);break;case X.BEFORE_HEAD:cM(this,e);break;case X.IN_HEAD:dM(this,e);break;case X.IN_HEAD_NO_SCRIPT:hM(this,e);break;case X.AFTER_HEAD:vM(this,e);break;case X.IN_BODY:nN(this,e);break;case X.IN_TABLE:DN(this,e);break;case X.IN_TABLE_TEXT:MN(this,e);break;case X.IN_CAPTION:PN(this,e);break;case X.IN_COLUMN_GROUP:IN(this,e);break;case X.IN_TABLE_BODY:zN(this,e);break;case X.IN_ROW:VN(this,e);break;case X.IN_CELL:UN(this,e);break;case X.IN_SELECT:GN(this,e);break;case X.IN_SELECT_IN_TABLE:qN(this,e);break;case X.IN_TEMPLATE:YN(this,e);break;case X.AFTER_BODY:QN(this,e);break;case X.IN_FRAMESET:tP(this,e);break;case X.AFTER_FRAMESET:rP(this,e);break;case X.AFTER_AFTER_BODY:aP(this,e);break;case X.AFTER_AFTER_FRAMESET:sP(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?fP(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case X.INITIAL:iM(this,e);break;case X.BEFORE_HTML:oM(this,e);break;case X.BEFORE_HEAD:lM(this,e);break;case X.IN_HEAD:fM(this,e);break;case X.IN_HEAD_NO_SCRIPT:gM(this,e);break;case X.AFTER_HEAD:yM(this,e);break;case X.IN_BODY:mN(this,e);break;case X.TEXT:gN(this,e);break;case X.IN_TABLE:ON(this,e);break;case X.IN_TABLE_TEXT:MN(this,e);break;case X.IN_CAPTION:FN(this,e);break;case X.IN_COLUMN_GROUP:LN(this,e);break;case X.IN_TABLE_BODY:BN(this,e);break;case X.IN_ROW:HN(this,e);break;case X.IN_CELL:WN(this,e);break;case X.IN_SELECT:KN(this,e);break;case X.IN_SELECT_IN_TABLE:JN(this,e);break;case X.IN_TEMPLATE:XN(this,e);break;case X.AFTER_BODY:$N(this,e);break;case X.IN_FRAMESET:nP(this,e);break;case X.AFTER_FRAMESET:iP(this,e);break;case X.AFTER_AFTER_BODY:oP(this,e);break;default:}}onEof(e){switch(this.insertionMode){case X.INITIAL:iM(this,e);break;case X.BEFORE_HTML:sM(this,e);break;case X.BEFORE_HEAD:uM(this,e);break;case X.IN_HEAD:mM(this,e);break;case X.IN_HEAD_NO_SCRIPT:_M(this,e);break;case X.AFTER_HEAD:bM(this,e);break;case X.IN_BODY:case X.IN_TABLE:case X.IN_CAPTION:case X.IN_COLUMN_GROUP:case X.IN_TABLE_BODY:case X.IN_ROW:case X.IN_CELL:case X.IN_SELECT:case X.IN_SELECT_IN_TABLE:hN(this,e);break;case X.TEXT:_N(this,e);break;case X.IN_TABLE_TEXT:MN(this,e);break;case X.IN_TEMPLATE:ZN(this,e);break;case X.AFTER_BODY:case X.IN_FRAMESET:case X.AFTER_FRAMESET:case X.AFTER_AFTER_BODY:case X.AFTER_AFTER_FRAMESET:nM(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===U.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case X.IN_HEAD:case X.IN_HEAD_NO_SCRIPT:case X.AFTER_HEAD:case X.TEXT:case X.IN_COLUMN_GROUP:case X.IN_SELECT:case X.IN_SELECT_IN_TABLE:case X.IN_FRAMESET:case X.AFTER_FRAMESET:this._insertCharacters(e);break;case X.IN_BODY:case X.IN_CAPTION:case X.IN_CELL:case X.IN_TEMPLATE:case X.AFTER_BODY:case X.AFTER_AFTER_BODY:case X.AFTER_AFTER_FRAMESET:SM(this,e);break;case X.IN_TABLE:case X.IN_TABLE_BODY:case X.IN_ROW:vN(this,e);break;case X.IN_TABLE_TEXT:AN(this,e);break;default:}}};function Kj(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):pN(e,t),n}function qj(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function Jj(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=Vj;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=Yj(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function Yj(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Xj(e,t,n){let r=IA(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===q.TEMPLATE&&i===G.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Zj(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Qj(e,t){for(let n=0;n<Bj;n++){let n=Kj(e,t);if(!n)break;let r=qj(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=Jj(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&Xj(e,a,i),Zj(e,r,n)}}function $j(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function eM(e,t){e._appendCommentNode(t,e.openElements.items[0])}function tM(e,t){e._appendCommentNode(t,e.document)}function nM(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function rM(e,t){e._setDocumentType(t);let n=t.forceQuirks?PA.QUIRKS:Cj(t);Sj(t)||e._err(t,W.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=X.BEFORE_HTML}function iM(e,t){e._err(t,W.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,PA.QUIRKS),e.insertionMode=X.BEFORE_HTML,e._processToken(t)}function aM(e,t){t.tagID===q.HTML?(e._insertElement(t,G.HTML),e.insertionMode=X.BEFORE_HEAD):sM(e,t)}function oM(e,t){let n=t.tagID;(n===q.HTML||n===q.HEAD||n===q.BODY||n===q.BR)&&sM(e,t)}function sM(e,t){e._insertFakeRootElement(),e.insertionMode=X.BEFORE_HEAD,e._processToken(t)}function cM(e,t){switch(t.tagID){case q.HTML:nN(e,t);break;case q.HEAD:e._insertElement(t,G.HTML),e.headElement=e.openElements.current,e.insertionMode=X.IN_HEAD;break;default:uM(e,t)}}function lM(e,t){let n=t.tagID;n===q.HEAD||n===q.BODY||n===q.HTML||n===q.BR?uM(e,t):e._err(t,W.endTagWithoutMatchingOpenElement)}function uM(e,t){e._insertFakeElement(K.HEAD,q.HEAD),e.headElement=e.openElements.current,e.insertionMode=X.IN_HEAD,e._processToken(t)}function dM(e,t){switch(t.tagID){case q.HTML:nN(e,t);break;case q.BASE:case q.BASEFONT:case q.BGSOUND:case q.LINK:case q.META:e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break;case q.TITLE:e._switchToTextParsing(t,zA.RCDATA);break;case q.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,zA.RAWTEXT):(e._insertElement(t,G.HTML),e.insertionMode=X.IN_HEAD_NO_SCRIPT);break;case q.NOFRAMES:case q.STYLE:e._switchToTextParsing(t,zA.RAWTEXT);break;case q.SCRIPT:e._switchToTextParsing(t,zA.SCRIPT_DATA);break;case q.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=X.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(X.IN_TEMPLATE);break;case q.HEAD:e._err(t,W.misplacedStartTagForHeadElement);break;default:mM(e,t)}}function fM(e,t){switch(t.tagID){case q.HEAD:e.openElements.pop(),e.insertionMode=X.AFTER_HEAD;break;case q.BODY:case q.BR:case q.HTML:mM(e,t);break;case q.TEMPLATE:pM(e,t);break;default:e._err(t,W.endTagWithoutMatchingOpenElement)}}function pM(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==q.TEMPLATE&&e._err(t,W.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(q.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,W.endTagWithoutMatchingOpenElement)}function mM(e,t){e.openElements.pop(),e.insertionMode=X.AFTER_HEAD,e._processToken(t)}function hM(e,t){switch(t.tagID){case q.HTML:nN(e,t);break;case q.BASEFONT:case q.BGSOUND:case q.HEAD:case q.LINK:case q.META:case q.NOFRAMES:case q.STYLE:dM(e,t);break;case q.NOSCRIPT:e._err(t,W.nestedNoscriptInHead);break;default:_M(e,t)}}function gM(e,t){switch(t.tagID){case q.NOSCRIPT:e.openElements.pop(),e.insertionMode=X.IN_HEAD;break;case q.BR:_M(e,t);break;default:e._err(t,W.endTagWithoutMatchingOpenElement)}}function _M(e,t){let n=t.type===_A.EOF?W.openElementsLeftAfterEof:W.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=X.IN_HEAD,e._processToken(t)}function vM(e,t){switch(t.tagID){case q.HTML:nN(e,t);break;case q.BODY:e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=X.IN_BODY;break;case q.FRAMESET:e._insertElement(t,G.HTML),e.insertionMode=X.IN_FRAMESET;break;case q.BASE:case q.BASEFONT:case q.BGSOUND:case q.LINK:case q.META:case q.NOFRAMES:case q.SCRIPT:case q.STYLE:case q.TEMPLATE:case q.TITLE:e._err(t,W.abandonedHeadElementChild),e.openElements.push(e.headElement,q.HEAD),dM(e,t),e.openElements.remove(e.headElement);break;case q.HEAD:e._err(t,W.misplacedStartTagForHeadElement);break;default:bM(e,t)}}function yM(e,t){switch(t.tagID){case q.BODY:case q.HTML:case q.BR:bM(e,t);break;case q.TEMPLATE:pM(e,t);break;default:e._err(t,W.endTagWithoutMatchingOpenElement)}}function bM(e,t){e._insertFakeElement(K.BODY,q.BODY),e.insertionMode=X.IN_BODY,xM(e,t)}function xM(e,t){switch(t.type){case _A.CHARACTER:CM(e,t);break;case _A.WHITESPACE_CHARACTER:SM(e,t);break;case _A.COMMENT:$j(e,t);break;case _A.START_TAG:nN(e,t);break;case _A.END_TAG:mN(e,t);break;case _A.EOF:hN(e,t);break;default:}}function SM(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function CM(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function wM(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function TM(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function EM(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,G.HTML),e.insertionMode=X.IN_FRAMESET)}function DM(e,t){e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,G.HTML)}function OM(e,t){e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&RA.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,G.HTML)}function kM(e,t){e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function AM(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,G.HTML),n||(e.formElement=e.openElements.current))}function jM(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===q.LI&&r===q.LI||(n===q.DD||n===q.DT)&&(r===q.DD||r===q.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==q.ADDRESS&&r!==q.DIV&&r!==q.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,G.HTML)}function MM(e,t){e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.tokenizer.state=zA.PLAINTEXT}function NM(e,t){e.openElements.hasInScope(q.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(q.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.framesetOk=!1}function PM(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(K.A);n&&(Qj(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function FM(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function IM(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(q.NOBR)&&(Qj(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function LM(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function RM(e,t){e.treeAdapter.getDocumentMode(e.document)!==PA.QUIRKS&&e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=X.IN_TABLE}function zM(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,G.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function BM(e){let t=vA(e,NA.TYPE);return t!=null&&t.toLowerCase()===zj}function VM(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,G.HTML),BM(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function HM(e,t){e._appendElement(t,G.HTML),t.ackSelfClosing=!0}function UM(e,t){e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._appendElement(t,G.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function WM(e,t){t.tagName=K.IMG,t.tagID=q.IMG,zM(e,t)}function GM(e,t){e._insertElement(t,G.HTML),e.skipNextNewLine=!0,e.tokenizer.state=zA.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=X.TEXT}function KM(e,t){e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,zA.RAWTEXT)}function qM(e,t){e.framesetOk=!1,e._switchToTextParsing(t,zA.RAWTEXT)}function JM(e,t){e._switchToTextParsing(t,zA.RAWTEXT)}function YM(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===X.IN_TABLE||e.insertionMode===X.IN_CAPTION||e.insertionMode===X.IN_TABLE_BODY||e.insertionMode===X.IN_ROW||e.insertionMode===X.IN_CELL?X.IN_SELECT_IN_TABLE:X.IN_SELECT}function XM(e,t){e.openElements.currentTagId===q.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML)}function ZM(e,t){e.openElements.hasInScope(q.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,G.HTML)}function QM(e,t){e.openElements.hasInScope(q.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(q.RTC),e._insertElement(t,G.HTML)}function $M(e,t){e._reconstructActiveFormattingElements(),Mj(t),Pj(t),t.selfClosing?e._appendElement(t,G.MATHML):e._insertElement(t,G.MATHML),t.ackSelfClosing=!0}function eN(e,t){e._reconstructActiveFormattingElements(),Nj(t),Pj(t),t.selfClosing?e._appendElement(t,G.SVG):e._insertElement(t,G.SVG),t.ackSelfClosing=!0}function tN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML)}function nN(e,t){switch(t.tagID){case q.I:case q.S:case q.B:case q.U:case q.EM:case q.TT:case q.BIG:case q.CODE:case q.FONT:case q.SMALL:case q.STRIKE:case q.STRONG:FM(e,t);break;case q.A:PM(e,t);break;case q.H1:case q.H2:case q.H3:case q.H4:case q.H5:case q.H6:OM(e,t);break;case q.P:case q.DL:case q.OL:case q.UL:case q.DIV:case q.DIR:case q.NAV:case q.MAIN:case q.MENU:case q.ASIDE:case q.CENTER:case q.FIGURE:case q.FOOTER:case q.HEADER:case q.HGROUP:case q.DIALOG:case q.DETAILS:case q.ADDRESS:case q.ARTICLE:case q.SEARCH:case q.SECTION:case q.SUMMARY:case q.FIELDSET:case q.BLOCKQUOTE:case q.FIGCAPTION:DM(e,t);break;case q.LI:case q.DD:case q.DT:jM(e,t);break;case q.BR:case q.IMG:case q.WBR:case q.AREA:case q.EMBED:case q.KEYGEN:zM(e,t);break;case q.HR:UM(e,t);break;case q.RB:case q.RTC:ZM(e,t);break;case q.RT:case q.RP:QM(e,t);break;case q.PRE:case q.LISTING:kM(e,t);break;case q.XMP:KM(e,t);break;case q.SVG:eN(e,t);break;case q.HTML:wM(e,t);break;case q.BASE:case q.LINK:case q.META:case q.STYLE:case q.TITLE:case q.SCRIPT:case q.BGSOUND:case q.BASEFONT:case q.TEMPLATE:dM(e,t);break;case q.BODY:TM(e,t);break;case q.FORM:AM(e,t);break;case q.NOBR:IM(e,t);break;case q.MATH:$M(e,t);break;case q.TABLE:RM(e,t);break;case q.INPUT:VM(e,t);break;case q.PARAM:case q.TRACK:case q.SOURCE:HM(e,t);break;case q.IMAGE:WM(e,t);break;case q.BUTTON:NM(e,t);break;case q.APPLET:case q.OBJECT:case q.MARQUEE:LM(e,t);break;case q.IFRAME:qM(e,t);break;case q.SELECT:YM(e,t);break;case q.OPTION:case q.OPTGROUP:XM(e,t);break;case q.NOEMBED:case q.NOFRAMES:JM(e,t);break;case q.FRAMESET:EM(e,t);break;case q.TEXTAREA:GM(e,t);break;case q.NOSCRIPT:e.options.scriptingEnabled?JM(e,t):tN(e,t);break;case q.PLAINTEXT:MM(e,t);break;case q.COL:case q.TH:case q.TD:case q.TR:case q.HEAD:case q.FRAME:case q.TBODY:case q.TFOOT:case q.THEAD:case q.CAPTION:case q.COLGROUP:break;default:tN(e,t)}}function rN(e,t){if(e.openElements.hasInScope(q.BODY)&&(e.insertionMode=X.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function iN(e,t){e.openElements.hasInScope(q.BODY)&&(e.insertionMode=X.AFTER_BODY,$N(e,t))}function aN(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function oN(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(q.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(q.FORM):n&&e.openElements.remove(n))}function sN(e){e.openElements.hasInButtonScope(q.P)||e._insertFakeElement(K.P,q.P),e._closePElement()}function cN(e){e.openElements.hasInListItemScope(q.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(q.LI),e.openElements.popUntilTagNamePopped(q.LI))}function lN(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function uN(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function dN(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function fN(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(K.BR,q.BR),e.openElements.pop(),e.framesetOk=!1}function pN(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==q.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function mN(e,t){switch(t.tagID){case q.A:case q.B:case q.I:case q.S:case q.U:case q.EM:case q.TT:case q.BIG:case q.CODE:case q.FONT:case q.NOBR:case q.SMALL:case q.STRIKE:case q.STRONG:Qj(e,t);break;case q.P:sN(e);break;case q.DL:case q.UL:case q.OL:case q.DIR:case q.DIV:case q.NAV:case q.PRE:case q.MAIN:case q.MENU:case q.ASIDE:case q.BUTTON:case q.CENTER:case q.FIGURE:case q.FOOTER:case q.HEADER:case q.HGROUP:case q.DIALOG:case q.ADDRESS:case q.ARTICLE:case q.DETAILS:case q.SEARCH:case q.SECTION:case q.SUMMARY:case q.LISTING:case q.FIELDSET:case q.BLOCKQUOTE:case q.FIGCAPTION:aN(e,t);break;case q.LI:cN(e);break;case q.DD:case q.DT:lN(e,t);break;case q.H1:case q.H2:case q.H3:case q.H4:case q.H5:case q.H6:uN(e);break;case q.BR:fN(e);break;case q.BODY:rN(e,t);break;case q.HTML:iN(e,t);break;case q.FORM:oN(e);break;case q.APPLET:case q.OBJECT:case q.MARQUEE:dN(e,t);break;case q.TEMPLATE:pM(e,t);break;default:pN(e,t)}}function hN(e,t){e.tmplInsertionModeStack.length>0?ZN(e,t):nM(e,t)}function gN(e,t){var n;t.tagID===q.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function _N(e,t){e._err(t,W.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function vN(e,t){if(e.openElements.currentTagId!==void 0&&Uj.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=X.IN_TABLE_TEXT,t.type){case _A.CHARACTER:jN(e,t);break;case _A.WHITESPACE_CHARACTER:AN(e,t);break}else kN(e,t)}function yN(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,G.HTML),e.insertionMode=X.IN_CAPTION}function bN(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,G.HTML),e.insertionMode=X.IN_COLUMN_GROUP}function xN(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.COLGROUP,q.COLGROUP),e.insertionMode=X.IN_COLUMN_GROUP,IN(e,t)}function SN(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,G.HTML),e.insertionMode=X.IN_TABLE_BODY}function CN(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.TBODY,q.TBODY),e.insertionMode=X.IN_TABLE_BODY,zN(e,t)}function wN(e,t){e.openElements.hasInTableScope(q.TABLE)&&(e.openElements.popUntilTagNamePopped(q.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function TN(e,t){BM(t)?e._appendElement(t,G.HTML):kN(e,t),t.ackSelfClosing=!0}function EN(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,G.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function DN(e,t){switch(t.tagID){case q.TD:case q.TH:case q.TR:CN(e,t);break;case q.STYLE:case q.SCRIPT:case q.TEMPLATE:dM(e,t);break;case q.COL:xN(e,t);break;case q.FORM:EN(e,t);break;case q.TABLE:wN(e,t);break;case q.TBODY:case q.TFOOT:case q.THEAD:SN(e,t);break;case q.INPUT:TN(e,t);break;case q.CAPTION:yN(e,t);break;case q.COLGROUP:bN(e,t);break;default:kN(e,t)}}function ON(e,t){switch(t.tagID){case q.TABLE:e.openElements.hasInTableScope(q.TABLE)&&(e.openElements.popUntilTagNamePopped(q.TABLE),e._resetInsertionMode());break;case q.TEMPLATE:pM(e,t);break;case q.BODY:case q.CAPTION:case q.COL:case q.COLGROUP:case q.HTML:case q.TBODY:case q.TD:case q.TFOOT:case q.TH:case q.THEAD:case q.TR:break;default:kN(e,t)}}function kN(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,xM(e,t),e.fosterParentingEnabled=n}function AN(e,t){e.pendingCharacterTokens.push(t)}function jN(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function MN(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)kN(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var NN=new Set([q.CAPTION,q.COL,q.COLGROUP,q.TBODY,q.TD,q.TFOOT,q.TH,q.THEAD,q.TR]);function PN(e,t){let n=t.tagID;NN.has(n)?e.openElements.hasInTableScope(q.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(q.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=X.IN_TABLE,DN(e,t)):nN(e,t)}function FN(e,t){let n=t.tagID;switch(n){case q.CAPTION:case q.TABLE:e.openElements.hasInTableScope(q.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(q.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=X.IN_TABLE,n===q.TABLE&&ON(e,t));break;case q.BODY:case q.COL:case q.COLGROUP:case q.HTML:case q.TBODY:case q.TD:case q.TFOOT:case q.TH:case q.THEAD:case q.TR:break;default:mN(e,t)}}function IN(e,t){switch(t.tagID){case q.HTML:nN(e,t);break;case q.COL:e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break;case q.TEMPLATE:dM(e,t);break;default:RN(e,t)}}function LN(e,t){switch(t.tagID){case q.COLGROUP:e.openElements.currentTagId===q.COLGROUP&&(e.openElements.pop(),e.insertionMode=X.IN_TABLE);break;case q.TEMPLATE:pM(e,t);break;case q.COL:break;default:RN(e,t)}}function RN(e,t){e.openElements.currentTagId===q.COLGROUP&&(e.openElements.pop(),e.insertionMode=X.IN_TABLE,e._processToken(t))}function zN(e,t){switch(t.tagID){case q.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,G.HTML),e.insertionMode=X.IN_ROW;break;case q.TH:case q.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(K.TR,q.TR),e.insertionMode=X.IN_ROW,VN(e,t);break;case q.CAPTION:case q.COL:case q.COLGROUP:case q.TBODY:case q.TFOOT:case q.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE,DN(e,t));break;default:DN(e,t)}}function BN(e,t){let n=t.tagID;switch(t.tagID){case q.TBODY:case q.TFOOT:case q.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE);break;case q.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE,ON(e,t));break;case q.BODY:case q.CAPTION:case q.COL:case q.COLGROUP:case q.HTML:case q.TD:case q.TH:case q.TR:break;default:ON(e,t)}}function VN(e,t){switch(t.tagID){case q.TH:case q.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,G.HTML),e.insertionMode=X.IN_CELL,e.activeFormattingElements.insertMarker();break;case q.CAPTION:case q.COL:case q.COLGROUP:case q.TBODY:case q.TFOOT:case q.THEAD:case q.TR:e.openElements.hasInTableScope(q.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE_BODY,zN(e,t));break;default:DN(e,t)}}function HN(e,t){switch(t.tagID){case q.TR:e.openElements.hasInTableScope(q.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE_BODY);break;case q.TABLE:e.openElements.hasInTableScope(q.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE_BODY,BN(e,t));break;case q.TBODY:case q.TFOOT:case q.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(q.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE_BODY,BN(e,t));break;case q.BODY:case q.CAPTION:case q.COL:case q.COLGROUP:case q.HTML:case q.TD:case q.TH:break;default:ON(e,t)}}function UN(e,t){let n=t.tagID;NN.has(n)?(e.openElements.hasInTableScope(q.TD)||e.openElements.hasInTableScope(q.TH))&&(e._closeTableCell(),VN(e,t)):nN(e,t)}function WN(e,t){let n=t.tagID;switch(n){case q.TD:case q.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=X.IN_ROW);break;case q.TABLE:case q.TBODY:case q.TFOOT:case q.THEAD:case q.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),HN(e,t));break;case q.BODY:case q.CAPTION:case q.COL:case q.COLGROUP:case q.HTML:break;default:mN(e,t)}}function GN(e,t){switch(t.tagID){case q.HTML:nN(e,t);break;case q.OPTION:e.openElements.currentTagId===q.OPTION&&e.openElements.pop(),e._insertElement(t,G.HTML);break;case q.OPTGROUP:e.openElements.currentTagId===q.OPTION&&e.openElements.pop(),e.openElements.currentTagId===q.OPTGROUP&&e.openElements.pop(),e._insertElement(t,G.HTML);break;case q.HR:e.openElements.currentTagId===q.OPTION&&e.openElements.pop(),e.openElements.currentTagId===q.OPTGROUP&&e.openElements.pop(),e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break;case q.INPUT:case q.KEYGEN:case q.TEXTAREA:case q.SELECT:e.openElements.hasInSelectScope(q.SELECT)&&(e.openElements.popUntilTagNamePopped(q.SELECT),e._resetInsertionMode(),t.tagID!==q.SELECT&&e._processStartTag(t));break;case q.SCRIPT:case q.TEMPLATE:dM(e,t);break;default:}}function KN(e,t){switch(t.tagID){case q.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===q.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===q.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===q.OPTGROUP&&e.openElements.pop();break;case q.OPTION:e.openElements.currentTagId===q.OPTION&&e.openElements.pop();break;case q.SELECT:e.openElements.hasInSelectScope(q.SELECT)&&(e.openElements.popUntilTagNamePopped(q.SELECT),e._resetInsertionMode());break;case q.TEMPLATE:pM(e,t);break;default:}}function qN(e,t){let n=t.tagID;n===q.CAPTION||n===q.TABLE||n===q.TBODY||n===q.TFOOT||n===q.THEAD||n===q.TR||n===q.TD||n===q.TH?(e.openElements.popUntilTagNamePopped(q.SELECT),e._resetInsertionMode(),e._processStartTag(t)):GN(e,t)}function JN(e,t){let n=t.tagID;n===q.CAPTION||n===q.TABLE||n===q.TBODY||n===q.TFOOT||n===q.THEAD||n===q.TR||n===q.TD||n===q.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(q.SELECT),e._resetInsertionMode(),e.onEndTag(t)):KN(e,t)}function YN(e,t){switch(t.tagID){case q.BASE:case q.BASEFONT:case q.BGSOUND:case q.LINK:case q.META:case q.NOFRAMES:case q.SCRIPT:case q.STYLE:case q.TEMPLATE:case q.TITLE:dM(e,t);break;case q.CAPTION:case q.COLGROUP:case q.TBODY:case q.TFOOT:case q.THEAD:e.tmplInsertionModeStack[0]=X.IN_TABLE,e.insertionMode=X.IN_TABLE,DN(e,t);break;case q.COL:e.tmplInsertionModeStack[0]=X.IN_COLUMN_GROUP,e.insertionMode=X.IN_COLUMN_GROUP,IN(e,t);break;case q.TR:e.tmplInsertionModeStack[0]=X.IN_TABLE_BODY,e.insertionMode=X.IN_TABLE_BODY,zN(e,t);break;case q.TD:case q.TH:e.tmplInsertionModeStack[0]=X.IN_ROW,e.insertionMode=X.IN_ROW,VN(e,t);break;default:e.tmplInsertionModeStack[0]=X.IN_BODY,e.insertionMode=X.IN_BODY,nN(e,t)}}function XN(e,t){t.tagID===q.TEMPLATE&&pM(e,t)}function ZN(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(q.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):nM(e,t)}function QN(e,t){t.tagID===q.HTML?nN(e,t):eP(e,t)}function $N(e,t){if(t.tagID===q.HTML){if(e.fragmentContext||(e.insertionMode=X.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===q.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else eP(e,t)}function eP(e,t){e.insertionMode=X.IN_BODY,xM(e,t)}function tP(e,t){switch(t.tagID){case q.HTML:nN(e,t);break;case q.FRAMESET:e._insertElement(t,G.HTML);break;case q.FRAME:e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break;case q.NOFRAMES:dM(e,t);break;default:}}function nP(e,t){t.tagID===q.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==q.FRAMESET&&(e.insertionMode=X.AFTER_FRAMESET))}function rP(e,t){switch(t.tagID){case q.HTML:nN(e,t);break;case q.NOFRAMES:dM(e,t);break;default:}}function iP(e,t){t.tagID===q.HTML&&(e.insertionMode=X.AFTER_AFTER_FRAMESET)}function aP(e,t){t.tagID===q.HTML?nN(e,t):oP(e,t)}function oP(e,t){e.insertionMode=X.IN_BODY,xM(e,t)}function sP(e,t){switch(t.tagID){case q.HTML:nN(e,t);break;case q.NOFRAMES:dM(e,t);break;default:}}function cP(e,t){t.chars=`�`,e._insertCharacters(t)}function lP(e,t){e._insertCharacters(t),e.framesetOk=!1}function uP(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==G.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function dP(e,t){if(jj(t))uP(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===G.MATHML?Mj(t):r===G.SVG&&(Fj(t),Nj(t)),Pj(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function fP(e,t){if(t.tagID===q.P||t.tagID===q.BR){uP(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===G.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}new Set([K.AREA,K.BASE,K.BASEFONT,K.BGSOUND,K.BR,K.COL,K.EMBED,K.FRAME,K.HR,K.IMG,K.INPUT,K.KEYGEN,K.LINK,K.META,K.PARAM,K.SOURCE,K.TRACK,K.WBR]);function pP(e,t){return Gj.parse(e,t)}function mP(e,t,n){typeof e==`string`&&(n=t,t=e,e=null);let r=Gj.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}var hP={basename:gP,dirname:_P,extname:vP,join:yP,sep:`/`};function gP(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);SP(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function _P(e){if(SP(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function vP(e){SP(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function yP(...e){let t=-1,n;for(;++t<e.length;)SP(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:bP(n)}function bP(e){SP(e);let t=e.codePointAt(0)===47,n=xP(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function xP(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function SP(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var CP={cwd:wP};function wP(){return`/`}function TP(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function EP(e){if(typeof e==`string`)e=new URL(e);else if(!TP(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return DP(e)}function DP(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var OP=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],kP=class{constructor(e){let t;t=e?TP(e)?{path:e}:typeof e==`string`||NP(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:CP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<OP.length;){let e=OP[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)OP.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?hP.basename(this.path):void 0}set basename(e){jP(e,`basename`),AP(e,`basename`),this.path=hP.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?hP.dirname(this.path):void 0}set dirname(e){MP(this.basename,`dirname`),this.path=hP.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?hP.extname(this.path):void 0}set extname(e){if(AP(e,`extname`),MP(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=hP.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){TP(e)&&(e=EP(e)),jP(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?hP.basename(this.path,this.extname):void 0}set stem(e){jP(e,`stem`),AP(e,`stem`),this.path=hP.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Ru(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function AP(e,t){if(e&&e.includes(hP.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+hP.sep+"`")}function jP(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function MP(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function NP(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var PP={abandonedHeadElementChild:{reason:`Unexpected metadata element after head`,description:"Unexpected element after head. Expected the element before `</head>`",url:!1},abruptClosingOfEmptyComment:{reason:`Unexpected abruptly closed empty comment`,description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:`Unexpected abruptly closed public identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:`Unexpected abruptly closed system identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:`Unexpected non-digit at start of numeric character reference`,description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:`Unexpected CDATA section in HTML`,description:"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:`Unexpected too big numeric character reference`,description:`Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)`},closingOfElementWithOpenChildElements:{reason:`Unexpected closing tag with open child elements`,description:`Unexpectedly closing tag. Expected other tags to be closed first`,url:!1},controlCharacterInInputStream:{reason:`Unexpected control character`,description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:`Unexpected control character reference`,description:`Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace`},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:`Unexpected duplicate attribute`,description:`Unexpectedly double attribute. Expected attributes to occur only once`},endTagWithAttributes:{reason:`Unexpected attribute on closing tag`,description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:`Unexpected slash at end of closing tag`,description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:`Unexpected unopened end tag`,description:`Unexpected end tag. Expected no end tag or another end tag`,url:!1},eofBeforeTagName:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected tag name instead`},eofInCdata:{reason:`Unexpected end of file in CDATA`,description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:`Unexpected end of file in comment`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype:{reason:`Unexpected end of file in doctype`,description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:`Unexpected end of file in element that can only contain text`,description:`Unexpected end of file. Expected text or a closing tag`,url:!1},eofInScriptHtmlCommentLikeText:{reason:`Unexpected end of file in comment inside script`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag:{reason:`Unexpected end of file in tag`,description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:`Incorrectly closed comment`,description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment:{reason:`Incorrectly opened comment`,description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:`Invalid sequence after doctype name`,description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:`Invalid first character in tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:`Misplaced doctype`,description:`Unexpected doctype. Expected doctype before head`,url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:`Missing attribute value`,description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:`Missing doctype before other content`,description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:`Missing doctype name`,description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:`Missing public identifier in doctype`,description:"Unexpected `%c`. Expected identifier for `public` instead"},missingDoctypeSystemIdentifier:{reason:`Missing system identifier in doctype`,description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:`Missing name in end tag`,description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:`Missing quote before public identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:`Missing quote before system identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:`Missing semicolon after character reference`,description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:`Missing whitespace after public identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:`Missing whitespace after system identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:`Missing whitespace before doctype name`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:`Missing whitespace between attributes`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:`Missing whitespace between public and system identifiers in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:`Unexpected nested comment`,description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:`Unexpected non-conforming doctype declaration`,description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:`Unexpected trailing slash on start tag of non-void element`,description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:`Unexpected noncharacter code point referenced by character reference`,description:`Unexpected code point. Do not use noncharacters in HTML`},noncharacterInInputStream:{reason:`Unexpected noncharacter character`,description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:`Unexpected NULL character referenced by character reference`,description:`Unexpected code point. Do not use NULL characters in HTML`},openElementsLeftAfterEof:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected closing tag instead`,url:!1},surrogateCharacterReference:{reason:`Unexpected surrogate character referenced by character reference`,description:`Unexpected code point. Do not use lone surrogate characters in HTML`},surrogateInInputStream:{reason:`Unexpected surrogate character`,description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:`Invalid character after system identifier in doctype`,description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:`Unexpected character in attribute name`,description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:`Unexpected character in unquoted attribute value`,description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:`Unexpected equals sign before attribute name`,description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:`Unexpected NULL character`,description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:`Unexpected question mark instead of tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:`Unexpected slash in tag`,description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:`Unexpected unknown named character reference`,description:`Unexpected character reference. Expected known named character references`}},FP=`https://html.spec.whatwg.org/multipage/parsing.html#parse-error-`,IP=/-[a-z]/g,LP=/%c(?:([-+])(\d+))?/g,RP=/%x/g,zP={2:!0,1:!1,0:null},BP={};function VP(e,t){let n=t||BP,r=n.onerror,i=e instanceof kP?e:new kP(e),a=n.fragment?mP:pP,o=String(i);return eA(a(o,{sourceCodeLocationInfo:!0,onParseError:n.onerror?s:null,scriptingEnabled:!1}),{file:i,space:n.space,verbose:n.verbose});function s(e){let t=e.code,a=HP(t),s=n[a]??!0,c=typeof s==`number`?s:+!!s;if(c){let n=PP[a],o=new Ru(l(n.reason),{place:{start:{line:e.startLine,column:e.startCol,offset:e.startOffset},end:{line:e.endLine,column:e.endCol,offset:e.endOffset}},ruleId:t,source:`hast-util-from-html`});i.path&&(o.file=i.path,o.name=i.path+`:`+o.name),o.fatal=zP[c],o.note=l(n.description),o.url=n.url===!1?void 0:FP+t,r(o)}function l(t){return t.replace(LP,n).replace(RP,r);function n(t,n,r){let i=(r?Number.parseInt(r,10):0)*(n===`-`?-1:1);return WP(o.charAt(e.startOffset+i))}function r(){return GP(o.charCodeAt(e.startOffset))}}}}function HP(e){return e.replace(IP,UP)}function UP(e){return e.charAt(1).toUpperCase()}function WP(e){return e==="`"?"` ` `":e}function GP(e){return`0x`+e.toString(16).toUpperCase()}function KP(e){let t=this,{emitParseErrors:n,...r}={...t.data(`settings`),...e};t.parser=i;function i(e,t){return VP(e,{...r,onerror:n?function(e){t.path&&(e.name=t.path+`:`+e.name,e.file=t.path),t.messages.push(e)}:void 0})}}var qP=typeof self==`object`?self:globalThis,JP=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new qP[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new qP[a](o),i)};return r},YP=e=>JP(new Map,e)(0),XP=``,{toString:ZP}={},{keys:QP}=Object,$P=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=ZP.call(e).slice(8,-1);switch(n){case`Array`:return[1,XP];case`Object`:return[2,XP];case`Date`:return[3,XP];case`RegExp`:return[4,XP];case`Map`:return[5,XP];case`Set`:return[6,XP];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},eF=([e,t])=>e===0&&(t===`function`||t===`symbol`),tF=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=$P(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of QP(r))(e||!eF($P(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(eF($P(n))||eF($P(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!eF($P(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},nF=(e,{json:t,lossy:n}={})=>{let r=[];return tF(!(t||n),!!t,new Map,r)(e),r},rF=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?YP(nF(e,t)):structuredClone(e):(e,t)=>YP(nF(e,t)),iF=(function(e,t,n,r,i){let a=aF(t);if(n!=null&&(typeof n!=`number`||n<0||n===1/0))throw Error("Expected positive finite `index`");if(r!=null&&(!r.type||!r.children))throw Error("Expected valid `parent`");if(n==null!=(r==null))throw Error("Expected both `index` and `parent`");return uF(e)?a.call(i,e,n,r):!1}),aF=(function(e){if(e==null)return lF;if(typeof e==`string`)return sF(e);if(typeof e==`object`)return oF(e);if(typeof e==`function`)return cF(e);throw Error("Expected function, string, or array as `test`")});function oF(e){let t=[],n=-1;for(;++n<e.length;)t[n]=aF(e[n]);return cF(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function sF(e){return cF(t);function t(t){return t.tagName===e}}function cF(e){return t;function t(t,n,r){return!!(uF(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function lF(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`element`&&`tagName`in e&&typeof e.tagName==`string`)}function uF(e){return typeof e==`object`&&!!e&&`type`in e&&`tagName`in e}var dF=aF(function(e){return e.tagName===`audio`||e.tagName===`canvas`||e.tagName===`embed`||e.tagName===`iframe`||e.tagName===`img`||e.tagName===`math`||e.tagName===`object`||e.tagName===`picture`||e.tagName===`svg`||e.tagName===`video`}),fF=/[ \t\n\f\r]/g;function pF(e){return typeof e==`object`?e.type===`text`?mF(e.value):!1:mF(e)}function mF(e){return e.replace(fF,``)===``}var hF=(function(e,t,n,r,i){let a=gF(t);if(n!=null&&(typeof n!=`number`||n<0||n===1/0))throw Error(`Expected positive finite index`);if(r!=null&&(!hF(r)||!r.children))throw Error(`Expected parent node`);if(r==null!=(n==null))throw Error(`Expected both parent and index`);return SF(e)?a.call(i,e,n,r):!1}),gF=(function(e){if(e==null)return xF;if(typeof e==`function`)return bF(e);if(typeof e==`object`)return Array.isArray(e)?_F(e):vF(e);if(typeof e==`string`)return yF(e);throw Error(`Expected function, string, or object as test`)});function _F(e){let t=[],n=-1;for(;++n<e.length;)t[n]=gF(e[n]);return bF(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function vF(e){let t=e;return bF(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function yF(e){return bF(t);function t(t){return t&&t.type===e}}function bF(e){return t;function t(t,n,r){return!!(SF(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function xF(){return!0}function SF(e){return typeof e==`object`&&!!e&&`type`in e}var CF=`address.article.aside.blockquote.body.br.caption.center.col.colgroup.dd.dialog.dir.div.dl.dt.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.legend.li.li.listing.main.menu.nav.ol.optgroup.option.p.plaintext.pre.section.summary.table.tbody.td.td.tfoot.th.th.thead.tr.ul.wbr.xmp`.split(`.`),wF=[`button`,`input`,`select`,`textarea`],TF=[`area`,`base`,`basefont`,`dialog`,`datalist`,`head`,`link`,`meta`,`noembed`,`noframes`,`param`,`rp`,`script`,`source`,`style`,`template`,`track`,`title`],EF={},DF=gF([`comment`,`doctype`]);function OF(e,t){kF(e,{collapse:BF((t||EF).newlines?RF:zF),whitespace:`normal`})}function kF(e,t){if(`children`in e){let n={...t};return(e.type===`root`||FF(e))&&(n.before=!0,n.after=!0),n.whitespace=VF(e,t),jF(e,n)}if(e.type===`text`){if(t.whitespace===`normal`)return AF(e,t);t.whitespace===`nowrap`&&(e.value=t.collapse(e.value))}return{ignore:DF(e),stripAtStart:!1,remove:!1}}function AF(e,t){let n=t.collapse(e.value),r={ignore:!1,stripAtStart:!1,remove:!1},i=0,a=n.length;return t.before&&LF(n.charAt(0))&&i++,i!==a&&LF(n.charAt(a-1))&&(t.after?a--:r.stripAtStart=!0),i===a?r.remove=!0:e.value=n.slice(i,a),r}function jF(e,t){let n=t.before,r=t.after,i=e.children,a=i.length,o=-1;for(;++o<a;){let e=kF(i[o],{...t,after:MF(i,o,r),before:n});e.remove?(i.splice(o,1),o--,a--):e.ignore||(n=e.stripAtStart),PF(i[o])&&(n=!1)}return{ignore:!1,stripAtStart:!!(n||r),remove:!1}}function MF(e,t,n){for(;++t<e.length;){let n=e[t],r=NF(n);if(r===void 0&&`children`in n&&!IF(n)&&(r=MF(n.children,-1)),typeof r==`boolean`)return r}return n}function NF(e){if(e.type===`element`){if(PF(e))return!1;if(FF(e))return!0}else if(e.type===`text`){if(!pF(e))return!1}else if(!DF(e))return!1}function PF(e){return dF(e)||iF(e,wF)}function FF(e){return iF(e,CF)}function IF(e){return!!(e.type===`element`&&e.properties.hidden)||DF(e)||iF(e,TF)}function LF(e){return e===` `||e===`
|
|
302
|
-
`}function
|
|
303
|
-
`.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function
|
|
304
|
-
`:cI(e)?(s=2,c=2):dI(e)&&(s=1,c=1);++a<i.length;)o=o.concat(pI(i[a],e,{whitespace:r,breakBefore:a?void 0:s,breakAfter:a<i.length-1?oI(i[a+1]):c}));return sI(e)&&rI(t,e,sI)&&o.push(` `),s&&o.unshift(s),c&&o.push(c),o}function hI(e,t){let n=String(e.value),r=[],i=[],a=0;for(;a<=n.length;){iI.lastIndex=a;let e=iI.exec(n),i=e&&`index`in e?e.index:n.length;r.push(_I(n.slice(a,i).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,``),a===0?t.breakBefore:!0,i===n.length?t.breakAfter:!0)),a=i+1}let o=-1,s;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),s=void 0):r[o]?(typeof s==`number`&&i.push(s),i.push(r[o]),s=0):(o===0||o===r.length-1)&&i.push(0);return i}function gI(e){return[String(e.value)]}function _I(e,t,n){let r=[],i=0,a;for(;i<e.length;){aI.lastIndex=i;let n=aI.exec(e);a=n?n.index:e.length,!i&&!a&&n&&!t&&r.push(``),i!==a&&r.push(e.slice(i,a)),i=n?a+n[0].length:a}return i!==a&&!n&&r.push(``),r.join(` `)}function vI(e,t){if(e.type===`element`){let n=e.properties||{};switch(e.tagName){case`listing`:case`plaintext`:case`xmp`:return`pre`;case`nobr`:return`nowrap`;case`pre`:return n.wrap?`pre-wrap`:`pre`;case`td`:case`th`:return n.noWrap?`nowrap`:t.whitespace;case`textarea`:return`pre-wrap`;default:}}return t.whitespace}function yI(e){return!!(e.properties||{}).hidden}function bI(e){return e.tagName===`td`||e.tagName===`th`}function xI(e){return e.tagName===`dialog`&&!(e.properties||{}).open}function SI(e){let t=String(e),n=t.length;for(;n>0;){let e=t.codePointAt(n-1);if(e!==void 0&&(e===10||e===13))n--;else break}return t.slice(0,n)}var CI=`language-`;function wI(e,t){let n=t.children,r=-1,i,a;if(t.tagName===`pre`)for(;++r<n.length;){let e=n[r];if(e.type===`element`&&e.tagName===`code`&&e.properties&&e.properties.className&&Array.isArray(e.properties.className)){i=e.properties.className;break}}if(i){for(r=-1;++r<i.length;)if(String(i[r]).slice(0,9)===CI){a=String(i[r]).slice(9);break}}let o={type:`code`,lang:a||null,meta:null,value:SI(fI(t))};return e.patch(t,o),o}function TI(e,t){let n={type:`html`,value:`<!--`+t.value+`-->`};return e.patch(t,n),n}function EI(e,t){let n={type:`delete`,children:e.all(t)};return e.patch(t,n),n}function DI(e){let t=-1;if(e.length>1){for(;++t<e.length;)if(e[t].spread)return!0}return!1}function OI(e,t){let n=[],r=[],i=-1;for(;++i<t.children.length;){let e=t.children[i];e.type===`element`&&e.tagName===`div`?n.push(...e.children):n.push(e)}let a={definitions:[],titles:[]};for(i=-1;++i<n.length;){let e=n[i];if(e.type===`element`&&e.tagName===`dt`){let t=n[i-1];t&&t.type===`element`&&t.tagName===`dd`&&(r.push(a),a={definitions:[],titles:[]}),a.titles.push(e)}else a.definitions.push(e)}r.push(a),i=-1;let o=[];for(;++i<r.length;){let t=[...kI(e,r[i].titles),...kI(e,r[i].definitions)];t.length>0&&o.push({type:`listItem`,spread:t.length>1,checked:null,children:t})}if(o.length>0){let n={type:`list`,ordered:!1,start:null,spread:DI(o),children:o};return e.patch(t,n),n}}function kI(e,t){let n=e.all({type:`root`,children:t}),r=e.toSpecificContent(n,AI);return r.length===0?[]:r.length===1?r[0].children:[{type:`list`,ordered:!1,start:null,spread:DI(r),children:r}]}function AI(){return{type:`listItem`,spread:!1,checked:null,children:[]}}function jI(e,t){let n={type:`emphasis`,children:e.all(t)};return e.patch(t,n),n}function MI(e){let t=0,n=e.length;for(;t<n&&e[t].type===`break`;)t++;for(;n>t&&e[n-1].type===`break`;)n--;return t===0&&n===e.length?e:e.slice(t,n)}function NI(e,t){let n={type:`heading`,depth:Number(t.tagName.charAt(1))||1,children:MI(e.all(t))};return e.patch(t,n),n}function PI(e,t){let n={type:`thematicBreak`};return e.patch(t,n),n}function FI(e,t){let n=t.properties||{},r=String(n.src||``),i=String(n.title||``);if(r&&i){let n={type:`link`,title:null,url:e.resolve(r),children:[{type:`text`,value:i}]};return e.patch(t,n),n}}function II(e,t){let n=t.properties||{},r={type:`image`,url:e.resolve(String(n.src||``)||null),title:n.title?String(n.title):null,alt:n.alt?String(n.alt):``};return e.patch(t,r),r}function LI(e,t){let n={type:`inlineCode`,value:fI(t)};return e.patch(t,n),n}function RI(e,t){let n=[],r=[],i=t||e.properties||{},a=zI(e),o=Math.min(Number.parseInt(String(i.size),10),0)||(i.multiple?4:1),s=-1;for(;++s<a.length;){let e=a[s];e&&e.properties&&e.properties.selected&&n.push(e)}let c=n.length>0?n:a,l=Math.min(c.length,o);for(s=-1;++s<l;){let e=c[s],t=e.properties||{},n=fI(e),i=n||String(t.label||``),a=String(t.value||``)||n;r.push([a,i===a?void 0:i])}return r}function zI(e){let t=[],n=-1;for(;++n<e.children.length;){let r=e.children[n];`children`in r&&Array.isArray(r.children)&&t.push(...zI(r)),r.type===`element`&&r.tagName===`option`&&(!r.properties||!r.properties.disabled)&&t.push(r)}return t}var BI=`[x]`,VI=`[ ]`;function HI(e,t){let n=t.properties||{},r=String(n.value||n.placeholder||``);if(n.disabled||n.type===`hidden`||n.type===`file`)return;if(n.type===`checkbox`||n.type===`radio`){let r={type:`text`,value:n.checked?e.options.checked||BI:e.options.unchecked||VI};return e.patch(t,r),r}if(n.type===`image`){let i=n.alt||r;if(i){let r={type:`image`,url:e.resolve(String(n.src||``)||null),title:String(n.title||``)||null,alt:String(i)};return e.patch(t,r),r}return}let i=[];if(r)i=[[r,void 0]];else if(n.type!==`button`&&n.type!==`file`&&n.type!==`password`&&n.type!==`reset`&&n.type!==`submit`&&n.list){let t=String(n.list),r=e.elementById.get(t);r&&r.tagName===`datalist`&&(i=RI(r,n))}if(i.length===0)return;if(n.type===`password`&&(i[0]=[`•`.repeat(i[0][0].length),void 0]),n.type===`email`||n.type===`url`){let t=[],r=-1;for(;++r<i.length;){let a=e.resolve(i[r][0]),o={type:`link`,title:null,url:n.type===`email`?`mailto:`+a:a,children:[{type:`text`,value:i[r][1]||a}]};t.push(o),r!==i.length-1&&t.push({type:`text`,value:`, `})}return t}let a=[],o=-1;for(;++o<i.length;)a.push(i[o][1]?i[o][1]+` (`+i[o][0]+`)`:i[o][0]);let s={type:`text`,value:a.join(`, `)};return e.patch(t,s),s}var UI={}.hasOwnProperty;function WI(e,t){let n=e.type===`element`&&UI.call(e.properties,t)&&e.properties[t];return n!=null&&n!==!1}var GI=new Set([`pingback`,`prefetch`,`stylesheet`]);function KI(e){if(e.type!==`element`||e.tagName!==`link`)return!1;if(e.properties.itemProp)return!0;let t=e.properties.rel,n=-1;if(!Array.isArray(t)||t.length===0)return!1;for(;++n<t.length;)if(!GI.has(String(t[n])))return!1;return!0}var qI=aF(`a.abbr.area.b.bdi.bdo.br.button.cite.code.data.datalist.del.dfn.em.i.input.ins.kbd.keygen.label.map.mark.meter.noscript.output.progress.q.ruby.s.samp.script.select.small.span.strong.sub.sup.template.textarea.time.u.var.wbr`.split(`.`)),JI=aF(`meta`);function YI(e){return!!(e.type===`text`||qI(e)||dF(e)||KI(e)||JI(e)&&WI(e,`itemProp`))}function XI(e,t){let{rest:n,checkbox:r}=QI(t),i=r?!!r.properties.checked:null,a={type:`listItem`,spread:ZI(n),checked:i,children:e.toFlow(e.all(n))};return e.patch(t,a),a}function ZI(e){let t=-1,n=!1;for(;++t<e.children.length;){let r=e.children[t];if(r.type===`element`){if(YI(r))continue;if(r.tagName===`p`||n||ZI(r))return!0;n=!0}}return!1}function QI(e){let t=e.children[0];if(t&&t.type===`element`&&t.tagName===`input`&&t.properties&&(t.properties.type===`checkbox`||t.properties.type===`radio`))return{checkbox:t,rest:{...e,children:e.children.slice(1)}};if(t&&t.type===`element`&&t.tagName===`p`){let{checkbox:n,rest:r}=QI(t);if(n)return{checkbox:n,rest:{...e,children:[r,...e.children.slice(1)]}}}return{checkbox:void 0,rest:e}}function $I(e,t){let n=t.tagName===`ol`,r=e.toSpecificContent(e.all(t),eL),i=null;n&&(i=t.properties&&t.properties.start?Number.parseInt(String(t.properties.start),10):1);let a={type:`list`,ordered:n,start:i,spread:DI(r),children:r};return e.patch(t,a),a}function eL(){return{type:`listItem`,spread:!1,checked:null,children:[]}}var tL={};function nL(e,t){let n=t||tL;return rL(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function rL(e,t,n){if(aL(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 iL(e.children,t,n)}return Array.isArray(e)?iL(e,t,n):``}function iL(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=rL(e[i],t,n);return r.join(``)}function aL(e){return!!(e&&typeof e==`object`)}var oL=gF([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function sL(e){let t=-1;for(;++t<e.length;){let n=e[t];if(!fL(n)||`children`in n&&sL(n.children))return!0}return!1}function cL(e){return uL(e,t,function(e){return e});function t(e){return e.every(function(e){return e.type===`text`?pF(e.value):!1})?[]:[{type:`paragraph`,children:MI(e)}]}}function lL(e){return uL(e.children,t,n);function t(t){let n=pL(e);return n.children=t,[n]}function n(t){if(`children`in t&&`children`in e){let n=pL(e),r=pL(t);return n.children=t.children,r.children.push(n),r}return{...t}}}function uL(e,t,n){let r=dL(e),i=[],a=[],o=-1;for(;++o<r.length;){let e=r[o];fL(e)?a.push(e):(a.length>0&&(i.push(...t(a)),a=[]),i.push(n(e)))}return a.length>0&&(i.push(...t(a)),a=[]),i}function dL(e){let t=[],n=-1;for(;++n<e.length;){let r=e[n];(r.type===`delete`||r.type===`link`)&&sL(r.children)?t.push(...lL(r)):t.push(r)}return t}function fL(e){let t=e.data&&e.data.hName;return t?YI({type:`element`,tagName:t,properties:{},children:[]}):oL(e)}function pL(e){return rF({...e,children:[]})}function mL(e,t){let n=t.properties||{},r=t.tagName===`video`?String(n.poster||``):``,i=String(n.src||``),a=-1,o=!1,s=e.all(t);if(JF({type:`root`,children:s},function(e){if(e.type===`link`)return o=!0,!1}),o||sL(s))return s;for(;!i&&++a<t.children.length;){let e=t.children[a];e.type===`element`&&e.tagName===`source`&&e.properties&&(i=String(e.properties.src||``))}if(r){let n={type:`image`,title:null,url:e.resolve(r),alt:nL(s)};e.patch(t,n),s=[n]}let c=s,l={type:`link`,title:n.title?String(n.title):null,url:e.resolve(i),children:c};return e.patch(t,l),l}function hL(e,t){let n=MI(e.all(t));if(n.length>0){let r={type:`paragraph`,children:n};return e.patch(t,r),r}}var gL=[`"`];function _L(e,t){let n=e.options.quotes||gL;e.qNesting++;let r=e.all(t);e.qNesting--;let i=n[e.qNesting%n.length],a=r[0],o=r[r.length-1],s=i.charAt(0),c=i.length>1?i.charAt(1):i;return a&&a.type===`text`?a.value=s+a.value:r.unshift({type:`text`,value:s}),o&&o.type===`text`?o.value+=c:r.push({type:`text`,value:c}),r}function vL(e,t){let n=e.all(t);(e.options.document||sL(n))&&(n=cL(n));let r={type:`root`,children:n};return e.patch(t,r),r}function yL(e,t){let n=RI(t),r=-1,i=[];for(;++r<n.length;){let e=n[r];i.push(e[1]?e[1]+` (`+e[0]+`)`:e[0])}if(i.length>0){let n={type:`text`,value:i.join(`, `)};return e.patch(t,n),n}}function bL(e,t){let n={type:`strong`,children:e.all(t)};return e.patch(t,n),n}function xL(e,t){let n={type:`tableCell`,children:e.all(t)};if(e.patch(t,n),t.properties){let e=t.properties.rowSpan,r=t.properties.colSpan;if(e||r){let t=n.data||={};e&&(t.hastUtilToMdastTemporaryRowSpan=e),r&&(t.hastUtilToMdastTemporaryColSpan=r)}}return n}function SL(e,t){let n={type:`tableRow`,children:e.toSpecificContent(e.all(t),CL)};return e.patch(t,n),n}function CL(){return{type:`tableCell`,children:[]}}function wL(e,t){if(e.inTable){let n={type:`text`,value:fI(t)};return e.patch(t,n),n}e.inTable=!0;let{align:n,headless:r}=TL(t),i=e.toSpecificContent(e.all(t),DL);r&&i.unshift(DL());let a=-1;for(;++a<i.length;){let t=i[a];t.children=e.toSpecificContent(t.children,EL)}let o=1;for(a=-1;++a<i.length;){let e=i[a].children,t=-1;for(;++t<e.length;){let n=e[t];if(n.data){let e=n.data,r=Number.parseInt(String(e.hastUtilToMdastTemporaryColSpan),10)||1,o=Number.parseInt(String(e.hastUtilToMdastTemporaryRowSpan),10)||1;if(r>1||o>1){let e=a-1;for(;++e<a+o;){let n=t-1;for(;++n<t+r&&i[e];){let r=[];(e!==a||n!==t)&&r.push({type:`tableCell`,children:[]}),i[e].children.splice(n,0,...r)}}}`hastUtilToMdastTemporaryColSpan`in n.data&&delete n.data.hastUtilToMdastTemporaryColSpan,`hastUtilToMdastTemporaryRowSpan`in n.data&&delete n.data.hastUtilToMdastTemporaryRowSpan,Object.keys(n.data).length===0&&delete n.data}}e.length>o&&(o=e.length)}for(a=-1;++a<i.length;){let e=i[a].children,t=e.length-1;for(;++t<o;)e.push({type:`tableCell`,children:[]})}let s=n.length-1;for(;++s<o;)n.push(null);e.inTable=!1;let c={type:`table`,align:n,children:i};return e.patch(t,c),c}function TL(e){let t={align:[null],headless:!0},n=0,r=0;return JF(e,function(i){if(i.type===`element`){if(i.tagName===`table`&&e!==i)return GF;if((i.tagName===`th`||i.tagName===`td`)&&i.properties){if(!t.align[r]){let e=String(i.properties.align||``)||null;(e===`center`||e===`left`||e===`right`||e===null)&&(t.align[r]=e)}t.headless&&n<2&&i.tagName===`th`&&(t.headless=!1),r++}else i.tagName===`thead`?t.headless=!1:i.tagName===`tr`&&(n++,r=0)}}),t}function EL(){return{type:`tableCell`,children:[]}}function DL(){return{type:`tableRow`,children:[]}}function OL(e,t){let n={type:`text`,value:t.value};return e.patch(t,n),n}function kL(e,t){let n={type:`text`,value:fI(t)};return e.patch(t,n),n}function AL(e,t){let n={type:`text`,value:``};return e.patch(t,n),n}var jL={comment:TI,doctype:FL,root:vL,text:OL},ML={applet:FL,area:FL,basefont:FL,bgsound:FL,caption:FL,col:FL,colgroup:FL,command:FL,content:FL,datalist:FL,dialog:FL,element:FL,embed:FL,frame:FL,frameset:FL,isindex:FL,keygen:FL,link:FL,math:FL,menu:FL,menuitem:FL,meta:FL,nextid:FL,noembed:FL,noframes:FL,optgroup:FL,option:FL,param:FL,script:FL,shadow:FL,source:FL,spacer:FL,style:FL,svg:FL,template:FL,title:FL,track:FL,abbr:NL,acronym:NL,bdi:NL,bdo:NL,big:NL,blink:NL,button:NL,canvas:NL,cite:NL,data:NL,details:NL,dfn:NL,font:NL,ins:NL,label:NL,map:NL,marquee:NL,meter:NL,nobr:NL,noscript:NL,object:NL,output:NL,progress:NL,rb:NL,rbc:NL,rp:NL,rt:NL,rtc:NL,ruby:NL,slot:NL,small:NL,span:NL,sup:NL,sub:NL,tbody:NL,tfoot:NL,thead:NL,time:NL,address:PL,article:PL,aside:PL,body:PL,center:PL,div:PL,fieldset:PL,figcaption:PL,figure:PL,form:PL,footer:PL,header:PL,hgroup:PL,html:PL,legend:PL,main:PL,multicol:PL,nav:PL,picture:PL,section:PL,a:$F,audio:mL,b:bL,base:eI,blockquote:tI,br:nI,code:LI,dir:$I,dl:OI,dt:XI,dd:XI,del:EI,em:jI,h1:NI,h2:NI,h3:NI,h4:NI,h5:NI,h6:NI,hr:PI,i:jI,iframe:FI,img:II,image:II,input:HI,kbd:LI,li:XI,listing:wI,mark:jI,ol:$I,p:hL,plaintext:wI,pre:wI,q:_L,s:EI,samp:LI,select:yL,strike:EI,strong:bL,summary:hL,table:wL,td:xL,textarea:kL,th:xL,tr:SL,tt:LI,u:jI,ul:$I,var:LI,video:mL,wbr:AL,xmp:wI};function NL(e,t){return e.all(t)}function PL(e,t){return e.toFlow(e.all(t))}function FL(){}var IL={}.hasOwnProperty;function LL(e){return{all:RL,baseFound:!1,elementById:new Map,frozenBaseUrl:void 0,handlers:{...ML,...e.handlers},inTable:!1,nodeHandlers:{...jL,...e.nodeHandlers},one:zL,options:e,patch:BL,qNesting:0,resolve:VL,toFlow:HL,toSpecificContent:UL}}function RL(e){let t=e.children||[],n=[],r=-1;for(;++r<t.length;){let i=t[r],a=this.one(i,e);Array.isArray(a)?n.push(...a):a&&n.push(a)}return n}function zL(e,t){if(e.type===`element`){if(e.properties&&e.properties.dataMdast===`ignore`)return;if(IL.call(this.handlers,e.tagName))return this.handlers[e.tagName](this,e,t)||void 0}else if(IL.call(this.nodeHandlers,e.type))return this.nodeHandlers[e.type](this,e,t)||void 0;if(`value`in e&&typeof e.value==`string`){let t={type:`text`,value:e.value};return this.patch(e,t),t}if(`children`in e)return this.all(e)}function BL(e,t){e.position&&(t.position=QF(e))}function VL(e){let t=this.frozenBaseUrl;return e==null?``:t?String(new URL(e,t)):e}function HL(e){return cL(e)}function UL(e,t){let n=t(),r=[],i=[],a=-1;for(;++a<e.length;){let t=e[a];if(o(t))i.length>0&&(t.children.unshift(...i),i=[]),r.push(t);else{let e=t;i.push(e)}}if(i.length>0){let e=r[r.length-1];e||(e=t(),r.push(e)),e.children.push(...i),i=[]}return r;function o(e){return e.type===n.type}}var WL={};function GL(e,t){let n=rF(e),r=t||WL,i=HF({newlines:r.newlines===!0}),a=LL(r),o;i(n),JF(n,function(e){if(e&&e.type===`element`&&e.properties){let t=String(e.properties.id||``)||void 0;t&&!a.elementById.has(t)&&a.elementById.set(t,e)}});let s=a.one(n,void 0);return o=s?Array.isArray(s)?{type:`root`,children:s}:s:{type:`root`,children:[]},JF(o,function(e,t,n){if(e.type===`text`&&t!==void 0&&n){let r=n.children[t-1];if(r&&r.type===e.type)return r.value+=e.value,n.children.splice(t,1),r.position&&e.position&&(r.position.end=e.position.end),t-1;if(e.value=e.value.replace(/[\t ]*(\r?\n|\r)[\t ]*/,`$1`),n&&(n.type===`heading`||n.type===`paragraph`||n.type===`root`)&&(t||(e.value=e.value.replace(/^[\t ]+/,``)),t===n.children.length-1&&(e.value=e.value.replace(/[\t ]+$/,``))),!e.value)return n.children.splice(t,1),t}}),o}var KL={document:!0};function qL(e,t){return e&&`run`in e?async function(n,r){let i=GL(n,{...KL,...t});await e.run(i,r)}:function(t){return GL(t,{...KL,...e})}}function JL(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var YL=aR(/[A-Za-z]/),XL=aR(/[\dA-Za-z]/),ZL=aR(/[#-'*+\--9=?A-Z^-~]/);function QL(e){return e!==null&&(e<32||e===127)}var $L=aR(/\d/),eR=aR(/[\dA-Fa-f]/),tR=aR(/[!-/:-@[-`{-~]/);function Z(e){return e!==null&&e<-2}function nR(e){return e!==null&&(e<0||e===32)}function Q(e){return e===-2||e===-1||e===32}var rR=aR(/\p{P}|\p{S}/u),iR=aR(/\s/);function aR(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function oR(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function sR(e,t,n){let r=gF((n||{}).ignore||[]),i=cR(t),a=-1;for(;++a<i.length;)KF(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function cR(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([lR(e[0]),uR(e[1])])}return t}function lR(e){return typeof e==`string`?new RegExp(oR(e),`g`):e}function uR(e){return typeof e==`function`?e:function(){return e}}var dR=`phrasing`,fR=[`autolink`,`link`,`image`,`label`];function pR(){return{transforms:[xR],enter:{literalAutolink:hR,literalAutolinkEmail:gR,literalAutolinkHttp:gR,literalAutolinkWww:gR},exit:{literalAutolink:bR,literalAutolinkEmail:yR,literalAutolinkHttp:_R,literalAutolinkWww:vR}}}function mR(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:dR,notInConstruct:fR},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:dR,notInConstruct:fR},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:dR,notInConstruct:fR}]}}function hR(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function gR(e){this.config.enter.autolinkProtocol.call(this,e)}function _R(e){this.config.exit.autolinkProtocol.call(this,e)}function vR(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function yR(e){this.config.exit.autolinkEmail.call(this,e)}function bR(e){this.exit(e)}function xR(e){sR(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,SR],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,CR]],{ignore:[`link`,`linkReference`]})}function SR(e,t,n,r,i){let a=``;if(!ER(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!wR(n)))return!1;let o=TR(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function CR(e,t,n,r){return!ER(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function wR(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function TR(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=JL(e,`(`),a=JL(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function ER(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||iR(n)||rR(n))&&(!t||n!==47)}function DR(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}LR.peek=IR;function OR(){this.buffer()}function kR(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function AR(){this.buffer()}function jR(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function MR(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=DR(this.sliceSerialize(e)).toLowerCase(),n.label=t}function NR(e){this.exit(e)}function PR(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=DR(this.sliceSerialize(e)).toLowerCase(),n.label=t}function FR(e){this.exit(e)}function IR(){return`[`}function LR(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function RR(){return{enter:{gfmFootnoteCallString:OR,gfmFootnoteCall:kR,gfmFootnoteDefinitionLabelString:AR,gfmFootnoteDefinition:jR},exit:{gfmFootnoteCallString:MR,gfmFootnoteCall:NR,gfmFootnoteDefinitionLabelString:PR,gfmFootnoteDefinition:FR}}}function zR(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:LR},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
305
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?
|
|
306
|
-
`)}function
|
|
307
|
-
`&&
|
|
308
|
-
`}function
|
|
300
|
+
`):``,markdownTokenizer:{name:`taskList`,level:`block`,start(e){let t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;return t===void 0?-1:t},tokenize(e,t,n){let r=e=>{let t=TS(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);return t?[{type:`taskList`,raw:t.raw,items:t.items}]:n.blockTokens(e)},i=TS(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:`taskList`,raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});qx.create({name:`listKit`,addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(GD.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(KD.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(rO.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(fO.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(mO.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(hO.configure(this.options.taskList)),e}});var gO=` `,_O=`\xA0`,vO=jS.create({name:`paragraph`,priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:`block`,content:`inline*`,parseHTML(){return[{tag:`p`}]},renderHTML({HTMLAttributes:e}){return[`p`,Sb(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(n.length===1&&n[0].type===`image`)return t.parseChildren([n[0]]);let r=t.parseInline(n);return n.length===1&&n[0].type===`text`&&(n[0].raw===gO||n[0].text===gO||n[0].raw===_O||n[0].text===_O)&&r.length===1&&r[0].type===`text`&&(r[0].text===gO||r[0].text===_O)?t.createNode(`paragraph`,void 0,[]):t.createNode(`paragraph`,void 0,r)},renderMarkdown:(e,t,n)=>{if(!e)return``;let r=Array.isArray(e.content)?e.content:[];if(r.length===0){let e=Array.isArray(n?.previousNode?.content)?n.previousNode.content:[];return n?.previousNode?.type===`paragraph`&&e.length===0?gO:``}return t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),yO=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,bO=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,xO=Rx.create({name:`strike`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`s`},{tag:`del`},{tag:`strike`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`line-through`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`s`,Sb(this.options.HTMLAttributes,e),0]},markdownTokenName:`del`,parseMarkdown:(e,t)=>t.applyMark(`strike`,t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[lS({find:yO,type:this.type})]},addPasteRules(){return[NS({find:bO,type:this.type})]}}),SO=xO,CO=jS.create({name:`text`,group:`inline`,parseMarkdown:e=>({type:`text`,text:e.text||``}),renderMarkdown:e=>e.text||``}),wO=Rx.create({name:`underline`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`u`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`underline`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`u`,Sb(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||`underline`,t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:`underline`,level:`inline`,start(e){return e.indexOf(`++`)},tokenize(e,t,n){let r=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!r)return;let i=r[2].trim();return{type:`underline`,raw:r[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function TO(e={}){return new Hp({view(t){return new EO(t,e)}})}var EO=class{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=t.width??1,this.color=t.color===!1?void 0:t.color||`black`,this.class=t.class,this.handlers=[`dragover`,`dragend`,`drop`,`dragleave`].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,n,r=this.editorView.dom,i=r.getBoundingClientRect(),a=i.width/r.offsetWidth,o=i.height/r.offsetHeight;if(t){let t=e.nodeBefore,r=e.nodeAfter;if(t||r){let e=this.editorView.nodeDOM(this.cursorPos-(t?t.nodeSize:0));if(e){let i=e.getBoundingClientRect(),a=t?i.bottom:i.top;t&&r&&(a=(a+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let s=this.width/2*o;n={left:i.left,right:i.right,top:a-s,bottom:a+s}}}}if(!n){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*a;n={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let s=this.editorView.dom.offsetParent;this.element||(this.element=s.appendChild(document.createElement(`div`)),this.class&&(this.element.className=this.class),this.element.style.cssText=`position: absolute; z-index: 50; pointer-events: none;`,this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle(`prosemirror-dropcursor-block`,t),this.element.classList.toggle(`prosemirror-dropcursor-inline`,!t);let c,l;if(!s||s==document.body&&getComputedStyle(s).position==`static`)c=-pageXOffset,l=-pageYOffset;else{let e=s.getBoundingClientRect(),t=e.width/s.offsetWidth,n=e.height/s.offsetHeight;c=e.left-s.scrollLeft*t,l=e.top-s.scrollTop*n}this.element.style.left=(n.left-c)/a+`px`,this.element.style.top=(n.top-l)/o+`px`,this.element.style.width=(n.right-n.left)/a+`px`,this.element.style.height=(n.bottom-n.top)/o+`px`}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i=typeof r==`function`?r(this.editorView,t,e):r;if(t&&!i){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=np(this.editorView.state.doc,e,this.editorView.dragging.slice);t!=null&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}},DO=class e extends I{constructor(e){super(e,e)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):I.near(r)}content(){return F.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:`gapcursor`,pos:this.head}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for GapCursor.fromJSON`);return new e(t.resolve(n.pos))}getBookmark(){return new OO(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!AO(e)||!jO(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,r=!1){search:for(;;){if(!r&&e.valid(t))return t;let i=t.pos,a=null;for(let r=t.depth;;r--){let o=t.node(r);if(n>0?t.indexAfter(r)<o.childCount:t.index(r)>0){a=o.child(n>0?t.indexAfter(r):t.index(r)-1);break}else if(r==0)return null;i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}for(;;){let o=n>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!R.isSelectable(a)){t=t.doc.resolve(i+a.nodeSize*n),r=!1;continue search}break}a=o,i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}return null}}};DO.prototype.visible=!1,DO.findFrom=DO.findGapCursorFrom,I.jsonID(`gapcursor`,DO);var OO=class e{constructor(e){this.pos=e}map(t){return new e(t.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return DO.valid(t)?new DO(t):I.near(t)}};function kO(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function AO(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(e.childCount==0&&!e.inlineContent||kO(e.type))return!0;if(e.inlineContent)return!1}}return!0}function jO(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(e.childCount==0&&!e.inlineContent||kO(e.type))return!0;if(e.inlineContent)return!1}}return!0}function MO(){return new Hp({props:{decorations:LO,createSelectionBetween(e,t,n){return t.pos==n.pos&&DO.valid(n)?new DO(n):null},handleClick:FO,handleKeyDown:NO,handleDOMEvents:{beforeinput:IO}}})}var NO=iy({ArrowLeft:PO(`horiz`,-1),ArrowRight:PO(`horiz`,1),ArrowUp:PO(`vert`,-1),ArrowDown:PO(`vert`,1)});function PO(e,t){let n=e==`vert`?t>0?`down`:`up`:t>0?`right`:`left`;return function(e,r,i){let a=e.selection,o=t>0?a.$to:a.$from,s=a.empty;if(a instanceof L){if(!i.endOfTextblock(n)||o.depth==0)return!1;s=!1,o=e.doc.resolve(t>0?o.after():o.before())}let c=DO.findGapCursorFrom(o,t,s);return c?(r&&r(e.tr.setSelection(new DO(c))),!0):!1}}function FO(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!DO.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&R.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new DO(r))),!0)}function IO(e,t){if(t.inputType!=`insertCompositionText`||!(e.state.selection instanceof DO))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=P.empty;for(let e=r.length-1;e>=0;e--)i=P.from(r[e].createAndFill(null,i));let a=e.state.tr.replace(n.pos,n.pos,new F(i,0,0));return a.setSelection(L.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function LO(e){if(!(e.selection instanceof DO))return null;let t=document.createElement(`div`);return t.className=`ProseMirror-gapcursor`,uv.create(e.doc,[sv.widget(e.selection.head,t,{key:`gapcursor`})])}var RO=200,zO=function(){};zO.prototype.append=function(e){return e.length?(e=zO.from(e),!this.length&&e||e.length<RO&&this.leafAppend(e)||this.length<RO&&e.leafPrepend(this)||this.appendInner(e)):this},zO.prototype.prepend=function(e){return e.length?zO.from(e).append(this):this},zO.prototype.appendInner=function(e){return new VO(this,e)},zO.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?zO.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},zO.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},zO.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},zO.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},zO.from=function(e){return e instanceof zO?e:e&&e.length?new BO(e):zO.empty};var BO=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return e==0&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(e(this.values[i],r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(e(this.values[i],r+i)===!1)return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=RO)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=RO)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(zO);zO.empty=new BO([]);var VO=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&this.left.forEachInner(e,t,Math.min(n,i),r)===!1||n>i&&this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)===!1||n<i&&this.left.forEachInvertedInner(e,Math.min(t,i),n,r)===!1)return!1},t.prototype.sliceInner=function(e,t){if(e==0&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(zO),HO=500,UO=class e{constructor(e,t){this.items=e,this.eventCount=t}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,c,l=[],u=[];return this.items.forEach((t,n)=>{if(!t.step){i||(i=this.remapping(r,n+1),a=i.maps.length),a--,u.push(t);return}if(i){u.push(new GO(t.map));let e=t.step.map(i.slice(a)),n;e&&o.maybeStep(e).doc&&(n=o.mapping.maps[o.mapping.maps.length-1],l.push(new GO(n,void 0,void 0,l.length+u.length))),a--,n&&i.appendMap(n,a)}else o.maybeStep(t.step);if(t.selection)return s=i?t.selection.map(i.slice(a)):t.selection,c=new e(this.items.slice(0,r).append(u.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let e=0;e<t.steps.length;e++){let r=t.steps[e].invert(t.docs[e]),l=new GO(t.mapping.maps[e],r,n),u;(u=c&&c.merge(l))&&(l=u,e?a.pop():s=s.slice(0,s.length-1)),a.push(l),n&&=(o++,void 0),i||(c=l)}let l=o-r.depth;return l>qO&&(s=WO(s,l),o-=l),new e(s.append(a),o)}remapping(e,t){let n=new bf;return this.items.forEach((t,r)=>{let i=t.mirrorOffset!=null&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(e=>new GO(e))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let c=n;this.items.forEach(e=>{let n=a.getMirror(--c);if(n==null)return;o=Math.min(o,n);let i=a.maps[n];if(e.step){let o=t.steps[n].invert(t.docs[n]),l=e.selection&&e.selection.map(a.slice(c+1,n));l&&s++,r.push(new GO(i,o,l))}else r.push(new GO(i))},i);let l=[];for(let e=n;e<o;e++)l.push(new GO(a.maps[e]));let u=new e(this.items.slice(0,i).append(l).append(r),s);return u.emptyItemCount()>HO&&(u=u.compress(this.items.length-r.length)),u}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((e,o)=>{if(o>=t)i.push(e),e.selection&&a++;else if(e.step){let t=e.step.map(n.slice(r)),o=t&&t.getMap();if(r--,o&&n.appendMap(o,r),t){let s=e.selection&&e.selection.map(n.slice(r));s&&a++;let c=new GO(o.invert(),t,s),l,u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else e.map&&r--},this.items.length,0),new e(zO.from(i.reverse()),a)}};UO.empty=new UO(zO.empty,0);function WO(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&t--==0)return n=r,!1}),e.slice(n)}var GO=class e{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},KO=class{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}},qO=20;function nte(e,t,n,r){let i=n.getMeta($O),a;if(i)return i.historyState;n.getMeta(ate)&&(e=new KO(e.done,e.undone,null,0,-1));let o=n.getMeta(`appendedTransaction`);if(n.steps.length==0)return e;if(o&&o.getMeta($O))return o.getMeta($O).redo?new KO(e.done.addTransform(n,void 0,r,QO(t)),e.undone,JO(n.mapping.maps),e.prevTime,e.prevComposition):new KO(e.done,e.undone.addTransform(n,void 0,r,QO(t)),null,e.prevTime,e.prevComposition);if(n.getMeta(`addToHistory`)!==!1&&!(o&&o.getMeta(`addToHistory`)===!1)){let i=n.getMeta(`composition`),a=e.prevTime==0||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!rte(n,e.prevRanges)),s=o?YO(e.prevRanges,n.mapping):JO(n.mapping.maps);return new KO(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,QO(t)),UO.empty,s,n.time,i??e.prevComposition)}else if(a=n.getMeta(`rebased`))return new KO(e.done.rebased(n,a),e.undone.rebased(n,a),YO(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new KO(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),YO(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function rte(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function JO(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function YO(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),a=t.map(e[r+1],-1);i<=a&&n.push(i,a)}return n}function ite(e,t,n){let r=QO(t),i=$O.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,r),c=new KO(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta($O,{redo:n,historyState:c})}var XO=!1,ZO=null;function QO(e){let t=e.plugins;if(ZO!=t){XO=!1,ZO=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){XO=!0;break}}return XO}var $O=new Gp(`history`),ate=new Gp(`closeHistory`);function ote(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Hp({key:$O,state:{init(){return new KO(UO.empty,UO.empty,null,0,-1)},apply(t,n,r){return nte(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n==`historyUndo`?tk:n==`historyRedo`?nk:null;return!r||!e.editable?!1:(t.preventDefault(),r(e.state,e.dispatch))}}}})}function ek(e,t){return(n,r)=>{let i=$O.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let a=ite(i,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}var tk=ek(!1,!0),nk=ek(!0,!0);qx.create({name:`characterCount`,addOptions(){return{limit:null,mode:`textSize`,textCounter:e=>e.length,wordCounter:e=>e.split(` `).filter(e=>e!==``).length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)===`textSize`){let e=t.textBetween(0,t.content.size,void 0,` `);return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size,` `,` `);return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new Hp({key:new Gp(`characterCount`),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit;if(i==null||i===0){e=!0;return}let a=this.storage.characters({node:r.doc});if(a>i){let t=a-i;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let n=r.tr.deleteRange(0,t);return e=!0,n}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||n===0||n==null)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r||!e.getMeta(`paste`))return!1;let a=e.selection.$head.pos,o=a-(i-n),s=a;return e.deleteRange(o,s),!(this.storage.characters({node:e.doc})>n)}})]}});var ste=qx.create({name:`dropCursor`,addOptions(){return{color:`currentColor`,width:1,class:void 0}},addProseMirrorPlugins(){return[TO(this.options)]}});qx.create({name:`focus`,addOptions(){return{className:`has-focus`,mode:`all`}},addProseMirrorPlugins(){return[new Hp({key:new Gp(`focus`),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,a=[];if(!n||!r)return uv.create(e,[]);let o=0;this.options.mode===`deepest`&&e.descendants((e,t)=>{if(!e.isText){if(!(i>=t&&i<=t+e.nodeSize-1))return!1;o+=1}});let s=0;return e.descendants((e,t)=>{if(e.isText||!(i>=t&&i<=t+e.nodeSize-1))return!1;if(s+=1,this.options.mode===`deepest`&&o-s>0||this.options.mode===`shallowest`&&s>1)return this.options.mode===`deepest`;a.push(sv.node(t,t+e.nodeSize,{class:this.options.className}))}),uv.create(e,a)}}})]}});var cte=qx.create({name:`gapCursor`,addProseMirrorPlugins(){return[MO()]},extendNodeSchema(e){return{allowGapCursor:gb(z(e,`allowGapCursor`,{name:e.name,options:e.options,storage:e.storage}))??null}}}),rk=`placeholder`;function lte(e){return e.replace(/\s+/g,`-`).replace(/[^a-zA-Z0-9-]/g,``).replace(/^[0-9-]+/,``).replace(/^-+/,``).toLowerCase()}var ute=qx.create({name:`placeholder`,addOptions(){return{emptyEditorClass:`is-editor-empty`,emptyNodeClass:`is-empty`,dataAttribute:rk,placeholder:`Write something …`,showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){let e=this.options.dataAttribute?`data-${lte(this.options.dataAttribute)}`:`data-${rk}`;return[new Hp({key:new Gp(`placeholder`),props:{decorations:({doc:t,selection:n})=>{let r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=n,a=[];if(!r)return null;let o=this.editor.isEmpty;return t.descendants((t,n)=>{let r=i>=n&&i<=n+t.nodeSize,s=!t.isLeaf&&Qb(t);if(!t.type.isTextblock)return this.options.includeChildren;if((r||!this.options.showOnlyCurrent)&&s){let i=[this.options.emptyNodeClass];o&&i.push(this.options.emptyEditorClass);let s=sv.node(n,n+t.nodeSize,{class:i.join(` `),[e]:typeof this.options.placeholder==`function`?this.options.placeholder({editor:this.editor,node:t,pos:n,hasAnchor:r}):this.options.placeholder});a.push(s)}return this.options.includeChildren}),uv.create(t,a)}}})]}});qx.create({name:`selection`,addOptions(){return{className:`selection`}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new Hp({key:new Gp(`selection`),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||$b(n.selection)||e.view.dragging?null:uv.create(n.doc,[sv.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}});function ik({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var dte=qx.create({name:`trailingNode`,addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){let e=new Gp(this.name),t=this.options.node||this.editor.schema.topNodeType.contentMatch.defaultType?.name||`paragraph`,n=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(t).includes(e.name));return[new Hp({key:e,appendTransaction:(n,r,i)=>{let{doc:a,tr:o,schema:s}=i,c=e.getState(i),l=a.content.size,u=s.nodes[t];if(!n.some(e=>e.getMeta(`skipTrailingNode`))&&c)return o.insert(l,u.create())},state:{init:(e,t)=>{let r=t.tr.doc.lastChild;return!ik({node:r,types:n})},apply:(e,t)=>{if(!e.docChanged||e.getMeta(`__uniqueIDTransaction`))return t;let r=e.doc.lastChild;return!ik({node:r,types:n})}}})]}}),fte=qx.create({name:`undoRedo`,addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>tk(e,t),redo:()=>({state:e,dispatch:t})=>nk(e,t)}},addProseMirrorPlugins(){return[ote(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),pte=qx.create({name:`starterKit`,addExtensions(){let e=[];return this.options.bold!==!1&&e.push(WS.configure(this.options.bold)),this.options.blockquote!==!1&&e.push(jD.configure(this.options.blockquote)),this.options.bulletList!==!1&&e.push(GD.configure(this.options.bulletList)),this.options.code!==!1&&e.push(FD.configure(this.options.code)),this.options.codeBlock!==!1&&e.push(LS.configure(this.options.codeBlock)),this.options.document!==!1&&e.push(LD.configure(this.options.document)),this.options.dropcursor!==!1&&e.push(ste.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&e.push(cte.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&e.push(QS.configure(this.options.hardBreak)),this.options.heading!==!1&&e.push(eC.configure(this.options.heading)),this.options.undoRedo!==!1&&e.push(fte.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&e.push(RD.configure(this.options.horizontalRule)),this.options.italic!==!1&&e.push(XS.configure(this.options.italic)),this.options.listItem!==!1&&e.push(KD.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(rO.configure(this.options?.listKeymap)),this.options.link!==!1&&e.push(vT.configure(this.options?.link)),this.options.orderedList!==!1&&e.push(fO.configure(this.options.orderedList)),this.options.paragraph!==!1&&e.push(vO.configure(this.options.paragraph)),this.options.strike!==!1&&e.push(xO.configure(this.options.strike)),this.options.text!==!1&&e.push(CO.configure(this.options.text)),this.options.underline!==!1&&e.push(wO.configure(this.options?.underline)),this.options.trailingNode!==!1&&e.push(dte.configure(this.options?.trailingNode)),e}});function mte(){}var ak=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};ak.prototype.normal={},ak.prototype.property={},ak.prototype.space=void 0;function ok(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new ak(n,r,t)}function sk(e){return e.toLowerCase()}var ck=class{constructor(e,t){this.attribute=t,this.property=e}};ck.prototype.attribute=``,ck.prototype.booleanish=!1,ck.prototype.boolean=!1,ck.prototype.commaOrSpaceSeparated=!1,ck.prototype.commaSeparated=!1,ck.prototype.defined=!1,ck.prototype.mustUseProperty=!1,ck.prototype.number=!1,ck.prototype.overloadedBoolean=!1,ck.prototype.property=``,ck.prototype.spaceSeparated=!1,ck.prototype.space=void 0;var lk=t({boolean:()=>V,booleanish:()=>uk,commaOrSpaceSeparated:()=>mk,commaSeparated:()=>pk,number:()=>H,overloadedBoolean:()=>dk,spaceSeparated:()=>fk}),hte=0,V=hk(),uk=hk(),dk=hk(),H=hk(),fk=hk(),pk=hk(),mk=hk();function hk(){return 2**++hte}var gk=Object.keys(lk),_k=class extends ck{constructor(e,t,n,r){let i=-1;if(super(e,t),vk(this,`space`,r),typeof n==`number`)for(;++i<gk.length;){let e=gk[i];vk(this,gk[i],(n&lk[e])===lk[e])}}};_k.prototype.defined=!0;function vk(e,t,n){n&&(e[t]=n)}function yk(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new _k(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[sk(r)]=r,n[sk(a.attribute)]=r}return new ak(t,n,e.space)}var bk=yk({properties:{ariaActiveDescendant:null,ariaAtomic:uk,ariaAutoComplete:null,ariaBusy:uk,ariaChecked:uk,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:fk,ariaCurrent:null,ariaDescribedBy:fk,ariaDetails:null,ariaDisabled:uk,ariaDropEffect:fk,ariaErrorMessage:null,ariaExpanded:uk,ariaFlowTo:fk,ariaGrabbed:uk,ariaHasPopup:null,ariaHidden:uk,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:fk,ariaLevel:H,ariaLive:null,ariaModal:uk,ariaMultiLine:uk,ariaMultiSelectable:uk,ariaOrientation:null,ariaOwns:fk,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:uk,ariaReadOnly:uk,ariaRelevant:null,ariaRequired:uk,ariaRoleDescription:fk,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:uk,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function xk(e,t){return t in e?e[t]:t}function Sk(e,t){return xk(e,t.toLowerCase())}var gte=yk({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:pk,acceptCharset:fk,accessKey:fk,action:null,allow:null,allowFullScreen:V,allowPaymentRequest:V,allowUserMedia:V,alt:null,as:null,async:V,autoCapitalize:null,autoComplete:fk,autoFocus:V,autoPlay:V,blocking:fk,capture:null,charSet:null,checked:V,cite:null,className:fk,cols:H,colSpan:null,content:null,contentEditable:uk,controls:V,controlsList:fk,coords:H|pk,crossOrigin:null,data:null,dateTime:null,decoding:null,default:V,defer:V,dir:null,dirName:null,disabled:V,download:dk,draggable:uk,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:V,formTarget:null,headers:fk,height:H,hidden:dk,high:H,href:null,hrefLang:null,htmlFor:fk,httpEquiv:fk,id:null,imageSizes:null,imageSrcSet:null,inert:V,inputMode:null,integrity:null,is:null,isMap:V,itemId:null,itemProp:fk,itemRef:fk,itemScope:V,itemType:fk,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:V,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:V,muted:V,name:null,nonce:null,noModule:V,noValidate:V,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:V,optimum:H,pattern:null,ping:fk,placeholder:null,playsInline:V,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:V,referrerPolicy:null,rel:fk,required:V,reversed:V,rows:H,rowSpan:H,sandbox:fk,scope:null,scoped:V,seamless:V,selected:V,shadowRootClonable:V,shadowRootDelegatesFocus:V,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:uk,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:V,useMap:null,value:uk,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:fk,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:V,declare:V,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:V,noHref:V,noShade:V,noWrap:V,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:uk,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:V,disableRemotePlayback:V,prefix:null,property:null,results:H,security:null,unselectable:null},space:`html`,transform:Sk}),_te=yk({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`,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:mk,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:fk,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:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:V,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,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:pk,g2:pk,glyphName:pk,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:mk,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:H,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:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:fk,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:mk,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:mk,rev:mk,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:mk,requiredFeatures:mk,requiredFonts:mk,requiredFormats:mk,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:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:mk,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:mk,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:mk,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:xk}),Ck=yk({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()}}),wk=yk({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Sk}),Tk=yk({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),vte=/[A-Z]/g,Ek=/-[a-z]/g,yte=/^data[-\w.:]+$/i;function Dk(e,t){let n=sk(t),r=t,i=ck;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&yte.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Ek,kk);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Ek.test(e)){let n=e.replace(vte,Ok);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=_k}return new i(r,t)}function Ok(e){return`-`+e.toLowerCase()}function kk(e){return e.charAt(1).toUpperCase()}var Ak=ok([bk,gte,Ck,wk,Tk],`html`),jk=ok([bk,_te,Ck,wk,Tk],`svg`);function Mk(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Nk(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Pk=/[#.]/g;function Fk(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){Pk.lastIndex=i;let e=Pk.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function Ik(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Lk(e){return e.join(` `).trim()}function Rk(e,t,n){let r=n?Wk(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=Fk(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,zk(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Bk(e,o.properties,t,n)}for(let e of a)Vk(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function zk(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function Bk(e,t,n,r){let i=Dk(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?Ik(r):i.commaSeparated?Mk(r):i.commaOrSpaceSeparated?Ik(Mk(r).join(` `)):Hk(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Uk(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(Hk(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Vk(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)Vk(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?Vk(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function Hk(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||sk(n)===sk(t)))return!0}return n}function Uk(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Wk(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Gk=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),Kk=Rk(Ak,`div`),qk=Rk(jk,`g`,Gk);function Jk(e){let t=String(e),n=[];return{toOffset:i,toPoint:r};function r(e){if(typeof e==`number`&&e>-1&&e<=t.length){let r=0;for(;;){let i=n[r];if(i===void 0){let e=Yk(t,n[r-1]);i=e===-1?t.length+1:e+1,n[r]=i}if(i>e)return{line:r+1,column:e-(r>0?n[r-1]:0)+1,offset:e};r++}}}function i(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&!Number.isNaN(e.column)){for(;n.length<e.line;){let e=n[n.length-1],r=Yk(t,e),i=r===-1?t.length+1:r+1;if(e===i)break;n.push(i)}let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}function Yk(e,t){let n=e.indexOf(`\r`,t),r=e.indexOf(`
|
|
301
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}var Xk={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`},Zk={}.hasOwnProperty,Qk=Object.prototype;function $k(e,t){let n=t||{};return eA({file:n.file||void 0,location:!1,schema:n.space===`svg`?jk:Ak,verbose:n.verbose||!1},e)}function eA(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},rA(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:tA(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=Jk(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},rA(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},rA(e,r,n),n}default:return n=nA(e,t),n}}function tA(e,t){let n=-1,r=[];for(;++n<t.length;){let i=eA(e,t[n]);r.push(i)}return r}function nA(e,t){let n=e.schema;e.schema=t.namespaceURI===Xk.svg?jk:Ak;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;Zk.call(Qk,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?qk:Kk)(t.tagName,i,tA(e,t.childNodes));if(rA(e,t,a),a.tagName===`template`){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&aA(r.startTag),o=r&&r.endTag&&aA(r.endTag),s=eA(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}return e.schema=n,a}function rA(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=iA(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function iA(e,t,n){let r=aA(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)Zk.call(n.attrs,i)&&(r[Dk(e.schema,i).property]=aA(n.attrs[i]));n.startTag;let a=aA(n.startTag),o=n.endTag?aA(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function aA(e){let t=oA({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=oA({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function oA(e){return e.line&&e.column?e:void 0}var sA=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),U;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(U||={});var cA={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function lA(e){return e>=55296&&e<=57343}function uA(e){return e>=56320&&e<=57343}function dA(e,t){return(e-55296)*1024+9216+t}function fA(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function pA(e){return e>=64976&&e<=65007||sA.has(e)}var W;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(W||={});var mA=65536,hA=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=mA,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(uA(t))return this.pos++,this._addGap(),dA(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,U.EOF;return this._err(W.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,U.EOF;let n=this.html.charCodeAt(t);return n===U.CARRIAGE_RETURN?U.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,U.EOF;let e=this.html.charCodeAt(this.pos);return e===U.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,U.LINE_FEED):e===U.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,lA(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===U.LINE_FEED||e===U.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){fA(e)?this._err(W.controlCharacterInInputStream):pA(e)&&this._err(W.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},gA;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(gA||={});function _A(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var vA=new Uint16Array(`ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌`.split(``).map(e=>e.charCodeAt(0))),yA=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);String.fromCodePoint;function bA(e){return e>=55296&&e<=57343||e>1114111?65533:yA.get(e)??e}var xA;(function(e){e[e.NUM=35]=`NUM`,e[e.SEMI=59]=`SEMI`,e[e.EQUALS=61]=`EQUALS`,e[e.ZERO=48]=`ZERO`,e[e.NINE=57]=`NINE`,e[e.LOWER_A=97]=`LOWER_A`,e[e.LOWER_F=102]=`LOWER_F`,e[e.LOWER_X=120]=`LOWER_X`,e[e.LOWER_Z=122]=`LOWER_Z`,e[e.UPPER_A=65]=`UPPER_A`,e[e.UPPER_F=70]=`UPPER_F`,e[e.UPPER_Z=90]=`UPPER_Z`})(xA||={});var SA=32,CA;(function(e){e[e.VALUE_LENGTH=49152]=`VALUE_LENGTH`,e[e.BRANCH_LENGTH=16256]=`BRANCH_LENGTH`,e[e.JUMP_TABLE=127]=`JUMP_TABLE`})(CA||={});function wA(e){return e>=xA.ZERO&&e<=xA.NINE}function TA(e){return e>=xA.UPPER_A&&e<=xA.UPPER_F||e>=xA.LOWER_A&&e<=xA.LOWER_F}function EA(e){return e>=xA.UPPER_A&&e<=xA.UPPER_Z||e>=xA.LOWER_A&&e<=xA.LOWER_Z||wA(e)}function DA(e){return e===xA.EQUALS||EA(e)}var OA;(function(e){e[e.EntityStart=0]=`EntityStart`,e[e.NumericStart=1]=`NumericStart`,e[e.NumericDecimal=2]=`NumericDecimal`,e[e.NumericHex=3]=`NumericHex`,e[e.NamedEntity=4]=`NamedEntity`})(OA||={});var kA;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(kA||={});var AA=class{constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=OA.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=kA.Strict}startEntity(e){this.decodeMode=e,this.state=OA.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case OA.EntityStart:return e.charCodeAt(t)===xA.NUM?(this.state=OA.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=OA.NamedEntity,this.stateNamedEntity(e,t));case OA.NumericStart:return this.stateNumericStart(e,t);case OA.NumericDecimal:return this.stateNumericDecimal(e,t);case OA.NumericHex:return this.stateNumericHex(e,t);case OA.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|SA)===xA.LOWER_X?(this.state=OA.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=OA.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){let i=n-t;this.result=this.result*r**+i+Number.parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(wA(r)||TA(r))t+=1;else return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(r,3)}return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){let n=t;for(;t<e.length;){let r=e.charCodeAt(t);if(wA(r))t+=1;else return this.addToNumericResult(e,n,t,10),this.emitNumericEntity(r,2)}return this.addToNumericResult(e,n,t,10),-1}emitNumericEntity(e,t){var n;if(this.consumed<=t)return(n=this.errors)==null||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===xA.SEMI)this.consumed+=1;else if(this.decodeMode===kA.Strict)return 0;return this.emitCodePoint(bA(this.result),this.consumed),this.errors&&(e!==xA.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,t){let{decodeTree:n}=this,r=n[this.treeIndex],i=(r&CA.VALUE_LENGTH)>>14;for(;t<e.length;t++,this.excess++){let a=e.charCodeAt(t);if(this.treeIndex=jA(n,r,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===kA.Attribute&&(i===0||DA(a))?0:this.emitNotTerminatedNamedEntity();if(r=n[this.treeIndex],i=(r&CA.VALUE_LENGTH)>>14,i!==0){if(a===xA.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==kA.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;let{result:t,decodeTree:n}=this,r=(n[t]&CA.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),(e=this.errors)==null||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){let{decodeTree:r}=this;return this.emitCodePoint(t===1?r[e]&~CA.VALUE_LENGTH:r[e+1],n),t===3&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case OA.NamedEntity:return this.result!==0&&(this.decodeMode!==kA.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case OA.NumericDecimal:return this.emitNumericEntity(0,2);case OA.NumericHex:return this.emitNumericEntity(0,3);case OA.NumericStart:return(e=this.errors)==null||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case OA.EntityStart:return 0}}};function jA(e,t,n,r){let i=(t&CA.BRANCH_LENGTH)>>7,a=t&CA.JUMP_TABLE;if(i===0)return a!==0&&r===a?n:-1;if(a){let t=r-a;return t<0||t>=i?-1:e[n+t]-1}let o=n,s=o+i-1;for(;o<=s;){let t=o+s>>>1,n=e[t];if(n<r)o=t+1;else if(n>r)s=t-1;else return e[t+i]}return-1}var G;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(G||={});var MA;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(MA||={});var NA;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(NA||={});var K;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(K||={});var q;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(q||={});var PA=new Map([[K.A,q.A],[K.ADDRESS,q.ADDRESS],[K.ANNOTATION_XML,q.ANNOTATION_XML],[K.APPLET,q.APPLET],[K.AREA,q.AREA],[K.ARTICLE,q.ARTICLE],[K.ASIDE,q.ASIDE],[K.B,q.B],[K.BASE,q.BASE],[K.BASEFONT,q.BASEFONT],[K.BGSOUND,q.BGSOUND],[K.BIG,q.BIG],[K.BLOCKQUOTE,q.BLOCKQUOTE],[K.BODY,q.BODY],[K.BR,q.BR],[K.BUTTON,q.BUTTON],[K.CAPTION,q.CAPTION],[K.CENTER,q.CENTER],[K.CODE,q.CODE],[K.COL,q.COL],[K.COLGROUP,q.COLGROUP],[K.DD,q.DD],[K.DESC,q.DESC],[K.DETAILS,q.DETAILS],[K.DIALOG,q.DIALOG],[K.DIR,q.DIR],[K.DIV,q.DIV],[K.DL,q.DL],[K.DT,q.DT],[K.EM,q.EM],[K.EMBED,q.EMBED],[K.FIELDSET,q.FIELDSET],[K.FIGCAPTION,q.FIGCAPTION],[K.FIGURE,q.FIGURE],[K.FONT,q.FONT],[K.FOOTER,q.FOOTER],[K.FOREIGN_OBJECT,q.FOREIGN_OBJECT],[K.FORM,q.FORM],[K.FRAME,q.FRAME],[K.FRAMESET,q.FRAMESET],[K.H1,q.H1],[K.H2,q.H2],[K.H3,q.H3],[K.H4,q.H4],[K.H5,q.H5],[K.H6,q.H6],[K.HEAD,q.HEAD],[K.HEADER,q.HEADER],[K.HGROUP,q.HGROUP],[K.HR,q.HR],[K.HTML,q.HTML],[K.I,q.I],[K.IMG,q.IMG],[K.IMAGE,q.IMAGE],[K.INPUT,q.INPUT],[K.IFRAME,q.IFRAME],[K.KEYGEN,q.KEYGEN],[K.LABEL,q.LABEL],[K.LI,q.LI],[K.LINK,q.LINK],[K.LISTING,q.LISTING],[K.MAIN,q.MAIN],[K.MALIGNMARK,q.MALIGNMARK],[K.MARQUEE,q.MARQUEE],[K.MATH,q.MATH],[K.MENU,q.MENU],[K.META,q.META],[K.MGLYPH,q.MGLYPH],[K.MI,q.MI],[K.MO,q.MO],[K.MN,q.MN],[K.MS,q.MS],[K.MTEXT,q.MTEXT],[K.NAV,q.NAV],[K.NOBR,q.NOBR],[K.NOFRAMES,q.NOFRAMES],[K.NOEMBED,q.NOEMBED],[K.NOSCRIPT,q.NOSCRIPT],[K.OBJECT,q.OBJECT],[K.OL,q.OL],[K.OPTGROUP,q.OPTGROUP],[K.OPTION,q.OPTION],[K.P,q.P],[K.PARAM,q.PARAM],[K.PLAINTEXT,q.PLAINTEXT],[K.PRE,q.PRE],[K.RB,q.RB],[K.RP,q.RP],[K.RT,q.RT],[K.RTC,q.RTC],[K.RUBY,q.RUBY],[K.S,q.S],[K.SCRIPT,q.SCRIPT],[K.SEARCH,q.SEARCH],[K.SECTION,q.SECTION],[K.SELECT,q.SELECT],[K.SOURCE,q.SOURCE],[K.SMALL,q.SMALL],[K.SPAN,q.SPAN],[K.STRIKE,q.STRIKE],[K.STRONG,q.STRONG],[K.STYLE,q.STYLE],[K.SUB,q.SUB],[K.SUMMARY,q.SUMMARY],[K.SUP,q.SUP],[K.TABLE,q.TABLE],[K.TBODY,q.TBODY],[K.TEMPLATE,q.TEMPLATE],[K.TEXTAREA,q.TEXTAREA],[K.TFOOT,q.TFOOT],[K.TD,q.TD],[K.TH,q.TH],[K.THEAD,q.THEAD],[K.TITLE,q.TITLE],[K.TR,q.TR],[K.TRACK,q.TRACK],[K.TT,q.TT],[K.U,q.U],[K.UL,q.UL],[K.SVG,q.SVG],[K.VAR,q.VAR],[K.WBR,q.WBR],[K.XMP,q.XMP]]);function FA(e){return PA.get(e)??q.UNKNOWN}var J=q,IA={[G.HTML]:new Set([J.ADDRESS,J.APPLET,J.AREA,J.ARTICLE,J.ASIDE,J.BASE,J.BASEFONT,J.BGSOUND,J.BLOCKQUOTE,J.BODY,J.BR,J.BUTTON,J.CAPTION,J.CENTER,J.COL,J.COLGROUP,J.DD,J.DETAILS,J.DIR,J.DIV,J.DL,J.DT,J.EMBED,J.FIELDSET,J.FIGCAPTION,J.FIGURE,J.FOOTER,J.FORM,J.FRAME,J.FRAMESET,J.H1,J.H2,J.H3,J.H4,J.H5,J.H6,J.HEAD,J.HEADER,J.HGROUP,J.HR,J.HTML,J.IFRAME,J.IMG,J.INPUT,J.LI,J.LINK,J.LISTING,J.MAIN,J.MARQUEE,J.MENU,J.META,J.NAV,J.NOEMBED,J.NOFRAMES,J.NOSCRIPT,J.OBJECT,J.OL,J.P,J.PARAM,J.PLAINTEXT,J.PRE,J.SCRIPT,J.SECTION,J.SELECT,J.SOURCE,J.STYLE,J.SUMMARY,J.TABLE,J.TBODY,J.TD,J.TEMPLATE,J.TEXTAREA,J.TFOOT,J.TH,J.THEAD,J.TITLE,J.TR,J.TRACK,J.UL,J.WBR,J.XMP]),[G.MATHML]:new Set([J.MI,J.MO,J.MN,J.MS,J.MTEXT,J.ANNOTATION_XML]),[G.SVG]:new Set([J.TITLE,J.FOREIGN_OBJECT,J.DESC]),[G.XLINK]:new Set,[G.XML]:new Set,[G.XMLNS]:new Set},LA=new Set([J.H1,J.H2,J.H3,J.H4,J.H5,J.H6]);new Set([K.STYLE,K.SCRIPT,K.XMP,K.IFRAME,K.NOEMBED,K.NOFRAMES,K.PLAINTEXT]);var Y;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(Y||={});var RA={DATA:Y.DATA,RCDATA:Y.RCDATA,RAWTEXT:Y.RAWTEXT,SCRIPT_DATA:Y.SCRIPT_DATA,PLAINTEXT:Y.PLAINTEXT,CDATA_SECTION:Y.CDATA_SECTION};function zA(e){return e>=U.DIGIT_0&&e<=U.DIGIT_9}function BA(e){return e>=U.LATIN_CAPITAL_A&&e<=U.LATIN_CAPITAL_Z}function VA(e){return e>=U.LATIN_SMALL_A&&e<=U.LATIN_SMALL_Z}function HA(e){return VA(e)||BA(e)}function UA(e){return HA(e)||zA(e)}function WA(e){return e+32}function GA(e){return e===U.SPACE||e===U.LINE_FEED||e===U.TABULATION||e===U.FORM_FEED}function KA(e){return GA(e)||e===U.SOLIDUS||e===U.GREATER_THAN_SIGN}function qA(e){return e===U.NULL?W.nullCharacterReference:e>1114111?W.characterReferenceOutsideUnicodeRange:lA(e)?W.surrogateCharacterReference:pA(e)?W.noncharacterCharacterReference:fA(e)||e===U.CARRIAGE_RETURN?W.controlCharacterReference:null}var JA=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=Y.DATA,this.returnState=Y.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.preprocessor=new hA(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new AA(vA,(e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._flushCodePointConsumedAsCharacterReference(e)},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(W.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(W.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=qA(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:gA.START_TAG,tagName:``,tagID:q.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:gA.END_TAG,tagName:``,tagID:q.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:gA.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:gA.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:``},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken;if(_A(t,this.currentAttr.name)===null){if(t.attrs.push(this.currentAttr),t.location&&this.currentLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(W.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.prepareToken(e),e.tagID=FA(e.tagName),e.type===gA.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(W.endTagWithAttributes),e.selfClosing&&this._err(W.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case gA.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case gA.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case gA.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:gA.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,t){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=t;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,t)}_emitCodePoint(e){let t=GA(e)?gA.WHITESPACE_CHARACTER:e===U.NULL?gA.NULL_CHARACTER:gA.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(gA.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=Y.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?kA.Attribute:kA.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===Y.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===Y.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===Y.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case Y.DATA:this._stateData(e);break;case Y.RCDATA:this._stateRcdata(e);break;case Y.RAWTEXT:this._stateRawtext(e);break;case Y.SCRIPT_DATA:this._stateScriptData(e);break;case Y.PLAINTEXT:this._statePlaintext(e);break;case Y.TAG_OPEN:this._stateTagOpen(e);break;case Y.END_TAG_OPEN:this._stateEndTagOpen(e);break;case Y.TAG_NAME:this._stateTagName(e);break;case Y.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case Y.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case Y.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case Y.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case Y.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case Y.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case Y.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case Y.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case Y.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case Y.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case Y.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case Y.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case Y.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case Y.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case Y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case Y.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case Y.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case Y.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case Y.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case Y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case Y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case Y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case Y.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case Y.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case Y.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case Y.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case Y.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case Y.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case Y.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case Y.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case Y.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case Y.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case Y.BOGUS_COMMENT:this._stateBogusComment(e);break;case Y.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case Y.COMMENT_START:this._stateCommentStart(e);break;case Y.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case Y.COMMENT:this._stateComment(e);break;case Y.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case Y.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case Y.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case Y.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case Y.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case Y.COMMENT_END:this._stateCommentEnd(e);break;case Y.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case Y.DOCTYPE:this._stateDoctype(e);break;case Y.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case Y.DOCTYPE_NAME:this._stateDoctypeName(e);break;case Y.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case Y.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case Y.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case Y.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case Y.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case Y.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case Y.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case Y.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case Y.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case Y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case Y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case Y.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case Y.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case Y.CDATA_SECTION:this._stateCdataSection(e);break;case Y.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case Y.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case Y.CHARACTER_REFERENCE:this._stateCharacterReference();break;case Y.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case U.LESS_THAN_SIGN:this.state=Y.TAG_OPEN;break;case U.AMPERSAND:this._startCharacterReference();break;case U.NULL:this._err(W.unexpectedNullCharacter),this._emitCodePoint(e);break;case U.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case U.AMPERSAND:this._startCharacterReference();break;case U.LESS_THAN_SIGN:this.state=Y.RCDATA_LESS_THAN_SIGN;break;case U.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case U.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case U.LESS_THAN_SIGN:this.state=Y.RAWTEXT_LESS_THAN_SIGN;break;case U.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case U.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_LESS_THAN_SIGN;break;case U.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case U.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case U.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case U.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(HA(e))this._createStartTagToken(),this.state=Y.TAG_NAME,this._stateTagName(e);else switch(e){case U.EXCLAMATION_MARK:this.state=Y.MARKUP_DECLARATION_OPEN;break;case U.SOLIDUS:this.state=Y.END_TAG_OPEN;break;case U.QUESTION_MARK:this._err(W.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=Y.BOGUS_COMMENT,this._stateBogusComment(e);break;case U.EOF:this._err(W.eofBeforeTagName),this._emitChars(`<`),this._emitEOFToken();break;default:this._err(W.invalidFirstCharacterOfTagName),this._emitChars(`<`),this.state=Y.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(HA(e))this._createEndTagToken(),this.state=Y.TAG_NAME,this._stateTagName(e);else switch(e){case U.GREATER_THAN_SIGN:this._err(W.missingEndTagName),this.state=Y.DATA;break;case U.EOF:this._err(W.eofBeforeTagName),this._emitChars(`</`),this._emitEOFToken();break;default:this._err(W.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=Y.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this.state=Y.BEFORE_ATTRIBUTE_NAME;break;case U.SOLIDUS:this.state=Y.SELF_CLOSING_START_TAG;break;case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentTagToken();break;case U.NULL:this._err(W.unexpectedNullCharacter),t.tagName+=`�`;break;case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(BA(e)?WA(e):e)}}_stateRcdataLessThanSign(e){e===U.SOLIDUS?this.state=Y.RCDATA_END_TAG_OPEN:(this._emitChars(`<`),this.state=Y.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){HA(e)?(this.state=Y.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`),this.state=Y.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=Y.BEFORE_ATTRIBUTE_NAME,!1;case U.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=Y.SELF_CLOSING_START_TAG,!1;case U.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=Y.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Y.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===U.SOLIDUS?this.state=Y.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`),this.state=Y.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){HA(e)?(this.state=Y.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`),this.state=Y.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Y.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case U.SOLIDUS:this.state=Y.SCRIPT_DATA_END_TAG_OPEN;break;case U.EXCLAMATION_MARK:this.state=Y.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`),this.state=Y.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){HA(e)?(this.state=Y.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`),this.state=Y.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Y.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===U.HYPHEN_MINUS?(this.state=Y.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=Y.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===U.HYPHEN_MINUS?(this.state=Y.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=Y.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case U.HYPHEN_MINUS:this.state=Y.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case U.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case U.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case U.HYPHEN_MINUS:this.state=Y.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case U.NULL:this._err(W.unexpectedNullCharacter),this.state=Y.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case U.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Y.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case U.HYPHEN_MINUS:this._emitChars(`-`);break;case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case U.GREATER_THAN_SIGN:this.state=Y.SCRIPT_DATA,this._emitChars(`>`);break;case U.NULL:this._err(W.unexpectedNullCharacter),this.state=Y.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case U.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Y.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===U.SOLIDUS?this.state=Y.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:HA(e)?(this._emitChars(`<`),this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`),this.state=Y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){HA(e)?(this.state=Y.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`),this.state=Y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`),this.state=Y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(cA.SCRIPT,!1)&&KA(this.preprocessor.peek(cA.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<cA.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=Y.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case U.HYPHEN_MINUS:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case U.NULL:this._err(W.unexpectedNullCharacter),this._emitChars(`�`);break;case U.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case U.HYPHEN_MINUS:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case U.NULL:this._err(W.unexpectedNullCharacter),this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case U.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case U.HYPHEN_MINUS:this._emitChars(`-`);break;case U.LESS_THAN_SIGN:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case U.GREATER_THAN_SIGN:this.state=Y.SCRIPT_DATA,this._emitChars(`>`);break;case U.NULL:this._err(W.unexpectedNullCharacter),this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case U.EOF:this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===U.SOLIDUS?(this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(cA.SCRIPT,!1)&&KA(this.preprocessor.peek(cA.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<cA.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=Y.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=Y.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.SOLIDUS:case U.GREATER_THAN_SIGN:case U.EOF:this.state=Y.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case U.EQUALS_SIGN:this._err(W.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=Y.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=Y.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:case U.SOLIDUS:case U.GREATER_THAN_SIGN:case U.EOF:this._leaveAttrName(),this.state=Y.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case U.EQUALS_SIGN:this._leaveAttrName(),this.state=Y.BEFORE_ATTRIBUTE_VALUE;break;case U.QUOTATION_MARK:case U.APOSTROPHE:case U.LESS_THAN_SIGN:this._err(W.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case U.NULL:this._err(W.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(BA(e)?WA(e):e)}}_stateAfterAttributeName(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.SOLIDUS:this.state=Y.SELF_CLOSING_START_TAG;break;case U.EQUALS_SIGN:this.state=Y.BEFORE_ATTRIBUTE_VALUE;break;case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentTagToken();break;case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=Y.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:this.state=Y.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case U.APOSTROPHE:this.state=Y.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case U.GREATER_THAN_SIGN:this._err(W.missingAttributeValue),this.state=Y.DATA,this.emitCurrentTagToken();break;default:this.state=Y.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case U.QUOTATION_MARK:this.state=Y.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case U.AMPERSAND:this._startCharacterReference();break;case U.NULL:this._err(W.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case U.APOSTROPHE:this.state=Y.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case U.AMPERSAND:this._startCharacterReference();break;case U.NULL:this._err(W.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this._leaveAttrValue(),this.state=Y.BEFORE_ATTRIBUTE_NAME;break;case U.AMPERSAND:this._startCharacterReference();break;case U.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Y.DATA,this.emitCurrentTagToken();break;case U.NULL:this._err(W.unexpectedNullCharacter),this.currentAttr.value+=`�`;break;case U.QUOTATION_MARK:case U.APOSTROPHE:case U.LESS_THAN_SIGN:case U.EQUALS_SIGN:case U.GRAVE_ACCENT:this._err(W.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break;case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this._leaveAttrValue(),this.state=Y.BEFORE_ATTRIBUTE_NAME;break;case U.SOLIDUS:this._leaveAttrValue(),this.state=Y.SELF_CLOSING_START_TAG;break;case U.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=Y.DATA,this.emitCurrentTagToken();break;case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this._err(W.missingWhitespaceBetweenAttributes),this.state=Y.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case U.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=Y.DATA,this.emitCurrentTagToken();break}case U.EOF:this._err(W.eofInTag),this._emitEOFToken();break;default:this._err(W.unexpectedSolidusInTag),this.state=Y.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentComment(t);break;case U.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case U.NULL:this._err(W.unexpectedNullCharacter),t.data+=`�`;break;default:t.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(cA.DASH_DASH,!0)?(this._createCommentToken(cA.DASH_DASH.length+1),this.state=Y.COMMENT_START):this._consumeSequenceIfMatch(cA.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(cA.DOCTYPE.length+1),this.state=Y.DOCTYPE):this._consumeSequenceIfMatch(cA.CDATA_START,!0)?this.inForeignNode?this.state=Y.CDATA_SECTION:(this._err(W.cdataInHtmlContent),this._createCommentToken(cA.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=Y.BOGUS_COMMENT):this._ensureHibernation()||(this._err(W.incorrectlyOpenedComment),this._createCommentToken(2),this.state=Y.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case U.HYPHEN_MINUS:this.state=Y.COMMENT_START_DASH;break;case U.GREATER_THAN_SIGN:{this._err(W.abruptClosingOfEmptyComment),this.state=Y.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=Y.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case U.HYPHEN_MINUS:this.state=Y.COMMENT_END;break;case U.GREATER_THAN_SIGN:this._err(W.abruptClosingOfEmptyComment),this.state=Y.DATA,this.emitCurrentComment(t);break;case U.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Y.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case U.HYPHEN_MINUS:this.state=Y.COMMENT_END_DASH;break;case U.LESS_THAN_SIGN:t.data+=`<`,this.state=Y.COMMENT_LESS_THAN_SIGN;break;case U.NULL:this._err(W.unexpectedNullCharacter),t.data+=`�`;break;case U.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){let t=this.currentToken;switch(e){case U.EXCLAMATION_MARK:t.data+=`!`,this.state=Y.COMMENT_LESS_THAN_SIGN_BANG;break;case U.LESS_THAN_SIGN:t.data+=`<`;break;default:this.state=Y.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===U.HYPHEN_MINUS?this.state=Y.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=Y.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===U.HYPHEN_MINUS?this.state=Y.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=Y.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==U.GREATER_THAN_SIGN&&e!==U.EOF&&this._err(W.nestedComment),this.state=Y.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case U.HYPHEN_MINUS:this.state=Y.COMMENT_END;break;case U.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`-`,this.state=Y.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentComment(t);break;case U.EXCLAMATION_MARK:this.state=Y.COMMENT_END_BANG;break;case U.HYPHEN_MINUS:t.data+=`-`;break;case U.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--`,this.state=Y.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case U.HYPHEN_MINUS:t.data+=`--!`,this.state=Y.COMMENT_END_DASH;break;case U.GREATER_THAN_SIGN:this._err(W.incorrectlyClosedComment),this.state=Y.DATA,this.emitCurrentComment(t);break;case U.EOF:this._err(W.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:t.data+=`--!`,this.state=Y.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this.state=Y.BEFORE_DOCTYPE_NAME;break;case U.GREATER_THAN_SIGN:this.state=Y.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case U.EOF:{this._err(W.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(W.missingWhitespaceBeforeDoctypeName),this.state=Y.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(BA(e))this._createDoctypeToken(String.fromCharCode(WA(e))),this.state=Y.DOCTYPE_NAME;else switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.NULL:this._err(W.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=Y.DOCTYPE_NAME;break;case U.GREATER_THAN_SIGN:{this._err(W.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=Y.DATA;break}case U.EOF:{this._err(W.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=Y.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this.state=Y.AFTER_DOCTYPE_NAME;break;case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.NULL:this._err(W.unexpectedNullCharacter),t.name+=`�`;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(BA(e)?WA(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(cA.PUBLIC,!1)?this.state=Y.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(cA.SYSTEM,!1)?this.state=Y.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(W.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this.state=Y.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case U.QUOTATION_MARK:this._err(W.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Y.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case U.APOSTROPHE:this._err(W.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=Y.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case U.GREATER_THAN_SIGN:this._err(W.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:t.publicId=``,this.state=Y.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case U.APOSTROPHE:t.publicId=``,this.state=Y.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case U.GREATER_THAN_SIGN:this._err(W.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case U.QUOTATION_MARK:this.state=Y.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case U.NULL:this._err(W.unexpectedNullCharacter),t.publicId+=`�`;break;case U.GREATER_THAN_SIGN:this._err(W.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case U.APOSTROPHE:this.state=Y.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case U.NULL:this._err(W.unexpectedNullCharacter),t.publicId+=`�`;break;case U.GREATER_THAN_SIGN:this._err(W.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this.state=Y.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case U.GREATER_THAN_SIGN:this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.QUOTATION_MARK:this._err(W.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case U.APOSTROPHE:this._err(W.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.QUOTATION_MARK:t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case U.APOSTROPHE:t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:this.state=Y.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case U.QUOTATION_MARK:this._err(W.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case U.APOSTROPHE:this._err(W.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case U.GREATER_THAN_SIGN:this._err(W.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.QUOTATION_MARK:t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case U.APOSTROPHE:t.systemId=``,this.state=Y.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case U.GREATER_THAN_SIGN:this._err(W.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Y.DATA,this.emitCurrentDoctype(t);break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case U.QUOTATION_MARK:this.state=Y.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case U.NULL:this._err(W.unexpectedNullCharacter),t.systemId+=`�`;break;case U.GREATER_THAN_SIGN:this._err(W.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case U.APOSTROPHE:this.state=Y.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case U.NULL:this._err(W.unexpectedNullCharacter),t.systemId+=`�`;break;case U.GREATER_THAN_SIGN:this._err(W.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case U.SPACE:case U.LINE_FEED:case U.TABULATION:case U.FORM_FEED:break;case U.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.EOF:this._err(W.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(W.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=Y.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case U.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=Y.DATA;break;case U.NULL:this._err(W.unexpectedNullCharacter);break;case U.EOF:this.emitCurrentDoctype(t),this._emitEOFToken();break;default:}}_stateCdataSection(e){switch(e){case U.RIGHT_SQUARE_BRACKET:this.state=Y.CDATA_SECTION_BRACKET;break;case U.EOF:this._err(W.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===U.RIGHT_SQUARE_BRACKET?this.state=Y.CDATA_SECTION_END:(this._emitChars(`]`),this.state=Y.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case U.GREATER_THAN_SIGN:this.state=Y.DATA;break;case U.RIGHT_SQUARE_BRACKET:this._emitChars(`]`);break;default:this._emitChars(`]]`),this.state=Y.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0)if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(U.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&UA(this.preprocessor.peek(1))?Y.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){UA(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===U.SEMICOLON&&this._err(W.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},YA=new Set([q.DD,q.DT,q.LI,q.OPTGROUP,q.OPTION,q.P,q.RB,q.RP,q.RT,q.RTC]),XA=new Set([...YA,q.CAPTION,q.COLGROUP,q.TBODY,q.TD,q.TFOOT,q.TH,q.THEAD,q.TR]),ZA=new Set([q.APPLET,q.CAPTION,q.HTML,q.MARQUEE,q.OBJECT,q.TABLE,q.TD,q.TEMPLATE,q.TH]),QA=new Set([...ZA,q.OL,q.UL]),$A=new Set([...ZA,q.BUTTON]),ej=new Set([q.ANNOTATION_XML,q.MI,q.MN,q.MO,q.MS,q.MTEXT]),tj=new Set([q.DESC,q.FOREIGN_OBJECT,q.TITLE]),nj=new Set([q.TR,q.TEMPLATE,q.HTML]),rj=new Set([q.TBODY,q.TFOOT,q.THEAD,q.TEMPLATE,q.HTML]),ij=new Set([q.TABLE,q.TEMPLATE,q.HTML]),aj=new Set([q.TD,q.TH]),oj=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=q.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===q.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===G.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}pop(){let e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}insertAfter(e,t,n){let r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}popUntilTagNamePopped(e){let t=this.stackTop+1;do t=this.tagIDs.lastIndexOf(e,t-1);while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==G.HTML);this.shortenToLength(Math.max(t,0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&--this.tmplCount,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilPopped(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(LA,G.HTML)}popUntilTableCellPopped(){this.popUntilPopped(aj,G.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,t){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}clearBackTo(e,t){let n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(ij,G.HTML)}clearBackToTableBodyContext(){this.clearBackTo(rj,G.HTML)}clearBackToTableRowContext(){this.clearBackTo(nj,G.HTML)}remove(e){let t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===q.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e)-1;return t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===q.HTML}hasInDynamicScope(e,t){for(let n=this.stackTop;n>=0;n--){let r=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case G.HTML:if(r===e)return!0;if(t.has(r))return!1;break;case G.SVG:if(tj.has(r))return!1;break;case G.MATHML:if(ej.has(r))return!1;break}}return!0}hasInScope(e){return this.hasInDynamicScope(e,ZA)}hasInListItemScope(e){return this.hasInDynamicScope(e,QA)}hasInButtonScope(e){return this.hasInDynamicScope(e,$A)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){let t=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case G.HTML:if(LA.has(t))return!0;if(ZA.has(t))return!1;break;case G.SVG:if(tj.has(t))return!1;break;case G.MATHML:if(ej.has(t))return!1;break}}return!0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===G.HTML)switch(this.tagIDs[t]){case e:return!0;case q.TABLE:case q.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===G.HTML)switch(this.tagIDs[e]){case q.TBODY:case q.THEAD:case q.TFOOT:return!0;case q.TABLE:case q.HTML:return!1}return!0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===G.HTML)switch(this.tagIDs[t]){case e:return!0;case q.OPTION:case q.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&YA.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&XA.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&XA.has(this.currentTagId);)this.pop()}},sj=3,cj;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(cj||={});var lj={type:cj.Marker},uj=class{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,t){let n=[],r=t.length,i=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e<this.entries.length;e++){let t=this.entries[e];if(t.type===cj.Marker)break;let{element:o}=t;if(this.treeAdapter.getTagName(o)===i&&this.treeAdapter.getNamespaceURI(o)===a){let t=this.treeAdapter.getAttrList(o);t.length===r&&n.push({idx:e,attrs:t})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<sj)return;let t=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,t);if(n.length<sj)return;let r=new Map(t.map(e=>[e.name,e.value])),i=0;for(let e=0;e<n.length;e++){let t=n[e];t.attrs.every(e=>r.get(e.name)===e.value)&&(i+=1,i>=sj&&this.entries.splice(t.idx,1))}}insertMarker(){this.entries.unshift(lj)}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.unshift({type:cj.Element,element:e,token:t})}insertElementAfterBookmark(e,t){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:cj.Element,element:e,token:t})}removeEntry(e){let t=this.entries.indexOf(e);t!==-1&&this.entries.splice(t,1)}clearToLastMarker(){let e=this.entries.indexOf(lj);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){let t=this.entries.find(t=>t.type===cj.Marker||this.treeAdapter.getTagName(t.element)===e);return t&&t.type===cj.Element?t:null}getElementEntry(e){return this.entries.find(t=>t.type===cj.Element&&t.element===e)}},dj={createDocument(){return{nodeName:`#document`,mode:NA.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};dj.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if(dj.isTextNode(n)){n.value+=t;return}}dj.appendChild(e,dj.createTextNode(t))},insertTextBefore(e,t,n){let r=e.childNodes[e.childNodes.indexOf(n)-1];r&&dj.isTextNode(r)?r.value+=t:dj.insertBefore(e,dj.createTextNode(t),n)},adoptAttributes(e,t){let n=new Set(e.attrs.map(e=>e.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},fj=`html`,pj=`about:legacy-compat`,mj=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,hj=`+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`),gj=[...hj,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],_j=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),vj=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],yj=[...vj,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function bj(e,t){return t.some(t=>e.startsWith(t))}function xj(e){return e.name===fj&&e.publicId===null&&(e.systemId===null||e.systemId===pj)}function Sj(e){if(e.name!==fj)return NA.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===mj)return NA.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),_j.has(n))return NA.QUIRKS;let e=t===null?gj:hj;if(bj(n,e))return NA.QUIRKS;if(e=t===null?vj:yj,bj(n,e))return NA.LIMITED_QUIRKS}return NA.NO_QUIRKS}var Cj={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},wj=`definitionurl`,Tj=`definitionURL`,Ej=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),Dj=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:G.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:G.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:G.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:G.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:G.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:G.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:G.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:G.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:G.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:G.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:G.XMLNS}]]),Oj=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),kj=new Set([q.B,q.BIG,q.BLOCKQUOTE,q.BODY,q.BR,q.CENTER,q.CODE,q.DD,q.DIV,q.DL,q.DT,q.EM,q.EMBED,q.H1,q.H2,q.H3,q.H4,q.H5,q.H6,q.HEAD,q.HR,q.I,q.IMG,q.LI,q.LISTING,q.MENU,q.META,q.NOBR,q.OL,q.P,q.PRE,q.RUBY,q.S,q.SMALL,q.SPAN,q.STRONG,q.STRIKE,q.SUB,q.SUP,q.TABLE,q.TT,q.U,q.UL,q.VAR]);function Aj(e){let t=e.tagID;return t===q.FONT&&e.attrs.some(({name:e})=>e===MA.COLOR||e===MA.SIZE||e===MA.FACE)||kj.has(t)}function jj(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===wj){e.attrs[t].name=Tj;break}}function Mj(e){for(let t=0;t<e.attrs.length;t++){let n=Ej.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Nj(e){for(let t=0;t<e.attrs.length;t++){let n=Dj.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Pj(e){let t=Oj.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=FA(e.tagName))}function Fj(e,t){return t===G.MATHML&&(e===q.MI||e===q.MO||e===q.MN||e===q.MS||e===q.MTEXT)}function Ij(e,t,n){if(t===G.MATHML&&e===q.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===MA.ENCODING){let t=n[e].value.toLowerCase();return t===Cj.TEXT_HTML||t===Cj.APPLICATION_XML}}return t===G.SVG&&(e===q.FOREIGN_OBJECT||e===q.DESC||e===q.TITLE)}function Lj(e,t,n,r){return(!r||r===G.HTML)&&Ij(e,t,n)||(!r||r===G.MATHML)&&Fj(e,t)}var Rj=`hidden`,zj=8,Bj=3,X;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})(X||={});var Vj={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Hj=new Set([q.TABLE,q.TBODY,q.TFOOT,q.THEAD,q.TR]),Uj={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:dj,onParseError:null},Wj=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=X.INITIAL,this.originalInsertionMode=X.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Uj,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new JA(this.options,this),this.activeFormattingElements=new uj(this.treeAdapter),this.fragmentContextID=n?FA(this.treeAdapter.getTagName(n)):q.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new oj(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...Uj,...t};e??=n.treeAdapter.createElement(K.TEMPLATE,G.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,G.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===q.TEMPLATE&&i.tmplInsertionModeStack.unshift(X.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??Vj,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===G.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,G.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=X.TEXT}switchToPlaintextParsing(){this.insertionMode=X.TEXT,this.originalInsertionMode=X.IN_BODY,this.tokenizer.state=RA.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===K.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==G.HTML))switch(this.fragmentContextID){case q.TITLE:case q.TEXTAREA:this.tokenizer.state=RA.RCDATA;break;case q.STYLE:case q.XMP:case q.IFRAME:case q.NOEMBED:case q.NOFRAMES:case q.NOSCRIPT:this.tokenizer.state=RA.RAWTEXT;break;case q.SCRIPT:this.tokenizer.state=RA.SCRIPT_DATA;break;case q.PLAINTEXT:this.tokenizer.state=RA.PLAINTEXT;break;default:}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{let t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t??this.document,e)}}_appendElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,t){let n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,t){let n=this.treeAdapter.createElement(e,G.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}_insertTemplate(e){let t=this.treeAdapter.createElement(e.tagName,G.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let e=this.treeAdapter.createElement(K.HTML,G.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,q.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===gA.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===q.SVG&&this.treeAdapter.getTagName(t)===K.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===G.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===q.MGLYPH||e.tagID===q.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,G.HTML)}_processToken(e){switch(e.type){case gA.CHARACTER:this.onCharacter(e);break;case gA.NULL_CHARACTER:this.onNullCharacter(e);break;case gA.COMMENT:this.onComment(e);break;case gA.DOCTYPE:this.onDoctype(e);break;case gA.START_TAG:this._processStartTag(e);break;case gA.END_TAG:this.onEndTag(e);break;case gA.EOF:this.onEof(e);break;case gA.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e);break}}_isIntegrationPoint(e,t,n){return Lj(e,this.treeAdapter.getNamespaceURI(t),this.treeAdapter.getAttrList(t),n)}_reconstructActiveFormattingElements(){let e=this.activeFormattingElements.entries.length;if(e){let t=this.activeFormattingElements.entries.findIndex(e=>e.type===cj.Marker||this.openElements.contains(e.element)),n=t===-1?e-1:t-1;for(let e=n;e>=0;e--){let t=this.activeFormattingElements.entries[e];this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),t.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=X.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(q.P),this.openElements.popUntilTagNamePopped(q.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case q.TR:this.insertionMode=X.IN_ROW;return;case q.TBODY:case q.THEAD:case q.TFOOT:this.insertionMode=X.IN_TABLE_BODY;return;case q.CAPTION:this.insertionMode=X.IN_CAPTION;return;case q.COLGROUP:this.insertionMode=X.IN_COLUMN_GROUP;return;case q.TABLE:this.insertionMode=X.IN_TABLE;return;case q.BODY:this.insertionMode=X.IN_BODY;return;case q.FRAMESET:this.insertionMode=X.IN_FRAMESET;return;case q.SELECT:this._resetInsertionModeForSelect(e);return;case q.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[0];return;case q.HTML:this.insertionMode=this.headElement?X.AFTER_HEAD:X.BEFORE_HEAD;return;case q.TD:case q.TH:if(e>0){this.insertionMode=X.IN_CELL;return}break;case q.HEAD:if(e>0){this.insertionMode=X.IN_HEAD;return}break}this.insertionMode=X.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){let e=this.openElements.tagIDs[t];if(e===q.TEMPLATE)break;if(e===q.TABLE){this.insertionMode=X.IN_SELECT_IN_TABLE;return}}this.insertionMode=X.IN_SELECT}_isElementCausesFosterParenting(e){return Hj.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){let t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case q.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===G.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case q.TABLE:{let n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return IA[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){cP(this,e);return}switch(this.insertionMode){case X.INITIAL:rM(this,e);break;case X.BEFORE_HTML:oM(this,e);break;case X.BEFORE_HEAD:lM(this,e);break;case X.IN_HEAD:pM(this,e);break;case X.IN_HEAD_NO_SCRIPT:gM(this,e);break;case X.AFTER_HEAD:yM(this,e);break;case X.IN_BODY:case X.IN_CAPTION:case X.IN_CELL:case X.IN_TEMPLATE:SM(this,e);break;case X.TEXT:case X.IN_SELECT:case X.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case X.IN_TABLE:case X.IN_TABLE_BODY:case X.IN_ROW:_N(this,e);break;case X.IN_TABLE_TEXT:AN(this,e);break;case X.IN_COLUMN_GROUP:LN(this,e);break;case X.AFTER_BODY:$N(this,e);break;case X.AFTER_AFTER_BODY:aP(this,e);break;default:}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){sP(this,e);return}switch(this.insertionMode){case X.INITIAL:rM(this,e);break;case X.BEFORE_HTML:oM(this,e);break;case X.BEFORE_HEAD:lM(this,e);break;case X.IN_HEAD:pM(this,e);break;case X.IN_HEAD_NO_SCRIPT:gM(this,e);break;case X.AFTER_HEAD:yM(this,e);break;case X.TEXT:this._insertCharacters(e);break;case X.IN_TABLE:case X.IN_TABLE_BODY:case X.IN_ROW:_N(this,e);break;case X.IN_COLUMN_GROUP:LN(this,e);break;case X.AFTER_BODY:$N(this,e);break;case X.AFTER_AFTER_BODY:aP(this,e);break;default:}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Qj(this,e);return}switch(this.insertionMode){case X.INITIAL:case X.BEFORE_HTML:case X.BEFORE_HEAD:case X.IN_HEAD:case X.IN_HEAD_NO_SCRIPT:case X.AFTER_HEAD:case X.IN_BODY:case X.IN_TABLE:case X.IN_CAPTION:case X.IN_COLUMN_GROUP:case X.IN_TABLE_BODY:case X.IN_ROW:case X.IN_CELL:case X.IN_SELECT:case X.IN_SELECT_IN_TABLE:case X.IN_TEMPLATE:case X.IN_FRAMESET:case X.AFTER_FRAMESET:Qj(this,e);break;case X.IN_TABLE_TEXT:jN(this,e);break;case X.AFTER_BODY:$j(this,e);break;case X.AFTER_AFTER_BODY:case X.AFTER_AFTER_FRAMESET:eM(this,e);break;default:}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case X.INITIAL:nM(this,e);break;case X.BEFORE_HEAD:case X.IN_HEAD:case X.IN_HEAD_NO_SCRIPT:case X.AFTER_HEAD:this._err(e,W.misplacedDoctype);break;case X.IN_TABLE_TEXT:jN(this,e);break;default:}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,W.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?uP(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case X.INITIAL:rM(this,e);break;case X.BEFORE_HTML:iM(this,e);break;case X.BEFORE_HEAD:sM(this,e);break;case X.IN_HEAD:uM(this,e);break;case X.IN_HEAD_NO_SCRIPT:mM(this,e);break;case X.AFTER_HEAD:_M(this,e);break;case X.IN_BODY:tN(this,e);break;case X.IN_TABLE:EN(this,e);break;case X.IN_TABLE_TEXT:jN(this,e);break;case X.IN_CAPTION:NN(this,e);break;case X.IN_COLUMN_GROUP:FN(this,e);break;case X.IN_TABLE_BODY:RN(this,e);break;case X.IN_ROW:BN(this,e);break;case X.IN_CELL:HN(this,e);break;case X.IN_SELECT:WN(this,e);break;case X.IN_SELECT_IN_TABLE:KN(this,e);break;case X.IN_TEMPLATE:JN(this,e);break;case X.AFTER_BODY:ZN(this,e);break;case X.IN_FRAMESET:eP(this,e);break;case X.AFTER_FRAMESET:nP(this,e);break;case X.AFTER_AFTER_BODY:iP(this,e);break;case X.AFTER_AFTER_FRAMESET:oP(this,e);break;default:}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?dP(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case X.INITIAL:rM(this,e);break;case X.BEFORE_HTML:aM(this,e);break;case X.BEFORE_HEAD:cM(this,e);break;case X.IN_HEAD:dM(this,e);break;case X.IN_HEAD_NO_SCRIPT:hM(this,e);break;case X.AFTER_HEAD:vM(this,e);break;case X.IN_BODY:pN(this,e);break;case X.TEXT:hN(this,e);break;case X.IN_TABLE:DN(this,e);break;case X.IN_TABLE_TEXT:jN(this,e);break;case X.IN_CAPTION:PN(this,e);break;case X.IN_COLUMN_GROUP:IN(this,e);break;case X.IN_TABLE_BODY:zN(this,e);break;case X.IN_ROW:VN(this,e);break;case X.IN_CELL:UN(this,e);break;case X.IN_SELECT:GN(this,e);break;case X.IN_SELECT_IN_TABLE:qN(this,e);break;case X.IN_TEMPLATE:YN(this,e);break;case X.AFTER_BODY:QN(this,e);break;case X.IN_FRAMESET:tP(this,e);break;case X.AFTER_FRAMESET:rP(this,e);break;case X.AFTER_AFTER_BODY:aP(this,e);break;default:}}onEof(e){switch(this.insertionMode){case X.INITIAL:rM(this,e);break;case X.BEFORE_HTML:oM(this,e);break;case X.BEFORE_HEAD:lM(this,e);break;case X.IN_HEAD:pM(this,e);break;case X.IN_HEAD_NO_SCRIPT:gM(this,e);break;case X.AFTER_HEAD:yM(this,e);break;case X.IN_BODY:case X.IN_TABLE:case X.IN_CAPTION:case X.IN_COLUMN_GROUP:case X.IN_TABLE_BODY:case X.IN_ROW:case X.IN_CELL:case X.IN_SELECT:case X.IN_SELECT_IN_TABLE:mN(this,e);break;case X.TEXT:gN(this,e);break;case X.IN_TABLE_TEXT:jN(this,e);break;case X.IN_TEMPLATE:XN(this,e);break;case X.AFTER_BODY:case X.IN_FRAMESET:case X.AFTER_FRAMESET:case X.AFTER_AFTER_BODY:case X.AFTER_AFTER_FRAMESET:tM(this,e);break;default:}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===U.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case X.IN_HEAD:case X.IN_HEAD_NO_SCRIPT:case X.AFTER_HEAD:case X.TEXT:case X.IN_COLUMN_GROUP:case X.IN_SELECT:case X.IN_SELECT_IN_TABLE:case X.IN_FRAMESET:case X.AFTER_FRAMESET:this._insertCharacters(e);break;case X.IN_BODY:case X.IN_CAPTION:case X.IN_CELL:case X.IN_TEMPLATE:case X.AFTER_BODY:case X.AFTER_AFTER_BODY:case X.AFTER_AFTER_FRAMESET:xM(this,e);break;case X.IN_TABLE:case X.IN_TABLE_BODY:case X.IN_ROW:_N(this,e);break;case X.IN_TABLE_TEXT:kN(this,e);break;default:}}};function Gj(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):fN(e,t),n}function Kj(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){let i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function qj(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==n;a++,o=i){i=e.openElements.getCommonAncestor(o);let n=e.activeFormattingElements.getElementEntry(o),s=n&&a>=Bj;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=Jj(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(o,r),r=o)}return r}function Jj(e,t){let n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function Yj(e,t,n){let r=FA(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===q.TEMPLATE&&i===G.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Xj(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,i.tagID)}function Zj(e,t){for(let n=0;n<zj;n++){let n=Gj(e,t);if(!n)break;let r=Kj(e,n);if(!r)break;e.activeFormattingElements.bookmark=n;let i=qj(e,r,n.element),a=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(i),a&&Yj(e,a,i),Xj(e,r,n)}}function Qj(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function $j(e,t){e._appendCommentNode(t,e.openElements.items[0])}function eM(e,t){e._appendCommentNode(t,e.document)}function tM(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function nM(e,t){e._setDocumentType(t);let n=t.forceQuirks?NA.QUIRKS:Sj(t);xj(t)||e._err(t,W.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=X.BEFORE_HTML}function rM(e,t){e._err(t,W.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,NA.QUIRKS),e.insertionMode=X.BEFORE_HTML,e._processToken(t)}function iM(e,t){t.tagID===q.HTML?(e._insertElement(t,G.HTML),e.insertionMode=X.BEFORE_HEAD):oM(e,t)}function aM(e,t){let n=t.tagID;(n===q.HTML||n===q.HEAD||n===q.BODY||n===q.BR)&&oM(e,t)}function oM(e,t){e._insertFakeRootElement(),e.insertionMode=X.BEFORE_HEAD,e._processToken(t)}function sM(e,t){switch(t.tagID){case q.HTML:tN(e,t);break;case q.HEAD:e._insertElement(t,G.HTML),e.headElement=e.openElements.current,e.insertionMode=X.IN_HEAD;break;default:lM(e,t)}}function cM(e,t){let n=t.tagID;n===q.HEAD||n===q.BODY||n===q.HTML||n===q.BR?lM(e,t):e._err(t,W.endTagWithoutMatchingOpenElement)}function lM(e,t){e._insertFakeElement(K.HEAD,q.HEAD),e.headElement=e.openElements.current,e.insertionMode=X.IN_HEAD,e._processToken(t)}function uM(e,t){switch(t.tagID){case q.HTML:tN(e,t);break;case q.BASE:case q.BASEFONT:case q.BGSOUND:case q.LINK:case q.META:e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break;case q.TITLE:e._switchToTextParsing(t,RA.RCDATA);break;case q.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,RA.RAWTEXT):(e._insertElement(t,G.HTML),e.insertionMode=X.IN_HEAD_NO_SCRIPT);break;case q.NOFRAMES:case q.STYLE:e._switchToTextParsing(t,RA.RAWTEXT);break;case q.SCRIPT:e._switchToTextParsing(t,RA.SCRIPT_DATA);break;case q.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=X.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(X.IN_TEMPLATE);break;case q.HEAD:e._err(t,W.misplacedStartTagForHeadElement);break;default:pM(e,t)}}function dM(e,t){switch(t.tagID){case q.HEAD:e.openElements.pop(),e.insertionMode=X.AFTER_HEAD;break;case q.BODY:case q.BR:case q.HTML:pM(e,t);break;case q.TEMPLATE:fM(e,t);break;default:e._err(t,W.endTagWithoutMatchingOpenElement)}}function fM(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==q.TEMPLATE&&e._err(t,W.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(q.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,W.endTagWithoutMatchingOpenElement)}function pM(e,t){e.openElements.pop(),e.insertionMode=X.AFTER_HEAD,e._processToken(t)}function mM(e,t){switch(t.tagID){case q.HTML:tN(e,t);break;case q.BASEFONT:case q.BGSOUND:case q.HEAD:case q.LINK:case q.META:case q.NOFRAMES:case q.STYLE:uM(e,t);break;case q.NOSCRIPT:e._err(t,W.nestedNoscriptInHead);break;default:gM(e,t)}}function hM(e,t){switch(t.tagID){case q.NOSCRIPT:e.openElements.pop(),e.insertionMode=X.IN_HEAD;break;case q.BR:gM(e,t);break;default:e._err(t,W.endTagWithoutMatchingOpenElement)}}function gM(e,t){let n=t.type===gA.EOF?W.openElementsLeftAfterEof:W.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=X.IN_HEAD,e._processToken(t)}function _M(e,t){switch(t.tagID){case q.HTML:tN(e,t);break;case q.BODY:e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=X.IN_BODY;break;case q.FRAMESET:e._insertElement(t,G.HTML),e.insertionMode=X.IN_FRAMESET;break;case q.BASE:case q.BASEFONT:case q.BGSOUND:case q.LINK:case q.META:case q.NOFRAMES:case q.SCRIPT:case q.STYLE:case q.TEMPLATE:case q.TITLE:e._err(t,W.abandonedHeadElementChild),e.openElements.push(e.headElement,q.HEAD),uM(e,t),e.openElements.remove(e.headElement);break;case q.HEAD:e._err(t,W.misplacedStartTagForHeadElement);break;default:yM(e,t)}}function vM(e,t){switch(t.tagID){case q.BODY:case q.HTML:case q.BR:yM(e,t);break;case q.TEMPLATE:fM(e,t);break;default:e._err(t,W.endTagWithoutMatchingOpenElement)}}function yM(e,t){e._insertFakeElement(K.BODY,q.BODY),e.insertionMode=X.IN_BODY,bM(e,t)}function bM(e,t){switch(t.type){case gA.CHARACTER:SM(e,t);break;case gA.WHITESPACE_CHARACTER:xM(e,t);break;case gA.COMMENT:Qj(e,t);break;case gA.START_TAG:tN(e,t);break;case gA.END_TAG:pN(e,t);break;case gA.EOF:mN(e,t);break;default:}}function xM(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function SM(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function CM(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function wM(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function TM(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,G.HTML),e.insertionMode=X.IN_FRAMESET)}function EM(e,t){e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,G.HTML)}function DM(e,t){e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&LA.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,G.HTML)}function OM(e,t){e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function kM(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,G.HTML),n||(e.formElement=e.openElements.current))}function AM(e,t){e.framesetOk=!1;let n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){let r=e.openElements.tagIDs[t];if(n===q.LI&&r===q.LI||(n===q.DD||n===q.DT)&&(r===q.DD||r===q.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==q.ADDRESS&&r!==q.DIV&&r!==q.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,G.HTML)}function jM(e,t){e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.tokenizer.state=RA.PLAINTEXT}function MM(e,t){e.openElements.hasInScope(q.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(q.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.framesetOk=!1}function NM(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(K.A);n&&(Zj(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function PM(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function FM(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(q.NOBR)&&(Zj(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,G.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function IM(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function LM(e,t){e.treeAdapter.getDocumentMode(e.document)!==NA.QUIRKS&&e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=X.IN_TABLE}function RM(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,G.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function zM(e){let t=_A(e,MA.TYPE);return t!=null&&t.toLowerCase()===Rj}function BM(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,G.HTML),zM(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function VM(e,t){e._appendElement(t,G.HTML),t.ackSelfClosing=!0}function HM(e,t){e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._appendElement(t,G.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function UM(e,t){t.tagName=K.IMG,t.tagID=q.IMG,RM(e,t)}function WM(e,t){e._insertElement(t,G.HTML),e.skipNextNewLine=!0,e.tokenizer.state=RA.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=X.TEXT}function GM(e,t){e.openElements.hasInButtonScope(q.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,RA.RAWTEXT)}function KM(e,t){e.framesetOk=!1,e._switchToTextParsing(t,RA.RAWTEXT)}function qM(e,t){e._switchToTextParsing(t,RA.RAWTEXT)}function JM(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===X.IN_TABLE||e.insertionMode===X.IN_CAPTION||e.insertionMode===X.IN_TABLE_BODY||e.insertionMode===X.IN_ROW||e.insertionMode===X.IN_CELL?X.IN_SELECT_IN_TABLE:X.IN_SELECT}function YM(e,t){e.openElements.currentTagId===q.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML)}function XM(e,t){e.openElements.hasInScope(q.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,G.HTML)}function ZM(e,t){e.openElements.hasInScope(q.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(q.RTC),e._insertElement(t,G.HTML)}function QM(e,t){e._reconstructActiveFormattingElements(),jj(t),Nj(t),t.selfClosing?e._appendElement(t,G.MATHML):e._insertElement(t,G.MATHML),t.ackSelfClosing=!0}function $M(e,t){e._reconstructActiveFormattingElements(),Mj(t),Nj(t),t.selfClosing?e._appendElement(t,G.SVG):e._insertElement(t,G.SVG),t.ackSelfClosing=!0}function eN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,G.HTML)}function tN(e,t){switch(t.tagID){case q.I:case q.S:case q.B:case q.U:case q.EM:case q.TT:case q.BIG:case q.CODE:case q.FONT:case q.SMALL:case q.STRIKE:case q.STRONG:PM(e,t);break;case q.A:NM(e,t);break;case q.H1:case q.H2:case q.H3:case q.H4:case q.H5:case q.H6:DM(e,t);break;case q.P:case q.DL:case q.OL:case q.UL:case q.DIV:case q.DIR:case q.NAV:case q.MAIN:case q.MENU:case q.ASIDE:case q.CENTER:case q.FIGURE:case q.FOOTER:case q.HEADER:case q.HGROUP:case q.DIALOG:case q.DETAILS:case q.ADDRESS:case q.ARTICLE:case q.SEARCH:case q.SECTION:case q.SUMMARY:case q.FIELDSET:case q.BLOCKQUOTE:case q.FIGCAPTION:EM(e,t);break;case q.LI:case q.DD:case q.DT:AM(e,t);break;case q.BR:case q.IMG:case q.WBR:case q.AREA:case q.EMBED:case q.KEYGEN:RM(e,t);break;case q.HR:HM(e,t);break;case q.RB:case q.RTC:XM(e,t);break;case q.RT:case q.RP:ZM(e,t);break;case q.PRE:case q.LISTING:OM(e,t);break;case q.XMP:GM(e,t);break;case q.SVG:$M(e,t);break;case q.HTML:CM(e,t);break;case q.BASE:case q.LINK:case q.META:case q.STYLE:case q.TITLE:case q.SCRIPT:case q.BGSOUND:case q.BASEFONT:case q.TEMPLATE:uM(e,t);break;case q.BODY:wM(e,t);break;case q.FORM:kM(e,t);break;case q.NOBR:FM(e,t);break;case q.MATH:QM(e,t);break;case q.TABLE:LM(e,t);break;case q.INPUT:BM(e,t);break;case q.PARAM:case q.TRACK:case q.SOURCE:VM(e,t);break;case q.IMAGE:UM(e,t);break;case q.BUTTON:MM(e,t);break;case q.APPLET:case q.OBJECT:case q.MARQUEE:IM(e,t);break;case q.IFRAME:KM(e,t);break;case q.SELECT:JM(e,t);break;case q.OPTION:case q.OPTGROUP:YM(e,t);break;case q.NOEMBED:case q.NOFRAMES:qM(e,t);break;case q.FRAMESET:TM(e,t);break;case q.TEXTAREA:WM(e,t);break;case q.NOSCRIPT:e.options.scriptingEnabled?qM(e,t):eN(e,t);break;case q.PLAINTEXT:jM(e,t);break;case q.COL:case q.TH:case q.TD:case q.TR:case q.HEAD:case q.FRAME:case q.TBODY:case q.TFOOT:case q.THEAD:case q.CAPTION:case q.COLGROUP:break;default:eN(e,t)}}function nN(e,t){if(e.openElements.hasInScope(q.BODY)&&(e.insertionMode=X.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function rN(e,t){e.openElements.hasInScope(q.BODY)&&(e.insertionMode=X.AFTER_BODY,QN(e,t))}function iN(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function aN(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(q.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(q.FORM):n&&e.openElements.remove(n))}function oN(e){e.openElements.hasInButtonScope(q.P)||e._insertFakeElement(K.P,q.P),e._closePElement()}function sN(e){e.openElements.hasInListItemScope(q.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(q.LI),e.openElements.popUntilTagNamePopped(q.LI))}function cN(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function lN(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function uN(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function dN(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(K.BR,q.BR),e.openElements.pop(),e.framesetOk=!1}function fN(e,t){let n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){let i=e.openElements.items[t],a=e.openElements.tagIDs[t];if(r===a&&(r!==q.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,a))break}}function pN(e,t){switch(t.tagID){case q.A:case q.B:case q.I:case q.S:case q.U:case q.EM:case q.TT:case q.BIG:case q.CODE:case q.FONT:case q.NOBR:case q.SMALL:case q.STRIKE:case q.STRONG:Zj(e,t);break;case q.P:oN(e);break;case q.DL:case q.UL:case q.OL:case q.DIR:case q.DIV:case q.NAV:case q.PRE:case q.MAIN:case q.MENU:case q.ASIDE:case q.BUTTON:case q.CENTER:case q.FIGURE:case q.FOOTER:case q.HEADER:case q.HGROUP:case q.DIALOG:case q.ADDRESS:case q.ARTICLE:case q.DETAILS:case q.SEARCH:case q.SECTION:case q.SUMMARY:case q.LISTING:case q.FIELDSET:case q.BLOCKQUOTE:case q.FIGCAPTION:iN(e,t);break;case q.LI:sN(e);break;case q.DD:case q.DT:cN(e,t);break;case q.H1:case q.H2:case q.H3:case q.H4:case q.H5:case q.H6:lN(e);break;case q.BR:dN(e);break;case q.BODY:nN(e,t);break;case q.HTML:rN(e,t);break;case q.FORM:aN(e);break;case q.APPLET:case q.OBJECT:case q.MARQUEE:uN(e,t);break;case q.TEMPLATE:fM(e,t);break;default:fN(e,t)}}function mN(e,t){e.tmplInsertionModeStack.length>0?XN(e,t):tM(e,t)}function hN(e,t){var n;t.tagID===q.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function gN(e,t){e._err(t,W.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function _N(e,t){if(e.openElements.currentTagId!==void 0&&Hj.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=X.IN_TABLE_TEXT,t.type){case gA.CHARACTER:AN(e,t);break;case gA.WHITESPACE_CHARACTER:kN(e,t);break}else ON(e,t)}function vN(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,G.HTML),e.insertionMode=X.IN_CAPTION}function yN(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,G.HTML),e.insertionMode=X.IN_COLUMN_GROUP}function bN(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.COLGROUP,q.COLGROUP),e.insertionMode=X.IN_COLUMN_GROUP,FN(e,t)}function xN(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,G.HTML),e.insertionMode=X.IN_TABLE_BODY}function SN(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(K.TBODY,q.TBODY),e.insertionMode=X.IN_TABLE_BODY,RN(e,t)}function CN(e,t){e.openElements.hasInTableScope(q.TABLE)&&(e.openElements.popUntilTagNamePopped(q.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function wN(e,t){zM(t)?e._appendElement(t,G.HTML):ON(e,t),t.ackSelfClosing=!0}function TN(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,G.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function EN(e,t){switch(t.tagID){case q.TD:case q.TH:case q.TR:SN(e,t);break;case q.STYLE:case q.SCRIPT:case q.TEMPLATE:uM(e,t);break;case q.COL:bN(e,t);break;case q.FORM:TN(e,t);break;case q.TABLE:CN(e,t);break;case q.TBODY:case q.TFOOT:case q.THEAD:xN(e,t);break;case q.INPUT:wN(e,t);break;case q.CAPTION:vN(e,t);break;case q.COLGROUP:yN(e,t);break;default:ON(e,t)}}function DN(e,t){switch(t.tagID){case q.TABLE:e.openElements.hasInTableScope(q.TABLE)&&(e.openElements.popUntilTagNamePopped(q.TABLE),e._resetInsertionMode());break;case q.TEMPLATE:fM(e,t);break;case q.BODY:case q.CAPTION:case q.COL:case q.COLGROUP:case q.HTML:case q.TBODY:case q.TD:case q.TFOOT:case q.TH:case q.THEAD:case q.TR:break;default:ON(e,t)}}function ON(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,bM(e,t),e.fosterParentingEnabled=n}function kN(e,t){e.pendingCharacterTokens.push(t)}function AN(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function jN(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ON(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var MN=new Set([q.CAPTION,q.COL,q.COLGROUP,q.TBODY,q.TD,q.TFOOT,q.TH,q.THEAD,q.TR]);function NN(e,t){let n=t.tagID;MN.has(n)?e.openElements.hasInTableScope(q.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(q.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=X.IN_TABLE,EN(e,t)):tN(e,t)}function PN(e,t){let n=t.tagID;switch(n){case q.CAPTION:case q.TABLE:e.openElements.hasInTableScope(q.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(q.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=X.IN_TABLE,n===q.TABLE&&DN(e,t));break;case q.BODY:case q.COL:case q.COLGROUP:case q.HTML:case q.TBODY:case q.TD:case q.TFOOT:case q.TH:case q.THEAD:case q.TR:break;default:pN(e,t)}}function FN(e,t){switch(t.tagID){case q.HTML:tN(e,t);break;case q.COL:e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break;case q.TEMPLATE:uM(e,t);break;default:LN(e,t)}}function IN(e,t){switch(t.tagID){case q.COLGROUP:e.openElements.currentTagId===q.COLGROUP&&(e.openElements.pop(),e.insertionMode=X.IN_TABLE);break;case q.TEMPLATE:fM(e,t);break;case q.COL:break;default:LN(e,t)}}function LN(e,t){e.openElements.currentTagId===q.COLGROUP&&(e.openElements.pop(),e.insertionMode=X.IN_TABLE,e._processToken(t))}function RN(e,t){switch(t.tagID){case q.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,G.HTML),e.insertionMode=X.IN_ROW;break;case q.TH:case q.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(K.TR,q.TR),e.insertionMode=X.IN_ROW,BN(e,t);break;case q.CAPTION:case q.COL:case q.COLGROUP:case q.TBODY:case q.TFOOT:case q.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE,EN(e,t));break;default:EN(e,t)}}function zN(e,t){let n=t.tagID;switch(t.tagID){case q.TBODY:case q.TFOOT:case q.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE);break;case q.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE,DN(e,t));break;case q.BODY:case q.CAPTION:case q.COL:case q.COLGROUP:case q.HTML:case q.TD:case q.TH:case q.TR:break;default:DN(e,t)}}function BN(e,t){switch(t.tagID){case q.TH:case q.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,G.HTML),e.insertionMode=X.IN_CELL,e.activeFormattingElements.insertMarker();break;case q.CAPTION:case q.COL:case q.COLGROUP:case q.TBODY:case q.TFOOT:case q.THEAD:case q.TR:e.openElements.hasInTableScope(q.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE_BODY,RN(e,t));break;default:EN(e,t)}}function VN(e,t){switch(t.tagID){case q.TR:e.openElements.hasInTableScope(q.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE_BODY);break;case q.TABLE:e.openElements.hasInTableScope(q.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE_BODY,zN(e,t));break;case q.TBODY:case q.TFOOT:case q.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(q.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=X.IN_TABLE_BODY,zN(e,t));break;case q.BODY:case q.CAPTION:case q.COL:case q.COLGROUP:case q.HTML:case q.TD:case q.TH:break;default:DN(e,t)}}function HN(e,t){let n=t.tagID;MN.has(n)?(e.openElements.hasInTableScope(q.TD)||e.openElements.hasInTableScope(q.TH))&&(e._closeTableCell(),BN(e,t)):tN(e,t)}function UN(e,t){let n=t.tagID;switch(n){case q.TD:case q.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=X.IN_ROW);break;case q.TABLE:case q.TBODY:case q.TFOOT:case q.THEAD:case q.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),VN(e,t));break;case q.BODY:case q.CAPTION:case q.COL:case q.COLGROUP:case q.HTML:break;default:pN(e,t)}}function WN(e,t){switch(t.tagID){case q.HTML:tN(e,t);break;case q.OPTION:e.openElements.currentTagId===q.OPTION&&e.openElements.pop(),e._insertElement(t,G.HTML);break;case q.OPTGROUP:e.openElements.currentTagId===q.OPTION&&e.openElements.pop(),e.openElements.currentTagId===q.OPTGROUP&&e.openElements.pop(),e._insertElement(t,G.HTML);break;case q.HR:e.openElements.currentTagId===q.OPTION&&e.openElements.pop(),e.openElements.currentTagId===q.OPTGROUP&&e.openElements.pop(),e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break;case q.INPUT:case q.KEYGEN:case q.TEXTAREA:case q.SELECT:e.openElements.hasInSelectScope(q.SELECT)&&(e.openElements.popUntilTagNamePopped(q.SELECT),e._resetInsertionMode(),t.tagID!==q.SELECT&&e._processStartTag(t));break;case q.SCRIPT:case q.TEMPLATE:uM(e,t);break;default:}}function GN(e,t){switch(t.tagID){case q.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===q.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===q.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===q.OPTGROUP&&e.openElements.pop();break;case q.OPTION:e.openElements.currentTagId===q.OPTION&&e.openElements.pop();break;case q.SELECT:e.openElements.hasInSelectScope(q.SELECT)&&(e.openElements.popUntilTagNamePopped(q.SELECT),e._resetInsertionMode());break;case q.TEMPLATE:fM(e,t);break;default:}}function KN(e,t){let n=t.tagID;n===q.CAPTION||n===q.TABLE||n===q.TBODY||n===q.TFOOT||n===q.THEAD||n===q.TR||n===q.TD||n===q.TH?(e.openElements.popUntilTagNamePopped(q.SELECT),e._resetInsertionMode(),e._processStartTag(t)):WN(e,t)}function qN(e,t){let n=t.tagID;n===q.CAPTION||n===q.TABLE||n===q.TBODY||n===q.TFOOT||n===q.THEAD||n===q.TR||n===q.TD||n===q.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(q.SELECT),e._resetInsertionMode(),e.onEndTag(t)):GN(e,t)}function JN(e,t){switch(t.tagID){case q.BASE:case q.BASEFONT:case q.BGSOUND:case q.LINK:case q.META:case q.NOFRAMES:case q.SCRIPT:case q.STYLE:case q.TEMPLATE:case q.TITLE:uM(e,t);break;case q.CAPTION:case q.COLGROUP:case q.TBODY:case q.TFOOT:case q.THEAD:e.tmplInsertionModeStack[0]=X.IN_TABLE,e.insertionMode=X.IN_TABLE,EN(e,t);break;case q.COL:e.tmplInsertionModeStack[0]=X.IN_COLUMN_GROUP,e.insertionMode=X.IN_COLUMN_GROUP,FN(e,t);break;case q.TR:e.tmplInsertionModeStack[0]=X.IN_TABLE_BODY,e.insertionMode=X.IN_TABLE_BODY,RN(e,t);break;case q.TD:case q.TH:e.tmplInsertionModeStack[0]=X.IN_ROW,e.insertionMode=X.IN_ROW,BN(e,t);break;default:e.tmplInsertionModeStack[0]=X.IN_BODY,e.insertionMode=X.IN_BODY,tN(e,t)}}function YN(e,t){t.tagID===q.TEMPLATE&&fM(e,t)}function XN(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(q.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):tM(e,t)}function ZN(e,t){t.tagID===q.HTML?tN(e,t):$N(e,t)}function QN(e,t){if(t.tagID===q.HTML){if(e.fragmentContext||(e.insertionMode=X.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===q.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else $N(e,t)}function $N(e,t){e.insertionMode=X.IN_BODY,bM(e,t)}function eP(e,t){switch(t.tagID){case q.HTML:tN(e,t);break;case q.FRAMESET:e._insertElement(t,G.HTML);break;case q.FRAME:e._appendElement(t,G.HTML),t.ackSelfClosing=!0;break;case q.NOFRAMES:uM(e,t);break;default:}}function tP(e,t){t.tagID===q.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==q.FRAMESET&&(e.insertionMode=X.AFTER_FRAMESET))}function nP(e,t){switch(t.tagID){case q.HTML:tN(e,t);break;case q.NOFRAMES:uM(e,t);break;default:}}function rP(e,t){t.tagID===q.HTML&&(e.insertionMode=X.AFTER_AFTER_FRAMESET)}function iP(e,t){t.tagID===q.HTML?tN(e,t):aP(e,t)}function aP(e,t){e.insertionMode=X.IN_BODY,bM(e,t)}function oP(e,t){switch(t.tagID){case q.HTML:tN(e,t);break;case q.NOFRAMES:uM(e,t);break;default:}}function sP(e,t){t.chars=`�`,e._insertCharacters(t)}function cP(e,t){e._insertCharacters(t),e.framesetOk=!1}function lP(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==G.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function uP(e,t){if(Aj(t))lP(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===G.MATHML?jj(t):r===G.SVG&&(Pj(t),Mj(t)),Nj(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function dP(e,t){if(t.tagID===q.P||t.tagID===q.BR){lP(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){let r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===G.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}new Set([K.AREA,K.BASE,K.BASEFONT,K.BGSOUND,K.BR,K.COL,K.EMBED,K.FRAME,K.HR,K.IMG,K.INPUT,K.KEYGEN,K.LINK,K.META,K.PARAM,K.SOURCE,K.TRACK,K.WBR]);function fP(e,t){return Wj.parse(e,t)}function pP(e,t,n){typeof e==`string`&&(n=t,t=e,e=null);let r=Wj.getFragmentParser(e,n);return r.tokenizer.write(t,!0),r.getFragment()}var mP={basename:hP,dirname:gP,extname:_P,join:vP,sep:`/`};function hP(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);xP(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function gP(e){if(xP(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function _P(e){xP(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function vP(...e){let t=-1,n;for(;++t<e.length;)xP(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:yP(n)}function yP(e){xP(e);let t=e.codePointAt(0)===47,n=bP(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function bP(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function xP(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var SP={cwd:CP};function CP(){return`/`}function wP(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function TP(e){if(typeof e==`string`)e=new URL(e);else if(!wP(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return EP(e)}function EP(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var DP=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],OP=class{constructor(e){let t;t=e?wP(e)?{path:e}:typeof e==`string`||MP(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:SP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<DP.length;){let e=DP[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)DP.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?mP.basename(this.path):void 0}set basename(e){AP(e,`basename`),kP(e,`basename`),this.path=mP.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?mP.dirname(this.path):void 0}set dirname(e){jP(this.basename,`dirname`),this.path=mP.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?mP.extname(this.path):void 0}set extname(e){if(kP(e,`extname`),jP(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=mP.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){wP(e)&&(e=TP(e)),AP(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?mP.basename(this.path,this.extname):void 0}set stem(e){AP(e,`stem`),kP(e,`stem`),this.path=mP.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Ru(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function kP(e,t){if(e&&e.includes(mP.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+mP.sep+"`")}function AP(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function jP(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function MP(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var NP={abandonedHeadElementChild:{reason:`Unexpected metadata element after head`,description:"Unexpected element after head. Expected the element before `</head>`",url:!1},abruptClosingOfEmptyComment:{reason:`Unexpected abruptly closed empty comment`,description:"Unexpected `>` or `->`. Expected `-->` to close comments"},abruptDoctypePublicIdentifier:{reason:`Unexpected abruptly closed public identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the public identifier"},abruptDoctypeSystemIdentifier:{reason:`Unexpected abruptly closed system identifier`,description:"Unexpected `>`. Expected a closing `\"` or `'` after the identifier identifier"},absenceOfDigitsInNumericCharacterReference:{reason:`Unexpected non-digit at start of numeric character reference`,description:"Unexpected `%c`. Expected `[0-9]` for decimal references or `[0-9a-fA-F]` for hexadecimal references"},cdataInHtmlContent:{reason:`Unexpected CDATA section in HTML`,description:"Unexpected `<![CDATA[` in HTML. Remove it, use a comment, or encode special characters instead"},characterReferenceOutsideUnicodeRange:{reason:`Unexpected too big numeric character reference`,description:`Unexpectedly high character reference. Expected character references to be at most hexadecimal 10ffff (or decimal 1114111)`},closingOfElementWithOpenChildElements:{reason:`Unexpected closing tag with open child elements`,description:`Unexpectedly closing tag. Expected other tags to be closed first`,url:!1},controlCharacterInInputStream:{reason:`Unexpected control character`,description:"Unexpected control character `%x`. Expected a non-control code point, 0x00, or ASCII whitespace"},controlCharacterReference:{reason:`Unexpected control character reference`,description:`Unexpectedly control character in reference. Expected a non-control code point, 0x00, or ASCII whitespace`},disallowedContentInNoscriptInHead:{reason:"Disallowed content inside `<noscript>` in `<head>`",description:"Unexpected text character `%c`. Only use text in `<noscript>`s in `<body>`",url:!1},duplicateAttribute:{reason:`Unexpected duplicate attribute`,description:`Unexpectedly double attribute. Expected attributes to occur only once`},endTagWithAttributes:{reason:`Unexpected attribute on closing tag`,description:"Unexpected attribute. Expected `>` instead"},endTagWithTrailingSolidus:{reason:`Unexpected slash at end of closing tag`,description:"Unexpected `%c-1`. Expected `>` instead"},endTagWithoutMatchingOpenElement:{reason:`Unexpected unopened end tag`,description:`Unexpected end tag. Expected no end tag or another end tag`,url:!1},eofBeforeTagName:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected tag name instead`},eofInCdata:{reason:`Unexpected end of file in CDATA`,description:"Unexpected end of file. Expected `]]>` to close the CDATA"},eofInComment:{reason:`Unexpected end of file in comment`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInDoctype:{reason:`Unexpected end of file in doctype`,description:"Unexpected end of file. Expected a valid doctype (such as `<!doctype html>`)"},eofInElementThatCanContainOnlyText:{reason:`Unexpected end of file in element that can only contain text`,description:`Unexpected end of file. Expected text or a closing tag`,url:!1},eofInScriptHtmlCommentLikeText:{reason:`Unexpected end of file in comment inside script`,description:"Unexpected end of file. Expected `-->` to close the comment"},eofInTag:{reason:`Unexpected end of file in tag`,description:"Unexpected end of file. Expected `>` to close the tag"},incorrectlyClosedComment:{reason:`Incorrectly closed comment`,description:"Unexpected `%c-1`. Expected `-->` to close the comment"},incorrectlyOpenedComment:{reason:`Incorrectly opened comment`,description:"Unexpected `%c`. Expected `<!--` to open the comment"},invalidCharacterSequenceAfterDoctypeName:{reason:`Invalid sequence after doctype name`,description:"Unexpected sequence at `%c`. Expected `public` or `system`"},invalidFirstCharacterOfTagName:{reason:`Invalid first character in tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},misplacedDoctype:{reason:`Misplaced doctype`,description:`Unexpected doctype. Expected doctype before head`,url:!1},misplacedStartTagForHeadElement:{reason:"Misplaced `<head>` start tag",description:"Unexpected start tag `<head>`. Expected `<head>` directly after doctype",url:!1},missingAttributeValue:{reason:`Missing attribute value`,description:"Unexpected `%c-1`. Expected an attribute value or no `%c-1` instead"},missingDoctype:{reason:`Missing doctype before other content`,description:"Expected a `<!doctype html>` before anything else",url:!1},missingDoctypeName:{reason:`Missing doctype name`,description:"Unexpected doctype end at `%c`. Expected `html` instead"},missingDoctypePublicIdentifier:{reason:`Missing public identifier in doctype`,description:"Unexpected `%c`. Expected identifier for `public` instead"},missingDoctypeSystemIdentifier:{reason:`Missing system identifier in doctype`,description:'Unexpected `%c`. Expected identifier for `system` instead (suggested: `"about:legacy-compat"`)'},missingEndTagName:{reason:`Missing name in end tag`,description:"Unexpected `%c`. Expected an ASCII letter instead"},missingQuoteBeforeDoctypePublicIdentifier:{reason:`Missing quote before public identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingQuoteBeforeDoctypeSystemIdentifier:{reason:`Missing quote before system identifier in doctype`,description:"Unexpected `%c`. Expected `\"` or `'` instead"},missingSemicolonAfterCharacterReference:{reason:`Missing semicolon after character reference`,description:"Unexpected `%c`. Expected `;` instead"},missingWhitespaceAfterDoctypePublicKeyword:{reason:`Missing whitespace after public identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceAfterDoctypeSystemKeyword:{reason:`Missing whitespace after system identifier in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBeforeDoctypeName:{reason:`Missing whitespace before doctype name`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenAttributes:{reason:`Missing whitespace between attributes`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers:{reason:`Missing whitespace between public and system identifiers in doctype`,description:"Unexpected `%c`. Expected ASCII whitespace instead"},nestedComment:{reason:`Unexpected nested comment`,description:"Unexpected `<!--`. Expected `-->`"},nestedNoscriptInHead:{reason:"Unexpected nested `<noscript>` in `<head>`",description:"Unexpected `<noscript>`. Expected a closing tag or a meta element",url:!1},nonConformingDoctype:{reason:`Unexpected non-conforming doctype declaration`,description:'Expected `<!doctype html>` or `<!doctype html system "about:legacy-compat">`',url:!1},nonVoidHtmlElementStartTagWithTrailingSolidus:{reason:`Unexpected trailing slash on start tag of non-void element`,description:"Unexpected `/`. Expected `>` instead"},noncharacterCharacterReference:{reason:`Unexpected noncharacter code point referenced by character reference`,description:`Unexpected code point. Do not use noncharacters in HTML`},noncharacterInInputStream:{reason:`Unexpected noncharacter character`,description:"Unexpected code point `%x`. Do not use noncharacters in HTML"},nullCharacterReference:{reason:`Unexpected NULL character referenced by character reference`,description:`Unexpected code point. Do not use NULL characters in HTML`},openElementsLeftAfterEof:{reason:`Unexpected end of file`,description:`Unexpected end of file. Expected closing tag instead`,url:!1},surrogateCharacterReference:{reason:`Unexpected surrogate character referenced by character reference`,description:`Unexpected code point. Do not use lone surrogate characters in HTML`},surrogateInInputStream:{reason:`Unexpected surrogate character`,description:"Unexpected code point `%x`. Do not use lone surrogate characters in HTML"},unexpectedCharacterAfterDoctypeSystemIdentifier:{reason:`Invalid character after system identifier in doctype`,description:"Unexpected character at `%c`. Expected `>`"},unexpectedCharacterInAttributeName:{reason:`Unexpected character in attribute name`,description:"Unexpected `%c`. Expected whitespace, `/`, `>`, `=`, or probably an ASCII letter"},unexpectedCharacterInUnquotedAttributeValue:{reason:`Unexpected character in unquoted attribute value`,description:"Unexpected `%c`. Quote the attribute value to include it"},unexpectedEqualsSignBeforeAttributeName:{reason:`Unexpected equals sign before attribute name`,description:"Unexpected `%c`. Add an attribute name before it"},unexpectedNullCharacter:{reason:`Unexpected NULL character`,description:"Unexpected code point `%x`. Do not use NULL characters in HTML"},unexpectedQuestionMarkInsteadOfTagName:{reason:`Unexpected question mark instead of tag name`,description:"Unexpected `%c`. Expected an ASCII letter instead"},unexpectedSolidusInTag:{reason:`Unexpected slash in tag`,description:"Unexpected `%c-1`. Expected it followed by `>` or in a quoted attribute value"},unknownNamedCharacterReference:{reason:`Unexpected unknown named character reference`,description:`Unexpected character reference. Expected known named character references`}},PP=`https://html.spec.whatwg.org/multipage/parsing.html#parse-error-`,FP=/-[a-z]/g,IP=/%c(?:([-+])(\d+))?/g,LP=/%x/g,RP={2:!0,1:!1,0:null},zP={};function BP(e,t){let n=t||zP,r=n.onerror,i=e instanceof OP?e:new OP(e),a=n.fragment?pP:fP,o=String(i);return $k(a(o,{sourceCodeLocationInfo:!0,onParseError:n.onerror?s:null,scriptingEnabled:!1}),{file:i,space:n.space,verbose:n.verbose});function s(e){let t=e.code,a=VP(t),s=n[a]??!0,c=typeof s==`number`?s:+!!s;if(c){let n=NP[a],o=new Ru(l(n.reason),{place:{start:{line:e.startLine,column:e.startCol,offset:e.startOffset},end:{line:e.endLine,column:e.endCol,offset:e.endOffset}},ruleId:t,source:`hast-util-from-html`});i.path&&(o.file=i.path,o.name=i.path+`:`+o.name),o.fatal=RP[c],o.note=l(n.description),o.url=n.url===!1?void 0:PP+t,r(o)}function l(t){return t.replace(IP,n).replace(LP,r);function n(t,n,r){let i=(r?Number.parseInt(r,10):0)*(n===`-`?-1:1);return UP(o.charAt(e.startOffset+i))}function r(){return WP(o.charCodeAt(e.startOffset))}}}}function VP(e){return e.replace(FP,HP)}function HP(e){return e.charAt(1).toUpperCase()}function UP(e){return e==="`"?"` ` `":e}function WP(e){return`0x`+e.toString(16).toUpperCase()}function GP(e){let t=this,{emitParseErrors:n,...r}={...t.data(`settings`),...e};t.parser=i;function i(e,t){return BP(e,{...r,onerror:n?function(e){t.path&&(e.name=t.path+`:`+e.name,e.file=t.path),t.messages.push(e)}:void 0})}}var KP=typeof self==`object`?self:globalThis,qP=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new KP[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new KP[a](o),i)};return r},JP=e=>qP(new Map,e)(0),YP=``,{toString:XP}={},{keys:ZP}=Object,QP=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=XP.call(e).slice(8,-1);switch(n){case`Array`:return[1,YP];case`Object`:return[2,YP];case`Date`:return[3,YP];case`RegExp`:return[4,YP];case`Map`:return[5,YP];case`Set`:return[6,YP];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},$P=([e,t])=>e===0&&(t===`function`||t===`symbol`),eF=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=QP(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of ZP(r))(e||!$P(QP(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!($P(QP(n))||$P(QP(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!$P(QP(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},tF=(e,{json:t,lossy:n}={})=>{let r=[];return eF(!(t||n),!!t,new Map,r)(e),r},nF=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?JP(tF(e,t)):structuredClone(e):(e,t)=>JP(tF(e,t)),rF=(function(e,t,n,r,i){let a=iF(t);if(n!=null&&(typeof n!=`number`||n<0||n===1/0))throw Error("Expected positive finite `index`");if(r!=null&&(!r.type||!r.children))throw Error("Expected valid `parent`");if(n==null!=(r==null))throw Error("Expected both `index` and `parent`");return lF(e)?a.call(i,e,n,r):!1}),iF=(function(e){if(e==null)return cF;if(typeof e==`string`)return oF(e);if(typeof e==`object`)return aF(e);if(typeof e==`function`)return sF(e);throw Error("Expected function, string, or array as `test`")});function aF(e){let t=[],n=-1;for(;++n<e.length;)t[n]=iF(e[n]);return sF(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function oF(e){return sF(t);function t(t){return t.tagName===e}}function sF(e){return t;function t(t,n,r){return!!(lF(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function cF(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`element`&&`tagName`in e&&typeof e.tagName==`string`)}function lF(e){return typeof e==`object`&&!!e&&`type`in e&&`tagName`in e}var uF=iF(function(e){return e.tagName===`audio`||e.tagName===`canvas`||e.tagName===`embed`||e.tagName===`iframe`||e.tagName===`img`||e.tagName===`math`||e.tagName===`object`||e.tagName===`picture`||e.tagName===`svg`||e.tagName===`video`}),dF=/[ \t\n\f\r]/g;function fF(e){return typeof e==`object`?e.type===`text`?pF(e.value):!1:pF(e)}function pF(e){return e.replace(dF,``)===``}var mF=(function(e,t,n,r,i){let a=hF(t);if(n!=null&&(typeof n!=`number`||n<0||n===1/0))throw Error(`Expected positive finite index`);if(r!=null&&(!mF(r)||!r.children))throw Error(`Expected parent node`);if(r==null!=(n==null))throw Error(`Expected both parent and index`);return xF(e)?a.call(i,e,n,r):!1}),hF=(function(e){if(e==null)return bF;if(typeof e==`function`)return yF(e);if(typeof e==`object`)return Array.isArray(e)?gF(e):_F(e);if(typeof e==`string`)return vF(e);throw Error(`Expected function, string, or object as test`)});function gF(e){let t=[],n=-1;for(;++n<e.length;)t[n]=hF(e[n]);return yF(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function _F(e){let t=e;return yF(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function vF(e){return yF(t);function t(t){return t&&t.type===e}}function yF(e){return t;function t(t,n,r){return!!(xF(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function bF(){return!0}function xF(e){return typeof e==`object`&&!!e&&`type`in e}var SF=`address.article.aside.blockquote.body.br.caption.center.col.colgroup.dd.dialog.dir.div.dl.dt.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.legend.li.li.listing.main.menu.nav.ol.optgroup.option.p.plaintext.pre.section.summary.table.tbody.td.td.tfoot.th.th.thead.tr.ul.wbr.xmp`.split(`.`),CF=[`button`,`input`,`select`,`textarea`],wF=[`area`,`base`,`basefont`,`dialog`,`datalist`,`head`,`link`,`meta`,`noembed`,`noframes`,`param`,`rp`,`script`,`source`,`style`,`template`,`track`,`title`],TF={},EF=hF([`comment`,`doctype`]);function DF(e,t){OF(e,{collapse:zF((t||TF).newlines?LF:RF),whitespace:`normal`})}function OF(e,t){if(`children`in e){let n={...t};return(e.type===`root`||PF(e))&&(n.before=!0,n.after=!0),n.whitespace=BF(e,t),AF(e,n)}if(e.type===`text`){if(t.whitespace===`normal`)return kF(e,t);t.whitespace===`nowrap`&&(e.value=t.collapse(e.value))}return{ignore:EF(e),stripAtStart:!1,remove:!1}}function kF(e,t){let n=t.collapse(e.value),r={ignore:!1,stripAtStart:!1,remove:!1},i=0,a=n.length;return t.before&&IF(n.charAt(0))&&i++,i!==a&&IF(n.charAt(a-1))&&(t.after?a--:r.stripAtStart=!0),i===a?r.remove=!0:e.value=n.slice(i,a),r}function AF(e,t){let n=t.before,r=t.after,i=e.children,a=i.length,o=-1;for(;++o<a;){let e=OF(i[o],{...t,after:jF(i,o,r),before:n});e.remove?(i.splice(o,1),o--,a--):e.ignore||(n=e.stripAtStart),NF(i[o])&&(n=!1)}return{ignore:!1,stripAtStart:!!(n||r),remove:!1}}function jF(e,t,n){for(;++t<e.length;){let n=e[t],r=MF(n);if(r===void 0&&`children`in n&&!FF(n)&&(r=jF(n.children,-1)),typeof r==`boolean`)return r}return n}function MF(e){if(e.type===`element`){if(NF(e))return!1;if(PF(e))return!0}else if(e.type===`text`){if(!fF(e))return!1}else if(!EF(e))return!1}function NF(e){return uF(e)||rF(e,CF)}function PF(e){return rF(e,SF)}function FF(e){return!!(e.type===`element`&&e.properties.hidden)||EF(e)||rF(e,wF)}function IF(e){return e===` `||e===`
|
|
302
|
+
`}function LF(e){let t=/\r?\n|\r/.exec(e);return t?t[0]:` `}function RF(){return` `}function zF(e){return t;function t(t){return String(t).replace(/[\t\n\v\f\r ]+/g,e)}}function BF(e,t){if(`tagName`in e&&e.properties)switch(e.tagName){case`listing`:case`plaintext`:case`script`:case`style`:case`xmp`:return`pre`;case`nobr`:return`nowrap`;case`pre`:return e.properties.wrap?`pre-wrap`:`pre`;case`td`:case`th`:return e.properties.noWrap?`nowrap`:t.whitespace;case`textarea`:return`pre-wrap`;default:}return t.whitespace}function VF(e){return function(t){DF(t,e)}}function HF(e){return e}var UF=[],WF=`skip`;function GF(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=hF(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+HF(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=UF,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=KF(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function KF(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?UF:[e]}function qF(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),GF(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var JF=XF(`end`),YF=XF(`start`);function XF(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function ZF(e){let t=YF(e),n=JF(e);if(t&&n)return{start:t,end:n}}function QF(e,t){let n=t.properties||{},r=e.all(t),i={type:`link`,url:e.resolve(String(n.href||``)||null),title:n.title?String(n.title):null,children:r};return e.patch(t,i),i}function $F(e,t){e.baseFound||=(e.frozenBaseUrl=String(t.properties&&t.properties.href||``)||void 0,!0)}function eI(e,t){let n={type:`blockquote`,children:e.toFlow(e.all(t))};return e.patch(t,n),n}function tI(e,t){let n={type:`break`};return e.patch(t,n),n}var nI=(function(e,t,n){let r=hF(n);if(!e||!e.type||!e.children)throw Error(`Expected parent node`);if(typeof t==`number`){if(t<0||t===1/0)throw Error(`Expected positive finite number as index`)}else if(t=e.children.indexOf(t),t<0)throw Error(`Expected child node or index`);for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),rI=/\n/g,iI=/[\t ]+/g,aI=iF(`br`),oI=iF(yI),sI=iF(`p`),cI=iF(`tr`),lI=iF([`datalist`,`head`,`noembed`,`noframes`,`noscript`,`rp`,`script`,`style`,`template`,`title`,vI,bI]),uI=iF(`address.article.aside.blockquote.body.caption.center.dd.dialog.dir.dl.dt.div.figure.figcaption.footer.form,.h1.h2.h3.h4.h5.h6.header.hgroup.hr.html.legend.li.listing.main.menu.nav.ol.p.plaintext.pre.section.ul.xmp`.split(`.`));function dI(e,t){let n=t||{},r=`children`in e?e.children:[],i=uI(e),a=_I(e,{whitespace:n.whitespace||`normal`,breakBefore:!1,breakAfter:!1}),o=[];(e.type===`text`||e.type===`comment`)&&o.push(...mI(e,{whitespace:a,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)o.push(...fI(r[s],e,{whitespace:a,breakBefore:s?void 0:i,breakAfter:s<r.length-1?aI(r[s+1]):i}));let c=[],l;for(s=-1;++s<o.length;){let e=o[s];typeof e==`number`?l!==void 0&&e>l&&(l=e):e&&(l!==void 0&&l>-1&&c.push(`
|
|
303
|
+
`.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function fI(e,t,n){return e.type===`element`?pI(e,t,n):e.type===`text`?n.whitespace===`normal`?mI(e,n):hI(e):[]}function pI(e,t,n){let r=_I(e,n),i=e.children||[],a=-1,o=[];if(lI(e))return o;let s,c;for(aI(e)||cI(e)&&nI(t,e,cI)?c=`
|
|
304
|
+
`:sI(e)?(s=2,c=2):uI(e)&&(s=1,c=1);++a<i.length;)o=o.concat(fI(i[a],e,{whitespace:r,breakBefore:a?void 0:s,breakAfter:a<i.length-1?aI(i[a+1]):c}));return oI(e)&&nI(t,e,oI)&&o.push(` `),s&&o.unshift(s),c&&o.push(c),o}function mI(e,t){let n=String(e.value),r=[],i=[],a=0;for(;a<=n.length;){rI.lastIndex=a;let e=rI.exec(n),i=e&&`index`in e?e.index:n.length;r.push(gI(n.slice(a,i).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,``),a===0?t.breakBefore:!0,i===n.length?t.breakAfter:!0)),a=i+1}let o=-1,s;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),s=void 0):r[o]?(typeof s==`number`&&i.push(s),i.push(r[o]),s=0):(o===0||o===r.length-1)&&i.push(0);return i}function hI(e){return[String(e.value)]}function gI(e,t,n){let r=[],i=0,a;for(;i<e.length;){iI.lastIndex=i;let n=iI.exec(e);a=n?n.index:e.length,!i&&!a&&n&&!t&&r.push(``),i!==a&&r.push(e.slice(i,a)),i=n?a+n[0].length:a}return i!==a&&!n&&r.push(``),r.join(` `)}function _I(e,t){if(e.type===`element`){let n=e.properties||{};switch(e.tagName){case`listing`:case`plaintext`:case`xmp`:return`pre`;case`nobr`:return`nowrap`;case`pre`:return n.wrap?`pre-wrap`:`pre`;case`td`:case`th`:return n.noWrap?`nowrap`:t.whitespace;case`textarea`:return`pre-wrap`;default:}}return t.whitespace}function vI(e){return!!(e.properties||{}).hidden}function yI(e){return e.tagName===`td`||e.tagName===`th`}function bI(e){return e.tagName===`dialog`&&!(e.properties||{}).open}function xI(e){let t=String(e),n=t.length;for(;n>0;){let e=t.codePointAt(n-1);if(e!==void 0&&(e===10||e===13))n--;else break}return t.slice(0,n)}var SI=`language-`;function CI(e,t){let n=t.children,r=-1,i,a;if(t.tagName===`pre`)for(;++r<n.length;){let e=n[r];if(e.type===`element`&&e.tagName===`code`&&e.properties&&e.properties.className&&Array.isArray(e.properties.className)){i=e.properties.className;break}}if(i){for(r=-1;++r<i.length;)if(String(i[r]).slice(0,9)===SI){a=String(i[r]).slice(9);break}}let o={type:`code`,lang:a||null,meta:null,value:xI(dI(t))};return e.patch(t,o),o}function wI(e,t){let n={type:`html`,value:`<!--`+t.value+`-->`};return e.patch(t,n),n}function TI(e,t){let n={type:`delete`,children:e.all(t)};return e.patch(t,n),n}function EI(e){let t=-1;if(e.length>1){for(;++t<e.length;)if(e[t].spread)return!0}return!1}function DI(e,t){let n=[],r=[],i=-1;for(;++i<t.children.length;){let e=t.children[i];e.type===`element`&&e.tagName===`div`?n.push(...e.children):n.push(e)}let a={definitions:[],titles:[]};for(i=-1;++i<n.length;){let e=n[i];if(e.type===`element`&&e.tagName===`dt`){let t=n[i-1];t&&t.type===`element`&&t.tagName===`dd`&&(r.push(a),a={definitions:[],titles:[]}),a.titles.push(e)}else a.definitions.push(e)}r.push(a),i=-1;let o=[];for(;++i<r.length;){let t=[...OI(e,r[i].titles),...OI(e,r[i].definitions)];t.length>0&&o.push({type:`listItem`,spread:t.length>1,checked:null,children:t})}if(o.length>0){let n={type:`list`,ordered:!1,start:null,spread:EI(o),children:o};return e.patch(t,n),n}}function OI(e,t){let n=e.all({type:`root`,children:t}),r=e.toSpecificContent(n,kI);return r.length===0?[]:r.length===1?r[0].children:[{type:`list`,ordered:!1,start:null,spread:EI(r),children:r}]}function kI(){return{type:`listItem`,spread:!1,checked:null,children:[]}}function AI(e,t){let n={type:`emphasis`,children:e.all(t)};return e.patch(t,n),n}function jI(e){let t=0,n=e.length;for(;t<n&&e[t].type===`break`;)t++;for(;n>t&&e[n-1].type===`break`;)n--;return t===0&&n===e.length?e:e.slice(t,n)}function MI(e,t){let n={type:`heading`,depth:Number(t.tagName.charAt(1))||1,children:jI(e.all(t))};return e.patch(t,n),n}function NI(e,t){let n={type:`thematicBreak`};return e.patch(t,n),n}function PI(e,t){let n=t.properties||{},r=String(n.src||``),i=String(n.title||``);if(r&&i){let n={type:`link`,title:null,url:e.resolve(r),children:[{type:`text`,value:i}]};return e.patch(t,n),n}}function FI(e,t){let n=t.properties||{},r={type:`image`,url:e.resolve(String(n.src||``)||null),title:n.title?String(n.title):null,alt:n.alt?String(n.alt):``};return e.patch(t,r),r}function II(e,t){let n={type:`inlineCode`,value:dI(t)};return e.patch(t,n),n}function LI(e,t){let n=[],r=[],i=t||e.properties||{},a=RI(e),o=Math.min(Number.parseInt(String(i.size),10),0)||(i.multiple?4:1),s=-1;for(;++s<a.length;){let e=a[s];e&&e.properties&&e.properties.selected&&n.push(e)}let c=n.length>0?n:a,l=Math.min(c.length,o);for(s=-1;++s<l;){let e=c[s],t=e.properties||{},n=dI(e),i=n||String(t.label||``),a=String(t.value||``)||n;r.push([a,i===a?void 0:i])}return r}function RI(e){let t=[],n=-1;for(;++n<e.children.length;){let r=e.children[n];`children`in r&&Array.isArray(r.children)&&t.push(...RI(r)),r.type===`element`&&r.tagName===`option`&&(!r.properties||!r.properties.disabled)&&t.push(r)}return t}var zI=`[x]`,BI=`[ ]`;function VI(e,t){let n=t.properties||{},r=String(n.value||n.placeholder||``);if(n.disabled||n.type===`hidden`||n.type===`file`)return;if(n.type===`checkbox`||n.type===`radio`){let r={type:`text`,value:n.checked?e.options.checked||zI:e.options.unchecked||BI};return e.patch(t,r),r}if(n.type===`image`){let i=n.alt||r;if(i){let r={type:`image`,url:e.resolve(String(n.src||``)||null),title:String(n.title||``)||null,alt:String(i)};return e.patch(t,r),r}return}let i=[];if(r)i=[[r,void 0]];else if(n.type!==`button`&&n.type!==`file`&&n.type!==`password`&&n.type!==`reset`&&n.type!==`submit`&&n.list){let t=String(n.list),r=e.elementById.get(t);r&&r.tagName===`datalist`&&(i=LI(r,n))}if(i.length===0)return;if(n.type===`password`&&(i[0]=[`•`.repeat(i[0][0].length),void 0]),n.type===`email`||n.type===`url`){let t=[],r=-1;for(;++r<i.length;){let a=e.resolve(i[r][0]),o={type:`link`,title:null,url:n.type===`email`?`mailto:`+a:a,children:[{type:`text`,value:i[r][1]||a}]};t.push(o),r!==i.length-1&&t.push({type:`text`,value:`, `})}return t}let a=[],o=-1;for(;++o<i.length;)a.push(i[o][1]?i[o][1]+` (`+i[o][0]+`)`:i[o][0]);let s={type:`text`,value:a.join(`, `)};return e.patch(t,s),s}var HI={}.hasOwnProperty;function UI(e,t){let n=e.type===`element`&&HI.call(e.properties,t)&&e.properties[t];return n!=null&&n!==!1}var WI=new Set([`pingback`,`prefetch`,`stylesheet`]);function GI(e){if(e.type!==`element`||e.tagName!==`link`)return!1;if(e.properties.itemProp)return!0;let t=e.properties.rel,n=-1;if(!Array.isArray(t)||t.length===0)return!1;for(;++n<t.length;)if(!WI.has(String(t[n])))return!1;return!0}var KI=iF(`a.abbr.area.b.bdi.bdo.br.button.cite.code.data.datalist.del.dfn.em.i.input.ins.kbd.keygen.label.map.mark.meter.noscript.output.progress.q.ruby.s.samp.script.select.small.span.strong.sub.sup.template.textarea.time.u.var.wbr`.split(`.`)),qI=iF(`meta`);function JI(e){return!!(e.type===`text`||KI(e)||uF(e)||GI(e)||qI(e)&&UI(e,`itemProp`))}function YI(e,t){let{rest:n,checkbox:r}=ZI(t),i=r?!!r.properties.checked:null,a={type:`listItem`,spread:XI(n),checked:i,children:e.toFlow(e.all(n))};return e.patch(t,a),a}function XI(e){let t=-1,n=!1;for(;++t<e.children.length;){let r=e.children[t];if(r.type===`element`){if(JI(r))continue;if(r.tagName===`p`||n||XI(r))return!0;n=!0}}return!1}function ZI(e){let t=e.children[0];if(t&&t.type===`element`&&t.tagName===`input`&&t.properties&&(t.properties.type===`checkbox`||t.properties.type===`radio`))return{checkbox:t,rest:{...e,children:e.children.slice(1)}};if(t&&t.type===`element`&&t.tagName===`p`){let{checkbox:n,rest:r}=ZI(t);if(n)return{checkbox:n,rest:{...e,children:[r,...e.children.slice(1)]}}}return{checkbox:void 0,rest:e}}function QI(e,t){let n=t.tagName===`ol`,r=e.toSpecificContent(e.all(t),$I),i=null;n&&(i=t.properties&&t.properties.start?Number.parseInt(String(t.properties.start),10):1);let a={type:`list`,ordered:n,start:i,spread:EI(r),children:r};return e.patch(t,a),a}function $I(){return{type:`listItem`,spread:!1,checked:null,children:[]}}var eL={};function tL(e,t){let n=t||eL;return nL(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function nL(e,t,n){if(iL(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 rL(e.children,t,n)}return Array.isArray(e)?rL(e,t,n):``}function rL(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=nL(e[i],t,n);return r.join(``)}function iL(e){return!!(e&&typeof e==`object`)}var aL=hF([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function oL(e){let t=-1;for(;++t<e.length;){let n=e[t];if(!dL(n)||`children`in n&&oL(n.children))return!0}return!1}function sL(e){return lL(e,t,function(e){return e});function t(e){return e.every(function(e){return e.type===`text`?fF(e.value):!1})?[]:[{type:`paragraph`,children:jI(e)}]}}function cL(e){return lL(e.children,t,n);function t(t){let n=fL(e);return n.children=t,[n]}function n(t){if(`children`in t&&`children`in e){let n=fL(e),r=fL(t);return n.children=t.children,r.children.push(n),r}return{...t}}}function lL(e,t,n){let r=uL(e),i=[],a=[],o=-1;for(;++o<r.length;){let e=r[o];dL(e)?a.push(e):(a.length>0&&(i.push(...t(a)),a=[]),i.push(n(e)))}return a.length>0&&(i.push(...t(a)),a=[]),i}function uL(e){let t=[],n=-1;for(;++n<e.length;){let r=e[n];(r.type===`delete`||r.type===`link`)&&oL(r.children)?t.push(...cL(r)):t.push(r)}return t}function dL(e){let t=e.data&&e.data.hName;return t?JI({type:`element`,tagName:t,properties:{},children:[]}):aL(e)}function fL(e){return nF({...e,children:[]})}function pL(e,t){let n=t.properties||{},r=t.tagName===`video`?String(n.poster||``):``,i=String(n.src||``),a=-1,o=!1,s=e.all(t);if(qF({type:`root`,children:s},function(e){if(e.type===`link`)return o=!0,!1}),o||oL(s))return s;for(;!i&&++a<t.children.length;){let e=t.children[a];e.type===`element`&&e.tagName===`source`&&e.properties&&(i=String(e.properties.src||``))}if(r){let n={type:`image`,title:null,url:e.resolve(r),alt:tL(s)};e.patch(t,n),s=[n]}let c=s,l={type:`link`,title:n.title?String(n.title):null,url:e.resolve(i),children:c};return e.patch(t,l),l}function mL(e,t){let n=jI(e.all(t));if(n.length>0){let r={type:`paragraph`,children:n};return e.patch(t,r),r}}var hL=[`"`];function gL(e,t){let n=e.options.quotes||hL;e.qNesting++;let r=e.all(t);e.qNesting--;let i=n[e.qNesting%n.length],a=r[0],o=r[r.length-1],s=i.charAt(0),c=i.length>1?i.charAt(1):i;return a&&a.type===`text`?a.value=s+a.value:r.unshift({type:`text`,value:s}),o&&o.type===`text`?o.value+=c:r.push({type:`text`,value:c}),r}function _L(e,t){let n=e.all(t);(e.options.document||oL(n))&&(n=sL(n));let r={type:`root`,children:n};return e.patch(t,r),r}function vL(e,t){let n=LI(t),r=-1,i=[];for(;++r<n.length;){let e=n[r];i.push(e[1]?e[1]+` (`+e[0]+`)`:e[0])}if(i.length>0){let n={type:`text`,value:i.join(`, `)};return e.patch(t,n),n}}function yL(e,t){let n={type:`strong`,children:e.all(t)};return e.patch(t,n),n}function bL(e,t){let n={type:`tableCell`,children:e.all(t)};if(e.patch(t,n),t.properties){let e=t.properties.rowSpan,r=t.properties.colSpan;if(e||r){let t=n.data||={};e&&(t.hastUtilToMdastTemporaryRowSpan=e),r&&(t.hastUtilToMdastTemporaryColSpan=r)}}return n}function xL(e,t){let n={type:`tableRow`,children:e.toSpecificContent(e.all(t),SL)};return e.patch(t,n),n}function SL(){return{type:`tableCell`,children:[]}}function CL(e,t){if(e.inTable){let n={type:`text`,value:dI(t)};return e.patch(t,n),n}e.inTable=!0;let{align:n,headless:r}=wL(t),i=e.toSpecificContent(e.all(t),EL);r&&i.unshift(EL());let a=-1;for(;++a<i.length;){let t=i[a];t.children=e.toSpecificContent(t.children,TL)}let o=1;for(a=-1;++a<i.length;){let e=i[a].children,t=-1;for(;++t<e.length;){let n=e[t];if(n.data){let e=n.data,r=Number.parseInt(String(e.hastUtilToMdastTemporaryColSpan),10)||1,o=Number.parseInt(String(e.hastUtilToMdastTemporaryRowSpan),10)||1;if(r>1||o>1){let e=a-1;for(;++e<a+o;){let n=t-1;for(;++n<t+r&&i[e];){let r=[];(e!==a||n!==t)&&r.push({type:`tableCell`,children:[]}),i[e].children.splice(n,0,...r)}}}`hastUtilToMdastTemporaryColSpan`in n.data&&delete n.data.hastUtilToMdastTemporaryColSpan,`hastUtilToMdastTemporaryRowSpan`in n.data&&delete n.data.hastUtilToMdastTemporaryRowSpan,Object.keys(n.data).length===0&&delete n.data}}e.length>o&&(o=e.length)}for(a=-1;++a<i.length;){let e=i[a].children,t=e.length-1;for(;++t<o;)e.push({type:`tableCell`,children:[]})}let s=n.length-1;for(;++s<o;)n.push(null);e.inTable=!1;let c={type:`table`,align:n,children:i};return e.patch(t,c),c}function wL(e){let t={align:[null],headless:!0},n=0,r=0;return qF(e,function(i){if(i.type===`element`){if(i.tagName===`table`&&e!==i)return WF;if((i.tagName===`th`||i.tagName===`td`)&&i.properties){if(!t.align[r]){let e=String(i.properties.align||``)||null;(e===`center`||e===`left`||e===`right`||e===null)&&(t.align[r]=e)}t.headless&&n<2&&i.tagName===`th`&&(t.headless=!1),r++}else i.tagName===`thead`?t.headless=!1:i.tagName===`tr`&&(n++,r=0)}}),t}function TL(){return{type:`tableCell`,children:[]}}function EL(){return{type:`tableRow`,children:[]}}function DL(e,t){let n={type:`text`,value:t.value};return e.patch(t,n),n}function OL(e,t){let n={type:`text`,value:dI(t)};return e.patch(t,n),n}function kL(e,t){let n={type:`text`,value:``};return e.patch(t,n),n}var AL={comment:wI,doctype:PL,root:_L,text:DL},jL={applet:PL,area:PL,basefont:PL,bgsound:PL,caption:PL,col:PL,colgroup:PL,command:PL,content:PL,datalist:PL,dialog:PL,element:PL,embed:PL,frame:PL,frameset:PL,isindex:PL,keygen:PL,link:PL,math:PL,menu:PL,menuitem:PL,meta:PL,nextid:PL,noembed:PL,noframes:PL,optgroup:PL,option:PL,param:PL,script:PL,shadow:PL,source:PL,spacer:PL,style:PL,svg:PL,template:PL,title:PL,track:PL,abbr:ML,acronym:ML,bdi:ML,bdo:ML,big:ML,blink:ML,button:ML,canvas:ML,cite:ML,data:ML,details:ML,dfn:ML,font:ML,ins:ML,label:ML,map:ML,marquee:ML,meter:ML,nobr:ML,noscript:ML,object:ML,output:ML,progress:ML,rb:ML,rbc:ML,rp:ML,rt:ML,rtc:ML,ruby:ML,slot:ML,small:ML,span:ML,sup:ML,sub:ML,tbody:ML,tfoot:ML,thead:ML,time:ML,address:NL,article:NL,aside:NL,body:NL,center:NL,div:NL,fieldset:NL,figcaption:NL,figure:NL,form:NL,footer:NL,header:NL,hgroup:NL,html:NL,legend:NL,main:NL,multicol:NL,nav:NL,picture:NL,section:NL,a:QF,audio:pL,b:yL,base:$F,blockquote:eI,br:tI,code:II,dir:QI,dl:DI,dt:YI,dd:YI,del:TI,em:AI,h1:MI,h2:MI,h3:MI,h4:MI,h5:MI,h6:MI,hr:NI,i:AI,iframe:PI,img:FI,image:FI,input:VI,kbd:II,li:YI,listing:CI,mark:AI,ol:QI,p:mL,plaintext:CI,pre:CI,q:gL,s:TI,samp:II,select:vL,strike:TI,strong:yL,summary:mL,table:CL,td:bL,textarea:OL,th:bL,tr:xL,tt:II,u:AI,ul:QI,var:II,video:pL,wbr:kL,xmp:CI};function ML(e,t){return e.all(t)}function NL(e,t){return e.toFlow(e.all(t))}function PL(){}var FL={}.hasOwnProperty;function IL(e){return{all:LL,baseFound:!1,elementById:new Map,frozenBaseUrl:void 0,handlers:{...jL,...e.handlers},inTable:!1,nodeHandlers:{...AL,...e.nodeHandlers},one:RL,options:e,patch:zL,qNesting:0,resolve:BL,toFlow:VL,toSpecificContent:HL}}function LL(e){let t=e.children||[],n=[],r=-1;for(;++r<t.length;){let i=t[r],a=this.one(i,e);Array.isArray(a)?n.push(...a):a&&n.push(a)}return n}function RL(e,t){if(e.type===`element`){if(e.properties&&e.properties.dataMdast===`ignore`)return;if(FL.call(this.handlers,e.tagName))return this.handlers[e.tagName](this,e,t)||void 0}else if(FL.call(this.nodeHandlers,e.type))return this.nodeHandlers[e.type](this,e,t)||void 0;if(`value`in e&&typeof e.value==`string`){let t={type:`text`,value:e.value};return this.patch(e,t),t}if(`children`in e)return this.all(e)}function zL(e,t){e.position&&(t.position=ZF(e))}function BL(e){let t=this.frozenBaseUrl;return e==null?``:t?String(new URL(e,t)):e}function VL(e){return sL(e)}function HL(e,t){let n=t(),r=[],i=[],a=-1;for(;++a<e.length;){let t=e[a];if(o(t))i.length>0&&(t.children.unshift(...i),i=[]),r.push(t);else{let e=t;i.push(e)}}if(i.length>0){let e=r[r.length-1];e||(e=t(),r.push(e)),e.children.push(...i),i=[]}return r;function o(e){return e.type===n.type}}var UL={};function WL(e,t){let n=nF(e),r=t||UL,i=VF({newlines:r.newlines===!0}),a=IL(r),o;i(n),qF(n,function(e){if(e&&e.type===`element`&&e.properties){let t=String(e.properties.id||``)||void 0;t&&!a.elementById.has(t)&&a.elementById.set(t,e)}});let s=a.one(n,void 0);return o=s?Array.isArray(s)?{type:`root`,children:s}:s:{type:`root`,children:[]},qF(o,function(e,t,n){if(e.type===`text`&&t!==void 0&&n){let r=n.children[t-1];if(r&&r.type===e.type)return r.value+=e.value,n.children.splice(t,1),r.position&&e.position&&(r.position.end=e.position.end),t-1;if(e.value=e.value.replace(/[\t ]*(\r?\n|\r)[\t ]*/,`$1`),n&&(n.type===`heading`||n.type===`paragraph`||n.type===`root`)&&(t||(e.value=e.value.replace(/^[\t ]+/,``)),t===n.children.length-1&&(e.value=e.value.replace(/[\t ]+$/,``))),!e.value)return n.children.splice(t,1),t}}),o}var GL={document:!0};function KL(e,t){return e&&`run`in e?async function(n,r){let i=WL(n,{...GL,...t});await e.run(i,r)}:function(t){return WL(t,{...GL,...e})}}function qL(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var JL=iR(/[A-Za-z]/),YL=iR(/[\dA-Za-z]/),XL=iR(/[#-'*+\--9=?A-Z^-~]/);function ZL(e){return e!==null&&(e<32||e===127)}var QL=iR(/\d/),$L=iR(/[\dA-Fa-f]/),eR=iR(/[!-/:-@[-`{-~]/);function Z(e){return e!==null&&e<-2}function tR(e){return e!==null&&(e<0||e===32)}function Q(e){return e===-2||e===-1||e===32}var nR=iR(/\p{P}|\p{S}/u),rR=iR(/\s/);function iR(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function aR(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function oR(e,t,n){let r=hF((n||{}).ignore||[]),i=sR(t),a=-1;for(;++a<i.length;)GF(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function sR(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([cR(e[0]),lR(e[1])])}return t}function cR(e){return typeof e==`string`?new RegExp(aR(e),`g`):e}function lR(e){return typeof e==`function`?e:function(){return e}}var uR=`phrasing`,dR=[`autolink`,`link`,`image`,`label`];function fR(){return{transforms:[bR],enter:{literalAutolink:mR,literalAutolinkEmail:hR,literalAutolinkHttp:hR,literalAutolinkWww:hR},exit:{literalAutolink:yR,literalAutolinkEmail:vR,literalAutolinkHttp:gR,literalAutolinkWww:_R}}}function pR(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:uR,notInConstruct:dR},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:uR,notInConstruct:dR},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:uR,notInConstruct:dR}]}}function mR(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function hR(e){this.config.enter.autolinkProtocol.call(this,e)}function gR(e){this.config.exit.autolinkProtocol.call(this,e)}function _R(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function vR(e){this.config.exit.autolinkEmail.call(this,e)}function yR(e){this.exit(e)}function bR(e){oR(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,xR],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,SR]],{ignore:[`link`,`linkReference`]})}function xR(e,t,n,r,i){let a=``;if(!TR(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!CR(n)))return!1;let o=wR(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function SR(e,t,n,r){return!TR(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function CR(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function wR(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=qL(e,`(`),a=qL(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function TR(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||rR(n)||nR(n))&&(!t||n!==47)}function ER(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}IR.peek=FR;function DR(){this.buffer()}function OR(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function kR(){this.buffer()}function AR(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function jR(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ER(this.sliceSerialize(e)).toLowerCase(),n.label=t}function MR(e){this.exit(e)}function NR(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ER(this.sliceSerialize(e)).toLowerCase(),n.label=t}function PR(e){this.exit(e)}function FR(){return`[`}function IR(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function LR(){return{enter:{gfmFootnoteCallString:DR,gfmFootnoteCall:OR,gfmFootnoteDefinitionLabelString:kR,gfmFootnoteDefinition:AR},exit:{gfmFootnoteCallString:jR,gfmFootnoteCall:MR,gfmFootnoteDefinitionLabelString:NR,gfmFootnoteDefinition:PR}}}function RR(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:IR},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
305
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?BR:zR))),s(),o}}function zR(e,t,n){return t===0?e:BR(e,t,n)}function BR(e,t,n){return(n?``:` `)+e}var VR=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];KR.peek=qR;function HR(){return{canContainEols:[`delete`],enter:{strikethrough:WR},exit:{strikethrough:GR}}}function UR(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:VR}],handlers:{delete:KR}}}function WR(e){this.enter({type:`delete`,children:[]},e)}function GR(e){this.exit(e)}function KR(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function qR(){return`~`}function JR(e){return e.length}function YR(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||JR,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=XR(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=ZR(r[d]);else{let e=ZR(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
306
|
+
`)}function XR(e){return e==null?``:String(e)}function ZR(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var QR={}.hasOwnProperty;function $R(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&QR.call(t,e)){let n=String(t[e]);i=QR.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var ez={}.hasOwnProperty;function tz(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)tz(e,t.extensions[n]);for(r in t)if(ez.call(t,r))switch(r){case`extensions`:break;case`unsafe`:nz(e[r],t[r]);break;case`join`:nz(e[r],t[r]);break;case`handlers`:rz(e[r],t[r]);break;default:e.options[r]=t[r]}return e}function nz(e,t){t&&e.push(...t)}function rz(e,t){t&&Object.assign(e,t)}function iz(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),az);return i(),o}function az(e,t,n){return`>`+(n?``:` `)+e}function oz(e,t){return sz(e,t.inConstruct,!0)&&!sz(e,t.notInConstruct,!1)}function sz(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function cz(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
307
|
+
`&&oz(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
308
|
+
`}function lz(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function uz(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function dz(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function fz(e,t,n,r){let i=dz(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(uz(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,pz);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(lz(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
309
309
|
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
310
310
|
`),a&&(u+=s.move(a+`
|
|
311
|
-
`)),u+=s.move(c),l(),u}function
|
|
312
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function
|
|
311
|
+
`)),u+=s.move(c),l(),u}function pz(e,t,n){return(n?``:` `)+e}function mz(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function hz(e,t,n,r){let i=mz(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
312
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function gz(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function _z(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function vz(e){if(e===null||tR(e)||rR(e))return 1;if(nR(e))return 2}function yz(e,t,n){let r=vz(e),i=vz(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}bz.peek=xz;function bz(e,t,n,r){let i=gz(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=yz(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=_z(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=yz(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+_z(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function xz(e,t,n){return n.options.emphasis||`*`}function Sz(e,t){let n=!1;return qF(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&tL(e)&&(t.options.setext||n))}function Cz(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Sz(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
313
313
|
`,after:`
|
|
314
314
|
`});return r(),t(),o+`
|
|
315
315
|
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
316
316
|
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
317
|
-
`,...a.current()});return/^[\t ]/.test(l)&&(l=
|
|
318
|
-
`,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`,`codeFencedMetaGraveAccent`,`codeFencedMetaTilde`,`destinationLiteral`,`headingAtx`]},{character:` `,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,before:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`]},{character:`!`,after:`\\[`,inConstruct:`phrasing`,notInConstruct:
|
|
319
|
-
]|$)`},{character:`&`,after:`[#A-Za-z]`,inConstruct:`phrasing`},{character:`'`,inConstruct:`titleApostrophe`},{character:`(`,inConstruct:`destinationRaw`},{before:`\\]`,character:`(`,inConstruct:`phrasing`,notInConstruct:
|
|
320
|
-
*])`},{character:`*`,inConstruct:`phrasing`,notInConstruct:
|
|
317
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=_z(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}wz.peek=Tz;function wz(e){return e.value||``}function Tz(){return`<`}Ez.peek=Dz;function Ez(e,t,n,r){let i=mz(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Dz(){return`!`}Oz.peek=kz;function Oz(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function kz(){return`!`}Az.peek=jz;function Az(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function jz(){return"`"}function Mz(e,t){let n=tL(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type===`text`&&(n===e.url||`mailto:`+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Nz.peek=Pz;function Nz(e,t,n,r){let i=mz(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(Mz(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Pz(e,t,n){return Mz(e,n)?`<`:`[`}Fz.peek=Iz;function Fz(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Iz(){return`[`}function Lz(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Rz(e){let t=Lz(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function zz(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Bz(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Vz(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?zz(n):Lz(n),s=e.ordered?o===`.`?`)`:`.`:Rz(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Bz(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Hz(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Uz(e,t,n,r){let i=Hz(n),a=n.bulletCurrent||Lz(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Wz(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function Gz(e,t,n,r){return(e.children.some(function(e){return aL(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Kz(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}qz.peek=Jz;function qz(e,t,n,r){let i=Kz(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=yz(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=_z(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=yz(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+_z(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Jz(e,t,n){return n.options.strong||`*`}function Yz(e,t,n,r){return n.safe(e.value,r)}function Xz(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Zz(e,t,n){let r=(Bz(n)+(n.options.ruleSpaces?` `:``)).repeat(Xz(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Qz={blockquote:iz,break:cz,code:fz,definition:hz,emphasis:bz,hardBreak:cz,heading:Cz,html:wz,image:Ez,imageReference:Oz,inlineCode:Az,link:Nz,linkReference:Fz,list:Vz,listItem:Uz,paragraph:Wz,root:Gz,strong:qz,text:Yz,thematicBreak:Zz},$z=[eB];function eB(e,t,n,r){if(t.type===`code`&&uz(t,r)&&(e.type===`list`||e.type===t.type&&uz(e,r)))return!1;if(`spread`in n&&typeof n.spread==`boolean`)return e.type===`paragraph`&&(e.type===t.type||t.type===`definition`||t.type===`heading`&&Sz(t,r))?void 0:+!!n.spread}var tB=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`],nB=[{character:` `,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,before:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`]},{character:`\r`,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`,`codeFencedMetaGraveAccent`,`codeFencedMetaTilde`,`destinationLiteral`,`headingAtx`]},{character:`
|
|
318
|
+
`,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`,`codeFencedMetaGraveAccent`,`codeFencedMetaTilde`,`destinationLiteral`,`headingAtx`]},{character:` `,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,before:`[\\r\\n]`,inConstruct:`phrasing`},{character:` `,inConstruct:[`codeFencedLangGraveAccent`,`codeFencedLangTilde`]},{character:`!`,after:`\\[`,inConstruct:`phrasing`,notInConstruct:tB},{character:`"`,inConstruct:`titleQuote`},{atBreak:!0,character:`#`},{character:`#`,inConstruct:`headingAtx`,after:`(?:[\r
|
|
319
|
+
]|$)`},{character:`&`,after:`[#A-Za-z]`,inConstruct:`phrasing`},{character:`'`,inConstruct:`titleApostrophe`},{character:`(`,inConstruct:`destinationRaw`},{before:`\\]`,character:`(`,inConstruct:`phrasing`,notInConstruct:tB},{atBreak:!0,before:`\\d+`,character:`)`},{character:`)`,inConstruct:`destinationRaw`},{atBreak:!0,character:`*`,after:`(?:[ \r
|
|
320
|
+
*])`},{character:`*`,inConstruct:`phrasing`,notInConstruct:tB},{atBreak:!0,character:`+`,after:`(?:[ \r
|
|
321
321
|
])`},{atBreak:!0,character:`-`,after:`(?:[ \r
|
|
322
322
|
-])`},{atBreak:!0,before:`\\d+`,character:`.`,after:`(?:[ \r
|
|
323
|
-
]|$)`},{atBreak:!0,character:`<`,after:`[!/?A-Za-z]`},{character:`<`,after:`[!/?A-Za-z]`,inConstruct:`phrasing`,notInConstruct:
|
|
324
|
-
`)&&u.type===`html`&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/,` `),s=` `,l=t.createTracker(n),l.move(a.join(``)));let f=t.handle(u,e,t,{...l.current(),after:d,before:s});c&&c===f.slice(0,1)&&(f=
|
|
323
|
+
]|$)`},{atBreak:!0,character:`<`,after:`[!/?A-Za-z]`},{character:`<`,after:`[!/?A-Za-z]`,inConstruct:`phrasing`,notInConstruct:tB},{character:`<`,inConstruct:`destinationLiteral`},{atBreak:!0,character:`=`},{atBreak:!0,character:`>`},{character:`>`,inConstruct:`destinationLiteral`},{atBreak:!0,character:`[`},{character:`[`,inConstruct:`phrasing`,notInConstruct:tB},{character:`[`,inConstruct:[`label`,`reference`]},{character:`\\`,after:`[\\r\\n]`,inConstruct:`phrasing`},{character:`]`,inConstruct:[`label`,`reference`]},{atBreak:!0,character:`_`},{character:`_`,inConstruct:`phrasing`,notInConstruct:tB},{atBreak:!0,character:"`"},{character:"`",inConstruct:[`codeFencedLangGraveAccent`,`codeFencedMetaGraveAccent`]},{character:"`",inConstruct:`phrasing`,notInConstruct:tB},{atBreak:!0,character:`~`}],rB=document.createElement(`i`);function iB(e){let t=`&`+e+`;`;rB.innerHTML=t;let n=rB.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function aB(e,t){let 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)}var oB=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function sB(e){return e.replace(oB,cB)}function cB(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return aB(n.slice(t?2:1),t?16:10)}return iB(n)||e}function lB(e){return e.label||!e.identifier?e.label||``:sB(e.identifier)}function uB(e){if(!e._compiled){let t=(e.atBreak?`[\\r\\n][\\t ]*`:``)+(e.before?`(?:`+e.before+`)`:``);e._compiled=RegExp((t?`(`+t+`)`:``)+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?`\\`:``)+e.character+(e.after?`(?:`+e.after+`)`:``),`g`)}return e._compiled}function dB(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before,c;r.push(-1);let l=t.createTracker(n);for(;++o<i.length;){let u=i[o],d;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),d=n?n(i[o+1],e,t,{before:``,after:``,...l.current()}).charAt(0):``}else d=n.after;a.length>0&&(s===`\r`||s===`
|
|
324
|
+
`)&&u.type===`html`&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/,` `),s=` `,l=t.createTracker(n),l.move(a.join(``)));let f=t.handle(u,e,t,{...l.current(),after:d,before:s});c&&c===f.slice(0,1)&&(f=_z(c.charCodeAt(0))+f.slice(1));let p=t.attentionEncodeSurroundingInfo;t.attentionEncodeSurroundingInfo=void 0,c=void 0,p&&(a.length>0&&p.before&&s===a[a.length-1].slice(-1)&&(a[a.length-1]=a[a.length-1].slice(0,-1)+_z(s.charCodeAt(0))),p.after&&(c=d)),l.move(f),a.push(f),s=f.slice(-1)}return r.pop(),a.join(``)}function fB(e,t,n){let r=t.indexStack,i=e.children||[],a=t.createTracker(n),o=[],s=-1;for(r.push(-1);++s<i.length;){let n=i[s];r[r.length-1]=s,o.push(a.move(t.handle(n,e,t,{before:`
|
|
325
325
|
`,after:`
|
|
326
|
-
`,...a.current()}))),n.type!==`list`&&(t.bulletLastUsed=void 0),s<i.length-1&&o.push(a.move(
|
|
326
|
+
`,...a.current()}))),n.type!==`list`&&(t.bulletLastUsed=void 0),s<i.length-1&&o.push(a.move(pB(n,i[s+1],e,t)))}return r.pop(),o.join(``)}function pB(e,t,n,r){let i=r.join.length;for(;i--;){let a=r.join[i](e,t,n,r);if(a===!0||a===1)break;if(typeof a==`number`)return`
|
|
327
327
|
`.repeat(1+a);if(a===!1)return`
|
|
328
328
|
|
|
329
329
|
<!---->
|
|
330
330
|
|
|
331
331
|
`}return`
|
|
332
332
|
|
|
333
|
-
`}var
|
|
333
|
+
`}var mB=/\r?\n|\r/g;function hB(e,t){let n=[],r=0,i=0,a;for(;a=mB.exec(e);)o(e.slice(r,a.index)),n.push(a[0]),r=a.index+a[0].length,i++;return o(e.slice(r)),n.join(``);function o(e){n.push(t(e,i,!e))}}function gB(e,t,n){let r=(n.before||``)+(t||``)+(n.after||``),i=[],a=[],o={},s=-1;for(;++s<e.unsafe.length;){let t=e.unsafe[s];if(!oz(e.stack,t))continue;let n=e.compilePattern(t),a;for(;a=n.exec(r);){let e=`before`in t||!!t.atBreak,n=`after`in t,r=a.index+(e?a[1].length:0);i.includes(r)?(o[r].before&&!e&&(o[r].before=!1),o[r].after&&!n&&(o[r].after=!1)):(i.push(r),o[r]={before:e,after:n})}}i.sort(_B);let c=n.before?n.before.length:0,l=r.length-(n.after?n.after.length:0);for(s=-1;++s<i.length;){let e=i[s];e<c||e>=l||e+1<l&&i[s+1]===e+1&&o[e].after&&!o[e+1].before&&!o[e+1].after||i[s-1]===e-1&&o[e].before&&!o[e-1].before&&!o[e-1].after||(c!==e&&a.push(vB(r.slice(c,e),`\\`)),c=e,/[!-/:-@[-`{-~]/.test(r.charAt(e))&&(!n.encode||!n.encode.includes(r.charAt(e)))?a.push(`\\`):(a.push(_z(r.charCodeAt(e))),c++))}return a.push(vB(r.slice(c,l),n.after)),a.join(``)}function _B(e,t){return e-t}function vB(e,t){let n=/\\(?=[!-/:-@[-`{-~])/g,r=[],i=[],a=e+t,o=-1,s=0,c;for(;c=n.exec(a);)r.push(c.index);for(;++o<r.length;)s!==r[o]&&i.push(e.slice(s,r[o])),i.push(`\\`),s=r[o];return i.push(e.slice(s)),i.join(``)}function yB(e){let t=e||{},n=t.now||{},r=t.lineShift||0,i=n.line||1,a=n.column||1;return{move:c,current:o,shift:s};function o(){return{now:{line:i,column:a},lineShift:r}}function s(e){r+=e}function c(e){let t=e||``,n=t.split(/\r?\n|\r/g),o=n[n.length-1];return i+=n.length-1,a=n.length===1?a+o.length:1+o.length+r,t}}function bB(e,t){let n=t||{},r={associationId:lB,containerPhrasing:wB,containerFlow:TB,createTracker:yB,compilePattern:uB,enter:a,handlers:{...Qz},handle:void 0,indentLines:hB,indexStack:[],join:[...$z],options:{},safe:EB,stack:[],unsafe:[...nB]};tz(r,n),r.options.tightDefinitions&&r.join.push(CB),r.handle=$R(`type`,{invalid:xB,unknown:SB,handlers:r.handlers});let i=r.handle(e,void 0,r,{before:`
|
|
334
334
|
`,after:`
|
|
335
335
|
`,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
|
|
336
|
-
`),i;function a(e){return r.stack.push(e),t;function t(){r.stack.pop()}}}function
|
|
336
|
+
`),i;function a(e){return r.stack.push(e),t;function t(){r.stack.pop()}}}function xB(e){throw Error("Cannot handle value `"+e+"`, expected node")}function SB(e){throw Error("Cannot handle unknown node `"+e.type+"`")}function CB(e,t){if(e.type===`definition`&&e.type===t.type)return 0}function wB(e,t){return dB(e,this,t)}function TB(e,t){return fB(e,this,t)}function EB(e,t){return gB(this,e,t)}function DB(){return{enter:{table:OB,tableData:MB,tableHeader:MB,tableRow:AB},exit:{codeText:NB,table:kB,tableData:jB,tableHeader:jB,tableRow:jB}}}function OB(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function kB(e){this.exit(e),this.data.inTable=void 0}function AB(e){this.enter({type:`tableRow`,children:[]},e)}function jB(e){this.exit(e)}function MB(e){this.enter({type:`tableCell`,children:[]},e)}function NB(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,PB));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function PB(e,t){return t===`|`?t:e}function FB(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
337
337
|
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
338
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return XR(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=$z.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function LB(){return{exit:{taskListCheckValueChecked:zB,taskListCheckValueUnchecked:zB,paragraph:BB}}}function RB(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:VB}}}function zB(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function BB(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function VB(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=$z.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function HB(){return[pR(),RR(),UR(),OB(),LB()]}function UB(e){return{extensions:[mR(),zR(e),WR(),IB(e),RB()]}}function WB(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function GB(e,t){return e.length>0?(WB(e,e.length,0,t),e):t}var KB={}.hasOwnProperty;function qB(e){let t={},n=-1;for(;++n<e.length;)JB(t,e[n]);return t}function JB(e,t){let n;for(n in t){let r=(KB.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){KB.call(r,a)||(r[a]=[]);let e=i[a];YB(r[a],Array.isArray(e)?e:e?[e]:[])}}}function YB(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);WB(e,0,0,r)}var XB={tokenize:uV,partial:!0},ZB={tokenize:dV,partial:!0},QB={tokenize:fV,partial:!0},$B={tokenize:pV,partial:!0},eV={tokenize:mV,partial:!0},tV={name:`wwwAutolink`,tokenize:cV,previous:hV},nV={name:`protocolAutolink`,tokenize:lV,previous:gV},rV={name:`emailAutolink`,tokenize:sV,previous:_V},iV={};function aV(){return{text:iV}}for(var oV=48;oV<123;)iV[oV]=rV,oV++,oV===58?oV=65:oV===91&&(oV=97);iV[43]=rV,iV[45]=rV,iV[46]=rV,iV[95]=rV,iV[72]=[rV,nV],iV[104]=[rV,nV],iV[87]=[rV,tV],iV[119]=[rV,tV];function sV(e,t,n){let r=this,i,a;return o;function o(t){return!vV(t)||!_V.call(r,r.previous)||yV(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return vV(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(eV,u,l)(t):t===45||t===95||XL(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&YL(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function cV(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!hV.call(r,r.previous)||yV(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(XB,e.attempt(ZB,e.attempt(QB,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function lV(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&gV.call(r,r.previous)&&!yV(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(YL(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||QL(t)||nR(t)||iR(t)||rR(t)?n(t):e.attempt(ZB,e.attempt(QB,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function uV(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function dV(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check($B,c,s)(t):t===null||nR(t)||iR(t)||t!==45&&rR(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function fV(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check($B,t,a)(o):o===null||nR(o)||iR(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function pV(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||nR(o)||iR(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||nR(e)||iR(e)?t(e):r(e)}function a(e){return YL(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):YL(t)?(e.consume(t),o):n(t)}}function mV(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return XL(e)?n(e):t(e)}}function hV(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||nR(e)}function gV(e){return!YL(e)}function _V(e){return!(e===47||vV(e))}function vV(e){return e===43||e===45||e===46||e===95||XL(e)}function yV(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function bV(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&XL(e.charCodeAt(n+1))&&XL(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function xV(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var SV={name:`attention`,resolveAll:CV,tokenize:wV};function CV(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};TV(d,-c),TV(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=GB(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=GB(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=GB(l,xV(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=GB(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=GB(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,WB(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function wV(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=yz(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=yz(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function TV(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var EV={name:`autolink`,tokenize:DV};function DV(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return YL(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||XL(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||XL(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||QL(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):ZL(t)?(e.consume(t),l):n(t)}function u(e){return XL(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||XL(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function $(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Q(r)?(e.enter(n),s(r)):t(r)}function s(r){return Q(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var OV={partial:!0,tokenize:kV};function kV(e,t,n){return r;function r(t){return Q(t)?$(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Z(e)?t(e):n(e)}}var AV={continuation:{tokenize:MV},exit:NV,name:`blockQuote`,tokenize:jV};function jV(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Q(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function MV(e,t,n){let r=this;return i;function i(t){return Q(t)?$(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(AV,t,n)(r)}}function NV(e){e.exit(`blockQuote`)}var PV={name:`characterEscape`,tokenize:FV};function FV(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return tR(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var IV={name:`characterReference`,tokenize:LV};function LV(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=XL,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=eR,u):(e.enter(`characterReferenceValue`),a=7,o=$L,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===XL&&!aB(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var RV={partial:!0,tokenize:VV},zV={concrete:!0,name:`codeFenced`,tokenize:BV};function BV(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Q(t)?$(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Z(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(RV,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),$(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Z(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Q(t)?$(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Z(t)?e.check(RV,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Z(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Q(t)?$(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Q(t)?$(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Z(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function VV(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var HV={name:`codeIndented`,tokenize:WV},UV={partial:!0,tokenize:GV};function WV(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),$(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):Z(t)?e.attempt(UV,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||Z(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function GV(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):$(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Z(e)?i(e):n(e)}}var KV={name:`codeText`,previous:JV,resolve:qV,tokenize:YV};function qV(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 JV(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function YV(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Z(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var XV=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&ZV(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),ZV(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ZV(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);ZV(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);ZV(this.left,t.reverse())}}};function ZV(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 QV(e){let t={},n=-1,r,i,a,o,s,c,l,u=new XV(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,$V(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return WB(e,0,1/0,u.slice(0)),!l}function $V(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var eH={resolve:nH,tokenize:rH},tH={partial:!0,tokenize:iH};function nH(e){return QV(e),e}function rH(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Z(t)?e.check(tH,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function iH(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$(e,a,`linePrefix`)}function a(i){if(i===null||Z(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function aH(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||QL(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Z(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||nR(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||QL(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function oH(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Z(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Z(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Q(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function sH(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Z(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function cH(e,t){let n;return r;function r(i){return Z(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Q(i)?$(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var lH={name:`definition`,tokenize:dH},uH={partial:!0,tokenize:fH};function dH(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return oH.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=DR(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return nR(t)?cH(e,l)(t):l(t)}function l(t){return aH(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(uH,d,d)(t)}function d(t){return Q(t)?$(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Z(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function fH(e,t,n){return r;function r(t){return nR(t)?cH(e,i)(t):n(t)}function i(t){return sH(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Q(t)?$(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Z(e)?t(e):n(e)}}var pH={name:`hardBreakEscape`,tokenize:mH};function mH(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Z(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var hH={name:`headingAtx`,resolve:gH,tokenize:_H};function gH(e,t){let n=e.length-2,r=3,i,a;return 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&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},WB(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function _H(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||nR(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Z(n)?(e.exit(`atxHeading`),t(n)):Q(n)?$(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||nR(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var vH=`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`.split(`.`),yH=[`pre`,`script`,`style`,`textarea`],bH={concrete:!0,name:`htmlFlow`,resolveTo:CH,tokenize:wH},xH={partial:!0,tokenize:EH},SH={partial:!0,tokenize:TH};function CH(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 wH(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:de):YL(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):YL(a)?(e.consume(a),i=4,r.interrupt?t:de):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:de):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:re:m):n(i)}function h(t){return YL(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||nR(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&yH.includes(l)?(i=1,r.interrupt?t(s):re(s)):vH.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):re(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||XL(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:re):n(i)}function v(t){return Q(t)?(e.consume(t),v):w(t)}function y(t){return t===47?(e.consume(t),w):t===58||t===95||YL(t)?(e.consume(t),b):Q(t)?(e.consume(t),y):w(t)}function b(t){return t===45||t===46||t===58||t===95||XL(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Q(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Q(t)?(e.consume(t),S):ee(t)}function C(t){return t===c?(e.consume(t),c=null,te):t===null||Z(t)?n(t):(e.consume(t),C)}function ee(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||nR(t)?x(t):(e.consume(t),ee)}function te(e){return e===47||e===62||Q(e)?y(e):n(e)}function w(t){return t===62?(e.consume(t),ne):n(t)}function ne(t){return t===null||Z(t)?re(t):Q(t)?(e.consume(t),ne):n(t)}function re(t){return t===45&&i===2?(e.consume(t),se):t===60&&i===1?(e.consume(t),ce):t===62&&i===4?(e.consume(t),fe):t===63&&i===3?(e.consume(t),de):t===93&&i===5?(e.consume(t),ue):Z(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(xH,pe,ie)(t)):t===null||Z(t)?(e.exit(`htmlFlowData`),ie(t)):(e.consume(t),re)}function ie(t){return e.check(SH,ae,pe)(t)}function ae(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),oe}function oe(t){return t===null||Z(t)?ie(t):(e.enter(`htmlFlowData`),re(t))}function se(t){return t===45?(e.consume(t),de):re(t)}function ce(t){return t===47?(e.consume(t),o=``,le):re(t)}function le(t){if(t===62){let n=o.toLowerCase();return yH.includes(n)?(e.consume(t),fe):re(t)}return YL(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),le):re(t)}function ue(t){return t===93?(e.consume(t),de):re(t)}function de(t){return t===62?(e.consume(t),fe):t===45&&i===2?(e.consume(t),de):re(t)}function fe(t){return t===null||Z(t)?(e.exit(`htmlFlowData`),pe(t)):(e.consume(t),fe)}function pe(n){return e.exit(`htmlFlow`),t(n)}}function TH(e,t,n){let r=this;return i;function i(t){return Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function EH(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(OV,t,n)}}var DH={name:`htmlText`,tokenize:OH};function OH(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):YL(t)?(e.consume(t),ee):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):YL(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Z(t)?(o=d,ce(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?se(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Z(t)?(o=h,ce(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?se(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?se(t):Z(t)?(o=v,ce(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Z(t)?(o=y,ce(t)):(e.consume(t),y)}function b(e){return e===62?se(e):y(e)}function x(t){return YL(t)?(e.consume(t),S):n(t)}function S(t){return t===45||XL(t)?(e.consume(t),S):C(t)}function C(t){return Z(t)?(o=C,ce(t)):Q(t)?(e.consume(t),C):se(t)}function ee(t){return t===45||XL(t)?(e.consume(t),ee):t===47||t===62||nR(t)?te(t):n(t)}function te(t){return t===47?(e.consume(t),se):t===58||t===95||YL(t)?(e.consume(t),w):Z(t)?(o=te,ce(t)):Q(t)?(e.consume(t),te):se(t)}function w(t){return t===45||t===46||t===58||t===95||XL(t)?(e.consume(t),w):ne(t)}function ne(t){return t===61?(e.consume(t),re):Z(t)?(o=ne,ce(t)):Q(t)?(e.consume(t),ne):te(t)}function re(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ie):Z(t)?(o=re,ce(t)):Q(t)?(e.consume(t),re):(e.consume(t),ae)}function ie(t){return t===i?(e.consume(t),i=void 0,oe):t===null?n(t):Z(t)?(o=ie,ce(t)):(e.consume(t),ie)}function ae(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||nR(t)?te(t):(e.consume(t),ae)}function oe(e){return e===47||e===62||nR(e)?te(e):n(e)}function se(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ce(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),le}function le(t){return Q(t)?$(e,ue,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ue(t)}function ue(t){return e.enter(`htmlTextData`),o(t)}}var kH={name:`labelEnd`,resolveAll:NH,resolveTo:PH,tokenize:FH},AH={tokenize:IH},jH={tokenize:LH},MH={tokenize:RH};function NH(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&WB(e,0,e.length,n),e}function PH(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=GB(s,e.slice(a+1,a+r+3)),s=GB(s,[[`enter`,u,t]]),s=GB(s,xV(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=GB(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=GB(s,e.slice(o+1)),s=GB(s,[[`exit`,c,t]]),WB(e,a,e.length,s),e}function FH(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(DR(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(AH,u,o?u:d)(t):t===91?e.attempt(jH,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(MH,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function IH(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return nR(t)?cH(e,a)(t):a(t)}function a(t){return t===41?u(t):aH(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return nR(t)?cH(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?sH(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return nR(t)?cH(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function LH(e,t,n){let r=this;return i;function i(t){return oH.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(DR(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function RH(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var zH={name:`labelStartImage`,resolveAll:kH.resolveAll,tokenize:BH};function BH(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var VH={name:`labelStartLink`,resolveAll:kH.resolveAll,tokenize:HH};function HH(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var UH={name:`lineEnding`,tokenize:WH};function WH(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$(e,t,`linePrefix`)}}var GH={name:`thematicBreak`,tokenize:KH};function KH(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Z(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Q(t)?$(e,s,`whitespace`)(t):s(t))}}var qH={continuation:{tokenize:ZH},exit:$H,name:`list`,tokenize:XH},JH={partial:!0,tokenize:eU},YH={partial:!0,tokenize:QH};function XH(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:$L(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(GH,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return $L(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(OV,r.interrupt?n:u,e.attempt(JH,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Q(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function ZH(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(OV,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,$(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Q(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(YH,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,$(e,e.attempt(qH,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function QH(e,t,n){let r=this;return $(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function $H(e){e.exit(this.containerState.type)}function eU(e,t,n){let r=this;return $(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Q(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var tU={name:`setextUnderline`,resolveTo:nU,tokenize:rU};function nU(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function rU(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Q(t)?$(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Z(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var iU={tokenize:fU,partial:!0};function aU(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:lU,continuation:{tokenize:uU},exit:dU}},text:{91:{name:`gfmFootnoteCall`,tokenize:cU},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:oU,resolveTo:sU}}}}function oU(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=DR(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function sU(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function cU(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||nR(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(DR(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return nR(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function lU(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||nR(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=DR(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return nR(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),$(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function uU(e,t,n){return e.check(OV,t,e.attempt(iU,t,n))}function dU(e){e.exit(`gfmFootnoteDefinition`)}function fU(e,t,n){let r=this;return $(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function pU(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&WB(o,o.length,0,xV(s,e.slice(r+1,n),t)),WB(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),WB(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=yz(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=yz(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var mU=class{constructor(){this.map=[]}add(e,t,n){hU(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function hU(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function gU(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function _U(){return{flow:{null:{name:`table`,tokenize:vU,resolveAll:yU}}}}function vU(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Z(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Q(t)?$(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||nR(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Q(t)?$(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Q(t)?$(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Z(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Q(t)?$(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Z(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Z(n)?(e.exit(`tableRow`),t(n)):Q(n)?$(e,C,`whitespace`)(n):(e.enter(`data`),ee(n))}function ee(t){return t===null||t===124||nR(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?te:ee)}function te(t){return t===92||t===124?(e.consume(t),ee):ee(t)}}function yU(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new mU;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(xU(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=bU(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=bU(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=bU(f,t,o,i,n,d)):(o[0]=o[1],d=bU(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&xU(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=gU(t.events,n))}return e}function bU(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},SU(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=SU(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=SU(t.events,n[2]),a=SU(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},SU(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function xU(e,t,n,r,i){let a=[],o=SU(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function SU(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var CU={name:`tasklistCheck`,tokenize:TU};function wU(){return{text:{91:CU}}}function TU(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return nR(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Z(r)?t(r):Q(r)?e.check({tokenize:EU},t,n)(r):n(r)}}function EU(e,t,n){return $(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function DU(e){return qB([aV(),aU(),pU(e),_U(),wU()])}var OU={};function kU(e){let t=this,n=e||OU,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(DU(n)),a.push(HB()),o.push(UB(n))}function AU(e){let t=this;t.compiler=n;function n(n){return xB(n,{...t.data(`settings`),...e,extensions:t.data(`toMarkdownExtensions`)||[]})}}function jU(e){if(e)throw e}var MU=e(n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}))(),1);function NU(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function PU(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?FU(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function FU(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var IU=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),LU={}.hasOwnProperty,RU=new class e extends IU{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=PU()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,MU.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(VU(`data`,this.frozen),this.namespace[e]=t,this):LU.call(this.namespace,e)&&this.namespace[e]||void 0:e?(VU(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=WU(e),n=this.parser||this.Parser;return zU(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),zU(`process`,this.parser||this.Parser),BU(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=WU(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);KU(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),zU(`processSync`,this.parser||this.Parser),BU(`processSync`,this.compiler||this.Compiler),this.process(e,r),UU(`processSync`,`process`,t),n;function r(e,r){t=!0,jU(e),n=r}}run(e,t,n){HU(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=WU(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),UU(`runSync`,`run`,n),r;function i(e,t){jU(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=WU(t),r=this.compiler||this.Compiler;return BU(`stringify`,r),HU(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(VU(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,MU.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];NU(o)&&NU(r)&&(r=(0,MU.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function zU(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function BU(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function VU(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function HU(e){if(!NU(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function UU(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function WU(e){return GU(e)?e:new kP(e)}function GU(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function KU(e){return typeof e==`string`||qU(e)}function qU(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var JU=9,YU=32;function XU(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(ZU(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(ZU(t.slice(i),i>0,!1)),a.join(``)}function ZU(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===JU||t===YU;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===JU||t===YU;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function QU(e,t,n,r){let i=new Map,a=new Map,o={all:c,definitionById:i,footnoteById:a,footnoteCounts:new Map,footnoteOrder:[],one:s};return JF(r,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?i:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o;function s(r,i){return oW(e,t,n,r,i,o)}function c(t){let n=[];if(`children`in t){let r=t.children,i=-1;for(;++i<r.length;){let a=o.one(r[i],t);if(a){if(i&&r[i-1]?.type===`break`&&(!Array.isArray(a)&&a.type===e.nodes.text&&(a=e.text(nW(a.text))),!Array.isArray(a)&&a.type!==e.nodes.text)){let t=a.firstChild;t&&t.type===e.nodes.text&&(a=a.copy(P.from(a.content).replaceChild(0,e.text(nW(t.text)))))}Array.isArray(a)?n.push(...a):n.push(a)}}}return n}}function $U(e){return e.replaceAll(/\n([^\n])/g,` $1`)}function eW(e,t,n){let r=t.referenceType,i=`]`;if(r===`collapsed`?i+=`[]`:r===`full`&&(i+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[e.text(`![`+(t.alt??``)+i)];let a=n.all(t),o=a[0];o&&o.type===e.nodes.text?a[0]=o.copy(P.from(e.text(`[`+(o.text??``)))):a.unshift(e.text(`[`));let s=a[a.length-1];return s&&s.type===e.nodes.text?a[a.length-1]=s.copy(P.from(e.text((s.text??``)+i))):a.push(e.text(i)),a}function tW(e){throw Error(`unknown markdown node: ${e.type}`)}function nW(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function rW(){}function iW(e){throw Error("Expected node, not `"+JSON.stringify(e)+"`")}function aW(e,t,n,r){return ez(`tagName`,{handlers:e})(t,n,r)}function oW(e,t,n,r,i,a){return ez(`type`,{invalid:iW,unknown:tW,handlers:{toml:rW,yaml:rW,definition:rW,footnoteDefinition:rW,root(t,n,r){let i=r.all(t);return e.topNodeType.create(null,i)},html(t){let r=VP(t.value).children[0];if(r?.type!==`element`)return null;let[,i]=r.children;if(i?.type!==`element`)return null;let o=i.children[0];return o?.type===`element`?aW(n,o,void 0,a)||(t.value?e.text(t.value):null):null},text(t){let n=$U(XU(String(t.value)));return n?e.text(/^\s+$/.test(n)?n.replace(/ /g,`\xA0`):n):null},...t,linkReference(n,r,i){if(t.linkReference)return t.linkReference(n,r,i);let a=String(n.identifier).toUpperCase(),o=i.definitionById.get(a);if(!o)return eW(e,n,i);let s={type:`link`,url:o.url,title:o.title,children:n.children,data:{...o.data,...n.data}};return t.link?.(s,r,i)}}})(r,i,a)}function sW(e,t){return(n,r,i)=>{let a=i.all(n);return e.createAndFill(t?.(n)??null,a)}}function cW(e,t){return(n,r,i)=>{let a=i.all(n),o=e.create(t?.(n)??null);return a.map(e=>e.mark(o.addToSet(e.marks)))}}var lW=function(e,t){let n=oW(t.schema,t.handlers,t.htmlHandlers??{},e,void 0,QU(t.schema,t.handlers,t.htmlHandlers??{},e));return n.check(),n},uW=function(e){this.compiler=function(t){return lW(t,e)}};function dW(e,t){let n={one:r,all:u,nodeHandlers:e,markHandlers:t};function r(e,t){let r=e.type.schema,i=e.type.name,a=n.nodeHandlers[i];if(a)return a(e,t,n);if(e.type===r.topNodeType){let t=n.all(e);return t.some(e=>hF(e,`root`)),{type:`root`,children:t}}return e.type===r.nodes.text?{type:`text`,value:e.text}:null}function i(e){if(e.length===0)return[];let t=e[0].marks,n=[];for(let r of t){let t=!0;for(let n=1;n<e.length;n++)if(!e[n].marks.some(e=>e.eq(r))){t=!1;break}t&&n.push(r)}return n}function a(e,t){let n=e.findIndex(e=>e.eq(t));return n===-1?e:e.slice(0,n).concat(e.slice(n+1))}function o(e,t){let n=[];for(let r of e)t.some(e=>e.eq(r))&&n.push(r);return n}function s(e,t,r){let i=n.markHandlers[e.type.name];if(!i)return r;let a=i(e,t,r,n);return(Array.isArray(a)?a:[a]).filter(e=>e!=null)}function c(e,t){let r=[];for(let i of e){let e=n.one(i.node,t);e!=null&&r.push(e)}return r}function l(e,t){if(e.length===0)return[];if(e.every(e=>e.marks.length===0))return c(e,t);let n=i(e);if(n.length>0){let r=n[0];return s(r,t,l(e.map(e=>({node:e.node,marks:a(e.marks,r)})),t))}let r=[],u=[e[0]],d=e[0].marks.slice();for(let t=1;t<e.length;t++){let n=e[t],i=o(d,n.marks),a=d.length===0&&n.marks.length===0;i.length>0||a?(u.push(n),d=a?[]:i):(r.push(u),u=[n],d=n.marks.slice())}if(r.push(u),r.length===1&&e.length>1){let n=[];for(let r of e)for(let e of l([r],t))n.push(e);return n}let f=[];for(let e of r)for(let n of l(e,t))f.push(n);return f}function u(e){return l(e.children.map(e=>({node:e,marks:e.marks})),e)}return n}function fW(e,t){return dW(t.nodeHandlers,t.markHandlers).one(e)}function pW(e,t){return(n,r,i)=>{let a=i.all(n);return{type:e,...t?.(n),children:a}}}function mW(e,t){return(n,r,i)=>({type:e,...t?.(n),children:i})}var hW=e(n(((e,t)=>{(function(){var e=t===void 0?function(){return this||(0,eval)(`this`)}():t.exports=i;e.format=i,e.vsprintf=r,typeof console<`u`&&typeof console.log==`function`&&(e.printf=n);function n(){console.log(i.apply(null,arguments))}function r(e,t){return i.apply(null,[e].concat(t))}function i(e){for(var t=1,n=[].slice.call(arguments),r=0,i=e.length,a=``,o,s=!1,c,l,u=!1,d,f=function(){return n[t++]},p=function(){for(var t=``;/\d/.test(e[r]);)t+=e[r++],o=e[r];return t.length>0?parseInt(t):null};r<i;++r)if(o=e[r],s)switch(s=!1,o==`.`?(u=!1,o=e[++r]):o==`0`&&e[r+1]==`.`?(u=!0,r+=2,o=e[r]):u=!0,d=p(),o){case`b`:a+=parseInt(f(),10).toString(2);break;case`c`:c=f(),typeof c==`string`||c instanceof String?a+=c:a+=String.fromCharCode(parseInt(c,10));break;case`d`:a+=parseInt(f(),10);break;case`f`:l=String(parseFloat(f()).toFixed(d||6)),a+=u?l:l.replace(/^0/,``);break;case`j`:a+=JSON.stringify(f());break;case`o`:a+=`0`+parseInt(f(),10).toString(8);break;case`s`:a+=f();break;case`x`:a+=`0x`+parseInt(f(),10).toString(16);break;case`X`:a+=`0x`+parseInt(f(),10).toString(16).toUpperCase();break;default:a+=o;break}else o===`%`?s=!0:a+=o;return a}})()}))(),1),gW=Object.assign(_W(Error),{eval:_W(EvalError),range:_W(RangeError),reference:_W(ReferenceError),syntax:_W(SyntaxError),type:_W(TypeError),uri:_W(URIError)});function _W(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){return new e(t&&(0,hW.default)(t,...n))}}var vW={}.hasOwnProperty,yW={yaml:`-`,toml:`+`};function bW(e){let t=[],n=-1,r=Array.isArray(e)?e:e?[e]:[`yaml`];for(;++n<r.length;)t[n]=xW(r[n]);return t}function xW(e){let t=e;if(typeof t==`string`){if(!vW.call(yW,t))throw gW("Missing matter definition for `%s`",t);t={type:t,marker:yW[t]}}else if(typeof t!=`object`)throw gW("Expected matter to be an object, not `%j`",t);if(!vW.call(t,`type`))throw gW("Missing `type` in matter `%j`",t);if(!vW.call(t,`fence`)&&!vW.call(t,`marker`))throw gW("Missing `marker` or `fence` in matter `%j`",t);return t}function SW(e){let t=bW(e),n={},r=-1;for(;++r<t.length;){let e=t[r],i=wW(e,`open`).charCodeAt(0),a=CW(e),o=n[i];Array.isArray(o)?o.push(a):n[i]=[a]}return{flow:n}}function CW(e){let t=e.anywhere,n=e.type,r=n+`Fence`,i=r+`Sequence`,a=n+`Value`,o={tokenize:u,partial:!0},s,c=0;return{tokenize:l,concrete:!0};function l(l,u,d){let f=this;return p;function p(a){let o=f.now();return o.column===1&&(o.line===1||t)&&(s=wW(e,`open`),c=0,a===s.charCodeAt(c))?(l.enter(n),l.enter(r),l.enter(i),m(a)):d(a)}function m(e){return c===s.length?(l.exit(i),Q(e)?(l.enter(`whitespace`),h(e)):g(e)):e===s.charCodeAt(c++)?(l.consume(e),m):d(e)}function h(e){return Q(e)?(l.consume(e),h):(l.exit(`whitespace`),g(e))}function g(t){return Z(t)?(l.exit(r),l.enter(`lineEnding`),l.consume(t),l.exit(`lineEnding`),s=wW(e,`close`),c=0,l.attempt(o,b,_)):d(t)}function _(e){return e===null||Z(e)?y(e):(l.enter(a),v(e))}function v(e){return e===null||Z(e)?(l.exit(a),y(e)):(l.consume(e),v)}function y(e){return e===null?d(e):(l.enter(`lineEnding`),l.consume(e),l.exit(`lineEnding`),l.attempt(o,b,_))}function b(e){return l.exit(n),u(e)}}function u(e,t,n){let a=0;return o;function o(t){return t===s.charCodeAt(a)?(e.enter(r),e.enter(i),c(t)):n(t)}function c(t){return a===s.length?(e.exit(i),Q(t)?(e.enter(`whitespace`),l(t)):u(t)):t===s.charCodeAt(a++)?(e.consume(t),c):n(t)}function l(t){return Q(t)?(e.consume(t),l):(e.exit(`whitespace`),u(t))}function u(i){return i===null||Z(i)?(e.exit(r),t(i)):n(i)}}}function wW(e,t){return e.marker?TW(e.marker,t).repeat(3):TW(e.fence,t)}function TW(e,t){return typeof e==`string`?e:e[t]}function EW(e){let t=bW(e),n={},r={},i=-1;for(;++i<t.length;){let e=t[i];n[e.type]=DW(e),r[e.type]=OW,r[e.type+`Value`]=kW}return{enter:n,exit:r}}function DW(e){return t;function t(t){this.enter({type:e.type,value:``},t),this.buffer()}}function OW(e){let t=this.resume(),n=this.stack[this.stack.length-1];`value`in n,this.exit(e),n.value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``)}function kW(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function AW(e){let t=[],n={},r=bW(e),i=-1;for(;++i<r.length;){let e=r[i];n[e.type]=jW(e);let a=MW(e,`open`);t.push({atBreak:!0,character:a.charAt(0),after:oR(a.charAt(1))})}return{unsafe:t,handlers:n}}function jW(e){let t=MW(e,`open`),n=MW(e,`close`);return r;function r(e){return t+(e.value?`
|
|
338
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return YR(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Qz.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function IB(){return{exit:{taskListCheckValueChecked:RB,taskListCheckValueUnchecked:RB,paragraph:zB}}}function LB(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:BB}}}function RB(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function zB(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function BB(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Qz.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function VB(){return[fR(),LR(),HR(),DB(),IB()]}function HB(e){return{extensions:[pR(),RR(e),UR(),FB(e),LB()]}}function UB(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function WB(e,t){return e.length>0?(UB(e,e.length,0,t),e):t}var GB={}.hasOwnProperty;function KB(e){let t={},n=-1;for(;++n<e.length;)qB(t,e[n]);return t}function qB(e,t){let n;for(n in t){let r=(GB.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){GB.call(r,a)||(r[a]=[]);let e=i[a];JB(r[a],Array.isArray(e)?e:e?[e]:[])}}}function JB(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);UB(e,0,0,r)}var YB={tokenize:lV,partial:!0},XB={tokenize:uV,partial:!0},ZB={tokenize:dV,partial:!0},QB={tokenize:fV,partial:!0},$B={tokenize:pV,partial:!0},eV={name:`wwwAutolink`,tokenize:sV,previous:mV},tV={name:`protocolAutolink`,tokenize:cV,previous:hV},nV={name:`emailAutolink`,tokenize:oV,previous:gV},rV={};function iV(){return{text:rV}}for(var aV=48;aV<123;)rV[aV]=nV,aV++,aV===58?aV=65:aV===91&&(aV=97);rV[43]=nV,rV[45]=nV,rV[46]=nV,rV[95]=nV,rV[72]=[nV,tV],rV[104]=[nV,tV],rV[87]=[nV,eV],rV[119]=[nV,eV];function oV(e,t,n){let r=this,i,a;return o;function o(t){return!_V(t)||!gV.call(r,r.previous)||vV(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return _V(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check($B,u,l)(t):t===45||t===95||YL(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&JL(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function sV(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!mV.call(r,r.previous)||vV(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(YB,e.attempt(XB,e.attempt(ZB,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function cV(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&hV.call(r,r.previous)&&!vV(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(JL(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||ZL(t)||tR(t)||rR(t)||nR(t)?n(t):e.attempt(XB,e.attempt(ZB,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function lV(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function uV(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(QB,c,s)(t):t===null||tR(t)||rR(t)||t!==45&&nR(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function dV(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(QB,t,a)(o):o===null||tR(o)||rR(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function fV(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||tR(o)||rR(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||tR(e)||rR(e)?t(e):r(e)}function a(e){return JL(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):JL(t)?(e.consume(t),o):n(t)}}function pV(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return YL(e)?n(e):t(e)}}function mV(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||tR(e)}function hV(e){return!JL(e)}function gV(e){return!(e===47||_V(e))}function _V(e){return e===43||e===45||e===46||e===95||YL(e)}function vV(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function yV(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&YL(e.charCodeAt(n+1))&&YL(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function bV(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var xV={name:`attention`,resolveAll:SV,tokenize:CV};function SV(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};wV(d,-c),wV(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=WB(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=WB(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=WB(l,bV(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=WB(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=WB(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,UB(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function CV(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=vz(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=vz(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function wV(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var TV={name:`autolink`,tokenize:EV};function EV(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return JL(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||YL(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||YL(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||ZL(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):XL(t)?(e.consume(t),l):n(t)}function u(e){return YL(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||YL(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function $(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Q(r)?(e.enter(n),s(r)):t(r)}function s(r){return Q(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var DV={partial:!0,tokenize:OV};function OV(e,t,n){return r;function r(t){return Q(t)?$(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Z(e)?t(e):n(e)}}var kV={continuation:{tokenize:jV},exit:MV,name:`blockQuote`,tokenize:AV};function AV(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Q(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function jV(e,t,n){let r=this;return i;function i(t){return Q(t)?$(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(kV,t,n)(r)}}function MV(e){e.exit(`blockQuote`)}var NV={name:`characterEscape`,tokenize:PV};function PV(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return eR(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var FV={name:`characterReference`,tokenize:IV};function IV(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=YL,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=$L,u):(e.enter(`characterReferenceValue`),a=7,o=QL,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===YL&&!iB(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var LV={partial:!0,tokenize:BV},RV={concrete:!0,name:`codeFenced`,tokenize:zV};function zV(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Q(t)?$(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Z(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(LV,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),$(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Z(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Q(t)?$(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Z(t)?e.check(LV,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Z(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Q(t)?$(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Q(t)?$(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Z(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function BV(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var VV={name:`codeIndented`,tokenize:UV},HV={partial:!0,tokenize:WV};function UV(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),$(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):Z(t)?e.attempt(HV,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||Z(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function WV(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):$(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Z(e)?i(e):n(e)}}var GV={name:`codeText`,previous:qV,resolve:KV,tokenize:JV};function KV(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 qV(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function JV(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Z(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var YV=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&XV(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),XV(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),XV(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);XV(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);XV(this.left,t.reverse())}}};function XV(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 ZV(e){let t={},n=-1,r,i,a,o,s,c,l,u=new YV(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,QV(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return UB(e,0,1/0,u.slice(0)),!l}function QV(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var $V={resolve:tH,tokenize:nH},eH={partial:!0,tokenize:rH};function tH(e){return ZV(e),e}function nH(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Z(t)?e.check(eH,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function rH(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$(e,a,`linePrefix`)}function a(i){if(i===null||Z(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function iH(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||ZL(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Z(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||tR(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||ZL(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function aH(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Z(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Z(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Q(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function oH(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),$(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Z(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function sH(e,t){let n;return r;function r(i){return Z(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Q(i)?$(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var cH={name:`definition`,tokenize:uH},lH={partial:!0,tokenize:dH};function uH(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return aH.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=ER(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return tR(t)?sH(e,l)(t):l(t)}function l(t){return iH(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(lH,d,d)(t)}function d(t){return Q(t)?$(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Z(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function dH(e,t,n){return r;function r(t){return tR(t)?sH(e,i)(t):n(t)}function i(t){return oH(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Q(t)?$(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Z(e)?t(e):n(e)}}var fH={name:`hardBreakEscape`,tokenize:pH};function pH(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Z(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var mH={name:`headingAtx`,resolve:hH,tokenize:gH};function hH(e,t){let n=e.length-2,r=3,i,a;return 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&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},UB(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function gH(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||tR(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Z(n)?(e.exit(`atxHeading`),t(n)):Q(n)?$(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||tR(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var _H=`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`.split(`.`),vH=[`pre`,`script`,`style`,`textarea`],yH={concrete:!0,name:`htmlFlow`,resolveTo:SH,tokenize:CH},bH={partial:!0,tokenize:TH},xH={partial:!0,tokenize:wH};function SH(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 CH(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:de):JL(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):JL(a)?(e.consume(a),i=4,r.interrupt?t:de):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:de):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:re:m):n(i)}function h(t){return JL(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||tR(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&vH.includes(l)?(i=1,r.interrupt?t(s):re(s)):_H.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):re(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||YL(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:re):n(i)}function v(t){return Q(t)?(e.consume(t),v):w(t)}function y(t){return t===47?(e.consume(t),w):t===58||t===95||JL(t)?(e.consume(t),b):Q(t)?(e.consume(t),y):w(t)}function b(t){return t===45||t===46||t===58||t===95||YL(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Q(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Q(t)?(e.consume(t),S):ee(t)}function C(t){return t===c?(e.consume(t),c=null,te):t===null||Z(t)?n(t):(e.consume(t),C)}function ee(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||tR(t)?x(t):(e.consume(t),ee)}function te(e){return e===47||e===62||Q(e)?y(e):n(e)}function w(t){return t===62?(e.consume(t),ne):n(t)}function ne(t){return t===null||Z(t)?re(t):Q(t)?(e.consume(t),ne):n(t)}function re(t){return t===45&&i===2?(e.consume(t),se):t===60&&i===1?(e.consume(t),ce):t===62&&i===4?(e.consume(t),fe):t===63&&i===3?(e.consume(t),de):t===93&&i===5?(e.consume(t),ue):Z(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(bH,pe,ie)(t)):t===null||Z(t)?(e.exit(`htmlFlowData`),ie(t)):(e.consume(t),re)}function ie(t){return e.check(xH,ae,pe)(t)}function ae(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),oe}function oe(t){return t===null||Z(t)?ie(t):(e.enter(`htmlFlowData`),re(t))}function se(t){return t===45?(e.consume(t),de):re(t)}function ce(t){return t===47?(e.consume(t),o=``,le):re(t)}function le(t){if(t===62){let n=o.toLowerCase();return vH.includes(n)?(e.consume(t),fe):re(t)}return JL(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),le):re(t)}function ue(t){return t===93?(e.consume(t),de):re(t)}function de(t){return t===62?(e.consume(t),fe):t===45&&i===2?(e.consume(t),de):re(t)}function fe(t){return t===null||Z(t)?(e.exit(`htmlFlowData`),pe(t)):(e.consume(t),fe)}function pe(n){return e.exit(`htmlFlow`),t(n)}}function wH(e,t,n){let r=this;return i;function i(t){return Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function TH(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(DV,t,n)}}var EH={name:`htmlText`,tokenize:DH};function DH(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):JL(t)?(e.consume(t),ee):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):JL(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Z(t)?(o=d,ce(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?se(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Z(t)?(o=h,ce(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?se(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?se(t):Z(t)?(o=v,ce(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Z(t)?(o=y,ce(t)):(e.consume(t),y)}function b(e){return e===62?se(e):y(e)}function x(t){return JL(t)?(e.consume(t),S):n(t)}function S(t){return t===45||YL(t)?(e.consume(t),S):C(t)}function C(t){return Z(t)?(o=C,ce(t)):Q(t)?(e.consume(t),C):se(t)}function ee(t){return t===45||YL(t)?(e.consume(t),ee):t===47||t===62||tR(t)?te(t):n(t)}function te(t){return t===47?(e.consume(t),se):t===58||t===95||JL(t)?(e.consume(t),w):Z(t)?(o=te,ce(t)):Q(t)?(e.consume(t),te):se(t)}function w(t){return t===45||t===46||t===58||t===95||YL(t)?(e.consume(t),w):ne(t)}function ne(t){return t===61?(e.consume(t),re):Z(t)?(o=ne,ce(t)):Q(t)?(e.consume(t),ne):te(t)}function re(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ie):Z(t)?(o=re,ce(t)):Q(t)?(e.consume(t),re):(e.consume(t),ae)}function ie(t){return t===i?(e.consume(t),i=void 0,oe):t===null?n(t):Z(t)?(o=ie,ce(t)):(e.consume(t),ie)}function ae(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||tR(t)?te(t):(e.consume(t),ae)}function oe(e){return e===47||e===62||tR(e)?te(e):n(e)}function se(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function ce(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),le}function le(t){return Q(t)?$(e,ue,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ue(t)}function ue(t){return e.enter(`htmlTextData`),o(t)}}var OH={name:`labelEnd`,resolveAll:MH,resolveTo:NH,tokenize:PH},kH={tokenize:FH},AH={tokenize:IH},jH={tokenize:LH};function MH(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&UB(e,0,e.length,n),e}function NH(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=WB(s,e.slice(a+1,a+r+3)),s=WB(s,[[`enter`,u,t]]),s=WB(s,bV(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=WB(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=WB(s,e.slice(o+1)),s=WB(s,[[`exit`,c,t]]),UB(e,a,e.length,s),e}function PH(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(ER(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(kH,u,o?u:d)(t):t===91?e.attempt(AH,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(jH,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function FH(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return tR(t)?sH(e,a)(t):a(t)}function a(t){return t===41?u(t):iH(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return tR(t)?sH(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?oH(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return tR(t)?sH(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function IH(e,t,n){let r=this;return i;function i(t){return aH.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(ER(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function LH(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var RH={name:`labelStartImage`,resolveAll:OH.resolveAll,tokenize:zH};function zH(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var BH={name:`labelStartLink`,resolveAll:OH.resolveAll,tokenize:VH};function VH(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var HH={name:`lineEnding`,tokenize:UH};function UH(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$(e,t,`linePrefix`)}}var WH={name:`thematicBreak`,tokenize:GH};function GH(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Z(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Q(t)?$(e,s,`whitespace`)(t):s(t))}}var KH={continuation:{tokenize:XH},exit:QH,name:`list`,tokenize:YH},qH={partial:!0,tokenize:$H},JH={partial:!0,tokenize:ZH};function YH(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:QL(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(WH,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return QL(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(DV,r.interrupt?n:u,e.attempt(qH,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Q(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function XH(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(DV,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,$(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Q(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(JH,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,$(e,e.attempt(KH,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function ZH(e,t,n){let r=this;return $(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function QH(e){e.exit(this.containerState.type)}function $H(e,t,n){let r=this;return $(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Q(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var eU={name:`setextUnderline`,resolveTo:tU,tokenize:nU};function tU(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function nU(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Q(t)?$(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Z(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var rU={tokenize:dU,partial:!0};function iU(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:cU,continuation:{tokenize:lU},exit:uU}},text:{91:{name:`gfmFootnoteCall`,tokenize:sU},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:aU,resolveTo:oU}}}}function aU(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=ER(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function oU(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function sU(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||tR(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(ER(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return tR(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function cU(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||tR(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=ER(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return tR(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),$(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function lU(e,t,n){return e.check(DV,t,e.attempt(rU,t,n))}function uU(e){e.exit(`gfmFootnoteDefinition`)}function dU(e,t,n){let r=this;return $(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function fU(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&UB(o,o.length,0,bV(s,e.slice(r+1,n),t)),UB(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),UB(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=vz(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=vz(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var pU=class{constructor(){this.map=[]}add(e,t,n){mU(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function mU(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function hU(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function gU(){return{flow:{null:{name:`table`,tokenize:_U,resolveAll:vU}}}}function _U(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Z(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Q(t)?$(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||tR(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Q(t)?$(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Q(t)?$(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Z(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Q(t)?$(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Z(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Z(n)?(e.exit(`tableRow`),t(n)):Q(n)?$(e,C,`whitespace`)(n):(e.enter(`data`),ee(n))}function ee(t){return t===null||t===124||tR(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?te:ee)}function te(t){return t===92||t===124?(e.consume(t),ee):ee(t)}}function vU(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new pU;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(bU(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=yU(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=yU(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=yU(f,t,o,i,n,d)):(o[0]=o[1],d=yU(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&bU(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=hU(t.events,n))}return e}function yU(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},xU(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=xU(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=xU(t.events,n[2]),a=xU(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},xU(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function bU(e,t,n,r,i){let a=[],o=xU(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function xU(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var SU={name:`tasklistCheck`,tokenize:wU};function CU(){return{text:{91:SU}}}function wU(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return tR(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Z(r)?t(r):Q(r)?e.check({tokenize:TU},t,n)(r):n(r)}}function TU(e,t,n){return $(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function EU(e){return KB([iV(),iU(),fU(e),gU(),CU()])}var DU={};function OU(e){let t=this,n=e||DU,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(EU(n)),a.push(VB()),o.push(HB(n))}function kU(e){let t=this;t.compiler=n;function n(n){return bB(n,{...t.data(`settings`),...e,extensions:t.data(`toMarkdownExtensions`)||[]})}}function AU(e){if(e)throw e}var jU=e(n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}))(),1);function MU(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function NU(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?PU(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function PU(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var FU=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),IU={}.hasOwnProperty,LU=new class e extends FU{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=NU()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,jU.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(BU(`data`,this.frozen),this.namespace[e]=t,this):IU.call(this.namespace,e)&&this.namespace[e]||void 0:e?(BU(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=UU(e),n=this.parser||this.Parser;return RU(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),RU(`process`,this.parser||this.Parser),zU(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=UU(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);GU(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),RU(`processSync`,this.parser||this.Parser),zU(`processSync`,this.compiler||this.Compiler),this.process(e,r),HU(`processSync`,`process`,t),n;function r(e,r){t=!0,AU(e),n=r}}run(e,t,n){VU(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=UU(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),HU(`runSync`,`run`,n),r;function i(e,t){AU(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=UU(t),r=this.compiler||this.Compiler;return zU(`stringify`,r),VU(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(BU(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,jU.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];MU(o)&&MU(r)&&(r=(0,jU.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function RU(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function zU(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function BU(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function VU(e){if(!MU(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function HU(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function UU(e){return WU(e)?e:new OP(e)}function WU(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function GU(e){return typeof e==`string`||KU(e)}function KU(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var qU=9,JU=32;function YU(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(XU(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(XU(t.slice(i),i>0,!1)),a.join(``)}function XU(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===qU||t===JU;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===qU||t===JU;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function ZU(e,t,n,r){let i=new Map,a=new Map,o={all:c,definitionById:i,footnoteById:a,footnoteCounts:new Map,footnoteOrder:[],one:s};return qF(r,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?i:a,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),o;function s(r,i){return aW(e,t,n,r,i,o)}function c(t){let n=[];if(`children`in t){let r=t.children,i=-1;for(;++i<r.length;){let a=o.one(r[i],t);if(a){if(i&&r[i-1]?.type===`break`&&(!Array.isArray(a)&&a.type===e.nodes.text&&(a=e.text(tW(a.text))),!Array.isArray(a)&&a.type!==e.nodes.text)){let t=a.firstChild;t&&t.type===e.nodes.text&&(a=a.copy(P.from(a.content).replaceChild(0,e.text(tW(t.text)))))}Array.isArray(a)?n.push(...a):n.push(a)}}}return n}}function QU(e){return e.replaceAll(/\n([^\n])/g,` $1`)}function $U(e,t,n){let r=t.referenceType,i=`]`;if(r===`collapsed`?i+=`[]`:r===`full`&&(i+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[e.text(`![`+(t.alt??``)+i)];let a=n.all(t),o=a[0];o&&o.type===e.nodes.text?a[0]=o.copy(P.from(e.text(`[`+(o.text??``)))):a.unshift(e.text(`[`));let s=a[a.length-1];return s&&s.type===e.nodes.text?a[a.length-1]=s.copy(P.from(e.text((s.text??``)+i))):a.push(e.text(i)),a}function eW(e){throw Error(`unknown markdown node: ${e.type}`)}function tW(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function nW(){}function rW(e){throw Error("Expected node, not `"+JSON.stringify(e)+"`")}function iW(e,t,n,r){return $R(`tagName`,{handlers:e})(t,n,r)}function aW(e,t,n,r,i,a){return $R(`type`,{invalid:rW,unknown:eW,handlers:{toml:nW,yaml:nW,definition:nW,footnoteDefinition:nW,root(t,n,r){let i=r.all(t);return e.topNodeType.create(null,i)},html(t){let r=BP(t.value).children[0];if(r?.type!==`element`)return null;let[,i]=r.children;if(i?.type!==`element`)return null;let o=i.children[0];return o?.type===`element`?iW(n,o,void 0,a)||(t.value?e.text(t.value):null):null},text(t){let n=QU(YU(String(t.value)));return n?e.text(/^\s+$/.test(n)?n.replace(/ /g,`\xA0`):n):null},...t,linkReference(n,r,i){if(t.linkReference)return t.linkReference(n,r,i);let a=String(n.identifier).toUpperCase(),o=i.definitionById.get(a);if(!o)return $U(e,n,i);let s={type:`link`,url:o.url,title:o.title,children:n.children,data:{...o.data,...n.data}};return t.link?.(s,r,i)}}})(r,i,a)}function oW(e,t){return(n,r,i)=>{let a=i.all(n);return e.createAndFill(t?.(n)??null,a)}}function sW(e,t){return(n,r,i)=>{let a=i.all(n),o=e.create(t?.(n)??null);return a.map(e=>e.mark(o.addToSet(e.marks)))}}var cW=function(e,t){let n=aW(t.schema,t.handlers,t.htmlHandlers??{},e,void 0,ZU(t.schema,t.handlers,t.htmlHandlers??{},e));return n.check(),n},lW=function(e){this.compiler=function(t){return cW(t,e)}};function uW(e,t){let n={one:r,all:u,nodeHandlers:e,markHandlers:t};function r(e,t){let r=e.type.schema,i=e.type.name,a=n.nodeHandlers[i];if(a)return a(e,t,n);if(e.type===r.topNodeType){let t=n.all(e);return t.some(e=>mF(e,`root`)),{type:`root`,children:t}}return e.type===r.nodes.text?{type:`text`,value:e.text}:null}function i(e){if(e.length===0)return[];let t=e[0].marks,n=[];for(let r of t){let t=!0;for(let n=1;n<e.length;n++)if(!e[n].marks.some(e=>e.eq(r))){t=!1;break}t&&n.push(r)}return n}function a(e,t){let n=e.findIndex(e=>e.eq(t));return n===-1?e:e.slice(0,n).concat(e.slice(n+1))}function o(e,t){let n=[];for(let r of e)t.some(e=>e.eq(r))&&n.push(r);return n}function s(e,t,r){let i=n.markHandlers[e.type.name];if(!i)return r;let a=i(e,t,r,n);return(Array.isArray(a)?a:[a]).filter(e=>e!=null)}function c(e,t){let r=[];for(let i of e){let e=n.one(i.node,t);e!=null&&r.push(e)}return r}function l(e,t){if(e.length===0)return[];if(e.every(e=>e.marks.length===0))return c(e,t);let n=i(e);if(n.length>0){let r=n[0];return s(r,t,l(e.map(e=>({node:e.node,marks:a(e.marks,r)})),t))}let r=[],u=[e[0]],d=e[0].marks.slice();for(let t=1;t<e.length;t++){let n=e[t],i=o(d,n.marks),a=d.length===0&&n.marks.length===0;i.length>0||a?(u.push(n),d=a?[]:i):(r.push(u),u=[n],d=n.marks.slice())}if(r.push(u),r.length===1&&e.length>1){let n=[];for(let r of e)for(let e of l([r],t))n.push(e);return n}let f=[];for(let e of r)for(let n of l(e,t))f.push(n);return f}function u(e){return l(e.children.map(e=>({node:e,marks:e.marks})),e)}return n}function dW(e,t){return uW(t.nodeHandlers,t.markHandlers).one(e)}function fW(e,t){return(n,r,i)=>{let a=i.all(n);return{type:e,...t?.(n),children:a}}}function pW(e,t){return(n,r,i)=>({type:e,...t?.(n),children:i})}var mW=e(n(((e,t)=>{(function(){var e=t===void 0?function(){return this||(0,eval)(`this`)}():t.exports=i;e.format=i,e.vsprintf=r,typeof console<`u`&&typeof console.log==`function`&&(e.printf=n);function n(){console.log(i.apply(null,arguments))}function r(e,t){return i.apply(null,[e].concat(t))}function i(e){for(var t=1,n=[].slice.call(arguments),r=0,i=e.length,a=``,o,s=!1,c,l,u=!1,d,f=function(){return n[t++]},p=function(){for(var t=``;/\d/.test(e[r]);)t+=e[r++],o=e[r];return t.length>0?parseInt(t):null};r<i;++r)if(o=e[r],s)switch(s=!1,o==`.`?(u=!1,o=e[++r]):o==`0`&&e[r+1]==`.`?(u=!0,r+=2,o=e[r]):u=!0,d=p(),o){case`b`:a+=parseInt(f(),10).toString(2);break;case`c`:c=f(),typeof c==`string`||c instanceof String?a+=c:a+=String.fromCharCode(parseInt(c,10));break;case`d`:a+=parseInt(f(),10);break;case`f`:l=String(parseFloat(f()).toFixed(d||6)),a+=u?l:l.replace(/^0/,``);break;case`j`:a+=JSON.stringify(f());break;case`o`:a+=`0`+parseInt(f(),10).toString(8);break;case`s`:a+=f();break;case`x`:a+=`0x`+parseInt(f(),10).toString(16);break;case`X`:a+=`0x`+parseInt(f(),10).toString(16).toUpperCase();break;default:a+=o;break}else o===`%`?s=!0:a+=o;return a}})()}))(),1),hW=Object.assign(gW(Error),{eval:gW(EvalError),range:gW(RangeError),reference:gW(ReferenceError),syntax:gW(SyntaxError),type:gW(TypeError),uri:gW(URIError)});function gW(e){return t.displayName=e.displayName||e.name,t;function t(t,...n){return new e(t&&(0,mW.default)(t,...n))}}var _W={}.hasOwnProperty,vW={yaml:`-`,toml:`+`};function yW(e){let t=[],n=-1,r=Array.isArray(e)?e:e?[e]:[`yaml`];for(;++n<r.length;)t[n]=bW(r[n]);return t}function bW(e){let t=e;if(typeof t==`string`){if(!_W.call(vW,t))throw hW("Missing matter definition for `%s`",t);t={type:t,marker:vW[t]}}else if(typeof t!=`object`)throw hW("Expected matter to be an object, not `%j`",t);if(!_W.call(t,`type`))throw hW("Missing `type` in matter `%j`",t);if(!_W.call(t,`fence`)&&!_W.call(t,`marker`))throw hW("Missing `marker` or `fence` in matter `%j`",t);return t}function xW(e){let t=yW(e),n={},r=-1;for(;++r<t.length;){let e=t[r],i=CW(e,`open`).charCodeAt(0),a=SW(e),o=n[i];Array.isArray(o)?o.push(a):n[i]=[a]}return{flow:n}}function SW(e){let t=e.anywhere,n=e.type,r=n+`Fence`,i=r+`Sequence`,a=n+`Value`,o={tokenize:u,partial:!0},s,c=0;return{tokenize:l,concrete:!0};function l(l,u,d){let f=this;return p;function p(a){let o=f.now();return o.column===1&&(o.line===1||t)&&(s=CW(e,`open`),c=0,a===s.charCodeAt(c))?(l.enter(n),l.enter(r),l.enter(i),m(a)):d(a)}function m(e){return c===s.length?(l.exit(i),Q(e)?(l.enter(`whitespace`),h(e)):g(e)):e===s.charCodeAt(c++)?(l.consume(e),m):d(e)}function h(e){return Q(e)?(l.consume(e),h):(l.exit(`whitespace`),g(e))}function g(t){return Z(t)?(l.exit(r),l.enter(`lineEnding`),l.consume(t),l.exit(`lineEnding`),s=CW(e,`close`),c=0,l.attempt(o,b,_)):d(t)}function _(e){return e===null||Z(e)?y(e):(l.enter(a),v(e))}function v(e){return e===null||Z(e)?(l.exit(a),y(e)):(l.consume(e),v)}function y(e){return e===null?d(e):(l.enter(`lineEnding`),l.consume(e),l.exit(`lineEnding`),l.attempt(o,b,_))}function b(e){return l.exit(n),u(e)}}function u(e,t,n){let a=0;return o;function o(t){return t===s.charCodeAt(a)?(e.enter(r),e.enter(i),c(t)):n(t)}function c(t){return a===s.length?(e.exit(i),Q(t)?(e.enter(`whitespace`),l(t)):u(t)):t===s.charCodeAt(a++)?(e.consume(t),c):n(t)}function l(t){return Q(t)?(e.consume(t),l):(e.exit(`whitespace`),u(t))}function u(i){return i===null||Z(i)?(e.exit(r),t(i)):n(i)}}}function CW(e,t){return e.marker?wW(e.marker,t).repeat(3):wW(e.fence,t)}function wW(e,t){return typeof e==`string`?e:e[t]}function TW(e){let t=yW(e),n={},r={},i=-1;for(;++i<t.length;){let e=t[i];n[e.type]=EW(e),r[e.type]=DW,r[e.type+`Value`]=OW}return{enter:n,exit:r}}function EW(e){return t;function t(t){this.enter({type:e.type,value:``},t),this.buffer()}}function DW(e){let t=this.resume(),n=this.stack[this.stack.length-1];`value`in n,this.exit(e),n.value=t.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``)}function OW(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function kW(e){let t=[],n={},r=yW(e),i=-1;for(;++i<r.length;){let e=r[i];n[e.type]=AW(e);let a=jW(e,`open`);t.push({atBreak:!0,character:a.charAt(0),after:aR(a.charAt(1))})}return{unsafe:t,handlers:n}}function AW(e){let t=jW(e,`open`),n=jW(e,`close`);return r;function r(e){return t+(e.value?`
|
|
339
339
|
`+e.value:``)+`
|
|
340
|
-
`+n}}function
|
|
341
|
-
`,inConstruct:`mathFlowMeta`},{character:`$`,after:t?void 0:`\\$`,inConstruct:`phrasing`},{character:`$`,inConstruct:`mathFlowMeta`},{atBreak:!0,character:`$`,after:`\\$`}],handlers:{math:n,inlineMath:r}};function n(e,t,n,r){let i=e.value||``,a=n.createTracker(r),o=`$`.repeat(Math.max(
|
|
340
|
+
`+n}}function jW(e,t){return e.marker?MW(e.marker,t).repeat(3):MW(e.fence,t)}function MW(e,t){return typeof e==`string`?e:e[t]}var NW=`yaml`;function PW(e){let t=this,n=e||NW,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(xW(n)),a.push(TW(n)),o.push(kW(n))}function FW(e){return e.charAt(0).toUpperCase()+e.slice(1)}var IW={note:`<svg class="octicon octicon-info mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>`,tip:`<svg class="octicon octicon-light-bulb mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></svg>`,important:`<svg class="octicon octicon-report mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>`,warning:`<svg class="octicon octicon-alert mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>`,caution:`<svg class="octicon octicon-stop mr-2" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></svg>`};function LW(e){return e.replace(`<svg`,~e.indexOf(`xmlns`)?`<svg`:`<svg xmlns="http://www.w3.org/2000/svg"`).replaceAll(`"`,`'`).replaceAll(`%`,`%25`).replaceAll(`#`,`%23`).replaceAll(`{`,`%7B`).replaceAll(`}`,`%7D`).replaceAll(`<`,`%3C`).replaceAll(`>`,`%3E`)}var RW=(e={})=>{let{markers:t=[`TIP`,`NOTE`,`IMPORTANT`,`WARNING`,`CAUTION`],icons:n=IW,matchCaseSensitive:r=!1,titles:i={},classPrefix:a=`markdown-alert`,ignoreSquareBracket:o=!1}=e,s=t===`*`?`\\w+`:t.join(`|`),c=RegExp(o?`^!(${s})([^\\n\\r]*)`:`^\\[\\!(${s})\\]([^\\n\\r]*)`,r?``:`i`);return e=>(qF(e,`blockquote`,(e,t,r)=>{let o=e.children[0];if(!o)return;let s=o.children?.[0];if(!s||(!(`value`in s)&&`children`in s&&s.children[0]&&(s=s.children[0]),s.type!==`text`))return;let l=s.value.match(c);if(!l)return;let u=l[1]?.toLowerCase(),d=l[2]?.trim()||(i[u]??FW(u)),f=n[u],p=`data:image/svg+xml;utf8,${LW(f)}`;t===void 0||!r||(s.value=s.value.slice(l[0].length).trimStart(),e.data={hName:`div`,hProperties:{class:`${a} ${a}-${u}`}},e.children=[{type:`paragraph`,data:{hName:`p`,hProperties:{class:`${a}-title`}},children:[{type:`span`,data:{hName:`span`,hProperties:{class:`octicon octicon-${u}`,style:`--oct-icon: url("${p}")`}}},{type:`text`,value:d}]},...e.children])}),e)};function zW(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:a},exit:{mathFlow:i,mathFlowFence:r,mathFlowFenceMeta:n,mathFlowValue:s,mathText:o,mathTextData:s}};function e(e){this.enter({type:`math`,meta:null,value:``,data:{hName:`pre`,hChildren:[{type:`element`,tagName:`code`,properties:{className:[`language-math`,`math-display`]},children:[]}]}},e)}function t(){this.buffer()}function n(){let e=this.resume(),t=this.stack[this.stack.length-1];t.type,t.meta=e}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(e){let t=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t;let r=n.data.hChildren[0];r.type,r.tagName,r.children.push({type:`text`,value:t}),this.data.mathFlowInside=void 0}function a(e){this.enter({type:`inlineMath`,value:``,data:{hName:`code`,hProperties:{className:[`language-math`,`math-inline`]},hChildren:[]}},e),this.buffer()}function o(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e),n.value=t,n.data.hChildren.push({type:`text`,value:t})}function s(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}}function BW(e){let t=(e||{}).singleDollarTextMath;return t??=!0,r.peek=i,{unsafe:[{character:`\r`,inConstruct:`mathFlowMeta`},{character:`
|
|
341
|
+
`,inConstruct:`mathFlowMeta`},{character:`$`,after:t?void 0:`\\$`,inConstruct:`phrasing`},{character:`$`,inConstruct:`mathFlowMeta`},{atBreak:!0,character:`$`,after:`\\$`}],handlers:{math:n,inlineMath:r}};function n(e,t,n,r){let i=e.value||``,a=n.createTracker(r),o=`$`.repeat(Math.max(lz(i,`$`)+1,2)),s=n.enter(`mathFlow`),c=a.move(o);if(e.meta){let t=n.enter(`mathFlowMeta`);c+=a.move(n.safe(e.meta,{after:`
|
|
342
342
|
`,before:c,encode:[`$`],...a.current()})),t()}return c+=a.move(`
|
|
343
343
|
`),i&&(c+=a.move(i+`
|
|
344
|
-
`)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}var HW={tokenize:WW,concrete:!0,name:`mathFlow`},UW={tokenize:GW,partial:!0};function WW(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),$(e,l,`whitespace`)(t))}function l(t){return t===null||Z(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||Z(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(UW,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?$(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):Z(t)?e.attempt(UW,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||Z(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return $(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),$(e,c,`whitespace`)(t))}function c(r){return r===null||Z(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function GW(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function KW(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:qW,previous:JW,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||Z(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function qW(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===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,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=`mathTextData`,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 JW(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function YW(e){return{flow:{36:HW},text:{36:KW(e)}}}var XW={};function ZW(e){let t=this,n=e||XW,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(YW(n)),a.push(BW()),o.push(VW(n))}var QW={tokenize:$W};function $W(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return Z(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var eG={tokenize:nG},tG={tokenize:rG};function nG(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return WB(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(tG,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(tG,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return Z(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;WB(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function rG(e,t,n){return $(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var iG={tokenize:aG};function aG(e){let t=this,n=e.attempt(OV,r,e.attempt(this.parser.constructs.flowInitial,i,$(e,e.attempt(this.parser.constructs.flow,i,e.attempt(eH,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var oG={resolveAll:uG()},sG=lG(`string`),cG=lG(`text`);function lG(e){return{resolveAll:uG(e===`text`?dG:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function uG(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function dG(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var fG=t({attentionMarkers:()=>bG,contentInitial:()=>mG,disable:()=>xG,document:()=>pG,flow:()=>gG,flowInitial:()=>hG,insideSpan:()=>yG,string:()=>_G,text:()=>vG}),pG={42:qH,43:qH,45:qH,48:qH,49:qH,50:qH,51:qH,52:qH,53:qH,54:qH,55:qH,56:qH,57:qH,62:AV},mG={91:lH},hG={[-2]:HV,[-1]:HV,32:HV},gG={35:hH,42:GH,45:[tU,GH],60:bH,61:tU,95:GH,96:zV,126:zV},_G={38:IV,92:PV},vG={[-5]:UH,[-4]:UH,[-3]:UH,33:zH,38:IV,42:SV,60:[EV,DH],91:VH,92:[pH,PV],93:kH,95:SV,96:KV},yG={null:[SV,oG]},bG={null:[42,95]},xG={null:[]};function SG(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=GB(o,e),g(),o[o.length-1]===null?(ee(t,0),l.events=xV(a,l.events,l),l.events):[]}function f(e,t){return wG(p(e),t)}function p(e){return CG(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,w()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){Z(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,w()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){ee(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=te(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function ee(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&WB(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function te(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function CG(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function wG(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
344
|
+
`)),c+=a.move(o),s(),c}function r(e,n,r){let i=e.value||``,a=1;for(t||a++;RegExp(`(^|[^$])`+`\\$`.repeat(a)+`([^$]|$)`).test(i);)a++;let o=`$`.repeat(a);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` `+i+` `);let s=-1;for(;++s<r.unsafe.length;){let e=r.unsafe[s];if(!e.atBreak)continue;let t=r.compilePattern(e),n;for(;n=t.exec(i);){let e=n.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=i.slice(0,e)+` `+i.slice(n.index+1)}}return o+i+o}function i(){return`$`}}var VW={tokenize:UW,concrete:!0,name:`mathFlow`},HW={tokenize:WW,partial:!0};function UW(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){return e.enter(`mathFlow`),e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),c(t)}function c(t){return t===36?(e.consume(t),o++,c):o<2?n(t):(e.exit(`mathFlowFenceSequence`),$(e,l,`whitespace`)(t))}function l(t){return t===null||Z(t)?d(t):(e.enter(`mathFlowFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===null||Z(t)?(e.exit(`chunkString`),e.exit(`mathFlowFenceMeta`),d(t)):t===36?n(t):(e.consume(t),u)}function d(n){return e.exit(`mathFlowFence`),r.interrupt?t(n):e.attempt(HW,f,g)(n)}function f(t){return e.attempt({tokenize:_,partial:!0},g,p)(t)}function p(t){return(a?$(e,m,`linePrefix`,a+1):m)(t)}function m(t){return t===null?g(t):Z(t)?e.attempt(HW,f,g)(t):(e.enter(`mathFlowValue`),h(t))}function h(t){return t===null||Z(t)?(e.exit(`mathFlowValue`),m(t)):(e.consume(t),h)}function g(n){return e.exit(`mathFlow`),t(n)}function _(e,t,n){let i=0;return $(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4);function a(t){return e.enter(`mathFlowFence`),e.enter(`mathFlowFenceSequence`),s(t)}function s(t){return t===36?(i++,e.consume(t),s):i<o?n(t):(e.exit(`mathFlowFenceSequence`),$(e,c,`whitespace`)(t))}function c(r){return r===null||Z(r)?(e.exit(`mathFlowFence`),t(r)):n(r)}}}function WW(e,t,n){let r=this;return i;function i(n){return n===null?t(n):(e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function GW(e){let t=(e||{}).singleDollarTextMath;return t??=!0,{tokenize:n,resolve:KW,previous:qW,name:`mathText`};function n(e,n,r){let i=0,a,o;return s;function s(t){return e.enter(`mathText`),e.enter(`mathTextSequence`),c(t)}function c(n){return n===36?(e.consume(n),i++,c):i<2&&!t?r(n):(e.exit(`mathTextSequence`),l(n))}function l(t){return t===null?r(t):t===36?(o=e.enter(`mathTextSequence`),a=0,d(t)):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),l):Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),l):(e.enter(`mathTextData`),u(t))}function u(t){return t===null||t===32||t===36||Z(t)?(e.exit(`mathTextData`),l(t)):(e.consume(t),u)}function d(t){return t===36?(e.consume(t),a++,d):a===i?(e.exit(`mathTextSequence`),e.exit(`mathText`),n(t)):(o.type=`mathTextData`,u(t))}}}function KW(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===`mathTextData`){e[t][1].type=`mathTextPadding`,e[n][1].type=`mathTextPadding`,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=`mathTextData`,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 qW(e){return e!==36||this.events[this.events.length-1][1].type===`characterEscape`}function JW(e){return{flow:{36:VW},text:{36:GW(e)}}}var YW={};function XW(e){let t=this,n=e||YW,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(JW(n)),a.push(zW()),o.push(BW(n))}var ZW={tokenize:QW};function QW(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),$(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return Z(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var $W={tokenize:tG},eG={tokenize:nG};function tG(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return UB(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(eG,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(eG,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return Z(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;UB(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function nG(e,t,n){return $(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var rG={tokenize:iG};function iG(e){let t=this,n=e.attempt(DV,r,e.attempt(this.parser.constructs.flowInitial,i,$(e,e.attempt(this.parser.constructs.flow,i,e.attempt($V,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var aG={resolveAll:lG()},oG=cG(`string`),sG=cG(`text`);function cG(e){return{resolveAll:lG(e===`text`?uG:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function lG(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function uG(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var dG=t({attentionMarkers:()=>yG,contentInitial:()=>pG,disable:()=>bG,document:()=>fG,flow:()=>hG,flowInitial:()=>mG,insideSpan:()=>vG,string:()=>gG,text:()=>_G}),fG={42:KH,43:KH,45:KH,48:KH,49:KH,50:KH,51:KH,52:KH,53:KH,54:KH,55:KH,56:KH,57:KH,62:kV},pG={91:cH},mG={[-2]:VV,[-1]:VV,32:VV},hG={35:mH,42:WH,45:[eU,WH],60:yH,61:eU,95:WH,96:RV,126:RV},gG={38:FV,92:NV},_G={[-5]:HH,[-4]:HH,[-3]:HH,33:RH,38:FV,42:xV,60:[TV,EH],91:BH,92:[fH,NV],93:OH,95:xV,96:GV},vG={null:[xV,aG]},yG={null:[42,95]},bG={null:[]};function xG(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=WB(o,e),g(),o[o.length-1]===null?(ee(t,0),l.events=bV(a,l.events,l),l.events):[]}function f(e,t){return CG(p(e),t)}function p(e){return SG(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,w()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){Z(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,w()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){ee(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=te(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function ee(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&UB(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function te(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function SG(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function CG(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
345
345
|
`;break;case-3:o=`\r
|
|
346
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function TG(e){let t={constructs:qB([fG,...(e||{}).extensions||[]]),content:n(QW),defined:[],document:n(eG),flow:n(iG),lazy:{},string:n(sG),text:n(cG)};return t;function n(e){return n;function n(n){return SG(t,e,n)}}}function EG(e){for(;!QV(e););return e}var DG=/[\0\t\n\r]/g;function OG(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(DG.lastIndex=u,c=DG.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var kG={}.hasOwnProperty;function AG(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),jG(n)(EG(TG(n).document().write(OG()(e,t,!0))))}function jG(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ke),autolinkProtocol:te,autolinkEmail:te,atxHeading:a(Te),blockQuote:a(xe),characterEscape:te,characterReference:te,codeFenced:a(Se),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Se,o),codeText:a(T,o),codeTextData:te,data:te,codeFlowValue:te,definition:a(Ce),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(we),hardBreakEscape:a(Ee),hardBreakTrailing:a(Ee),htmlFlow:a(De,o),htmlFlowData:te,htmlText:a(De,o),htmlTextData:te,image:a(Oe),label:o,link:a(ke),listItem:a(je),listItemValue:f,listOrdered:a(Ae,d),listUnordered:a(Ae),paragraph:a(Me),reference:me,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Te),strong:a(Ne),thematicBreak:a(Fe)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:be,autolinkProtocol:ye,blockQuote:c(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:_e,characterReference:ve,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:w,codeIndented:c(_),codeText:c(oe),codeTextData:w,data:w,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(re),hardBreakTrailing:c(re),htmlFlow:c(ie),htmlFlowData:w,htmlText:c(ae),htmlTextData:w,image:c(ce),label:ue,labelText:le,lineEnding:ne,link:c(se),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:he,resourceDestinationString:de,resourceTitleString:fe,resource:pe,setextHeading:c(ee),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};NG(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];kG.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||FG).call(a,void 0,e[0])}for(r.position={start:MG(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:MG(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:MG(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||FG).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Pu({start:e.start,end:e.end})+`): it’s not open`);n.position.end=MG(e.end)}function u(){return nL(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=DR(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function ee(){this.data.setextHeadingSlurpLineEnding=void 0}function te(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Pe(),n.position={start:MG(e.start),end:void 0},t.push(n)),this.stack.push(n)}function w(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=MG(e.end)}function ne(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=MG(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(te.call(this,e),w.call(this,e))}function re(){this.data.atHardBreak=!0}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ae(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function oe(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function se(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ce(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function le(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=cB(t),n.identifier=DR(t).toLowerCase()}function ue(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function de(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function fe(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function pe(){this.data.inReference=void 0}function me(){this.data.referenceType=`collapsed`}function he(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=DR(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ge(e){this.data.characterReferenceType=e.type}function _e(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=oB(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=aB(t);let i=this.stack[this.stack.length-1];i.value+=r}function ve(e){let t=this.stack.pop();t.position.end=MG(e.end)}function ye(e){w.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function be(e){w.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function xe(){return{type:`blockquote`,children:[]}}function Se(){return{type:`code`,lang:null,meta:null,value:``}}function T(){return{type:`inlineCode`,value:``}}function Ce(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function we(){return{type:`emphasis`,children:[]}}function Te(){return{type:`heading`,depth:0,children:[]}}function Ee(){return{type:`break`}}function De(){return{type:`html`,value:``}}function Oe(){return{type:`image`,title:null,url:``,alt:null}}function ke(){return{type:`link`,title:null,url:``,children:[]}}function Ae(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function je(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Me(){return{type:`paragraph`,children:[]}}function Ne(){return{type:`strong`,children:[]}}function Pe(){return{type:`text`,value:``}}function Fe(){return{type:`thematicBreak`}}}function MG(e){return{line:e.line,column:e.column,offset:e.offset}}function NG(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?NG(e,r):PG(e,r)}}function PG(e,t){let n;for(n in t)if(kG.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function FG(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Pu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Pu({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Pu({start:t.start,end:t.end})+`) is still open`)}function IG(e){let t=this;t.parser=n;function n(n){return AG(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function LG(){return{enter:{mdxFlowExpression:zG,mdxTextExpression:BG},exit:{mdxFlowExpression:VG,mdxFlowExpressionChunk:HG,mdxTextExpression:VG,mdxTextExpressionChunk:HG}}}function RG(){return{handlers:{mdxFlowExpression:UG,mdxTextExpression:UG},unsafe:[{character:`{`,inConstruct:[`phrasing`]},{atBreak:!0,character:`{`}]}}function zG(e){this.enter({type:`mdxFlowExpression`,value:``},e),this.buffer()}function BG(e){this.enter({type:`mdxTextExpression`,value:``},e),this.buffer()}function VG(e){let t=this.resume(),n=e.estree,r=this.stack[this.stack.length-1];r.type===`mdxFlowExpression`||r.type,this.exit(e),r.value=t,n&&(r.data={estree:n})}function HG(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function UG(e,t,n){let r=e.value||``;return`{`+n.indentLines(r,function(e,t,n){return(t===0||n?``:` `)+e})+`}`}var WG=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),GG={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function KG(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function qG(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function JG(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function YG(e){return JG(e)||KG(e)}var XG=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function ZG(e,t){let n=t||{},r=typeof n.additional==`string`?n.additional.charCodeAt(0):n.additional,i=[],a=0,o=-1,s=``,c,l;n.position&&(`start`in n.position||`indent`in n.position?(l=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,d=(c?c.column:0)||1,f=m(),p;for(a--;++a<=e.length;)if(p===10&&(d=(l?l[o]:0)||1),p=e.charCodeAt(a),p===38){let t=e.charCodeAt(a+1);if(t===9||t===10||t===12||t===32||t===38||t===60||Number.isNaN(t)||r&&t===r){s+=String.fromCharCode(p),d++;continue}let o=a+1,c=o,l=o,u;if(t===35){l=++c;let t=e.charCodeAt(l);t===88||t===120?(u=`hexadecimal`,l=++c):u=`decimal`}else u=`named`;let _=``,v=``,y=``,b=u===`named`?YG:u===`decimal`?KG:qG;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&WG.includes(y)&&(_=y,v=aB(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`?aB(y):!1;e&&(_=y,v=e)}let S=1+l-o,C=``;if(!(!x&&n.nonTerminated===!1))if(!y)u!==`named`&&h(4,S);else if(u===`named`){if(x&&!v)h(5,1);else if(_!==y&&(l=c+_.length,S=1+l-c,x=!1),!x){let t=_?1:3;if(n.attribute){let n=e.charCodeAt(l);n===61?(h(t,S),v=``):YG(n)?v=``:h(t,S)}else h(t,S)}C=v}else{x||h(2,S);let e=Number.parseInt(y,u===`hexadecimal`?16:10);if(QG(e))h(7,S),C=`�`;else if(e in GG)h(6,S),C=GG[e];else{let t=``;$G(e)&&h(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}if(C){g(),f=m(),a=l-1,d+=l-o+1,i.push(C);let t=m();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,C,{start:f,end:t},e.slice(o-1,l)),f=t}else y=e.slice(o-1,l),s+=y,d+=y.length,a=l-1}else p===10&&(u++,o++,d=0),Number.isNaN(p)?g():(s+=String.fromCharCode(p),d++);return i.join(``);function m(){return{line:u,column:d,offset:a+((c?c.offset:0)||0)}}function h(e,t){let r;n.warning&&(r=m(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,XG[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function QG(e){return e>=55296&&e<=57343||e>1114111}function $G(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}var eK=/["&'<>`]/g,tK=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,nK=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,rK=/[|\\{}()[\]^$+*?.]/g,iK=new WeakMap;function aK(e,t){if(e=e.replace(t.subset?oK(t.subset):eK,r),t.subset||t.escapeOnly)return e;return e.replace(tK,n).replace(nK,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function oK(e){let t=iK.get(e);return t||(t=sK(e),iK.set(e,t)),t}function sK(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(rK,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var cK=/[\dA-Fa-f]/;function lK(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!cK.test(String.fromCharCode(t))?r:r+`;`}var uK=/\d/;function dK(e,t,n){let r=`&#`+String(e);return n&&t&&!uK.test(String.fromCharCode(t))?r:r+`;`}var fK={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},pK=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],mK={}.hasOwnProperty,hK={},gK;for(gK in fK)mK.call(fK,gK)&&(hK[fK[gK]]=gK);var _K=/[^\dA-Za-z]/;function vK(e,t,n,r){let i=String.fromCharCode(e);if(mK.call(hK,i)){let e=hK[i],a=`&`+e;return n&&WG.includes(e)&&!pK.includes(e)&&(!r||t&&t!==61&&_K.test(String.fromCharCode(t)))?a:a+`;`}return``}function yK(e,t,n){let r=lK(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=vK(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=dK(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function bK(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function xK(e,t){return aK(e,Object.assign({format:yK},t))}function SK(e,t){return aK(e,Object.assign({format:bK},t))}var CK=` `;function wK(){return{canContainEols:[`mdxJsxTextElement`],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:d,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:o,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:d,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:o},exit:{mdxJsxFlowTagClosingMarker:s,mdxJsxFlowTagNamePrimary:c,mdxJsxFlowTagNameMember:l,mdxJsxFlowTagNameLocal:u,mdxJsxFlowTagExpressionAttribute:p,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:m,mdxJsxFlowTagAttributeNameLocal:h,mdxJsxFlowTagAttributeValueLiteral:g,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:_,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:v,mdxJsxFlowTag:y,mdxJsxTextTagClosingMarker:s,mdxJsxTextTagNamePrimary:c,mdxJsxTextTagNameMember:l,mdxJsxTextTagNameLocal:u,mdxJsxTextTagExpressionAttribute:p,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:m,mdxJsxTextTagAttributeNameLocal:h,mdxJsxTextTagAttributeValueLiteral:g,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:_,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:v,mdxJsxTextTag:y}};function e(){this.buffer()}function t(e){return{line:e.line,column:e.column,offset:e.offset}}function n(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function r(e){let t={name:void 0,attributes:[],close:!1,selfClosing:!1,start:e.start,end:e.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=t,this.buffer()}function i(e){if(this.data.mdxJsxTagStack.length===0)throw new Ru("Unexpected closing slash `/` in tag, expected an open tag first",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-closing-slash`)}function a(e){if(this.data.mdxJsxTag.close)throw new Ru(`Unexpected attribute in closing tag, expected the end of the tag`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-attribute`)}function o(e){if(this.data.mdxJsxTag.close)throw new Ru("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-self-closing-slash`)}function s(){let e=this.data.mdxJsxTag;e.close=!0}function c(e){let t=this.data.mdxJsxTag;t.name=this.sliceSerialize(e)}function l(e){let t=this.data.mdxJsxTag;t.name+=`.`+this.sliceSerialize(e)}function u(e){let t=this.data.mdxJsxTag;t.name+=`:`+this.sliceSerialize(e)}function d(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxAttribute`,name:``,value:null,position:{start:t(e.start),end:void 0}})}function f(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxExpressionAttribute`,value:``,position:{start:t(e.start),end:void 0}}),this.buffer()}function p(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i=e.estree;r.value=this.resume(),r.position,r.position.end=t(e.end),i&&(r.data={estree:i})}function m(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name=this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function h(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name+=`:`+this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function g(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.value=ZG(this.resume(),{nonTerminated:!1}),r.position,r.position.end=t(e.end)}function _(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i={type:`mdxJsxAttributeValueExpression`,value:this.resume()},a=e.estree;a&&(i.data={estree:a}),r.value=i,r.position,r.position.end=t(e.end)}function v(){let e=this.data.mdxJsxTag;e.selfClosing=!0}function y(e){let t=this.data.mdxJsxTag,n=this.data.mdxJsxTagStack,r=n[n.length-1];if(t.close&&r.name!==t.name)throw new Ru("Unexpected closing tag `"+S(t)+"`, expected corresponding closing tag for `"+S(r)+"` ("+Pu(r)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`);this.resume(),t.close?n.pop():this.enter({type:e.type===`mdxJsxTextTag`?`mdxJsxTextElement`:`mdxJsxFlowElement`,name:t.name||null,attributes:t.attributes,children:[]},e,b),t.selfClosing||t.close?this.exit(e,x):n.push(t)}function b(e,t){let n=this.data.mdxJsxTagStack,r=n[n.length-1],i=e?" before the end of `"+e.type+"`":``,a=e?{start:e.start,end:e.end}:void 0;throw new Ru("Expected a closing tag for `"+S(r)+"` ("+Pu({start:t.start,end:t.end})+`)`+i,a,`mdast-util-mdx-jsx:end-tag-mismatch`)}function x(e,t){let n=this.data.mdxJsxTag;throw new Ru("Expected the closing tag `"+S(n)+"` either after the end of `"+t.type+"` ("+Pu(t.end)+") or another opening tag after the start of `"+t.type+"` ("+Pu(t.start)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`)}function S(e){return`<`+(e.close?`/`:``)+(e.name||``)+`>`}}function TK(e){let t=e||{},n=t.quote||`"`,r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,a=t.printWidth||1/0,o=n===`"`?`'`:`"`;if(n!==`"`&&n!==`'`)throw Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return s.peek=kK,{handlers:{mdxJsxFlowElement:s,mdxJsxTextElement:s},unsafe:[{character:`<`,inConstruct:[`phrasing`]},{atBreak:!0,character:`<`}],fences:!0,resourceLink:!0};function s(e,t,s,c){let l=e.type===`mdxJsxFlowElement`,u=e.name?!e.children||e.children.length===0:!1,d=OK(DK(s)),f=s.createTracker(c),p=s.createTracker(c),m=[],h=(l?d:``)+`<`+(e.name||``),g=s.enter(e.type);if(f.move(h),p.move(h),e.attributes&&e.attributes.length>0){if(!e.name)throw Error(`Cannot serialize fragment w/ attributes`);let t=-1;for(;++t<e.attributes.length;){let i=e.attributes[t],a;if(i.type===`mdxJsxExpressionAttribute`)a=`{`+(i.value||``)+`}`;else{if(!i.name)throw Error(`Cannot serialize attribute w/o name`);let e=i.value,t=i.name,s=``;if(e!=null)if(typeof e==`object`)s=`{`+(e.value||``)+`}`;else{let t=r&&JL(e,n)>JL(e,o)?o:n;s=t+SK(e,{subset:[t]})+t}a=t+(s?`=`:``)+s}m.push(a)}}let _=!1,v=m.join(` `);l&&(/\r?\n|\r/.test(v)||f.current().now.column+v.length+(u?i?2:3:1)>a)&&(_=!0);let y=f,b=h;if(_){y=p;let e=-1;for(;++e<m.length;)m[e]=d+CK+m[e];b+=y.move(`
|
|
346
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function wG(e){let t={constructs:KB([dG,...(e||{}).extensions||[]]),content:n(ZW),defined:[],document:n($W),flow:n(rG),lazy:{},string:n(oG),text:n(sG)};return t;function n(e){return n;function n(n){return xG(t,e,n)}}}function TG(e){for(;!ZV(e););return e}var EG=/[\0\t\n\r]/g;function DG(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(EG.lastIndex=u,c=EG.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var OG={}.hasOwnProperty;function kG(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),AG(n)(TG(wG(n).document().write(DG()(e,t,!0))))}function AG(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ke),autolinkProtocol:te,autolinkEmail:te,atxHeading:a(Te),blockQuote:a(xe),characterEscape:te,characterReference:te,codeFenced:a(Se),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(Se,o),codeText:a(T,o),codeTextData:te,data:te,codeFlowValue:te,definition:a(Ce),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(we),hardBreakEscape:a(Ee),hardBreakTrailing:a(Ee),htmlFlow:a(De,o),htmlFlowData:te,htmlText:a(De,o),htmlTextData:te,image:a(Oe),label:o,link:a(ke),listItem:a(je),listItemValue:f,listOrdered:a(Ae,d),listUnordered:a(Ae),paragraph:a(Me),reference:me,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Te),strong:a(Ne),thematicBreak:a(Fe)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:be,autolinkProtocol:ye,blockQuote:c(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:_e,characterReference:ve,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:w,codeIndented:c(_),codeText:c(oe),codeTextData:w,data:w,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(re),hardBreakTrailing:c(re),htmlFlow:c(ie),htmlFlowData:w,htmlText:c(ae),htmlTextData:w,image:c(ce),label:ue,labelText:le,lineEnding:ne,link:c(se),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:he,resourceDestinationString:de,resourceTitleString:fe,resource:pe,setextHeading:c(ee),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};MG(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];OG.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||PG).call(a,void 0,e[0])}for(r.position={start:jG(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:jG(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:jG(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||PG).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Pu({start:e.start,end:e.end})+`): it’s not open`);n.position.end=jG(e.end)}function u(){return tL(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ER(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function ee(){this.data.setextHeadingSlurpLineEnding=void 0}function te(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Pe(),n.position={start:jG(e.start),end:void 0},t.push(n)),this.stack.push(n)}function w(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=jG(e.end)}function ne(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=jG(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(te.call(this,e),w.call(this,e))}function re(){this.data.atHardBreak=!0}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ae(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function oe(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function se(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ce(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function le(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=sB(t),n.identifier=ER(t).toLowerCase()}function ue(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function de(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function fe(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function pe(){this.data.inReference=void 0}function me(){this.data.referenceType=`collapsed`}function he(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ER(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ge(e){this.data.characterReferenceType=e.type}function _e(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=aB(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=iB(t);let i=this.stack[this.stack.length-1];i.value+=r}function ve(e){let t=this.stack.pop();t.position.end=jG(e.end)}function ye(e){w.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function be(e){w.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function xe(){return{type:`blockquote`,children:[]}}function Se(){return{type:`code`,lang:null,meta:null,value:``}}function T(){return{type:`inlineCode`,value:``}}function Ce(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function we(){return{type:`emphasis`,children:[]}}function Te(){return{type:`heading`,depth:0,children:[]}}function Ee(){return{type:`break`}}function De(){return{type:`html`,value:``}}function Oe(){return{type:`image`,title:null,url:``,alt:null}}function ke(){return{type:`link`,title:null,url:``,children:[]}}function Ae(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function je(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Me(){return{type:`paragraph`,children:[]}}function Ne(){return{type:`strong`,children:[]}}function Pe(){return{type:`text`,value:``}}function Fe(){return{type:`thematicBreak`}}}function jG(e){return{line:e.line,column:e.column,offset:e.offset}}function MG(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?MG(e,r):NG(e,r)}}function NG(e,t){let n;for(n in t)if(OG.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function PG(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Pu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Pu({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Pu({start:t.start,end:t.end})+`) is still open`)}function FG(e){let t=this;t.parser=n;function n(n){return kG(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function IG(){return{enter:{mdxFlowExpression:RG,mdxTextExpression:zG},exit:{mdxFlowExpression:BG,mdxFlowExpressionChunk:VG,mdxTextExpression:BG,mdxTextExpressionChunk:VG}}}function LG(){return{handlers:{mdxFlowExpression:HG,mdxTextExpression:HG},unsafe:[{character:`{`,inConstruct:[`phrasing`]},{atBreak:!0,character:`{`}]}}function RG(e){this.enter({type:`mdxFlowExpression`,value:``},e),this.buffer()}function zG(e){this.enter({type:`mdxTextExpression`,value:``},e),this.buffer()}function BG(e){let t=this.resume(),n=e.estree,r=this.stack[this.stack.length-1];r.type===`mdxFlowExpression`||r.type,this.exit(e),r.value=t,n&&(r.data={estree:n})}function VG(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function HG(e,t,n){let r=e.value||``;return`{`+n.indentLines(r,function(e,t,n){return(t===0||n?``:` `)+e})+`}`}var UG=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),WG={0:`�`,128:`€`,130:`‚`,131:`ƒ`,132:`„`,133:`…`,134:`†`,135:`‡`,136:`ˆ`,137:`‰`,138:`Š`,139:`‹`,140:`Œ`,142:`Ž`,145:`‘`,146:`’`,147:`“`,148:`”`,149:`•`,150:`–`,151:`—`,152:`˜`,153:`™`,154:`š`,155:`›`,156:`œ`,158:`ž`,159:`Ÿ`};function GG(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=48&&t<=57}function KG(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function qG(e){let t=typeof e==`string`?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function JG(e){return qG(e)||GG(e)}var YG=[``,`Named character references must be terminated by a semicolon`,`Numeric character references must be terminated by a semicolon`,`Named character references cannot be empty`,`Numeric character references cannot be empty`,`Named character references must be known`,`Numeric character references cannot be disallowed`,`Numeric character references cannot be outside the permissible Unicode range`];function XG(e,t){let n=t||{},r=typeof n.additional==`string`?n.additional.charCodeAt(0):n.additional,i=[],a=0,o=-1,s=``,c,l;n.position&&(`start`in n.position||`indent`in n.position?(l=n.position.indent,c=n.position.start):c=n.position);let u=(c?c.line:0)||1,d=(c?c.column:0)||1,f=m(),p;for(a--;++a<=e.length;)if(p===10&&(d=(l?l[o]:0)||1),p=e.charCodeAt(a),p===38){let t=e.charCodeAt(a+1);if(t===9||t===10||t===12||t===32||t===38||t===60||Number.isNaN(t)||r&&t===r){s+=String.fromCharCode(p),d++;continue}let o=a+1,c=o,l=o,u;if(t===35){l=++c;let t=e.charCodeAt(l);t===88||t===120?(u=`hexadecimal`,l=++c):u=`decimal`}else u=`named`;let _=``,v=``,y=``,b=u===`named`?JG:u===`decimal`?GG:KG;for(l--;++l<=e.length;){let t=e.charCodeAt(l);if(!b(t))break;y+=String.fromCharCode(t),u===`named`&&UG.includes(y)&&(_=y,v=iB(y))}let x=e.charCodeAt(l)===59;if(x){l++;let e=u===`named`?iB(y):!1;e&&(_=y,v=e)}let S=1+l-o,C=``;if(!(!x&&n.nonTerminated===!1))if(!y)u!==`named`&&h(4,S);else if(u===`named`){if(x&&!v)h(5,1);else if(_!==y&&(l=c+_.length,S=1+l-c,x=!1),!x){let t=_?1:3;if(n.attribute){let n=e.charCodeAt(l);n===61?(h(t,S),v=``):JG(n)?v=``:h(t,S)}else h(t,S)}C=v}else{x||h(2,S);let e=Number.parseInt(y,u===`hexadecimal`?16:10);if(ZG(e))h(7,S),C=`�`;else if(e in WG)h(6,S),C=WG[e];else{let t=``;QG(e)&&h(6,S),e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10|55296),e=56320|e&1023),C=t+String.fromCharCode(e)}}if(C){g(),f=m(),a=l-1,d+=l-o+1,i.push(C);let t=m();t.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,C,{start:f,end:t},e.slice(o-1,l)),f=t}else y=e.slice(o-1,l),s+=y,d+=y.length,a=l-1}else p===10&&(u++,o++,d=0),Number.isNaN(p)?g():(s+=String.fromCharCode(p),d++);return i.join(``);function m(){return{line:u,column:d,offset:a+((c?c.offset:0)||0)}}function h(e,t){let r;n.warning&&(r=m(),r.column+=t,r.offset+=t,n.warning.call(n.warningContext||void 0,YG[e],r,e))}function g(){s&&=(i.push(s),n.text&&n.text.call(n.textContext||void 0,s,{start:f,end:m()}),``)}}function ZG(e){return e>=55296&&e<=57343||e>1114111}function QG(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)==65535||(e&65535)==65534}var $G=/["&'<>`]/g,eK=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,tK=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,nK=/[|\\{}()[\]^$+*?.]/g,rK=new WeakMap;function iK(e,t){if(e=e.replace(t.subset?aK(t.subset):$G,r),t.subset||t.escapeOnly)return e;return e.replace(eK,n).replace(tK,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function aK(e){let t=rK.get(e);return t||(t=oK(e),rK.set(e,t)),t}function oK(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(nK,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var sK=/[\dA-Fa-f]/;function cK(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!sK.test(String.fromCharCode(t))?r:r+`;`}var lK=/\d/;function uK(e,t,n){let r=`&#`+String(e);return n&&t&&!lK.test(String.fromCharCode(t))?r:r+`;`}var dK={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},fK=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],pK={}.hasOwnProperty,mK={},hK;for(hK in dK)pK.call(dK,hK)&&(mK[dK[hK]]=hK);var gK=/[^\dA-Za-z]/;function _K(e,t,n,r){let i=String.fromCharCode(e);if(pK.call(mK,i)){let e=mK[i],a=`&`+e;return n&&UG.includes(e)&&!fK.includes(e)&&(!r||t&&t!==61&&gK.test(String.fromCharCode(t)))?a:a+`;`}return``}function vK(e,t,n){let r=cK(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=_K(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=uK(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function yK(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function bK(e,t){return iK(e,Object.assign({format:vK},t))}function xK(e,t){return iK(e,Object.assign({format:yK},t))}var SK=` `;function CK(){return{canContainEols:[`mdxJsxTextElement`],enter:{mdxJsxFlowTag:r,mdxJsxFlowTagClosingMarker:i,mdxJsxFlowTagAttribute:d,mdxJsxFlowTagExpressionAttribute:f,mdxJsxFlowTagAttributeValueLiteral:e,mdxJsxFlowTagAttributeValueExpression:e,mdxJsxFlowTagSelfClosingMarker:o,mdxJsxTextTag:r,mdxJsxTextTagClosingMarker:i,mdxJsxTextTagAttribute:d,mdxJsxTextTagExpressionAttribute:f,mdxJsxTextTagAttributeValueLiteral:e,mdxJsxTextTagAttributeValueExpression:e,mdxJsxTextTagSelfClosingMarker:o},exit:{mdxJsxFlowTagClosingMarker:s,mdxJsxFlowTagNamePrimary:c,mdxJsxFlowTagNameMember:l,mdxJsxFlowTagNameLocal:u,mdxJsxFlowTagExpressionAttribute:p,mdxJsxFlowTagExpressionAttributeValue:n,mdxJsxFlowTagAttributeNamePrimary:m,mdxJsxFlowTagAttributeNameLocal:h,mdxJsxFlowTagAttributeValueLiteral:g,mdxJsxFlowTagAttributeValueLiteralValue:n,mdxJsxFlowTagAttributeValueExpression:_,mdxJsxFlowTagAttributeValueExpressionValue:n,mdxJsxFlowTagSelfClosingMarker:v,mdxJsxFlowTag:y,mdxJsxTextTagClosingMarker:s,mdxJsxTextTagNamePrimary:c,mdxJsxTextTagNameMember:l,mdxJsxTextTagNameLocal:u,mdxJsxTextTagExpressionAttribute:p,mdxJsxTextTagExpressionAttributeValue:n,mdxJsxTextTagAttributeNamePrimary:m,mdxJsxTextTagAttributeNameLocal:h,mdxJsxTextTagAttributeValueLiteral:g,mdxJsxTextTagAttributeValueLiteralValue:n,mdxJsxTextTagAttributeValueExpression:_,mdxJsxTextTagAttributeValueExpressionValue:n,mdxJsxTextTagSelfClosingMarker:v,mdxJsxTextTag:y}};function e(){this.buffer()}function t(e){return{line:e.line,column:e.column,offset:e.offset}}function n(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function r(e){let t={name:void 0,attributes:[],close:!1,selfClosing:!1,start:e.start,end:e.end};this.data.mdxJsxTagStack||(this.data.mdxJsxTagStack=[]),this.data.mdxJsxTag=t,this.buffer()}function i(e){if(this.data.mdxJsxTagStack.length===0)throw new Ru("Unexpected closing slash `/` in tag, expected an open tag first",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-closing-slash`)}function a(e){if(this.data.mdxJsxTag.close)throw new Ru(`Unexpected attribute in closing tag, expected the end of the tag`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-attribute`)}function o(e){if(this.data.mdxJsxTag.close)throw new Ru("Unexpected self-closing slash `/` in closing tag, expected the end of the tag",{start:e.start,end:e.end},`mdast-util-mdx-jsx:unexpected-self-closing-slash`)}function s(){let e=this.data.mdxJsxTag;e.close=!0}function c(e){let t=this.data.mdxJsxTag;t.name=this.sliceSerialize(e)}function l(e){let t=this.data.mdxJsxTag;t.name+=`.`+this.sliceSerialize(e)}function u(e){let t=this.data.mdxJsxTag;t.name+=`:`+this.sliceSerialize(e)}function d(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxAttribute`,name:``,value:null,position:{start:t(e.start),end:void 0}})}function f(e){let n=this.data.mdxJsxTag;a.call(this,e),n.attributes.push({type:`mdxJsxExpressionAttribute`,value:``,position:{start:t(e.start),end:void 0}}),this.buffer()}function p(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i=e.estree;r.value=this.resume(),r.position,r.position.end=t(e.end),i&&(r.data={estree:i})}function m(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name=this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function h(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type,r.name+=`:`+this.sliceSerialize(e),r.position,r.position.end=t(e.end)}function g(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.value=XG(this.resume(),{nonTerminated:!1}),r.position,r.position.end=t(e.end)}function _(e){let n=this.data.mdxJsxTag,r=n.attributes[n.attributes.length-1];r.type;let i={type:`mdxJsxAttributeValueExpression`,value:this.resume()},a=e.estree;a&&(i.data={estree:a}),r.value=i,r.position,r.position.end=t(e.end)}function v(){let e=this.data.mdxJsxTag;e.selfClosing=!0}function y(e){let t=this.data.mdxJsxTag,n=this.data.mdxJsxTagStack,r=n[n.length-1];if(t.close&&r.name!==t.name)throw new Ru("Unexpected closing tag `"+S(t)+"`, expected corresponding closing tag for `"+S(r)+"` ("+Pu(r)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`);this.resume(),t.close?n.pop():this.enter({type:e.type===`mdxJsxTextTag`?`mdxJsxTextElement`:`mdxJsxFlowElement`,name:t.name||null,attributes:t.attributes,children:[]},e,b),t.selfClosing||t.close?this.exit(e,x):n.push(t)}function b(e,t){let n=this.data.mdxJsxTagStack,r=n[n.length-1],i=e?" before the end of `"+e.type+"`":``,a=e?{start:e.start,end:e.end}:void 0;throw new Ru("Expected a closing tag for `"+S(r)+"` ("+Pu({start:t.start,end:t.end})+`)`+i,a,`mdast-util-mdx-jsx:end-tag-mismatch`)}function x(e,t){let n=this.data.mdxJsxTag;throw new Ru("Expected the closing tag `"+S(n)+"` either after the end of `"+t.type+"` ("+Pu(t.end)+") or another opening tag after the start of `"+t.type+"` ("+Pu(t.start)+`)`,{start:e.start,end:e.end},`mdast-util-mdx-jsx:end-tag-mismatch`)}function S(e){return`<`+(e.close?`/`:``)+(e.name||``)+`>`}}function wK(e){let t=e||{},n=t.quote||`"`,r=t.quoteSmart||!1,i=t.tightSelfClosing||!1,a=t.printWidth||1/0,o=n===`"`?`'`:`"`;if(n!==`"`&&n!==`'`)throw Error("Cannot serialize attribute values with `"+n+"` for `options.quote`, expected `\"`, or `'`");return s.peek=OK,{handlers:{mdxJsxFlowElement:s,mdxJsxTextElement:s},unsafe:[{character:`<`,inConstruct:[`phrasing`]},{atBreak:!0,character:`<`}],fences:!0,resourceLink:!0};function s(e,t,s,c){let l=e.type===`mdxJsxFlowElement`,u=e.name?!e.children||e.children.length===0:!1,d=DK(EK(s)),f=s.createTracker(c),p=s.createTracker(c),m=[],h=(l?d:``)+`<`+(e.name||``),g=s.enter(e.type);if(f.move(h),p.move(h),e.attributes&&e.attributes.length>0){if(!e.name)throw Error(`Cannot serialize fragment w/ attributes`);let t=-1;for(;++t<e.attributes.length;){let i=e.attributes[t],a;if(i.type===`mdxJsxExpressionAttribute`)a=`{`+(i.value||``)+`}`;else{if(!i.name)throw Error(`Cannot serialize attribute w/o name`);let e=i.value,t=i.name,s=``;if(e!=null)if(typeof e==`object`)s=`{`+(e.value||``)+`}`;else{let t=r&&qL(e,n)>qL(e,o)?o:n;s=t+xK(e,{subset:[t]})+t}a=t+(s?`=`:``)+s}m.push(a)}}let _=!1,v=m.join(` `);l&&(/\r?\n|\r/.test(v)||f.current().now.column+v.length+(u?i?2:3:1)>a)&&(_=!0);let y=f,b=h;if(_){y=p;let e=-1;for(;++e<m.length;)m[e]=d+SK+m[e];b+=y.move(`
|
|
347
347
|
`+m.join(`
|
|
348
348
|
`)+`
|
|
349
349
|
`+d)}else v&&(b+=y.move(` `+v));return u&&(b+=y.move((i||_?``:` `)+`/`)),b+=y.move(`>`),e.children&&e.children.length>0&&(e.type===`mdxJsxTextElement`?b+=y.move(s.containerPhrasing(e,{...y.current(),before:`>`,after:`<`})):(y.shift(2),b+=y.move(`
|
|
350
|
-
`),b+=y.move(
|
|
351
|
-
`))),u||(b+=y.move((l?d:``)+`</`+(e.name||``)+`>`)),g(),b}}function
|
|
350
|
+
`),b+=y.move(TK(e,s,y.current())),b+=y.move(`
|
|
351
|
+
`))),u||(b+=y.move((l?d:``)+`</`+(e.name||``)+`>`)),g(),b}}function TK(e,t,n){let r=t.indexStack,i=e.children,a=t.createTracker(n),o=DK(EK(t)),s=[],c=-1;for(r.push(-1);++c<i.length;){let n=i[c];r[r.length-1]=c;let l={before:`
|
|
352
352
|
`,after:`
|
|
353
353
|
`,...a.current()},u=t.handle(n,e,t,l),d=n.type===`mdxJsxFlowElement`?u:t.indentLines(u,function(e,t,n){return(n?``:o)+e});s.push(a.move(d)),n.type!==`list`&&(t.bulletLastUsed=void 0),c<i.length-1&&s.push(a.move(`
|
|
354
354
|
|
|
355
|
-
`))}return r.pop(),s.join(``)}function
|
|
355
|
+
`))}return r.pop(),s.join(``)}function EK(e){let t=0,n=e.stack.length;for(;--n>-1;){let r=e.stack[n];if(r===`blockquote`||r===`listItem`)break;r===`mdxJsxFlowElement`&&t++}return t}function DK(e){return SK.repeat(e)}function OK(){return`<`}function kK(){return{enter:{mdxjsEsm:jK},exit:{mdxjsEsm:MK,mdxjsEsmData:NK}}}function AK(){return{handlers:{mdxjsEsm:PK}}}function jK(e){this.enter({type:`mdxjsEsm`,value:``},e),this.buffer()}function MK(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,this.exit(e);let r=e.estree;n.value=t,r&&(n.data={estree:r})}function NK(e){this.config.enter.data.call(this,e),this.config.exit.data.call(this,e)}function PK(e){return e.value||``}function FK(){return[IG(),CK(),kK()]}function IK(e){return{extensions:[LG(),wK(e),AK()]}}function LK(e){return e}var RK={}.hasOwnProperty,zK=Symbol(`continue`),BK=Symbol(`exit`),VK=Symbol(`skip`);function HK(e,t){let n,r;typeof t==`function`?n=t:t&&typeof t==`object`&&(t.enter&&(n=t.enter),t.leave&&(r=t.leave)),i(e,void 0,void 0,[])();function i(e,t,a,o){return WK(e)&&(s.displayName=`node (`+LK(e.type)+`)`),s;function s(){let s=n?UK(n(e,t,a,o)):[];if(s[0]===BK)return s;if(s[0]!==VK){let t;for(t in e)if(RK.call(e,t)&&e[t]&&typeof e[t]==`object`&&t!==`data`&&t!==`position`){let n=o.concat(e),r=e[t];if(Array.isArray(r)){let e=r,a=0;for(;a>-1&&a<e.length;){let r=e[a];if(WK(r)){let e=i(r,t,a,n)();if(e[0]===BK)return e;a=typeof e[1]==`number`?e[1]:a+1}else a++}}else if(WK(r)){let e=i(r,t,void 0,n)();if(e[0]===BK)return e}}}return r?UK(r(e,t,a,o)):s}}}function UK(e){return Array.isArray(e)?e:typeof e==`number`?[zK,e]:[e]}function WK(e){return!!(e&&typeof e==`object`&&`type`in e&&typeof e.type==`string`&&e.type.length>0)}function GK(e,t){let n=t.prefix||``,r=t.suffix||``,i=Object.assign({},t.acornOptions),a=[],o=[],s=i.onComment,c=i.onToken,l=!1,u,d,f=Object.assign({},i,{onComment:a,preserveParens:!0});c&&(f.onToken=o);let p=qK(e,t.tokenTypes),m=p.value,h=n+m+r,g=t.expression&&KK(m);if(g&&!t.allowEmpty)throw new Ru(`Unexpected empty expression`,{place:v(0),ruleId:`unexpected-empty-expression`,source:`micromark-extension-mdx-expression`});try{u=t.expression&&!g?t.acorn.parseExpressionAt(h,0,f):t.acorn.parse(h,f)}catch(e){let t=e,r=v(t.pos);t.message=String(t.message).replace(/ \(\d+:\d+\)$/,``),t.pos=r.offset,t.loc={line:r.line,column:r.column-1},d=t,l=t.raisedAt>=n.length+m.length||t.message===`Unterminated comment`}if(u&&t.expression&&!g)if(KK(h.slice(u.end,h.length-r.length)))u={type:`Program`,start:0,end:n.length+m.length,body:[{type:`ExpressionStatement`,expression:u,start:0,end:n.length+m.length}],sourceType:`module`,comments:[]};else{let e=v(u.end),t=Error(`Unexpected content after expression`);t.pos=e.offset,t.loc={line:e.line,column:e.column-1},d=t,u=void 0}if(u){if(u.comments=a,HK(u,function(e,t,n,r){let i=r[r.length-1],a=t;e.type===`ParenthesizedExpression`&&i&&a&&(typeof n==`number`&&(i=i[a],a=n),i[a]=e.expression),_(e)}),Array.isArray(s))s.push(...a);else if(typeof s==`function`)for(let e of a)s(e.type===`Block`,e.value,e.start,e.end,e.loc.start,e.loc.end);for(let e of o)e.end<=n.length||e.start-n.length>=m.length||(_(e),Array.isArray(c)?c.push(e):c(e))}return{estree:u,error:d,swallow:l};function _(e){let t=v(e.start),n=v(e.end);e.start=t.offset,e.end=n.offset,e.loc={start:{line:t.line,column:t.column-1,offset:t.offset},end:{line:n.line,column:n.column-1,offset:n.offset}},e.range=[e.start,e.end]}function v(e){let r=e-n.length;r<0?r=0:r>m.length&&(r=m.length);let i=JK(p.stops,r);return i||={line:t.start.line,column:t.start.column,offset:t.start.offset},i}}function KK(e){return/^\s*$/.test(e.replace(/\/\*[\s\S]*?\*\//g,``).replace(/\/\/[^\r\n]*(\r\n|\n|\r)/g,``))}function qK(e,t){let n={value:``,stops:[]},r=-1;for(;++r<e.length;){let i=e[r];if(i[0]===`enter`){let e=i[1].type;if(e===`lineEnding`||t.includes(e)){let e=i[2].sliceStream(i[1]);for(;e.length>0&&e[0]===-1;)e.shift();let t=YK(e);n.stops.push([n.value.length,i[1].start]),n.value+=t,n.stops.push([n.value.length,i[1].end])}}}return n}function JK(e,t){let n=0;for(;n<e.length&&e[n][0]<=t;)n+=1;if(n===0)return;let[r,i]=e[n-1],a=t-r;return{line:i.line,column:i.column+a,offset:i.offset+a}}function YK(e){let t=-1,n=[],r;for(;++t<e.length;){let i=e[t],a;if(typeof i==`string`)a=i;else switch(i){case-5:a=`\r`;break;case-4:a=`
|
|
356
356
|
`;break;case-3:a=`\r
|
|
357
|
-
`;break;case-2:a=` `;break;case-1:if(r)continue;a=` `;break;default:a=String.fromCharCode(i)}r=i===-2,n.push(a)}return n.join(``)}function ZK(e){let t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=QK(n.start,r[0]||t.start),a=QK(n.end,r[1]||t.end);if(i&&a)return{start:i,end:a}}function QK(e,t){if(e&&typeof e==`object`){let n=`line`in e?$K(e.line):void 0,r=`column`in e?$K(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:$K(t)}}}function $K(e){return typeof e==`number`&&e>-1?e:void 0}var eq=2,tq=`https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression`,nq=`#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-`,rq=`#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed`,iq=`#unexpected-type-in-code-expected-an-object-spread-spread`,aq=`#unexpected-extra-content-in-spread-only-a-single-spread-is-supported`,oq=`#could-not-parse-expression-with-acorn`;function sq(e,t,n,r,i,a,o,s,c,l,u){let d=this,f=this.events.length+3,p=0,m,h;return g;function g(t){return e.enter(n),e.enter(r),e.consume(t),e.exit(r),m=d.now(),_}function _(u){if(u===null){if(h)throw h;let e=new Ru("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:d.now(),ruleId:`unexpected-eof`,source:`micromark-extension-mdx-expression`});throw e.url=tq+nq,e}if(Z(u))return e.enter(`lineEnding`),e.consume(u),e.exit(`lineEnding`),y;if(u===125&&p===0){let p=a?cq.call(d,a,o,i,f,m,l||!1,c||!1):{type:`ok`,estree:void 0};if(p.type===`ok`){e.enter(r),e.consume(u),e.exit(r);let i=e.exit(n);return s&&p.estree&&Object.assign(i,{estree:p.estree}),t}return h=p.message,e.enter(i),e.consume(u),v}return e.enter(i),v(u)}function v(t){return t===125&&p===0||t===null||Z(t)?(e.exit(i),_(t)):(t===123&&!a?p+=1:t===125&&--p,e.consume(t),v)}function y(t){let n=d.now();if(n.line!==m.line&&!u&&d.parser.lazy[n.line]){let e=new Ru("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:d.now(),ruleId:`unexpected-lazy`,source:`micromark-extension-mdx-expression`});throw e.url=tq+rq,e}return Q(t)?$(e,_,`linePrefix`,eq+1)(t):_(t)}}function cq(e,t,n,r,i,a,o){let s=KK(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:a,prefix:o?`({`:``,suffix:o?`})`:``}),c=s.estree;if(o&&c){let e=c.body[0];if(e.type!==`ExpressionStatement`||e.expression.type!==`ObjectExpression`){let t=ZK(e),n=new Ru("Unexpected `"+e.type+"` in code: expected an object spread (`{...spread}`)",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=tq+iq,n}if(e.expression.properties[1]){let t=new Ru(`Unexpected extra content in spread: only a single spread is supported`,{place:ZK(e.expression.properties[1]).start,ruleId:`spread-extra`,source:`micromark-extension-mdx-expression`});throw t.url=tq+aq,t}if(e.expression.properties[0]&&e.expression.properties[0].type!==`SpreadElement`){let t=ZK(e.expression.properties[0]),n=new Ru("Unexpected `"+e.expression.properties[0].type+"` in code: only spread elements are supported",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=tq+iq,n}}if(s.error){let e=new Ru(`Could not parse expression with acorn`,{cause:s.error,place:{line:s.error.loc.line,column:s.error.loc.column+1,offset:s.error.pos},ruleId:`acorn`,source:`micromark-extension-mdx-expression`});return e.url=tq+oq,{type:`nok`,message:e}}return{type:`ok`,estree:c}}function lq(e){let t=e||{},n=t.addResult,r=t.acorn,i=t.spread,a=t.allowEmpty,o;if(a??=!0,r){if(!r.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");o=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions)}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:`mdxFlowExpression`,tokenize:s,concrete:!0}},text:{123:{name:`mdxTextExpression`,tokenize:c}}};function s(e,t,s){let c=this;return l;function l(e){return u(e)}function u(t){return sq.call(c,e,d,`mdxFlowExpression`,`mdxFlowExpressionMarker`,`mdxFlowExpressionChunk`,r,o,n,i,a)(t)}function d(t){return Q(t)?$(e,f,`whitespace`)(t):f(t)}function f(n){let r=c.parser.constructs.flow[60],i=(Array.isArray(r)?r:r?[r]:[]).find(function(e){return e.name===`mdxJsxFlowTag`});return n===60&&i?e.attempt(i,f,s)(n):n===null||Z(n)?t(n):s(n)}}function c(e,t){let s=this;return c;function c(c){return sq.call(s,e,t,`mdxTextExpression`,`mdxTextExpressionMarker`,`mdxTextExpressionChunk`,r,o,n,i,a,!0)(c)}}}var uq=/[$_\p{ID_Start}]/u,dq=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,fq=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,pq={};function mq(e){return e?uq.test(String.fromCodePoint(e)):!1}function hq(e,t){let n=(t||pq).jsx?fq:dq;return e?n.test(String.fromCodePoint(e)):!1}var gq=`https://github.com/micromark/micromark-extension-mdx-jsx`;function _q(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,ee,te,w,ne,re,ie,ae,oe){let se=this,ce,le;return ue;function ue(t){return e.enter(s),e.enter(c),e.consume(t),e.exit(c),de}function de(e){return nR(e)?n(e):(ce=fe,Pe(e))}function fe(t){if(t===47)return e.enter(l),e.consume(t),e.exit(l),ce=pe,Pe;if(t===62)return Ne(t);if(t!==null&&t>=0&&mq(t))return e.enter(d),e.enter(f),e.consume(t),me;Le(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===33?" (note: to create a comment in MDX, use `{/* text */}`)":``))}function pe(t){if(t===62)return Ne(t);if(t!==null&&t>=0&&mq(t))return e.enter(d),e.enter(f),e.consume(t),me;Le(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===42||t===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function me(t){if(t!==null&&t>=0&&hq(t,{jsx:!0}))return e.consume(t),me;if(t===46||t===47||t===58||t===62||t===123||nR(t)||iR(t))return e.exit(f),ce=he,Pe(t);Le(t,`in name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function he(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),ce=ge,Pe;if(t===58)return e.enter(h),e.consume(t),e.exit(h),ce=ye,Pe;if(t===47||t===62||t===123||t!==null&&t>=0&&mq(t))return e.exit(d),Se(t);Le(t,`after name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ge(t){if(t!==null&&t>=0&&mq(t))return e.enter(m),e.consume(t),_e;Le(t,`before member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function _e(t){if(t!==null&&t>=0&&hq(t,{jsx:!0}))return e.consume(t),_e;if(t===46||t===47||t===62||t===123||nR(t)||iR(t))return e.exit(m),ce=ve,Pe(t);Le(t,`in member name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function ve(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),ce=ge,Pe;if(t===47||t===62||t===123||t!==null&&t>=0&&mq(t))return e.exit(d),Se(t);Le(t,`after member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ye(t){if(t!==null&&t>=0&&mq(t))return e.enter(g),e.consume(t),be;Le(t,`before local name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===43||t!==null&&t>46&&t<58?" (note: to create a link in MDX, use `[text](url)`)":``))}function be(t){if(t!==null&&t>=0&&hq(t,{jsx:!0}))return e.consume(t),be;if(t===47||t===62||t===123||nR(t)||iR(t))return e.exit(g),ce=xe,Pe(t);Le(t,`in local name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function xe(t){if(t===47||t===62||t===123||t!==null&&t>=0&&mq(t))return e.exit(d),Se(t);Le(t,`after local name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Se(t){if(t===47)return e.enter(u),e.consume(t),e.exit(u),ce=Me,Pe;if(t===62)return Ne(t);if(t===123)return sq.call(se,e,T,_,v,y,r,i,a,!0,!1,o)(t);if(t!==null&&t>=0&&mq(t))return e.enter(b),e.enter(x),e.enter(S),e.consume(t),Ce;Le(t,`before attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function T(e){return ce=Se,Pe(e)}function Ce(t){if(t!==null&&t>=0&&hq(t,{jsx:!0}))return e.consume(t),Ce;if(t===47||t===58||t===61||t===62||t===123||nR(t)||iR(t))return e.exit(S),ce=we,Pe(t);Le(t,`in attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function we(t){if(t===58)return e.enter(C),e.consume(t),e.exit(C),ce=Te,Pe;if(t===61)return e.exit(x),e.enter(te),e.consume(t),e.exit(te),ce=Oe,Pe;if(t===47||t===62||t===123||nR(t)||iR(t)||t!==null&&t>=0&&mq(t))return e.exit(x),e.exit(b),ce=Se,Pe(t);Le(t,`after attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Te(t){if(t!==null&&t>=0&&mq(t))return e.enter(ee),e.consume(t),Ee;Le(t,`before local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ee(t){if(t!==null&&t>=0&&hq(t,{jsx:!0}))return e.consume(t),Ee;if(t===47||t===61||t===62||t===123||nR(t)||iR(t))return e.exit(ee),e.exit(x),ce=De,Pe(t);Le(t,`in local attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function De(t){if(t===61)return e.enter(te),e.consume(t),e.exit(te),ce=Oe,Pe;if(t===47||t===62||t===123||t!==null&&t>=0&&mq(t))return e.exit(b),Se(t);Le(t,`after local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Oe(t){if(t===34||t===39)return e.enter(w),e.enter(ne),e.consume(t),e.exit(ne),le=t,Ae;if(t===123)return sq.call(se,e,ke,ie,ae,oe,r,i,a,!1,!1,o)(t);Le(t,`before attribute value`,"a character that can start an attribute value, such as `\"`, `'`, or `{`"+(t===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":``))}function ke(t){return e.exit(b),ce=Se,Pe(t)}function Ae(t){return t===null&&Le(t,`in attribute value`,"a corresponding closing quote `"+String.fromCodePoint(le)+"`"),t===le?(e.enter(ne),e.consume(t),e.exit(ne),e.exit(w),e.exit(b),le=void 0,ce=Se,Pe):Z(t)?(ce=Ae,Pe(t)):(e.enter(re),je(t))}function je(t){return t===null||t===le||Z(t)?(e.exit(re),Ae(t)):(e.consume(t),je)}function Me(e){if(e===62)return Ne(e);Le(e,`after self-closing slash`,"`>` to end the tag"+(e===42||e===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function Ne(n){return e.enter(c),e.consume(n),e.exit(c),e.exit(s),t}function Pe(t){return Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Ie):Q(t)||iR(t)?(e.enter(`esWhitespace`),Fe(t)):ce(t)}function Fe(t){return Z(t)?(e.exit(`esWhitespace`),Pe(t)):Q(t)||iR(t)?(e.consume(t),Fe):(e.exit(`esWhitespace`),ce(t))}function Ie(e){if(!o&&se.parser.lazy[se.now().line]){let e=new Ru("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",se.now(),`micromark-extension-mdx-jsx:unexpected-lazy`);throw e.url=gq+`#unexpected-lazy-line-in-container-expected-line-to-be`,e}return Pe(e)}function Le(e,t,n){let r=new Ru(`Unexpected `+(e===null?`end of file`:"character `"+(e===96?"` ` `":String.fromCodePoint(e))+"` ("+vq(e)+`)`)+` `+t+`, expected `+n,se.now(),`micromark-extension-mdx-jsx:unexpected-`+(e===null?`eof`:`character`));throw r.url=gq+(e===null?`#unexpected-end-of-file-at-expected-expect`:`#unexpected-character-at-expected-expect`),r}}function vq(e){return`U+`+e.toString(16).toUpperCase().padStart(4,`0`)}function yq(e,t){return{name:`mdxJsxTextTag`,tokenize:n};function n(n,r,i){return _q.call(this,n,r,i,e,t.acornOptions,t.addResult,!0,`mdxJsxTextTag`,`mdxJsxTextTagMarker`,`mdxJsxTextTagClosingMarker`,`mdxJsxTextTagSelfClosingMarker`,`mdxJsxTextTagName`,`mdxJsxTextTagNamePrimary`,`mdxJsxTextTagNameMemberMarker`,`mdxJsxTextTagNameMember`,`mdxJsxTextTagNamePrefixMarker`,`mdxJsxTextTagNameLocal`,`mdxJsxTextTagExpressionAttribute`,`mdxJsxTextTagExpressionAttributeMarker`,`mdxJsxTextTagExpressionAttributeValue`,`mdxJsxTextTagAttribute`,`mdxJsxTextTagAttributeName`,`mdxJsxTextTagAttributeNamePrimary`,`mdxJsxTextTagAttributeNamePrefixMarker`,`mdxJsxTextTagAttributeNameLocal`,`mdxJsxTextTagAttributeInitializerMarker`,`mdxJsxTextTagAttributeValueLiteral`,`mdxJsxTextTagAttributeValueLiteralMarker`,`mdxJsxTextTagAttributeValueLiteralValue`,`mdxJsxTextTagAttributeValueExpression`,`mdxJsxTextTagAttributeValueExpressionMarker`,`mdxJsxTextTagAttributeValueExpressionValue`)}}function bq(e,t){return{concrete:!0,name:`mdxJsxFlowTag`,tokenize:n};function n(n,r,i){let a=this;return o;function o(e){return s(e)}function s(r){return _q.call(a,n,c,i,e,t.acornOptions,t.addResult,!1,`mdxJsxFlowTag`,`mdxJsxFlowTagMarker`,`mdxJsxFlowTagClosingMarker`,`mdxJsxFlowTagSelfClosingMarker`,`mdxJsxFlowTagName`,`mdxJsxFlowTagNamePrimary`,`mdxJsxFlowTagNameMemberMarker`,`mdxJsxFlowTagNameMember`,`mdxJsxFlowTagNamePrefixMarker`,`mdxJsxFlowTagNameLocal`,`mdxJsxFlowTagExpressionAttribute`,`mdxJsxFlowTagExpressionAttributeMarker`,`mdxJsxFlowTagExpressionAttributeValue`,`mdxJsxFlowTagAttribute`,`mdxJsxFlowTagAttributeName`,`mdxJsxFlowTagAttributeNamePrimary`,`mdxJsxFlowTagAttributeNamePrefixMarker`,`mdxJsxFlowTagAttributeNameLocal`,`mdxJsxFlowTagAttributeInitializerMarker`,`mdxJsxFlowTagAttributeValueLiteral`,`mdxJsxFlowTagAttributeValueLiteralMarker`,`mdxJsxFlowTagAttributeValueLiteralValue`,`mdxJsxFlowTagAttributeValueExpression`,`mdxJsxFlowTagAttributeValueExpressionMarker`,`mdxJsxFlowTagAttributeValueExpressionValue`)(r)}function c(e){return Q(e)?$(n,l,`whitespace`)(e):l(e)}function l(e){let t=a.parser.constructs.flow[123],s=Array.isArray(t)?t:t?[t]:[],c;for(let e of s)if(e.name===`mdxFlowExpression`){c=e;break}return e===60?o(e):e===123&&c?n.attempt(c,l,i)(e):e===null||Z(e)?r(e):i(e)}}}function xq(e){let t=e||{},n=t.acorn,r;if(n){if(!n.parse||!n.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:bq(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:yq(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function Sq(){return{disable:{null:[`autolink`,`codeIndented`,`htmlFlow`,`htmlText`]}}}function Cq(){return qB([lq(),xq(),Sq()])}var wq=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],Tq=/^>|^->|<!--|-->|--!>|<!-$/g,Eq=[`>`],Dq=[`<`,`>`];function Oq(e,t,n,r){return r.settings.bogusComments?`<?`+xK(e.value,Object.assign({},r.settings.characterReferences,{subset:Eq}))+`>`:`<!--`+e.value.replace(Tq,i)+`-->`;function i(e){return xK(e,Object.assign({},r.settings.characterReferences,{subset:Dq}))}}function kq(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var Aq=Nq(1),jq=Nq(-1),Mq=[];function Nq(e){return t;function t(t,n,r){let i=t?t.children:Mq,a=(n||0)+e,o=i[a];if(!r)for(;o&&pF(o);)a+=e,o=i[a];return o}}var Pq={}.hasOwnProperty;function Fq(e){return t;function t(t,n,r){return Pq.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Iq=Fq({body:zq,caption:Lq,colgroup:Lq,dd:Uq,dt:Hq,head:Lq,html:Rq,li:Vq,optgroup:Gq,option:Kq,p:Bq,rp:Wq,rt:Wq,tbody:Jq,td:Zq,tfoot:Yq,th:Zq,thead:qq,tr:Xq});function Lq(e,t,n){let r=Aq(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&pF(r.value.charAt(0)))}function Rq(e,t,n){let r=Aq(n,t);return!r||r.type!==`comment`}function zq(e,t,n){let r=Aq(n,t);return!r||r.type!==`comment`}function Bq(e,t,n){let r=Aq(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function Vq(e,t,n){let r=Aq(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Hq(e,t,n){let r=Aq(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function Uq(e,t,n){let r=Aq(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function Wq(e,t,n){let r=Aq(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Gq(e,t,n){let r=Aq(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Kq(e,t,n){let r=Aq(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function qq(e,t,n){let r=Aq(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function Jq(e,t,n){let r=Aq(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function Yq(e,t,n){return!Aq(n,t)}function Xq(e,t,n){let r=Aq(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Zq(e,t,n){let r=Aq(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var Qq=Fq({body:tJ,colgroup:nJ,head:eJ,html:$q,tbody:rJ});function $q(e){let t=Aq(e,-1);return!t||t.type!==`comment`}function eJ(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function tJ(e){let t=Aq(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&pF(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function nJ(e,t,n){let r=jq(n,t),i=Aq(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Iq(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function rJ(e,t,n){let r=jq(n,t),i=Aq(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Iq(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var iJ={name:[[`
|
|
357
|
+
`;break;case-2:a=` `;break;case-1:if(r)continue;a=` `;break;default:a=String.fromCharCode(i)}r=i===-2,n.push(a)}return n.join(``)}function XK(e){let t=e||{},n=t.loc||{},r=t.range||[void 0,void 0],i=ZK(n.start,r[0]||t.start),a=ZK(n.end,r[1]||t.end);if(i&&a)return{start:i,end:a}}function ZK(e,t){if(e&&typeof e==`object`){let n=`line`in e?QK(e.line):void 0,r=`column`in e?QK(e.column):void 0;if(n&&r!==void 0)return{line:n,column:r+1,offset:QK(t)}}}function QK(e){return typeof e==`number`&&e>-1?e:void 0}var $K=2,eq=`https://github.com/micromark/micromark-extension-mdx-expression/tree/main/packages/micromark-extension-mdx-expression`,tq=`#unexpected-end-of-file-in-expression-expected-a-corresponding-closing-brace-for-`,nq=`#unexpected-lazy-line-in-expression-in-container-expected-line-to-be-prefixed`,rq=`#unexpected-type-in-code-expected-an-object-spread-spread`,iq=`#unexpected-extra-content-in-spread-only-a-single-spread-is-supported`,aq=`#could-not-parse-expression-with-acorn`;function oq(e,t,n,r,i,a,o,s,c,l,u){let d=this,f=this.events.length+3,p=0,m,h;return g;function g(t){return e.enter(n),e.enter(r),e.consume(t),e.exit(r),m=d.now(),_}function _(u){if(u===null){if(h)throw h;let e=new Ru("Unexpected end of file in expression, expected a corresponding closing brace for `{`",{place:d.now(),ruleId:`unexpected-eof`,source:`micromark-extension-mdx-expression`});throw e.url=eq+tq,e}if(Z(u))return e.enter(`lineEnding`),e.consume(u),e.exit(`lineEnding`),y;if(u===125&&p===0){let p=a?sq.call(d,a,o,i,f,m,l||!1,c||!1):{type:`ok`,estree:void 0};if(p.type===`ok`){e.enter(r),e.consume(u),e.exit(r);let i=e.exit(n);return s&&p.estree&&Object.assign(i,{estree:p.estree}),t}return h=p.message,e.enter(i),e.consume(u),v}return e.enter(i),v(u)}function v(t){return t===125&&p===0||t===null||Z(t)?(e.exit(i),_(t)):(t===123&&!a?p+=1:t===125&&--p,e.consume(t),v)}function y(t){let n=d.now();if(n.line!==m.line&&!u&&d.parser.lazy[n.line]){let e=new Ru("Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",{place:d.now(),ruleId:`unexpected-lazy`,source:`micromark-extension-mdx-expression`});throw e.url=eq+nq,e}return Q(t)?$(e,_,`linePrefix`,$K+1)(t):_(t)}}function sq(e,t,n,r,i,a,o){let s=GK(this.events.slice(r),{acorn:e,tokenTypes:[n],acornOptions:t,start:i,expression:!0,allowEmpty:a,prefix:o?`({`:``,suffix:o?`})`:``}),c=s.estree;if(o&&c){let e=c.body[0];if(e.type!==`ExpressionStatement`||e.expression.type!==`ObjectExpression`){let t=XK(e),n=new Ru("Unexpected `"+e.type+"` in code: expected an object spread (`{...spread}`)",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=eq+rq,n}if(e.expression.properties[1]){let t=new Ru(`Unexpected extra content in spread: only a single spread is supported`,{place:XK(e.expression.properties[1]).start,ruleId:`spread-extra`,source:`micromark-extension-mdx-expression`});throw t.url=eq+iq,t}if(e.expression.properties[0]&&e.expression.properties[0].type!==`SpreadElement`){let t=XK(e.expression.properties[0]),n=new Ru("Unexpected `"+e.expression.properties[0].type+"` in code: only spread elements are supported",{place:t.start,ruleId:`non-spread`,source:`micromark-extension-mdx-expression`});throw n.url=eq+rq,n}}if(s.error){let e=new Ru(`Could not parse expression with acorn`,{cause:s.error,place:{line:s.error.loc.line,column:s.error.loc.column+1,offset:s.error.pos},ruleId:`acorn`,source:`micromark-extension-mdx-expression`});return e.url=eq+aq,{type:`nok`,message:e}}return{type:`ok`,estree:c}}function cq(e){let t=e||{},n=t.addResult,r=t.acorn,i=t.spread,a=t.allowEmpty,o;if(a??=!0,r){if(!r.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");o=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions)}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{123:{name:`mdxFlowExpression`,tokenize:s,concrete:!0}},text:{123:{name:`mdxTextExpression`,tokenize:c}}};function s(e,t,s){let c=this;return l;function l(e){return u(e)}function u(t){return oq.call(c,e,d,`mdxFlowExpression`,`mdxFlowExpressionMarker`,`mdxFlowExpressionChunk`,r,o,n,i,a)(t)}function d(t){return Q(t)?$(e,f,`whitespace`)(t):f(t)}function f(n){let r=c.parser.constructs.flow[60],i=(Array.isArray(r)?r:r?[r]:[]).find(function(e){return e.name===`mdxJsxFlowTag`});return n===60&&i?e.attempt(i,f,s)(n):n===null||Z(n)?t(n):s(n)}}function c(e,t){let s=this;return c;function c(c){return oq.call(s,e,t,`mdxTextExpression`,`mdxTextExpressionMarker`,`mdxTextExpressionChunk`,r,o,n,i,a,!0)(c)}}}var lq=/[$_\p{ID_Start}]/u,uq=/[$_\u{200C}\u{200D}\p{ID_Continue}]/u,dq=/[-$_\u{200C}\u{200D}\p{ID_Continue}]/u,fq={};function pq(e){return e?lq.test(String.fromCodePoint(e)):!1}function mq(e,t){let n=(t||fq).jsx?dq:uq;return e?n.test(String.fromCodePoint(e)):!1}var hq=`https://github.com/micromark/micromark-extension-mdx-jsx`;function gq(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,ee,te,w,ne,re,ie,ae,oe){let se=this,ce,le;return ue;function ue(t){return e.enter(s),e.enter(c),e.consume(t),e.exit(c),de}function de(e){return tR(e)?n(e):(ce=fe,Pe(e))}function fe(t){if(t===47)return e.enter(l),e.consume(t),e.exit(l),ce=pe,Pe;if(t===62)return Ne(t);if(t!==null&&t>=0&&pq(t))return e.enter(d),e.enter(f),e.consume(t),me;Le(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===33?" (note: to create a comment in MDX, use `{/* text */}`)":``))}function pe(t){if(t===62)return Ne(t);if(t!==null&&t>=0&&pq(t))return e.enter(d),e.enter(f),e.consume(t),me;Le(t,`before name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===42||t===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function me(t){if(t!==null&&t>=0&&mq(t,{jsx:!0}))return e.consume(t),me;if(t===46||t===47||t===58||t===62||t===123||tR(t)||rR(t))return e.exit(f),ce=he,Pe(t);Le(t,`in name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function he(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),ce=ge,Pe;if(t===58)return e.enter(h),e.consume(t),e.exit(h),ce=ye,Pe;if(t===47||t===62||t===123||t!==null&&t>=0&&pq(t))return e.exit(d),Se(t);Le(t,`after name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ge(t){if(t!==null&&t>=0&&pq(t))return e.enter(m),e.consume(t),_e;Le(t,`before member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function _e(t){if(t!==null&&t>=0&&mq(t,{jsx:!0}))return e.consume(t),_e;if(t===46||t===47||t===62||t===123||tR(t)||rR(t))return e.exit(m),ce=ve,Pe(t);Le(t,`in member name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag"+(t===64?" (note: to create a link in MDX, use `[text](url)`)":``))}function ve(t){if(t===46)return e.enter(p),e.consume(t),e.exit(p),ce=ge,Pe;if(t===47||t===62||t===123||t!==null&&t>=0&&pq(t))return e.exit(d),Se(t);Le(t,`after member name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function ye(t){if(t!==null&&t>=0&&pq(t))return e.enter(g),e.consume(t),be;Le(t,`before local name`,"a character that can start a name, such as a letter, `$`, or `_`"+(t===43||t!==null&&t>46&&t<58?" (note: to create a link in MDX, use `[text](url)`)":``))}function be(t){if(t!==null&&t>=0&&mq(t,{jsx:!0}))return e.consume(t),be;if(t===47||t===62||t===123||tR(t)||rR(t))return e.exit(g),ce=xe,Pe(t);Le(t,`in local name`,"a name character such as letters, digits, `$`, or `_`; whitespace before attributes; or the end of the tag")}function xe(t){if(t===47||t===62||t===123||t!==null&&t>=0&&pq(t))return e.exit(d),Se(t);Le(t,`after local name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function Se(t){if(t===47)return e.enter(u),e.consume(t),e.exit(u),ce=Me,Pe;if(t===62)return Ne(t);if(t===123)return oq.call(se,e,T,_,v,y,r,i,a,!0,!1,o)(t);if(t!==null&&t>=0&&pq(t))return e.enter(b),e.enter(x),e.enter(S),e.consume(t),Ce;Le(t,`before attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag")}function T(e){return ce=Se,Pe(e)}function Ce(t){if(t!==null&&t>=0&&mq(t,{jsx:!0}))return e.consume(t),Ce;if(t===47||t===58||t===61||t===62||t===123||tR(t)||rR(t))return e.exit(S),ce=we,Pe(t);Le(t,`in attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function we(t){if(t===58)return e.enter(C),e.consume(t),e.exit(C),ce=Te,Pe;if(t===61)return e.exit(x),e.enter(te),e.consume(t),e.exit(te),ce=Oe,Pe;if(t===47||t===62||t===123||tR(t)||rR(t)||t!==null&&t>=0&&pq(t))return e.exit(x),e.exit(b),ce=Se,Pe(t);Le(t,`after attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Te(t){if(t!==null&&t>=0&&pq(t))return e.enter(ee),e.consume(t),Ee;Le(t,`before local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Ee(t){if(t!==null&&t>=0&&mq(t,{jsx:!0}))return e.consume(t),Ee;if(t===47||t===61||t===62||t===123||tR(t)||rR(t))return e.exit(ee),e.exit(x),ce=De,Pe(t);Le(t,`in local attribute name`,"an attribute name character such as letters, digits, `$`, or `_`; `=` to initialize a value; whitespace before attributes; or the end of the tag")}function De(t){if(t===61)return e.enter(te),e.consume(t),e.exit(te),ce=Oe,Pe;if(t===47||t===62||t===123||t!==null&&t>=0&&pq(t))return e.exit(b),Se(t);Le(t,`after local attribute name`,"a character that can start an attribute name, such as a letter, `$`, or `_`; `=` to initialize a value; or the end of the tag")}function Oe(t){if(t===34||t===39)return e.enter(w),e.enter(ne),e.consume(t),e.exit(ne),le=t,Ae;if(t===123)return oq.call(se,e,ke,ie,ae,oe,r,i,a,!1,!1,o)(t);Le(t,`before attribute value`,"a character that can start an attribute value, such as `\"`, `'`, or `{`"+(t===60?" (note: to use an element or fragment as a prop value in MDX, use `{<element />}`)":``))}function ke(t){return e.exit(b),ce=Se,Pe(t)}function Ae(t){return t===null&&Le(t,`in attribute value`,"a corresponding closing quote `"+String.fromCodePoint(le)+"`"),t===le?(e.enter(ne),e.consume(t),e.exit(ne),e.exit(w),e.exit(b),le=void 0,ce=Se,Pe):Z(t)?(ce=Ae,Pe(t)):(e.enter(re),je(t))}function je(t){return t===null||t===le||Z(t)?(e.exit(re),Ae(t)):(e.consume(t),je)}function Me(e){if(e===62)return Ne(e);Le(e,`after self-closing slash`,"`>` to end the tag"+(e===42||e===47?` (note: JS comments in JSX tags are not supported in MDX)`:``))}function Ne(n){return e.enter(c),e.consume(n),e.exit(c),e.exit(s),t}function Pe(t){return Z(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Ie):Q(t)||rR(t)?(e.enter(`esWhitespace`),Fe(t)):ce(t)}function Fe(t){return Z(t)?(e.exit(`esWhitespace`),Pe(t)):Q(t)||rR(t)?(e.consume(t),Fe):(e.exit(`esWhitespace`),ce(t))}function Ie(e){if(!o&&se.parser.lazy[se.now().line]){let e=new Ru("Unexpected lazy line in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc",se.now(),`micromark-extension-mdx-jsx:unexpected-lazy`);throw e.url=hq+`#unexpected-lazy-line-in-container-expected-line-to-be`,e}return Pe(e)}function Le(e,t,n){let r=new Ru(`Unexpected `+(e===null?`end of file`:"character `"+(e===96?"` ` `":String.fromCodePoint(e))+"` ("+_q(e)+`)`)+` `+t+`, expected `+n,se.now(),`micromark-extension-mdx-jsx:unexpected-`+(e===null?`eof`:`character`));throw r.url=hq+(e===null?`#unexpected-end-of-file-at-expected-expect`:`#unexpected-character-at-expected-expect`),r}}function _q(e){return`U+`+e.toString(16).toUpperCase().padStart(4,`0`)}function vq(e,t){return{name:`mdxJsxTextTag`,tokenize:n};function n(n,r,i){return gq.call(this,n,r,i,e,t.acornOptions,t.addResult,!0,`mdxJsxTextTag`,`mdxJsxTextTagMarker`,`mdxJsxTextTagClosingMarker`,`mdxJsxTextTagSelfClosingMarker`,`mdxJsxTextTagName`,`mdxJsxTextTagNamePrimary`,`mdxJsxTextTagNameMemberMarker`,`mdxJsxTextTagNameMember`,`mdxJsxTextTagNamePrefixMarker`,`mdxJsxTextTagNameLocal`,`mdxJsxTextTagExpressionAttribute`,`mdxJsxTextTagExpressionAttributeMarker`,`mdxJsxTextTagExpressionAttributeValue`,`mdxJsxTextTagAttribute`,`mdxJsxTextTagAttributeName`,`mdxJsxTextTagAttributeNamePrimary`,`mdxJsxTextTagAttributeNamePrefixMarker`,`mdxJsxTextTagAttributeNameLocal`,`mdxJsxTextTagAttributeInitializerMarker`,`mdxJsxTextTagAttributeValueLiteral`,`mdxJsxTextTagAttributeValueLiteralMarker`,`mdxJsxTextTagAttributeValueLiteralValue`,`mdxJsxTextTagAttributeValueExpression`,`mdxJsxTextTagAttributeValueExpressionMarker`,`mdxJsxTextTagAttributeValueExpressionValue`)}}function yq(e,t){return{concrete:!0,name:`mdxJsxFlowTag`,tokenize:n};function n(n,r,i){let a=this;return o;function o(e){return s(e)}function s(r){return gq.call(a,n,c,i,e,t.acornOptions,t.addResult,!1,`mdxJsxFlowTag`,`mdxJsxFlowTagMarker`,`mdxJsxFlowTagClosingMarker`,`mdxJsxFlowTagSelfClosingMarker`,`mdxJsxFlowTagName`,`mdxJsxFlowTagNamePrimary`,`mdxJsxFlowTagNameMemberMarker`,`mdxJsxFlowTagNameMember`,`mdxJsxFlowTagNamePrefixMarker`,`mdxJsxFlowTagNameLocal`,`mdxJsxFlowTagExpressionAttribute`,`mdxJsxFlowTagExpressionAttributeMarker`,`mdxJsxFlowTagExpressionAttributeValue`,`mdxJsxFlowTagAttribute`,`mdxJsxFlowTagAttributeName`,`mdxJsxFlowTagAttributeNamePrimary`,`mdxJsxFlowTagAttributeNamePrefixMarker`,`mdxJsxFlowTagAttributeNameLocal`,`mdxJsxFlowTagAttributeInitializerMarker`,`mdxJsxFlowTagAttributeValueLiteral`,`mdxJsxFlowTagAttributeValueLiteralMarker`,`mdxJsxFlowTagAttributeValueLiteralValue`,`mdxJsxFlowTagAttributeValueExpression`,`mdxJsxFlowTagAttributeValueExpressionMarker`,`mdxJsxFlowTagAttributeValueExpressionValue`)(r)}function c(e){return Q(e)?$(n,l,`whitespace`)(e):l(e)}function l(e){let t=a.parser.constructs.flow[123],s=Array.isArray(t)?t:t?[t]:[],c;for(let e of s)if(e.name===`mdxFlowExpression`){c=e;break}return e===60?o(e):e===123&&c?n.attempt(c,l,i)(e):e===null||Z(e)?r(e):i(e)}}}function bq(e){let t=e||{},n=t.acorn,r;if(n){if(!n.parse||!n.parseExpressionAt)throw Error("Expected a proper `acorn` instance passed in as `options.acorn`");r=Object.assign({ecmaVersion:2024,sourceType:`module`},t.acornOptions,{locations:!0})}else if(t.acornOptions||t.addResult)throw Error("Expected an `acorn` instance passed in as `options.acorn`");return{flow:{60:yq(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})},text:{60:vq(n||void 0,{acornOptions:r,addResult:t.addResult||void 0})}}}function xq(){return{disable:{null:[`autolink`,`codeIndented`,`htmlFlow`,`htmlText`]}}}function Sq(){return KB([cq(),bq(),xq()])}var Cq=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],wq=/^>|^->|<!--|-->|--!>|<!-$/g,Tq=[`>`],Eq=[`<`,`>`];function Dq(e,t,n,r){return r.settings.bogusComments?`<?`+bK(e.value,Object.assign({},r.settings.characterReferences,{subset:Tq}))+`>`:`<!--`+e.value.replace(wq,i)+`-->`;function i(e){return bK(e,Object.assign({},r.settings.characterReferences,{subset:Eq}))}}function Oq(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}var kq=Mq(1),Aq=Mq(-1),jq=[];function Mq(e){return t;function t(t,n,r){let i=t?t.children:jq,a=(n||0)+e,o=i[a];if(!r)for(;o&&fF(o);)a+=e,o=i[a];return o}}var Nq={}.hasOwnProperty;function Pq(e){return t;function t(t,n,r){return Nq.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Fq=Pq({body:Rq,caption:Iq,colgroup:Iq,dd:Hq,dt:Vq,head:Iq,html:Lq,li:Bq,optgroup:Wq,option:Gq,p:zq,rp:Uq,rt:Uq,tbody:qq,td:Xq,tfoot:Jq,th:Xq,thead:Kq,tr:Yq});function Iq(e,t,n){let r=kq(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&fF(r.value.charAt(0)))}function Lq(e,t,n){let r=kq(n,t);return!r||r.type!==`comment`}function Rq(e,t,n){let r=kq(n,t);return!r||r.type!==`comment`}function zq(e,t,n){let r=kq(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function Bq(e,t,n){let r=kq(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Vq(e,t,n){let r=kq(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function Hq(e,t,n){let r=kq(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function Uq(e,t,n){let r=kq(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Wq(e,t,n){let r=kq(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Gq(e,t,n){let r=kq(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Kq(e,t,n){let r=kq(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function qq(e,t,n){let r=kq(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function Jq(e,t,n){return!kq(n,t)}function Yq(e,t,n){let r=kq(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Xq(e,t,n){let r=kq(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var Zq=Pq({body:eJ,colgroup:tJ,head:$q,html:Qq,tbody:nJ});function Qq(e){let t=kq(e,-1);return!t||t.type!==`comment`}function $q(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function eJ(e){let t=kq(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&fF(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function tJ(e,t,n){let r=Aq(n,t),i=kq(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Fq(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function nJ(e,t,n){let r=Aq(n,t),i=kq(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Fq(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var rJ={name:[[`
|
|
358
358
|
\f\r &/=>`.split(``),`
|
|
359
359
|
\f\r "&'/=>\``.split(``)],[`\0
|
|
360
360
|
\f\r "&'/<=>`.split(``),`\0
|
|
@@ -362,17 +362,17 @@ ${t.slice(l+2)}`,d+=1;else break}t.push({indent:l,number:parseInt(s,10),content:
|
|
|
362
362
|
\f\r &>`.split(``),`\0
|
|
363
363
|
\f\r "&'<=>\``.split(``)],[`\0
|
|
364
364
|
\f\r "&'<=>\``.split(``),`\0
|
|
365
|
-
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function
|
|
366
|
-
`}]}function
|
|
367
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function
|
|
365
|
+
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function iJ(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=jk);let l=aJ(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!Zq(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!Fq(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function aJ(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=oJ(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function oJ(e,t,n){let r=Dk(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=bK(r.attribute,Object.assign({},e.settings.characterReferences,{subset:rJ.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Nk:Lk)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=bK(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:rJ.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&qL(n,o)>qL(n,e.alternative)&&(o=e.alternative),s=o+bK(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?rJ.single:rJ.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var sJ=[`<`,`&`];function cJ(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:bK(e.value,Object.assign({},r.settings.characterReferences,{subset:sJ}))}function lJ(e,t,n,r){return r.settings.allowDangerousHtml?e.value:cJ(e,t,n,r)}function uJ(e,t,n,r){return r.all(e)}var dJ=$R(`type`,{invalid:fJ,unknown:pJ,handlers:{comment:Dq,doctype:Oq,element:iJ,raw:lJ,root:uJ,text:cJ}});function fJ(e){throw Error("Expected node, not `"+e+"`")}function pJ(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var mJ={},hJ={},gJ=[];function _J(e,t){let n=t||mJ,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:vJ,all:yJ,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||Cq,characterReferences:n.characterReferences||hJ,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?jk:Ak,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function vJ(e,t,n){return dJ(e,t,n,this)}function yJ(e){let t=[],n=e&&e.children||gJ,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function bJ(e){let t=this,n={...t.data(`settings`),...e};t.compiler=r;function r(e){return _J(e,n)}}function xJ(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function SJ(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
366
|
+
`}]}function CJ(e,t){let n=t.value?t.value+`
|
|
367
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function wJ(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function TJ(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function EJ(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=yV(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function DJ(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function OJ(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function kJ(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function AJ(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return kJ(e,t);let i={src:yV(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function jJ(e,t){let n={src:yV(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function MJ(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function NJ(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return kJ(e,t);let i={href:yV(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function PJ(e,t){let n={href:yV(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function FJ(e,t,n){let r=e.all(t),i=n?IJ(n):LJ(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
368
368
|
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
369
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function
|
|
369
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function IJ(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=LJ(n[r])}return t}function LJ(e){return e.spread??e.children.length>1}function RJ(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function zJ(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BJ(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function VJ(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function HJ(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=YF(t.children[1]),o=JF(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function UJ(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function WJ(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GJ(e,t){let n={type:`text`,value:YU(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function KJ(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var qJ={blockquote:xJ,break:SJ,code:CJ,delete:wJ,emphasis:TJ,footnoteReference:EJ,heading:DJ,html:OJ,imageReference:AJ,image:jJ,inlineCode:MJ,linkReference:NJ,link:PJ,listItem:FJ,list:RJ,paragraph:zJ,root:BJ,strong:VJ,table:HJ,tableCell:WJ,tableRow:UJ,text:GJ,thematicBreak:KJ,toml:JJ,yaml:JJ,definition:JJ,footnoteDefinition:JJ};function JJ(){}function YJ(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function XJ(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function ZJ(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||YJ,r=e.options.footnoteBackLabel||XJ,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=yV(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...nF(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
370
370
|
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
371
|
-
`}]}}var
|
|
371
|
+
`}]}}var QJ={}.hasOwnProperty,$J={};function eY(e,t){let n=t||$J,r=new Map,i=new Map,a={all:s,applyData:nY,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...qJ,...n.handlers},one:o,options:n,patch:tY,wrap:iY};return qF(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(QJ.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=nF(n);return r.children=a.all(e),r}return nF(e)}return(a.options.unknownHandler||rY)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=aY(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=aY(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function tY(e,t){e.position&&(t.position=ZF(e))}function nY(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,nF(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function rY(e,t){let n=t.data||{},r=`value`in t&&!(QJ.call(n,`hProperties`)||QJ.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function iY(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
372
372
|
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
373
373
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
374
|
-
`}),n}function
|
|
375
|
-
`},i)),a}function
|
|
374
|
+
`}),n}function aY(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function oY(e,t){let n=eY(e,t),r=n.one(e,void 0),i=ZJ(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
375
|
+
`},i)),a}function sY(e,t){return e&&`run`in e?async function(n,r){let i=oY(n,{file:r,...t});await e.run(i,r)}:function(n,r){return oY(n,{file:r,...e||t})}}var cY={arabic:`ar`,armenian:`am`,bulgarian:`bg`,czech:`cz`,danish:`dk`,dutch:`nl`,english:`en`,finnish:`fi`,french:`fr`,german:`de`,greek:`gr`,hungarian:`hu`,indian:`in`,indonesian:`id`,irish:`ie`,italian:`it`,lithuanian:`lt`,nepali:`np`,norwegian:`no`,portuguese:`pt`,romanian:`ro`,russian:`ru`,serbian:`rs`,slovenian:`ru`,spanish:`es`,swedish:`se`,tamil:`ta`,turkish:`tr`,ukrainian:`uk`,sanskrit:`sk`},lY={dutch:/[^A-Za-zàèéìòóù0-9_'-]+/gim,english:/[^A-Za-zàèéìòóù0-9_'-]+/gim,french:/[^a-z0-9äâàéèëêïîöôùüûœç-]+/gim,italian:/[^A-Za-zàèéìòóù0-9_'-]+/gim,norwegian:/[^a-z0-9_æøåÆØÅäÄöÖüÜ]+/gim,portuguese:/[^a-z0-9à-úÀ-Ú]/gim,russian:/[^a-z0-9а-яА-ЯёЁ]+/gim,spanish:/[^a-z0-9A-Zá-úÁ-ÚñÑüÜ]+/gim,swedish:/[^a-z0-9_åÅäÄöÖüÜ-]+/gim,german:/[^a-z0-9A-ZäöüÄÖÜß]+/gim,finnish:/[^a-z0-9äöÄÖ]+/gim,danish:/[^a-z0-9æøåÆØÅ]+/gim,hungarian:/[^a-z0-9áéíóöőúüűÁÉÍÓÖŐÚÜŰ]+/gim,romanian:/[^a-z0-9ăâîșțĂÂÎȘȚ]+/gim,serbian:/[^a-z0-9čćžšđČĆŽŠĐ]+/gim,turkish:/[^a-z0-9çÇğĞıİöÖşŞüÜ]+/gim,lithuanian:/[^a-z0-9ąčęėįšųūžĄČĘĖĮŠŲŪŽ]+/gim,arabic:/[^a-z0-9أ-ي]+/gim,nepali:/[^a-z0-9अ-ह]+/gim,irish:/[^a-z0-9áéíóúÁÉÍÓÚ]+/gim,indian:/[^a-z0-9अ-ह]+/gim,armenian:/[^a-z0-9ա-ֆ]+/gim,greek:/[^a-z0-9α-ωά-ώ]+/gim,indonesian:/[^a-z0-9]+/gim,ukrainian:/[^a-z0-9а-яА-ЯіїєІЇЄ]+/gim,slovenian:/[^a-z0-9螚ȎŠ]+/gim,bulgarian:/[^a-z0-9а-яА-Я]+/gim,tamil:/[^a-z0-9அ-ஹ]+/gim,sanskrit:/[^a-z0-9A-Zāīūṛḷṃṁḥśṣṭḍṇṅñḻḹṝ]+/gim,czech:/[^A-Z0-9a-zěščřžýáíéúůóťďĚŠČŘŽÝÁÍÉÓÚŮŤĎ-]+/gim},uY=Object.keys(cY);function dY(e){return e!==void 0&&uY.includes(e)?cY[e]:void 0}var fY=Date.now().toString().slice(5),pY=0,mY=BigInt(1e3),hY=BigInt(1e6),gY=BigInt(1e9),_Y=65535;function vY(e,t){if(t.length<65535)Array.prototype.push.apply(e,t);else{let n=t.length;for(let r=0;r<n;r+=_Y)Array.prototype.push.apply(e,t.slice(r,r+_Y))}}function yY(e,...t){return e.replace(/%(?:(?<position>\d+)\$)?(?<width>-?\d*\.?\d*)(?<type>[dfs])/g,function(...e){let{width:n,type:r,position:i}=e[e.length-1],a=i?t[Number.parseInt(i)-1]:t.shift(),o=n===``?0:Number.parseInt(n);switch(r){case`d`:return a.toString().padStart(o,`0`);case`f`:{let e=a,[t,r]=n.split(`.`).map(e=>Number.parseFloat(e));return typeof r==`number`&&r>=0&&(e=e.toFixed(r)),typeof t==`number`&&t>=0?e.toString().padStart(o,`0`):e.toString()}case`s`:return o<0?a.toString().padEnd(-o,` `):a.toString().padStart(o,` `);default:return a}})}function bY(){return typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope}function xY(){return typeof process<`u`&&process.release&&process.release.name===`node`}function SY(){return BigInt(Math.floor(performance.now()*1e6))}function CY(e){return typeof e==`number`&&(e=BigInt(e)),e<mY?`${e}ns`:e<hY?`${e/mY}μs`:e<gY?`${e/hY}ms`:`${e/gY}s`}function wY(){return bY()?SY():xY()||typeof process<`u`&&typeof process?.hrtime?.bigint==`function`?process.hrtime.bigint():typeof performance<`u`?SY():BigInt(0)}function TY(){return`${fY}-${pY++}`}function EY(e,t){return Object.hasOwn===void 0?Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0:Object.hasOwn(e,t)?e[t]:void 0}function DY(e,t){return t[1]===e[1]?e[0]-t[0]:t[1]-e[1]}function OY(e){if(e.length===0)return[];if(e.length===1)return e[0];for(let t=1;t<e.length;t++)if(e[t].length<e[0].length){let n=e[0];e[0]=e[t],e[t]=n}let t=new Map;for(let n of e[0])t.set(n,1);for(let n=1;n<e.length;n++){let r=0;for(let i of e[n]){let e=t.get(i);e===n&&(t.set(i,e+1),r++)}if(r===0)return[]}return e[0].filter(n=>{let r=t.get(n);return r!==void 0&&t.set(n,0),r===e.length})}function kY(e,t){let n={},r=t.length;for(let i=0;i<r;i++){let r=t[i],a=r.split(`.`),o=e,s=a.length;for(let e=0;e<s;e++)if(o=o[a[e]],typeof o==`object`){if(o!==null&&`lat`in o&&`lon`in o&&typeof o.lat==`number`&&typeof o.lon==`number`){o=n[r]=o;break}else if(!Array.isArray(o)&&o!==null&&e===s-1){o=void 0;break}}else if((typeof o!=`object`||!o)&&e<s-1){o=void 0;break}o!==void 0&&(n[r]=o)}return n}function AY(e,t){return kY(e,[t])[t]}var jY={cm:.01,m:1,km:1e3,ft:.3048,yd:.9144,mi:1609.344};function MY(e,t){let n=jY[t];if(n===void 0)throw Error(HY(`INVALID_DISTANCE_SUFFIX`,e).message);return e*n}function NY(e,t){e.hits=e.hits.map(e=>({...e,document:{...e.document,...t.reduce((e,t)=>{let n=t.split(`.`),r=n.pop(),i=e;for(let e of n)i[e]=i[e]??{},i=i[e];return i[r]=null,e},e.document)}}))}function PY(e){return Array.isArray(e)?e.some(e=>PY(e)):e?.constructor?.name===`AsyncFunction`}var FY=`intersection`in new Set;function IY(...e){if(e.length===0)return new Set;if(e.length===1)return e[0];if(e.length===2){let t=e[0],n=e[1];if(FY)return t.intersection(n);let r=new Set,i=t.size<n.size?t:n,a=i===t?n:t;for(let e of i)a.has(e)&&r.add(e);return r}let t={index:0,size:e[0].size};for(let n=1;n<e.length;n++)e[n].size<t.size&&(t.index=n,t.size=e[n].size);if(FY){let n=e[t.index];for(let r=0;r<e.length;r++)r!==t.index&&(n=n.intersection(e[r]));return n}let n=e[t.index];for(let r=0;r<e.length;r++){if(r===t.index)continue;let i=e[r];for(let e of n)i.has(e)||n.delete(e)}return n}var LY=`union`in new Set;function RY(e,t){return LY?e?e.union(t):t:e?new Set([...e,...t]):new Set(t)}function zY(e,t){let n=new Set;for(let r of e)t.has(r)||n.add(r);return n}function BY(e){if(typeof SharedArrayBuffer<`u`&&typeof Atomics<`u`){let t=new Int32Array(new SharedArrayBuffer(4));if(!(e>0&&e<1/0))throw typeof e!=`number`&&typeof e!=`bigint`?TypeError(`sleep: ms must be a number`):RangeError(`sleep: ms must be a number that is greater than 0 but less than Infinity`);Atomics.wait(t,0,0,Number(e))}else{if(!(e>0&&e<1/0))throw typeof e!=`number`&&typeof e!=`bigint`?TypeError(`sleep: ms must be a number`):RangeError(`sleep: ms must be a number that is greater than 0 but less than Infinity`);let t=Date.now()+Number(e);for(;t>Date.now(););}}var VY={NO_LANGUAGE_WITH_CUSTOM_TOKENIZER:`Do not pass the language option to create when using a custom tokenizer.`,LANGUAGE_NOT_SUPPORTED:`Language "%s" is not supported.\nSupported languages are:\n - ${uY.join(`
|
|
376
376
|
- `)}`,INVALID_STEMMER_FUNCTION_TYPE:`config.stemmer property must be a function.`,MISSING_STEMMER:`As of version 1.0.0 @orama/orama does not ship non English stemmers by default. To solve this, please explicitly import and specify the "%s" stemmer from the package @orama/stemmers. See https://docs.orama.com/docs/orama-js/text-analysis/stemming for more information.`,CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY:`Custom stop words array must only contain strings.`,UNSUPPORTED_COMPONENT:`Unsupported component "%s".`,COMPONENT_MUST_BE_FUNCTION:`The component "%s" must be a function.`,COMPONENT_MUST_BE_FUNCTION_OR_ARRAY_FUNCTIONS:`The component "%s" must be a function or an array of functions.`,INVALID_SCHEMA_TYPE:`Unsupported schema type "%s" at "%s". Expected "string", "boolean" or "number" or array of them.`,DOCUMENT_ID_MUST_BE_STRING:`Document id must be of type "string". Got "%s" instead.`,DOCUMENT_ALREADY_EXISTS:`A document with id "%s" already exists.`,DOCUMENT_DOES_NOT_EXIST:`A document with id "%s" does not exists.`,MISSING_DOCUMENT_PROPERTY:`Missing searchable property "%s".`,INVALID_DOCUMENT_PROPERTY:`Invalid document property "%s": expected "%s", got "%s"`,UNKNOWN_INDEX:`Invalid property name "%s". Expected a wildcard string ("*") or array containing one of the following properties: %s`,INVALID_BOOST_VALUE:`Boost value must be a number greater than, or less than 0.`,INVALID_FILTER_OPERATION:`You can only use one operation per filter, you requested %d.`,SCHEMA_VALIDATION_FAILURE:`Cannot insert document due schema validation failure on "%s" property.`,INVALID_SORT_SCHEMA_TYPE:`Unsupported sort schema type "%s" at "%s". Expected "string" or "number".`,CANNOT_SORT_BY_ARRAY:`Cannot configure sort for "%s" because it is an array (%s).`,UNABLE_TO_SORT_ON_UNKNOWN_FIELD:`Unable to sort on unknown field "%s". Allowed fields: %s`,SORT_DISABLED:`Sort is disabled. Please read the documentation at https://docs.orama.com/docs/orama-js for more information.`,UNKNOWN_GROUP_BY_PROPERTY:`Unknown groupBy property "%s".`,INVALID_GROUP_BY_PROPERTY:`Invalid groupBy property "%s". Allowed types: "%s", but given "%s".`,UNKNOWN_FILTER_PROPERTY:`Unknown filter property "%s".`,UNKNOWN_VECTOR_PROPERTY:`Unknown vector property "%s". Make sure the property exists in the schema and is configured as a vector.`,INVALID_VECTOR_SIZE:`Vector size must be a number greater than 0. Got "%s" instead.`,INVALID_VECTOR_VALUE:`Vector value must be a number greater than 0. Got "%s" instead.`,INVALID_INPUT_VECTOR:`Property "%s" was declared as a %s-dimensional vector, but got a %s-dimensional vector instead.
|
|
377
377
|
Input vectors must be of the size declared in the schema, as calculating similarity between vectors of different sizes can lead to unexpected results.`,WRONG_SEARCH_PROPERTY_TYPE:`Property "%s" is not searchable. Only "string" properties are searchable.`,FACET_NOT_SUPPORTED:`Facet doens't support the type "%s".`,INVALID_DISTANCE_SUFFIX:`Invalid distance suffix "%s". Valid suffixes are: cm, m, km, mi, yd, ft.`,INVALID_SEARCH_MODE:`Invalid search mode "%s". Valid modes are: "fulltext", "vector", "hybrid".`,MISSING_VECTOR_AND_SECURE_PROXY:`No vector was provided and no secure proxy was configured. Please provide a vector or configure an Orama Secure Proxy to perform hybrid search.`,MISSING_TERM:`"term" is a required parameter when performing hybrid search. Please provide a search term.`,INVALID_VECTOR_INPUT:`Invalid "vector" property. Expected an object with "value" and "property" properties, but got "%s" instead.`,PLUGIN_CRASHED:`A plugin crashed during initialization. Please check the error message for more information:`,PLUGIN_SECURE_PROXY_NOT_FOUND:`Could not find '@orama/secure-proxy-plugin' installed in your Orama instance.
|
|
378
378
|
Please install it before proceeding with creating an answer session.
|
|
@@ -380,8 +380,8 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
|
|
|
380
380
|
`,PLUGIN_SECURE_PROXY_MISSING_CHAT_MODEL:`Could not find a chat model defined in the secure proxy plugin configuration.
|
|
381
381
|
Please provide a chat model before proceeding with creating an answer session.
|
|
382
382
|
Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#plugin-secure-proxy
|
|
383
|
-
`,ANSWER_SESSION_LAST_MESSAGE_IS_NOT_ASSISTANT:`The last message in the session is not an assistant message. Cannot regenerate non-assistant messages.`,PLUGIN_COMPONENT_CONFLICT:`The component "%s" is already defined. The plugin "%s" is trying to redefine it.`};function UY(e,...t){let n=Error(bY(HY[e]??`Unsupported Orama Error code: ${e}`,...t));return n.code=e,`captureStackTrace`in Error.prototype&&Error.captureStackTrace(n),n}function WY(e){return{raw:Number(e),formatted:wY(e)}}function GY(e){if(e.id){if(typeof e.id!=`string`)throw UY(`DOCUMENT_ID_MUST_BE_STRING`,typeof e.id);return e.id}return EY()}function KY(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];if(t!==void 0&&!(r===`geopoint`&&typeof t==`object`&&typeof t.lon==`number`&&typeof t.lat==`number`)&&!(r===`enum`&&(typeof t==`string`||typeof t==`number`))){if(r===`enum[]`&&Array.isArray(t)){let e=t.length;for(let r=0;r<e;r++)if(typeof t[r]!=`string`&&typeof t[r]!=`number`)return n+`.`+r;continue}if(XY(r)){let e=$Y(r);if(!Array.isArray(t)||t.length!==e)throw UY(`INVALID_INPUT_VECTOR`,n,e,t.length);continue}if(ZY(r)){if(!Array.isArray(t))return n;let e=QY(r),i=t.length;for(let r=0;r<i;r++)if(typeof t[r]!==e)return n+`.`+r;continue}if(typeof r==`object`){if(!t||typeof t!=`object`)return n;let e=KY(t,r);if(e)return n+`.`+e;continue}if(typeof t!==r)return n}}}var qY={string:!1,number:!1,boolean:!1,enum:!1,geopoint:!1,"string[]":!0,"number[]":!0,"boolean[]":!0,"enum[]":!0},JY={"string[]":`string`,"number[]":`number`,"boolean[]":`boolean`,"enum[]":`enum`};function YY(e){return e===`geopoint`}function XY(e){return typeof e==`string`&&/^vector\[\d+\]$/.test(e)}function ZY(e){return typeof e==`string`&&qY[e]}function QY(e){return JY[e]}function $Y(e){let t=Number(e.slice(7,-1));switch(!0){case isNaN(t):throw UY(`INVALID_VECTOR_VALUE`,e);case t<=0:throw UY(`INVALID_VECTOR_SIZE`,e);default:return t}}function eX(){return{idToInternalId:new Map,internalIdToId:[],save:tX,load:nX}}function tX(e){return{internalIdToId:e.internalIdToId}}function nX(e,t){let{internalIdToId:n}=t;e.internalDocumentIDStore.idToInternalId.clear(),e.internalDocumentIDStore.internalIdToId=[];let r=n.length;for(let t=0;t<r;t++){let r=n[t];e.internalDocumentIDStore.idToInternalId.set(r,t+1),e.internalDocumentIDStore.internalIdToId.push(r)}}function rX(e,t){if(typeof t==`string`){let n=e.idToInternalId.get(t);if(n)return n;let r=e.idToInternalId.size+1;return e.idToInternalId.set(t,r),e.internalIdToId.push(t),r}return t>e.internalIdToId.length?rX(e,t.toString()):t}function iX(e,t){if(e.internalIdToId.length<t)throw Error(`Invalid internalId ${t}`);return e.internalIdToId[t-1]}function aX(e,t){return{sharedInternalDocumentStore:t,docs:{},count:0}}function oX(e,t){let n=rX(e.sharedInternalDocumentStore,t);return e.docs[n]}function sX(e,t){let n=t.length,r=Array.from({length:n});for(let i=0;i<n;i++){let n=rX(e.sharedInternalDocumentStore,t[i]);r[i]=e.docs[n]}return r}function cX(e){return e.docs}function lX(e,t,n,r){return e.docs[n]===void 0?(e.docs[n]=r,e.count++,!0):!1}function uX(e,t){let n=rX(e.sharedInternalDocumentStore,t);return e.docs[n]===void 0?!1:(delete e.docs[n],e.count--,!0)}function dX(e){return e.count}function fX(e,t){let n=t;return{docs:n.docs,count:n.count,sharedInternalDocumentStore:e}}function pX(e){return{docs:e.docs,count:e.count}}function mX(){return{create:aX,get:oX,getMultiple:sX,getAll:cX,store:lX,remove:uX,count:dX,load:fX,save:pX}}var hX=[`beforeInsert`,`afterInsert`,`beforeRemove`,`afterRemove`,`beforeUpdate`,`afterUpdate`,`beforeUpsert`,`afterUpsert`,`beforeSearch`,`afterSearch`,`beforeInsertMultiple`,`afterInsertMultiple`,`beforeRemoveMultiple`,`afterRemoveMultiple`,`beforeUpdateMultiple`,`afterUpdateMultiple`,`beforeUpsertMultiple`,`afterUpsertMultiple`,`beforeLoad`,`afterLoad`,`afterCreate`];function gX(e,t){let n=[],r=e.plugins?.length;if(!r)return n;for(let i=0;i<r;i++)try{let r=e.plugins[i];typeof r[t]==`function`&&n.push(r[t])}catch(e){throw console.error(`Caught error in getAllPluginsByHook:`,e),UY(`PLUGIN_CRASHED`)}return n}var _X=[`tokenizer`,`index`,`documentsStore`,`sorter`,`pinning`],vX=[`validateSchema`,`getDocumentIndexId`,`getDocumentProperties`,`formatElapsedTime`];function yX(e,t,n,r){if(e.some(FY))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function bX(e,t,n){if(e.some(FY))return(async()=>{for(let r of e)await r(t,n)})();for(let r of e)r(t,n)}function xX(e,t,n,r,i){if(e.some(FY))return(async()=>{for(let a of e)await a(t,n,r,i)})();for(let a of e)a(t,n,r,i)}function SX(e,t,n,r){if(e.some(FY))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function CX(e,t){if(e.some(FY))return(async()=>{for(let n of e)await n(t)})();for(let n of e)n(t)}var wX=class e{k;v;l=null;r=null;h=1;constructor(e,t){this.k=e,this.v=new Set(t)}updateHeight(){this.h=Math.max(e.getHeight(this.l),e.getHeight(this.r))+1}static getHeight(e){return e?e.h:0}getBalanceFactor(){return e.getHeight(this.l)-e.getHeight(this.r)}rotateLeft(){let e=this.r;return this.r=e.l,e.l=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){let e=this.l;return this.l=e.r,e.r=this,this.updateHeight(),e.updateHeight(),e}toJSON(){return{k:this.k,v:Array.from(this.v),l:this.l?this.l.toJSON():null,r:this.r?this.r.toJSON():null,h:this.h}}static fromJSON(t){let n=new e(t.k,t.v);return n.l=t.l?e.fromJSON(t.l):null,n.r=t.r?e.fromJSON(t.r):null,n.h=t.h,n}},TX=class e{root=null;insertCount=0;constructor(e,t){e!==void 0&&t!==void 0&&(this.root=new wX(e,t))}insert(e,t,n=1e3){this.root=this.insertNode(this.root,e,t,n)}insertMultiple(e,t,n=1e3){for(let r of t)this.insert(e,r,n)}rebalance(){this.root&&=this.rebalanceNode(this.root)}toJSON(){return{root:this.root?this.root.toJSON():null,insertCount:this.insertCount}}static fromJSON(t){let n=new e;return n.root=t.root?wX.fromJSON(t.root):null,n.insertCount=t.insertCount||0,n}insertNode(e,t,n,r){if(e===null)return new wX(t,[n]);let i=[],a=e,o=null;for(;a!==null;)if(i.push({parent:o,node:a}),t<a.k)if(a.l===null){a.l=new wX(t,[n]),i.push({parent:a,node:a.l});break}else o=a,a=a.l;else if(t>a.k)if(a.r===null){a.r=new wX(t,[n]),i.push({parent:a,node:a.r});break}else o=a,a=a.r;else return a.v.add(n),e;let s=!1;this.insertCount++%r===0&&(s=!0);for(let t=i.length-1;t>=0;t--){let{parent:n,node:r}=i[t];if(r.updateHeight(),s){let t=this.rebalanceNode(r);n?n.l===r?n.l=t:n.r===r&&(n.r=t):e=t}}return e}rebalanceNode(e){let t=e.getBalanceFactor();if(t>1){if(e.l&&e.l.getBalanceFactor()>=0)return e.rotateRight();if(e.l)return e.l=e.l.rotateLeft(),e.rotateRight()}if(t<-1){if(e.r&&e.r.getBalanceFactor()<=0)return e.rotateLeft();if(e.r)return e.r=e.r.rotateRight(),e.rotateLeft()}return e}find(e){let t=this.findNodeByKey(e);return t?t.v:null}contains(e){return this.find(e)!==null}getSize(){let e=0,t=[],n=this.root;for(;n||t.length>0;){for(;n;)t.push(n),n=n.l;n=t.pop(),e++,n=n.r}return e}isBalanced(){if(!this.root)return!0;let e=[this.root];for(;e.length>0;){let t=e.pop(),n=t.getBalanceFactor();if(Math.abs(n)>1)return!1;t.l&&e.push(t.l),t.r&&e.push(t.r)}return!0}remove(e){this.root=this.removeNode(this.root,e)}removeDocument(e,t){let n=this.findNodeByKey(e);n&&(n.v.size===1?this.root=this.removeNode(this.root,e):n.v=new Set([...n.v.values()].filter(e=>e!==t)))}findNodeByKey(e){let t=this.root;for(;t;)if(e<t.k)t=t.l;else if(e>t.k)t=t.r;else return t;return null}removeNode(e,t){if(e===null)return null;let n=[],r=e;for(;r!==null&&r.k!==t;)n.push(r),r=t<r.k?r.l:r.r;if(r===null)return e;if(r.l===null||r.r===null){let t=r.l?r.l:r.r;if(n.length===0)e=t;else{let e=n[n.length-1];e.l===r?e.l=t:e.r=t}}else{let e=r,t=r.r;for(;t.l!==null;)e=t,t=t.l;r.k=t.k,r.v=t.v,e.l===t?e.l=t.r:e.r=t.r,r=e}n.push(r);for(let t=n.length-1;t>=0;t--){let r=n[t];r.updateHeight();let i=this.rebalanceNode(r);if(t>0){let e=n[t-1];e.l===r?e.l=i:e.r===r&&(e.r=i)}else e=i}return e}rangeSearch(e,t){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),i.k>=e&&i.k<=t)for(let e of i.v)n.add(e);if(i.k>t)break;i=i.r}return n}greaterThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.r;if(i=r.pop(),t&&i.k>=e||!t&&i.k>e)for(let e of i.v)n.add(e);else if(i.k<=e)break;i=i.l}return n}lessThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),t&&i.k<=e||!t&&i.k<e)for(let e of i.v)n.add(e);else if(i.k>e)break;i=i.r}return n}},EX=class e{numberToDocumentId;constructor(){this.numberToDocumentId=new Map}insert(e,t){this.numberToDocumentId.has(e)?this.numberToDocumentId.get(e).add(t):this.numberToDocumentId.set(e,new Set([t]))}find(e){let t=this.numberToDocumentId.get(e);return t?Array.from(t):null}remove(e){this.numberToDocumentId.delete(e)}removeDocument(e,t){let n=this.numberToDocumentId.get(t);n&&(n.delete(e),n.size===0&&this.numberToDocumentId.delete(t))}contains(e){return this.numberToDocumentId.has(e)}getSize(){let e=0;for(let t of this.numberToDocumentId.values())e+=t.size;return e}filter(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`eq`:{let t=e[n],r=this.numberToDocumentId.get(t);return r?Array.from(r):[]}case`in`:{let t=e[n],r=new Set;for(let e of t){let t=this.numberToDocumentId.get(e);if(t)for(let e of t)r.add(e)}return Array.from(r)}case`nin`:{let t=new Set(e[n]),r=new Set;for(let[e,n]of this.numberToDocumentId.entries())if(!t.has(e))for(let e of n)r.add(e);return Array.from(r)}default:throw Error(`Invalid operation`)}}filterArr(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`containsAll`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e].filter(e=>t.has(e))));return Array.from(r)}case`containsAny`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e,...t]));return Array.from(r)}default:throw Error(`Invalid operation`)}}static fromJSON(t){if(!t.numberToDocumentId)throw Error(`Invalid Flat Tree JSON`);let n=new e;for(let[e,r]of t.numberToDocumentId)n.numberToDocumentId.set(e,new Set(r));return n}toJSON(){return{numberToDocumentId:Array.from(this.numberToDocumentId.entries()).map(([e,t])=>[e,Array.from(t)])}}};function DX(e,t,n){if(n<0)return-1;if(e===t)return 0;let r=e.length,i=t.length;if(r===0)return i<=n?i:-1;if(i===0)return r<=n?r:-1;let a=Math.abs(r-i);if(e.startsWith(t))return a<=n?a:-1;if(t.startsWith(e))return 0;if(a>n)return-1;let o=[];for(let e=0;e<=r;e++){o[e]=[e];for(let t=1;t<=i;t++)o[e][t]=e===0?t:0}for(let a=1;a<=r;a++){let r=1/0;for(let n=1;n<=i;n++)e[a-1]===t[n-1]?o[a][n]=o[a-1][n-1]:o[a][n]=Math.min(o[a-1][n]+1,o[a][n-1]+1,o[a-1][n-1]+1),r=Math.min(r,o[a][n]);if(r>n)return-1}return o[r][i]<=n?o[r][i]:-1}function OX(e,t,n){let r=DX(e,t,n);return{distance:r,isBounded:r>=0}}var kX=class e{k;s;c=new Map;d=new Set;e;w=``;constructor(e,t,n){this.k=e,this.s=t,this.e=n}updateParent(e){this.w=e.w+this.s}addDocument(e){this.d.add(e)}removeDocument(e){return this.d.delete(e)}findAllWords(e,t,n,r){let i=[this];for(;i.length>0;){let a=i.pop();if(a.e){let{w:i,d:o}=a;if(n&&i!==t)continue;if(DY(e,i)!==null)if(r)if(Math.abs(t.length-i.length)<=r&&OX(t,i,r).isBounded)e[i]=[];else continue;else e[i]=[];if(DY(e,i)!=null&&o.size>0){let t=e[i];for(let e of o)t.includes(e)||t.push(e)}}a.c.size>0&&i.push(...a.c.values())}return e}insert(t,n){let r=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=r.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c){if(r=s,i+=l,i===a){s.e||=!0,s.addDocument(n);return}continue}let u=o.slice(0,l),d=o.slice(l),f=t.slice(i+l),p=new e(u[0],u,!1);if(r.c.set(u[0],p),p.updateParent(r),s.s=d,s.k=d[0],p.c.set(d[0],s),s.updateParent(p),f){let t=new e(f[0],f,!0);t.addDocument(n),p.c.set(f[0],t),t.updateParent(p)}else p.e=!0,p.addDocument(n);return}else{let a=new e(o,t.slice(i),!0);a.addDocument(n),r.c.set(o,a),a.updateParent(r);return}}r.e||=!0,r.addDocument(n)}_findLevenshtein(e,t,n,r,i){let a=[{node:this,index:t,tolerance:n}];for(;a.length>0;){let{node:t,index:n,tolerance:o}=a.pop();if(t.w.startsWith(e)){t.findAllWords(i,e,!1,0);continue}if(o<0)continue;if(t.e){let{w:n,d:a}=t;if(n&&(OX(e,n,r).isBounded&&(i[n]=[]),DY(i,n)!==void 0&&a.size>0)){let e=new Set(i[n]);for(let t of a)e.add(t);i[n]=Array.from(e)}}if(n>=e.length)continue;let s=e[n];if(t.c.has(s)){let e=t.c.get(s);a.push({node:e,index:n+1,tolerance:o})}a.push({node:t,index:n+1,tolerance:o-1});for(let[e,r]of t.c)a.push({node:r,index:n,tolerance:o-1}),e!==s&&a.push({node:r,index:n+1,tolerance:o-1})}}find(e){let{term:t,exact:n,tolerance:r}=e;if(r&&!n){let e={};return this._findLevenshtein(t,0,r,r,e),e}else{let e=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=e.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c)e=s,i+=l;else if(i+l===a)if(l===a-i){if(n)return{};{let e={};return s.findAllWords(e,t,n,r),e}}else return{};else return{}}else return{}}let o={};return e.findAllWords(o,t,n,r),o}}contains(e){let t=this,n=0,r=e.length;for(;n<r;){let i=e[n],a=t.c.get(i);if(a){let i=a.s,o=i.length,s=0;for(;s<o&&n+s<r&&i[s]===e[n+s];)s++;if(s<o)return!1;n+=o,t=a}else return!1}return!0}removeWord(e){if(!e)return!1;let t=this,n=e.length,r=[];for(let i=0;i<n;i++){let n=e[i];if(t.c.has(n)){let e=t.c.get(n);r.push({parent:t,character:n}),i+=e.s.length-1,t=e}else return!1}for(t.d.clear(),t.e=!1;r.length>0&&t.c.size===0&&!t.e&&t.d.size===0;){let{parent:e,character:n}=r.pop();e.c.delete(n),t=e}return!0}removeDocumentByWord(e,t,n=!0){if(!e)return!0;let r=this,i=e.length;for(let a=0;a<i;a++){let i=e[a];if(r.c.has(i)){let o=r.c.get(i);a+=o.s.length-1,r=o,n&&r.w!==e||r.removeDocument(t)}else return!1}return!0}static getCommonPrefix(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e.charCodeAt(r)===t.charCodeAt(r);)r++;return e.slice(0,r)}toJSON(){return{w:this.w,s:this.s,e:this.e,k:this.k,d:Array.from(this.d),c:Array.from(this.c?.entries())?.map(([e,t])=>[e,t.toJSON()])}}static fromJSON(t){let n=new e(t.k,t.s,t.e);return n.w=t.w,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([t,n])=>[t,e.fromJSON(n)])||[]),n}},AX=class e extends kX{constructor(){super(``,``,!1)}static fromJSON(t){let n=new e;return n.w=t.w,n.s=t.s,n.e=t.e,n.k=t.k,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([e,t])=>[e,kX.fromJSON(t)])||[]),n}toJSON(){return super.toJSON()}},jX=2,MX=6371e3,NX=class e{point;docIDs;left;right;parent;constructor(e,t){this.point=e,this.docIDs=new Set(t),this.left=null,this.right=null,this.parent=null}toJSON(){return{point:this.point,docIDs:Array.from(this.docIDs),left:this.left?this.left.toJSON():null,right:this.right?this.right.toJSON():null}}static fromJSON(t,n=null){let r=new e(t.point,t.docIDs);return r.parent=n,t.left&&(r.left=e.fromJSON(t.left,r)),t.right&&(r.right=e.fromJSON(t.right,r)),r}},PX=class e{root;nodeMap;constructor(){this.root=null,this.nodeMap=new Map}getPointKey(e){return`${e.lon},${e.lat}`}insert(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);if(r){t.forEach(e=>r.docIDs.add(e));return}let i=new NX(e,t);if(this.nodeMap.set(n,i),this.root==null){this.root=i;return}let a=this.root,o=0;for(;;){if(o%jX===0)if(e.lon<a.point.lon){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}else if(e.lat<a.point.lat){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}o++}}contains(e){let t=this.getPointKey(e);return this.nodeMap.has(t)}getDocIDsByCoordinates(e){let t=this.getPointKey(e),n=this.nodeMap.get(t);return n?Array.from(n.docIDs):null}removeDocByID(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);r&&(r.docIDs.delete(t),r.docIDs.size===0&&(this.nodeMap.delete(n),this.deleteNode(r)))}deleteNode(e){let t=e.parent,n=e.left?e.left:e.right;n&&(n.parent=t),t?t.left===e?t.left=n:t.right===e&&(t.right=n):(this.root=n,this.root&&(this.root.parent=null))}searchByRadius(t,n,r=!0,i=`asc`,a=!1){let o=a?e.vincentyDistance:e.haversineDistance,s=[{node:this.root,depth:0}],c=[];for(;s.length>0;){let{node:e,depth:i}=s.pop();if(e==null)continue;let a=o(t,e.point);(r?a<=n:a>n)&&c.push({point:e.point,docIDs:Array.from(e.docIDs)}),e.left!=null&&s.push({node:e.left,depth:i+1}),e.right!=null&&s.push({node:e.right,depth:i+1})}return i&&c.sort((e,n)=>{let r=o(t,e.point),a=o(t,n.point);return i.toLowerCase()===`asc`?r-a:a-r}),c}searchByPolygon(t,n=!0,r=null,i=!1){let a=[{node:this.root,depth:0}],o=[];for(;a.length>0;){let{node:r,depth:i}=a.pop();if(r==null)continue;r.left!=null&&a.push({node:r.left,depth:i+1}),r.right!=null&&a.push({node:r.right,depth:i+1});let s=e.isPointInPolygon(t,r.point);(s&&n||!s&&!n)&&o.push({point:r.point,docIDs:Array.from(r.docIDs)})}let s=e.calculatePolygonCentroid(t);if(r){let t=i?e.vincentyDistance:e.haversineDistance;o.sort((e,n)=>{let i=t(s,e.point),a=t(s,n.point);return r.toLowerCase()===`asc`?i-a:a-i})}return o}toJSON(){return{root:this.root?this.root.toJSON():null}}static fromJSON(t){let n=new e;return t.root&&(n.root=NX.fromJSON(t.root),n.buildNodeMap(n.root)),n}buildNodeMap(e){if(e==null)return;let t=this.getPointKey(e.point);this.nodeMap.set(t,e),e.left&&this.buildNodeMap(e.left),e.right&&this.buildNodeMap(e.right)}static calculatePolygonCentroid(e){let t=0,n=0,r=0,i=e.length;for(let a=0,o=i-1;a<i;o=a++){let i=e[a].lon,s=e[a].lat,c=e[o].lon,l=e[o].lat,u=i*l-c*s;t+=u,n+=(i+c)*u,r+=(s+l)*u}t/=2;let a=6*t;return n/=a,r/=a,{lon:n,lat:r}}static isPointInPolygon(e,t){let n=!1,r=t.lon,i=t.lat,a=e.length;for(let t=0,o=a-1;t<a;o=t++){let a=e[t].lon,s=e[t].lat,c=e[o].lon,l=e[o].lat;s>i!=l>i&&r<(c-a)*(i-s)/(l-s)+a&&(n=!n)}return n}static haversineDistance(e,t){let n=Math.PI/180,r=e.lat*n,i=t.lat*n,a=(t.lat-e.lat)*n,o=(t.lon-e.lon)*n,s=Math.sin(a/2)*Math.sin(a/2)+Math.cos(r)*Math.cos(i)*Math.sin(o/2)*Math.sin(o/2);return MX*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))}static vincentyDistance(e,t){let n=6378137,r=1/298.257223563,i=(1-r)*n,a=Math.PI/180,o=e.lat*a,s=t.lat*a,c=(t.lon-e.lon)*a,l=Math.atan((1-r)*Math.tan(o)),u=Math.atan((1-r)*Math.tan(s)),d=Math.sin(l),f=Math.cos(l),p=Math.sin(u),m=Math.cos(u),h=c,g,_=1e3,v,y,b,x,S,C;do{let e=Math.sin(h),t=Math.cos(h);if(v=Math.sqrt(m*e*(m*e)+(f*p-d*m*t)*(f*p-d*m*t)),v===0)return 0;y=d*p+f*m*t,b=Math.atan2(v,y),x=f*m*e/v,S=1-x*x,C=y-2*d*p/S,isNaN(C)&&(C=0);let n=r/16*S*(4+r*(4-3*S));g=h,h=c+(1-n)*r*x*(b+n*v*(C+n*y*(-1+2*C*C)))}while(Math.abs(h-g)>1e-12&&--_>0);if(_===0)return NaN;let ee=S*(n*n-i*i)/(i*i),te=1+ee/16384*(4096+ee*(-768+ee*(320-175*ee))),w=ee/1024*(256+ee*(-128+ee*(74-47*ee))),ne=w*v*(C+w/4*(y*(-1+2*C*C)-w/6*C*(-3+4*v*v)*(-3+4*C*C)));return i*te*(b-ne)}},FX=class e{true;false;constructor(){this.true=new Set,this.false=new Set}insert(e,t){t?this.true.add(e):this.false.add(e)}delete(e,t){t?this.true.delete(e):this.false.delete(e)}getSize(){return this.true.size+this.false.size}toJSON(){return{true:Array.from(this.true),false:Array.from(this.false)}}static fromJSON(t){let n=new e;return n.true=new Set(t.true),n.false=new Set(t.false),n}};function IX(e,t,n,r,i,{k:a,b:o,d:s}){return Math.log(1+(n-t+.5)/(t+.5))*(s+e*(a+1))/(e+a*(1-o+o*r/i))}var LX=class e{size;vectors=new Map;constructor(e){this.size=e}add(e,t){t instanceof Float32Array||(t=new Float32Array(t));let n=RX(t,this.size);this.vectors.set(e,[n,t])}remove(e){this.vectors.delete(e)}find(e,t,n){return e instanceof Float32Array||(e=new Float32Array(e)),yte(e,n,this.vectors,this.size,t)}toJSON(){let e=[];for(let[t,[n,r]]of this.vectors)e.push([t,[n,Array.from(r)]]);return{size:this.size,vectors:e}}static fromJSON(t){let n=t,r=new e(n.size);for(let[e,[t,i]]of n.vectors)r.vectors.set(e,[t,new Float32Array(i)]);return r}};function RX(e,t){let n=0;for(let r=0;r<t;r++)n+=e[r]*e[r];return Math.sqrt(n)}function yte(e,t,n,r,i){let a=RX(e,r),o=[],s=t||n.keys();for(let t of s){let s=n.get(t);if(!s)continue;let c=s[0],l=s[1],u=0;for(let t=0;t<r;t++)u+=e[t]*l[t];let d=u/(a*c);d>=i&&o.push([t,d])}return o}function zX(e,t,n,r,i){let a=rX(e.sharedInternalDocumentStore,n);e.avgFieldLength[t]=((e.avgFieldLength[t]??0)*(i-1)+r.length)/i,e.fieldLengths[t][a]=r.length,e.frequencies[t][a]={}}function BX(e,t,n,r,i){let a=0;for(let e of r)e===i&&a++;let o=rX(e.sharedInternalDocumentStore,n),s=a/r.length;e.frequencies[t][o][i]=s,i in e.tokenOccurrences[t]||(e.tokenOccurrences[t][i]=0),e.tokenOccurrences[t][i]=(e.tokenOccurrences[t][i]??0)+1}function VX(e,t,n,r){let i=rX(e.sharedInternalDocumentStore,n);r>1?e.avgFieldLength[t]=(e.avgFieldLength[t]*r-e.fieldLengths[t][i])/(r-1):e.avgFieldLength[t]=void 0,e.fieldLengths[t][i]=void 0,e.frequencies[t][i]=void 0}function HX(e,t,n){e.tokenOccurrences[t][n]--}function UX(e,t,n,r,i=``){r||={sharedInternalDocumentStore:t,indexes:{},vectorIndexes:{},searchableProperties:[],searchablePropertiesWithTypes:{},frequencies:{},tokenOccurrences:{},avgFieldLength:{},fieldLengths:{}};for(let[a,o]of Object.entries(n)){let n=`${i}${i?`.`:``}${a}`;if(typeof o==`object`&&!Array.isArray(o)){UX(e,t,o,r,n);continue}if(XY(o))r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o,r.vectorIndexes[n]={type:`Vector`,node:new LX($Y(o)),isArray:!1};else{let e=/\[/.test(o);switch(o){case`boolean`:case`boolean[]`:r.indexes[n]={type:`Bool`,node:new FX,isArray:e};break;case`number`:case`number[]`:r.indexes[n]={type:`AVL`,node:new TX(0,[]),isArray:e};break;case`string`:case`string[]`:r.indexes[n]={type:`Radix`,node:new AX,isArray:e},r.avgFieldLength[n]=0,r.frequencies[n]={},r.tokenOccurrences[n]={},r.fieldLengths[n]={};break;case`enum`:case`enum[]`:r.indexes[n]={type:`Flat`,node:new EX,isArray:e};break;case`geopoint`:r.indexes[n]={type:`BKD`,node:new PX,isArray:e};break;default:throw UY(`INVALID_SCHEMA_TYPE`,Array.isArray(o)?`array`:o,n)}r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o}}return r}function WX(e,t,n,r,i,a,o,s){return c=>{let{type:l,node:u}=t.indexes[n];switch(l){case`Bool`:u[c?`true`:`false`].add(r);break;case`AVL`:{let e=s?.avlRebalanceThreshold??1;u.insert(c,r,e);break}case`Radix`:{let s=a.tokenize(c,i,n,!1);e.insertDocumentScoreParameters(t,n,r,s,o);for(let i of s)e.insertTokenScoreParameters(t,n,r,s,i),u.insert(i,r);break}case`Flat`:u.insert(c,r);break;case`BKD`:u.insert(c,[r]);break}}}function GX(e,t,n,r,i,a,o,s,c,l,u){if(XY(o))return KX(t,n,a,r,i);let d=WX(e,t,n,i,s,c,l,u);if(!ZY(o))return d(a);let f=a,p=f.length;for(let e=0;e<p;e++)d(f[e])}function KX(e,t,n,r,i){e.vectorIndexes[t].node.add(i,n)}function qX(e,t,n,r,i,a,o,s,c,l){if(XY(o))return t.vectorIndexes[n].node.remove(i),!0;let{type:u,node:d}=t.indexes[n];switch(u){case`AVL`:return d.removeDocument(a,i),!0;case`Bool`:return d[a?`true`:`false`].delete(i),!0;case`Radix`:{let o=c.tokenize(a,s,n);e.removeDocumentScoreParameters(t,n,r,l);for(let r of o)e.removeTokenScoreParameters(t,n,r),d.removeDocumentByWord(r,i);return!0}case`Flat`:return d.removeDocument(i,a),!0;case`BKD`:return d.removeDocByID(a,i),!1}}function JX(e,t,n,r,i,a,o,s,c,l){if(!ZY(o))return qX(e,t,n,r,i,a,o,s,c,l);let u=QY(o),d=a,f=d.length;for(let a=0;a<f;a++)qX(e,t,n,r,i,d[a],u,s,c,l);return!0}function YX(e,t,n,r,i,a,o,s,c,l){let u=Array.from(r),d=e.avgFieldLength[t],f=e.fieldLengths[t],p=e.tokenOccurrences[t],m=e.frequencies[t],h=typeof p[n]==`number`?p[n]??0:0,g=u.length;for(let e=0;e<g;e++){let r=u[e];if(c&&!c.has(r))continue;l.has(r)||l.set(r,new Map);let p=l.get(r);p.set(t,(p.get(t)||0)+1);let g=IX(m?.[r]?.[n]??0,h,i,f[r],d,a);o.has(r)?o.set(r,o.get(r)+g*s):o.set(r,g*s)}}function XX(e,t,n,r,i,a,o,s,c,l,u,d=0){let f=n.tokenize(t,r),p=f.length||1,m=new Map,h=new Map,g=new Map;for(let n of i){if(!(n in e.indexes))continue;let r=e.indexes[n],{type:i}=r;if(i!==`Radix`)throw UY(`WRONG_SEARCH_PROPERTY_TYPE`,n);let d=s[n]??1;if(d<=0)throw UY(`INVALID_BOOST_VALUE`,d);f.length===0&&!t&&f.push(``);let p=f.length;for(let t=0;t<p;t++){let i=f[t],s=r.node.find({term:i,exact:a,tolerance:o}),p=Object.keys(s);p.length>0&&h.set(i,!0);let _=p.length;for(let t=0;t<_;t++){let r=p[t],i=s[r];YX(e,n,r,i,l,c,g,d,u,m)}}}let _=Array.from(g.entries()).map(([e,t])=>[e,t]).sort((e,t)=>t[1]-e[1]);if(_.length===0)return[];if(d===1)return _;if(d===0){if(p===1)return _;for(let e of f)if(!h.get(e))return[];return _.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1})}let v=_.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1});if(v.length>0){let e=_.filter(([e])=>!v.some(([t])=>t===e)),t=Math.ceil(e.length*d);return[...v,...e.slice(0,t)]}return _}function ZX(e,t,n,r){if(`and`in n&&n.and&&Array.isArray(n.and)){let i=n.and;return i.length===0?new Set:LY(...i.map(n=>ZX(e,t,n,r)))}if(`or`in n&&n.or&&Array.isArray(n.or)){let i=n.or;return i.length===0?new Set:i.map(n=>ZX(e,t,n,r)).reduce((e,t)=>zY(e,t),new Set)}if(`not`in n&&n.not){let i=n.not,a=new Set,o=e.sharedInternalDocumentStore;for(let e=1;e<=o.internalIdToId.length;e++)a.add(e);return BY(a,ZX(e,t,i,r))}let i=Object.keys(n),a=i.reduce((e,t)=>({[t]:new Set,...e}),{});for(let o of i){let i=n[o];if(e.indexes[o]===void 0)throw UY(`UNKNOWN_FILTER_PROPERTY`,o);let{node:s,type:c,isArray:l}=e.indexes[o];if(c===`Bool`){let e=s,t=i?e.true:e.false;a[o]=zY(a[o],t);continue}if(c===`BKD`){let e;if(`radius`in i)e=`radius`;else if(`polygon`in i)e=`polygon`;else throw Error(`Invalid operation ${i}`);if(e===`radius`){let{value:t,coordinates:n,unit:r=`m`,inside:c=!0,highPrecision:l=!1}=i[e],u=NY(t,r),d=s.searchByRadius(n,u,c,void 0,l);a[o]=rZ(a[o],d)}else{let{coordinates:t,inside:n=!0,highPrecision:r=!1}=i[e],c=s.searchByPolygon(t,n,void 0,r);a[o]=rZ(a[o],c)}continue}if(c===`Radix`&&(typeof i==`string`||Array.isArray(i))){for(let e of[i].flat()){let n=t.tokenize(e,r,o);for(let e of n){let t=s.find({term:e,exact:!0});a[o]=sZ(a[o],t)}}continue}let u=Object.keys(i);if(u.length>1)throw UY(`INVALID_FILTER_OPERATION`,u.length);if(c===`Flat`){let e=new Set(l?s.filterArr(i):s.filter(i));a[o]=zY(a[o],e);continue}if(c===`AVL`){let e=u[0],t=i[e],n;switch(e){case`gt`:n=s.greaterThan(t,!1);break;case`gte`:n=s.greaterThan(t,!0);break;case`lt`:n=s.lessThan(t,!1);break;case`lte`:n=s.lessThan(t,!0);break;case`eq`:n=s.find(t)??new Set;break;case`between`:{let[e,r]=t;n=s.rangeSearch(e,r);break}default:throw UY(`INVALID_FILTER_OPERATION`,e)}a[o]=zY(a[o],n)}}return LY(...Object.values(a))}function QX(e){return e.searchableProperties}function $X(e){return e.searchablePropertiesWithTypes}function eZ(e,t){let{indexes:n,vectorIndexes:r,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}=t,u={},d={};for(let e of Object.keys(n)){let{node:t,type:r,isArray:i}=n[e];switch(r){case`Radix`:u[e]={type:`Radix`,node:AX.fromJSON(t),isArray:i};break;case`Flat`:u[e]={type:`Flat`,node:EX.fromJSON(t),isArray:i};break;case`AVL`:u[e]={type:`AVL`,node:TX.fromJSON(t),isArray:i};break;case`BKD`:u[e]={type:`BKD`,node:PX.fromJSON(t),isArray:i};break;case`Bool`:u[e]={type:`Bool`,node:FX.fromJSON(t),isArray:i};break;default:u[e]=n[e]}}for(let e of Object.keys(r))d[e]={type:`Vector`,isArray:!1,node:LX.fromJSON(r[e])};return{sharedInternalDocumentStore:e,indexes:u,vectorIndexes:d,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}}function tZ(e){let{indexes:t,vectorIndexes:n,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}=e,l={};for(let e of Object.keys(n))l[e]=n[e].node.toJSON();let u={};for(let e of Object.keys(t)){let{type:n,node:r,isArray:i}=t[e];n===`Flat`||n===`Radix`||n===`AVL`||n===`BKD`||n===`Bool`?u[e]={type:n,node:r.toJSON(),isArray:i}:(u[e]=t[e],u[e].node=u[e].node.toJSON())}return{indexes:u,vectorIndexes:l,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}}function nZ(){return{create:UX,insert:GX,remove:JX,insertDocumentScoreParameters:zX,insertTokenScoreParameters:BX,removeDocumentScoreParameters:VX,removeTokenScoreParameters:HX,calculateResultScores:YX,search:XX,searchByWhereClause:ZX,getSearchableProperties:QX,getSearchablePropertiesWithTypes:$X,load:eZ,save:tZ}}function rZ(e,t){e||=new Set;let n=t.length;for(let r=0;r<n;r++){let n=t[r].docIDs,i=n.length;for(let t=0;t<i;t++)e.add(n[t])}return e}function iZ(e,t,n=!1){let r=n?PX.vincentyDistance:PX.haversineDistance,i=[],a=[];for(let{point:n}of e)a.push(r(t,n));let o=Math.max(...a),s=0;for(let{docIDs:t}of e){let e=o-a[s]+1;for(let n of t)i.push([n,e]);s++}return i.sort((e,t)=>t[1]-e[1]),i}function aZ(e,t){let n=Object.keys(e);if(n.length!==1)return{isGeoOnly:!1};let r=n[0],i=e[r];if(t.indexes[r]===void 0)return{isGeoOnly:!1};let{type:a}=t.indexes[r];return a===`BKD`&&i&&(`radius`in i||`polygon`in i)?{isGeoOnly:!0,geoProperty:r,geoOperation:i}:{isGeoOnly:!1}}function oZ(e,t){let n=e,r=aZ(t,n);if(!r.isGeoOnly||!r.geoProperty||!r.geoOperation)return null;let{node:i}=n.indexes[r.geoProperty],a=r.geoOperation,o=i,s;if(`radius`in a){let{value:e,coordinates:t,unit:n=`m`,inside:r=!0,highPrecision:i=!1}=a.radius,c=t,l=NY(e,n);return s=o.searchByRadius(c,l,r,`asc`,i),iZ(s,c,i)}else if(`polygon`in a){let{coordinates:e,inside:t=!0,highPrecision:n=!1}=a.polygon;s=o.searchByPolygon(e,t,`asc`,n);let r=PX.calculatePolygonCentroid(e);return iZ(s,r,n)}return null}function sZ(e,t){e||=new Set;let n=Object.keys(t),r=n.length;for(let i=0;i<r;i++){let r=t[n[i]],a=r.length;for(let t=0;t<a;t++)e.add(r[t])}return e}function cZ(e,t,n,r,i){let a={language:e.tokenizer.language,sharedInternalDocumentStore:t,enabled:!0,isSorted:!0,sortableProperties:[],sortablePropertiesWithTypes:{},sorts:{}};for(let[o,s]of Object.entries(n)){let n=`${i}${i?`.`:``}${o}`;if(!r.includes(n)){if(typeof s==`object`&&!Array.isArray(s)){let i=cZ(e,t,s,r,n);yY(a.sortableProperties,i.sortableProperties),a.sorts={...a.sorts,...i.sorts},a.sortablePropertiesWithTypes={...a.sortablePropertiesWithTypes,...i.sortablePropertiesWithTypes};continue}if(!XY(s))switch(s){case`boolean`:case`number`:case`string`:a.sortableProperties.push(n),a.sortablePropertiesWithTypes[n]=s,a.sorts[n]={docs:new Map,orderedDocsToRemove:new Map,orderedDocs:[],type:s};break;case`geopoint`:case`enum`:continue;case`enum[]`:case`boolean[]`:case`number[]`:case`string[]`:continue;default:throw UY(`INVALID_SORT_SCHEMA_TYPE`,Array.isArray(s)?`array`:s,n)}}}return a}function lZ(e,t,n,r){return r?.enabled===!1?{disabled:!0}:cZ(e,t,n,(r||{}).unsortableProperties||[],``)}function uZ(e,t,n,r){if(!e.enabled)return;e.isSorted=!1;let i=rX(e.sharedInternalDocumentStore,n),a=e.sorts[t];a.orderedDocsToRemove.has(i)&&_Z(e,t),a.docs.set(i,a.orderedDocs.length),a.orderedDocs.push([i,r])}function dZ(e){if(e.isSorted||!e.enabled)return;let t=Object.keys(e.sorts);for(let n of t)hZ(e,n);e.isSorted=!0}function fZ(e,t,n){return t[1].localeCompare(n[1],fY(e))}function pZ(e,t){return e[1]-t[1]}function mZ(e,t){return t[1]?-1:1}function hZ(e,t){let n=e.sorts[t],r;switch(n.type){case`string`:r=fZ.bind(null,e.language);break;case`number`:r=pZ.bind(null);break;case`boolean`:r=mZ.bind(null);break}n.orderedDocs.sort(r);let i=n.orderedDocs.length;for(let e=0;e<i;e++){let t=n.orderedDocs[e][0];n.docs.set(t,e)}}function gZ(e){let t=Object.keys(e.sorts);for(let n of t)_Z(e,n)}function _Z(e,t){let n=e.sorts[t];n.orderedDocsToRemove.size&&(n.orderedDocs=n.orderedDocs.filter(e=>!n.orderedDocsToRemove.has(e[0])),n.orderedDocsToRemove.clear())}function vZ(e,t,n){if(!e.enabled)return;let r=e.sorts[t],i=rX(e.sharedInternalDocumentStore,n);r.docs.get(i)&&(r.docs.delete(i),r.orderedDocsToRemove.set(i,!0))}function yZ(e,t,n){if(!e.enabled)throw UY(`SORT_DISABLED`);let r=n.property,i=n.order===`DESC`,a=e.sorts[r];if(!a)throw UY(`UNABLE_TO_SORT_ON_UNKNOWN_FIELD`,r,e.sortableProperties.join(`, `));return _Z(e,r),dZ(e),t.sort((t,n)=>{let r=a.docs.get(rX(e.sharedInternalDocumentStore,t[0])),o=a.docs.get(rX(e.sharedInternalDocumentStore,n[0])),s=r!==void 0,c=o!==void 0;return!s&&!c?0:s?c?i?o-r:r-o:-1:1}),t}function bZ(e){return e.enabled?e.sortableProperties:[]}function xZ(e){return e.enabled?e.sortablePropertiesWithTypes:{}}function SZ(e,t){let n=t;if(!n.enabled)return{enabled:!1};let r=Object.keys(n.sorts).reduce((e,t)=>{let{docs:r,orderedDocs:i,type:a}=n.sorts[t];return e[t]={docs:new Map(Object.entries(r).map(([e,t])=>[+e,t])),orderedDocsToRemove:new Map,orderedDocs:i,type:a},e},{});return{sharedInternalDocumentStore:e,language:n.language,sortableProperties:n.sortableProperties,sortablePropertiesWithTypes:n.sortablePropertiesWithTypes,sorts:r,enabled:!0,isSorted:n.isSorted}}function CZ(e){if(!e.enabled)return{enabled:!1};gZ(e),dZ(e);let t=Object.keys(e.sorts).reduce((t,n)=>{let{docs:r,orderedDocs:i,type:a}=e.sorts[n];return t[n]={docs:Object.fromEntries(r.entries()),orderedDocs:i,type:a},t},{});return{language:e.language,sortableProperties:e.sortableProperties,sortablePropertiesWithTypes:e.sortablePropertiesWithTypes,sorts:t,enabled:e.enabled,isSorted:e.isSorted}}function wZ(){return{create:lZ,insert:uZ,remove:vZ,save:CZ,load:SZ,sortBy:yZ,getSortableProperties:bZ,getSortablePropertiesWithTypes:xZ}}var TZ=192,EZ=383,DZ=[65,65,65,65,65,65,65,67,69,69,69,69,73,73,73,73,69,78,79,79,79,79,79,null,79,85,85,85,85,89,80,115,97,97,97,97,97,97,97,99,101,101,101,101,105,105,105,105,101,110,111,111,111,111,111,null,111,117,117,117,117,121,112,121,65,97,65,97,65,97,67,99,67,99,67,99,67,99,68,100,68,100,69,101,69,101,69,101,69,101,69,101,71,103,71,103,71,103,71,103,72,104,72,104,73,105,73,105,73,105,73,105,73,105,73,105,74,106,75,107,107,76,108,76,108,76,108,76,108,76,108,78,110,78,110,78,110,110,78,110,79,111,79,111,79,111,79,111,82,114,82,114,82,114,83,115,83,115,83,115,83,115,84,116,84,116,84,116,85,117,85,117,85,117,85,117,85,117,85,117,87,119,89,121,89,90,122,90,122,90,122,115];function OZ(e){return e<TZ||e>EZ?e:DZ[e-TZ]||e}function kZ(e){let t=[];for(let n=0;n<e.length;n++)t[n]=OZ(e.charCodeAt(n));return String.fromCharCode(...t)}var AZ={ational:`ate`,tional:`tion`,enci:`ence`,anci:`ance`,izer:`ize`,bli:`ble`,alli:`al`,entli:`ent`,eli:`e`,ousli:`ous`,ization:`ize`,ation:`ate`,ator:`ate`,alism:`al`,iveness:`ive`,fulness:`ful`,ousness:`ous`,aliti:`al`,iviti:`ive`,biliti:`ble`,logi:`log`},jZ={icate:`ic`,ative:``,alize:`al`,iciti:`ic`,ical:`ic`,ful:``,ness:``},MZ=`[^aeiou]`,NZ=`[aeiouy]`,PZ=MZ+`[^aeiouy]*`;NZ+``;var FZ=`^(`+PZ+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*`,IZ=`^(`+PZ+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$`,LZ=`^(`+PZ+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*[aeiouy][aeiou]*[^aeiou][^aeiouy]*`,RZ=`^(`+PZ+`)?[aeiouy]`;function zZ(e){let t,n,r,i,a,o;if(e.length<3)return e;let s=e.substring(0,1);if(s==`y`&&(e=s.toUpperCase()+e.substring(1)),r=/^(.+?)(ss|i)es$/,i=/^(.+?)([^s])s$/,r.test(e)?e=e.replace(r,`$1$2`):i.test(e)&&(e=e.replace(i,`$1$2`)),r=/^(.+?)eed$/,i=/^(.+?)(ed|ing)$/,r.test(e)){let t=r.exec(e);r=new RegExp(FZ),r.test(t[1])&&(r=/.$/,e=e.replace(r,``))}else i.test(e)&&(t=i.exec(e)[1],i=new RegExp(RZ),i.test(t)&&(e=t,i=/(at|bl|iz)$/,a=RegExp(`([^aeiouylsz])\\1$`),o=RegExp(`^`+PZ+NZ+`[^aeiouwxy]$`),i.test(e)?e+=`e`:a.test(e)?(r=/.$/,e=e.replace(r,``)):o.test(e)&&(e+=`e`)));if(r=/^(.+?)y$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(RZ),t&&r.test(t)&&(e=t+`i`)),r=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(FZ),t&&r.test(t)&&(e=t+AZ[n])}if(r=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(FZ),t&&r.test(t)&&(e=t+jZ[n])}if(r=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,i=/^(.+?)(s|t)(ion)$/,r.test(e))t=r.exec(e)?.[1],r=new RegExp(LZ),t&&r.test(t)&&(e=t);else if(i.test(e)){let n=i.exec(e);t=n?.[1]??``+n?.[2]??``,i=new RegExp(LZ),i.test(t)&&(e=t)}return r=/^(.+?)e$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(LZ),i=new RegExp(IZ),a=RegExp(`^`+PZ+NZ+`[^aeiouwxy]$`),t&&(r.test(t)||i.test(t)&&!a.test(t))&&(e=t)),r=/ll$/,i=new RegExp(LZ),r.test(e)&&i.test(e)&&(r=/.$/,e=e.replace(r,``)),s==`y`&&(e=s.toLowerCase()+e.substring(1)),e}function BZ(e,t,n=!0){let r=`${this.language}:${e}:${t}`;return n&&this.normalizationCache.has(r)?this.normalizationCache.get(r):this.stopWords?.includes(t)?(n&&this.normalizationCache.set(r,``),``):(this.stemmer&&!this.stemmerSkipProperties.has(e)&&(t=this.stemmer(t)),t=kZ(t),n&&this.normalizationCache.set(r,t),t)}function VZ(e){for(;e[e.length-1]===``;)e.pop();for(;e[0]===``;)e.shift();return e}function HZ(e,t,n,r=!0){if(t&&t!==this.language)throw UY(`LANGUAGE_NOT_SUPPORTED`,t);if(typeof e!=`string`)return[e];let i=this.normalizeToken.bind(this,n??``),a;if(n&&this.tokenizeSkipProperties.has(n))a=[i(e,r)];else{let t=uY[this.language];a=e.toLowerCase().split(t).map(e=>i(e,r)).filter(Boolean)}let o=VZ(a);return this.allowDuplicates?o:Array.from(new Set(o))}function UZ(e={}){if(!e.language)e.language=`english`;else if(!dY.includes(e.language))throw UY(`LANGUAGE_NOT_SUPPORTED`,e.language);let t;if(e.stemming||e.stemmer&&!(`stemming`in e))if(e.stemmer){if(typeof e.stemmer!=`function`)throw UY(`INVALID_STEMMER_FUNCTION_TYPE`);t=e.stemmer}else if(e.language===`english`)t=zZ;else throw UY(`MISSING_STEMMER`,e.language);let n;if(e.stopWords!==!1){if(n=[],Array.isArray(e.stopWords))n=e.stopWords;else if(typeof e.stopWords==`function`)n=e.stopWords(n);else if(e.stopWords)throw UY(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);if(!Array.isArray(n))throw UY(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);for(let e of n)if(typeof e!=`string`)throw UY(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`)}let r={tokenize:HZ,language:e.language,stemmer:t,stemmerSkipProperties:new Set(e.stemmerSkipProperties?[e.stemmerSkipProperties].flat():[]),tokenizeSkipProperties:new Set(e.tokenizeSkipProperties?[e.tokenizeSkipProperties].flat():[]),stopWords:n,allowDuplicates:!!e.allowDuplicates,normalizeToken:BZ,normalizationCache:new Map};return r.tokenize=HZ.bind(r),r.normalizeToken=BZ,r}function WZ(e){return{sharedInternalDocumentStore:e,rules:new Map}}function GZ(e,t){if(e.rules.has(t.id))throw Error(`PINNING_RULE_ALREADY_EXISTS: A pinning rule with id "${t.id}" already exists. Use updateRule to modify it.`);e.rules.set(t.id,t)}function KZ(e,t){if(!e.rules.has(t.id))throw Error(`PINNING_RULE_NOT_FOUND: Cannot update pinning rule with id "${t.id}" because it does not exist. Use addRule to create it.`);e.rules.set(t.id,t)}function qZ(e,t){return e.rules.delete(t)}function JZ(e,t){return e.rules.get(t)}function YZ(e){return Array.from(e.rules.values())}function XZ(e,t){let n=e.toLowerCase().trim(),r=t.pattern.toLowerCase().trim();switch(t.anchoring){case`is`:return n===r;case`starts_with`:return n.startsWith(r);case`contains`:return n.includes(r);default:return!1}}function ZZ(e,t){return e?t.conditions.every(t=>XZ(e,t)):!1}function QZ(e,t){if(!t)return[];let n=[];for(let r of e.rules.values())ZZ(t,r)&&n.push(r);return n}function $Z(e,t){return{sharedInternalDocumentStore:e,rules:new Map(t?.rules??[])}}function eQ(e){return{rules:Array.from(e.rules.entries())}}function tQ(){return{create:WZ,addRule:GZ,updateRule:KZ,removeRule:qZ,getRule:JZ,getAllRules:YZ,getMatchingRules:QZ,load:$Z,save:eQ}}function nQ(e){let t={formatElapsedTime:WY,getDocumentIndexId:GY,getDocumentProperties:AY,validateSchema:KY};for(let n of vX){let r=n;if(e[r]){if(typeof e[r]!=`function`)throw UY(`COMPONENT_MUST_BE_FUNCTION`,r)}else e[r]=t[r]}for(let t of Object.keys(e))if(!_X.includes(t)&&!vX.includes(t))throw UY(`UNSUPPORTED_COMPONENT`,t)}function rQ({schema:e,sort:t,language:n,components:r,id:i,plugins:a}){r||={};for(let t of a??[]){if(!(`getComponents`in t)||typeof t.getComponents!=`function`)continue;let n=t.getComponents(e),i=Object.keys(n);for(let e of i)if(r[e])throw UY(`PLUGIN_COMPONENT_CONFLICT`,e,t.name);r={...r,...n}}i||=EY();let o=r.tokenizer,s=r.index,c=r.documentsStore,l=r.sorter,u=r.pinning;if(o=o?o.tokenize?o:UZ(o):UZ({language:n??`english`}),r.tokenizer&&n)throw UY(`NO_LANGUAGE_WITH_CUSTOM_TOKENIZER`);let d=eX();s||=nZ(),l||=wZ(),c||=mX(),u||=tQ(),nQ(r);let{getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,formatElapsedTime:h}=r,g={data:{},caches:{},schema:e,tokenizer:o,index:s,sorter:l,documentsStore:c,pinning:u,internalDocumentIDStore:d,getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,beforeInsert:[],afterInsert:[],beforeRemove:[],afterRemove:[],beforeUpdate:[],afterUpdate:[],beforeUpsert:[],afterUpsert:[],beforeSearch:[],afterSearch:[],beforeInsertMultiple:[],afterInsertMultiple:[],beforeRemoveMultiple:[],afterRemoveMultiple:[],beforeUpdateMultiple:[],afterUpdateMultiple:[],beforeUpsertMultiple:[],afterUpsertMultiple:[],afterCreate:[],formatElapsedTime:h,id:i,plugins:a,version:iQ()};g.data={index:g.index.create(g,d,e),docs:g.documentsStore.create(g,d),sorting:g.sorter.create(g,d,e,t),pinning:g.pinning.create(d)};for(let e of hX)g[e]=(g[e]??[]).concat(gX(g,e));let _=g.afterCreate;return _&&CX(_,g),g}function iQ(){return`{{VERSION}}`}function aQ(e){return e.documentsStore.count(e.data.docs)}function oQ(e,t,n,r,i){let a=e.validateSchema(t,e.schema);if(a)throw UY(`SCHEMA_VALIDATION_FAILURE`,a);return FY(e.beforeInsert)||FY(e.afterInsert)||FY(e.index.beforeInsert)||FY(e.index.insert)||FY(e.index.afterInsert)?lQ(e,t,n,r,i):uQ(e,t,n,r,i)}var sQ=new Set([`enum`,`enum[]`]),cQ=new Set([`string`,`number`]);async function lQ(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw UY(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=rX(e.internalDocumentIDStore,s);if(r||await yX(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw UY(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];dQ(n,r,e,t)}return await fQ(e,s,u,f,l,n,t,i),r||await yX(e.afterInsert,e,s,t),s}function uQ(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw UY(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=rX(e.internalDocumentIDStore,s);if(r||yX(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw UY(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];dQ(n,r,e,t)}return pQ(e,s,u,f,l,n,t,i),r||yX(e.afterInsert,e,s,t),s}function dQ(e,t,n,r){if(!(YY(t)&&typeof r==`object`&&typeof r.lon==`number`&&typeof r.lat==`number`)&&!(XY(t)&&Array.isArray(r))&&!(ZY(t)&&Array.isArray(r))&&!(sQ.has(t)&&cQ.has(e))&&e!==t)throw UY(`INVALID_DOCUMENT_PROPERTY`,n,t,e)}async function fQ(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o];await e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i);let l=e.internalDocumentIDStore.idToInternalId.get(t);await e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),await e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function pQ(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o],l=rX(e.internalDocumentIDStore,t);e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i),e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function mQ(e,t,n,r,i,a){return FY(e.afterInsertMultiple)||FY(e.beforeInsertMultiple)||FY(e.index.beforeInsert)||FY(e.index.insert)||FY(e.index.afterInsert)?hQ(e,t,n,r,i,a):gQ(e,t,n,r,i,a)}async function hQ(e,t,n=1e3,r,i,a=0){let o=[],s=async a=>{let s=Math.min(a+n,t.length),c=t.slice(a,s);for(let t of c){let n=await oQ(e,t,r,i,{avlRebalanceThreshold:c.length});o.push(n)}return s};return await(async()=>{let e=0;for(;e<t.length;){let t=Date.now();if(e=await s(e),a>0){let e=a-(Date.now()-t);e>0&&VY(e)}}})(),i||await bX(e.afterInsertMultiple,e,t),o}function gQ(e,t,n=1e3,r,i,a=0){let o=[],s=0;function c(){let a=t.slice(s*n,(s+1)*n);if(a.length===0)return!1;for(let t of a){let n=oQ(e,t,r,i,{avlRebalanceThreshold:a.length});o.push(n)}return s++,!0}function l(){let e=Date.now();for(;c();)if(a>0){let t=Date.now()-e;if(t>=a){let e=a-t%a;e>0&&VY(e)}}}return l(),i||bX(e.afterInsertMultiple,e,t),o}function _Q(e,t){return e[1]-t[1]}function vQ(e,t){return t[1]-e[1]}function yQ(e=`desc`){return e.toLowerCase()===`asc`?_Q:vQ}function bQ(e,t,n){let r={},i=t.map(([e])=>e),a=e.documentsStore.getMultiple(e.data.docs,i),o=Object.keys(n),s=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e of o){let t;if(s[e]===`number`){let{ranges:r}=n[e],i=r.length,a=Array.from({length:i});for(let e=0;e<i;e++){let t=r[e];a[e]=[`${t.from}-${t.to}`,0]}t=Object.fromEntries(a)}r[e]={count:0,values:t??{}}}let c=a.length;for(let e=0;e<c;e++){let t=a[e];for(let e of o){let i=e.includes(`.`)?jY(t,e):t[e],a=s[e],o=r[e].values;switch(a){case`number`:{let t=n[e].ranges;xQ(t,o)(i);break}case`number[]`:{let t=new Set,r=n[e].ranges,a=xQ(r,o,t);for(let e of i)a(e);break}case`boolean`:case`enum`:case`string`:SQ(o,a)(i);break;case`boolean[]`:case`enum[]`:case`string[]`:{let e=SQ(o,a===`boolean[]`?`boolean`:`string`,new Set);for(let t of i)e(t);break}default:throw UY(`FACET_NOT_SUPPORTED`,a)}}}for(let e of o){let t=r[e];if(t.count=Object.keys(t.values).length,s[e]===`string`){let r=n[e],i=yQ(r.sort);t.values=Object.fromEntries(Object.entries(t.values).sort(i).slice(r.offset??0,r.limit??10))}}return r}function xQ(e,t,n){return r=>{for(let i of e){let e=`${i.from}-${i.to}`;n?.has(e)||r>=i.from&&r<=i.to&&(t[e]===void 0?t[e]=1:(t[e]++,n?.add(e)))}}}function SQ(e,t,n){let r=t===`boolean`?`false`:``;return t=>{let i=t?.toString()??r;n?.has(i)||(e[i]=(e[i]??0)+1,n?.add(i))}}var CQ={reducer:(e,t,n,r)=>(t[r]=n,t),getInitialValue:e=>Array.from({length:e})},wQ=[`string`,`number`,`boolean`];function TQ(e,t,n){let r=n.properties,i=r.length,a=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e=0;e<i;e++){let t=r[e];if(a[t]===void 0)throw UY(`UNKNOWN_GROUP_BY_PROPERTY`,t);if(!wQ.includes(a[t]))throw UY(`INVALID_GROUP_BY_PROPERTY`,t,wQ.join(`, `),a[t])}let o=t.map(([t])=>iX(e.internalDocumentIDStore,t)),s=e.documentsStore.getMultiple(e.data.docs,o),c=s.length,l=n.maxResult||2**53-1,u=[],d={};for(let e=0;e<i;e++){let t=r[e],n={property:t,perValue:{}},i=new Set;for(let e=0;e<c;e++){let r=s[e],a=jY(r,t);if(a===void 0)continue;let o=typeof a==`boolean`?``+a:a,c=n.perValue[o]??{indexes:[],count:0};c.count>=l||(c.indexes.push(e),c.count++,n.perValue[o]=c,i.add(a))}u.push(Array.from(i)),d[t]=n}let f=EQ(u),p=f.length,m=[];for(let e=0;e<p;e++){let t=f[e],n=t.length,i={values:[],indexes:[]},a=[];for(let e=0;e<n;e++){let n=t[e],o=r[e];a.push(d[o].perValue[typeof n==`boolean`?``+n:n].indexes),i.values.push(n)}i.indexes=kY(a).sort((e,t)=>e-t),i.indexes.length!==0&&m.push(i)}let h=m.length,g=Array.from({length:h});for(let e=0;e<h;e++){let r=m[e],i=n.reduce||CQ,a=r.indexes.map(e=>({id:o[e],score:t[e][1],document:s[e]})),c=i.reducer.bind(null,r.values),l=i.getInitialValue(r.indexes.length),u=a.reduce(c,l);g[e]={values:r.values,result:u}}return g}function EQ(e,t=0){if(t+1===e.length)return e[t].map(e=>[e]);let n=e[t],r=EQ(e,t+1),i=[];for(let e of n)for(let t of r){let n=[e];yY(n,t),i.push(n)}return i}function DQ(e,t,n,r){let i=QZ(t,r);if(i.length===0)return n;let a=i.flatMap(e=>e.consequence.promote);a.sort((e,t)=>e.position-t.position);let o=new Set,s=new Map,c=new Set;for(let t of a){let n=rX(e.internalDocumentIDStore,t.doc_id);if(n!==void 0){if(s.has(n)){let e=s.get(n);t.position<e&&s.set(n,t.position);continue}c.has(t.position)||(o.add(n),s.set(n,t.position),c.add(t.position))}}if(s.size===0)return n;let l=n.filter(([e])=>!o.has(e)),u=[];for(let[t,r]of s.entries())n.find(([e])=>e===t)?u.push([t,1e6-r]):e.documentsStore.get(e.data.docs,t)&&u.push([t,0]);u.sort((e,t)=>(s.get(e[0])??1/0)-(s.get(t[0])??1/0));let d=[],f=new Map;for(let e of u){let t=s.get(e[0]);f.set(t,e)}let p=0,m=0;for(;m<l.length+u.length;)if(f.has(m))d.push(f.get(m)),m++;else if(p<l.length)d.push(l[p]),p++,m++;else break;for(let[e,t]of f.entries())e>=d.length&&d.push(t);return d}function OQ(e,t,n){let{term:r,properties:i}=t,a=e.data.index,o=e.caches.propertiesToSearch;if(!o){let t=e.index.getSearchablePropertiesWithTypes(a);o=e.index.getSearchableProperties(a),o=o.filter(e=>t[e].startsWith(`string`)),e.caches.propertiesToSearch=o}if(i&&i!==`*`){for(let e of i)if(!o.includes(e))throw UY(`UNKNOWN_INDEX`,e,o.join(`, `));o=o.filter(e=>i.includes(e))}let s=Object.keys(t.where??{}).length>0,c;s&&(c=e.index.searchByWhereClause(a,e.tokenizer,t.where,n));let l,u=t.threshold!==void 0&&t.threshold!==null?t.threshold:1;if(r||i){let i=aQ(e);if(l=e.index.search(a,r||``,e.tokenizer,n,o,t.exact||!1,t.tolerance||0,t.boost||{},NQ(t.relevance),i,c,u),t.exact&&r){let t=r.trim().split(/\s+/);l=l.filter(([n])=>{let r=e.documentsStore.get(e.data.docs,n);if(!r)return!1;for(let e of o){let n=AQ(r,e);if(typeof n==`string`&&t.every(e=>RegExp(`\\b${kQ(e)}\\b`).test(n)))return!0}return!1})}}else l=s?oZ(a,t.where)||(c?Array.from(c):[]).map(e=>[+e,0]):Object.keys(e.documentsStore.getAll(e.data.docs)).map(e=>[+e,0]);return l}function kQ(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function AQ(e,t){let n=t.split(`.`),r=e;for(let e of n)if(r&&typeof r==`object`&&e in r)r=r[e];else return;return r}function jQ(e,t,n){let r=TY();function i(){let i=Object.keys(e.data.index.vectorIndexes),a=t.facets&&Object.keys(t.facets).length>0,{limit:o=10,offset:s=0,distinctOn:c,includeVectors:l=!1}=t,u=t.preflight===!0,d=OQ(e,t,n);if(t.sortBy)if(typeof t.sortBy==`function`){let n=d.map(([e])=>e),r=e.documentsStore.getMultiple(e.data.docs,n).map((e,t)=>[d[t][0],d[t][1],e]);r.sort(t.sortBy),d=r.map(([e,t])=>[e,t])}else d=e.sorter.sortBy(e.data.sorting,d,t.sortBy).map(([t,n])=>[rX(e.internalDocumentIDStore,t),n]);else d=d.sort(OY);d=DQ(e,e.data.pinning,d,t.term);let f;u||(f=c?GQ(e,d,s,o,c):KQ(e,d,s,o));let p={elapsed:{formatted:``,raw:0},hits:[],count:d.length};return f!==void 0&&(p.hits=f.filter(Boolean),l||PY(p,i)),a&&(p.facets=bQ(e,d,t.facets)),t.groupBy&&(p.groups=TQ(e,d,t.groupBy)),p.elapsed=e.formatElapsedTime(TY()-r),p}async function a(){e.beforeSearch&&await SX(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await xX(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}var MQ={k:1.2,b:.75,d:.5};function NQ(e){let t=e??{};return t.k=t.k??MQ.k,t.b=t.b??MQ.b,t.d=t.d??MQ.d,t}function PQ(e,t,n){let r=t.vector;if(r&&(!(`value`in r)||!(`property`in r)))throw UY(`INVALID_VECTOR_INPUT`,Object.keys(r).join(`, `));let i=e.data.index.vectorIndexes[r.property];if(!i)throw UY(`UNKNOWN_VECTOR_PROPERTY`,r.property);let a=i.node.size;if(r?.value.length!==a)throw r?.property===void 0||r?.value.length===void 0?UY(`INVALID_INPUT_VECTOR`,`undefined`,a,`undefined`):UY(`INVALID_INPUT_VECTOR`,r.property,a,r.value.length);let o=e.data.index,s;return Object.keys(t.where??{}).length>0&&(s=e.index.searchByWhereClause(o,e.tokenizer,t.where,n)),i.node.find(r.value,t.similarity??.8,s)}function FQ(e,t,n=`english`){let r=TY();function i(){let i=PQ(e,t,n).sort(OY);i=DQ(e,e.data.pinning,i,void 0);let a=[];t.facets&&Object.keys(t.facets).length>0&&(a=bQ(e,i,t.facets));let o=t.vector.property,s=t.includeVectors??!1,c=t.limit??10,l=t.offset??0,u=Array.from({length:c});for(let t=0;t<c;t++){let n=i[t+l];if(!n)break;let r=e.data.docs.docs[n[0]];r&&(s||(r[o]=null),u[t]={id:iX(e.internalDocumentIDStore,n[0]),score:n[1],document:r})}let d=[];t.groupBy&&(d=TQ(e,i,t.groupBy));let f=TY()-r;return{count:i.length,hits:u.filter(Boolean),elapsed:{raw:Number(f),formatted:wY(f)},...a?{facets:a}:{},...d?{groups:d}:{}}}async function a(){e.beforeSearch&&await SX(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await xX(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function IQ(e,t,n){let r=zQ(OQ(e,t,n)),i=PQ(e,t,n),a=t.hybridWeights;return HQ(r,i,t.term??``,a)}function LQ(e,t,n){let r=TY();function i(){let i=IQ(e,t,n);i=DQ(e,e.data.pinning,i,t.term);let a;t.facets&&Object.keys(t.facets).length>0&&(a=bQ(e,i,t.facets));let o;t.groupBy&&(o=TQ(e,i,t.groupBy));let s=t.offset??0,c=t.limit??10,l=KQ(e,i,s,c).filter(Boolean),u=TY(),d={count:i.length,elapsed:{raw:Number(u-r),formatted:wY(u-r)},hits:l,...a?{facets:a}:{},...o?{groups:o}:{}};return(t.includeVectors??!1)||PY(d,Object.keys(e.data.index.vectorIndexes)),d}async function a(){e.beforeSearch&&await SX(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await xX(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function RQ(e){return e[1]}function zQ(e){let t=Math.max.apply(Math,e.map(RQ));return e.map(([e,n])=>[e,n/t])}function BQ(e,t){return e/t}function VQ(e,t){return(n,r)=>n*e+r*t}function HQ(e,t,n,r){let i=Math.max.apply(Math,e.map(RQ)),a=Math.max.apply(Math,t.map(RQ)),{text:o,vector:s}=r&&r.text&&r.vector?r:UQ(n),c=new Map,l=e.length,u=VQ(o,s);for(let t=0;t<l;t++){let[n,r]=e[t],a=u(BQ(r,i),0);c.set(n,a)}let d=t.length;for(let e=0;e<d;e++){let[n,r]=t[e],i=BQ(r,a),o=c.get(n)??0;c.set(n,o+u(0,i))}return[...c].sort((e,t)=>t[1]-e[1])}function UQ(e){return{text:.5,vector:.5}}function WQ(e,t,n){let r=t.mode??`fulltext`;if(r===`fulltext`)return jQ(e,t,n);if(r===`vector`)return FQ(e,t);if(r===`hybrid`)return LQ(e,t);throw UY(`INVALID_SEARCH_MODE`,r)}function GQ(e,t,n,r,i){let a=e.data.docs,o=new Map,s=[],c=new Set,l=t.length,u=0;for(let d=0;d<l;d++){let l=t[d];if(l===void 0)continue;let[f,p]=l;if(c.has(f))continue;let m=e.documentsStore.get(a,f),h=jY(m,i);if(!(h===void 0||o.has(h))&&(o.set(h,!0),u++,!(u<=n)&&(s.push({id:iX(e.internalDocumentIDStore,f),score:p,document:m}),c.add(f),u>=n+r)))break}return s}function KQ(e,t,n,r){let i=e.data.docs,a=Array.from({length:r}),o=new Set;for(let s=n;s<r+n;s++){let n=t[s];if(n===void 0)break;let[r,c]=n;if(!o.has(r)){let t=e.documentsStore.get(i,r);a[s]={id:iX(e.internalDocumentIDStore,r),score:c,document:t},o.add(r)}}return a}new ay.default;var qQ=new ay.default;qQ.Diff_Timeout=.25;var JQ=A({path:k(Wa([E(),D()])),message:E(),issueCode:E()});Ka(`code`,[A({code:M(`SCHEMA_INVALID`),issues:k(JQ)}),A({code:M(`WRITE_ERROR`),detail:E()})]);function YQ(e){return{path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message,issueCode:e.code}}function XQ(e){if(e.code!==`SCHEMA_INVALID`)return{};let t={};for(let n of e.issues){let e=n.path[0];typeof e==`string`&&(t[e]=t[e]?`${t[e]}; ${n.message}`:n.message)}return t}var ZQ=`frontmatter`,QQ=[`text`,`number`,`boolean`,`date`,`list`,`object`];j(QQ);var $Q=Wa([E(),D(),O()]),e$=_o(()=>Wa([$Q.transform(e=>String(e)),Xa(E(),t$),k(e$)])),t$=_o(()=>Wa([E(),D(),O(),k(e$),Xa(E(),t$)])),n$=/^\d{4}-\d{2}-\d{2}$/;function r$(e){return typeof e==`string`&&n$.test(e)}function i$(e){return Array.isArray(e)?`list`:typeof e==`object`&&e?`object`:typeof e==`boolean`?`boolean`:typeof e==`number`?`number`:r$(e)?`date`:`text`}var a$=Xa(E(),t$),o$=Xa(E(),Wa([t$,Fa()]));function s$(e){return!!(e===null||typeof e==`string`&&e===``||Array.isArray(e)&&e.length===0)}function c$(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!c$(e[n],t[n]))return!1;return!0}if(e!==null&&t!==null&&typeof e==`object`&&typeof t==`object`&&!Array.isArray(e)&&!Array.isArray(t)){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.hasOwn(t,r)||!c$(e[r],t[r]))return!1;return!0}return!1}var l$=/^---[ \t]*\r?\n([\s\S]*?\r?\n)?---[ \t]*(\r?\n|$)/,u$=/^---[ \t]*$/;function d$(e){let t=e.match(l$);return t?{frontmatter:t[0],body:e.slice(t[0].length)}:{frontmatter:``,body:e}}function f$(e){if(e===``)return``;let t=e.match(l$);return t?(t[1]??``).replace(/\r?\n$/,``):e}var p$={defaultKeyType:`PLAIN`,defaultStringType:`PLAIN`,lineWidth:0};function m$(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function h$(e,t,n){if(Array.isArray(n)){let r=e.createNode(n),i=Po(t)?t.flow:void 0;return i!==void 0&&(r.flow=i),r}if(m$(n)){let r=e.createNode(n),i=jo(t)?t.flow:void 0;return i!==void 0&&(r.flow=i),r}return n}function g$(e){return e===``?``:`---\n${e.endsWith(`
|
|
384
|
-
`)?e.slice(0,-1):e}\n---\n`}var _$=65536;function v$(e){let t=e.match(l$);return t?{fenced:t[0],body:e.slice(t[0].length)}:{fenced:``,body:e}}function y$(e){if(e.trim()===``)return{doc:new nl({}),map:{}};let t;try{t=$l(e,{uniqueKeys:!1})}catch(e){let t=e instanceof Error?e.message:String(e);return{doc:new nl({}),map:null,parseError:`parse threw: ${t}`}}if(t.errors.length>0)return{doc:t,map:null,parseError:t.errors[0]?.message??`yaml parse errors`};let n;try{n=t.toJS()}catch(e){let n=e instanceof Error?e.message:String(e);return{doc:t,map:null,parseError:`toJS threw: ${n}`}}if(typeof n!=`object`||!n||Array.isArray(n))return{doc:t,map:null,parseError:`top-level value is not a mapping`};let r=a$.safeParse(n);if(!r.success){let e=r.error.issues[0],n=e&&Array.isArray(e.path)?e.path.join(`.`):``,i=e?.message??`unknown`;return{doc:t,map:null,parseError:n?`value at "${n}" failed schema: ${i}`:`schema validation failed: ${i}`}}return{doc:t,map:r.data}}function b$(e){return e===``?{doc:new nl({}),map:{}}:y$(f$(e))}function x$(e){let{fenced:t}=v$(e),{map:n,parseError:r}=b$(t);return{map:n??{},parseError:r}}function S$(e){let{fenced:t}=v$(e);if(t===``)return[];let{doc:n,map:r}=b$(t);return r===null?[]:E$(n)}function C$(e){return typeof e==`object`&&!!e&&`key`in e}function w$(e){let t=e.key;return typeof t==`string`?t:t&&typeof t==`object`&&`value`in t&&typeof t.value==`string`?t.value:null}function T$(e,t){let n=e.key;if(typeof n==`string`){e.key=t;return}if(n&&typeof n==`object`){n.value=t;return}e.key=t}function E$(e){let t=e.contents;if(!t||!(`items`in t)||!Array.isArray(t.items))return[];let n=[];for(let e of t.items){if(!C$(e))continue;let t=w$(e);t!==null&&n.push(t)}return n}function D$(e){if(e.contents==null||!(`items`in e.contents)){let t=e.createNode({});return e.contents=t,t}return e.contents}function O$(e){let t=e.contents;return!t||!(`items`in t)||(t.items?.length??0)===0?``:g$(e.toString(p$))}function k$(e){let t=new TextEncoder().encode(e).byteLength;return t>65536?{kind:`region_too_large`,bytes:t,limit:_$}:null}function A$(e){let t=O$(e),n=k$(t);return n?{ok:!1,error:n}:{ok:!0,nextFenced:t}}function j$(e,t){if(Object.hasOwn(t,`frontmatter`))return{ok:!1,error:{kind:`reserved_key`,key:ZQ}};let{doc:n,map:r}=b$(e);if(r===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};try{D$(n);for(let[e,r]of Object.entries(t)){if(r===null){n.delete(e);continue}let t=t$.safeParse(r);if(!t.success)return{ok:!1,error:{kind:`invalid_value`,key:e,reason:t.error.issues[0]?.message??`invalid value`}};n.set(e,h$(n,n.get(e,!0),t.data))}return A$(n)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function M$(e,t,n,r={}){if(t===`frontmatter`||n===`frontmatter`)return{ok:!1,error:{kind:`reserved_key`,key:ZQ}};let{doc:i,map:a}=b$(e);if(a===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};if(t===n)return{ok:!0,nextFenced:e};let o=i.contents;if(!o||!(`items`in o)||!Array.isArray(o.items))return{ok:!1,error:{kind:`unknown_key`,key:t}};let s=o.items.find(e=>C$(e)&&w$(e)===t);if(!s)return{ok:!1,error:{kind:`unknown_key`,key:t}};if(!r.allowDuplicate&&o.items.some(e=>C$(e)&&e!==s&&w$(e)===n))return{ok:!1,error:{kind:`duplicate_target`,key:n}};try{return T$(s,n),A$(i)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function N$(e,t){let{doc:n,map:r}=b$(e);if(r===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};let i=n.contents;if(!i||!(`items`in i)||!Array.isArray(i.items))return{ok:!0,nextFenced:e};let a=E$(n);if(a.length!==t.length||!P$(a,t))return{ok:!1,error:{kind:`reorder_mismatch`,expected:a,got:[...t]}};try{let e=i.items.filter(C$),r=[];for(let n of t){let i=e.findIndex(e=>w$(e)===n);if(i===-1)return{ok:!1,error:{kind:`reorder_mismatch`,expected:a,got:[...t]}};let[o]=e.splice(i,1);o&&r.push(o)}return i.items=r,A$(n)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function P$(e,t){let n=new Map;for(let t of e)n.set(t,(n.get(t)??0)+1);for(let e of t){let t=(n.get(e)??0)-1;if(t<0)return!1;n.set(e,t)}for(let e of n.values())if(e!==0)return!1;return!0}function F$(e){if(e.length===0)return{kind:`invalid_path`,path:[...e],reason:`path must have at least one segment`};for(let t=0;t<e.length;t++){let n=e[t];if(typeof n!=`string`&&typeof n!=`number`)return{kind:`invalid_path`,path:[...e],reason:`path segment at index ${t} must be string or number`};if(typeof n==`number`&&(!Number.isInteger(n)||n<0))return{kind:`invalid_path`,path:[...e],reason:`numeric path segment at index ${t} must be a non-negative integer`}}return e[0]===`frontmatter`?{kind:`reserved_key`,key:ZQ}:null}function I$(e,t,n){let r=F$(t);if(r)return{ok:!1,error:r};let{doc:i,map:a}=b$(e);if(a===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};let o=t$.safeParse(n);if(!o.success)return{ok:!1,error:{kind:`invalid_value`,key:String(t[t.length-1]),reason:o.error.issues[0]?.message??`invalid value`}};try{return D$(i),i.setIn(t,h$(i,i.getIn(t,!0),o.data)),A$(i)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function L$(e,t){let n=F$(t);if(n)return{ok:!1,error:n};let{doc:r,map:i}=b$(e);if(i===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};try{return r.getIn(t,!0)===void 0?{ok:!0,nextFenced:e}:(r.deleteIn(t),A$(r))}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function R$(e,t){if(t.length===0){let t=e.contents;return jo(t)?t:null}let n=e.getIn(t,!0);return jo(n)?n:null}function z$(e,t,n,r={}){let i=F$(t);if(i)return{ok:!1,error:i};let a=t[t.length-1];if(typeof a!=`string`)return{ok:!1,error:{kind:`invalid_path`,path:[...t],reason:`cannot rename: last path segment must be a string (map key)`}};if(t.length===1&&n===`frontmatter`)return{ok:!1,error:{kind:`reserved_key`,key:ZQ}};let{doc:o,map:s}=b$(e);if(s===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};if(a===n)return{ok:!0,nextFenced:e};let c=R$(o,t.slice(0,-1));if(!c)return{ok:!1,error:{kind:`unknown_key`,key:a}};let l=c.items.find(e=>C$(e)&&w$(e)===a);if(!l)return{ok:!1,error:{kind:`unknown_key`,key:a}};if(!r.allowDuplicate&&c.items.some(e=>C$(e)&&e!==l&&w$(e)===n))return{ok:!1,error:{kind:`duplicate_target`,key:n}};try{return T$(l,n),A$(o)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function B$(e,t,n){if(t.length===0)return N$(e,n);let r=F$(t);if(r)return{ok:!1,error:r};let{doc:i,map:a}=b$(e);if(a===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};let o=i.getIn(t,!0);if(!jo(o))return{ok:!1,error:{kind:`invalid_path`,path:[...t],reason:`cannot reorder: target is not a map`}};let s=[];for(let e of o.items){if(!C$(e))continue;let t=w$(e);t!==null&&s.push(t)}if(s.length!==n.length||!P$(s,n))return{ok:!1,error:{kind:`reorder_mismatch`,expected:s,got:[...n]}};try{let e=o.items.filter(C$),t=[];for(let r of n){let i=e.findIndex(e=>w$(e)===r);if(i===-1)return{ok:!1,error:{kind:`reorder_mismatch`,expected:s,got:[...n]}};let[a]=e.splice(i,1);a&&t.push(a)}return o.items=t,A$(i)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function V$(e,t,n){let r=F$(t);if(r)return{ok:!1,error:r};let{doc:i,map:a}=b$(e);if(a===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};let o=i.getIn(t,!0);if(!Po(o))return{ok:!1,error:{kind:`invalid_path`,path:[...t],reason:`cannot reorder: target is not a sequence`}};let s=o,c=s.items.length,l=Array.from({length:c},(e,t)=>t),u=[...n];if(!H$(u,c))return{ok:!1,error:{kind:`reorder_mismatch`,expected:l.map(String),got:u.map(String)}};try{let e=s.items.slice();return s.items=u.map(t=>e[t]),A$(i)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function H$(e,t){if(e.length!==t)return!1;let n=Array(t).fill(!1);for(let r of e){if(!Number.isInteger(r)||r<0||r>=t||n[r])return!1;n[r]=!0}return!0}var U$=Object.freeze({source:`local`,skipStoreHooks:!1,context:Object.freeze({origin:`form-write`})});function W$(e){return{ok:!1,error:e}}function G$(e){return{ok:!0,...e}}function K$(e){return{ok:!0,...e}}function q$(e){return{ok:!0,...e}}function J$(e){return{ok:!0,...e}}function Y$(e){switch(e.kind){case`unknown_key`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:`unknown key '${e.key}'`,issueCode:`unknown_key`}]};case`duplicate_target`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:`key '${e.key}' already exists`,issueCode:`duplicate_target`}]};case`invalid_value`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:e.reason,issueCode:`invalid_value`}]};case`reserved_key`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:`'${e.key}' is a reserved frontmatter key`,issueCode:`reserved_key`}]};case`reorder_mismatch`:return{code:`WRITE_ERROR`,detail:`reorder list does not match current keys (state changed mid-drag)`};case`region_too_large`:return{code:`SCHEMA_INVALID`,issues:[{path:[],message:`Frontmatter region exceeds ${_$}-byte limit (would be ${e.bytes})`,issueCode:`region_too_large`}]};case`parse_failed`:return{code:`WRITE_ERROR`,detail:`Frontmatter YAML is malformed; fix in source mode to commit (${e.reason})`};case`invalid_path`:return{code:`SCHEMA_INVALID`,issues:[{path:[...e.path],message:e.reason,issueCode:`invalid_path`}]}}}function X$(e,t){if(e.parseError!==t.parseError||e.keys.length!==t.keys.length)return!1;for(let n=0;n<e.keys.length;n++)if(e.keys[n]!==t.keys[n])return!1;for(let n of e.keys)if(!c$(e.map[n],t.map[n]))return!1;return!0}var Z$=5;function Q$(e){let t=e.toString();return{snapshot:$$(t),raw:t}}function $$(e){let{map:t,parseError:n}=x$(e);return{map:t,keys:S$(e),parseError:n}}function e1(e){return e.startsWith(`---`)}function t1(e){let t=e.document,n=t.getText(`source`),r=new Set,i=Q$(n),a=i.snapshot,o=v$(i.raw).fenced,s=e1(i.raw),c=!1;function l(e=!1){if(c)return;let t,i;try{let e=Q$(n);t=e.snapshot,i=e.raw}catch(e){console.warn(`[bindFrontmatterDoc] readSnapshotFromYText threw:`,e);return}if(!e&&X$(a,t)){s=e1(i);return}a=t,o=v$(i).fenced,s=e1(i);for(let e of r)try{e(t)}catch(e){console.warn(`[bindFrontmatterDoc] listener threw:`,e)}}let u=e=>{c||n1(e,o.length,s)&&l()};n.observe(u),e.on(`synced`,d);function d(){l(!0)}function f(e){let r;return t.transact(()=>{let{fenced:t}=v$(n.toString());r=e(t),r.ok&&r.nextFenced!==t&&(n.delete(0,t.length),r.nextFenced!==``&&n.insert(0,r.nextFenced))},U$),r??{ok:!1,error:{kind:`parse_failed`,reason:`commit transact produced no result`}}}function p(e){if(c)return W$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});if(Object.hasOwn(e,`frontmatter`))return W$({code:`SCHEMA_INVALID`,issues:[{path:[ZQ],message:`'${ZQ}' is a reserved frontmatter key`,issueCode:`reserved_key`}]});let t=o$.safeParse(e);if(!t.success)return W$({code:`SCHEMA_INVALID`,issues:t.error.issues.map(YQ)});let n=t.data,r=Object.keys(n),i=f(e=>j$(e,n));return i.ok?G$({appliedKeys:r}):W$(Y$(i.error))}function m(e,t,n={}){if(c)return W$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let r=f(r=>M$(r,e,t,n));return r.ok?K$({oldKey:e,newKey:t}):W$(Y$(r.error))}function h(e){if(c)return W$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let t=f(t=>N$(t,e));return t.ok?q$({orderedKeys:[...e]}):W$(Y$(t.error))}function g(e,t){if(c)return W$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let n=f(n=>I$(n,e,t));return n.ok?J$({path:[...e]}):W$(Y$(n.error))}function _(e){if(c)return W$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let t=f(t=>L$(t,e));return t.ok?J$({path:[...e]}):W$(Y$(t.error))}function v(e,t,n={}){if(c)return W$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let r=f(r=>z$(r,e,t,n));return r.ok?J$({path:[...e]}):W$(Y$(r.error))}function y(e,t){if(c)return W$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let n=f(n=>B$(n,e,t));return n.ok?J$({path:[...e]}):W$(Y$(n.error))}function b(e,t){if(c)return W$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let n=f(n=>V$(n,e,t));return n.ok?J$({path:[...e]}):W$(Y$(n.error))}return{current(){return Q$(n).snapshot},patch(e){return p(e)},rename(e,t,n){return m(e,t,n)},reorder(e){return h(e)},patchPath(e,t){return g(e,t)},deletePath(e){return _(e)},renamePath(e,t,n){return v(e,t,n)},reorderPath(e,t){return y(e,t)},reorderSeqPath(e,t){return b(e,t)},subscribe(e){return r.add(e),()=>{r.delete(e)}},dispose(){c||(c=!0,n.unobserve(u),e.off(`synced`,d),r.clear())}}}function n1(e,t,n){if(t===0&&n)return!0;let r=t>0?t:Z$,i=0;for(let t of e.delta){if(typeof t.retain==`number`){i+=t.retain;continue}if(typeof t.insert==`string`){if(i<r)return!0;i+=t.insert.length;continue}if(t.insert!==void 0){if(i<r)return!0;i+=1;continue}if(typeof t.delete==`number`&&i<r)return!0}return!1}var r1=new ay.default;r1.Match_Threshold=.5;var i1=`0.0.0-unknown`,a1={protocol:`x-ok-client-protocol`,runtime:`x-ok-client-runtime`,kind:`x-ok-client-kind`};function o1({kind:e,runtimeVersion:t}){return{[a1.protocol]:`1`,[a1.runtime]:t,[a1.kind]:e}}function s1({kind:e,runtimeVersion:t}){return{clientProtocolVersion:1,clientRuntimeVersion:t,clientKind:e}}var c1=`source`;function l1(e){return{ok:!1,error:e}}function u1(e){return{ok:!0,...e}}function d1(){return uu.parse({})}function f1(e,t){let n=e.toString();if(n.length===0)return d1();let r=$l(n);if(r.errors.length>0)return console.warn(`[bindConfigDoc:${t}] Y.Text contains invalid YAML; returning schema defaults. Errors: ${r.errors.map(e=>e.message).join(`; `)}`),d1();let i=r.toJSON()??{},a=uu.safeParse(i);return a.success?a.data:(console.warn(`[bindConfigDoc:${t}] Y.Text content fails schema validation; returning schema defaults. First issue: ${a.error.issues[0]?.message??`(unknown)`}`),d1())}function p1(e,t,n={}){return fu(`config.bind`,{"config.scope":t,"config.transport":`ytext`},()=>m1(e,t,n))}function m1(e,t,n){let{ytextKey:r=c1}=n,i=e.document,a=i.getText(r),o=new Set,s=new Set,c=!1,l=!1;function u(){if(c)return;let e=f1(a,t);for(let n of o)try{n(e)}catch(e){console.warn(`[bindConfigDoc:${t}] listener threw:`,e)}}function d(){if(c||(u(),l))return;l=!0;let e=[...s];s.clear();for(let n of e)try{n()}catch(e){console.warn(`[bindConfigDoc:${t}] synced listener threw:`,e)}}a.observe(u),e.on(`synced`,d);function f(e){if(c)return l1({code:`WRITE_ERROR`,detail:`ConfigBinding (${t}) has been disposed`});let n=vu(e,t);if(n!==null)return l1(n);let r=$l(a.toString()),o=r.contents!==null&&!jo(r.contents);if(r.errors.length>0||o){pu(`config.corrupt-ytext-reset`,{"config.scope":t,"config.parse.errorCount":r.errors.length,"config.parse.topLevelNonMap":o});let e=r.errors.length>0?r.errors.map(e=>e.message).join(`; `):`top-level YAML is not a mapping`;console.warn(`[bindConfigDoc:${t}] dropping corrupt Y.Text and re-applying patch onto empty doc. Reason: ${e}`),r=$l(``)}r.contents===null&&(r.contents=r.createNode({}));let s=bu(r,e),l=r.toJSON()??{},u=fu(`config.validate`,{"config.scope":t,"config.validation.layer":`L1`},e=>{let t=uu.safeParse(l);if(e.setAttribute(`config.outcome`,t.success?`success`:`rejected`),!t.success)for(let e of t.error.issues)pu(`config.validation.issue`,{"issue.path":e.path.map(e=>String(e)).join(`.`),"issue.message":e.message});return t});if(!u.success)return l1({code:`SCHEMA_INVALID`,issues:u.error.issues.map(xu)});let d=r.toString();return i.transact(()=>{a.length>0&&a.delete(0,a.length),a.insert(0,d)}),u1({effective:u.data,appliedPaths:s})}return{current(){return f1(a,t)},patch(e){return fu(`config.patch`,{"config.scope":t,"config.transport":`ytext`},t=>{let n=f(e);return t.setAttribute(`config.outcome`,n.ok?`success`:`rejected`),n.ok||t.setAttribute(`config.error.code`,n.error.code),n})},subscribe(e){return o.add(e),()=>{o.delete(e)}},hasSynced(){return l},subscribeSynced(e){if(c)return()=>{};if(l){let n=!1;return queueMicrotask(()=>{if(!(n||c))try{e()}catch(e){console.warn(`[bindConfigDoc:${t}] synced listener threw:`,e)}}),()=>{n=!0}}return s.add(e),()=>{s.delete(e)}},dispose(){c||(c=!0,a.unobserve(u),e.off(`synced`,d),o.clear(),s.clear())}}}var h1=`source`,g1=800;function _1(e){return{ok:!1,error:e}}function v1(e){return{ok:!0,...e}}function y1(e,t={}){let{ytextKey:n=h1,acceptanceDelayMs:r=g1}=t,i=e.document,a=i.getText(n),o=new Set,s=new Set,c=new Set,l=!1,u=`idle`,d=null;function f(){d!==null&&(clearTimeout(d),d=null)}function p(e){if(!l&&u!==e){u=e;for(let t of c)try{t(e)}catch(e){console.warn(`[bindOkignoreDoc] status listener threw:`,e)}}}function m(){if(l)return;let e=a.toString();for(let t of o)try{t(e)}catch(e){console.warn(`[bindOkignoreDoc] text listener threw:`,e)}}function h(e){if(!l)for(let t of s)try{t(e)}catch(e){console.warn(`[bindOkignoreDoc] rejection listener threw:`,e)}}return a.observe(m),e.on(`synced`,m),{current(){return a.toString()},patch(e){return l?_1({code:`WRITE_ERROR`,detail:`OkignoreBinding has been disposed`}):(i.transact(()=>{a.length>0&&a.delete(0,a.length),e.length>0&&a.insert(0,e)}),f(),p(`pending`),d=setTimeout(()=>{d=null,!l&&u===`pending`&&p(`accepted`)},r),v1({text:e}))},subscribe(e){return o.add(e),()=>{o.delete(e)}},subscribeRejection(e){return s.add(e),()=>{s.delete(e)}},subscribeStatus(e){return c.add(e),()=>{c.delete(e)}},status(){return u},notifyRejection(e){l||(f(),p(`rejected`),h({error:e,text:a.toString()}))},dispose(){l||(l=!0,f(),a.unobserve(m),e.off(`synced`,m),o.clear(),s.clear(),c.clear())}}}function b1(e,t,n){return x1([e,t,n],[])}function x1(e,t){if(t.length>0){let n=gu(uu,t);if(n?.scope===`user`)return e[0];if(n?.scope===`project`)return e[1]??e[0];if(n?.scope===`project-local`)return e[2]??e[1]??e[0]}let n=S1(e);if(n===void 0)return;if(n===null)return null;if(Array.isArray(n)||typeof n!=`object`)return n;let r=e.map(e=>C1(e)?e:void 0),i=new Set;for(let e of r)if(e!==void 0)for(let t of Object.keys(e))i.add(t);let a={};for(let e of i)a[e]=x1(r.map(t=>t===void 0?void 0:t[e]),[...t,e]);return a}function S1(e){for(let t=e.length-1;t>=0;t--)if(e[t]!==void 0)return e[t]}function C1(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var w1=2e3;function T1(e){let t=Date.now();for(let[n,r]of e.entries()){let i=r;i.timestamp&&t-i.timestamp>3e4&&e.delete(n)}}function E1(e,t){for(let[,n]of e.entries()){let e=n;if(e.timestamp&&e.timestamp>t)return!0}return!1}var D1=`__system__`,O1=`__config__/project`,k1=`__user__/config.yml`,A1=`__local__/project`,j1=`__config__/okignore`;Object.freeze([O1,A1,k1,j1]);var M1={sh:`bash`,zsh:`bash`,bash:`bash`,c:`c`,cc:`cpp`,cpp:`cpp`,cxx:`cpp`,"c++":`cpp`,h:`c`,hh:`cpp`,hpp:`cpp`,cs:`csharp`,css:`css`,less:`less`,scss:`scss`,sass:`scss`,diff:`diff`,patch:`diff`,go:`go`,gql:`graphql`,graphql:`graphql`,ini:`ini`,cfg:`ini`,conf:`ini`,properties:`ini`,java:`java`,js:`javascript`,jsx:`javascript`,mjs:`javascript`,cjs:`javascript`,jsonc:`json`,kt:`kotlin`,kts:`kotlin`,lua:`lua`,makefile:`makefile`,md:`markdown`,mdx:`markdown`,m:`objectivec`,mm:`objectivec`,pl:`perl`,pm:`perl`,php:`php`,phtml:`php`,py:`python`,pyi:`python`,pyx:`python`,r:`r`,rb:`ruby`,rs:`rust`,sql:`sql`,swift:`swift`,ts:`typescript`,tsx:`typescript`,xml:`xml`,yaml:`yaml`,yml:`yaml`},N1=new Set(Object.keys(M1));function P1(e){return M1[e.toLowerCase().replace(/^\./,``)]??null}var F1=[`invalid-args`,`nested-project`,`target-not-empty`,`mkdir-failed`,`git-init-failed`,`init-failed`,`discovery-failed`],I1=`epoch`,L1=512*1024;function R1(e,t=L1){return typeof e==`number`&&Number.isFinite(e)&&e>t}var z1=[`claude`,`claude-desktop`,`cursor`,`codex`],B1={claude:`Claude`,"claude-desktop":`Claude Desktop`,cursor:`Cursor`,codex:`Codex`},V1={cursor:/\bCursor(?:\([^)]+\))?\/\d/,codex:/\bCodex(?:\([^)]+\))?\/\d/,"claude-desktop":/\bClaude(?:\([^)]+\))?\/\d/};function H1(){if(typeof navigator>`u`)return null;let e=navigator.userAgent;for(let[t,n]of Object.entries(V1))if(n.test(e))return t;return null}var U1=[`incoming`,`outgoing`,`both`];function W1(e){return U1.includes(e)}var G1=[{id:`chart`,title:`Chart`,description:`A bar chart whose series colors track the OK chart palette.`,html:`<div style="font-family:system-ui,sans-serif;padding:20px;color:var(--foreground)">
|
|
383
|
+
`,ANSWER_SESSION_LAST_MESSAGE_IS_NOT_ASSISTANT:`The last message in the session is not an assistant message. Cannot regenerate non-assistant messages.`,PLUGIN_COMPONENT_CONFLICT:`The component "%s" is already defined. The plugin "%s" is trying to redefine it.`};function HY(e,...t){let n=Error(yY(VY[e]??`Unsupported Orama Error code: ${e}`,...t));return n.code=e,`captureStackTrace`in Error.prototype&&Error.captureStackTrace(n),n}function UY(e){return{raw:Number(e),formatted:CY(e)}}function WY(e){if(e.id){if(typeof e.id!=`string`)throw HY(`DOCUMENT_ID_MUST_BE_STRING`,typeof e.id);return e.id}return TY()}function GY(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];if(t!==void 0&&!(r===`geopoint`&&typeof t==`object`&&typeof t.lon==`number`&&typeof t.lat==`number`)&&!(r===`enum`&&(typeof t==`string`||typeof t==`number`))){if(r===`enum[]`&&Array.isArray(t)){let e=t.length;for(let r=0;r<e;r++)if(typeof t[r]!=`string`&&typeof t[r]!=`number`)return n+`.`+r;continue}if(YY(r)){let e=QY(r);if(!Array.isArray(t)||t.length!==e)throw HY(`INVALID_INPUT_VECTOR`,n,e,t.length);continue}if(XY(r)){if(!Array.isArray(t))return n;let e=ZY(r),i=t.length;for(let r=0;r<i;r++)if(typeof t[r]!==e)return n+`.`+r;continue}if(typeof r==`object`){if(!t||typeof t!=`object`)return n;let e=GY(t,r);if(e)return n+`.`+e;continue}if(typeof t!==r)return n}}}var KY={string:!1,number:!1,boolean:!1,enum:!1,geopoint:!1,"string[]":!0,"number[]":!0,"boolean[]":!0,"enum[]":!0},qY={"string[]":`string`,"number[]":`number`,"boolean[]":`boolean`,"enum[]":`enum`};function JY(e){return e===`geopoint`}function YY(e){return typeof e==`string`&&/^vector\[\d+\]$/.test(e)}function XY(e){return typeof e==`string`&&KY[e]}function ZY(e){return qY[e]}function QY(e){let t=Number(e.slice(7,-1));switch(!0){case isNaN(t):throw HY(`INVALID_VECTOR_VALUE`,e);case t<=0:throw HY(`INVALID_VECTOR_SIZE`,e);default:return t}}function $Y(){return{idToInternalId:new Map,internalIdToId:[],save:eX,load:tX}}function eX(e){return{internalIdToId:e.internalIdToId}}function tX(e,t){let{internalIdToId:n}=t;e.internalDocumentIDStore.idToInternalId.clear(),e.internalDocumentIDStore.internalIdToId=[];let r=n.length;for(let t=0;t<r;t++){let r=n[t];e.internalDocumentIDStore.idToInternalId.set(r,t+1),e.internalDocumentIDStore.internalIdToId.push(r)}}function nX(e,t){if(typeof t==`string`){let n=e.idToInternalId.get(t);if(n)return n;let r=e.idToInternalId.size+1;return e.idToInternalId.set(t,r),e.internalIdToId.push(t),r}return t>e.internalIdToId.length?nX(e,t.toString()):t}function rX(e,t){if(e.internalIdToId.length<t)throw Error(`Invalid internalId ${t}`);return e.internalIdToId[t-1]}function iX(e,t){return{sharedInternalDocumentStore:t,docs:{},count:0}}function aX(e,t){let n=nX(e.sharedInternalDocumentStore,t);return e.docs[n]}function oX(e,t){let n=t.length,r=Array.from({length:n});for(let i=0;i<n;i++){let n=nX(e.sharedInternalDocumentStore,t[i]);r[i]=e.docs[n]}return r}function sX(e){return e.docs}function cX(e,t,n,r){return e.docs[n]===void 0?(e.docs[n]=r,e.count++,!0):!1}function lX(e,t){let n=nX(e.sharedInternalDocumentStore,t);return e.docs[n]===void 0?!1:(delete e.docs[n],e.count--,!0)}function uX(e){return e.count}function dX(e,t){let n=t;return{docs:n.docs,count:n.count,sharedInternalDocumentStore:e}}function fX(e){return{docs:e.docs,count:e.count}}function pX(){return{create:iX,get:aX,getMultiple:oX,getAll:sX,store:cX,remove:lX,count:uX,load:dX,save:fX}}var mX=[`beforeInsert`,`afterInsert`,`beforeRemove`,`afterRemove`,`beforeUpdate`,`afterUpdate`,`beforeUpsert`,`afterUpsert`,`beforeSearch`,`afterSearch`,`beforeInsertMultiple`,`afterInsertMultiple`,`beforeRemoveMultiple`,`afterRemoveMultiple`,`beforeUpdateMultiple`,`afterUpdateMultiple`,`beforeUpsertMultiple`,`afterUpsertMultiple`,`beforeLoad`,`afterLoad`,`afterCreate`];function hX(e,t){let n=[],r=e.plugins?.length;if(!r)return n;for(let i=0;i<r;i++)try{let r=e.plugins[i];typeof r[t]==`function`&&n.push(r[t])}catch(e){throw console.error(`Caught error in getAllPluginsByHook:`,e),HY(`PLUGIN_CRASHED`)}return n}var gX=[`tokenizer`,`index`,`documentsStore`,`sorter`,`pinning`],_X=[`validateSchema`,`getDocumentIndexId`,`getDocumentProperties`,`formatElapsedTime`];function vX(e,t,n,r){if(e.some(PY))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function yX(e,t,n){if(e.some(PY))return(async()=>{for(let r of e)await r(t,n)})();for(let r of e)r(t,n)}function bX(e,t,n,r,i){if(e.some(PY))return(async()=>{for(let a of e)await a(t,n,r,i)})();for(let a of e)a(t,n,r,i)}function xX(e,t,n,r){if(e.some(PY))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function SX(e,t){if(e.some(PY))return(async()=>{for(let n of e)await n(t)})();for(let n of e)n(t)}var CX=class e{k;v;l=null;r=null;h=1;constructor(e,t){this.k=e,this.v=new Set(t)}updateHeight(){this.h=Math.max(e.getHeight(this.l),e.getHeight(this.r))+1}static getHeight(e){return e?e.h:0}getBalanceFactor(){return e.getHeight(this.l)-e.getHeight(this.r)}rotateLeft(){let e=this.r;return this.r=e.l,e.l=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){let e=this.l;return this.l=e.r,e.r=this,this.updateHeight(),e.updateHeight(),e}toJSON(){return{k:this.k,v:Array.from(this.v),l:this.l?this.l.toJSON():null,r:this.r?this.r.toJSON():null,h:this.h}}static fromJSON(t){let n=new e(t.k,t.v);return n.l=t.l?e.fromJSON(t.l):null,n.r=t.r?e.fromJSON(t.r):null,n.h=t.h,n}},wX=class e{root=null;insertCount=0;constructor(e,t){e!==void 0&&t!==void 0&&(this.root=new CX(e,t))}insert(e,t,n=1e3){this.root=this.insertNode(this.root,e,t,n)}insertMultiple(e,t,n=1e3){for(let r of t)this.insert(e,r,n)}rebalance(){this.root&&=this.rebalanceNode(this.root)}toJSON(){return{root:this.root?this.root.toJSON():null,insertCount:this.insertCount}}static fromJSON(t){let n=new e;return n.root=t.root?CX.fromJSON(t.root):null,n.insertCount=t.insertCount||0,n}insertNode(e,t,n,r){if(e===null)return new CX(t,[n]);let i=[],a=e,o=null;for(;a!==null;)if(i.push({parent:o,node:a}),t<a.k)if(a.l===null){a.l=new CX(t,[n]),i.push({parent:a,node:a.l});break}else o=a,a=a.l;else if(t>a.k)if(a.r===null){a.r=new CX(t,[n]),i.push({parent:a,node:a.r});break}else o=a,a=a.r;else return a.v.add(n),e;let s=!1;this.insertCount++%r===0&&(s=!0);for(let t=i.length-1;t>=0;t--){let{parent:n,node:r}=i[t];if(r.updateHeight(),s){let t=this.rebalanceNode(r);n?n.l===r?n.l=t:n.r===r&&(n.r=t):e=t}}return e}rebalanceNode(e){let t=e.getBalanceFactor();if(t>1){if(e.l&&e.l.getBalanceFactor()>=0)return e.rotateRight();if(e.l)return e.l=e.l.rotateLeft(),e.rotateRight()}if(t<-1){if(e.r&&e.r.getBalanceFactor()<=0)return e.rotateLeft();if(e.r)return e.r=e.r.rotateRight(),e.rotateLeft()}return e}find(e){let t=this.findNodeByKey(e);return t?t.v:null}contains(e){return this.find(e)!==null}getSize(){let e=0,t=[],n=this.root;for(;n||t.length>0;){for(;n;)t.push(n),n=n.l;n=t.pop(),e++,n=n.r}return e}isBalanced(){if(!this.root)return!0;let e=[this.root];for(;e.length>0;){let t=e.pop(),n=t.getBalanceFactor();if(Math.abs(n)>1)return!1;t.l&&e.push(t.l),t.r&&e.push(t.r)}return!0}remove(e){this.root=this.removeNode(this.root,e)}removeDocument(e,t){let n=this.findNodeByKey(e);n&&(n.v.size===1?this.root=this.removeNode(this.root,e):n.v=new Set([...n.v.values()].filter(e=>e!==t)))}findNodeByKey(e){let t=this.root;for(;t;)if(e<t.k)t=t.l;else if(e>t.k)t=t.r;else return t;return null}removeNode(e,t){if(e===null)return null;let n=[],r=e;for(;r!==null&&r.k!==t;)n.push(r),r=t<r.k?r.l:r.r;if(r===null)return e;if(r.l===null||r.r===null){let t=r.l?r.l:r.r;if(n.length===0)e=t;else{let e=n[n.length-1];e.l===r?e.l=t:e.r=t}}else{let e=r,t=r.r;for(;t.l!==null;)e=t,t=t.l;r.k=t.k,r.v=t.v,e.l===t?e.l=t.r:e.r=t.r,r=e}n.push(r);for(let t=n.length-1;t>=0;t--){let r=n[t];r.updateHeight();let i=this.rebalanceNode(r);if(t>0){let e=n[t-1];e.l===r?e.l=i:e.r===r&&(e.r=i)}else e=i}return e}rangeSearch(e,t){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),i.k>=e&&i.k<=t)for(let e of i.v)n.add(e);if(i.k>t)break;i=i.r}return n}greaterThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.r;if(i=r.pop(),t&&i.k>=e||!t&&i.k>e)for(let e of i.v)n.add(e);else if(i.k<=e)break;i=i.l}return n}lessThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),t&&i.k<=e||!t&&i.k<e)for(let e of i.v)n.add(e);else if(i.k>e)break;i=i.r}return n}},TX=class e{numberToDocumentId;constructor(){this.numberToDocumentId=new Map}insert(e,t){this.numberToDocumentId.has(e)?this.numberToDocumentId.get(e).add(t):this.numberToDocumentId.set(e,new Set([t]))}find(e){let t=this.numberToDocumentId.get(e);return t?Array.from(t):null}remove(e){this.numberToDocumentId.delete(e)}removeDocument(e,t){let n=this.numberToDocumentId.get(t);n&&(n.delete(e),n.size===0&&this.numberToDocumentId.delete(t))}contains(e){return this.numberToDocumentId.has(e)}getSize(){let e=0;for(let t of this.numberToDocumentId.values())e+=t.size;return e}filter(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`eq`:{let t=e[n],r=this.numberToDocumentId.get(t);return r?Array.from(r):[]}case`in`:{let t=e[n],r=new Set;for(let e of t){let t=this.numberToDocumentId.get(e);if(t)for(let e of t)r.add(e)}return Array.from(r)}case`nin`:{let t=new Set(e[n]),r=new Set;for(let[e,n]of this.numberToDocumentId.entries())if(!t.has(e))for(let e of n)r.add(e);return Array.from(r)}default:throw Error(`Invalid operation`)}}filterArr(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`containsAll`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e].filter(e=>t.has(e))));return Array.from(r)}case`containsAny`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e,...t]));return Array.from(r)}default:throw Error(`Invalid operation`)}}static fromJSON(t){if(!t.numberToDocumentId)throw Error(`Invalid Flat Tree JSON`);let n=new e;for(let[e,r]of t.numberToDocumentId)n.numberToDocumentId.set(e,new Set(r));return n}toJSON(){return{numberToDocumentId:Array.from(this.numberToDocumentId.entries()).map(([e,t])=>[e,Array.from(t)])}}};function EX(e,t,n){if(n<0)return-1;if(e===t)return 0;let r=e.length,i=t.length;if(r===0)return i<=n?i:-1;if(i===0)return r<=n?r:-1;let a=Math.abs(r-i);if(e.startsWith(t))return a<=n?a:-1;if(t.startsWith(e))return 0;if(a>n)return-1;let o=[];for(let e=0;e<=r;e++){o[e]=[e];for(let t=1;t<=i;t++)o[e][t]=e===0?t:0}for(let a=1;a<=r;a++){let r=1/0;for(let n=1;n<=i;n++)e[a-1]===t[n-1]?o[a][n]=o[a-1][n-1]:o[a][n]=Math.min(o[a-1][n]+1,o[a][n-1]+1,o[a-1][n-1]+1),r=Math.min(r,o[a][n]);if(r>n)return-1}return o[r][i]<=n?o[r][i]:-1}function DX(e,t,n){let r=EX(e,t,n);return{distance:r,isBounded:r>=0}}var OX=class e{k;s;c=new Map;d=new Set;e;w=``;constructor(e,t,n){this.k=e,this.s=t,this.e=n}updateParent(e){this.w=e.w+this.s}addDocument(e){this.d.add(e)}removeDocument(e){return this.d.delete(e)}findAllWords(e,t,n,r){let i=[this];for(;i.length>0;){let a=i.pop();if(a.e){let{w:i,d:o}=a;if(n&&i!==t)continue;if(EY(e,i)!==null)if(r)if(Math.abs(t.length-i.length)<=r&&DX(t,i,r).isBounded)e[i]=[];else continue;else e[i]=[];if(EY(e,i)!=null&&o.size>0){let t=e[i];for(let e of o)t.includes(e)||t.push(e)}}a.c.size>0&&i.push(...a.c.values())}return e}insert(t,n){let r=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=r.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c){if(r=s,i+=l,i===a){s.e||=!0,s.addDocument(n);return}continue}let u=o.slice(0,l),d=o.slice(l),f=t.slice(i+l),p=new e(u[0],u,!1);if(r.c.set(u[0],p),p.updateParent(r),s.s=d,s.k=d[0],p.c.set(d[0],s),s.updateParent(p),f){let t=new e(f[0],f,!0);t.addDocument(n),p.c.set(f[0],t),t.updateParent(p)}else p.e=!0,p.addDocument(n);return}else{let a=new e(o,t.slice(i),!0);a.addDocument(n),r.c.set(o,a),a.updateParent(r);return}}r.e||=!0,r.addDocument(n)}_findLevenshtein(e,t,n,r,i){let a=[{node:this,index:t,tolerance:n}];for(;a.length>0;){let{node:t,index:n,tolerance:o}=a.pop();if(t.w.startsWith(e)){t.findAllWords(i,e,!1,0);continue}if(o<0)continue;if(t.e){let{w:n,d:a}=t;if(n&&(DX(e,n,r).isBounded&&(i[n]=[]),EY(i,n)!==void 0&&a.size>0)){let e=new Set(i[n]);for(let t of a)e.add(t);i[n]=Array.from(e)}}if(n>=e.length)continue;let s=e[n];if(t.c.has(s)){let e=t.c.get(s);a.push({node:e,index:n+1,tolerance:o})}a.push({node:t,index:n+1,tolerance:o-1});for(let[e,r]of t.c)a.push({node:r,index:n,tolerance:o-1}),e!==s&&a.push({node:r,index:n+1,tolerance:o-1})}}find(e){let{term:t,exact:n,tolerance:r}=e;if(r&&!n){let e={};return this._findLevenshtein(t,0,r,r,e),e}else{let e=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=e.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c)e=s,i+=l;else if(i+l===a)if(l===a-i){if(n)return{};{let e={};return s.findAllWords(e,t,n,r),e}}else return{};else return{}}else return{}}let o={};return e.findAllWords(o,t,n,r),o}}contains(e){let t=this,n=0,r=e.length;for(;n<r;){let i=e[n],a=t.c.get(i);if(a){let i=a.s,o=i.length,s=0;for(;s<o&&n+s<r&&i[s]===e[n+s];)s++;if(s<o)return!1;n+=o,t=a}else return!1}return!0}removeWord(e){if(!e)return!1;let t=this,n=e.length,r=[];for(let i=0;i<n;i++){let n=e[i];if(t.c.has(n)){let e=t.c.get(n);r.push({parent:t,character:n}),i+=e.s.length-1,t=e}else return!1}for(t.d.clear(),t.e=!1;r.length>0&&t.c.size===0&&!t.e&&t.d.size===0;){let{parent:e,character:n}=r.pop();e.c.delete(n),t=e}return!0}removeDocumentByWord(e,t,n=!0){if(!e)return!0;let r=this,i=e.length;for(let a=0;a<i;a++){let i=e[a];if(r.c.has(i)){let o=r.c.get(i);a+=o.s.length-1,r=o,n&&r.w!==e||r.removeDocument(t)}else return!1}return!0}static getCommonPrefix(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e.charCodeAt(r)===t.charCodeAt(r);)r++;return e.slice(0,r)}toJSON(){return{w:this.w,s:this.s,e:this.e,k:this.k,d:Array.from(this.d),c:Array.from(this.c?.entries())?.map(([e,t])=>[e,t.toJSON()])}}static fromJSON(t){let n=new e(t.k,t.s,t.e);return n.w=t.w,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([t,n])=>[t,e.fromJSON(n)])||[]),n}},kX=class e extends OX{constructor(){super(``,``,!1)}static fromJSON(t){let n=new e;return n.w=t.w,n.s=t.s,n.e=t.e,n.k=t.k,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([e,t])=>[e,OX.fromJSON(t)])||[]),n}toJSON(){return super.toJSON()}},AX=2,jX=6371e3,MX=class e{point;docIDs;left;right;parent;constructor(e,t){this.point=e,this.docIDs=new Set(t),this.left=null,this.right=null,this.parent=null}toJSON(){return{point:this.point,docIDs:Array.from(this.docIDs),left:this.left?this.left.toJSON():null,right:this.right?this.right.toJSON():null}}static fromJSON(t,n=null){let r=new e(t.point,t.docIDs);return r.parent=n,t.left&&(r.left=e.fromJSON(t.left,r)),t.right&&(r.right=e.fromJSON(t.right,r)),r}},NX=class e{root;nodeMap;constructor(){this.root=null,this.nodeMap=new Map}getPointKey(e){return`${e.lon},${e.lat}`}insert(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);if(r){t.forEach(e=>r.docIDs.add(e));return}let i=new MX(e,t);if(this.nodeMap.set(n,i),this.root==null){this.root=i;return}let a=this.root,o=0;for(;;){if(o%AX===0)if(e.lon<a.point.lon){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}else if(e.lat<a.point.lat){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}o++}}contains(e){let t=this.getPointKey(e);return this.nodeMap.has(t)}getDocIDsByCoordinates(e){let t=this.getPointKey(e),n=this.nodeMap.get(t);return n?Array.from(n.docIDs):null}removeDocByID(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);r&&(r.docIDs.delete(t),r.docIDs.size===0&&(this.nodeMap.delete(n),this.deleteNode(r)))}deleteNode(e){let t=e.parent,n=e.left?e.left:e.right;n&&(n.parent=t),t?t.left===e?t.left=n:t.right===e&&(t.right=n):(this.root=n,this.root&&(this.root.parent=null))}searchByRadius(t,n,r=!0,i=`asc`,a=!1){let o=a?e.vincentyDistance:e.haversineDistance,s=[{node:this.root,depth:0}],c=[];for(;s.length>0;){let{node:e,depth:i}=s.pop();if(e==null)continue;let a=o(t,e.point);(r?a<=n:a>n)&&c.push({point:e.point,docIDs:Array.from(e.docIDs)}),e.left!=null&&s.push({node:e.left,depth:i+1}),e.right!=null&&s.push({node:e.right,depth:i+1})}return i&&c.sort((e,n)=>{let r=o(t,e.point),a=o(t,n.point);return i.toLowerCase()===`asc`?r-a:a-r}),c}searchByPolygon(t,n=!0,r=null,i=!1){let a=[{node:this.root,depth:0}],o=[];for(;a.length>0;){let{node:r,depth:i}=a.pop();if(r==null)continue;r.left!=null&&a.push({node:r.left,depth:i+1}),r.right!=null&&a.push({node:r.right,depth:i+1});let s=e.isPointInPolygon(t,r.point);(s&&n||!s&&!n)&&o.push({point:r.point,docIDs:Array.from(r.docIDs)})}let s=e.calculatePolygonCentroid(t);if(r){let t=i?e.vincentyDistance:e.haversineDistance;o.sort((e,n)=>{let i=t(s,e.point),a=t(s,n.point);return r.toLowerCase()===`asc`?i-a:a-i})}return o}toJSON(){return{root:this.root?this.root.toJSON():null}}static fromJSON(t){let n=new e;return t.root&&(n.root=MX.fromJSON(t.root),n.buildNodeMap(n.root)),n}buildNodeMap(e){if(e==null)return;let t=this.getPointKey(e.point);this.nodeMap.set(t,e),e.left&&this.buildNodeMap(e.left),e.right&&this.buildNodeMap(e.right)}static calculatePolygonCentroid(e){let t=0,n=0,r=0,i=e.length;for(let a=0,o=i-1;a<i;o=a++){let i=e[a].lon,s=e[a].lat,c=e[o].lon,l=e[o].lat,u=i*l-c*s;t+=u,n+=(i+c)*u,r+=(s+l)*u}t/=2;let a=6*t;return n/=a,r/=a,{lon:n,lat:r}}static isPointInPolygon(e,t){let n=!1,r=t.lon,i=t.lat,a=e.length;for(let t=0,o=a-1;t<a;o=t++){let a=e[t].lon,s=e[t].lat,c=e[o].lon,l=e[o].lat;s>i!=l>i&&r<(c-a)*(i-s)/(l-s)+a&&(n=!n)}return n}static haversineDistance(e,t){let n=Math.PI/180,r=e.lat*n,i=t.lat*n,a=(t.lat-e.lat)*n,o=(t.lon-e.lon)*n,s=Math.sin(a/2)*Math.sin(a/2)+Math.cos(r)*Math.cos(i)*Math.sin(o/2)*Math.sin(o/2);return jX*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))}static vincentyDistance(e,t){let n=6378137,r=1/298.257223563,i=(1-r)*n,a=Math.PI/180,o=e.lat*a,s=t.lat*a,c=(t.lon-e.lon)*a,l=Math.atan((1-r)*Math.tan(o)),u=Math.atan((1-r)*Math.tan(s)),d=Math.sin(l),f=Math.cos(l),p=Math.sin(u),m=Math.cos(u),h=c,g,_=1e3,v,y,b,x,S,C;do{let e=Math.sin(h),t=Math.cos(h);if(v=Math.sqrt(m*e*(m*e)+(f*p-d*m*t)*(f*p-d*m*t)),v===0)return 0;y=d*p+f*m*t,b=Math.atan2(v,y),x=f*m*e/v,S=1-x*x,C=y-2*d*p/S,isNaN(C)&&(C=0);let n=r/16*S*(4+r*(4-3*S));g=h,h=c+(1-n)*r*x*(b+n*v*(C+n*y*(-1+2*C*C)))}while(Math.abs(h-g)>1e-12&&--_>0);if(_===0)return NaN;let ee=S*(n*n-i*i)/(i*i),te=1+ee/16384*(4096+ee*(-768+ee*(320-175*ee))),w=ee/1024*(256+ee*(-128+ee*(74-47*ee))),ne=w*v*(C+w/4*(y*(-1+2*C*C)-w/6*C*(-3+4*v*v)*(-3+4*C*C)));return i*te*(b-ne)}},PX=class e{true;false;constructor(){this.true=new Set,this.false=new Set}insert(e,t){t?this.true.add(e):this.false.add(e)}delete(e,t){t?this.true.delete(e):this.false.delete(e)}getSize(){return this.true.size+this.false.size}toJSON(){return{true:Array.from(this.true),false:Array.from(this.false)}}static fromJSON(t){let n=new e;return n.true=new Set(t.true),n.false=new Set(t.false),n}};function FX(e,t,n,r,i,{k:a,b:o,d:s}){return Math.log(1+(n-t+.5)/(t+.5))*(s+e*(a+1))/(e+a*(1-o+o*r/i))}var IX=class e{size;vectors=new Map;constructor(e){this.size=e}add(e,t){t instanceof Float32Array||(t=new Float32Array(t));let n=LX(t,this.size);this.vectors.set(e,[n,t])}remove(e){this.vectors.delete(e)}find(e,t,n){return e instanceof Float32Array||(e=new Float32Array(e)),bte(e,n,this.vectors,this.size,t)}toJSON(){let e=[];for(let[t,[n,r]]of this.vectors)e.push([t,[n,Array.from(r)]]);return{size:this.size,vectors:e}}static fromJSON(t){let n=t,r=new e(n.size);for(let[e,[t,i]]of n.vectors)r.vectors.set(e,[t,new Float32Array(i)]);return r}};function LX(e,t){let n=0;for(let r=0;r<t;r++)n+=e[r]*e[r];return Math.sqrt(n)}function bte(e,t,n,r,i){let a=LX(e,r),o=[],s=t||n.keys();for(let t of s){let s=n.get(t);if(!s)continue;let c=s[0],l=s[1],u=0;for(let t=0;t<r;t++)u+=e[t]*l[t];let d=u/(a*c);d>=i&&o.push([t,d])}return o}function RX(e,t,n,r,i){let a=nX(e.sharedInternalDocumentStore,n);e.avgFieldLength[t]=((e.avgFieldLength[t]??0)*(i-1)+r.length)/i,e.fieldLengths[t][a]=r.length,e.frequencies[t][a]={}}function zX(e,t,n,r,i){let a=0;for(let e of r)e===i&&a++;let o=nX(e.sharedInternalDocumentStore,n),s=a/r.length;e.frequencies[t][o][i]=s,i in e.tokenOccurrences[t]||(e.tokenOccurrences[t][i]=0),e.tokenOccurrences[t][i]=(e.tokenOccurrences[t][i]??0)+1}function BX(e,t,n,r){let i=nX(e.sharedInternalDocumentStore,n);r>1?e.avgFieldLength[t]=(e.avgFieldLength[t]*r-e.fieldLengths[t][i])/(r-1):e.avgFieldLength[t]=void 0,e.fieldLengths[t][i]=void 0,e.frequencies[t][i]=void 0}function VX(e,t,n){e.tokenOccurrences[t][n]--}function HX(e,t,n,r,i=``){r||={sharedInternalDocumentStore:t,indexes:{},vectorIndexes:{},searchableProperties:[],searchablePropertiesWithTypes:{},frequencies:{},tokenOccurrences:{},avgFieldLength:{},fieldLengths:{}};for(let[a,o]of Object.entries(n)){let n=`${i}${i?`.`:``}${a}`;if(typeof o==`object`&&!Array.isArray(o)){HX(e,t,o,r,n);continue}if(YY(o))r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o,r.vectorIndexes[n]={type:`Vector`,node:new IX(QY(o)),isArray:!1};else{let e=/\[/.test(o);switch(o){case`boolean`:case`boolean[]`:r.indexes[n]={type:`Bool`,node:new PX,isArray:e};break;case`number`:case`number[]`:r.indexes[n]={type:`AVL`,node:new wX(0,[]),isArray:e};break;case`string`:case`string[]`:r.indexes[n]={type:`Radix`,node:new kX,isArray:e},r.avgFieldLength[n]=0,r.frequencies[n]={},r.tokenOccurrences[n]={},r.fieldLengths[n]={};break;case`enum`:case`enum[]`:r.indexes[n]={type:`Flat`,node:new TX,isArray:e};break;case`geopoint`:r.indexes[n]={type:`BKD`,node:new NX,isArray:e};break;default:throw HY(`INVALID_SCHEMA_TYPE`,Array.isArray(o)?`array`:o,n)}r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o}}return r}function UX(e,t,n,r,i,a,o,s){return c=>{let{type:l,node:u}=t.indexes[n];switch(l){case`Bool`:u[c?`true`:`false`].add(r);break;case`AVL`:{let e=s?.avlRebalanceThreshold??1;u.insert(c,r,e);break}case`Radix`:{let s=a.tokenize(c,i,n,!1);e.insertDocumentScoreParameters(t,n,r,s,o);for(let i of s)e.insertTokenScoreParameters(t,n,r,s,i),u.insert(i,r);break}case`Flat`:u.insert(c,r);break;case`BKD`:u.insert(c,[r]);break}}}function WX(e,t,n,r,i,a,o,s,c,l,u){if(YY(o))return GX(t,n,a,r,i);let d=UX(e,t,n,i,s,c,l,u);if(!XY(o))return d(a);let f=a,p=f.length;for(let e=0;e<p;e++)d(f[e])}function GX(e,t,n,r,i){e.vectorIndexes[t].node.add(i,n)}function KX(e,t,n,r,i,a,o,s,c,l){if(YY(o))return t.vectorIndexes[n].node.remove(i),!0;let{type:u,node:d}=t.indexes[n];switch(u){case`AVL`:return d.removeDocument(a,i),!0;case`Bool`:return d[a?`true`:`false`].delete(i),!0;case`Radix`:{let o=c.tokenize(a,s,n);e.removeDocumentScoreParameters(t,n,r,l);for(let r of o)e.removeTokenScoreParameters(t,n,r),d.removeDocumentByWord(r,i);return!0}case`Flat`:return d.removeDocument(i,a),!0;case`BKD`:return d.removeDocByID(a,i),!1}}function qX(e,t,n,r,i,a,o,s,c,l){if(!XY(o))return KX(e,t,n,r,i,a,o,s,c,l);let u=ZY(o),d=a,f=d.length;for(let a=0;a<f;a++)KX(e,t,n,r,i,d[a],u,s,c,l);return!0}function JX(e,t,n,r,i,a,o,s,c,l){let u=Array.from(r),d=e.avgFieldLength[t],f=e.fieldLengths[t],p=e.tokenOccurrences[t],m=e.frequencies[t],h=typeof p[n]==`number`?p[n]??0:0,g=u.length;for(let e=0;e<g;e++){let r=u[e];if(c&&!c.has(r))continue;l.has(r)||l.set(r,new Map);let p=l.get(r);p.set(t,(p.get(t)||0)+1);let g=FX(m?.[r]?.[n]??0,h,i,f[r],d,a);o.has(r)?o.set(r,o.get(r)+g*s):o.set(r,g*s)}}function YX(e,t,n,r,i,a,o,s,c,l,u,d=0){let f=n.tokenize(t,r),p=f.length||1,m=new Map,h=new Map,g=new Map;for(let n of i){if(!(n in e.indexes))continue;let r=e.indexes[n],{type:i}=r;if(i!==`Radix`)throw HY(`WRONG_SEARCH_PROPERTY_TYPE`,n);let d=s[n]??1;if(d<=0)throw HY(`INVALID_BOOST_VALUE`,d);f.length===0&&!t&&f.push(``);let p=f.length;for(let t=0;t<p;t++){let i=f[t],s=r.node.find({term:i,exact:a,tolerance:o}),p=Object.keys(s);p.length>0&&h.set(i,!0);let _=p.length;for(let t=0;t<_;t++){let r=p[t],i=s[r];JX(e,n,r,i,l,c,g,d,u,m)}}}let _=Array.from(g.entries()).map(([e,t])=>[e,t]).sort((e,t)=>t[1]-e[1]);if(_.length===0)return[];if(d===1)return _;if(d===0){if(p===1)return _;for(let e of f)if(!h.get(e))return[];return _.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1})}let v=_.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1});if(v.length>0){let e=_.filter(([e])=>!v.some(([t])=>t===e)),t=Math.ceil(e.length*d);return[...v,...e.slice(0,t)]}return _}function XX(e,t,n,r){if(`and`in n&&n.and&&Array.isArray(n.and)){let i=n.and;return i.length===0?new Set:IY(...i.map(n=>XX(e,t,n,r)))}if(`or`in n&&n.or&&Array.isArray(n.or)){let i=n.or;return i.length===0?new Set:i.map(n=>XX(e,t,n,r)).reduce((e,t)=>RY(e,t),new Set)}if(`not`in n&&n.not){let i=n.not,a=new Set,o=e.sharedInternalDocumentStore;for(let e=1;e<=o.internalIdToId.length;e++)a.add(e);return zY(a,XX(e,t,i,r))}let i=Object.keys(n),a=i.reduce((e,t)=>({[t]:new Set,...e}),{});for(let o of i){let i=n[o];if(e.indexes[o]===void 0)throw HY(`UNKNOWN_FILTER_PROPERTY`,o);let{node:s,type:c,isArray:l}=e.indexes[o];if(c===`Bool`){let e=s,t=i?e.true:e.false;a[o]=RY(a[o],t);continue}if(c===`BKD`){let e;if(`radius`in i)e=`radius`;else if(`polygon`in i)e=`polygon`;else throw Error(`Invalid operation ${i}`);if(e===`radius`){let{value:t,coordinates:n,unit:r=`m`,inside:c=!0,highPrecision:l=!1}=i[e],u=MY(t,r),d=s.searchByRadius(n,u,c,void 0,l);a[o]=nZ(a[o],d)}else{let{coordinates:t,inside:n=!0,highPrecision:r=!1}=i[e],c=s.searchByPolygon(t,n,void 0,r);a[o]=nZ(a[o],c)}continue}if(c===`Radix`&&(typeof i==`string`||Array.isArray(i))){for(let e of[i].flat()){let n=t.tokenize(e,r,o);for(let e of n){let t=s.find({term:e,exact:!0});a[o]=oZ(a[o],t)}}continue}let u=Object.keys(i);if(u.length>1)throw HY(`INVALID_FILTER_OPERATION`,u.length);if(c===`Flat`){let e=new Set(l?s.filterArr(i):s.filter(i));a[o]=RY(a[o],e);continue}if(c===`AVL`){let e=u[0],t=i[e],n;switch(e){case`gt`:n=s.greaterThan(t,!1);break;case`gte`:n=s.greaterThan(t,!0);break;case`lt`:n=s.lessThan(t,!1);break;case`lte`:n=s.lessThan(t,!0);break;case`eq`:n=s.find(t)??new Set;break;case`between`:{let[e,r]=t;n=s.rangeSearch(e,r);break}default:throw HY(`INVALID_FILTER_OPERATION`,e)}a[o]=RY(a[o],n)}}return IY(...Object.values(a))}function ZX(e){return e.searchableProperties}function QX(e){return e.searchablePropertiesWithTypes}function $X(e,t){let{indexes:n,vectorIndexes:r,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}=t,u={},d={};for(let e of Object.keys(n)){let{node:t,type:r,isArray:i}=n[e];switch(r){case`Radix`:u[e]={type:`Radix`,node:kX.fromJSON(t),isArray:i};break;case`Flat`:u[e]={type:`Flat`,node:TX.fromJSON(t),isArray:i};break;case`AVL`:u[e]={type:`AVL`,node:wX.fromJSON(t),isArray:i};break;case`BKD`:u[e]={type:`BKD`,node:NX.fromJSON(t),isArray:i};break;case`Bool`:u[e]={type:`Bool`,node:PX.fromJSON(t),isArray:i};break;default:u[e]=n[e]}}for(let e of Object.keys(r))d[e]={type:`Vector`,isArray:!1,node:IX.fromJSON(r[e])};return{sharedInternalDocumentStore:e,indexes:u,vectorIndexes:d,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}}function eZ(e){let{indexes:t,vectorIndexes:n,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}=e,l={};for(let e of Object.keys(n))l[e]=n[e].node.toJSON();let u={};for(let e of Object.keys(t)){let{type:n,node:r,isArray:i}=t[e];n===`Flat`||n===`Radix`||n===`AVL`||n===`BKD`||n===`Bool`?u[e]={type:n,node:r.toJSON(),isArray:i}:(u[e]=t[e],u[e].node=u[e].node.toJSON())}return{indexes:u,vectorIndexes:l,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}}function tZ(){return{create:HX,insert:WX,remove:qX,insertDocumentScoreParameters:RX,insertTokenScoreParameters:zX,removeDocumentScoreParameters:BX,removeTokenScoreParameters:VX,calculateResultScores:JX,search:YX,searchByWhereClause:XX,getSearchableProperties:ZX,getSearchablePropertiesWithTypes:QX,load:$X,save:eZ}}function nZ(e,t){e||=new Set;let n=t.length;for(let r=0;r<n;r++){let n=t[r].docIDs,i=n.length;for(let t=0;t<i;t++)e.add(n[t])}return e}function rZ(e,t,n=!1){let r=n?NX.vincentyDistance:NX.haversineDistance,i=[],a=[];for(let{point:n}of e)a.push(r(t,n));let o=Math.max(...a),s=0;for(let{docIDs:t}of e){let e=o-a[s]+1;for(let n of t)i.push([n,e]);s++}return i.sort((e,t)=>t[1]-e[1]),i}function iZ(e,t){let n=Object.keys(e);if(n.length!==1)return{isGeoOnly:!1};let r=n[0],i=e[r];if(t.indexes[r]===void 0)return{isGeoOnly:!1};let{type:a}=t.indexes[r];return a===`BKD`&&i&&(`radius`in i||`polygon`in i)?{isGeoOnly:!0,geoProperty:r,geoOperation:i}:{isGeoOnly:!1}}function aZ(e,t){let n=e,r=iZ(t,n);if(!r.isGeoOnly||!r.geoProperty||!r.geoOperation)return null;let{node:i}=n.indexes[r.geoProperty],a=r.geoOperation,o=i,s;if(`radius`in a){let{value:e,coordinates:t,unit:n=`m`,inside:r=!0,highPrecision:i=!1}=a.radius,c=t,l=MY(e,n);return s=o.searchByRadius(c,l,r,`asc`,i),rZ(s,c,i)}else if(`polygon`in a){let{coordinates:e,inside:t=!0,highPrecision:n=!1}=a.polygon;s=o.searchByPolygon(e,t,`asc`,n);let r=NX.calculatePolygonCentroid(e);return rZ(s,r,n)}return null}function oZ(e,t){e||=new Set;let n=Object.keys(t),r=n.length;for(let i=0;i<r;i++){let r=t[n[i]],a=r.length;for(let t=0;t<a;t++)e.add(r[t])}return e}function sZ(e,t,n,r,i){let a={language:e.tokenizer.language,sharedInternalDocumentStore:t,enabled:!0,isSorted:!0,sortableProperties:[],sortablePropertiesWithTypes:{},sorts:{}};for(let[o,s]of Object.entries(n)){let n=`${i}${i?`.`:``}${o}`;if(!r.includes(n)){if(typeof s==`object`&&!Array.isArray(s)){let i=sZ(e,t,s,r,n);vY(a.sortableProperties,i.sortableProperties),a.sorts={...a.sorts,...i.sorts},a.sortablePropertiesWithTypes={...a.sortablePropertiesWithTypes,...i.sortablePropertiesWithTypes};continue}if(!YY(s))switch(s){case`boolean`:case`number`:case`string`:a.sortableProperties.push(n),a.sortablePropertiesWithTypes[n]=s,a.sorts[n]={docs:new Map,orderedDocsToRemove:new Map,orderedDocs:[],type:s};break;case`geopoint`:case`enum`:continue;case`enum[]`:case`boolean[]`:case`number[]`:case`string[]`:continue;default:throw HY(`INVALID_SORT_SCHEMA_TYPE`,Array.isArray(s)?`array`:s,n)}}}return a}function cZ(e,t,n,r){return r?.enabled===!1?{disabled:!0}:sZ(e,t,n,(r||{}).unsortableProperties||[],``)}function lZ(e,t,n,r){if(!e.enabled)return;e.isSorted=!1;let i=nX(e.sharedInternalDocumentStore,n),a=e.sorts[t];a.orderedDocsToRemove.has(i)&&gZ(e,t),a.docs.set(i,a.orderedDocs.length),a.orderedDocs.push([i,r])}function uZ(e){if(e.isSorted||!e.enabled)return;let t=Object.keys(e.sorts);for(let n of t)mZ(e,n);e.isSorted=!0}function dZ(e,t,n){return t[1].localeCompare(n[1],dY(e))}function fZ(e,t){return e[1]-t[1]}function pZ(e,t){return t[1]?-1:1}function mZ(e,t){let n=e.sorts[t],r;switch(n.type){case`string`:r=dZ.bind(null,e.language);break;case`number`:r=fZ.bind(null);break;case`boolean`:r=pZ.bind(null);break}n.orderedDocs.sort(r);let i=n.orderedDocs.length;for(let e=0;e<i;e++){let t=n.orderedDocs[e][0];n.docs.set(t,e)}}function hZ(e){let t=Object.keys(e.sorts);for(let n of t)gZ(e,n)}function gZ(e,t){let n=e.sorts[t];n.orderedDocsToRemove.size&&(n.orderedDocs=n.orderedDocs.filter(e=>!n.orderedDocsToRemove.has(e[0])),n.orderedDocsToRemove.clear())}function _Z(e,t,n){if(!e.enabled)return;let r=e.sorts[t],i=nX(e.sharedInternalDocumentStore,n);r.docs.get(i)&&(r.docs.delete(i),r.orderedDocsToRemove.set(i,!0))}function vZ(e,t,n){if(!e.enabled)throw HY(`SORT_DISABLED`);let r=n.property,i=n.order===`DESC`,a=e.sorts[r];if(!a)throw HY(`UNABLE_TO_SORT_ON_UNKNOWN_FIELD`,r,e.sortableProperties.join(`, `));return gZ(e,r),uZ(e),t.sort((t,n)=>{let r=a.docs.get(nX(e.sharedInternalDocumentStore,t[0])),o=a.docs.get(nX(e.sharedInternalDocumentStore,n[0])),s=r!==void 0,c=o!==void 0;return!s&&!c?0:s?c?i?o-r:r-o:-1:1}),t}function yZ(e){return e.enabled?e.sortableProperties:[]}function bZ(e){return e.enabled?e.sortablePropertiesWithTypes:{}}function xZ(e,t){let n=t;if(!n.enabled)return{enabled:!1};let r=Object.keys(n.sorts).reduce((e,t)=>{let{docs:r,orderedDocs:i,type:a}=n.sorts[t];return e[t]={docs:new Map(Object.entries(r).map(([e,t])=>[+e,t])),orderedDocsToRemove:new Map,orderedDocs:i,type:a},e},{});return{sharedInternalDocumentStore:e,language:n.language,sortableProperties:n.sortableProperties,sortablePropertiesWithTypes:n.sortablePropertiesWithTypes,sorts:r,enabled:!0,isSorted:n.isSorted}}function SZ(e){if(!e.enabled)return{enabled:!1};hZ(e),uZ(e);let t=Object.keys(e.sorts).reduce((t,n)=>{let{docs:r,orderedDocs:i,type:a}=e.sorts[n];return t[n]={docs:Object.fromEntries(r.entries()),orderedDocs:i,type:a},t},{});return{language:e.language,sortableProperties:e.sortableProperties,sortablePropertiesWithTypes:e.sortablePropertiesWithTypes,sorts:t,enabled:e.enabled,isSorted:e.isSorted}}function CZ(){return{create:cZ,insert:lZ,remove:_Z,save:SZ,load:xZ,sortBy:vZ,getSortableProperties:yZ,getSortablePropertiesWithTypes:bZ}}var wZ=192,TZ=383,EZ=[65,65,65,65,65,65,65,67,69,69,69,69,73,73,73,73,69,78,79,79,79,79,79,null,79,85,85,85,85,89,80,115,97,97,97,97,97,97,97,99,101,101,101,101,105,105,105,105,101,110,111,111,111,111,111,null,111,117,117,117,117,121,112,121,65,97,65,97,65,97,67,99,67,99,67,99,67,99,68,100,68,100,69,101,69,101,69,101,69,101,69,101,71,103,71,103,71,103,71,103,72,104,72,104,73,105,73,105,73,105,73,105,73,105,73,105,74,106,75,107,107,76,108,76,108,76,108,76,108,76,108,78,110,78,110,78,110,110,78,110,79,111,79,111,79,111,79,111,82,114,82,114,82,114,83,115,83,115,83,115,83,115,84,116,84,116,84,116,85,117,85,117,85,117,85,117,85,117,85,117,87,119,89,121,89,90,122,90,122,90,122,115];function DZ(e){return e<wZ||e>TZ?e:EZ[e-wZ]||e}function OZ(e){let t=[];for(let n=0;n<e.length;n++)t[n]=DZ(e.charCodeAt(n));return String.fromCharCode(...t)}var kZ={ational:`ate`,tional:`tion`,enci:`ence`,anci:`ance`,izer:`ize`,bli:`ble`,alli:`al`,entli:`ent`,eli:`e`,ousli:`ous`,ization:`ize`,ation:`ate`,ator:`ate`,alism:`al`,iveness:`ive`,fulness:`ful`,ousness:`ous`,aliti:`al`,iviti:`ive`,biliti:`ble`,logi:`log`},AZ={icate:`ic`,ative:``,alize:`al`,iciti:`ic`,ical:`ic`,ful:``,ness:``},jZ=`[^aeiou]`,MZ=`[aeiouy]`,NZ=jZ+`[^aeiouy]*`;MZ+``;var PZ=`^(`+NZ+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*`,FZ=`^(`+NZ+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$`,IZ=`^(`+NZ+`)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*[aeiouy][aeiou]*[^aeiou][^aeiouy]*`,LZ=`^(`+NZ+`)?[aeiouy]`;function RZ(e){let t,n,r,i,a,o;if(e.length<3)return e;let s=e.substring(0,1);if(s==`y`&&(e=s.toUpperCase()+e.substring(1)),r=/^(.+?)(ss|i)es$/,i=/^(.+?)([^s])s$/,r.test(e)?e=e.replace(r,`$1$2`):i.test(e)&&(e=e.replace(i,`$1$2`)),r=/^(.+?)eed$/,i=/^(.+?)(ed|ing)$/,r.test(e)){let t=r.exec(e);r=new RegExp(PZ),r.test(t[1])&&(r=/.$/,e=e.replace(r,``))}else i.test(e)&&(t=i.exec(e)[1],i=new RegExp(LZ),i.test(t)&&(e=t,i=/(at|bl|iz)$/,a=RegExp(`([^aeiouylsz])\\1$`),o=RegExp(`^`+NZ+MZ+`[^aeiouwxy]$`),i.test(e)?e+=`e`:a.test(e)?(r=/.$/,e=e.replace(r,``)):o.test(e)&&(e+=`e`)));if(r=/^(.+?)y$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(LZ),t&&r.test(t)&&(e=t+`i`)),r=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(PZ),t&&r.test(t)&&(e=t+kZ[n])}if(r=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(PZ),t&&r.test(t)&&(e=t+AZ[n])}if(r=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,i=/^(.+?)(s|t)(ion)$/,r.test(e))t=r.exec(e)?.[1],r=new RegExp(IZ),t&&r.test(t)&&(e=t);else if(i.test(e)){let n=i.exec(e);t=n?.[1]??``+n?.[2]??``,i=new RegExp(IZ),i.test(t)&&(e=t)}return r=/^(.+?)e$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(IZ),i=new RegExp(FZ),a=RegExp(`^`+NZ+MZ+`[^aeiouwxy]$`),t&&(r.test(t)||i.test(t)&&!a.test(t))&&(e=t)),r=/ll$/,i=new RegExp(IZ),r.test(e)&&i.test(e)&&(r=/.$/,e=e.replace(r,``)),s==`y`&&(e=s.toLowerCase()+e.substring(1)),e}function zZ(e,t,n=!0){let r=`${this.language}:${e}:${t}`;return n&&this.normalizationCache.has(r)?this.normalizationCache.get(r):this.stopWords?.includes(t)?(n&&this.normalizationCache.set(r,``),``):(this.stemmer&&!this.stemmerSkipProperties.has(e)&&(t=this.stemmer(t)),t=OZ(t),n&&this.normalizationCache.set(r,t),t)}function BZ(e){for(;e[e.length-1]===``;)e.pop();for(;e[0]===``;)e.shift();return e}function VZ(e,t,n,r=!0){if(t&&t!==this.language)throw HY(`LANGUAGE_NOT_SUPPORTED`,t);if(typeof e!=`string`)return[e];let i=this.normalizeToken.bind(this,n??``),a;if(n&&this.tokenizeSkipProperties.has(n))a=[i(e,r)];else{let t=lY[this.language];a=e.toLowerCase().split(t).map(e=>i(e,r)).filter(Boolean)}let o=BZ(a);return this.allowDuplicates?o:Array.from(new Set(o))}function HZ(e={}){if(!e.language)e.language=`english`;else if(!uY.includes(e.language))throw HY(`LANGUAGE_NOT_SUPPORTED`,e.language);let t;if(e.stemming||e.stemmer&&!(`stemming`in e))if(e.stemmer){if(typeof e.stemmer!=`function`)throw HY(`INVALID_STEMMER_FUNCTION_TYPE`);t=e.stemmer}else if(e.language===`english`)t=RZ;else throw HY(`MISSING_STEMMER`,e.language);let n;if(e.stopWords!==!1){if(n=[],Array.isArray(e.stopWords))n=e.stopWords;else if(typeof e.stopWords==`function`)n=e.stopWords(n);else if(e.stopWords)throw HY(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);if(!Array.isArray(n))throw HY(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);for(let e of n)if(typeof e!=`string`)throw HY(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`)}let r={tokenize:VZ,language:e.language,stemmer:t,stemmerSkipProperties:new Set(e.stemmerSkipProperties?[e.stemmerSkipProperties].flat():[]),tokenizeSkipProperties:new Set(e.tokenizeSkipProperties?[e.tokenizeSkipProperties].flat():[]),stopWords:n,allowDuplicates:!!e.allowDuplicates,normalizeToken:zZ,normalizationCache:new Map};return r.tokenize=VZ.bind(r),r.normalizeToken=zZ,r}function UZ(e){return{sharedInternalDocumentStore:e,rules:new Map}}function WZ(e,t){if(e.rules.has(t.id))throw Error(`PINNING_RULE_ALREADY_EXISTS: A pinning rule with id "${t.id}" already exists. Use updateRule to modify it.`);e.rules.set(t.id,t)}function GZ(e,t){if(!e.rules.has(t.id))throw Error(`PINNING_RULE_NOT_FOUND: Cannot update pinning rule with id "${t.id}" because it does not exist. Use addRule to create it.`);e.rules.set(t.id,t)}function KZ(e,t){return e.rules.delete(t)}function qZ(e,t){return e.rules.get(t)}function JZ(e){return Array.from(e.rules.values())}function YZ(e,t){let n=e.toLowerCase().trim(),r=t.pattern.toLowerCase().trim();switch(t.anchoring){case`is`:return n===r;case`starts_with`:return n.startsWith(r);case`contains`:return n.includes(r);default:return!1}}function XZ(e,t){return e?t.conditions.every(t=>YZ(e,t)):!1}function ZZ(e,t){if(!t)return[];let n=[];for(let r of e.rules.values())XZ(t,r)&&n.push(r);return n}function QZ(e,t){return{sharedInternalDocumentStore:e,rules:new Map(t?.rules??[])}}function $Z(e){return{rules:Array.from(e.rules.entries())}}function eQ(){return{create:UZ,addRule:WZ,updateRule:GZ,removeRule:KZ,getRule:qZ,getAllRules:JZ,getMatchingRules:ZZ,load:QZ,save:$Z}}function tQ(e){let t={formatElapsedTime:UY,getDocumentIndexId:WY,getDocumentProperties:kY,validateSchema:GY};for(let n of _X){let r=n;if(e[r]){if(typeof e[r]!=`function`)throw HY(`COMPONENT_MUST_BE_FUNCTION`,r)}else e[r]=t[r]}for(let t of Object.keys(e))if(!gX.includes(t)&&!_X.includes(t))throw HY(`UNSUPPORTED_COMPONENT`,t)}function nQ({schema:e,sort:t,language:n,components:r,id:i,plugins:a}){r||={};for(let t of a??[]){if(!(`getComponents`in t)||typeof t.getComponents!=`function`)continue;let n=t.getComponents(e),i=Object.keys(n);for(let e of i)if(r[e])throw HY(`PLUGIN_COMPONENT_CONFLICT`,e,t.name);r={...r,...n}}i||=TY();let o=r.tokenizer,s=r.index,c=r.documentsStore,l=r.sorter,u=r.pinning;if(o=o?o.tokenize?o:HZ(o):HZ({language:n??`english`}),r.tokenizer&&n)throw HY(`NO_LANGUAGE_WITH_CUSTOM_TOKENIZER`);let d=$Y();s||=tZ(),l||=CZ(),c||=pX(),u||=eQ(),tQ(r);let{getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,formatElapsedTime:h}=r,g={data:{},caches:{},schema:e,tokenizer:o,index:s,sorter:l,documentsStore:c,pinning:u,internalDocumentIDStore:d,getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,beforeInsert:[],afterInsert:[],beforeRemove:[],afterRemove:[],beforeUpdate:[],afterUpdate:[],beforeUpsert:[],afterUpsert:[],beforeSearch:[],afterSearch:[],beforeInsertMultiple:[],afterInsertMultiple:[],beforeRemoveMultiple:[],afterRemoveMultiple:[],beforeUpdateMultiple:[],afterUpdateMultiple:[],beforeUpsertMultiple:[],afterUpsertMultiple:[],afterCreate:[],formatElapsedTime:h,id:i,plugins:a,version:rQ()};g.data={index:g.index.create(g,d,e),docs:g.documentsStore.create(g,d),sorting:g.sorter.create(g,d,e,t),pinning:g.pinning.create(d)};for(let e of mX)g[e]=(g[e]??[]).concat(hX(g,e));let _=g.afterCreate;return _&&SX(_,g),g}function rQ(){return`{{VERSION}}`}function iQ(e){return e.documentsStore.count(e.data.docs)}function aQ(e,t,n,r,i){let a=e.validateSchema(t,e.schema);if(a)throw HY(`SCHEMA_VALIDATION_FAILURE`,a);return PY(e.beforeInsert)||PY(e.afterInsert)||PY(e.index.beforeInsert)||PY(e.index.insert)||PY(e.index.afterInsert)?cQ(e,t,n,r,i):lQ(e,t,n,r,i)}var oQ=new Set([`enum`,`enum[]`]),sQ=new Set([`string`,`number`]);async function cQ(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw HY(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=nX(e.internalDocumentIDStore,s);if(r||await vX(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw HY(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];uQ(n,r,e,t)}return await dQ(e,s,u,f,l,n,t,i),r||await vX(e.afterInsert,e,s,t),s}function lQ(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw HY(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=nX(e.internalDocumentIDStore,s);if(r||vX(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw HY(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];uQ(n,r,e,t)}return fQ(e,s,u,f,l,n,t,i),r||vX(e.afterInsert,e,s,t),s}function uQ(e,t,n,r){if(!(JY(t)&&typeof r==`object`&&typeof r.lon==`number`&&typeof r.lat==`number`)&&!(YY(t)&&Array.isArray(r))&&!(XY(t)&&Array.isArray(r))&&!(oQ.has(t)&&sQ.has(e))&&e!==t)throw HY(`INVALID_DOCUMENT_PROPERTY`,n,t,e)}async function dQ(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o];await e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i);let l=e.internalDocumentIDStore.idToInternalId.get(t);await e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),await e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function fQ(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o],l=nX(e.internalDocumentIDStore,t);e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i),e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function pQ(e,t,n,r,i,a){return PY(e.afterInsertMultiple)||PY(e.beforeInsertMultiple)||PY(e.index.beforeInsert)||PY(e.index.insert)||PY(e.index.afterInsert)?mQ(e,t,n,r,i,a):hQ(e,t,n,r,i,a)}async function mQ(e,t,n=1e3,r,i,a=0){let o=[],s=async a=>{let s=Math.min(a+n,t.length),c=t.slice(a,s);for(let t of c){let n=await aQ(e,t,r,i,{avlRebalanceThreshold:c.length});o.push(n)}return s};return await(async()=>{let e=0;for(;e<t.length;){let t=Date.now();if(e=await s(e),a>0){let e=a-(Date.now()-t);e>0&&BY(e)}}})(),i||await yX(e.afterInsertMultiple,e,t),o}function hQ(e,t,n=1e3,r,i,a=0){let o=[],s=0;function c(){let a=t.slice(s*n,(s+1)*n);if(a.length===0)return!1;for(let t of a){let n=aQ(e,t,r,i,{avlRebalanceThreshold:a.length});o.push(n)}return s++,!0}function l(){let e=Date.now();for(;c();)if(a>0){let t=Date.now()-e;if(t>=a){let e=a-t%a;e>0&&BY(e)}}}return l(),i||yX(e.afterInsertMultiple,e,t),o}function gQ(e,t){return e[1]-t[1]}function _Q(e,t){return t[1]-e[1]}function vQ(e=`desc`){return e.toLowerCase()===`asc`?gQ:_Q}function yQ(e,t,n){let r={},i=t.map(([e])=>e),a=e.documentsStore.getMultiple(e.data.docs,i),o=Object.keys(n),s=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e of o){let t;if(s[e]===`number`){let{ranges:r}=n[e],i=r.length,a=Array.from({length:i});for(let e=0;e<i;e++){let t=r[e];a[e]=[`${t.from}-${t.to}`,0]}t=Object.fromEntries(a)}r[e]={count:0,values:t??{}}}let c=a.length;for(let e=0;e<c;e++){let t=a[e];for(let e of o){let i=e.includes(`.`)?AY(t,e):t[e],a=s[e],o=r[e].values;switch(a){case`number`:{let t=n[e].ranges;bQ(t,o)(i);break}case`number[]`:{let t=new Set,r=n[e].ranges,a=bQ(r,o,t);for(let e of i)a(e);break}case`boolean`:case`enum`:case`string`:xQ(o,a)(i);break;case`boolean[]`:case`enum[]`:case`string[]`:{let e=xQ(o,a===`boolean[]`?`boolean`:`string`,new Set);for(let t of i)e(t);break}default:throw HY(`FACET_NOT_SUPPORTED`,a)}}}for(let e of o){let t=r[e];if(t.count=Object.keys(t.values).length,s[e]===`string`){let r=n[e],i=vQ(r.sort);t.values=Object.fromEntries(Object.entries(t.values).sort(i).slice(r.offset??0,r.limit??10))}}return r}function bQ(e,t,n){return r=>{for(let i of e){let e=`${i.from}-${i.to}`;n?.has(e)||r>=i.from&&r<=i.to&&(t[e]===void 0?t[e]=1:(t[e]++,n?.add(e)))}}}function xQ(e,t,n){let r=t===`boolean`?`false`:``;return t=>{let i=t?.toString()??r;n?.has(i)||(e[i]=(e[i]??0)+1,n?.add(i))}}var SQ={reducer:(e,t,n,r)=>(t[r]=n,t),getInitialValue:e=>Array.from({length:e})},CQ=[`string`,`number`,`boolean`];function wQ(e,t,n){let r=n.properties,i=r.length,a=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e=0;e<i;e++){let t=r[e];if(a[t]===void 0)throw HY(`UNKNOWN_GROUP_BY_PROPERTY`,t);if(!CQ.includes(a[t]))throw HY(`INVALID_GROUP_BY_PROPERTY`,t,CQ.join(`, `),a[t])}let o=t.map(([t])=>rX(e.internalDocumentIDStore,t)),s=e.documentsStore.getMultiple(e.data.docs,o),c=s.length,l=n.maxResult||2**53-1,u=[],d={};for(let e=0;e<i;e++){let t=r[e],n={property:t,perValue:{}},i=new Set;for(let e=0;e<c;e++){let r=s[e],a=AY(r,t);if(a===void 0)continue;let o=typeof a==`boolean`?``+a:a,c=n.perValue[o]??{indexes:[],count:0};c.count>=l||(c.indexes.push(e),c.count++,n.perValue[o]=c,i.add(a))}u.push(Array.from(i)),d[t]=n}let f=TQ(u),p=f.length,m=[];for(let e=0;e<p;e++){let t=f[e],n=t.length,i={values:[],indexes:[]},a=[];for(let e=0;e<n;e++){let n=t[e],o=r[e];a.push(d[o].perValue[typeof n==`boolean`?``+n:n].indexes),i.values.push(n)}i.indexes=OY(a).sort((e,t)=>e-t),i.indexes.length!==0&&m.push(i)}let h=m.length,g=Array.from({length:h});for(let e=0;e<h;e++){let r=m[e],i=n.reduce||SQ,a=r.indexes.map(e=>({id:o[e],score:t[e][1],document:s[e]})),c=i.reducer.bind(null,r.values),l=i.getInitialValue(r.indexes.length),u=a.reduce(c,l);g[e]={values:r.values,result:u}}return g}function TQ(e,t=0){if(t+1===e.length)return e[t].map(e=>[e]);let n=e[t],r=TQ(e,t+1),i=[];for(let e of n)for(let t of r){let n=[e];vY(n,t),i.push(n)}return i}function EQ(e,t,n,r){let i=ZZ(t,r);if(i.length===0)return n;let a=i.flatMap(e=>e.consequence.promote);a.sort((e,t)=>e.position-t.position);let o=new Set,s=new Map,c=new Set;for(let t of a){let n=nX(e.internalDocumentIDStore,t.doc_id);if(n!==void 0){if(s.has(n)){let e=s.get(n);t.position<e&&s.set(n,t.position);continue}c.has(t.position)||(o.add(n),s.set(n,t.position),c.add(t.position))}}if(s.size===0)return n;let l=n.filter(([e])=>!o.has(e)),u=[];for(let[t,r]of s.entries())n.find(([e])=>e===t)?u.push([t,1e6-r]):e.documentsStore.get(e.data.docs,t)&&u.push([t,0]);u.sort((e,t)=>(s.get(e[0])??1/0)-(s.get(t[0])??1/0));let d=[],f=new Map;for(let e of u){let t=s.get(e[0]);f.set(t,e)}let p=0,m=0;for(;m<l.length+u.length;)if(f.has(m))d.push(f.get(m)),m++;else if(p<l.length)d.push(l[p]),p++,m++;else break;for(let[e,t]of f.entries())e>=d.length&&d.push(t);return d}function DQ(e,t,n){let{term:r,properties:i}=t,a=e.data.index,o=e.caches.propertiesToSearch;if(!o){let t=e.index.getSearchablePropertiesWithTypes(a);o=e.index.getSearchableProperties(a),o=o.filter(e=>t[e].startsWith(`string`)),e.caches.propertiesToSearch=o}if(i&&i!==`*`){for(let e of i)if(!o.includes(e))throw HY(`UNKNOWN_INDEX`,e,o.join(`, `));o=o.filter(e=>i.includes(e))}let s=Object.keys(t.where??{}).length>0,c;s&&(c=e.index.searchByWhereClause(a,e.tokenizer,t.where,n));let l,u=t.threshold!==void 0&&t.threshold!==null?t.threshold:1;if(r||i){let i=iQ(e);if(l=e.index.search(a,r||``,e.tokenizer,n,o,t.exact||!1,t.tolerance||0,t.boost||{},MQ(t.relevance),i,c,u),t.exact&&r){let t=r.trim().split(/\s+/);l=l.filter(([n])=>{let r=e.documentsStore.get(e.data.docs,n);if(!r)return!1;for(let e of o){let n=kQ(r,e);if(typeof n==`string`&&t.every(e=>RegExp(`\\b${OQ(e)}\\b`).test(n)))return!0}return!1})}}else l=s?aZ(a,t.where)||(c?Array.from(c):[]).map(e=>[+e,0]):Object.keys(e.documentsStore.getAll(e.data.docs)).map(e=>[+e,0]);return l}function OQ(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function kQ(e,t){let n=t.split(`.`),r=e;for(let e of n)if(r&&typeof r==`object`&&e in r)r=r[e];else return;return r}function AQ(e,t,n){let r=wY();function i(){let i=Object.keys(e.data.index.vectorIndexes),a=t.facets&&Object.keys(t.facets).length>0,{limit:o=10,offset:s=0,distinctOn:c,includeVectors:l=!1}=t,u=t.preflight===!0,d=DQ(e,t,n);if(t.sortBy)if(typeof t.sortBy==`function`){let n=d.map(([e])=>e),r=e.documentsStore.getMultiple(e.data.docs,n).map((e,t)=>[d[t][0],d[t][1],e]);r.sort(t.sortBy),d=r.map(([e,t])=>[e,t])}else d=e.sorter.sortBy(e.data.sorting,d,t.sortBy).map(([t,n])=>[nX(e.internalDocumentIDStore,t),n]);else d=d.sort(DY);d=EQ(e,e.data.pinning,d,t.term);let f;u||(f=c?WQ(e,d,s,o,c):GQ(e,d,s,o));let p={elapsed:{formatted:``,raw:0},hits:[],count:d.length};return f!==void 0&&(p.hits=f.filter(Boolean),l||NY(p,i)),a&&(p.facets=yQ(e,d,t.facets)),t.groupBy&&(p.groups=wQ(e,d,t.groupBy)),p.elapsed=e.formatElapsedTime(wY()-r),p}async function a(){e.beforeSearch&&await xX(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await bX(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}var jQ={k:1.2,b:.75,d:.5};function MQ(e){let t=e??{};return t.k=t.k??jQ.k,t.b=t.b??jQ.b,t.d=t.d??jQ.d,t}function NQ(e,t,n){let r=t.vector;if(r&&(!(`value`in r)||!(`property`in r)))throw HY(`INVALID_VECTOR_INPUT`,Object.keys(r).join(`, `));let i=e.data.index.vectorIndexes[r.property];if(!i)throw HY(`UNKNOWN_VECTOR_PROPERTY`,r.property);let a=i.node.size;if(r?.value.length!==a)throw r?.property===void 0||r?.value.length===void 0?HY(`INVALID_INPUT_VECTOR`,`undefined`,a,`undefined`):HY(`INVALID_INPUT_VECTOR`,r.property,a,r.value.length);let o=e.data.index,s;return Object.keys(t.where??{}).length>0&&(s=e.index.searchByWhereClause(o,e.tokenizer,t.where,n)),i.node.find(r.value,t.similarity??.8,s)}function PQ(e,t,n=`english`){let r=wY();function i(){let i=NQ(e,t,n).sort(DY);i=EQ(e,e.data.pinning,i,void 0);let a=[];t.facets&&Object.keys(t.facets).length>0&&(a=yQ(e,i,t.facets));let o=t.vector.property,s=t.includeVectors??!1,c=t.limit??10,l=t.offset??0,u=Array.from({length:c});for(let t=0;t<c;t++){let n=i[t+l];if(!n)break;let r=e.data.docs.docs[n[0]];r&&(s||(r[o]=null),u[t]={id:rX(e.internalDocumentIDStore,n[0]),score:n[1],document:r})}let d=[];t.groupBy&&(d=wQ(e,i,t.groupBy));let f=wY()-r;return{count:i.length,hits:u.filter(Boolean),elapsed:{raw:Number(f),formatted:CY(f)},...a?{facets:a}:{},...d?{groups:d}:{}}}async function a(){e.beforeSearch&&await xX(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await bX(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function FQ(e,t,n){let r=RQ(DQ(e,t,n)),i=NQ(e,t,n),a=t.hybridWeights;return VQ(r,i,t.term??``,a)}function IQ(e,t,n){let r=wY();function i(){let i=FQ(e,t,n);i=EQ(e,e.data.pinning,i,t.term);let a;t.facets&&Object.keys(t.facets).length>0&&(a=yQ(e,i,t.facets));let o;t.groupBy&&(o=wQ(e,i,t.groupBy));let s=t.offset??0,c=t.limit??10,l=GQ(e,i,s,c).filter(Boolean),u=wY(),d={count:i.length,elapsed:{raw:Number(u-r),formatted:CY(u-r)},hits:l,...a?{facets:a}:{},...o?{groups:o}:{}};return(t.includeVectors??!1)||NY(d,Object.keys(e.data.index.vectorIndexes)),d}async function a(){e.beforeSearch&&await xX(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await bX(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function LQ(e){return e[1]}function RQ(e){let t=Math.max.apply(Math,e.map(LQ));return e.map(([e,n])=>[e,n/t])}function zQ(e,t){return e/t}function BQ(e,t){return(n,r)=>n*e+r*t}function VQ(e,t,n,r){let i=Math.max.apply(Math,e.map(LQ)),a=Math.max.apply(Math,t.map(LQ)),{text:o,vector:s}=r&&r.text&&r.vector?r:HQ(n),c=new Map,l=e.length,u=BQ(o,s);for(let t=0;t<l;t++){let[n,r]=e[t],a=u(zQ(r,i),0);c.set(n,a)}let d=t.length;for(let e=0;e<d;e++){let[n,r]=t[e],i=zQ(r,a),o=c.get(n)??0;c.set(n,o+u(0,i))}return[...c].sort((e,t)=>t[1]-e[1])}function HQ(e){return{text:.5,vector:.5}}function UQ(e,t,n){let r=t.mode??`fulltext`;if(r===`fulltext`)return AQ(e,t,n);if(r===`vector`)return PQ(e,t);if(r===`hybrid`)return IQ(e,t);throw HY(`INVALID_SEARCH_MODE`,r)}function WQ(e,t,n,r,i){let a=e.data.docs,o=new Map,s=[],c=new Set,l=t.length,u=0;for(let d=0;d<l;d++){let l=t[d];if(l===void 0)continue;let[f,p]=l;if(c.has(f))continue;let m=e.documentsStore.get(a,f),h=AY(m,i);if(!(h===void 0||o.has(h))&&(o.set(h,!0),u++,!(u<=n)&&(s.push({id:rX(e.internalDocumentIDStore,f),score:p,document:m}),c.add(f),u>=n+r)))break}return s}function GQ(e,t,n,r){let i=e.data.docs,a=Array.from({length:r}),o=new Set;for(let s=n;s<r+n;s++){let n=t[s];if(n===void 0)break;let[r,c]=n;if(!o.has(r)){let t=e.documentsStore.get(i,r);a[s]={id:rX(e.internalDocumentIDStore,r),score:c,document:t},o.add(r)}}return a}new ay.default;var KQ=new ay.default;KQ.Diff_Timeout=.25;var qQ=A({path:k(Wa([E(),D()])),message:E(),issueCode:E()});Ka(`code`,[A({code:M(`SCHEMA_INVALID`),issues:k(qQ)}),A({code:M(`WRITE_ERROR`),detail:E()})]);function JQ(e){return{path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message,issueCode:e.code}}function YQ(e){if(e.code!==`SCHEMA_INVALID`)return{};let t={};for(let n of e.issues){let e=n.path[0];typeof e==`string`&&(t[e]=t[e]?`${t[e]}; ${n.message}`:n.message)}return t}var XQ=`frontmatter`,ZQ=[`text`,`number`,`boolean`,`date`,`list`,`object`];j(ZQ);var QQ=Wa([E(),D(),O()]),$Q=_o(()=>Wa([QQ.transform(e=>String(e)),Xa(E(),e$),k($Q)])),e$=_o(()=>Wa([E(),D(),O(),k($Q),Xa(E(),e$)])),t$=/^\d{4}-\d{2}-\d{2}$/;function n$(e){return typeof e==`string`&&t$.test(e)}function r$(e){return Array.isArray(e)?`list`:typeof e==`object`&&e?`object`:typeof e==`boolean`?`boolean`:typeof e==`number`?`number`:n$(e)?`date`:`text`}var i$=Xa(E(),e$),a$=Xa(E(),Wa([e$,Fa()]));function o$(e){return!!(e===null||typeof e==`string`&&e===``||Array.isArray(e)&&e.length===0)}function s$(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!s$(e[n],t[n]))return!1;return!0}if(e!==null&&t!==null&&typeof e==`object`&&typeof t==`object`&&!Array.isArray(e)&&!Array.isArray(t)){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.hasOwn(t,r)||!s$(e[r],t[r]))return!1;return!0}return!1}var c$=/^---[ \t]*\r?\n([\s\S]*?\r?\n)?---[ \t]*(\r?\n|$)/,l$=/^---[ \t]*$/;function u$(e){let t=e.match(c$);return t?{frontmatter:t[0],body:e.slice(t[0].length)}:{frontmatter:``,body:e}}function d$(e){if(e===``)return``;let t=e.match(c$);return t?(t[1]??``).replace(/\r?\n$/,``):e}var f$={defaultKeyType:`PLAIN`,defaultStringType:`PLAIN`,lineWidth:0};function p$(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function m$(e,t,n){if(Array.isArray(n)){let r=e.createNode(n),i=Po(t)?t.flow:void 0;return i!==void 0&&(r.flow=i),r}if(p$(n)){let r=e.createNode(n),i=jo(t)?t.flow:void 0;return i!==void 0&&(r.flow=i),r}return n}function h$(e){return e===``?``:`---\n${e.endsWith(`
|
|
384
|
+
`)?e.slice(0,-1):e}\n---\n`}var g$=65536;function _$(e){let t=e.match(c$);return t?{fenced:t[0],body:e.slice(t[0].length)}:{fenced:``,body:e}}function v$(e){if(e.trim()===``)return{doc:new nl({}),map:{}};let t;try{t=$l(e,{uniqueKeys:!1})}catch(e){let t=e instanceof Error?e.message:String(e);return{doc:new nl({}),map:null,parseError:`parse threw: ${t}`}}if(t.errors.length>0)return{doc:t,map:null,parseError:t.errors[0]?.message??`yaml parse errors`};let n;try{n=t.toJS()}catch(e){let n=e instanceof Error?e.message:String(e);return{doc:t,map:null,parseError:`toJS threw: ${n}`}}if(typeof n!=`object`||!n||Array.isArray(n))return{doc:t,map:null,parseError:`top-level value is not a mapping`};let r=i$.safeParse(n);if(!r.success){let e=r.error.issues[0],n=e&&Array.isArray(e.path)?e.path.join(`.`):``,i=e?.message??`unknown`;return{doc:t,map:null,parseError:n?`value at "${n}" failed schema: ${i}`:`schema validation failed: ${i}`}}return{doc:t,map:r.data}}function y$(e){return e===``?{doc:new nl({}),map:{}}:v$(d$(e))}function b$(e){let{fenced:t}=_$(e),{map:n,parseError:r}=y$(t);return{map:n??{},parseError:r}}function x$(e){let{fenced:t}=_$(e);if(t===``)return[];let{doc:n,map:r}=y$(t);return r===null?[]:T$(n)}function S$(e){return typeof e==`object`&&!!e&&`key`in e}function C$(e){let t=e.key;return typeof t==`string`?t:t&&typeof t==`object`&&`value`in t&&typeof t.value==`string`?t.value:null}function w$(e,t){let n=e.key;if(typeof n==`string`){e.key=t;return}if(n&&typeof n==`object`){n.value=t;return}e.key=t}function T$(e){let t=e.contents;if(!t||!(`items`in t)||!Array.isArray(t.items))return[];let n=[];for(let e of t.items){if(!S$(e))continue;let t=C$(e);t!==null&&n.push(t)}return n}function E$(e){if(e.contents==null||!(`items`in e.contents)){let t=e.createNode({});return e.contents=t,t}return e.contents}function D$(e){let t=e.contents;return!t||!(`items`in t)||(t.items?.length??0)===0?``:h$(e.toString(f$))}function O$(e){let t=new TextEncoder().encode(e).byteLength;return t>65536?{kind:`region_too_large`,bytes:t,limit:g$}:null}function k$(e){let t=D$(e),n=O$(t);return n?{ok:!1,error:n}:{ok:!0,nextFenced:t}}function A$(e,t){if(Object.hasOwn(t,`frontmatter`))return{ok:!1,error:{kind:`reserved_key`,key:XQ}};let{doc:n,map:r}=y$(e);if(r===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};try{E$(n);for(let[e,r]of Object.entries(t)){if(r===null){n.delete(e);continue}let t=e$.safeParse(r);if(!t.success)return{ok:!1,error:{kind:`invalid_value`,key:e,reason:t.error.issues[0]?.message??`invalid value`}};n.set(e,m$(n,n.get(e,!0),t.data))}return k$(n)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function j$(e,t,n,r={}){if(t===`frontmatter`||n===`frontmatter`)return{ok:!1,error:{kind:`reserved_key`,key:XQ}};let{doc:i,map:a}=y$(e);if(a===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};if(t===n)return{ok:!0,nextFenced:e};let o=i.contents;if(!o||!(`items`in o)||!Array.isArray(o.items))return{ok:!1,error:{kind:`unknown_key`,key:t}};let s=o.items.find(e=>S$(e)&&C$(e)===t);if(!s)return{ok:!1,error:{kind:`unknown_key`,key:t}};if(!r.allowDuplicate&&o.items.some(e=>S$(e)&&e!==s&&C$(e)===n))return{ok:!1,error:{kind:`duplicate_target`,key:n}};try{return w$(s,n),k$(i)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function M$(e,t){let{doc:n,map:r}=y$(e);if(r===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};let i=n.contents;if(!i||!(`items`in i)||!Array.isArray(i.items))return{ok:!0,nextFenced:e};let a=T$(n);if(a.length!==t.length||!N$(a,t))return{ok:!1,error:{kind:`reorder_mismatch`,expected:a,got:[...t]}};try{let e=i.items.filter(S$),r=[];for(let n of t){let i=e.findIndex(e=>C$(e)===n);if(i===-1)return{ok:!1,error:{kind:`reorder_mismatch`,expected:a,got:[...t]}};let[o]=e.splice(i,1);o&&r.push(o)}return i.items=r,k$(n)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function N$(e,t){let n=new Map;for(let t of e)n.set(t,(n.get(t)??0)+1);for(let e of t){let t=(n.get(e)??0)-1;if(t<0)return!1;n.set(e,t)}for(let e of n.values())if(e!==0)return!1;return!0}function P$(e){if(e.length===0)return{kind:`invalid_path`,path:[...e],reason:`path must have at least one segment`};for(let t=0;t<e.length;t++){let n=e[t];if(typeof n!=`string`&&typeof n!=`number`)return{kind:`invalid_path`,path:[...e],reason:`path segment at index ${t} must be string or number`};if(typeof n==`number`&&(!Number.isInteger(n)||n<0))return{kind:`invalid_path`,path:[...e],reason:`numeric path segment at index ${t} must be a non-negative integer`}}return e[0]===`frontmatter`?{kind:`reserved_key`,key:XQ}:null}function F$(e,t,n){let r=P$(t);if(r)return{ok:!1,error:r};let{doc:i,map:a}=y$(e);if(a===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};let o=e$.safeParse(n);if(!o.success)return{ok:!1,error:{kind:`invalid_value`,key:String(t[t.length-1]),reason:o.error.issues[0]?.message??`invalid value`}};try{return E$(i),i.setIn(t,m$(i,i.getIn(t,!0),o.data)),k$(i)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function I$(e,t){let n=P$(t);if(n)return{ok:!1,error:n};let{doc:r,map:i}=y$(e);if(i===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};try{return r.getIn(t,!0)===void 0?{ok:!0,nextFenced:e}:(r.deleteIn(t),k$(r))}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function L$(e,t){if(t.length===0){let t=e.contents;return jo(t)?t:null}let n=e.getIn(t,!0);return jo(n)?n:null}function R$(e,t,n,r={}){let i=P$(t);if(i)return{ok:!1,error:i};let a=t[t.length-1];if(typeof a!=`string`)return{ok:!1,error:{kind:`invalid_path`,path:[...t],reason:`cannot rename: last path segment must be a string (map key)`}};if(t.length===1&&n===`frontmatter`)return{ok:!1,error:{kind:`reserved_key`,key:XQ}};let{doc:o,map:s}=y$(e);if(s===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};if(a===n)return{ok:!0,nextFenced:e};let c=L$(o,t.slice(0,-1));if(!c)return{ok:!1,error:{kind:`unknown_key`,key:a}};let l=c.items.find(e=>S$(e)&&C$(e)===a);if(!l)return{ok:!1,error:{kind:`unknown_key`,key:a}};if(!r.allowDuplicate&&c.items.some(e=>S$(e)&&e!==l&&C$(e)===n))return{ok:!1,error:{kind:`duplicate_target`,key:n}};try{return w$(l,n),k$(o)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function z$(e,t,n){if(t.length===0)return M$(e,n);let r=P$(t);if(r)return{ok:!1,error:r};let{doc:i,map:a}=y$(e);if(a===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};let o=i.getIn(t,!0);if(!jo(o))return{ok:!1,error:{kind:`invalid_path`,path:[...t],reason:`cannot reorder: target is not a map`}};let s=[];for(let e of o.items){if(!S$(e))continue;let t=C$(e);t!==null&&s.push(t)}if(s.length!==n.length||!N$(s,n))return{ok:!1,error:{kind:`reorder_mismatch`,expected:s,got:[...n]}};try{let e=o.items.filter(S$),t=[];for(let r of n){let i=e.findIndex(e=>C$(e)===r);if(i===-1)return{ok:!1,error:{kind:`reorder_mismatch`,expected:s,got:[...n]}};let[a]=e.splice(i,1);a&&t.push(a)}return o.items=t,k$(i)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function B$(e,t,n){let r=P$(t);if(r)return{ok:!1,error:r};let{doc:i,map:a}=y$(e);if(a===null)return{ok:!1,error:{kind:`parse_failed`,reason:`fm region unparseable`}};let o=i.getIn(t,!0);if(!Po(o))return{ok:!1,error:{kind:`invalid_path`,path:[...t],reason:`cannot reorder: target is not a sequence`}};let s=o,c=s.items.length,l=Array.from({length:c},(e,t)=>t),u=[...n];if(!V$(u,c))return{ok:!1,error:{kind:`reorder_mismatch`,expected:l.map(String),got:u.map(String)}};try{let e=s.items.slice();return s.items=u.map(t=>e[t]),k$(i)}catch(e){return{ok:!1,error:{kind:`parse_failed`,reason:`yaml@2 threw: ${e instanceof Error?e.message:String(e)}`}}}}function V$(e,t){if(e.length!==t)return!1;let n=Array(t).fill(!1);for(let r of e){if(!Number.isInteger(r)||r<0||r>=t||n[r])return!1;n[r]=!0}return!0}var H$=Object.freeze({source:`local`,skipStoreHooks:!1,context:Object.freeze({origin:`form-write`})});function U$(e){return{ok:!1,error:e}}function W$(e){return{ok:!0,...e}}function G$(e){return{ok:!0,...e}}function K$(e){return{ok:!0,...e}}function q$(e){return{ok:!0,...e}}function J$(e){switch(e.kind){case`unknown_key`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:`unknown key '${e.key}'`,issueCode:`unknown_key`}]};case`duplicate_target`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:`key '${e.key}' already exists`,issueCode:`duplicate_target`}]};case`invalid_value`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:e.reason,issueCode:`invalid_value`}]};case`reserved_key`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:`'${e.key}' is a reserved frontmatter key`,issueCode:`reserved_key`}]};case`reorder_mismatch`:return{code:`WRITE_ERROR`,detail:`reorder list does not match current keys (state changed mid-drag)`};case`region_too_large`:return{code:`SCHEMA_INVALID`,issues:[{path:[],message:`Frontmatter region exceeds ${g$}-byte limit (would be ${e.bytes})`,issueCode:`region_too_large`}]};case`parse_failed`:return{code:`WRITE_ERROR`,detail:`Frontmatter YAML is malformed; fix in source mode to commit (${e.reason})`};case`invalid_path`:return{code:`SCHEMA_INVALID`,issues:[{path:[...e.path],message:e.reason,issueCode:`invalid_path`}]}}}function Y$(e,t){if(e.parseError!==t.parseError||e.keys.length!==t.keys.length)return!1;for(let n=0;n<e.keys.length;n++)if(e.keys[n]!==t.keys[n])return!1;for(let n of e.keys)if(!s$(e.map[n],t.map[n]))return!1;return!0}var X$=5;function Z$(e){let t=e.toString();return{snapshot:Q$(t),raw:t}}function Q$(e){let{map:t,parseError:n}=b$(e);return{map:t,keys:x$(e),parseError:n}}function $$(e){return e.startsWith(`---`)}function e1(e){let t=e.document,n=t.getText(`source`),r=new Set,i=Z$(n),a=i.snapshot,o=_$(i.raw).fenced,s=$$(i.raw),c=!1;function l(e=!1){if(c)return;let t,i;try{let e=Z$(n);t=e.snapshot,i=e.raw}catch(e){console.warn(`[bindFrontmatterDoc] readSnapshotFromYText threw:`,e);return}if(!e&&Y$(a,t)){s=$$(i);return}a=t,o=_$(i).fenced,s=$$(i);for(let e of r)try{e(t)}catch(e){console.warn(`[bindFrontmatterDoc] listener threw:`,e)}}let u=e=>{c||t1(e,o.length,s)&&l()};n.observe(u),e.on(`synced`,d);function d(){l(!0)}function f(e){let r;return t.transact(()=>{let{fenced:t}=_$(n.toString());r=e(t),r.ok&&r.nextFenced!==t&&(n.delete(0,t.length),r.nextFenced!==``&&n.insert(0,r.nextFenced))},H$),r??{ok:!1,error:{kind:`parse_failed`,reason:`commit transact produced no result`}}}function p(e){if(c)return U$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});if(Object.hasOwn(e,`frontmatter`))return U$({code:`SCHEMA_INVALID`,issues:[{path:[XQ],message:`'${XQ}' is a reserved frontmatter key`,issueCode:`reserved_key`}]});let t=a$.safeParse(e);if(!t.success)return U$({code:`SCHEMA_INVALID`,issues:t.error.issues.map(JQ)});let n=t.data,r=Object.keys(n),i=f(e=>A$(e,n));return i.ok?W$({appliedKeys:r}):U$(J$(i.error))}function m(e,t,n={}){if(c)return U$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let r=f(r=>j$(r,e,t,n));return r.ok?G$({oldKey:e,newKey:t}):U$(J$(r.error))}function h(e){if(c)return U$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let t=f(t=>M$(t,e));return t.ok?K$({orderedKeys:[...e]}):U$(J$(t.error))}function g(e,t){if(c)return U$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let n=f(n=>F$(n,e,t));return n.ok?q$({path:[...e]}):U$(J$(n.error))}function _(e){if(c)return U$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let t=f(t=>I$(t,e));return t.ok?q$({path:[...e]}):U$(J$(t.error))}function v(e,t,n={}){if(c)return U$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let r=f(r=>R$(r,e,t,n));return r.ok?q$({path:[...e]}):U$(J$(r.error))}function y(e,t){if(c)return U$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let n=f(n=>z$(n,e,t));return n.ok?q$({path:[...e]}):U$(J$(n.error))}function b(e,t){if(c)return U$({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let n=f(n=>B$(n,e,t));return n.ok?q$({path:[...e]}):U$(J$(n.error))}return{current(){return Z$(n).snapshot},patch(e){return p(e)},rename(e,t,n){return m(e,t,n)},reorder(e){return h(e)},patchPath(e,t){return g(e,t)},deletePath(e){return _(e)},renamePath(e,t,n){return v(e,t,n)},reorderPath(e,t){return y(e,t)},reorderSeqPath(e,t){return b(e,t)},subscribe(e){return r.add(e),()=>{r.delete(e)}},dispose(){c||(c=!0,n.unobserve(u),e.off(`synced`,d),r.clear())}}}function t1(e,t,n){if(t===0&&n)return!0;let r=t>0?t:X$,i=0;for(let t of e.delta){if(typeof t.retain==`number`){i+=t.retain;continue}if(typeof t.insert==`string`){if(i<r)return!0;i+=t.insert.length;continue}if(t.insert!==void 0){if(i<r)return!0;i+=1;continue}if(typeof t.delete==`number`&&i<r)return!0}return!1}var n1=new ay.default;n1.Match_Threshold=.5;var r1=`0.0.0-unknown`,i1={protocol:`x-ok-client-protocol`,runtime:`x-ok-client-runtime`,kind:`x-ok-client-kind`};function a1({kind:e,runtimeVersion:t}){return{[i1.protocol]:`1`,[i1.runtime]:t,[i1.kind]:e}}function o1({kind:e,runtimeVersion:t}){return{clientProtocolVersion:1,clientRuntimeVersion:t,clientKind:e}}var s1=`source`;function c1(e){return{ok:!1,error:e}}function l1(e){return{ok:!0,...e}}function u1(){return uu.parse({})}function d1(e,t){let n=e.toString();if(n.length===0)return u1();let r=$l(n);if(r.errors.length>0)return console.warn(`[bindConfigDoc:${t}] Y.Text contains invalid YAML; returning schema defaults. Errors: ${r.errors.map(e=>e.message).join(`; `)}`),u1();let i=r.toJSON()??{},a=uu.safeParse(i);return a.success?a.data:(console.warn(`[bindConfigDoc:${t}] Y.Text content fails schema validation; returning schema defaults. First issue: ${a.error.issues[0]?.message??`(unknown)`}`),u1())}function f1(e,t,n={}){return fu(`config.bind`,{"config.scope":t,"config.transport":`ytext`},()=>p1(e,t,n))}function p1(e,t,n){let{ytextKey:r=s1}=n,i=e.document,a=i.getText(r),o=new Set,s=new Set,c=!1,l=!1;function u(){if(c)return;let e=d1(a,t);for(let n of o)try{n(e)}catch(e){console.warn(`[bindConfigDoc:${t}] listener threw:`,e)}}function d(){if(c||(u(),l))return;l=!0;let e=[...s];s.clear();for(let n of e)try{n()}catch(e){console.warn(`[bindConfigDoc:${t}] synced listener threw:`,e)}}a.observe(u),e.on(`synced`,d);function f(e){if(c)return c1({code:`WRITE_ERROR`,detail:`ConfigBinding (${t}) has been disposed`});let n=vu(e,t);if(n!==null)return c1(n);let r=$l(a.toString()),o=r.contents!==null&&!jo(r.contents);if(r.errors.length>0||o){pu(`config.corrupt-ytext-reset`,{"config.scope":t,"config.parse.errorCount":r.errors.length,"config.parse.topLevelNonMap":o});let e=r.errors.length>0?r.errors.map(e=>e.message).join(`; `):`top-level YAML is not a mapping`;console.warn(`[bindConfigDoc:${t}] dropping corrupt Y.Text and re-applying patch onto empty doc. Reason: ${e}`),r=$l(``)}r.contents===null&&(r.contents=r.createNode({}));let s=bu(r,e),l=r.toJSON()??{},u=fu(`config.validate`,{"config.scope":t,"config.validation.layer":`L1`},e=>{let t=uu.safeParse(l);if(e.setAttribute(`config.outcome`,t.success?`success`:`rejected`),!t.success)for(let e of t.error.issues)pu(`config.validation.issue`,{"issue.path":e.path.map(e=>String(e)).join(`.`),"issue.message":e.message});return t});if(!u.success)return c1({code:`SCHEMA_INVALID`,issues:u.error.issues.map(xu)});let d=r.toString();return i.transact(()=>{a.length>0&&a.delete(0,a.length),a.insert(0,d)}),l1({effective:u.data,appliedPaths:s})}return{current(){return d1(a,t)},patch(e){return fu(`config.patch`,{"config.scope":t,"config.transport":`ytext`},t=>{let n=f(e);return t.setAttribute(`config.outcome`,n.ok?`success`:`rejected`),n.ok||t.setAttribute(`config.error.code`,n.error.code),n})},subscribe(e){return o.add(e),()=>{o.delete(e)}},hasSynced(){return l},subscribeSynced(e){if(c)return()=>{};if(l){let n=!1;return queueMicrotask(()=>{if(!(n||c))try{e()}catch(e){console.warn(`[bindConfigDoc:${t}] synced listener threw:`,e)}}),()=>{n=!0}}return s.add(e),()=>{s.delete(e)}},dispose(){c||(c=!0,a.unobserve(u),e.off(`synced`,d),o.clear(),s.clear())}}}var m1=`source`,h1=800;function g1(e){return{ok:!1,error:e}}function _1(e){return{ok:!0,...e}}function v1(e,t={}){let{ytextKey:n=m1,acceptanceDelayMs:r=h1}=t,i=e.document,a=i.getText(n),o=new Set,s=new Set,c=new Set,l=!1,u=`idle`,d=null;function f(){d!==null&&(clearTimeout(d),d=null)}function p(e){if(!l&&u!==e){u=e;for(let t of c)try{t(e)}catch(e){console.warn(`[bindOkignoreDoc] status listener threw:`,e)}}}function m(){if(l)return;let e=a.toString();for(let t of o)try{t(e)}catch(e){console.warn(`[bindOkignoreDoc] text listener threw:`,e)}}function h(e){if(!l)for(let t of s)try{t(e)}catch(e){console.warn(`[bindOkignoreDoc] rejection listener threw:`,e)}}return a.observe(m),e.on(`synced`,m),{current(){return a.toString()},patch(e){return l?g1({code:`WRITE_ERROR`,detail:`OkignoreBinding has been disposed`}):(i.transact(()=>{a.length>0&&a.delete(0,a.length),e.length>0&&a.insert(0,e)}),f(),p(`pending`),d=setTimeout(()=>{d=null,!l&&u===`pending`&&p(`accepted`)},r),_1({text:e}))},subscribe(e){return o.add(e),()=>{o.delete(e)}},subscribeRejection(e){return s.add(e),()=>{s.delete(e)}},subscribeStatus(e){return c.add(e),()=>{c.delete(e)}},status(){return u},notifyRejection(e){l||(f(),p(`rejected`),h({error:e,text:a.toString()}))},dispose(){l||(l=!0,f(),a.unobserve(m),e.off(`synced`,m),o.clear(),s.clear(),c.clear())}}}function y1(e,t,n){return b1([e,t,n],[])}function b1(e,t){if(t.length>0){let n=gu(uu,t);if(n?.scope===`user`)return e[0];if(n?.scope===`project`)return e[1]??e[0];if(n?.scope===`project-local`)return e[2]??e[1]??e[0]}let n=x1(e);if(n===void 0)return;if(n===null)return null;if(Array.isArray(n)||typeof n!=`object`)return n;let r=e.map(e=>S1(e)?e:void 0),i=new Set;for(let e of r)if(e!==void 0)for(let t of Object.keys(e))i.add(t);let a={};for(let e of i)a[e]=b1(r.map(t=>t===void 0?void 0:t[e]),[...t,e]);return a}function x1(e){for(let t=e.length-1;t>=0;t--)if(e[t]!==void 0)return e[t]}function S1(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var C1=2e3;function w1(e){let t=Date.now();for(let[n,r]of e.entries()){let i=r;i.timestamp&&t-i.timestamp>3e4&&e.delete(n)}}function T1(e,t){for(let[,n]of e.entries()){let e=n;if(e.timestamp&&e.timestamp>t)return!0}return!1}var E1=`__system__`,D1=`__config__/project`,O1=`__user__/config.yml`,k1=`__local__/project`,A1=`__config__/okignore`;Object.freeze([D1,k1,O1,A1]);var j1={sh:`bash`,zsh:`bash`,bash:`bash`,c:`c`,cc:`cpp`,cpp:`cpp`,cxx:`cpp`,"c++":`cpp`,h:`c`,hh:`cpp`,hpp:`cpp`,cs:`csharp`,css:`css`,less:`less`,scss:`scss`,sass:`scss`,diff:`diff`,patch:`diff`,go:`go`,gql:`graphql`,graphql:`graphql`,ini:`ini`,cfg:`ini`,conf:`ini`,properties:`ini`,java:`java`,js:`javascript`,jsx:`javascript`,mjs:`javascript`,cjs:`javascript`,jsonc:`json`,kt:`kotlin`,kts:`kotlin`,lua:`lua`,makefile:`makefile`,md:`markdown`,mdx:`markdown`,m:`objectivec`,mm:`objectivec`,pl:`perl`,pm:`perl`,php:`php`,phtml:`php`,py:`python`,pyi:`python`,pyx:`python`,r:`r`,rb:`ruby`,rs:`rust`,sql:`sql`,swift:`swift`,ts:`typescript`,tsx:`typescript`,xml:`xml`,yaml:`yaml`,yml:`yaml`},M1=new Set(Object.keys(j1));function N1(e){return j1[e.toLowerCase().replace(/^\./,``)]??null}var P1=[`invalid-args`,`nested-project`,`target-not-empty`,`mkdir-failed`,`git-init-failed`,`init-failed`,`discovery-failed`],F1=[`.mdx`,`.md`],I1=`epoch`,L1=512*1024;function R1(e,t=L1){return typeof e==`number`&&Number.isFinite(e)&&e>t}var z1=[`claude`,`claude-desktop`,`cursor`,`codex`],B1={claude:`Claude`,"claude-desktop":`Claude Desktop`,cursor:`Cursor`,codex:`Codex`},V1={cursor:/\bCursor(?:\([^)]+\))?\/\d/,codex:/\bCodex(?:\([^)]+\))?\/\d/,"claude-desktop":/\bClaude(?:\([^)]+\))?\/\d/};function H1(){if(typeof navigator>`u`)return null;let e=navigator.userAgent;for(let[t,n]of Object.entries(V1))if(n.test(e))return t;return null}var U1=[`incoming`,`outgoing`,`both`];function W1(e){return U1.includes(e)}var G1=[{id:`chart`,title:`Chart`,description:`A bar chart whose series colors track the OK chart palette.`,html:`<div style="font-family:system-ui,sans-serif;padding:20px;color:var(--foreground)">
|
|
385
385
|
<h3 style="margin:0 0 14px;font-size:15px;font-weight:600">Revenue by region</h3>
|
|
386
386
|
<div id="bars" style="display:flex;align-items:flex-end;gap:14px;height:170px"></div>
|
|
387
387
|
<script>
|
|
@@ -443,7 +443,7 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
|
|
|
443
443
|
out.textContent = '$' + Number(amt.value).toLocaleString();
|
|
444
444
|
});
|
|
445
445
|
<\/script>
|
|
446
|
-
</div>`}],K1=[{name:`--chart-1`,light:`oklch(0.62 0.19 259)`,dark:`oklch(0.72 0.14 259)`},{name:`--chart-2`,light:`oklch(0.58 0.14 145)`,dark:`oklch(0.73 0.13 145)`},{name:`--chart-3`,light:`oklch(0.62 0.15 70)`,dark:`oklch(0.77 0.14 70)`},{name:`--chart-4`,light:`oklch(0.55 0.18 290)`,dark:`oklch(0.72 0.16 290)`},{name:`--chart-5`,light:`oklch(0.58 0.21 25)`,dark:`oklch(0.72 0.2 25)`},{name:`--primary`,light:`oklch(0.6321 0.1983 259.59)`,dark:`#69a3ff`},{name:`--primary-foreground`,light:`oklch(0.985 0 0)`,dark:`oklch(0.205 0 0)`},{name:`--foreground`,light:`oklch(0.145 0 0)`,dark:`oklch(0.985 0 0)`},{name:`--background`,light:`oklch(1 0 0)`,dark:`oklch(0.145 0 0)`},{name:`--card`,light:`oklch(1 0 0)`,dark:`oklch(0.205 0 0)`},{name:`--card-foreground`,light:`oklch(0.145 0 0)`,dark:`oklch(0.985 0 0)`},{name:`--muted-foreground`,light:`oklch(0.556 0 0)`,dark:`oklch(0.708 0 0)`},{name:`--border`,light:`oklch(0.922 0 0)`,dark:`oklch(1 0 0 / 10%)`},{name:`--destructive`,light:`oklch(0.577 0.245 27.325)`,dark:`oklch(0.704 0.191 22.216)`},{name:`--radius`,light:`0.625rem`,dark:`0.625rem`}],q1=[`image/jpeg`,`image/png`,`image/gif`,`image/webp`,`image/svg+xml`],J1=[`video/mp4`,`video/webm`,`video/ogg`],Y1=[`audio/mpeg`,`audio/wav`,`audio/ogg`],X1=[`application/pdf`],Z1=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`,`svg`]),Q1=new Set([`mp4`,`webm`,`mov`,`m4v`,`mkv`]),$1=new Set([`pdf`]),e0=new Set([`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`]),t0=new Set(`pdf.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),n0=new Set(`png.jpg.jpeg.gif.webp.avif.svg.apng.heic.heif.tiff.bmp.ico.pdf.mp4.webm.mov.m4v.mkv.avi.flv.wmv.mpeg.mpg.mp3.wav.ogg.m4a.flac.aac.opus.zip.7z.tar.gz.rar.woff.woff2.ttf.otf.eot.docx.xlsx.pptx.doc.xls.ppt.odt.ods.odp.pages.numbers.key.epub.mobi.csv.tsv.txt.rtf.json.yaml.yml.xml.toml.lock.gpx.html.htm`.split(`.`)),r0=new Set(`png.jpg.jpeg.gif.webp.avif.apng.heic.heif.tiff.bmp.ico.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.json.toml.lock`.split(`.`)),i0=`wikiembed`,a0=`toast`,o0=new Set(`png.jpg.jpeg.gif.webp.avif.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),s0=[`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`],c0=[`mp4`,`webm`,`mov`,`m4v`],l0=[`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`],u0=[`pdf`],d0=[`json`,`toml`,`lock`];function f0(e,t,n){for(let r of t)if(!n.has(r))throw Error(`${e}: ${r} is not present in canonical upload constants`)}f0(`SIDEBAR_IMAGE_ASSET_EXTENSIONS`,s0,Z1),f0(`SIDEBAR_VIDEO_ASSET_EXTENSIONS`,c0,Q1),f0(`SIDEBAR_AUDIO_ASSET_EXTENSIONS`,l0,e0),f0(`SIDEBAR_PDF_ASSET_EXTENSIONS`,u0,$1),f0(`FILE_ATTACHMENT_EXTENSIONS`,[...t0],o0),f0(`WIKI_EMBED_EXTENSIONS`,[...o0],n0);var p0=new Set(s0),m0=new Set(c0),h0=new Set(l0),g0=new Set(u0),_0=new Set(d0);f0(`SIDEBAR_RENDERABLE_ASSET_EXTENSIONS`,[...new Set([...s0,...c0,...l0,...u0,...d0])],r0);var v0=new Set([`base`,`canvas`]);new Set([...n0,...v0]);function y0(e){let t=e.toLowerCase().replace(/^\./,``);return p0.has(t)?`image`:m0.has(t)?`video`:h0.has(t)?`audio`:g0.has(t)?`pdf`:_0.has(t)||v0.has(t)||N1.has(t)?`text`:null}var b0=RS.extend({priority:60,addAttributes(){return{...this.parent?.(),fenceDelimiter:{default:"`"},fenceLength:{default:3},meta:{default:null},sourceStyle:{default:`fenced`},sourceClosingFenceLength:{default:null,rendered:!1},sourceFenceIndent:{default:null,rendered:!1},sourceInfoPadding:{default:null,rendered:!1},sourceIndents:{default:null,rendered:!1}}}}),x0=ZS.extend({name:`emphasis`,priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`*`}}},addInputRules(){return[lS({find:KS,type:this.type,getAttributes:{sourceDelimiter:`*`}}),lS({find:JS,type:this.type,getAttributes:{sourceDelimiter:`_`}})]}}),S0=GS.extend({name:`strong`,priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`**`}}},addInputRules(){return[lS({find:BS,type:this.type,getAttributes:{sourceDelimiter:`**`}}),lS({find:HS,type:this.type,getAttributes:{sourceDelimiter:`__`}})]}}),C0=Rx.create({name:`escapeMark`,priority:10,excludes:``,inclusive:!1,parseHTML(){return[{tag:`span[data-escape-mark]`}]},renderHTML(){return[`span`,{"data-escape-mark":``},0]}}),w0=jS.create({name:`footnoteDefinition`,group:`block`,content:`block+`,defining:!0,priority:60,addAttributes(){return{identifier:{default:``},label:{default:null}}},parseHTML(){let e=e=>{if(typeof e==`string`)return!1;let t=e.getAttribute(`data-footnote-id`)||``;return{identifier:t,label:t||null}};return[{tag:`aside[data-footnote-def]`,getAttrs:e},{tag:`aside.footnote-def`,getAttrs:e}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.identifier??``);return[`aside`,{...t,"data-footnote-def":``,"data-footnote-id":n,id:`fn-${n}`,class:`footnote-def`},[`div`,{class:`footnote-body`},0],[`a`,{href:`#fnref-${n}`,class:`footnote-backref`,contentEditable:`false`,"aria-label":`Back to reference`},`↩`]]},addCommands(){return{insertFootnoteDefinition:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{identifier:e,label:e},content:[{type:`paragraph`}]})}}});function T0(e){let t=0;for(let n of e){let e=Number.parseInt(n,10);!Number.isNaN(e)&&e>t&&(t=e)}return String(t+1)}function E0(e){let t=[];return e.descendants(e=>(e.type.name===`footnoteDefinition`&&t.push(String(e.attrs.identifier??``)),!0)),t}function D0(e){let t=null;return e.forEach((e,n)=>{e.type.name===`footnoteDefinition`&&(t=n+e.nodeSize)}),t??e.content.size}var O0=jS.create({name:`footnoteReference`,group:`inline`,inline:!0,atom:!0,selectable:!0,draggable:!1,priority:60,addAttributes(){return{identifier:{default:``},label:{default:null}}},parseHTML(){return[{tag:`sup[data-footnote-ref]`,getAttrs:e=>{if(typeof e==`string`)return!1;let t=e.getAttribute(`data-footnote-id`)||``;return{identifier:t,label:t||null}}}]},renderHTML({node:e}){let t=String(e.attrs.identifier??``);return[`sup`,{id:`fnref-${t}`,"data-footnote-ref":``,"data-footnote-id":t,class:`footnote-ref`},[`a`,{href:`#fn-${t}`,class:`footnote-ref-link`},`[${t}]`]]},addCommands(){return{insertFootnoteReference:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{identifier:e,label:e}})}}}),k0=$S.extend({priority:60,addAttributes(){return{...this.parent?.(),hardBreakStyle:{default:`backslash`}}}}),A0=tC.extend({priority:60,addAttributes(){return{...this.parent?.(),headingStyle:{default:`atx`},sourceTrailingHashes:{default:null},sourceUnderlineLength:{default:null},sourceContiguousNext:{default:!1},sourceLeadingIndent:{default:null,rendered:!1},sourceInteriorSpacing:{default:null,rendered:!1}}}}),j0=jS.create({name:`htmlBlock`,group:`block`,atom:!0,priority:60,addAttributes(){return{content:{default:``}}},parseHTML(){return[{tag:`div[data-html-block]`}]},renderHTML({node:e}){return[`div`,{"data-html-block":``,class:`html-block`},e.attrs.content]}});function M0(e){if(typeof e!=`string`||!e.startsWith(`/`))return e;let t=globalThis.window?.okDesktop?.config?.apiOrigin;return typeof t==`string`&&t?t+e:e}var N0=rC.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceUrl:{default:null,rendered:!1}}},renderHTML({HTMLAttributes:e}){let t=Sb(this.options.HTMLAttributes,e);return typeof t.src==`string`&&(t.src=M0(t.src)),[`img`,t]}}),P0=jS.create({name:`jsxComponent`,group:`block`,atom:!1,content:`block*`,isolating:!0,selectable:!0,defining:!0,priority:60,addAttributes(){return{componentName:{default:``},kind:{default:`element`},attributes:{default:[]},sourceRaw:{default:``},sourceDirty:{default:!1},props:{default:{}}}},parseHTML(){return[{tag:`div[data-jsx-component]`,getAttrs:e=>typeof e==`string`?!1:{componentName:e.getAttribute(`data-component-name`)||``,sourceRaw:e.getAttribute(`data-source-raw`)||``}}]},renderHTML({HTMLAttributes:e}){return[`div`,{"data-jsx-component":``,"data-component-name":e.componentName,"data-source-raw":e.sourceRaw},0]},addCommands(){return{insertJsxComponent:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{sourceRaw:e}})}}}),F0=jS.create({name:`jsxInline`,group:`inline`,inline:!0,atom:!1,content:`text*`,isolating:!1,selectable:!0,priority:60,addAttributes(){return{}},parseHTML(){return[{tag:`span[data-jsx-inline]`}]},renderHTML(){return[`span`,{"data-jsx-inline":``},0]}}),I0=[`https`,`http`,`mailto`,`tel`,`ftp`,`sms`],L0=I0.map(e=>`${e}:`).join(`|`),R0=RegExp(`^(?:${L0}|\\/|#|\\?|\\.\\/|\\.\\.\\/)`,`i`);function z0(e){let t=e.trim();return t===``?!0:R0.test(t)}function B0(e){let t=e.trim();if(t===``)return!0;let n=t.indexOf(`:`);if(n===-1)return!0;let r=t.indexOf(`/`),i=t.indexOf(`?`),a=t.indexOf(`#`);return n>Math.min(r===-1?1/0:r,i===-1?1/0:i,a===-1?1/0:a)}var V0=new Set(I0.map(e=>`${e}:`)),H0=`https://placeholder.invalid`;function U0(e){try{let t=new URL(e,H0);return V0.has(t.protocol.toLowerCase())}catch{return!1}}var W0=yT.extend({priority:60,addOptions(){return{openOnClick:!1,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:`http`,HTMLAttributes:{target:`_blank`,rel:`noopener noreferrer`},isAllowedUri:U0,validate:U0,shouldAutoLink:()=>!0}},addAttributes(){return{...this.parent?.(),linkStyle:{default:`inline`,rendered:!1},refLabel:{default:null,rendered:!1},sourceForm:{default:null,rendered:!1},target:{default:null,rendered:!1},anchor:{default:null,rendered:!1},alias:{default:null,rendered:!1},sourceUrlForm:{default:null,rendered:!1},sourceTitleMarker:{default:null,rendered:!1}}}}),G0=jS.create({name:`linkRefDef`,group:`block`,atom:!0,priority:60,addAttributes(){return{label:{default:``},href:{default:``},title:{default:null},sourceLayout:{default:null},sourceTitleMarker:{default:null}}},parseHTML(){return[{tag:`div[data-link-ref-def]`}]},renderHTML({node:e}){let{label:t,href:n,title:r}=e.attrs;return[`div`,{"data-link-ref-def":``,class:`link-ref-def`},r?`[${t}]: ${n} "${r}"`:`[${t}]: ${n}`]}});function K0(e){return e.type.name===`list`&&!e.attrs.ordered}function q0(e){return e.type.name===`list`&&!!e.attrs.ordered}function J0(e){let t=!1;return e.forEach(e=>{e.type.name===`listItem`&&e.attrs.checked!==null&&(t=!0)}),t}function Y0(e,t,n,r,i,a,o){let s=fb(e=>e.type.name===`list`)(e.selection);if(s&&i(s.node)){let{$from:n,$to:i}=e.selection;return n.blockRange(i)?Mm(r)(e,t):!1}if(s){if(!t)return!0;let{tr:n}=e;return n.setNodeMarkup(s.pos,void 0,{...s.node.attrs,...a}),o!==void 0&&s.node.forEach((e,t)=>{if(e.type.name===`listItem`){let r=s.pos+1+t;n.setNodeMarkup(r,void 0,{...e.attrs,...o})}}),t(n),!0}return km(n,a)(e,void 0)?t?km(n,a)(e,n=>{if(o){let t=n.mapping.map(e.selection.$from.pos),r=n.doc.resolve(t);for(let e=r.depth;e>0;e--){let t=r.node(e);if(t.type.name===`listItem`){n.setNodeMarkup(r.before(e),void 0,{...t.attrs,...o});break}}}t(n)}):!0:!1}var X0=jS.create({name:`list`,group:`block list`,content:`listItem+`,priority:60,addAttributes(){return{ordered:{default:!1},start:{default:1},spread:{default:!1},bulletMarker:{default:null},listMarkerDelimiter:{default:null}}},parseHTML(){return[{tag:`ul`,getAttrs:()=>({ordered:!1})},{tag:`ol`,getAttrs:e=>({ordered:!0,start:e.getAttribute(`start`)?Number(e.getAttribute(`start`)):1})}]},renderHTML({node:e,HTMLAttributes:t}){let n=e.attrs.ordered?`ol`:`ul`,r={};return e.attrs.ordered&&e.attrs.start!==1&&(r.start=e.attrs.start),[n,Sb(t,r),0]},addCommands(){return{toggleBulletList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:Y0(e,t,n,r,e=>K0(e)&&!J0(e),{ordered:!1},{checked:null})},toggleOrderedList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:Y0(e,t,n,r,e=>q0(e),{ordered:!0},{checked:null})},toggleTaskList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:Y0(e,t,n,r,e=>K0(e)&&J0(e),{ordered:!1},{checked:!1})}}},addInputRules(){return[fS({find:/^\s*([-+*])(?!\s*\[[ xX]\])\s$/,type:this.type,getAttributes:e=>({ordered:!1,bulletMarker:e[1]})}),fS({find:/^\s*(\d+)([.)])\s$/,type:this.type,getAttributes:e=>({ordered:!0,start:Number(e[1]),listMarkerDelimiter:e[2]})}),new Ax({find:/^\s*[-*+]\s\[([ xX])\]\s$/,handler:({state:e,range:t,match:n})=>{let r=e.schema.nodes.list;if(!r)return null;let i=n[1]!==` `,a=e.tr.delete(t.from,t.to),o=a.doc.resolve(t.from).blockRange();if(!o)return null;let s=Rf(o,r,{ordered:!1});if(!s)return null;a.wrap(o,s);let c=a.doc.resolve(a.mapping.map(t.from));for(let e=c.depth;e>0;e--){let t=c.node(e);if(t.type.name===`listItem`){a.setNodeMarkup(c.before(e),void 0,{...t.attrs,checked:i});break}}}})]},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList(),"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList(),"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),Z0=jS.create({name:`listItem`,content:`paragraph block*`,defining:!0,addAttributes(){return{checked:{default:null},spread:{default:!1},sourceMarkerSpacing:{default:null,rendered:!1},sourceOrdinal:{default:null,rendered:!1},sourceCheckboxChar:{default:null,rendered:!1},sourceContinuationIndent:{default:null,rendered:!1}}},parseHTML(){return[{tag:`li`,getAttrs:e=>{let t=e.querySelector(`input[type="checkbox"]`);return{checked:t?t.checked:null}}}]},renderHTML({node:e,HTMLAttributes:t}){return e.attrs.checked===null?[`li`,Sb(t),0]:[`li`,Sb(t,{"data-type":`taskItem`,"data-checked":e.attrs.checked?`true`:`false`}),[`label`,{contenteditable:`false`},[`input`,{type:`checkbox`,...e.attrs.checked?{checked:`checked`}:{}}]],[`div`,0]]},addNodeView(){return({node:e,getPos:t,editor:n,HTMLAttributes:r})=>{let i=document.createElement(`li`);Object.entries(Sb(r,e.attrs.checked===null?{}:{"data-type":`taskItem`,"data-checked":String(!!e.attrs.checked)})).forEach(([e,t])=>{t!=null&&i.setAttribute(e,String(t))});let a=null,o=null,s=document.createElement(`div`);return e.attrs.checked!==null&&(a=document.createElement(`label`),a.contentEditable=`false`,o=document.createElement(`input`),o.type=`checkbox`,o.checked=!!e.attrs.checked,n.isEditable||(o.disabled=!0),o.addEventListener(`change`,()=>{let r=t();r===void 0||typeof r!=`number`||n.view.dispatch(n.view.state.tr.setNodeMarkup(r,void 0,{...e.attrs,checked:o?.checked??!1}))}),a.appendChild(o),i.appendChild(a)),i.appendChild(s),{dom:i,contentDOM:s,update(t){return t.type!==e.type||t.attrs.checked!==null!=(e.attrs.checked!==null)?!1:(o&&t.attrs.checked!==null&&(o.checked=!!t.attrs.checked,i.setAttribute(`data-checked`,String(!!t.attrs.checked))),e=t,!0)}}}},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>{let{$from:e}=this.editor.state.selection;for(let t=e.depth;t>0;t--)if(e.node(t).type.name===`listItem`)return this.editor.commands.sinkListItem(this.name);return!1},"Shift-Tab":()=>{let{$from:e}=this.editor.state.selection;for(let t=e.depth;t>0;t--)if(e.node(t).type.name===`listItem`)return this.editor.commands.liftListItem(this.name);return!1}}}}),Q0=X0,$0=Z0,e2=jS.create({name:`mathInline`,group:`inline`,inline:!0,atom:!0,selectable:!0,priority:60,addAttributes(){return{formula:{default:``},id:{default:null},language:{default:`latex`},sourceDelimiter:{default:null,rendered:!1}}},parseHTML(){return[{tag:`span[data-math-inline]`,getAttrs:e=>typeof e==`string`?!1:{formula:e.getAttribute(`data-formula`)||``,id:e.getAttribute(`id`)||null,language:e.getAttribute(`data-language`)||`latex`}}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-math-inline":``,"data-formula":e.formula,"data-language":e.language,...e.id?{id:e.id}:{}}]},addCommands(){return{insertMathInline:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{formula:e}})}}}),t2=jS.create({name:`rawMdxFallback`,group:`block`,atom:!1,content:`text*`,isolating:!0,selectable:!0,defining:!0,priority:60,addAttributes(){return{reason:{default:``},originalSpan:{default:{start:0,end:0}}}},parseHTML(){let e=e=>typeof e==`string`?!1:{reason:e.getAttribute(`data-reason`)||``};return[{tag:`div[data-raw-mdx-fallback]`,getAttrs:e},{tag:`pre[data-raw-mdx-fallback]`,getAttrs:e}]},renderHTML({HTMLAttributes:e}){return[`div`,{"data-raw-mdx-fallback":``,"data-raw-badge":`raw`,"data-reason":e.reason,contenteditable:`false`,class:`raw-mdx-fallback`},0]},addNodeView(){return({HTMLAttributes:e})=>{let t=document.createElement(`div`);t.setAttribute(`data-raw-mdx-fallback`,``),t.setAttribute(`data-raw-badge`,`raw`),t.setAttribute(`contenteditable`,`false`),t.classList.add(`raw-mdx-fallback`),e.reason&&t.setAttribute(`data-reason`,e.reason);let n=document.createElement(`pre`);return n.classList.add(`raw-mdx-fallback-content`),n.setAttribute(`contenteditable`,`false`),t.appendChild(n),{dom:t,contentDOM:n,ignoreMutation:()=>!0}}}}),n2=MD.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceMarkerSpacings:{default:null}}}}),r2=ID.extend({excludes:``,addAttributes(){return{...this.parent?.(),sourceFenceChar:{default:"`"},sourceFenceLength:{default:1},sourcePadded:{default:!1,rendered:!1}}}}),i2=jS.create({name:`commentBlock`,group:`block`,content:`block+`,defining:!0,priority:60,addAttributes(){return{sourceForm:{default:`percent`,parseHTML:e=>e.getAttribute(`data-source-form`)===`html`?`html`:`percent`,renderHTML:e=>e.sourceForm===`html`?{"data-source-form":`html`}:{}},sourceLayout:{default:`block`,parseHTML:e=>e.getAttribute(`data-source-layout`)===`inline`?`inline`:`block`,renderHTML:e=>e.sourceLayout===`inline`?{"data-source-layout":`inline`}:{}}}},parseHTML(){return[{tag:`aside[data-comment-block]`},{tag:`aside.comment-block`}]},renderHTML({HTMLAttributes:e}){return[`aside`,{"data-comment-block":``,"data-clipboard-omit":`true`,class:`comment-block`,style:`display: none;`,...e},0]},addCommands(){return{setCommentBlock:()=>({commands:e})=>e.wrapIn(this.name),toggleCommentBlock:()=>({commands:e})=>e.toggleWrap(this.name),unsetCommentBlock:()=>({commands:e})=>e.lift(this.name)}}}),a2=Rx.create({name:`comment`,priority:10,excludes:``,inclusive:!1,addAttributes(){return{sourceForm:{default:`percent`,parseHTML:e=>e.getAttribute(`data-source-form`)===`html`?`html`:`percent`,renderHTML:e=>e.sourceForm===`html`?{"data-source-form":`html`}:{}}}},parseHTML(){return[{tag:`span[data-comment-mark]`}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-comment-mark":``,"data-clipboard-omit":`true`,class:`comment-mark`,style:`display: none;`,...e},0]},addCommands(){return{setComment:()=>({commands:e})=>e.setMark(this.name),toggleComment:()=>({commands:e})=>e.toggleMark(this.name),unsetComment:()=>({commands:e})=>e.unsetMark(this.name)}}}),o2=qx.create({name:`docFidelity`,addGlobalAttributes(){return[{types:[`doc`],attributes:{sourceDocBoundary:{default:null,rendered:!1}}}]}}),s2=jS.create({name:`imageReference`,group:`inline`,inline:!0,atom:!0,priority:60,addAttributes(){return{alt:{default:``},label:{default:``},identifier:{default:``},referenceType:{default:`shortcut`}}},parseHTML(){return[{tag:`img[data-image-reference]`}]},renderHTML({node:e}){let{alt:t,label:n,referenceType:r}=e.attrs;return[`img`,{"data-image-reference":``,"data-reference-type":r,"data-label":n,alt:t||n}]}}),c2=new Map([[32,` `],[9,` `]]);function l2(e){let t=/^&#(x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);$/.exec(e);if(!t)return null;let n=t[1],r=n[0]===`x`||n[0]===`X`,i=Number.parseInt(r?n.slice(1):n,r?16:10);return Number.isNaN(i)?null:i}function u2(e){let t=l2(e);return t!==null&&c2.has(t)}function d2(e){let t=l2(e);return t===null?null:c2.get(t)??null}var f2=/&#(?:x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);/g;function p2(e){f2.lastIndex=0;let t=e.match(f2);if(t===null||t.join(``)!==e)return null;let n=``;for(let e of t){let t=d2(e);if(t===null)return null;n+=t}return n}var m2=Rx.create({name:`sourceLiteral`,priority:10,excludes:``,inclusive:!1,addAttributes(){return{sourceRaw:{default:``}}},parseHTML(){return[{tag:`span[data-source-literal]`}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-source-literal":``,...e},0]}});function h2(e,t){if(typeof e!=`string`||typeof t!=`string`||/[\x00-\x1F\x7F]/.test(e))return!1;let n=e.replaceAll(`\xA0`,` `),r=t.replaceAll(`\xA0`,` `);return n===r||g2(n)===r?!0:p2(n)===r}function g2(e){return e.replace(/\\([!-/:-@[-`{-~])/g,`$1`)}var _2=SO.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`~~`,rendered:!1}}}}),v2=kD.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceDashCounts:{default:null},sourceOuterPipes:{default:null,rendered:!1},sourceAlignmentPadding:{default:null,rendered:!1}}}}),y2=mD.extend({priority:60,addAttributes(){return{...this.parent?.(),sourcePadding:{default:null}}}}),b2=hD.extend({priority:60,addAttributes(){return{...this.parent?.(),sourcePadding:{default:null}}}}),x2=jS.create({name:`tag`,group:`inline`,inline:!0,atom:!0,selectable:!0,priority:60,addAttributes(){return{value:{default:``}}},parseHTML(){return[{tag:`a[data-tag]`,getAttrs:e=>typeof e==`string`?!1:{value:e.getAttribute(`data-tag`)||``}}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.value??``);return[`a`,{...t,"data-tag":n,href:`#tag/${n}`,class:`tag`},`#${n}`]},addCommands(){return{insertTag:e=>({chain:t})=>t().insertContent({type:`tag`,attrs:{value:e}}).run()}}}),S2=/^(?:---|—-|___\s|\*\*\*\s)$/;function C2(e){let t=String(e[0]??``).replace(/\s+$/,``);return t===`—-`?`---`:t}var w2=zD.extend({name:`thematicBreak`,priority:60,addAttributes(){return{...this.parent?.(),sourceRaw:{default:`---`}}},addInputRules(){return[uS({find:S2,type:this.type,getAttributes:e=>({sourceRaw:C2(e)})})]}}),T2=/^\[\[([^[\]|#]+?)(?:#([^\]|]+?))?(?:\|([^\]]+?))?\]\]/;function E2(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function D2(e){let t=e.match(T2);if(!t)return null;let n=t[1]?.trim()??``;return n?{type:`wikilink`,raw:t[0],target:n,anchor:E2(t[2]),alias:E2(t[3])}:null}function O2(e){return e.alias?e.alias:e.anchor?`${e.target}#${e.anchor}`:e.target}var k2=jS.create({name:`wikiLink`,group:`inline`,inline:!0,atom:!0,priority:60,addAttributes(){return{target:{default:``},alias:{default:null},anchor:{default:null},resolved:{default:!1},sourceTarget:{default:null,rendered:!1},sourceAnchor:{default:null,rendered:!1},sourceAlias:{default:null,rendered:!1}}},parseHTML(){return[{tag:`span[data-wiki-link]`,getAttrs:e=>typeof e==`string`?!1:{target:e.getAttribute(`data-target`)||``,alias:E2(e.getAttribute(`data-alias`)),anchor:E2(e.getAttribute(`data-anchor`)),resolved:e.getAttribute(`data-resolved`)===`true`}},{tag:`a.wiki-link[data-target]`,priority:100,getAttrs:e=>{if(typeof e==`string`)return!1;let t=e.getAttribute(`data-target`)??``;return t?{target:t,alias:E2(e.getAttribute(`data-alias`)),anchor:E2(e.getAttribute(`data-anchor`)),resolved:!1}:!1}}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.target??``),r=E2(e.attrs.alias),i=E2(e.attrs.anchor),a=e.attrs.resolved===!0;return[`span`,{...t,"data-wiki-link":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,"data-resolved":a?`true`:`false`},O2({target:n,alias:r,anchor:i})]}});function A2(e){let t=e.split(`/`).pop()??e,n=t.lastIndexOf(`.`);return n<=0||n===t.length-1?``:t.slice(n+1).toLowerCase()}function j2(e){return e.alias?e.alias:e.anchor?`${e.target}#${e.anchor}`:e.target}var M2=jS.create({name:`wikiLinkEmbed`,group:`inline`,inline:!0,atom:!0,priority:60,addAttributes(){return{target:{default:``},alias:{default:null},anchor:{default:null},resolvedSrc:{default:null,rendered:!1,parseHTML:()=>null}}},parseHTML(){let e=e=>typeof e==`string`||!e.hasAttribute(`data-wiki-embed`)?!1:{target:e.getAttribute(`data-target`)||``,alias:E2(e.getAttribute(`data-alias`)),anchor:E2(e.getAttribute(`data-anchor`))};return[{tag:`img[data-wiki-embed]`,getAttrs:e,priority:100},{tag:`a[data-wiki-embed]`,getAttrs:e,priority:100}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.target??``),r=E2(e.attrs.alias),i=E2(e.attrs.anchor),a=E2(e.attrs.resolvedSrc),o=A2(n);if(Z1.has(o))return[`img`,{...t,"data-wiki-embed":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,src:a??n,alt:r??n}];let s=a??n;return[`a`,{...t,"data-wiki-embed":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,href:i?`${s}#${i}`:s,target:`_blank`,rel:`noopener noreferrer`},j2({target:n,alias:r,anchor:i})]}}),N2=[P0,t2,F0,e2,k2,M2,x2,Q0,$0,x0,S0,_2,r2,b0,n2,A0,w2,W0,j0,G0,k0,C0,o2,m2,fte.configure({undoRedo:!1,bulletList:!1,orderedList:!1,listItem:!1,italic:!1,bold:!1,strike:!1,code:!1,codeBlock:!1,heading:!1,horizontalRule:!1,hardBreak:!1,link:!1,blockquote:!1,dropcursor:{color:`color-mix(in oklch, var(--primary) 50%, transparent)`,width:2}}),v2.configure({resizable:!0}),gD,b2,y2,N0.configure({inline:!0}),s2,ST,a2,i2,O0,w0],P2=/^[a-zA-Z0-9][\w/-]*$/;function F2(e){if(typeof e!=`string`)return!1;let t=e.startsWith(`#`)?e.slice(1):e;return P2.test(t)}var I2=`Tags must start with a letter or digit and contain only letters, digits, underscores, dashes, and slashes.`;function L2(e,t){let n=encodeURIComponent(t.projectDir);if(t.prompt===``)return`claude://${e.mode}/new?folder=${n}`;let r=encodeURIComponent(t.prompt);return`claude://${e.mode}/new?q=${r}&folder=${n}`}function R2(e){let t=encodeURIComponent(e.projectDir);return e.prompt===``?`codex://new?path=${t}`:`codex://new?prompt=${encodeURIComponent(e.prompt)}&path=${t}`}function z2(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return t<0?e:e.substring(t+1)}function B2(e){let t=encodeURIComponent(z2(e.projectDir));return e.prompt===``?`cursor://anysphere.cursor-deeplink/prompt?workspace=${t}&mode=agent`:`cursor://anysphere.cursor-deeplink/prompt?text=${encodeURIComponent(encodeURIComponent(e.prompt))}&workspace=${t}&mode=agent`}var V2=RegExp("[\\u0000-\\u001f\\u007f-\\u009f\\u200b-\\u200f\\u2028-\\u202e\\u2060-\\u2069\\ufeff`]+",`g`),H2=RegExp("[ \\u00a0\\u0000-\\u001f\\u007f-\\u009f\\u200b-\\u200f\\u2028-\\u202e\\u2060-\\u2069\\ufeff`]+",`g`);function U2(e){return e.replace(V2,`_`)}function W2(e){return e.replace(H2,`_`)}function G2(e,t){let n=`Let's work on \`${U2(e)}\` using Open Knowledge.`;return t?`${n} Open the OK editor in web view.`:n}function K2(e,t){let n=`Let's work on the \`${U2(e)}\` folder using Open Knowledge.`;return t?`${n} Open the OK editor in web view.`:n}function q2(e){let t=`Let's work on this project using Open Knowledge.`;return e?`${t} Open the OK editor in web view.`:t}function J2(e,t,n){let r=e.trim(),i=t?` Open the OK editor in web view.`:``,a=e=>e.split(`
|
|
446
|
+
</div>`}],K1=[{name:`--chart-1`,light:`oklch(0.62 0.19 259)`,dark:`oklch(0.72 0.14 259)`},{name:`--chart-2`,light:`oklch(0.58 0.14 145)`,dark:`oklch(0.73 0.13 145)`},{name:`--chart-3`,light:`oklch(0.62 0.15 70)`,dark:`oklch(0.77 0.14 70)`},{name:`--chart-4`,light:`oklch(0.55 0.18 290)`,dark:`oklch(0.72 0.16 290)`},{name:`--chart-5`,light:`oklch(0.58 0.21 25)`,dark:`oklch(0.72 0.2 25)`},{name:`--primary`,light:`oklch(0.6321 0.1983 259.59)`,dark:`#69a3ff`},{name:`--primary-foreground`,light:`oklch(0.985 0 0)`,dark:`oklch(0.205 0 0)`},{name:`--foreground`,light:`oklch(0.145 0 0)`,dark:`oklch(0.985 0 0)`},{name:`--background`,light:`oklch(1 0 0)`,dark:`oklch(0.145 0 0)`},{name:`--card`,light:`oklch(1 0 0)`,dark:`oklch(0.205 0 0)`},{name:`--card-foreground`,light:`oklch(0.145 0 0)`,dark:`oklch(0.985 0 0)`},{name:`--muted-foreground`,light:`oklch(0.556 0 0)`,dark:`oklch(0.708 0 0)`},{name:`--border`,light:`oklch(0.922 0 0)`,dark:`oklch(1 0 0 / 10%)`},{name:`--destructive`,light:`oklch(0.577 0.245 27.325)`,dark:`oklch(0.704 0.191 22.216)`},{name:`--radius`,light:`0.625rem`,dark:`0.625rem`}],q1=[`image/jpeg`,`image/png`,`image/gif`,`image/webp`,`image/svg+xml`],J1=[`video/mp4`,`video/webm`,`video/ogg`],Y1=[`audio/mpeg`,`audio/wav`,`audio/ogg`],X1=[`application/pdf`],Z1=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`,`svg`]),Q1=new Set([`mp4`,`webm`,`mov`,`m4v`,`mkv`]),$1=new Set([`pdf`]),e0=new Set([`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`]),t0=new Set(`pdf.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),n0=new Set(`png.jpg.jpeg.gif.webp.avif.svg.apng.heic.heif.tiff.bmp.ico.pdf.mp4.webm.mov.m4v.mkv.avi.flv.wmv.mpeg.mpg.mp3.wav.ogg.m4a.flac.aac.opus.zip.7z.tar.gz.rar.woff.woff2.ttf.otf.eot.docx.xlsx.pptx.doc.xls.ppt.odt.ods.odp.pages.numbers.key.epub.mobi.csv.tsv.txt.rtf.json.yaml.yml.xml.toml.lock.gpx.html.htm`.split(`.`)),r0=new Set(`png.jpg.jpeg.gif.webp.avif.apng.heic.heif.tiff.bmp.ico.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.json.toml.lock`.split(`.`)),i0=`wikiembed`,a0=`toast`,o0=new Set(`png.jpg.jpeg.gif.webp.avif.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),s0=[`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`],c0=[`mp4`,`webm`,`mov`,`m4v`],l0=[`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`],u0=[`pdf`],d0=[`json`,`toml`,`lock`];function f0(e,t,n){for(let r of t)if(!n.has(r))throw Error(`${e}: ${r} is not present in canonical upload constants`)}f0(`SIDEBAR_IMAGE_ASSET_EXTENSIONS`,s0,Z1),f0(`SIDEBAR_VIDEO_ASSET_EXTENSIONS`,c0,Q1),f0(`SIDEBAR_AUDIO_ASSET_EXTENSIONS`,l0,e0),f0(`SIDEBAR_PDF_ASSET_EXTENSIONS`,u0,$1),f0(`FILE_ATTACHMENT_EXTENSIONS`,[...t0],o0),f0(`WIKI_EMBED_EXTENSIONS`,[...o0],n0);var p0=new Set(s0),m0=new Set(c0),h0=new Set(l0),g0=new Set(u0),_0=new Set(d0);f0(`SIDEBAR_RENDERABLE_ASSET_EXTENSIONS`,[...new Set([...s0,...c0,...l0,...u0,...d0])],r0);var v0=new Set([`base`,`canvas`]);new Set([...n0,...v0]);function y0(e){let t=e.toLowerCase().replace(/^\./,``);return p0.has(t)?`image`:m0.has(t)?`video`:h0.has(t)?`audio`:g0.has(t)?`pdf`:_0.has(t)||v0.has(t)||M1.has(t)?`text`:null}var b0=RS.extend({priority:60,addAttributes(){return{...this.parent?.(),fenceDelimiter:{default:"`"},fenceLength:{default:3},meta:{default:null},sourceStyle:{default:`fenced`},sourceClosingFenceLength:{default:null,rendered:!1},sourceFenceIndent:{default:null,rendered:!1},sourceInfoPadding:{default:null,rendered:!1},sourceIndents:{default:null,rendered:!1}}}}),x0=ZS.extend({name:`emphasis`,priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`*`}}},addInputRules(){return[lS({find:KS,type:this.type,getAttributes:{sourceDelimiter:`*`}}),lS({find:JS,type:this.type,getAttributes:{sourceDelimiter:`_`}})]}}),S0=GS.extend({name:`strong`,priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`**`}}},addInputRules(){return[lS({find:BS,type:this.type,getAttributes:{sourceDelimiter:`**`}}),lS({find:HS,type:this.type,getAttributes:{sourceDelimiter:`__`}})]}}),C0=Rx.create({name:`escapeMark`,priority:10,excludes:``,inclusive:!1,parseHTML(){return[{tag:`span[data-escape-mark]`}]},renderHTML(){return[`span`,{"data-escape-mark":``},0]}}),w0=jS.create({name:`footnoteDefinition`,group:`block`,content:`block+`,defining:!0,priority:60,addAttributes(){return{identifier:{default:``},label:{default:null}}},parseHTML(){let e=e=>{if(typeof e==`string`)return!1;let t=e.getAttribute(`data-footnote-id`)||``;return{identifier:t,label:t||null}};return[{tag:`aside[data-footnote-def]`,getAttrs:e},{tag:`aside.footnote-def`,getAttrs:e}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.identifier??``);return[`aside`,{...t,"data-footnote-def":``,"data-footnote-id":n,id:`fn-${n}`,class:`footnote-def`},[`div`,{class:`footnote-body`},0],[`a`,{href:`#fnref-${n}`,class:`footnote-backref`,contentEditable:`false`,"aria-label":`Back to reference`},`↩`]]},addCommands(){return{insertFootnoteDefinition:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{identifier:e,label:e},content:[{type:`paragraph`}]})}}});function T0(e){let t=0;for(let n of e){let e=Number.parseInt(n,10);!Number.isNaN(e)&&e>t&&(t=e)}return String(t+1)}function E0(e){let t=[];return e.descendants(e=>(e.type.name===`footnoteDefinition`&&t.push(String(e.attrs.identifier??``)),!0)),t}function D0(e){let t=null;return e.forEach((e,n)=>{e.type.name===`footnoteDefinition`&&(t=n+e.nodeSize)}),t??e.content.size}var O0=jS.create({name:`footnoteReference`,group:`inline`,inline:!0,atom:!0,selectable:!0,draggable:!1,priority:60,addAttributes(){return{identifier:{default:``},label:{default:null}}},parseHTML(){return[{tag:`sup[data-footnote-ref]`,getAttrs:e=>{if(typeof e==`string`)return!1;let t=e.getAttribute(`data-footnote-id`)||``;return{identifier:t,label:t||null}}}]},renderHTML({node:e}){let t=String(e.attrs.identifier??``);return[`sup`,{id:`fnref-${t}`,"data-footnote-ref":``,"data-footnote-id":t,class:`footnote-ref`},[`a`,{href:`#fn-${t}`,class:`footnote-ref-link`},`[${t}]`]]},addCommands(){return{insertFootnoteReference:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{identifier:e,label:e}})}}}),k0=$S.extend({priority:60,addAttributes(){return{...this.parent?.(),hardBreakStyle:{default:`backslash`}}}}),A0=tC.extend({priority:60,addAttributes(){return{...this.parent?.(),headingStyle:{default:`atx`},sourceTrailingHashes:{default:null},sourceUnderlineLength:{default:null},sourceContiguousNext:{default:!1},sourceLeadingIndent:{default:null,rendered:!1},sourceInteriorSpacing:{default:null,rendered:!1}}}}),j0=jS.create({name:`htmlBlock`,group:`block`,atom:!0,priority:60,addAttributes(){return{content:{default:``}}},parseHTML(){return[{tag:`div[data-html-block]`}]},renderHTML({node:e}){return[`div`,{"data-html-block":``,class:`html-block`},e.attrs.content]}});function M0(e){if(typeof e!=`string`||!e.startsWith(`/`))return e;let t=globalThis.window?.okDesktop?.config?.apiOrigin;return typeof t==`string`&&t?t+e:e}var N0=rC.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceUrl:{default:null,rendered:!1}}},renderHTML({HTMLAttributes:e}){let t=Sb(this.options.HTMLAttributes,e);return typeof t.src==`string`&&(t.src=M0(t.src)),[`img`,t]}}),P0=jS.create({name:`jsxComponent`,group:`block`,atom:!1,content:`block*`,isolating:!0,selectable:!0,defining:!0,priority:60,addAttributes(){return{componentName:{default:``},kind:{default:`element`},attributes:{default:[]},sourceRaw:{default:``},sourceDirty:{default:!1},props:{default:{}}}},parseHTML(){return[{tag:`div[data-jsx-component]`,getAttrs:e=>typeof e==`string`?!1:{componentName:e.getAttribute(`data-component-name`)||``,sourceRaw:e.getAttribute(`data-source-raw`)||``}}]},renderHTML({HTMLAttributes:e}){return[`div`,{"data-jsx-component":``,"data-component-name":e.componentName,"data-source-raw":e.sourceRaw},0]},addCommands(){return{insertJsxComponent:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{sourceRaw:e}})}}}),F0=jS.create({name:`jsxInline`,group:`inline`,inline:!0,atom:!1,content:`text*`,isolating:!1,selectable:!0,priority:60,addAttributes(){return{}},parseHTML(){return[{tag:`span[data-jsx-inline]`}]},renderHTML(){return[`span`,{"data-jsx-inline":``},0]}}),I0=[`https`,`http`,`mailto`,`tel`,`ftp`,`sms`],L0=I0.map(e=>`${e}:`).join(`|`),R0=RegExp(`^(?:${L0}|\\/|#|\\?|\\.\\/|\\.\\.\\/)`,`i`);function z0(e){let t=e.trim();return t===``?!0:R0.test(t)}function B0(e){let t=e.trim();if(t===``)return!0;let n=t.indexOf(`:`);if(n===-1)return!0;let r=t.indexOf(`/`),i=t.indexOf(`?`),a=t.indexOf(`#`);return n>Math.min(r===-1?1/0:r,i===-1?1/0:i,a===-1?1/0:a)}var V0=new Set(I0.map(e=>`${e}:`)),H0=`https://placeholder.invalid`;function U0(e){try{let t=new URL(e,H0);return V0.has(t.protocol.toLowerCase())}catch{return!1}}var W0=yT.extend({priority:60,addOptions(){return{openOnClick:!1,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:`http`,HTMLAttributes:{target:`_blank`,rel:`noopener noreferrer`},isAllowedUri:U0,validate:U0,shouldAutoLink:()=>!0}},addAttributes(){return{...this.parent?.(),linkStyle:{default:`inline`,rendered:!1},refLabel:{default:null,rendered:!1},sourceForm:{default:null,rendered:!1},target:{default:null,rendered:!1},anchor:{default:null,rendered:!1},alias:{default:null,rendered:!1},sourceUrlForm:{default:null,rendered:!1},sourceTitleMarker:{default:null,rendered:!1}}}}),G0=jS.create({name:`linkRefDef`,group:`block`,atom:!0,priority:60,addAttributes(){return{label:{default:``},href:{default:``},title:{default:null},sourceLayout:{default:null},sourceTitleMarker:{default:null}}},parseHTML(){return[{tag:`div[data-link-ref-def]`}]},renderHTML({node:e}){let{label:t,href:n,title:r}=e.attrs;return[`div`,{"data-link-ref-def":``,class:`link-ref-def`},r?`[${t}]: ${n} "${r}"`:`[${t}]: ${n}`]}});function K0(e){return e.type.name===`list`&&!e.attrs.ordered}function q0(e){return e.type.name===`list`&&!!e.attrs.ordered}function J0(e){let t=!1;return e.forEach(e=>{e.type.name===`listItem`&&e.attrs.checked!==null&&(t=!0)}),t}function Y0(e,t,n,r,i,a,o){let s=fb(e=>e.type.name===`list`)(e.selection);if(s&&i(s.node)){let{$from:n,$to:i}=e.selection;return n.blockRange(i)?Mm(r)(e,t):!1}if(s){if(!t)return!0;let{tr:n}=e;return n.setNodeMarkup(s.pos,void 0,{...s.node.attrs,...a}),o!==void 0&&s.node.forEach((e,t)=>{if(e.type.name===`listItem`){let r=s.pos+1+t;n.setNodeMarkup(r,void 0,{...e.attrs,...o})}}),t(n),!0}return km(n,a)(e,void 0)?t?km(n,a)(e,n=>{if(o){let t=n.mapping.map(e.selection.$from.pos),r=n.doc.resolve(t);for(let e=r.depth;e>0;e--){let t=r.node(e);if(t.type.name===`listItem`){n.setNodeMarkup(r.before(e),void 0,{...t.attrs,...o});break}}}t(n)}):!0:!1}var X0=jS.create({name:`list`,group:`block list`,content:`listItem+`,priority:60,addAttributes(){return{ordered:{default:!1},start:{default:1},spread:{default:!1},bulletMarker:{default:null},listMarkerDelimiter:{default:null}}},parseHTML(){return[{tag:`ul`,getAttrs:()=>({ordered:!1})},{tag:`ol`,getAttrs:e=>({ordered:!0,start:e.getAttribute(`start`)?Number(e.getAttribute(`start`)):1})}]},renderHTML({node:e,HTMLAttributes:t}){let n=e.attrs.ordered?`ol`:`ul`,r={};return e.attrs.ordered&&e.attrs.start!==1&&(r.start=e.attrs.start),[n,Sb(t,r),0]},addCommands(){return{toggleBulletList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:Y0(e,t,n,r,e=>K0(e)&&!J0(e),{ordered:!1},{checked:null})},toggleOrderedList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:Y0(e,t,n,r,e=>q0(e),{ordered:!0},{checked:null})},toggleTaskList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:Y0(e,t,n,r,e=>K0(e)&&J0(e),{ordered:!1},{checked:!1})}}},addInputRules(){return[fS({find:/^\s*([-+*])(?!\s*\[[ xX]\])\s$/,type:this.type,getAttributes:e=>({ordered:!1,bulletMarker:e[1]})}),fS({find:/^\s*(\d+)([.)])\s$/,type:this.type,getAttributes:e=>({ordered:!0,start:Number(e[1]),listMarkerDelimiter:e[2]})}),new Ax({find:/^\s*[-*+]\s\[([ xX])\]\s$/,handler:({state:e,range:t,match:n})=>{let r=e.schema.nodes.list;if(!r)return null;let i=n[1]!==` `,a=e.tr.delete(t.from,t.to),o=a.doc.resolve(t.from).blockRange();if(!o)return null;let s=Rf(o,r,{ordered:!1});if(!s)return null;a.wrap(o,s);let c=a.doc.resolve(a.mapping.map(t.from));for(let e=c.depth;e>0;e--){let t=c.node(e);if(t.type.name===`listItem`){a.setNodeMarkup(c.before(e),void 0,{...t.attrs,checked:i});break}}}})]},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList(),"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList(),"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),Z0=jS.create({name:`listItem`,content:`paragraph block*`,defining:!0,addAttributes(){return{checked:{default:null},spread:{default:!1},sourceMarkerSpacing:{default:null,rendered:!1},sourceOrdinal:{default:null,rendered:!1},sourceCheckboxChar:{default:null,rendered:!1},sourceContinuationIndent:{default:null,rendered:!1}}},parseHTML(){return[{tag:`li`,getAttrs:e=>{let t=e.querySelector(`input[type="checkbox"]`);return{checked:t?t.checked:null}}}]},renderHTML({node:e,HTMLAttributes:t}){return e.attrs.checked===null?[`li`,Sb(t),0]:[`li`,Sb(t,{"data-type":`taskItem`,"data-checked":e.attrs.checked?`true`:`false`}),[`label`,{contenteditable:`false`},[`input`,{type:`checkbox`,...e.attrs.checked?{checked:`checked`}:{}}]],[`div`,0]]},addNodeView(){return({node:e,getPos:t,editor:n,HTMLAttributes:r})=>{let i=document.createElement(`li`);Object.entries(Sb(r,e.attrs.checked===null?{}:{"data-type":`taskItem`,"data-checked":String(!!e.attrs.checked)})).forEach(([e,t])=>{t!=null&&i.setAttribute(e,String(t))});let a=null,o=null,s=document.createElement(`div`);return e.attrs.checked!==null&&(a=document.createElement(`label`),a.contentEditable=`false`,o=document.createElement(`input`),o.type=`checkbox`,o.checked=!!e.attrs.checked,n.isEditable||(o.disabled=!0),o.addEventListener(`change`,()=>{let r=t();r===void 0||typeof r!=`number`||n.view.dispatch(n.view.state.tr.setNodeMarkup(r,void 0,{...e.attrs,checked:o?.checked??!1}))}),a.appendChild(o),i.appendChild(a)),i.appendChild(s),{dom:i,contentDOM:s,update(t){return t.type!==e.type||t.attrs.checked!==null!=(e.attrs.checked!==null)?!1:(o&&t.attrs.checked!==null&&(o.checked=!!t.attrs.checked,i.setAttribute(`data-checked`,String(!!t.attrs.checked))),e=t,!0)}}}},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>{let{$from:e}=this.editor.state.selection;for(let t=e.depth;t>0;t--)if(e.node(t).type.name===`listItem`)return this.editor.commands.sinkListItem(this.name);return!1},"Shift-Tab":()=>{let{$from:e}=this.editor.state.selection;for(let t=e.depth;t>0;t--)if(e.node(t).type.name===`listItem`)return this.editor.commands.liftListItem(this.name);return!1}}}}),Q0=X0,$0=Z0,e2=jS.create({name:`mathInline`,group:`inline`,inline:!0,atom:!0,selectable:!0,priority:60,addAttributes(){return{formula:{default:``},id:{default:null},language:{default:`latex`},sourceDelimiter:{default:null,rendered:!1}}},parseHTML(){return[{tag:`span[data-math-inline]`,getAttrs:e=>typeof e==`string`?!1:{formula:e.getAttribute(`data-formula`)||``,id:e.getAttribute(`id`)||null,language:e.getAttribute(`data-language`)||`latex`}}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-math-inline":``,"data-formula":e.formula,"data-language":e.language,...e.id?{id:e.id}:{}}]},addCommands(){return{insertMathInline:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{formula:e}})}}}),t2=jS.create({name:`rawMdxFallback`,group:`block`,atom:!1,content:`text*`,isolating:!0,selectable:!0,defining:!0,priority:60,addAttributes(){return{reason:{default:``},originalSpan:{default:{start:0,end:0}}}},parseHTML(){let e=e=>typeof e==`string`?!1:{reason:e.getAttribute(`data-reason`)||``};return[{tag:`div[data-raw-mdx-fallback]`,getAttrs:e},{tag:`pre[data-raw-mdx-fallback]`,getAttrs:e}]},renderHTML({HTMLAttributes:e}){return[`div`,{"data-raw-mdx-fallback":``,"data-raw-badge":`raw`,"data-reason":e.reason,contenteditable:`false`,class:`raw-mdx-fallback`},0]},addNodeView(){return({HTMLAttributes:e})=>{let t=document.createElement(`div`);t.setAttribute(`data-raw-mdx-fallback`,``),t.setAttribute(`data-raw-badge`,`raw`),t.setAttribute(`contenteditable`,`false`),t.classList.add(`raw-mdx-fallback`),e.reason&&t.setAttribute(`data-reason`,e.reason);let n=document.createElement(`pre`);return n.classList.add(`raw-mdx-fallback-content`),n.setAttribute(`contenteditable`,`false`),t.appendChild(n),{dom:t,contentDOM:n,ignoreMutation:()=>!0}}}}),n2=MD.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceMarkerSpacings:{default:null}}}}),r2=ID.extend({excludes:``,addAttributes(){return{...this.parent?.(),sourceFenceChar:{default:"`"},sourceFenceLength:{default:1},sourcePadded:{default:!1,rendered:!1}}}}),i2=jS.create({name:`commentBlock`,group:`block`,content:`block+`,defining:!0,priority:60,addAttributes(){return{sourceForm:{default:`percent`,parseHTML:e=>e.getAttribute(`data-source-form`)===`html`?`html`:`percent`,renderHTML:e=>e.sourceForm===`html`?{"data-source-form":`html`}:{}},sourceLayout:{default:`block`,parseHTML:e=>e.getAttribute(`data-source-layout`)===`inline`?`inline`:`block`,renderHTML:e=>e.sourceLayout===`inline`?{"data-source-layout":`inline`}:{}}}},parseHTML(){return[{tag:`aside[data-comment-block]`},{tag:`aside.comment-block`}]},renderHTML({HTMLAttributes:e}){return[`aside`,{"data-comment-block":``,"data-clipboard-omit":`true`,class:`comment-block`,style:`display: none;`,...e},0]},addCommands(){return{setCommentBlock:()=>({commands:e})=>e.wrapIn(this.name),toggleCommentBlock:()=>({commands:e})=>e.toggleWrap(this.name),unsetCommentBlock:()=>({commands:e})=>e.lift(this.name)}}}),a2=Rx.create({name:`comment`,priority:10,excludes:``,inclusive:!1,addAttributes(){return{sourceForm:{default:`percent`,parseHTML:e=>e.getAttribute(`data-source-form`)===`html`?`html`:`percent`,renderHTML:e=>e.sourceForm===`html`?{"data-source-form":`html`}:{}}}},parseHTML(){return[{tag:`span[data-comment-mark]`}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-comment-mark":``,"data-clipboard-omit":`true`,class:`comment-mark`,style:`display: none;`,...e},0]},addCommands(){return{setComment:()=>({commands:e})=>e.setMark(this.name),toggleComment:()=>({commands:e})=>e.toggleMark(this.name),unsetComment:()=>({commands:e})=>e.unsetMark(this.name)}}}),o2=qx.create({name:`docFidelity`,addGlobalAttributes(){return[{types:[`doc`],attributes:{sourceDocBoundary:{default:null,rendered:!1}}}]}}),s2=jS.create({name:`imageReference`,group:`inline`,inline:!0,atom:!0,priority:60,addAttributes(){return{alt:{default:``},label:{default:``},identifier:{default:``},referenceType:{default:`shortcut`}}},parseHTML(){return[{tag:`img[data-image-reference]`}]},renderHTML({node:e}){let{alt:t,label:n,referenceType:r}=e.attrs;return[`img`,{"data-image-reference":``,"data-reference-type":r,"data-label":n,alt:t||n}]}}),c2=new Map([[32,` `],[9,` `]]);function l2(e){let t=/^&#(x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);$/.exec(e);if(!t)return null;let n=t[1],r=n[0]===`x`||n[0]===`X`,i=Number.parseInt(r?n.slice(1):n,r?16:10);return Number.isNaN(i)?null:i}function u2(e){let t=l2(e);return t!==null&&c2.has(t)}function d2(e){let t=l2(e);return t===null?null:c2.get(t)??null}var f2=/&#(?:x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);/g;function p2(e){f2.lastIndex=0;let t=e.match(f2);if(t===null||t.join(``)!==e)return null;let n=``;for(let e of t){let t=d2(e);if(t===null)return null;n+=t}return n}var m2=Rx.create({name:`sourceLiteral`,priority:10,excludes:``,inclusive:!1,addAttributes(){return{sourceRaw:{default:``}}},parseHTML(){return[{tag:`span[data-source-literal]`}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-source-literal":``,...e},0]}});function h2(e,t){if(typeof e!=`string`||typeof t!=`string`||/[\x00-\x1F\x7F]/.test(e))return!1;let n=e.replaceAll(`\xA0`,` `),r=t.replaceAll(`\xA0`,` `);return n===r||g2(n)===r?!0:p2(n)===r}function g2(e){return e.replace(/\\([!-/:-@[-`{-~])/g,`$1`)}var _2=SO.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`~~`,rendered:!1}}}}),v2=kD.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceDashCounts:{default:null},sourceOuterPipes:{default:null,rendered:!1},sourceAlignmentPadding:{default:null,rendered:!1}}}}),y2=mD.extend({priority:60,addAttributes(){return{...this.parent?.(),sourcePadding:{default:null}}}}),b2=hD.extend({priority:60,addAttributes(){return{...this.parent?.(),sourcePadding:{default:null}}}}),x2=jS.create({name:`tag`,group:`inline`,inline:!0,atom:!0,selectable:!0,priority:60,addAttributes(){return{value:{default:``}}},parseHTML(){return[{tag:`a[data-tag]`,getAttrs:e=>typeof e==`string`?!1:{value:e.getAttribute(`data-tag`)||``}}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.value??``);return[`a`,{...t,"data-tag":n,href:`#tag/${n}`,class:`tag`},`#${n}`]},addCommands(){return{insertTag:e=>({chain:t})=>t().insertContent({type:`tag`,attrs:{value:e}}).run()}}}),S2=/^(?:---|—-|___\s|\*\*\*\s)$/;function C2(e){let t=String(e[0]??``).replace(/\s+$/,``);return t===`—-`?`---`:t}var w2=zD.extend({name:`thematicBreak`,priority:60,addAttributes(){return{...this.parent?.(),sourceRaw:{default:`---`}}},addInputRules(){return[uS({find:S2,type:this.type,getAttributes:e=>({sourceRaw:C2(e)})})]}}),T2=/^\[\[([^[\]|#]+?)(?:#([^\]|]+?))?(?:\|([^\]]+?))?\]\]/;function E2(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function D2(e){let t=e.match(T2);if(!t)return null;let n=t[1]?.trim()??``;return n?{type:`wikilink`,raw:t[0],target:n,anchor:E2(t[2]),alias:E2(t[3])}:null}function O2(e){return e.alias?e.alias:e.anchor?`${e.target}#${e.anchor}`:e.target}var k2=jS.create({name:`wikiLink`,group:`inline`,inline:!0,atom:!0,priority:60,addAttributes(){return{target:{default:``},alias:{default:null},anchor:{default:null},resolved:{default:!1},sourceTarget:{default:null,rendered:!1},sourceAnchor:{default:null,rendered:!1},sourceAlias:{default:null,rendered:!1}}},parseHTML(){return[{tag:`span[data-wiki-link]`,getAttrs:e=>typeof e==`string`?!1:{target:e.getAttribute(`data-target`)||``,alias:E2(e.getAttribute(`data-alias`)),anchor:E2(e.getAttribute(`data-anchor`)),resolved:e.getAttribute(`data-resolved`)===`true`}},{tag:`a.wiki-link[data-target]`,priority:100,getAttrs:e=>{if(typeof e==`string`)return!1;let t=e.getAttribute(`data-target`)??``;return t?{target:t,alias:E2(e.getAttribute(`data-alias`)),anchor:E2(e.getAttribute(`data-anchor`)),resolved:!1}:!1}}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.target??``),r=E2(e.attrs.alias),i=E2(e.attrs.anchor),a=e.attrs.resolved===!0;return[`span`,{...t,"data-wiki-link":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,"data-resolved":a?`true`:`false`},O2({target:n,alias:r,anchor:i})]}});function A2(e){let t=e.split(`/`).pop()??e,n=t.lastIndexOf(`.`);return n<=0||n===t.length-1?``:t.slice(n+1).toLowerCase()}function j2(e){return e.alias?e.alias:e.anchor?`${e.target}#${e.anchor}`:e.target}var M2=jS.create({name:`wikiLinkEmbed`,group:`inline`,inline:!0,atom:!0,priority:60,addAttributes(){return{target:{default:``},alias:{default:null},anchor:{default:null},resolvedSrc:{default:null,rendered:!1,parseHTML:()=>null}}},parseHTML(){let e=e=>typeof e==`string`||!e.hasAttribute(`data-wiki-embed`)?!1:{target:e.getAttribute(`data-target`)||``,alias:E2(e.getAttribute(`data-alias`)),anchor:E2(e.getAttribute(`data-anchor`))};return[{tag:`img[data-wiki-embed]`,getAttrs:e,priority:100},{tag:`a[data-wiki-embed]`,getAttrs:e,priority:100}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.target??``),r=E2(e.attrs.alias),i=E2(e.attrs.anchor),a=E2(e.attrs.resolvedSrc),o=A2(n);if(Z1.has(o))return[`img`,{...t,"data-wiki-embed":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,src:a??n,alt:r??n}];let s=a??n;return[`a`,{...t,"data-wiki-embed":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,href:i?`${s}#${i}`:s,target:`_blank`,rel:`noopener noreferrer`},j2({target:n,alias:r,anchor:i})]}}),N2=[P0,t2,F0,e2,k2,M2,x2,Q0,$0,x0,S0,_2,r2,b0,n2,A0,w2,W0,j0,G0,k0,C0,o2,m2,pte.configure({undoRedo:!1,bulletList:!1,orderedList:!1,listItem:!1,italic:!1,bold:!1,strike:!1,code:!1,codeBlock:!1,heading:!1,horizontalRule:!1,hardBreak:!1,link:!1,blockquote:!1,dropcursor:{color:`color-mix(in oklch, var(--primary) 50%, transparent)`,width:2}}),v2.configure({resizable:!0}),gD,b2,y2,N0.configure({inline:!0}),s2,ST,a2,i2,O0,w0],P2=/^[a-zA-Z0-9][\w/-]*$/;function F2(e){if(typeof e!=`string`)return!1;let t=e.startsWith(`#`)?e.slice(1):e;return P2.test(t)}var I2=`Tags must start with a letter or digit and contain only letters, digits, underscores, dashes, and slashes.`;function L2(e,t){let n=encodeURIComponent(t.projectDir);if(t.prompt===``)return`claude://${e.mode}/new?folder=${n}`;let r=encodeURIComponent(t.prompt);return`claude://${e.mode}/new?q=${r}&folder=${n}`}function R2(e){let t=encodeURIComponent(e.projectDir);return e.prompt===``?`codex://new?path=${t}`:`codex://new?prompt=${encodeURIComponent(e.prompt)}&path=${t}`}function z2(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return t<0?e:e.substring(t+1)}function B2(e){let t=encodeURIComponent(z2(e.projectDir));return e.prompt===``?`cursor://anysphere.cursor-deeplink/prompt?workspace=${t}&mode=agent`:`cursor://anysphere.cursor-deeplink/prompt?text=${encodeURIComponent(encodeURIComponent(e.prompt))}&workspace=${t}&mode=agent`}var V2=RegExp("[\\u0000-\\u001f\\u007f-\\u009f\\u200b-\\u200f\\u2028-\\u202e\\u2060-\\u2069\\ufeff`]+",`g`),H2=RegExp("[ \\u00a0\\u0000-\\u001f\\u007f-\\u009f\\u200b-\\u200f\\u2028-\\u202e\\u2060-\\u2069\\ufeff`]+",`g`);function U2(e){return e.replace(V2,`_`)}function W2(e){return e.replace(H2,`_`)}function G2(e,t){let n=`Let's work on \`${U2(e)}\` using Open Knowledge.`;return t?`${n} Open the OK editor in web view.`:n}function K2(e,t){let n=`Let's work on the \`${U2(e)}\` folder using Open Knowledge.`;return t?`${n} Open the OK editor in web view.`:n}function q2(e){let t=`Let's work on this project using Open Knowledge.`;return e?`${t} Open the OK editor in web view.`:t}function J2(e,t,n){let r=e.trim(),i=t?` Open the OK editor in web view.`:``,a=e=>e.split(`
|
|
447
447
|
`).map(e=>`> ${e}`).join(`
|
|
448
448
|
`);if(n===`existing-repo`)return`${r===``?`Let's work on this project using Open Knowledge.`:[`Here's what I'd like to do in this Open Knowledge project:`,``,a(r)].join(`
|
|
449
449
|
`)}${i}`;let o=`Scaffold the folders, templates, and AI-readable rules to match, using Open Knowledge.`;return`${r===``?`Let's set up a new Open Knowledge project. ${o}`:[`I'm setting up a new Open Knowledge project. Here's what I want to create:`,``,a(r),``,o].join(`
|
|
@@ -455,7 +455,7 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
|
|
|
455
455
|
`)}function s4(e,t,n,r){let i=t=>n4(o4(e,t,n),r)<=Y2;if(i(t))return t;let a=0,o=t.length;for(;a<o;){let e=Math.ceil((a+o)/2);i(t.slice(0,e).trimEnd()+Q2)?a=e:o=e-1}let s=t.slice(0,a).trimEnd();return s===``?``:s+Q2}function c4(e){let t=W2(e.relativePath),n=a4(t,e.instruction,e.selectionMarkdown);return n4(n,e.target)<=Y2?n:o4(t,s4(t,e.instruction,e.selectionMarkdown,e.target),e.selectionMarkdown)}function l4(e){return`'${e.replace(/'/g,`'\\''`)}'`}function u4(e){return`claude ${l4(e)}\r`}function d4(e){if(e.length===0)return{ok:!1,reason:`docName must not be empty`};if(e.trim().length===0)return{ok:!1,reason:`docName must not be blank (whitespace only)`};if(e!==e.trim())return{ok:!1,reason:`docName must not have leading or trailing whitespace`};for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<32||n===127)return{ok:!1,reason:`docName must not contain control characters`}}if(e.includes(`..`)||e.startsWith(`/`)||e.includes(`\\`))return{ok:!1,reason:`docName must not contain "..", a leading "/", or a backslash`};for(let t of e.split(`/`)){if(t.length===0)return{ok:!1,reason:`docName must not contain empty path segments (no leading, trailing, or doubled "/")`};if(t.startsWith(`.`))return{ok:!1,reason:`docName path segments must not start with "." (hidden files are not addressable)`}}return{ok:!0}}function f4(e){return e.split(`/`).some(e=>e.startsWith(`.`))}function p4(e,t){let n=d4(e);n.ok||t.addIssue({code:`custom`,message:n.reason})}var m4=E().superRefine(p4).optional(),h4={agentId:E().optional(),agentName:E().optional(),colorSeed:E().optional(),clientName:E().optional(),clientVersion:E().optional(),label:E().optional()},g4=E().optional(),_4=/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;Ka(`kind`,[A({kind:M(`doc`),docPath:E().min(1)}).loose(),A({kind:M(`folder`),folderPath:E()}).loose()]);var v4=j([`no-remote`,`detached-head`,`branch-not-on-origin`,`non-github-remote`,`invalid-path`]),y4=Ka(`ok`,[A({ok:M(!0),shareUrl:E().min(1),sharedUrl:E().min(1),branch:E().min(1)}).loose(),A({ok:M(!1),error:v4,branch:E().min(1).optional()}).loose()]),b4=j([`user`,`org`]),x4=A({login:E().min(1),kind:b4,avatarUrl:E().optional()}).loose(),S4=j([`auth-required`,`network`]),C4=Ka(`ok`,[A({ok:M(!0),owners:k(x4)}).loose(),A({ok:M(!1),error:S4}).loose()]),w4=Ka(`ok`,[A({ok:M(!0),available:O()}).loose(),A({ok:M(!1),error:S4}).loose()]),T4=j([`public`,`private`]);A({owner:E().min(1),name:E().min(1),visibility:T4,description:E().optional()}).loose();var E4=j([`name-conflict`,`saml-sso`,`auth-required`,`push-failed`,`init-failed`,`network`,`no-project`]),D4=Ka(`ok`,[A({ok:M(!0),ownerLogin:E().min(1),repoName:E().min(1),cloneUrl:E().min(1),defaultBranch:E().min(1)}).loose(),A({ok:M(!1),error:E4}).loose()]);function O4(e){return!(typeof e!=`string`||e.length===0||e.startsWith(`-`)||/[\x00-\x1F\x7F]/.test(e)||/\s/.test(e)||e.includes(`:`)||e.split(`/`).includes(`..`))}var k4=e=>e.refine(O4,`invalid branch name`),A4={shareTargetExists:O(),dirtyConflicts:A({conflicts:O(),files:k(E().min(1))}).loose(),branchIsLocal:O()};Ka(`detached`,[A({detached:M(!1),currentBranch:E().min(1).nullable(),currentHeadSha:Fa(),...A4}).loose(),A({detached:M(!0),currentBranch:Fa(),currentHeadSha:E().min(1),...A4}).loose()]),A({branch:k4(E().min(1)),principalId:E().optional()}).loose();var j4=j([`dirty-conflict`,`branch-not-found`,`fetch-failed`,`checkout-failed`,`branch-in-other-worktree`]);Ka(`ok`,[A({ok:M(!0)}).loose(),A({ok:M(!1),reason:j4,files:k(E().min(1)).optional(),otherWorktreePath:E().min(1).optional()}).loose()]);var M4=A({serverInstanceId:E().min(1),currentBranch:E().min(1).optional(),currentDiskAckSVs:Xa(E().min(1),E().min(1)).optional()}).loose(),N4=A({id:E().min(1),display_name:E().min(1),display_email:E(),source:j([`git-config`,`synthesized`]),created_at:E().min(1)}).loose();A({collabUrl:E().nullable(),previewUrl:E().nullable(),port:D(),paneTarget:E().nullable(),singleFile:O().default(!1)}).loose();var P4=A({type:j(`urn:ok:error:malformed-upload.urn:ok:error:collision-exhaustion.urn:ok:error:storage-full.urn:ok:error:storage-readonly.urn:ok:error:storage-error.urn:ok:error:no-file-received.urn:ok:error:path-escape.urn:ok:error:method-not-allowed.urn:ok:error:invalid-request.urn:ok:error:payload-too-large.urn:ok:error:request-timeout.urn:ok:error:internal-server-error.urn:ok:error:loopback-required.urn:ok:error:invalid-origin.urn:ok:error:url-not-allowed.urn:ok:error:dir-outside-home.urn:ok:error:concurrent-operation.urn:ok:error:clone-failed.urn:ok:error:clone-timeout.urn:ok:error:server-start-failed.urn:ok:error:reserved-doc-name.urn:ok:error:target-not-found.urn:ok:error:stale-target.urn:ok:error:frontmatter-edit-not-supported.urn:ok:error:invalid-frontmatter-patch.urn:ok:error:frontmatter-malformed.urn:ok:error:no-active-session.urn:ok:error:too-many-agent-sessions.urn:ok:error:disk-divergence.urn:ok:error:doc-not-found.urn:ok:error:doc-already-exists.urn:ok:error:doc-not-open.urn:ok:error:rollback-not-configured.urn:ok:error:doc-not-available.urn:ok:error:backlink-index-not-configured.urn:ok:error:file-rescan-not-configured.urn:ok:error:shadow-not-configured.urn:ok:error:host-not-allowed.urn:ok:error:principal-not-available.urn:ok:error:not-found.urn:ok:error:auth-failed.urn:ok:error:no-project-dir.urn:ok:error:server-open-failed.urn:ok:error:doc-in-conflict.urn:ok:error:no-conflict-tracked.urn:ok:error:sync-not-active.urn:ok:error:project-repo-not-configured.urn:ok:error:seed-prerequisite-missing.urn:ok:error:seed-invalid-root.urn:ok:error:tag-index-not-configured.urn:ok:error:template-not-found.urn:ok:error:unsupported-asset-type.urn:ok:error:asset-not-found.urn:ok:error:single-file-mode.urn:ok:error:collab-server-not-running.urn:ok:error:gateway-timeout.urn:ok:error:cursor-not-installed.urn:ok:error:cursor-spawn-timeout.urn:ok:error:cursor-spawn-failed.urn:ok:error:handoff-target-not-installed.urn:ok:error:handoff-spawn-timeout.urn:ok:error:handoff-spawn-failed`.split(`.`)),title:E().min(1),status:D().int().min(400).max(599),instance:E().regex(_4,`instance must be urn:uuid:<uuid>`).optional(),detail:E().optional()}).loose();A({parentDocName:E().min(1),agentId:E().min(1).optional(),agentName:E().min(1).optional()}).loose();var F4=A({src:E().min(1),path:E().min(1).optional(),deduped:O().optional()}).loose();A({url:E().min(1),dir:E().min(1),branch:E().min(1).refine(O4,`invalid branch name`).optional()}).loose(),A({type:M(`error`),problem:P4}).loose();var I4=8192,L4=32768,R4=`…[truncated]`;function z4(e){let t=e.trim();if(t.length===0||t[0]!==`{`)return null;let n;try{n=JSON.parse(t)}catch{return null}if(typeof n!=`object`||!n||Array.isArray(n))return null;let r=n;return{event:typeof r.event==`string`?r.event:void 0,fields:r}}function B4(e){return e.length<=8192?e:`${e.slice(0,I4-12)}${R4}`}var V4=/notionvc:/i,H4=()=>e=>{U4(e)&&(W4(e),G4(e))};function U4(e){if(!(`children`in e)||!Array.isArray(e.children))return!1;for(let t of e.children){if(t.type===`comment`){let e=String(t.value??``);if(V4.test(e))return!0}if(t.type===`element`&&U4(t))return!0}return!1}function W4(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&W4(t);let t=[];for(let n of e.children){if(n.type!==`text`){t.push(n);continue}let e=String(n.value??``);if(!e.includes(`
|
|
456
456
|
`)){t.push(n);continue}let r=e.split(`
|
|
457
457
|
`);for(let e=0;e<r.length;e++)r[e]&&t.push({type:`text`,value:r[e]??``}),e<r.length-1&&t.push({type:`element`,tagName:`br`,properties:{},children:[]})}e.children=t}function G4(e){if(!(!(`children`in e)||!Array.isArray(e.children))){e.children=e.children.filter(e=>e.type===`comment`?!V4.test(String(e.value??``)):!0);for(let t of e.children)t.type===`element`&&G4(t)}}var K4=new Set([`Apple-tab-span`,`Apple-converted-space`,`Apple-style-span`]),q4=()=>e=>{J4(e)};function J4(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&J4(t);e.children=e.children.flatMap(e=>{if(e.type!==`element`)return[e];let t=e;return Y4(t)?[]:X4(t)?t.children:[t]})}}function Y4(e){if(e.tagName!==`meta`)return!1;let t=e.properties?.name,n=e.properties?.content;return t===`Generator`&&typeof n==`string`&&/Cocoa/i.test(n)}function X4(e){if(e.tagName!==`span`)return!1;let t=e.properties?.className;return Array.isArray(t)?t.length>0&&t.every(e=>K4.has(String(e))):!1}var Z4=`docs-internal-guid-`;function Q4(e,t){let n=e.children[t];!n||n.type!==`element`||e.children.splice(t,1,...n.children)}var $4=()=>e=>{e3(e)};function e3(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&e3(t);let t=0;for(;t<e.children.length;){let n=e.children[t];if(!n||n.type!==`element`){t++;continue}let r=n;if(t3(r)||n3(r)){Q4(e,t);continue}t++}}function t3(e){if(e.tagName!==`b`)return!1;let t=e.properties?.id;return typeof t==`string`&&t.startsWith(Z4)}function n3(e){if(e.tagName!==`div`||e.properties?.dir!==`ltr`)return!1;let t=e.children.filter(e=>e.type===`element`);return t.length===1?t[0]?.tagName===`table`:!1}var r3=new Set([`commit-link`,`user-mention`,`team-mention`,`issue-link`]),i3=()=>e=>{a3(e)};function a3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&a3(t);for(let t of e.children)t.type===`element`&&o3(t)}}function o3(e){if(!e.properties)return;for(let t of Object.keys(e.properties))t.startsWith(`dataHovercard`)&&delete e.properties[t];let t=e.properties.className;if(Array.isArray(t)){let n=t.filter(e=>!r3.has(String(e)));n.length===0?delete e.properties.className:e.properties.className=n}}var s3=/^gmail_/,c3=()=>e=>{l3(e)};function l3(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&l3(t);let t=0;for(;t<e.children.length;){let n=e.children[t];if(n.type!==`element`){t++;continue}let r=n;if(r.tagName===`div`&&u3(r,`gmail_quote`)&&(r.tagName=`blockquote`),d3(r),f3(r)){e.children.splice(t,1,...r.children);continue}t++}}function u3(e,t){let n=e.properties?.className;return Array.isArray(n)?n.some(e=>String(e)===t):!1}function d3(e){let t=e.properties?.className;if(!Array.isArray(t))return;let n=t.filter(e=>!s3.test(String(e)));n.length===0?delete e.properties?.className:e.properties&&(e.properties.className=n)}function f3(e){if(e.tagName!==`div`||e.properties?.dir!==`ltr`)return!1;let t=e.properties?.className;return t!=null&&!(Array.isArray(t)&&t.length===0)?!1:e.children.filter(e=>e.type===`element`).length<=1}var p3=()=>e=>{m3(e)};function m3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&m3(t);e.children=e.children.flatMap(e=>{if(e.type!==`element`)return[e];let t=e;return t.tagName===`google-sheets-html-origin`?t.children:t.tagName===`style`?[]:(h3(t),[t])})}}function h3(e){if(e.properties)for(let t of Object.keys(e.properties))t.startsWith(`dataSheets`)&&delete e.properties[t]}var g3=[`o:`,`w:`,`m:`,`v:`,`u1:`],_3=/^Mso[A-Z]/,v3=/^\s*\[if\s+[^\]]*\]/,y3=()=>e=>{b3(e)};function b3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&b3(t);e.children=e.children.flatMap(e=>{if(e.type===`comment`){let t=String(e.value??``);return v3.test(t)?[]:[e]}if(e.type!==`element`)return[e];let t=e;return x3(t)?[]:(S3(t),[t])})}}function x3(e){return g3.some(t=>e.tagName.startsWith(t))}function S3(e){let t=e.properties;if(!t)return;let n=t.className;if(Array.isArray(n)){let e=n.filter(e=>typeof e==`string`&&!_3.test(e));e.length===0?delete t.className:t.className=e}else typeof n==`string`&&_3.test(n)&&delete t.className;let r=t.style;typeof r==`string`&&/mso-/i.test(r)&&delete t.style;for(let e of Object.keys(t))if(e.startsWith(`xmlns:`)){let n=e.slice(6);g3.some(e=>e===`${n}:`)&&delete t[e]}}var C3=/^c-(message_kit__|message__|compose|timestamp)/,w3=()=>e=>{T3(e)};function T3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&T3(t);e.children=e.children.flatMap(e=>{if(e.type!==`element`)return[e];let t=e;return E3(t)?[]:(D3(t),[t])})}}function E3(e){let t=e.properties?.className;return Array.isArray(t)?t.some(e=>String(e)===`c-timestamp`||String(e).startsWith(`c-timestamp`)):!1}function D3(e){let t=e.properties?.className;if(!Array.isArray(t))return;let n=t.filter(e=>!C3.test(String(e)));n.length===0?delete e.properties?.className:e.properties&&(e.properties.className=n)}var O3=()=>e=>{k3(e)};function k3(e){if(!(!(`children`in e)||!Array.isArray(e.children))){for(let t of e.children)t.type===`element`&&k3(t);for(let t=0;t<e.children.length;t++){let n=e.children[t];if(n.type!==`element`)continue;let r=n;A3(r)&&(e.children[t]=M3(r))}}}function A3(e){if(e.tagName!==`div`)return!1;let t=e.children.filter(e=>e.type===`element`&&e.tagName===`div`);return t.length<2?!1:t.some(e=>j3(e))}function j3(e){for(let t of e.children){if(t.type!==`element`)continue;let e=t,n=e.properties?.style;if(typeof n==`string`&&/color\s*:/i.test(n)||j3(e))return!0}return!1}function M3(e){return{type:`element`,tagName:`pre`,properties:{},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:e.children.filter(e=>e.type===`element`&&e.tagName===`div`).map(e=>N3(e)).join(`
|
|
458
|
-
`)}]}]}}function N3(e){let t=``;for(let n of e.children)n.type===`text`?t+=n.value??``:n.type===`element`&&(t+=N3(n));return t}var P3=class extends Error{htmlBytes;maxBytes;constructor(e,t){super(`HTML payload (${e} bytes) exceeds htmlToMdast ceiling (${t} bytes); falling through to plain text`),this.name=`HtmlPayloadTooLargeError`,this.htmlBytes=e,this.maxBytes=t}},F3=[$4,y3,q4,c3,H4,O3,p3,w3,i3];function I3(e){JF(e,e=>{e.type===`strong`?(e.data??={},e.data.sourceDelimiter=`**`):e.type===`emphasis`?(e.data??={},e.data.sourceDelimiter=`*`):e.type===`inlineCode`?(e.data??={},e.data.sourceFenceChar="`",e.data.sourceFenceLength=1):e.type===`code`&&(e.data??={},e.data.sourceFenceChar="`",e.data.sourceFenceLength=3)})}function L3(e,t){let n=t?.maxBytes??5242880;if(e.length>n)throw new P3(e.length,n);let r=RU().use(KP,{fragment:!0});for(let e of F3)r.use(e);for(let e of t?.additionalCleanupPlugins??[])r.use(e);r.use(qL);let i=r.parse(e),a=r.runSync(i);return I3(a),a}function R3(e){return String(RU().use(kU).use(AU).stringify(e))}function z3(e,t){let n=Array.isArray(e.attrs.attributes)?e.attrs.attributes.filter(e=>typeof e==`object`&&!!e&&`type`in e):[],r=e.attrs.props??{},i=new Map,a=new Set;if(t)for(let e of t)e.omitOnDefault===!0&&`defaultValue`in e&&e.defaultValue!==void 0&&i.set(e.name,e.defaultValue),e.type===`string`&&e.required===!1&&e.defaultValue===void 0&&a.add(e.name);for(let[e,t]of Object.entries(r)){let r=n.findIndex(t=>t.type===`mdxJsxAttribute`&&t.name===e);if(i.has(e)&&Object.is(i.get(e),t)){r>=0&&n.splice(r,1);continue}if(a.has(e)&&t===``){r>=0&&n.splice(r,1);continue}if(r>=0){let e=n[r];if(e.type===`mdxJsxAttribute`&&e.value!=null&&typeof e.value==`object`&&e.value.type===`mdxJsxAttributeValueExpression`&&B3(e.value.value,t))continue}let o=V3(e,t);r>=0?n[r]=o:n.push(o)}return n}function B3(e,t){try{return JSON.stringify(JSON.parse(e))===JSON.stringify(t)}catch{return!1}}function V3(e,t){if(t===!0)return{type:`mdxJsxAttribute`,name:e,value:null};if(t===!1)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:`false`}};if(t==null)return{type:`mdxJsxAttribute`,name:e,value:null};if(typeof t==`string`)return{type:`mdxJsxAttribute`,name:e,value:t};if(typeof t==`number`)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:JSON.stringify(t)}};if(typeof t==`object`){let n;try{n=JSON.stringify(t)}catch{n=String(t)}return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:n}}}return{type:`mdxJsxAttribute`,name:e,value:String(t)}}function H3(e,t,n,r){return{type:`mdxJsxFlowElement`,name:e,attributes:z3(t,r),children:n.all(t),data:{}}}var U3=/^[A-Za-z0-9]{20,}$/,W3=/^(?:\d+s?|(?:\d+h)?(?:\d+m)?(?:\d+s)?)$/;function G3(e){let t=e.toLowerCase();return t===`loom.com`||t===`www.loom.com`}function K3(e){let t=e.pathname.match(/^\/(?:share|embed)\/([A-Za-z0-9]+)\/?$/);if(!t)return null;let n=t[1]??``;return U3.test(n)?n:null}function q3(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!G3(t.hostname))return null;let n=K3(t);if(!n)return null;let r=t.searchParams.get(`t`);return{id:n,startRaw:r&&r.length>0&&W3.test(r)?r:null}}function J3(e){return q3(e)!==null}function Y3(e){let t=e.toLowerCase();return t===`vimeo.com`||t===`www.vimeo.com`||t===`player.vimeo.com`}function X3(e){if(typeof e!=`string`||e.length===0)return!1;let t;try{t=new URL(e)}catch{return!1}return t.protocol!==`http:`&&t.protocol!==`https:`?!1:Y3(t.hostname)}var Z3=/^[A-Za-z0-9_-]{11}$/;function Q3(e){let t=e.toLowerCase();return t===`youtube.com`||t===`www.youtube.com`||t===`m.youtube.com`||t===`music.youtube.com`||t===`youtu.be`||t===`youtube-nocookie.com`||t===`www.youtube-nocookie.com`}function $3(e){if(e.length===0)return null;if(/^[0-9]+$/.test(e)){let t=Number.parseInt(e,10);return t>0?t:null}let t=e.match(/^(?:([0-9]+)h)?(?:([0-9]+)m)?(?:([0-9]+)s?)?$/);if(!t)return null;let n=t[1]?Number.parseInt(t[1],10):0,r=t[2]?Number.parseInt(t[2],10):0,i=t[3]?Number.parseInt(t[3],10):0,a=n*3600+r*60+i;return a>0?a:null}function e6(e){if(e.hostname.toLowerCase()===`youtu.be`){let t=e.pathname.replace(/^\//,``).split(`/`)[0]??``;return Z3.test(t)?t:null}if(e.pathname===`/watch`){let t=e.searchParams.get(`v`)??``;return Z3.test(t)?t:null}let t=e.pathname.match(/^\/(?:embed|shorts|v)\/([A-Za-z0-9_-]{11})\/?$/);return t?t[1]??null:null}function t6(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!Q3(t.hostname))return null;let n=e6(t);if(!n)return null;let r=t.searchParams.get(`t`)??t.searchParams.get(`start`)??``;return{id:n,startSeconds:r.length>0?$3(r):null,noCookie:t.hostname.toLowerCase().endsWith(`youtube-nocookie.com`)}}var n6=[{name:`type`,type:`enum`,enumValues:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`],defaultValue:`note`,required:!1,description:`Callout variant`},{name:`title`,type:`string`,required:!1,description:`Optional heading shown above the body`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Lightbulb`)",iconPicker:!0},{name:`color`,type:`string`,required:!1,advanced:!0,description:"Optional accent color override (hex — e.g. `#F05032`)",colorPicker:!0},{name:`collapsible`,type:`boolean`,required:!1,defaultValue:!1,advanced:!0,description:"Render as a foldable `<details>` (Obsidian `[!TYPE]+/-`)"},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,description:`When collapsible, start in the open state`,hideWhen:e=>e.collapsible!==!0},{name:`children`,type:`reactnode`,required:!0,description:`Callout content`}],r6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Image source URL`,accept:q1,autoFocus:!0},{name:`alt`,type:`string`,required:!0,description:`Alt text`},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Image width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Image height`},{name:`srcset`,type:`string`,required:!1,advanced:!0,description:`Responsive image candidate set (e.g. "x.png 1x, y.png 2x")`},{name:`sizes`,type:`string`,required:!1,advanced:!0,description:`Responsive image sizes hint paired with srcset`},{name:`loading`,type:`enum`,enumValues:[`eager`,`lazy`],defaultValue:`lazy`,required:!1,advanced:!0,omitOnDefault:!0,description:`Native img loading strategy (defaults to lazy)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`decoding`,type:`enum`,enumValues:[`sync`,`async`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Hint for how the browser should decode the image`},{name:`fetchpriority`,type:`enum`,enumValues:[`high`,`low`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Resource fetch priority hint`},{name:`crossorigin`,type:`enum`,enumValues:[`anonymous`,`use-credentials`],required:!1,advanced:!0,description:`CORS mode for the image fetch`},{name:`referrerpolicy`,type:`string`,required:!1,advanced:!0,description:`Referrer policy for the image fetch (HTML referrerpolicy values)`},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],i6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Embedded page URL (must start with http:// or https://)`,autoFocus:!0},{name:`title`,type:`string`,required:!1,description:`Iframe title (accessible label for screen readers)`},{name:`width`,type:`string`,required:!1,advanced:!0,description:`Embed width as a CSS length (e.g. "100%", "640px")`,cssLengthInput:!0},{name:`height`,type:`string`,required:!1,advanced:!0,description:`Embed height as a CSS length (e.g. "26rem", "480px")`,cssLengthInput:!0},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],a6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Video source URL`,accept:J1,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 video controls (defaults to true)`,hideWhen:e=>typeof e.src==`string`&&(X3(e.src)||J3(e.src))},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`poster`,type:`string`,required:!1,advanced:!0,description:`Poster image URL shown before playback`,accept:q1,hideWhen:e=>typeof e.src==`string`&&(X3(e.src)||J3(e.src))},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Video width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Video height`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`,hideWhen:e=>typeof e.src==`string`&&J3(e.src)},{name:`playsinline`,type:`boolean`,required:!1,advanced:!0,description:`Play inline on iOS rather than entering fullscreen`,hideWhen:e=>typeof e.src==`string`&&(X3(e.src)||J3(e.src))},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the video to preload`,hideWhen:e=>typeof e.src==`string`&&(t6(e.src)!==null||X3(e.src)||J3(e.src))},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],o6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Audio source URL`,accept:Y1,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 audio controls (defaults to true)`},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the audio to preload`}],s6=[{name:`title`,type:`string`,required:!0,description:`Accordion heading shown inside the <summary>`},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!1,description:`When true, the accordion renders expanded on initial load`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Rocket`)",iconPicker:!0},{name:`description`,type:`string`,required:!1,advanced:!0,description:`Optional subtitle rendered below the title inside <summary>`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#advanced-options`)"},{name:`name`,type:`string`,required:!1,advanced:!0,description:`HTML5 <details name=> group — siblings with the same name are mutually exclusive`}],c6=[n6[0],n6[1],n6[4],n6[5],n6[6]],l6=[r6[0],r6[1],r6[7]],u6=[s6[0],s6[1],s6[4],s6[5]],d6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Alt text (Obsidian alias syntax: `![[file.png|alt text]]`)"}],f6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[clip.mp4|title]]`)"}],p6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[song.mp3|title]]`)"}],m6=[{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#install-tabs`)"}],h6=[{name:`label`,type:`string`,required:!0,autoFocus:!0,defaultValue:`Tab`,description:`Tab strip label — shown in the clickable pill at the top`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#tab-npm`)"}],g6=[{name:`formula`,type:`string`,required:!0,autoFocus:!0,language:`latex`,description:`LaTeX math source (rendered with KaTeX in the browser)`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#eq-pythagoras`)"},{name:`language`,type:`string`,required:!1,advanced:!0,description:"Forward-compat hint for the math source language (default `latex`). Reserved for future MathJax / Typst / AsciiMath substrates."}],_6=[g6[0]],v6=[g6[0]],y6=[{name:`chart`,type:`string`,required:!0,hidden:!0,description:`Mermaid chart source (graph / flowchart / sequenceDiagram / class / state / etc.)`}],b6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Display name override (Obsidian alias syntax: `![[file.zip|label]]`)"}],x6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`File URL`,accept:[`*/*`],autoFocus:!0}],S6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`PDF source URL`,accept:X1,autoFocus:!0},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Accessible label for the embedded PDF viewer`},{name:`anchor`,type:`string`,required:!1,advanced:!0,description:"PDF viewer parameters as a single URL-fragment string (e.g. `page=3&height=600`)"}],C6=[{name:`src`,type:`string`,required:!0,description:"Path of the source doc, extension-less (e.g. `api-spec`).",autoFocus:!0},{name:`anchor`,type:`string`,required:!0,description:"Id of the `<MirrorSource>` block within the source doc."}],w6=[{name:`id`,type:`string`,required:!0,description:"Stable id agents and authors use to reference this block from `<Mirror>` elsewhere.",autoFocus:!0},{name:`children`,type:`reactnode`,required:!0,description:`Block content this MirrorSource owns — paragraphs, callouts, code, nested JSX, anything.`}];function T6(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`).replace(/>/g,`>`)}function E6(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function D6(e){let t=e.attrs.props,n=t?.target??``,r=typeof t?.alias==`string`&&t.alias.length>0?t.alias:null,i=typeof t?.anchor==`string`&&t.anchor.length>0?t.anchor:null,a=r??(i?`${n}#${i}`:n);return{type:`wikiLinkEmbed`,value:a,data:{target:n,anchor:i,alias:r},children:[{type:`text`,value:a}]}}var O6=[{name:`Callout`,surface:`canonical`,hasChildren:!0,props:n6,icon:`MessageSquareWarning`,category:`content`,displayName:`Callout`,description:`Alert / admonition with 15 type variants — 5 GFM (note, tip, important, warning, caution) plus 10 Obsidian-parity (abstract, info, todo, success, question, failure, danger, bug, example, quote)`,searchTerms:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`,`alert`,`admonition`,`callout`],serialize:(e,t)=>H3(`Callout`,e,t,n6)},{name:`img`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:r6,icon:`Image`,category:`media`,displayName:`Image`,description:`Image with click-to-zoom and HTML-native attributes`,searchTerms:[`image`,`zoom`,`picture`,`photo`],placeholder:{label:`Add an image`},serialize:(e,t)=>H3(`img`,e,t,r6)},{name:`video`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:a6,icon:`SquarePlay`,category:`media`,displayName:`Video`,description:`HTML5 video player with native controls`,searchTerms:[`video`,`media`,`player`,`mp4`,`webm`,`movie`],placeholder:{label:`Add a video`},serialize:(e,t)=>H3(`video`,e,t,a6)},{name:`audio`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:o6,icon:`Volume2`,category:`media`,displayName:`Audio`,description:`HTML5 audio player with native controls`,searchTerms:[`audio`,`sound`,`music`,`mp3`,`podcast`,`player`],placeholder:{label:`Add audio`},serialize:(e,t)=>H3(`audio`,e,t,o6)},{name:`Pdf`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:S6,icon:`FileText`,category:`media`,displayName:`PDF`,description:"Embedded PDF viewer (`#page=N` to open at page N, `#height=N` for viewer height)",searchTerms:[`pdf`,`document`,`embed`,`pdfjs`],placeholder:{label:`Add a PDF`},serialize:(e,t)=>H3(`Pdf`,e,t,S6)},{name:`File`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:x6,icon:`Paperclip`,category:`media`,displayName:`File`,description:`Downloadable file attachment — inline row with name + size + download link`,searchTerms:[`file`,`attachment`,`download`,`document`,`zip`,`docx`,`doc`],placeholder:{label:`Add a file`},serialize:(e,t)=>H3(`File`,e,t,x6)},{name:`Embed`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:i6,icon:`AppWindow`,category:`media`,displayName:`Embed`,description:'Inline web embed (iframe) — drop a URL, get a resizable preview pane. For YouTube / Vimeo / Loom prefer `<video src="…">` (player props, click-facade); `<Embed>` auto-rewrites watch URLs as a fallback.',searchTerms:[`embed`,`iframe`,`website`,`page`,`inline`,`frame`,`preview`],placeholder:{label:`Embed a URL`},serialize:(e,t)=>H3(`Embed`,e,t,i6)},{name:`Accordion`,surface:`canonical`,hasChildren:!0,props:s6,icon:`ChevronRight`,category:`content`,displayName:`Accordion`,description:"Standalone expand/collapse via native HTML5 <details>/<summary>. Group siblings with the `name` prop for exclusive-accordion UX.",searchTerms:[`toggle`,`accordion`,`expandable`,`details`,`disclosure`,`collapse`,`fold`],exampleBody:`Body content revealed when the accordion is expanded.`,serialize:(e,t)=>H3(`Accordion`,e,t,s6)},{name:`Tabs`,surface:`canonical`,hasChildren:!0,emptyChildName:`Tab`,props:m6,icon:`LayoutPanelTop`,category:`content`,displayName:`Tabs`,description:"Horizontal tab strip + active panel below. Each `<Tab>` child is one panel; clickable pills at the top switch the active one. Active selection is ephemeral (resets on reload).",searchTerms:[`tabs`,`tabbed`,`panels`,`tabgroup`,`switcher`],exampleBody:`<Tab label="One">Body of the first tab panel.</Tab>
|
|
458
|
+
`)}]}]}}function N3(e){let t=``;for(let n of e.children)n.type===`text`?t+=n.value??``:n.type===`element`&&(t+=N3(n));return t}var P3=class extends Error{htmlBytes;maxBytes;constructor(e,t){super(`HTML payload (${e} bytes) exceeds htmlToMdast ceiling (${t} bytes); falling through to plain text`),this.name=`HtmlPayloadTooLargeError`,this.htmlBytes=e,this.maxBytes=t}},F3=[$4,y3,q4,c3,H4,O3,p3,w3,i3];function I3(e){qF(e,e=>{e.type===`strong`?(e.data??={},e.data.sourceDelimiter=`**`):e.type===`emphasis`?(e.data??={},e.data.sourceDelimiter=`*`):e.type===`inlineCode`?(e.data??={},e.data.sourceFenceChar="`",e.data.sourceFenceLength=1):e.type===`code`&&(e.data??={},e.data.sourceFenceChar="`",e.data.sourceFenceLength=3)})}function L3(e,t){let n=t?.maxBytes??5242880;if(e.length>n)throw new P3(e.length,n);let r=LU().use(GP,{fragment:!0});for(let e of F3)r.use(e);for(let e of t?.additionalCleanupPlugins??[])r.use(e);r.use(KL);let i=r.parse(e),a=r.runSync(i);return I3(a),a}function R3(e){return String(LU().use(OU).use(kU).stringify(e))}function z3(e,t){let n=Array.isArray(e.attrs.attributes)?e.attrs.attributes.filter(e=>typeof e==`object`&&!!e&&`type`in e):[],r=e.attrs.props??{},i=new Map,a=new Set;if(t)for(let e of t)e.omitOnDefault===!0&&`defaultValue`in e&&e.defaultValue!==void 0&&i.set(e.name,e.defaultValue),e.type===`string`&&e.required===!1&&e.defaultValue===void 0&&a.add(e.name);for(let[e,t]of Object.entries(r)){let r=n.findIndex(t=>t.type===`mdxJsxAttribute`&&t.name===e);if(i.has(e)&&Object.is(i.get(e),t)){r>=0&&n.splice(r,1);continue}if(a.has(e)&&t===``){r>=0&&n.splice(r,1);continue}if(r>=0){let e=n[r];if(e.type===`mdxJsxAttribute`&&e.value!=null&&typeof e.value==`object`&&e.value.type===`mdxJsxAttributeValueExpression`&&B3(e.value.value,t))continue}let o=V3(e,t);r>=0?n[r]=o:n.push(o)}return n}function B3(e,t){try{return JSON.stringify(JSON.parse(e))===JSON.stringify(t)}catch{return!1}}function V3(e,t){if(t===!0)return{type:`mdxJsxAttribute`,name:e,value:null};if(t===!1)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:`false`}};if(t==null)return{type:`mdxJsxAttribute`,name:e,value:null};if(typeof t==`string`)return{type:`mdxJsxAttribute`,name:e,value:t};if(typeof t==`number`)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:JSON.stringify(t)}};if(typeof t==`object`){let n;try{n=JSON.stringify(t)}catch{n=String(t)}return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:n}}}return{type:`mdxJsxAttribute`,name:e,value:String(t)}}function H3(e,t,n,r){return{type:`mdxJsxFlowElement`,name:e,attributes:z3(t,r),children:n.all(t),data:{}}}var U3=/^[A-Za-z0-9]{20,}$/,W3=/^(?:\d+s?|(?:\d+h)?(?:\d+m)?(?:\d+s)?)$/;function G3(e){let t=e.toLowerCase();return t===`loom.com`||t===`www.loom.com`}function K3(e){let t=e.pathname.match(/^\/(?:share|embed)\/([A-Za-z0-9]+)\/?$/);if(!t)return null;let n=t[1]??``;return U3.test(n)?n:null}function q3(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!G3(t.hostname))return null;let n=K3(t);if(!n)return null;let r=t.searchParams.get(`t`);return{id:n,startRaw:r&&r.length>0&&W3.test(r)?r:null}}function J3(e){return q3(e)!==null}function Y3(e){let t=e.toLowerCase();return t===`vimeo.com`||t===`www.vimeo.com`||t===`player.vimeo.com`}function X3(e){if(typeof e!=`string`||e.length===0)return!1;let t;try{t=new URL(e)}catch{return!1}return t.protocol!==`http:`&&t.protocol!==`https:`?!1:Y3(t.hostname)}var Z3=/^[A-Za-z0-9_-]{11}$/;function Q3(e){let t=e.toLowerCase();return t===`youtube.com`||t===`www.youtube.com`||t===`m.youtube.com`||t===`music.youtube.com`||t===`youtu.be`||t===`youtube-nocookie.com`||t===`www.youtube-nocookie.com`}function $3(e){if(e.length===0)return null;if(/^[0-9]+$/.test(e)){let t=Number.parseInt(e,10);return t>0?t:null}let t=e.match(/^(?:([0-9]+)h)?(?:([0-9]+)m)?(?:([0-9]+)s?)?$/);if(!t)return null;let n=t[1]?Number.parseInt(t[1],10):0,r=t[2]?Number.parseInt(t[2],10):0,i=t[3]?Number.parseInt(t[3],10):0,a=n*3600+r*60+i;return a>0?a:null}function e6(e){if(e.hostname.toLowerCase()===`youtu.be`){let t=e.pathname.replace(/^\//,``).split(`/`)[0]??``;return Z3.test(t)?t:null}if(e.pathname===`/watch`){let t=e.searchParams.get(`v`)??``;return Z3.test(t)?t:null}let t=e.pathname.match(/^\/(?:embed|shorts|v)\/([A-Za-z0-9_-]{11})\/?$/);return t?t[1]??null:null}function t6(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!Q3(t.hostname))return null;let n=e6(t);if(!n)return null;let r=t.searchParams.get(`t`)??t.searchParams.get(`start`)??``;return{id:n,startSeconds:r.length>0?$3(r):null,noCookie:t.hostname.toLowerCase().endsWith(`youtube-nocookie.com`)}}var n6=[{name:`type`,type:`enum`,enumValues:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`],defaultValue:`note`,required:!1,description:`Callout variant`},{name:`title`,type:`string`,required:!1,description:`Optional heading shown above the body`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Lightbulb`)",iconPicker:!0},{name:`color`,type:`string`,required:!1,advanced:!0,description:"Optional accent color override (hex — e.g. `#F05032`)",colorPicker:!0},{name:`collapsible`,type:`boolean`,required:!1,defaultValue:!1,advanced:!0,description:"Render as a foldable `<details>` (Obsidian `[!TYPE]+/-`)"},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,description:`When collapsible, start in the open state`,hideWhen:e=>e.collapsible!==!0},{name:`children`,type:`reactnode`,required:!0,description:`Callout content`}],r6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Image source URL`,accept:q1,autoFocus:!0},{name:`alt`,type:`string`,required:!0,description:`Alt text`},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Image width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Image height`},{name:`srcset`,type:`string`,required:!1,advanced:!0,description:`Responsive image candidate set (e.g. "x.png 1x, y.png 2x")`},{name:`sizes`,type:`string`,required:!1,advanced:!0,description:`Responsive image sizes hint paired with srcset`},{name:`loading`,type:`enum`,enumValues:[`eager`,`lazy`],defaultValue:`lazy`,required:!1,advanced:!0,omitOnDefault:!0,description:`Native img loading strategy (defaults to lazy)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`decoding`,type:`enum`,enumValues:[`sync`,`async`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Hint for how the browser should decode the image`},{name:`fetchpriority`,type:`enum`,enumValues:[`high`,`low`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Resource fetch priority hint`},{name:`crossorigin`,type:`enum`,enumValues:[`anonymous`,`use-credentials`],required:!1,advanced:!0,description:`CORS mode for the image fetch`},{name:`referrerpolicy`,type:`string`,required:!1,advanced:!0,description:`Referrer policy for the image fetch (HTML referrerpolicy values)`},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],i6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Embedded page URL (must start with http:// or https://)`,autoFocus:!0},{name:`title`,type:`string`,required:!1,description:`Iframe title (accessible label for screen readers)`},{name:`width`,type:`string`,required:!1,advanced:!0,description:`Embed width as a CSS length (e.g. "100%", "640px")`,cssLengthInput:!0},{name:`height`,type:`string`,required:!1,advanced:!0,description:`Embed height as a CSS length (e.g. "26rem", "480px")`,cssLengthInput:!0},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],a6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Video source URL`,accept:J1,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 video controls (defaults to true)`,hideWhen:e=>typeof e.src==`string`&&(X3(e.src)||J3(e.src))},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`poster`,type:`string`,required:!1,advanced:!0,description:`Poster image URL shown before playback`,accept:q1,hideWhen:e=>typeof e.src==`string`&&(X3(e.src)||J3(e.src))},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Video width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Video height`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`,hideWhen:e=>typeof e.src==`string`&&J3(e.src)},{name:`playsinline`,type:`boolean`,required:!1,advanced:!0,description:`Play inline on iOS rather than entering fullscreen`,hideWhen:e=>typeof e.src==`string`&&(X3(e.src)||J3(e.src))},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the video to preload`,hideWhen:e=>typeof e.src==`string`&&(t6(e.src)!==null||X3(e.src)||J3(e.src))},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],o6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Audio source URL`,accept:Y1,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 audio controls (defaults to true)`},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the audio to preload`}],s6=[{name:`title`,type:`string`,required:!0,description:`Accordion heading shown inside the <summary>`},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!1,description:`When true, the accordion renders expanded on initial load`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Rocket`)",iconPicker:!0},{name:`description`,type:`string`,required:!1,advanced:!0,description:`Optional subtitle rendered below the title inside <summary>`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#advanced-options`)"},{name:`name`,type:`string`,required:!1,advanced:!0,description:`HTML5 <details name=> group — siblings with the same name are mutually exclusive`}],c6=[n6[0],n6[1],n6[4],n6[5],n6[6]],l6=[r6[0],r6[1],r6[7]],u6=[s6[0],s6[1],s6[4],s6[5]],d6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Alt text (Obsidian alias syntax: `![[file.png|alt text]]`)"}],f6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[clip.mp4|title]]`)"}],p6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[song.mp3|title]]`)"}],m6=[{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#install-tabs`)"}],h6=[{name:`label`,type:`string`,required:!0,autoFocus:!0,defaultValue:`Tab`,description:`Tab strip label — shown in the clickable pill at the top`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#tab-npm`)"}],g6=[{name:`formula`,type:`string`,required:!0,autoFocus:!0,language:`latex`,description:`LaTeX math source (rendered with KaTeX in the browser)`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#eq-pythagoras`)"},{name:`language`,type:`string`,required:!1,advanced:!0,description:"Forward-compat hint for the math source language (default `latex`). Reserved for future MathJax / Typst / AsciiMath substrates."}],_6=[g6[0]],v6=[g6[0]],y6=[{name:`chart`,type:`string`,required:!0,hidden:!0,description:`Mermaid chart source (graph / flowchart / sequenceDiagram / class / state / etc.)`}],b6=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Display name override (Obsidian alias syntax: `![[file.zip|label]]`)"}],x6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`File URL`,accept:[`*/*`],autoFocus:!0}],S6=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`PDF source URL`,accept:X1,autoFocus:!0},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Accessible label for the embedded PDF viewer`},{name:`anchor`,type:`string`,required:!1,advanced:!0,description:"PDF viewer parameters as a single URL-fragment string (e.g. `page=3&height=600`)"}],C6=[{name:`src`,type:`string`,required:!0,description:"Path of the source doc, extension-less (e.g. `api-spec`).",autoFocus:!0},{name:`anchor`,type:`string`,required:!0,description:"Id of the `<MirrorSource>` block within the source doc."}],w6=[{name:`id`,type:`string`,required:!0,description:"Stable id agents and authors use to reference this block from `<Mirror>` elsewhere.",autoFocus:!0},{name:`children`,type:`reactnode`,required:!0,description:`Block content this MirrorSource owns — paragraphs, callouts, code, nested JSX, anything.`}];function T6(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`).replace(/>/g,`>`)}function E6(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function D6(e){let t=e.attrs.props,n=t?.target??``,r=typeof t?.alias==`string`&&t.alias.length>0?t.alias:null,i=typeof t?.anchor==`string`&&t.anchor.length>0?t.anchor:null,a=r??(i?`${n}#${i}`:n);return{type:`wikiLinkEmbed`,value:a,data:{target:n,anchor:i,alias:r},children:[{type:`text`,value:a}]}}var O6=[{name:`Callout`,surface:`canonical`,hasChildren:!0,props:n6,icon:`MessageSquareWarning`,category:`content`,displayName:`Callout`,description:`Alert / admonition with 15 type variants — 5 GFM (note, tip, important, warning, caution) plus 10 Obsidian-parity (abstract, info, todo, success, question, failure, danger, bug, example, quote)`,searchTerms:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`,`alert`,`admonition`,`callout`],serialize:(e,t)=>H3(`Callout`,e,t,n6)},{name:`img`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:r6,icon:`Image`,category:`media`,displayName:`Image`,description:`Image with click-to-zoom and HTML-native attributes`,searchTerms:[`image`,`zoom`,`picture`,`photo`],placeholder:{label:`Add an image`},serialize:(e,t)=>H3(`img`,e,t,r6)},{name:`video`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:a6,icon:`SquarePlay`,category:`media`,displayName:`Video`,description:`HTML5 video player with native controls`,searchTerms:[`video`,`media`,`player`,`mp4`,`webm`,`movie`],placeholder:{label:`Add a video`},serialize:(e,t)=>H3(`video`,e,t,a6)},{name:`audio`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:o6,icon:`Volume2`,category:`media`,displayName:`Audio`,description:`HTML5 audio player with native controls`,searchTerms:[`audio`,`sound`,`music`,`mp3`,`podcast`,`player`],placeholder:{label:`Add audio`},serialize:(e,t)=>H3(`audio`,e,t,o6)},{name:`Pdf`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:S6,icon:`FileText`,category:`media`,displayName:`PDF`,description:"Embedded PDF viewer (`#page=N` to open at page N, `#height=N` for viewer height)",searchTerms:[`pdf`,`document`,`embed`,`pdfjs`],placeholder:{label:`Add a PDF`},serialize:(e,t)=>H3(`Pdf`,e,t,S6)},{name:`File`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:x6,icon:`Paperclip`,category:`media`,displayName:`File`,description:`Downloadable file attachment — inline row with name + size + download link`,searchTerms:[`file`,`attachment`,`download`,`document`,`zip`,`docx`,`doc`],placeholder:{label:`Add a file`},serialize:(e,t)=>H3(`File`,e,t,x6)},{name:`Embed`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:i6,icon:`AppWindow`,category:`media`,displayName:`Embed`,description:'Inline web embed (iframe) — drop a URL, get a resizable preview pane. For YouTube / Vimeo / Loom prefer `<video src="…">` (player props, click-facade); `<Embed>` auto-rewrites watch URLs as a fallback.',searchTerms:[`embed`,`iframe`,`website`,`page`,`inline`,`frame`,`preview`],placeholder:{label:`Embed a URL`},serialize:(e,t)=>H3(`Embed`,e,t,i6)},{name:`Accordion`,surface:`canonical`,hasChildren:!0,props:s6,icon:`ChevronRight`,category:`content`,displayName:`Accordion`,description:"Standalone expand/collapse via native HTML5 <details>/<summary>. Group siblings with the `name` prop for exclusive-accordion UX.",searchTerms:[`toggle`,`accordion`,`expandable`,`details`,`disclosure`,`collapse`,`fold`],exampleBody:`Body content revealed when the accordion is expanded.`,serialize:(e,t)=>H3(`Accordion`,e,t,s6)},{name:`Tabs`,surface:`canonical`,hasChildren:!0,emptyChildName:`Tab`,props:m6,icon:`LayoutPanelTop`,category:`content`,displayName:`Tabs`,description:"Horizontal tab strip + active panel below. Each `<Tab>` child is one panel; clickable pills at the top switch the active one. Active selection is ephemeral (resets on reload).",searchTerms:[`tabs`,`tabbed`,`panels`,`tabgroup`,`switcher`],exampleBody:`<Tab label="One">Body of the first tab panel.</Tab>
|
|
459
459
|
<Tab label="Two">Body of the second tab panel.</Tab>`,serialize:(e,t)=>H3(`Tabs`,e,t,m6)},{name:`Tab`,surface:`canonical`,hasChildren:!0,props:h6,icon:`PanelTop`,category:`content`,displayName:`Tab`,description:"A single tab panel inside a `<Tabs>` container — carries the strip label and the block-content body.",searchTerms:[`tab`,`panel`],exampleBody:"Panel content — must be nested inside a `<Tabs>` parent.",serialize:(e,t)=>H3(`Tab`,e,t,h6)},{name:`Math`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:g6,icon:`Sigma`,category:`content`,displayName:`Math`,description:`Block math equation rendered with KaTeX from a LaTeX source string`,searchTerms:[`math`,`latex`,`equation`,`formula`,`katex`,`tex`],serialize:(e,t)=>H3(`Math`,e,t,g6)},{name:`MermaidFence`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:y6,icon:`Workflow`,category:`content`,displayName:`Mermaid`,description:"Diagram rendered from Mermaid source (flowchart, sequence, class, state, ER, gantt, pie). Authored exclusively as ` ```mermaid ` fenced code.",searchTerms:[`mermaid`,`diagram`,`flowchart`,`graph`,`sequence`,`sequencediagram`,`class`,`state`,`er`,`erdiagram`,`gantt`,`pie`,`chart`],serialize:e=>({type:`code`,lang:`mermaid`,meta:null,value:e.attrs.props?.chart??``})},{name:`Mirror`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:C6,icon:`CopyPlus`,category:`content`,displayName:`Mirror`,description:"Render a read-only copy of a `<MirrorSource>` block from another doc. Use to keep the same content in sync across multiple docs without copy-paste — edits land at the source, every Mirror reflects the change.",searchTerms:[`mirror`,`sync`,`synced`,`transclude`,`embed`,`reference`,`shared block`],serialize:(e,t)=>H3(`Mirror`,e,t,C6)},{name:`MirrorSource`,surface:`canonical`,hasChildren:!0,props:w6,icon:`GitBranch`,category:`content`,displayName:`Mirror Source`,description:'Mark a block as the source of truth for content that appears in multiple docs. Wrap any block content; `<Mirror src="…" anchor="<id>">` references render this verbatim read-only at every call-site. Edit here, propagate everywhere.',searchTerms:[`mirror source`,`sync source`,`source block`,`master block`,`shared`],exampleBody:"Authoritative content lives inside this block — edits here propagate to every `<Mirror>` that references this id.",serialize:(e,t)=>H3(`MirrorSource`,e,t,w6)},{name:`GFMCallout`,surface:`compat`,hasChildren:!0,props:c6,icon:`MessageSquareWarning`,category:`content`,displayName:`GFM Callout`,description:"GFM blockquote alert (`> [!NOTE]`) — read-only compat. Preserves `> [!NOTE]` syntax on round-trip; insert a fresh Callout block for the full prop surface.",rendersAs:`Callout`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=new Set([`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`]),i=n?.type??`note`;return{type:`blockquote`,children:[{type:`html`,value:`[!${(r.has(i.toLowerCase())?i:`note`).toUpperCase()}]${n?.collapsible?n.defaultOpen===!1?`-`:`+`:``}${n?.title?` ${n.title}`:``}`},...t.all(e).filter(e=>{if(e.type!==`paragraph`)return!0;let t=e;return Array.isArray(t.children)&&t.children.length>0})]}}},{name:`CommonMarkImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:l6,icon:`Image`,category:`media`,displayName:`CommonMark Image`,description:'CommonMark image (``) — read-only compat. Preserves `` syntax on round-trip; insert a fresh Image block for the full HTML-native attribute surface (srcset, sizes, decoding, etc.).',rendersAs:`img`,translateProps:e=>e,serialize:e=>{let t=e.attrs.props;return{type:`paragraph`,children:[{type:`image`,url:t?.sourceUrl??t?.src??``,alt:t?.alt??``,title:t?.title??null}]}}},{name:`WikiEmbedImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:d6,icon:`ZoomIn`,category:`media`,displayName:`Wiki Embed Image`,description:"Obsidian-style `![[file.png]]` wiki-embed — read-only compat. Edit the alt-text via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`img`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,alt:t??n}},serialize:D6},{name:`WikiEmbedVideo`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:f6,icon:`Film`,category:`media`,displayName:`Wiki Embed Video`,description:"Obsidian-style `![[clip.mp4]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`video`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:D6},{name:`WikiEmbedAudio`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:p6,icon:`Volume2`,category:`media`,displayName:`Wiki Embed Audio`,description:"Obsidian-style `![[song.mp3]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`audio`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:D6},{name:`WikiEmbedFile`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:b6,icon:`Paperclip`,category:`media`,displayName:`Wiki Embed File`,description:"Obsidian-style `![[file.zip]]` wiki-embed — read-only compat for arbitrary downloadable attachments. Renders through the `File` canonical (inline row with file-up icon + bold name + optional dim size). Edit the display name via the alias slot.",rendersAs:`File`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.size==`string`&&e.size.length>0?e.size:null;return{src:e.src,name:t??void 0,size:n??void 0}},serialize:D6},{name:`HtmlDetailsAccordion`,surface:`compat`,hasChildren:!0,props:u6,icon:`ChevronRight`,category:`content`,displayName:`HTML5 Details`,description:"HTML5 `<details><summary>` collapsible — read-only compat. Preserves `<details>` syntax on round-trip; insert a fresh Accordion block for icon / description / group-name props.",rendersAs:`Accordion`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=n?.defaultOpen?` open`:``,i=n?.name?` name="${T6(n.name)}"`:``,a=n?.id?` id="${T6(n.id)}"`:``,o=n?.title?.trim(),s=o?`<summary>${E6(o)}</summary>`:``;return{type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<details${r}${i}${a}>\n${s}`,closer:`</details>`}}}}},{name:`DollarMath`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:_6,icon:`Sigma`,category:`content`,displayName:`Dollar Math`,description:"Block math via `$$…$$` syntax — read-only compat. Preserves `$$…$$` form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`math`,value:e.attrs.props?.formula??``})},{name:`MathFence`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:v6,icon:`Sigma`,category:`content`,displayName:`Math Fence`,description:"Block math via ` ```math ` fenced code syntax — read-only compat. Preserves the fence form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`code`,lang:`math`,meta:null,value:e.attrs.props?.formula??``})}],k6={name:`*`,surface:`canonical`,hasChildren:!0,props:[],description:`Unregistered component — children editable as markdown`,serialize:(e,t)=>H3(e.attrs.componentName||`*`,e,t)};function A6(){let e=new Map;e.set(`*`,k6);for(let t of O6)e.set(t.name,t);return{get(t){return e.get(t)},getOrWildcard(t){return e.get(t)??e.get(`*`)},set(t,n){e.set(t,n)},has(t){return e.has(t)},entries(){return e.entries()}}}var j6={parseFallback:{blockLevel:0,wholeDoc:0,wholeDocBudget:0},jsxRenderFailure:{},jsxAutoConvertFailed:{},jsxAutoConvertSucceeded:{},jsxPropDropped:{},jsxMoveFailed:{},jsxStuckCopyFailed:{},jsxStuckDeleteFailed:{},jsxPopoverCloseRestoreFailed:{},jsxKeyboardDeleteFailed:{},blockGripClickSelectFailed:{},jsxArrowNodeSelectFailed:{}};function M6(){j6.parseFallback.blockLevel++}function N6(){j6.parseFallback.wholeDoc++}function P6(){j6.parseFallback.wholeDocBudget++}function F6(e){j6.jsxRenderFailure[e]=(j6.jsxRenderFailure[e]??0)+1}function I6(e){j6.jsxAutoConvertFailed[e]=(j6.jsxAutoConvertFailed[e]??0)+1}function L6(e){j6.jsxAutoConvertSucceeded[e]=(j6.jsxAutoConvertSucceeded[e]??0)+1}function R6(e){j6.jsxPropDropped[e]=(j6.jsxPropDropped[e]??0)+1}function z6(e){j6.jsxMoveFailed[e]=(j6.jsxMoveFailed[e]??0)+1}function B6(e){j6.jsxStuckCopyFailed[e]=(j6.jsxStuckCopyFailed[e]??0)+1}function V6(e){j6.jsxStuckDeleteFailed[e]=(j6.jsxStuckDeleteFailed[e]??0)+1}function H6(e){j6.jsxPopoverCloseRestoreFailed[e]=(j6.jsxPopoverCloseRestoreFailed[e]??0)+1}function U6(e){j6.jsxKeyboardDeleteFailed[e]=(j6.jsxKeyboardDeleteFailed[e]??0)+1}function W6(e){j6.blockGripClickSelectFailed[e]=(j6.blockGripClickSelectFailed[e]??0)+1}function G6(e){j6.jsxArrowNodeSelectFailed[e]=(j6.jsxArrowNodeSelectFailed[e]??0)+1}var K6=/^(`{3,}|~{3,})/gm;function q6(e){let t=[],n=null;for(let r of e.matchAll(K6)){let e=r[1],i=r.index;n?e[0]===n.marker[0]&&e.length>=n.marker.length&&(t.push([n.offset,i+r[0].length]),n=null):n={marker:e,offset:i}}return n&&t.push([n.offset,e.length]),t}function J6(e,t){return t.some(([t,n])=>e>=t&&e<n)}var Y6=/^[ \t]{0,3}\[([^\]]+)\]:\s*(\S+)(\s+(?:"[^"]*"|'[^']*'|\([^)]*\)))?\s*$/gm;function X6(e){let t=q6(e),n=[];for(let r of e.matchAll(Y6))J6(r.index,t)||n.push(r[0].trimEnd());return n.length>0?`${n.join(`
|
|
460
460
|
`)}\n\n`:``}var Z6=500,Q6=1e3;function $6(e,t){let n={startMs:typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),calls:0};return r8(e,t.parse,0,n)}function e8(e){return e.calls>=Q6?!0:(typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now())-e.startMs>=Z6}var t8=500;function n8(e){return e instanceof Error?{name:e.name,message:e.message.slice(0,t8),stack:e.stack?.split(`
|
|
461
461
|
`).slice(0,4).join(`
|
|
@@ -465,13 +465,13 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
|
|
|
465
465
|
`){let i=t[r+1];if(i===`
|
|
466
466
|
`||i===`>`){if(e.push(...n),n.length=0,i===`
|
|
467
467
|
`)for(;t[r+1]===`
|
|
468
|
-
`;)r++;continue}}if(t[r]===`{`||t[r]===`}`){let e=0;for(let n=r-1;n>=0&&t[n]===`\\`;n--)e++;if(e%2==1)continue;t[r]===`{`?n.push(r):n.length>0&&n.pop()}}if(e.push(...n),e.length>0){let n=t.split(``);for(let t of e)n[t]=v8;t=n.join(``)}}return t}function R8(e){return b8.test(e)||x8.test(e)}function z8(){return e=>{
|
|
469
|
-
`,t),r=(n===-1?e.slice(t):e.slice(t,n)).match(a5);return r?{rawType:r[1],foldableMarker:r[2]===`+`||r[2]===`-`?r[2]:null,title:r[3]?.trim()||null}:null}function s5(e){if(e.data?.hName!==`div`)return null;let t=e.data?.hProperties?.class;if(typeof t!=`string`)return null;let n=t.match(i5);return n?n[1].toLowerCase():null}function c5(e){return n5[e.toLowerCase()]??null}function l5(e,t,n,r,i=null){let a=[{type:`mdxJsxAttribute`,name:`type`,value:t}];n&&a.push({type:`mdxJsxAttribute`,name:`title`,value:n}),i&&a.push({type:`mdxJsxAttribute`,name:`data-authored-as`,value:i}),r!==null&&(a.push({type:`mdxJsxAttribute`,name:`collapsible`,value:null}),r===`+`?a.push({type:`mdxJsxAttribute`,name:`defaultOpen`,value:null}):a.push({type:`mdxJsxAttribute`,name:`defaultOpen`,value:{type:`mdxJsxAttributeValueExpression`,value:`false`}}));let o=e.children.slice(1),s=e.position?.start.line;return{type:`mdxJsxFlowElement`,name:`GFMCallout`,attributes:a,children:n&&o.length>0&&s!==void 0&&u5(o[0],s)?o.slice(1):o,position:e.position}}function u5(e,t){if(!e||typeof e!=`object`)return!1;let n=e;if(n.type!==`paragraph`)return!1;let r=n.position?.start?.line,i=n.position?.end?.line;return r===t&&i===t}function d5(e){if(!e||typeof e!=`object`||e.type!==`paragraph`)return!1;let t=e.data?.hProperties?.class;return typeof t==`string`&&t.includes(`${r5}-title`)}function f5(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;
|
|
470
|
-
`?(n+=1,r=1):r+=1;return{line:n,column:r,offset:t}}function _5(e,t,n){return{start:g5(e,t),end:g5(e,n)}}function v5(e,t,n,r){if(!e||!t.position||typeof t.position.start?.offset!=`number`)return;let i=t.position.start.offset;return _5(e,h5(e,i,t.value,n),h5(e,i,t.value,r))}var y5=/(?<!%)%%([^\n]*?[^\n%])%%(?!%)/g,b5=/<!--([\s\S]*?)-->/g;function x5(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;C5(e),JF(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`%%`)===-1&&i.indexOf(`<!--`)===-1)return;let a=S5(i);if(a.length===0)return;let o=[],s=0;for(let t of a){if(t.start>s){let r={type:`text`,value:i.slice(s,t.start)},a=v5(n,e,s,t.start);a&&(r.position=a),o.push(r)}let r={type:`comment`,children:[{type:`text`,value:t.body}],data:{sourceForm:t.sourceForm}},a=v5(n,e,t.start,t.end);a&&(r.position=a),o.push(r),s=t.end}if(s<i.length){let t={type:`text`,value:i.slice(s)},r=v5(n,e,s,i.length);r&&(t.position=r),o.push(t)}return r.children.splice(t,1,...o),[GF,t+o.length]})}}function S5(e){let t=[];y5.lastIndex=0;let n;for(;(n=y5.exec(e))!==null;)n[1].trim().length!==0&&t.push({start:n.index,end:n.index+n[0].length,body:n[1],sourceForm:`percent`});b5.lastIndex=0;let r;for(;(r=b5.exec(e))!==null;){let e=r[1].trim();e!==``&&t.push({start:r.index,end:r.index+r[0].length,body:e,sourceForm:`html`})}t.sort((e,t)=>e.start-t.start);let i=[],a=-1;for(let e of t)e.start<a||(i.push(e),a=e.end);return i}function C5(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(e.type===`paragraph`){let r=w5(e);if(r!==null){let e=T5(r);if(e!==null){let r={type:`commentBlock`,children:[{type:`paragraph`,children:[{type:`text`,value:e}]}],data:{sourceForm:`percent`,sourceLayout:`block`}};t.splice(n,1,r),n+=1;continue}let i=E5(r);if(i!==null){let e={type:`commentBlock`,children:[{type:`paragraph`,children:[{type:`text`,value:i}]}],data:{sourceForm:`html`,sourceLayout:`inline`}};t.splice(n,1,e),n+=1;continue}}let i=D5(e);if(i!==null){let e={type:`commentBlock`,children:[i],data:{sourceForm:`html`,sourceLayout:`inline`}};t.splice(n,1,e),n+=1;continue}let a=O5(e);if(a!==null){let e={type:`commentBlock`,children:[a],data:{sourceForm:`percent`,sourceLayout:`inline`}};t.splice(n,1,e),n+=1;continue}}if(e.type===`paragraph`&&A5(e)){let e=n+1;for(;e<t.length;){let n=t[e];if(n.type===`paragraph`&&A5(n))break;e+=1}if(e<t.length&&e>n+1){let r={type:`commentBlock`,children:t.slice(n+1,e),data:{sourceForm:`percent`,sourceLayout:`block`}};t.splice(n,e-n+1,r),n+=1;continue}}n+=1}}function w5(e){if(e.children.length!==1)return null;let t=e.children[0];return t.type===`text`?t.value:null}function T5(e){let t=e.match(/^%%\n((?:.|\n(?!\n))+?)\n%%$/);return t===null?null:t[1]}function E5(e){let t=e.trim();if(!t.startsWith(`<!--`)||!t.endsWith(`-->`))return null;let n=t.slice(4,-3);if(n.includes(`-->`)||n.includes(`<!--`))return null;let r=n.trim();return r===``?null:r}function D5(e){if(e.children.length<2)return null;let t=e.children[0],n=e.children[e.children.length-1];if(t.type!==`text`||n.type!==`text`)return null;let r=t.value.trimStart();if(!r.startsWith(`<!--`))return null;let i=n.value.trimEnd();if(!i.endsWith(`-->`))return null;for(let t=0;t<e.children.length;t++){let n=e.children[t];if(n.type!==`text`)continue;let r=n.value;if(t===0){if(k5(r,`<!--`)>1||k5(r,`-->`)>0)return null}else if(t===e.children.length-1){if(k5(r,`<!--`)>0||k5(r,`-->`)>1)return null}else if(r.includes(`<!--`)||r.includes(`-->`))return null}let a=r.slice(4);a.startsWith(` `)&&(a=a.slice(1));let o=i.slice(0,-3);o.endsWith(` `)&&(o=o.slice(0,-1));let s=[];a.length>0&&s.push({...t,value:a});for(let t=1;t<e.children.length-1;t++)s.push(e.children[t]);return o.length>0&&s.push({...n,value:o}),s.length===0?null:{type:`paragraph`,children:s}}function O5(e){if(e.children.length<2)return null;let t=e.children[0],n=e.children[e.children.length-1];if(t.type!==`text`||n.type!==`text`)return null;let r=t.value.trimStart();if(!r.startsWith(`%%`)||r.startsWith(`%%%`))return null;let i=n.value.trimEnd();if(!i.endsWith(`%%`)||i.endsWith(`%%%`))return null;let a=r.slice(2);a.startsWith(` `)&&(a=a.slice(1));let o=i.slice(0,-2);if(o.endsWith(` `)&&(o=o.slice(0,-1)),a.indexOf(`%%`)!==-1||o.indexOf(`%%`)!==-1)return null;for(let t=1;t<e.children.length-1;t++){let n=e.children[t];if(n.type===`text`&&n.value.indexOf(`%%`)!==-1)return null}if(!(e.children.slice(1,-1).some(e=>e.type===`text`?e.value.trim().length>0:!0)||a.trim().length>0||o.trim().length>0))return null;let s=[];a.length>0&&s.push({...t,value:a});for(let t=1;t<e.children.length-1;t++)s.push(e.children[t]);return o.length>0&&s.push({...n,value:o}),s.length===0?null:{type:`paragraph`,children:s}}function k5(e,t){if(!t)return 0;let n=0,r=0;for(;;){let i=e.indexOf(t,r);if(i===-1)break;n+=1,r=i+t.length}return n}function A5(e){let t=w5(e);return t===null?!1:t.trim()===`%%`}var j5=/^<details(\s[^>]*)?>\s*<summary>([\s\S]*?)<\/summary>([\s\S]*?)<\/details>\s*$/,M5=/^<details(\s[^>]*)?>(?:\s*<summary>([\s\S]*?)<\/summary>)?[\s\S]*$/,N5=/^\s*<\/details>\s*$/;function P5(e){let t=!1,n=null,r=null;if(!e)return{defaultOpen:t,name:n,id:r};let i=/(\w+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'<>]+)))?/g,a=i.exec(e);for(;a!==null;){let o=a[1].toLowerCase(),s=a[2]??a[3]??a[4]??null;o===`open`?t=!0:o===`name`?n=s:o===`id`&&(r=s),a=i.exec(e)}return{defaultOpen:t,name:n,id:r}}function F5(e){let t=[];return e.title!==null&&t.push({type:`mdxJsxAttribute`,name:`title`,value:e.title}),e.defaultOpen&&t.push({type:`mdxJsxAttribute`,name:`defaultOpen`,value:null}),e.name!==null&&t.push({type:`mdxJsxAttribute`,name:`name`,value:e.name}),e.id!==null&&t.push({type:`mdxJsxAttribute`,name:`id`,value:e.id}),t}function I5(e){if(e.type!==`paragraph`)return!1;let t=e.children;return t.length===1&&t[0].type===`text`}function L5(e){return e.children[0].value??``}function R5(e){if(!I5(e))return null;let t=L5(e).match(j5);if(!t)return null;let{defaultOpen:n,name:r,id:i}=P5(t[1]),a=t[2].trim()||null,o=t[3].trim(),s=o?[{type:`paragraph`,children:[{type:`text`,value:o}]}]:[];return{type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:F5({title:a,defaultOpen:n,name:r,id:i}),children:s,position:e.position}}function z5(e,t){let n=e[t];if(!I5(n))return null;let r=L5(n);if(!r.startsWith(`<details`)||r.includes(`</details>`))return null;let i=r.match(M5);if(!i)return null;let{defaultOpen:a,name:o,id:s}=P5(i[1]),c=i[2]?.trim()||null;for(let n=t+1;n<e.length;n++){let t=e[n];if(!I5(t))continue;let r=L5(t);if(N5.test(r))return{closerIdx:n,title:c,defaultOpen:a,name:o,id:s};if(r.includes(`</details>`))return null}return null}function B5(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(I5(e)){let r=R5(e);if(r){t[n]=r,n++;continue}let i=z5(t,n);if(i){let r=e,a=t[i.closerIdx],o=n+1,s=i.closerIdx,c=t.slice(o,s),l=r.position,u=a.position,d={type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:F5(i),children:c,position:l&&u?{start:l.start,end:u.end}:void 0},f=i.closerIdx-n+1;t.splice(n,f,d),n++;continue}}n++}}function V5(){return e=>{JF(e,e=>{`children`in e&&Array.isArray(e.children)&&B5(e)})}}var H5=/(?<!=)==(?=\S)([^\n]*?[^\s=])==(?!=)/g;function U5(e){return e.type===`strong`||e.type===`emphasis`||e.type===`delete`||e.type===`inlineCode`}function W5(e){return e.type===`text`||e.type===`inlineCode`?e.value.length>0?e.value.charAt(0):null:`children`in e&&Array.isArray(e.children)&&e.children.length>0?W5(e.children[0]):null}function G5(e){if(e.type===`text`||e.type===`inlineCode`)return e.value.length>0?e.value.slice(-1):null;if(`children`in e&&Array.isArray(e.children)&&e.children.length>0){let t=e.children;return G5(t[t.length-1])}return null}function K5(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(e.type!==`text`){n++;continue}let r=e.value,i=-1;for(let e=0;e<=r.length-2;e++){if(r.charCodeAt(e)!==61||r.charCodeAt(e+1)!==61||e>0&&r.charCodeAt(e-1)===61)continue;let a;if(e+2<r.length)a=r.charAt(e+2);else{let e=t[n+1];if(!e)continue;a=W5(e)}if(!(a===null||/\s/.test(a))){i=e;break}}if(i===-1){n++;continue}let a=-1,o=-1,s=!1;for(let e=i+3;e<=r.length-2;e++){if(r.charCodeAt(e)!==61||r.charCodeAt(e+1)!==61)continue;let i=r.charAt(e-1);if(/[\s=]/.test(i))continue;let o;if(e+2<r.length)o=r.charAt(e+2);else{let e=t[n+1];o=e?e.type===`text`?e.value[0]??null:W5(e):null}if(o!==`=`){a=-2;break}}if(a===-2){n++;continue}for(let e=n+1;e<t.length;e++){let n=t[e];if(n.type===`text`){for(let r=0;r<=n.value.length-2;r++){if(n.value.charCodeAt(r)!==61||n.value.charCodeAt(r+1)!==61)continue;let i;if(r>0)i=n.value.charAt(r-1);else{let n=t[e-1];i=G5(n)}if(i===null||/[\s=]/.test(i))continue;let c;if(r+2<n.value.length)c=n.value.charAt(r+2);else{let n=t[e+1];c=n?n.type===`text`?n.value[0]??null:W5(n):null}if(c!==`=`){a=e,o=r,s=!0;break}}if(a>=0)break}else if(!U5(n))break}if(a<0){n++;continue}let c=t[a],l=r.slice(0,i),u=r.slice(i+2),d=c.value.slice(0,o),f=c.value.slice(o+2),p=[];u.length>0&&p.push({type:`text`,value:u});for(let e=n+1;e<a;e++)p.push(t[e]);if(d.length>0&&p.push({type:`text`,value:d}),!s){n++;continue}let m={type:`mark`,children:p},h=[];l.length>0&&h.push({type:`text`,value:l}),h.push(m),f.length>0&&h.push({type:`text`,value:f}),t.splice(n,a-n+1,...h),n+=+(l.length>0)+1}}function q5(e){if(`children`in e&&Array.isArray(e.children)){K5(e);for(let t of e.children)q5(t)}}function J5(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;JF(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`==`)===-1)return;H5.lastIndex=0;let a=[],o;for(;(o=H5.exec(i))!==null;)a.push(o);if(a.length===0)return;let s=[],c=0;for(let t of a){let r=t.index,a=r+t[0].length;if(r>c){let t={type:`text`,value:i.slice(c,r)},a=v5(n,e,c,r);a&&(t.position=a),s.push(t)}let o={type:`text`,value:t[1]},l=v5(n,e,r+2,a-2);l&&(o.position=l);let u={type:`mark`,children:[o]},d=v5(n,e,r,a);d&&(u.position=d),s.push(u),c=a}if(c<i.length){let t={type:`text`,value:i.slice(c)},r=v5(n,e,c,i.length);r&&(t.position=r),s.push(t)}return r.children.splice(t,1,...s),[GF,t+s.length]}),q5(e),JF(e,`mdxJsxTextElement`,(e,t,n)=>{if(n===void 0||t==null||e.name!==`mark`)return;let r={type:`mark`,children:e.children??[]};return n.children.splice(t,1,r),t+1})}}function Y5(){return e=>{JF(e,`paragraph`,(e,t,n)=>{if(!n||t==null||e.children.length!==1)return;let r=e.children[0];if(!r||r.type!==`image`)return;let i=X5(r,e);n.children[t]=i})}}function X5(e,t){let n=[{type:`mdxJsxAttribute`,name:`src`,value:e.url}];typeof e.alt==`string`&&n.push({type:`mdxJsxAttribute`,name:`alt`,value:e.alt}),e.title&&n.push({type:`mdxJsxAttribute`,name:`title`,value:e.title});let r={type:`mdxJsxFlowElement`,name:`CommonMarkImage`,attributes:n,children:[]};return t.position&&(r.position=t.position),r}var Z5=/^( {4}|\t)/;function Q5(e){let t=e.split(`
|
|
468
|
+
`;)r++;continue}}if(t[r]===`{`||t[r]===`}`){let e=0;for(let n=r-1;n>=0&&t[n]===`\\`;n--)e++;if(e%2==1)continue;t[r]===`{`?n.push(r):n.length>0&&n.pop()}}if(e.push(...n),e.length>0){let n=t.split(``);for(let t of e)n[t]=v8;t=n.join(``)}}return t}function R8(e){return b8.test(e)||x8.test(e)}function z8(){return e=>{qF(e,e=>{let t=e;typeof t.value==`string`&&R8(t.value)&&(t.value=B8(t.value)),typeof t.url==`string`&&R8(t.url)&&(t.url=B8(t.url)),typeof t.title==`string`&&R8(t.title)&&(t.title=B8(t.title)),typeof t.alt==`string`&&R8(t.alt)&&(t.alt=B8(t.alt)),typeof t.lang==`string`&&R8(t.lang)&&(t.lang=B8(t.lang)),typeof t.meta==`string`&&R8(t.meta)&&(t.meta=B8(t.meta))})}}function B8(e){let t=e.replaceAll(m8,`<`).replaceAll(h8,`>`).replaceAll(g8,`:`).replaceAll(_8,`@`).replaceAll(v8,`{`);if(x8.test(t))for(let[e,n]of y8)t=t.replaceAll(n,e);return t}var V8=``,H8=``,U8=/&(?:[A-Za-z][A-Za-z0-9]*|#[0-9]+|#[xX][0-9A-Fa-f]+);/g;function W8(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;r--)n++;return n}function G8(e,t,n){return t.lastIndex=0,e.replace(t,(t,r)=>typeof r!=`number`||W8(e,r)%2==1?t:n(t))}function K8(e){return U8.lastIndex=0,e.replace(U8,e=>{let t=e.slice(1,-1);if(t.startsWith(`#`)){let e=t[1]===`x`||t[1]===`X`;return aB(t.slice(e?2:1),e?16:10)}let n=iB(t);return n===!1?e:n})}function q8(e){return G8(e,U8,e=>`${V8}${e.slice(1,-1)}${H8}`)}var J8=RegExp(`${V8}([^${H8}]+)${H8}`,`g`);function Y8(e){if(!e.includes(V8))return{value:e,spans:[]};let t=[],n=``,r=0;J8.lastIndex=0;let i=J8.exec(e);for(;i!==null;){i.index>r&&(n+=e.slice(r,i.index));let a=`&${i[1]??``};`;t.push({offset:n.length,length:a.length,raw:a}),n+=a,r=i.index+i[0].length,i=J8.exec(e)}return r<e.length&&(n+=e.slice(r)),{value:n,spans:t}}function X8(){return e=>{qF(e,e=>{let t=e;if(typeof t.value==`string`&&t.value.includes(V8)){let{value:n,spans:r}=Y8(t.value);if(t.value=n,e.type===`text`&&r.length>0){let t=e;t.data??={},t.data.entityRefSpans=r}}for(let e of[`url`,`title`,`alt`,`lang`,`meta`]){let n=t[e];typeof n==`string`&&n.includes(V8)&&(t[e]=Y8(n).value)}})}}var Z8=``,Q8=/\\</g;function $8(e){return G8(e,Q8,e=>`${Z8}${e.slice(1)}`)}function e5(){return e=>{qF(e,e=>{let t=e;typeof t.value==`string`&&t.value.includes(Z8)&&(t.value=t.value.split(Z8).join(``));for(let e of[`url`,`title`,`alt`]){let n=t[e];typeof n==`string`&&n.includes(Z8)&&(t[e]=n.split(Z8).join(``))}})}}var t5=new Set([`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`]),n5={note:`note`,tip:`tip`,important:`important`,warning:`warning`,caution:`caution`,abstract:`abstract`,info:`info`,todo:`todo`,success:`success`,question:`question`,failure:`failure`,danger:`danger`,bug:`bug`,example:`example`,quote:`quote`,summary:`abstract`,tldr:`abstract`,check:`success`,done:`success`,help:`question`,faq:`question`,fail:`failure`,missing:`failure`,error:`danger`,cite:`quote`,idea:`tip`,hint:`tip`,warn:`warning`,attention:`warning`},r5=`ok-alert`,i5=RegExp(`(?:^|\\s)${r5}-(\\w+)(?:\\s|$)`),a5=/^>\s*\[!(\w+)\]([+-])?(?:\s+(.*?))?\s*$/i;function o5(e,t){if(t<0||t>=e.length)return null;let n=e.indexOf(`
|
|
469
|
+
`,t),r=(n===-1?e.slice(t):e.slice(t,n)).match(a5);return r?{rawType:r[1],foldableMarker:r[2]===`+`||r[2]===`-`?r[2]:null,title:r[3]?.trim()||null}:null}function s5(e){if(e.data?.hName!==`div`)return null;let t=e.data?.hProperties?.class;if(typeof t!=`string`)return null;let n=t.match(i5);return n?n[1].toLowerCase():null}function c5(e){return n5[e.toLowerCase()]??null}function l5(e,t,n,r,i=null){let a=[{type:`mdxJsxAttribute`,name:`type`,value:t}];n&&a.push({type:`mdxJsxAttribute`,name:`title`,value:n}),i&&a.push({type:`mdxJsxAttribute`,name:`data-authored-as`,value:i}),r!==null&&(a.push({type:`mdxJsxAttribute`,name:`collapsible`,value:null}),r===`+`?a.push({type:`mdxJsxAttribute`,name:`defaultOpen`,value:null}):a.push({type:`mdxJsxAttribute`,name:`defaultOpen`,value:{type:`mdxJsxAttributeValueExpression`,value:`false`}}));let o=e.children.slice(1),s=e.position?.start.line;return{type:`mdxJsxFlowElement`,name:`GFMCallout`,attributes:a,children:n&&o.length>0&&s!==void 0&&u5(o[0],s)?o.slice(1):o,position:e.position}}function u5(e,t){if(!e||typeof e!=`object`)return!1;let n=e;if(n.type!==`paragraph`)return!1;let r=n.position?.start?.line,i=n.position?.end?.line;return r===t&&i===t}function d5(e){if(!e||typeof e!=`object`||e.type!==`paragraph`)return!1;let t=e.data?.hProperties?.class;return typeof t==`string`&&t.includes(`${r5}-title`)}function f5(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;qF(e,`blockquote`,(e,t,r)=>{if(r===void 0||typeof t!=`number`)return;let i=s5(e);if(!i)return;let a=c5(i),o=null,s=null;e.position?.start?.offset!==void 0&&(s=o5(n,e.position.start.offset),s&&(o=s.title,a||=c5(s.rawType)));let c=a??`note`,l=s&&t5.has(c)?s.foldableMarker:null,u=(()=>{if(e.position?.start?.offset!==void 0){let t=o5(n,e.position.start.offset);if(t?.rawType)return t.rawType}return i})(),d=u.toLowerCase()===c?null:u;if(!d5(e.children[0]))return;let f=l5(e,c,o,l,d);r.children[t]=f})}}var p5=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"></svg>`,m5={markers:`*`,classPrefix:r5,matchCaseSensitive:!1,icons:new Proxy({},{get:()=>p5})};function h5(e,t,n,r){let i=t,a=0;for(;a<r&&i<e.length;)e[i]===`\\`&&i+1<e.length&&n[a]===e[i+1]?(i+=2,a+=1):(i+=1,a+=1);return i}function g5(e,t){let n=1,r=1;for(let i=0;i<t&&i<e.length;i++)e[i]===`
|
|
470
|
+
`?(n+=1,r=1):r+=1;return{line:n,column:r,offset:t}}function _5(e,t,n){return{start:g5(e,t),end:g5(e,n)}}function v5(e,t,n,r){if(!e||!t.position||typeof t.position.start?.offset!=`number`)return;let i=t.position.start.offset;return _5(e,h5(e,i,t.value,n),h5(e,i,t.value,r))}var y5=/(?<!%)%%([^\n]*?[^\n%])%%(?!%)/g,b5=/<!--([\s\S]*?)-->/g;function x5(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;C5(e),qF(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`%%`)===-1&&i.indexOf(`<!--`)===-1)return;let a=S5(i);if(a.length===0)return;let o=[],s=0;for(let t of a){if(t.start>s){let r={type:`text`,value:i.slice(s,t.start)},a=v5(n,e,s,t.start);a&&(r.position=a),o.push(r)}let r={type:`comment`,children:[{type:`text`,value:t.body}],data:{sourceForm:t.sourceForm}},a=v5(n,e,t.start,t.end);a&&(r.position=a),o.push(r),s=t.end}if(s<i.length){let t={type:`text`,value:i.slice(s)},r=v5(n,e,s,i.length);r&&(t.position=r),o.push(t)}return r.children.splice(t,1,...o),[WF,t+o.length]})}}function S5(e){let t=[];y5.lastIndex=0;let n;for(;(n=y5.exec(e))!==null;)n[1].trim().length!==0&&t.push({start:n.index,end:n.index+n[0].length,body:n[1],sourceForm:`percent`});b5.lastIndex=0;let r;for(;(r=b5.exec(e))!==null;){let e=r[1].trim();e!==``&&t.push({start:r.index,end:r.index+r[0].length,body:e,sourceForm:`html`})}t.sort((e,t)=>e.start-t.start);let i=[],a=-1;for(let e of t)e.start<a||(i.push(e),a=e.end);return i}function C5(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(e.type===`paragraph`){let r=w5(e);if(r!==null){let e=T5(r);if(e!==null){let r={type:`commentBlock`,children:[{type:`paragraph`,children:[{type:`text`,value:e}]}],data:{sourceForm:`percent`,sourceLayout:`block`}};t.splice(n,1,r),n+=1;continue}let i=E5(r);if(i!==null){let e={type:`commentBlock`,children:[{type:`paragraph`,children:[{type:`text`,value:i}]}],data:{sourceForm:`html`,sourceLayout:`inline`}};t.splice(n,1,e),n+=1;continue}}let i=D5(e);if(i!==null){let e={type:`commentBlock`,children:[i],data:{sourceForm:`html`,sourceLayout:`inline`}};t.splice(n,1,e),n+=1;continue}let a=O5(e);if(a!==null){let e={type:`commentBlock`,children:[a],data:{sourceForm:`percent`,sourceLayout:`inline`}};t.splice(n,1,e),n+=1;continue}}if(e.type===`paragraph`&&A5(e)){let e=n+1;for(;e<t.length;){let n=t[e];if(n.type===`paragraph`&&A5(n))break;e+=1}if(e<t.length&&e>n+1){let r={type:`commentBlock`,children:t.slice(n+1,e),data:{sourceForm:`percent`,sourceLayout:`block`}};t.splice(n,e-n+1,r),n+=1;continue}}n+=1}}function w5(e){if(e.children.length!==1)return null;let t=e.children[0];return t.type===`text`?t.value:null}function T5(e){let t=e.match(/^%%\n((?:.|\n(?!\n))+?)\n%%$/);return t===null?null:t[1]}function E5(e){let t=e.trim();if(!t.startsWith(`<!--`)||!t.endsWith(`-->`))return null;let n=t.slice(4,-3);if(n.includes(`-->`)||n.includes(`<!--`))return null;let r=n.trim();return r===``?null:r}function D5(e){if(e.children.length<2)return null;let t=e.children[0],n=e.children[e.children.length-1];if(t.type!==`text`||n.type!==`text`)return null;let r=t.value.trimStart();if(!r.startsWith(`<!--`))return null;let i=n.value.trimEnd();if(!i.endsWith(`-->`))return null;for(let t=0;t<e.children.length;t++){let n=e.children[t];if(n.type!==`text`)continue;let r=n.value;if(t===0){if(k5(r,`<!--`)>1||k5(r,`-->`)>0)return null}else if(t===e.children.length-1){if(k5(r,`<!--`)>0||k5(r,`-->`)>1)return null}else if(r.includes(`<!--`)||r.includes(`-->`))return null}let a=r.slice(4);a.startsWith(` `)&&(a=a.slice(1));let o=i.slice(0,-3);o.endsWith(` `)&&(o=o.slice(0,-1));let s=[];a.length>0&&s.push({...t,value:a});for(let t=1;t<e.children.length-1;t++)s.push(e.children[t]);return o.length>0&&s.push({...n,value:o}),s.length===0?null:{type:`paragraph`,children:s}}function O5(e){if(e.children.length<2)return null;let t=e.children[0],n=e.children[e.children.length-1];if(t.type!==`text`||n.type!==`text`)return null;let r=t.value.trimStart();if(!r.startsWith(`%%`)||r.startsWith(`%%%`))return null;let i=n.value.trimEnd();if(!i.endsWith(`%%`)||i.endsWith(`%%%`))return null;let a=r.slice(2);a.startsWith(` `)&&(a=a.slice(1));let o=i.slice(0,-2);if(o.endsWith(` `)&&(o=o.slice(0,-1)),a.indexOf(`%%`)!==-1||o.indexOf(`%%`)!==-1)return null;for(let t=1;t<e.children.length-1;t++){let n=e.children[t];if(n.type===`text`&&n.value.indexOf(`%%`)!==-1)return null}if(!(e.children.slice(1,-1).some(e=>e.type===`text`?e.value.trim().length>0:!0)||a.trim().length>0||o.trim().length>0))return null;let s=[];a.length>0&&s.push({...t,value:a});for(let t=1;t<e.children.length-1;t++)s.push(e.children[t]);return o.length>0&&s.push({...n,value:o}),s.length===0?null:{type:`paragraph`,children:s}}function k5(e,t){if(!t)return 0;let n=0,r=0;for(;;){let i=e.indexOf(t,r);if(i===-1)break;n+=1,r=i+t.length}return n}function A5(e){let t=w5(e);return t===null?!1:t.trim()===`%%`}var j5=/^<details(\s[^>]*)?>\s*<summary>([\s\S]*?)<\/summary>([\s\S]*?)<\/details>\s*$/,M5=/^<details(\s[^>]*)?>(?:\s*<summary>([\s\S]*?)<\/summary>)?[\s\S]*$/,N5=/^\s*<\/details>\s*$/;function P5(e){let t=!1,n=null,r=null;if(!e)return{defaultOpen:t,name:n,id:r};let i=/(\w+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'<>]+)))?/g,a=i.exec(e);for(;a!==null;){let o=a[1].toLowerCase(),s=a[2]??a[3]??a[4]??null;o===`open`?t=!0:o===`name`?n=s:o===`id`&&(r=s),a=i.exec(e)}return{defaultOpen:t,name:n,id:r}}function F5(e){let t=[];return e.title!==null&&t.push({type:`mdxJsxAttribute`,name:`title`,value:e.title}),e.defaultOpen&&t.push({type:`mdxJsxAttribute`,name:`defaultOpen`,value:null}),e.name!==null&&t.push({type:`mdxJsxAttribute`,name:`name`,value:e.name}),e.id!==null&&t.push({type:`mdxJsxAttribute`,name:`id`,value:e.id}),t}function I5(e){if(e.type!==`paragraph`)return!1;let t=e.children;return t.length===1&&t[0].type===`text`}function L5(e){return e.children[0].value??``}function R5(e){if(!I5(e))return null;let t=L5(e).match(j5);if(!t)return null;let{defaultOpen:n,name:r,id:i}=P5(t[1]),a=t[2].trim()||null,o=t[3].trim(),s=o?[{type:`paragraph`,children:[{type:`text`,value:o}]}]:[];return{type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:F5({title:a,defaultOpen:n,name:r,id:i}),children:s,position:e.position}}function z5(e,t){let n=e[t];if(!I5(n))return null;let r=L5(n);if(!r.startsWith(`<details`)||r.includes(`</details>`))return null;let i=r.match(M5);if(!i)return null;let{defaultOpen:a,name:o,id:s}=P5(i[1]),c=i[2]?.trim()||null;for(let n=t+1;n<e.length;n++){let t=e[n];if(!I5(t))continue;let r=L5(t);if(N5.test(r))return{closerIdx:n,title:c,defaultOpen:a,name:o,id:s};if(r.includes(`</details>`))return null}return null}function B5(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(I5(e)){let r=R5(e);if(r){t[n]=r,n++;continue}let i=z5(t,n);if(i){let r=e,a=t[i.closerIdx],o=n+1,s=i.closerIdx,c=t.slice(o,s),l=r.position,u=a.position,d={type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:F5(i),children:c,position:l&&u?{start:l.start,end:u.end}:void 0},f=i.closerIdx-n+1;t.splice(n,f,d),n++;continue}}n++}}function V5(){return e=>{qF(e,e=>{`children`in e&&Array.isArray(e.children)&&B5(e)})}}var H5=/(?<!=)==(?=\S)([^\n]*?[^\s=])==(?!=)/g;function U5(e){return e.type===`strong`||e.type===`emphasis`||e.type===`delete`||e.type===`inlineCode`}function W5(e){return e.type===`text`||e.type===`inlineCode`?e.value.length>0?e.value.charAt(0):null:`children`in e&&Array.isArray(e.children)&&e.children.length>0?W5(e.children[0]):null}function G5(e){if(e.type===`text`||e.type===`inlineCode`)return e.value.length>0?e.value.slice(-1):null;if(`children`in e&&Array.isArray(e.children)&&e.children.length>0){let t=e.children;return G5(t[t.length-1])}return null}function K5(e){let t=e.children,n=0;for(;n<t.length;){let e=t[n];if(e.type!==`text`){n++;continue}let r=e.value,i=-1;for(let e=0;e<=r.length-2;e++){if(r.charCodeAt(e)!==61||r.charCodeAt(e+1)!==61||e>0&&r.charCodeAt(e-1)===61)continue;let a;if(e+2<r.length)a=r.charAt(e+2);else{let e=t[n+1];if(!e)continue;a=W5(e)}if(!(a===null||/\s/.test(a))){i=e;break}}if(i===-1){n++;continue}let a=-1,o=-1,s=!1;for(let e=i+3;e<=r.length-2;e++){if(r.charCodeAt(e)!==61||r.charCodeAt(e+1)!==61)continue;let i=r.charAt(e-1);if(/[\s=]/.test(i))continue;let o;if(e+2<r.length)o=r.charAt(e+2);else{let e=t[n+1];o=e?e.type===`text`?e.value[0]??null:W5(e):null}if(o!==`=`){a=-2;break}}if(a===-2){n++;continue}for(let e=n+1;e<t.length;e++){let n=t[e];if(n.type===`text`){for(let r=0;r<=n.value.length-2;r++){if(n.value.charCodeAt(r)!==61||n.value.charCodeAt(r+1)!==61)continue;let i;if(r>0)i=n.value.charAt(r-1);else{let n=t[e-1];i=G5(n)}if(i===null||/[\s=]/.test(i))continue;let c;if(r+2<n.value.length)c=n.value.charAt(r+2);else{let n=t[e+1];c=n?n.type===`text`?n.value[0]??null:W5(n):null}if(c!==`=`){a=e,o=r,s=!0;break}}if(a>=0)break}else if(!U5(n))break}if(a<0){n++;continue}let c=t[a],l=r.slice(0,i),u=r.slice(i+2),d=c.value.slice(0,o),f=c.value.slice(o+2),p=[];u.length>0&&p.push({type:`text`,value:u});for(let e=n+1;e<a;e++)p.push(t[e]);if(d.length>0&&p.push({type:`text`,value:d}),!s){n++;continue}let m={type:`mark`,children:p},h=[];l.length>0&&h.push({type:`text`,value:l}),h.push(m),f.length>0&&h.push({type:`text`,value:f}),t.splice(n,a-n+1,...h),n+=+(l.length>0)+1}}function q5(e){if(`children`in e&&Array.isArray(e.children)){K5(e);for(let t of e.children)q5(t)}}function J5(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;qF(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`==`)===-1)return;H5.lastIndex=0;let a=[],o;for(;(o=H5.exec(i))!==null;)a.push(o);if(a.length===0)return;let s=[],c=0;for(let t of a){let r=t.index,a=r+t[0].length;if(r>c){let t={type:`text`,value:i.slice(c,r)},a=v5(n,e,c,r);a&&(t.position=a),s.push(t)}let o={type:`text`,value:t[1]},l=v5(n,e,r+2,a-2);l&&(o.position=l);let u={type:`mark`,children:[o]},d=v5(n,e,r,a);d&&(u.position=d),s.push(u),c=a}if(c<i.length){let t={type:`text`,value:i.slice(c)},r=v5(n,e,c,i.length);r&&(t.position=r),s.push(t)}return r.children.splice(t,1,...s),[WF,t+s.length]}),q5(e),qF(e,`mdxJsxTextElement`,(e,t,n)=>{if(n===void 0||t==null||e.name!==`mark`)return;let r={type:`mark`,children:e.children??[]};return n.children.splice(t,1,r),t+1})}}function Y5(){return e=>{qF(e,`paragraph`,(e,t,n)=>{if(!n||t==null||e.children.length!==1)return;let r=e.children[0];if(!r||r.type!==`image`)return;let i=X5(r,e);n.children[t]=i})}}function X5(e,t){let n=[{type:`mdxJsxAttribute`,name:`src`,value:e.url}];typeof e.alt==`string`&&n.push({type:`mdxJsxAttribute`,name:`alt`,value:e.alt}),e.title&&n.push({type:`mdxJsxAttribute`,name:`title`,value:e.title});let r={type:`mdxJsxFlowElement`,name:`CommonMarkImage`,attributes:n,children:[]};return t.position&&(r.position=t.position),r}var Z5=/^( {4}|\t)/;function Q5(e){let t=e.split(`
|
|
471
471
|
`),n=!1;for(let e of t)if(e.length!==0&&(n=!0,!Z5.test(e)))return!1;return n}function $5(e){return e.split(`
|
|
472
472
|
`).map(e=>e.length===0?e:e.startsWith(` `)?e.slice(4):e.startsWith(` `)?e.slice(1):e).join(`
|
|
473
473
|
`)}function e7(e,t){let n=e.position;if(!n||typeof n.start.offset!=`number`||typeof n.end.offset!=`number`)return null;let r=n.start.offset,i=n.end.offset;if(r<0||i>t.length||r>=i)return null;let a=r;for(;a>0&&t[a-1]!==`
|
|
474
|
-
`;)a--;if(a===r)return null;let o=t.slice(a,r);if(!Z5.test(o))return null;let s=t.slice(a,i);if(!Q5(s))return null;let c={start:{line:n.start.line,column:1,offset:a},end:n.end};return{type:`code`,lang:null,meta:null,value:$5(s).replace(/\n+$/,``),position:c,data:{sourceStyle:`indented`}}}var t7=function(){return(e,t)=>{let n=String(t.value??``);n&&
|
|
474
|
+
`;)a--;if(a===r)return null;let o=t.slice(a,r);if(!Z5.test(o))return null;let s=t.slice(a,i);if(!Q5(s))return null;let c={start:{line:n.start.line,column:1,offset:a},end:n.end};return{type:`code`,lang:null,meta:null,value:$5(s).replace(/\n+$/,``),position:c,data:{sourceStyle:`indented`}}}var t7=function(){return(e,t)=>{let n=String(t.value??``);n&&qF(e,`paragraph`,(e,t,r)=>{if(!r||r.type!==`root`||t==null)return;let i=r.children[t-1];if(i&&i.type===`list`)return;let a=e7(e,n);a&&(r.children[t]=a)})}};function n7(e,t,n){let r={type:`mdxJsxFlowElement`,name:e,attributes:[{type:`mdxJsxAttribute`,name:`formula`,value:t}],children:[]};return n&&(r.position=n),r}function r7(){return e=>{qF(e,`math`,(e,t,n)=>{if(!n||t==null)return;let r=n7(`DollarMath`,typeof e.value==`string`?e.value:``,e.position);n.children[t]=r}),qF(e,`code`,(e,t,n)=>{if(!n||t==null||e.lang!==`math`)return;let r=n7(`MathFence`,typeof e.value==`string`?e.value:``,e.position);n.children[t]=r})}}var i7=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g;function a7(e,t=``){let n=[],r=!1;for(let i of e.children){if(i.type!==`text`){n.push(i);continue}let e=i.value;i7.lastIndex=0;let a=[],o=0;for(;;){let n=i7.exec(e);if(n===null)break;let s=n[0],c=n[1],l=n.index;if(l>o){let n={type:`text`,value:e.slice(o,l)},r=v5(t,i,o,l);r&&(n.position=r),a.push(n)}let u={type:`text`,value:c},d=v5(t,i,l+1,l+1+c.length);d&&(u.position=d);let f={type:`link`,url:c,title:null,children:[u],data:{sourceStyle:`autolink`}},p=v5(t,i,l,l+s.length);p&&(f.position=p),a.push(f),o=l+s.length,r=!0}if(a.length===0)n.push(i);else{if(o<e.length){let n={type:`text`,value:e.slice(o)},r=v5(t,i,o,e.length);r&&(n.position=r),a.push(n)}n.push(...a)}}r&&(e.children=n)}var o7=new Set(`!"#$%&'()*+,-./:;<=>?@[\\]^_\`{|}~`.split(``));function s7(e){let t=[],n=``;for(let r=0;r<e.length;r++){let i=e[r];if(i===`\\`&&r+1<e.length&&e[r+1]===`|`){n+=`${i}|`,r++;continue}if(i===`|`){t.push(n),n=``;continue}n+=i}return t.push(n),t}function c7(e,t,n=!1,r){if(!t)return;let i=e.position;if(!i||typeof i.start?.offset!=`number`){n&&console.warn(`[position-slice] node type=${e.type} has no position — fidelity defaults apply`);return}let a=i.start.offset,o=i.end?.offset??a;if(a<0||o>t.length){n&&console.warn(`[position-slice] node type=${e.type} position out of bounds: start=${a} end=${o} sourceLen=${t.length}`);return}switch(e.data??={},e.type){case`text`:{let n=t.slice(a,o),r=e.value??``;if(n.length>r.length&&n.includes(`\\`)){let t=[],i=0,a=0;for(;i<n.length&&a<r.length;)n[i]===`\\`&&i+1<n.length&&o7.has(n[i+1])&&r[a]===n[i+1]?(t.push({offset:a,char:n[i+1]}),i+=2,a+=1):(i++,a++);t.length>0&&(e.data.escapedChars=t)}n.endsWith(`\\`)&&r.endsWith(`\\`)&&(e.data.sourceRaw=n);break}case`emphasis`:{let n=t[a];(n===`*`||n===`_`)&&(e.data.sourceDelimiter=n);break}case`strong`:{let n=t.slice(a,a+2);(n===`**`||n===`__`)&&(e.data.sourceDelimiter=n);break}case`heading`:{let n=t[a],i=t.slice(a,o);if(n===`#`){if(e.data.sourceStyle=`atx`,r?.type===`root`){let n=a;for(;n>0&&t[n-1]!==`
|
|
475
475
|
`;)n--;let r=t.slice(n,a);r.length>=1&&r.length<=3&&/^ +$/.test(r)&&(e.data.sourceLeadingIndent=r.length)}let n=/^#+( {2,})[^ ]/.exec(i);n&&(e.data.sourceInteriorSpacing=n[1].length);let o=/^.*?[ \t](#+)[ \t]*$/.exec(i);o&&(e.data.sourceTrailingHashes=o[1].length)}else{let t=/\n(=+)[ \t]*$/.exec(i),n=/\n(-+)[ \t]*$/.exec(i),r=t??n;r?(e.data.sourceStyle=`setext`,e.data.sourceUnderlineLength=r[1].length):e.data.sourceStyle=`atx`}break}case`blockquote`:{let n=a;for(;n>0&&t[n-1]!==`
|
|
476
476
|
`;)n--;let r=!1;for(let e=n;e<a;e++)if(t[e]===`>`){r=!0;break}let i=t.slice(a,o).split(`
|
|
477
477
|
`),s=[];for(let e=0;e<i.length;e++){let t=i[e];if(t.length===0)continue;if(r&&e>0)break;let n=t.replace(/^ {1,3}/,``);if(n[0]===`>`&&n.slice(1).trimEnd()!==``)if(n[1]===` `)s.push(1);else{let e=0;for(;n[1+e]===` `;)e++;s.push(e)}}s.length>0&&(e.data.sourceMarkerSpacings=s);break}case`list`:{let n=e.children?.[0];if(n?.position?.start?.offset!=null){let r=n.position.start.offset;if(r>=0&&r<t.length){let n=t[r];if(!e.ordered&&(n===`-`||n===`*`||n===`+`))e.data.bulletMarker=n;else if(e.ordered){let n=t.slice(r,Math.min(r+10,t.length)).match(/^\d+([.)])/);n&&(e.data.listMarkerDelimiter=n[1])}}}break}case`listItem`:{let n=t.slice(a,o),r=/^(?:([-+*])|(\d{1,9})[.)])( *)/.exec(n);if(!r)break;let s=r[1]?1:(r[2]?.length??0)+1,c=r[3].length;c>=2&&c<=4&&(e.data.sourceMarkerSpacing=c),r[2]&&(e.data.sourceOrdinal=Number.parseInt(r[2],10)),e.checked!=null&&/^\[([xX])\] /.exec(n.slice(s+Math.max(c,1)))?.[1]===`X`&&(e.data.sourceCheckboxChar=`X`);let l=s+(c>=2&&c<=4?c:1),u=a;for(;u>0&&t[u-1]!==`
|
|
@@ -487,7 +487,7 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
|
|
|
487
487
|
`);)t--;n[t]===`"`?e.data.sourceTitleMarker=`double`:n[t]===`'`?e.data.sourceTitleMarker=`single`:n[t]===`)`&&(e.data.sourceTitleMarker=`paren`)}}}}break;case`definition`:{let n=t.slice(a,o);if(e.data.sourceLayout=n.includes(`
|
|
488
488
|
`)?`multiline`:`inline`,typeof e.title==`string`&&n.length>0){let t=n[n.length-1];t===`"`?e.data.sourceTitleMarker=`double`:t===`'`?e.data.sourceTitleMarker=`single`:t===`)`&&(e.data.sourceTitleMarker=`paren`)}break}case`mdxJsxFlowElement`:case`mdxJsxTextElement`:case`mdxFlowExpression`:case`mdxTextExpression`:e.data.sourceRaw=t.slice(a,o);break;case`break`:t.slice(a,o).includes(`\\`)?e.data.sourceStyle=`backslash`:e.data.sourceStyle=`spaces`;break}}var l7=`(^|\\s)#([a-zA-Z][\\w/-]*)`;function u7(){return new RegExp(l7,`g`)}var d7=u7(),f7=/^[a-zA-Z][\w/-]*$/;function p7(e,t){if(t<=0||e[t-1]!==`\\`)return!1;let n=t-1,r=0;for(;n>=0&&e[n]===`\\`;)r++,n--;return r%2==1}function m7(e,t=``){let n=[],r=!1;for(let i of e.children){if(i.type!==`text`){n.push(i);continue}let e=i.value,a=typeof i.position?.start?.offset==`number`?i.position?.start?.offset??0:0;d7.lastIndex=0;let o=[],s=0;for(;;){let n=d7.exec(e);if(n===null)break;let c=n[1]??``,l=n[2]??``,u=n.index+c.length;if(t&&a>=0){let n=a,r=0,i=-1;for(;r<=u&&n<t.length;){let a=t[n]===`\\`&&n+1<t.length&&e[r]===t[n+1],o=a?n+1:n;if(r===u){i=o;break}n=a?n+2:n+1,r+=1}if(i>=0&&p7(t,i))continue}if(u>s){let n={type:`text`,value:e.slice(s,u)},r=v5(t,i,s,u);r&&(n.position=r),o.push(n)}let d={type:`tag`,value:l},f=v5(t,i,u,u+1+l.length);f&&(d.position=f),o.push(d),s=u+1+l.length,r=!0}if(o.length===0)n.push(i);else{if(s<e.length){let n={type:`text`,value:e.slice(s)},r=v5(t,i,s,e.length);r&&(n.position=r),o.push(n)}n.push(...o)}}r&&(e.children=n)}var h7=new Set(`root.paragraph.heading.text.emphasis.strong.blockquote.list.listItem.code.inlineCode.link.image.linkReference.imageReference.definition.html.thematicBreak.break.yaml.toml.table.tableRow.tableCell.delete.footnoteDefinition.footnoteReference.mdxFlowExpression.mdxJsxFlowElement.mdxJsxTextElement.mdxTextExpression.wikiLink.wikiLinkEmbed.tag.math.inlineMath.mark.comment.commentBlock.rawMdxFallbackMdast`.split(`.`));function g7(e,t){if(!e||typeof e!=`object`)return null;if(typeof e.offset==`number`)return e.offset>=0&&e.offset<=t.length?e.offset:null;let{line:n,column:r}=e;if(typeof n!=`number`||typeof r!=`number`||n<1||r<1)return null;let i=0;for(let e=1;e<n;e++){let e=t.indexOf(`
|
|
489
489
|
`,i);if(e===-1)return null;i=e+1}let a=t.indexOf(`
|
|
490
|
-
`,i),o=a===-1?t.length:a,s=i+r-1;return s<=o?s:null}function _7(e,t){if(!e)return null;let n=g7(e.start,t),r=g7(e.end,t);return n===null||r===null||r<n?null:t.slice(n,r)}function v7(e,t){let n=_7(e.position,t);return{type:`rawMdxFallbackMdast`,originalType:e.type??`unknown`,value:n??``,unresolvedPosition:n===null,position:e.position}}function y7(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``,r=typeof process<`u`&&{}?.OK_DEBUG_POSITION_SLICE===`1`;JF(e,(e,t,i)=>{if(i!==void 0&&typeof t==`number`&&typeof e.type==`string`&&!h7.has(e.type)){let r=v7(e,n);return i.children[t]=r,GF}if(`children`in e&&Array.isArray(e.children)){let t=e;t.children.some(e=>e.type===`text`)&&(a7(t,n),m7(t,n))}if(c7(e,n,r,i),e.type===`heading`&&i!==void 0&&typeof t==`number`&&e.data?.sourceStyle===`setext`){let n=e.position?.end?.line,r=i.children[t+1],a=r?.position?.start?.line;if(r?.type===`paragraph`&&typeof n==`number`&&typeof a==`number`&&a===n+1){let t=e;t.data??={},t.data.sourceContiguousNext=!0}}})}}function b7(e,t){let n={type:`mdxJsxFlowElement`,name:`MermaidFence`,attributes:[{type:`mdxJsxAttribute`,name:`chart`,value:e}],children:[]};return t&&(n.position=t),n}function x7(){return e=>{JF(e,`code`,(e,t,n)=>{if(!n||t==null||e.lang!==`mermaid`)return;let r=b7(typeof e.value==`string`?e.value:``,e.position);n.children[t]=r})}}function S7(e,t){let n=e,r=t;return n.type===`heading`&&n.data?.sourceContiguousNext===!0&&r.type===`paragraph`}var C7=(e,t)=>{if(S7(e,t))return 0;let n=t.data?.sourcePrecedingBlankLines;if(typeof n==`number`&&n>=2)return n;let r=e.position,i=t.position;if(!r||!i)return;let a=i.start.line-r.end.line-1;return a>=1?a:void 0},w7=Cq(),T7=IK(),E7=LK();function D7(){let e=this.data();e.micromarkExtensions||=[],e.fromMarkdownExtensions||=[],e.toMarkdownExtensions||=[];let t=e.micromarkExtensions;t.some(e=>e===w7)||t.push(w7);let n=e.fromMarkdownExtensions;n.some(e=>e===T7)||n.push(T7);let r=e.toMarkdownExtensions;r.some(e=>e===E7)||r.push(E7)}var O7=/(?<!\\)\$(?=\S)([^$\n]*?[^\s$])\$(?!\d)/g;function k7(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;JF(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`$`)===-1)return;O7.lastIndex=0;let a=[],o;for(;(o=O7.exec(i))!==null;)a.push(o);if(a.length===0)return;let s=[],c=0;for(let t of a){let r=t.index,a=r+t[0].length;if(r>c){let t={type:`text`,value:i.slice(c,r)},a=v5(n,e,c,r);a&&(t.position=a),s.push(t)}let o={type:`inlineMath`,value:t[1]},l=v5(n,e,r,a);l&&(o.position=l),s.push(o),c=a}if(c<i.length){let t={type:`text`,value:i.slice(c)},r=v5(n,e,c,i.length);r&&(t.position=r),s.push(t)}return r.children.splice(t,1,...s),[GF,t+s.length]})}}var A7={handlers:{tag:e=>`#${e.value}`},unsafe:[{character:`#`,inConstruct:[`phrasing`],before:`\\s`,after:`[a-zA-Z]`}]};function j7(){let e=this.data();e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===A7)||e.toMarkdownExtensions.push(A7)}var M7=33,N7=91,P7=93,F7=124,I7=35,bte={name:`wikiLink`,tokenize:(e,t,n)=>{let r=0,i=0,a=0;return o;function o(t){return t===N7?(e.enter(`wikiLink`),e.enter(`wikiLinkMarker`),e.consume(t),s):n(t)}function s(t){return t===N7?(e.consume(t),e.exit(`wikiLinkMarker`),e.enter(`wikiLinkTarget`),c):n(t)}function c(t){return t===null||t===-5||t===-4||t===-3||t===N7?n(t):t===P7?r===0?n(t):(e.exit(`wikiLinkTarget`),d(t)):t===I7?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),l):t===F7?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),r++,c)}function l(t){return t===null||t===-5||t===-4||t===-3||t===N7?n(t):t===P7?i===0?n(t):(e.exit(`wikiLinkAnchor`),d(t)):t===F7?i===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),i++,l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===N7?n(t):t===P7?a===0?n(t):(e.exit(`wikiLinkAlias`),d(t)):(e.consume(t),a++,u)}function d(t){return t===P7?(e.enter(`wikiLinkMarker`),e.consume(t),f):n(t)}function f(r){return r===P7?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLink`),t):n(r)}}},xte={name:`wikiLinkEmbed`,tokenize:(e,t,n)=>{let r=0,i=0,a=0;return o;function o(t){return t===M7?(e.enter(`wikiLinkEmbed`),e.enter(`wikiLinkEmbedBang`),e.consume(t),e.exit(`wikiLinkEmbedBang`),s):n(t)}function s(t){return t===N7?(e.enter(`wikiLinkMarker`),e.consume(t),c):n(t)}function c(t){return t===N7?(e.consume(t),e.exit(`wikiLinkMarker`),e.enter(`wikiLinkTarget`),l):n(t)}function l(t){return t===null||t===-5||t===-4||t===-3||t===N7?n(t):t===P7?r===0?n(t):(e.exit(`wikiLinkTarget`),f(t)):t===I7?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),u):t===F7?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),r++,l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===N7?n(t):t===P7?i===0?n(t):(e.exit(`wikiLinkAnchor`),f(t)):t===F7?i===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),i++,u)}function d(t){return t===null||t===-5||t===-4||t===-3||t===N7?n(t):t===P7?a===0?n(t):(e.exit(`wikiLinkAlias`),f(t)):(e.consume(t),a++,d)}function f(t){return t===P7?(e.enter(`wikiLinkMarker`),e.consume(t),p):n(t)}function p(r){return r===P7?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLinkEmbed`),t):n(r)}}};function Ste(){return{text:{[N7]:bte,[M7]:xte}}}function Cte(e){this.enter({type:`wikiLink`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function wte(e){this.enter({type:`wikiLinkEmbed`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function L7(e){return e.stack[e.stack.length-1]}function Tte(e){let t=L7(this),n=this.sliceSerialize(e);t.data.target=n.trim(),n!==t.data.target&&(t.data.sourceTarget=n)}function Ete(e){let t=L7(this),n=this.sliceSerialize(e),r=n.trim();t.data.anchor=r.length?r:null,t.data.anchor!==null&&n!==r&&(t.data.sourceAnchor=n)}function Dte(e){let t=L7(this),n=this.sliceSerialize(e),r=n.trim();t.data.alias=r.length?r:null,t.data.alias!==null&&n!==r&&(t.data.sourceAlias=n)}function R7(e){let{target:t,anchor:n,alias:r}=e.data,i=r||(n?`${t}#${n}`:t);e.value=i,e.children=[{type:`text`,value:i}]}function Ote(e){R7(L7(this)),this.exit(e)}function kte(e){R7(L7(this)),this.exit(e)}var z7={enter:{wikiLink:Cte,wikiLinkEmbed:wte},exit:{wikiLinkTarget:Tte,wikiLinkAnchor:Ete,wikiLinkAlias:Dte,wikiLink:Ote,wikiLinkEmbed:kte}};function B7(e,t){return typeof e==`string`&&e.trim()===t?e:t}var V7={handlers:{wikiLink:e=>{let t=e,n=t.data?.target??``,r=t.data?.anchor,i=t.data?.alias,a=`[[${B7(t.data?.sourceTarget,n)}`;return r&&(a+=`#${B7(t.data?.sourceAnchor,r)}`),i&&(a+=`|${B7(t.data?.sourceAlias,i)}`),`${a}]]`},wikiLinkEmbed:e=>{let t=e,n=t.data?.target??``,r=t.data?.anchor,i=t.data?.alias,a=`![[${n}`;return r&&(a+=`#${r}`),i&&(a+=`|${i}`),`${a}]]`}},unsafe:[{character:`[`,inConstruct:[`phrasing`]}]},H7=Ste();function U7(){let e=this.data();e.micromarkExtensions||=[],e.micromarkExtensions.some(e=>e===H7)||e.micromarkExtensions.push(H7),e.fromMarkdownExtensions||=[],e.fromMarkdownExtensions.some(e=>e===z7)||e.fromMarkdownExtensions.push(z7),e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===V7)||e.toMarkdownExtensions.push(V7)}function Ate(e){return e.children.some(e=>{let t=e.type;return t!==`yaml`&&t!==`toml`})?e:{...e,children:[...e.children,{type:`paragraph`,children:[]}]}}var jte=[{name:`remark-parse`,plugin:IG},{name:`remark-mdx-agnostic`,plugin:D7},{name:`remark-gfm`,plugin:kU},{name:`remark-math`,plugin:ZW,options:{singleDollarTextMath:!1}},{name:`remark-wiki-link`,plugin:U7},{name:`remark-github-alerts`,plugin:zW,options:m5},{name:`callout-transformer`,plugin:f5},{name:`restore-from-mdx`,plugin:z8},{name:`restore-entity-refs`,plugin:X8},{name:`restore-backslash-escapes`,plugin:e5},{name:`details-accordion-promoter`,plugin:V5},{name:`image-promoter`,plugin:Y5},{name:`indented-code-promoter`,plugin:t7},{name:`math-promoter`,plugin:r7},{name:`single-dollar-math-promoter`,plugin:k7},{name:`highlight-promoter`,plugin:J5},{name:`mermaid-promoter`,plugin:x7},{name:`comment-promoter`,plugin:x5},{name:`merged-post-parse-walker`,plugin:y7},{name:`ensure-non-empty-doc`,plugin:()=>Ate}];function Mte(e){let t=RU();for(let e of jte)t=`options`in e&&e.options!==void 0?t.use(e.plugin,e.options):t.use(e.plugin);return t=t.use(uW,{schema:e.schema,handlers:e.handlers}),t.freeze(),t}function Nte(e){let t=RU().use(FW,[`yaml`]).use(kU,{tablePipeAlign:!1}).use(ZW,{singleDollarTextMath:!1}).use(D7).use(U7).use(j7).use(AU,{bullet:`-`,fences:!0,rule:`-`,join:[C7],...e.toMarkdownHandlers?{handlers:e.toMarkdownHandlers}:{}});return t.freeze(),t}function W7(e){return e.charCodeAt(0)===65279?{source:e.slice(1),hadBom:!0}:{source:e,hadBom:!1}}var G7=3,K7=/^\n+$/,q7=/^\n{2,}$/;function J7(e,t,n){let r,i,a,o=e.children;if(o.length>0){let e=o[0]?.position?.start?.offset;if(typeof e==`number`&&e>0){let n=t.slice(0,e);K7.test(n)&&(r=n)}let n=o[o.length-1]?.position?.end?.offset;if(typeof n==`number`&&n<=t.length){let e=t.slice(n);q7.test(e)&&(i=e)}let s=[],c=!1;for(let e=1;e<o.length;e++){let n=o[e-1]?.position?.end?.offset,r=o[e]?.position?.start?.offset,i=null;if(typeof n==`number`&&typeof r==`number`&&r>=n){let e=t.slice(n,r);RegExp(`^\\n{${G7},}$`).test(e)&&(i=e.length-1,c=!0)}s.push(i)}c&&(a=s)}if(!n&&r===void 0&&i===void 0&&!a)return;let s={...n?{bom:!0}:{},...r===void 0?{}:{leading:r},...i===void 0?{}:{trailing:i},...a?{gapBlankLines:a}:{}};return e.data??={},e.data.sourceDocBoundary=s,s}function Pte(e){if(typeof e!=`object`||!e)return;let t=e,n={};return t.bom===!0&&(n.bom=!0),typeof t.leading==`string`&&K7.test(t.leading)&&(n.leading=t.leading),typeof t.trailing==`string`&&q7.test(t.trailing)&&(n.trailing=t.trailing),Array.isArray(t.gapBlankLines)&&t.gapBlankLines.every(e=>e===null||typeof e==`number`&&Number.isInteger(e)&&e>=G7-1)&&(n.gapBlankLines=t.gapBlankLines),n.bom||n.leading||n.trailing||n.gapBlankLines?n:void 0}function Fte(e,t){let{source:n,hadBom:r}=W7(e),i=new kP(q8(L8($8(n)))),a=t.parse(i);i.value=n;let o=t.runSync(a,i),s=J7(o,n,r),c=t.stringify(o);return s?c.type.create({...c.attrs,sourceDocBoundary:s},c.content,c.marks):c}function Ite(e,t){let{source:n,hadBom:r}=W7(e),i=new kP(q8(L8($8(n)))),a=t.parse(i);i.value=n;let o=t.runSync(a,i);return J7(o,n,r),o}function Lte(e,t,n){let r=fW(e,{schema:n.schema,nodeHandlers:n.pmNodeHandlers,markHandlers:n.pmMarkHandlers}),i=Pte(e.attrs?.sourceDocBoundary),a=i?.gapBlankLines;if(a&&a.length===r.children.length-1)for(let e=1;e<r.children.length;e++){let t=a[e-1];if(typeof t==`number`){let n=r.children[e];n.data??={},n.data.sourcePrecedingBlankLines=t}}let o=String(t.stringify(r));return i?.leading&&(o=i.leading+o),i?.trailing&&(o=o.replace(/\n+$/,``)+i.trailing),i?.bom&&(o=`\uFEFF${o}`),o}function Rte(){return!1}function zte(e){let t=e.lastIndexOf(`/`);return t===-1?``:t===0?`/`:e.slice(0,t)}function Bte(e,t){let n=e?`${e}/${t}`:t,r=n.startsWith(`/`),i=[];for(let e of n.split(`/`))if(!(e===``||e===`.`)){if(e===`..`){let e=i[i.length-1];i.length>0&&e!==`..`?i.pop():r||i.push(`..`);continue}i.push(e)}let a=i.join(`/`);return r?`/${a}`:a}function Y7(e,t){if(typeof e!=`string`||e===``||!t||e.startsWith(`/`)||!B0(e))return e;let n=Bte(zte(t),e);return n===``||n===`..`||n.startsWith(`../`)?(Rte()&&console.warn(`[resolve-image-url] doc-relative path escapes contentDir; emitting raw URL: ${e} (from sourcePath ${t})`),e):`/${n}`}var Vte=Object.assign(Qte,{peek:()=>`$`}),Hte=Object.assign($te,{peek:()=>`~`}),Ute=(()=>{for(let e of E7.extensions??[]){let t=e?.handlers?.mdxJsxFlowElement;if(typeof t==`function`)return t}throw Error(`mdast-util-mdx-jsx mdxJsxFlowElement to-markdown handler not found — the dirty MDX JSX serialize path cannot bind. Likely a breaking change in mdast-util-mdx-jsx (pinned in the root overrides); re-run the markdown-pipeline upgrade protocol (test:fidelity).`)})(),Wte={text(e,t,n,r){if(typeof e.data?.sourceRaw==`string`&&h2(e.data.sourceRaw,e.value??``))return e.data.sourceRaw;if(e.data?.escapedChars?.length){let t=e.value??``,i=e.data.escapedChars,a=``,o=0;for(let{offset:e,char:s}of i)e>o&&(a+=e9(n,t.slice(o,e),{...r,before:r.before+a,after:`\\`})),a+=`\\${s}`,o=e+1;return o<t.length&&(a+=e9(n,t.slice(o),{...r,before:r.before+a})),a}return e9(n,(e.value??``).replaceAll(`\xA0`,` `),r)},emphasis(e,t,n,r){let i=e.data?.sourceDelimiter??`*`,a=n.createTracker(r),o=n.enter(`emphasis`),s=a.move(i);return s+=r9(n.containerPhrasing(e,{before:s,after:i,...a.current()}),r,i),s+=a.move(i),o(),s},strong(e,t,n,r){let i=e.data?.sourceDelimiter??`**`,a=n.createTracker(r),o=n.enter(`strong`),s=a.move(i);return s+=r9(n.containerPhrasing(e,{before:s,after:i,...a.current()}),r,i),s+=a.move(i),o(),s},link(e,t,n,r){if(e.data?.sourceStyle===`autolink`)return`<${e.url??``}>`;if(e.data?.sourceStyle===`gfm-autolink`){let t=e.children?.length===1?e.children[0]:null;if(t?.type===`text`&&typeof t.value==`string`)return t.value}let i=n.createTracker(r),a=n.enter(`link`),o=n.enter(`label`),s=i.move(`[`);s+=i.move(n.containerPhrasing(e,{before:s,after:`](`,...i.current()})),s+=i.move(`](`),o();let c=n.enter(`destinationRaw`),l=String(e.url??``),u=e.data?.sourceUrlForm===`angle-bracketed`,d=l.startsWith(`<`)&&l.endsWith(`>`),f=u&&!d?`<${l}>`:$7(l);if(s+=i.move(f),c(),e.title){let t=e.data?.sourceTitleMarker??`double`;s+=i.move(Q7(e.title,t))}return s+=i.move(`)`),a(),s},image(e,t,n,r){let i=n.createTracker(r),a=n.enter(`image`),o=n.enter(`label`),s=i.move(`})),s+=i.move(`](`),o();let c=n.enter(`destinationRaw`);if(s+=i.move($7(String(e.url??``))),c(),e.title){let t=n.enter(`titleQuote`);s+=i.move(` "`),s+=i.move(n.safe(e.title,{before:s,after:`"`,...i.current()})),s+=i.move(`"`),t()}return s+=i.move(`)`),a(),s},definition(e,t,n,r){let i=e.data?.sourceLayout??`inline`,a=e.data?.sourceTitleMarker??`double`,o=n.enter(`definition`),s=n.createTracker(r),c=n.enter(`label`),l=s.move(`[`);l+=s.move(n.safe(n.associationId(e),{before:l,after:`]`,...s.current()})),l+=s.move(`]:`),c();let u=i===`multiline`?`
|
|
490
|
+
`,i),o=a===-1?t.length:a,s=i+r-1;return s<=o?s:null}function _7(e,t){if(!e)return null;let n=g7(e.start,t),r=g7(e.end,t);return n===null||r===null||r<n?null:t.slice(n,r)}function v7(e,t){let n=_7(e.position,t);return{type:`rawMdxFallbackMdast`,originalType:e.type??`unknown`,value:n??``,unresolvedPosition:n===null,position:e.position}}function y7(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``,r=typeof process<`u`&&{}?.OK_DEBUG_POSITION_SLICE===`1`;qF(e,(e,t,i)=>{if(i!==void 0&&typeof t==`number`&&typeof e.type==`string`&&!h7.has(e.type)){let r=v7(e,n);return i.children[t]=r,WF}if(`children`in e&&Array.isArray(e.children)){let t=e;t.children.some(e=>e.type===`text`)&&(a7(t,n),m7(t,n))}if(c7(e,n,r,i),e.type===`heading`&&i!==void 0&&typeof t==`number`&&e.data?.sourceStyle===`setext`){let n=e.position?.end?.line,r=i.children[t+1],a=r?.position?.start?.line;if(r?.type===`paragraph`&&typeof n==`number`&&typeof a==`number`&&a===n+1){let t=e;t.data??={},t.data.sourceContiguousNext=!0}}})}}function b7(e,t){let n={type:`mdxJsxFlowElement`,name:`MermaidFence`,attributes:[{type:`mdxJsxAttribute`,name:`chart`,value:e}],children:[]};return t&&(n.position=t),n}function x7(){return e=>{qF(e,`code`,(e,t,n)=>{if(!n||t==null||e.lang!==`mermaid`)return;let r=b7(typeof e.value==`string`?e.value:``,e.position);n.children[t]=r})}}function S7(e,t){let n=e,r=t;return n.type===`heading`&&n.data?.sourceContiguousNext===!0&&r.type===`paragraph`}var C7=(e,t)=>{if(S7(e,t))return 0;let n=t.data?.sourcePrecedingBlankLines;if(typeof n==`number`&&n>=2)return n;let r=e.position,i=t.position;if(!r||!i)return;let a=i.start.line-r.end.line-1;return a>=1?a:void 0},w7=Sq(),T7=FK(),E7=IK();function D7(){let e=this.data();e.micromarkExtensions||=[],e.fromMarkdownExtensions||=[],e.toMarkdownExtensions||=[];let t=e.micromarkExtensions;t.some(e=>e===w7)||t.push(w7);let n=e.fromMarkdownExtensions;n.some(e=>e===T7)||n.push(T7);let r=e.toMarkdownExtensions;r.some(e=>e===E7)||r.push(E7)}var O7=/(?<!\\)\$(?=\S)([^$\n]*?[^\s$])\$(?!\d)/g;function k7(){return(e,t)=>{let n=typeof t.value==`string`?t.value:``;qF(e,`text`,(e,t,r)=>{if(r===void 0||t==null)return;let i=e.value;if(i.indexOf(`$`)===-1)return;O7.lastIndex=0;let a=[],o;for(;(o=O7.exec(i))!==null;)a.push(o);if(a.length===0)return;let s=[],c=0;for(let t of a){let r=t.index,a=r+t[0].length;if(r>c){let t={type:`text`,value:i.slice(c,r)},a=v5(n,e,c,r);a&&(t.position=a),s.push(t)}let o={type:`inlineMath`,value:t[1]},l=v5(n,e,r,a);l&&(o.position=l),s.push(o),c=a}if(c<i.length){let t={type:`text`,value:i.slice(c)},r=v5(n,e,c,i.length);r&&(t.position=r),s.push(t)}return r.children.splice(t,1,...s),[WF,t+s.length]})}}var A7={handlers:{tag:e=>`#${e.value}`},unsafe:[{character:`#`,inConstruct:[`phrasing`],before:`\\s`,after:`[a-zA-Z]`}]};function j7(){let e=this.data();e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===A7)||e.toMarkdownExtensions.push(A7)}var M7=33,N7=91,P7=93,F7=124,I7=35,xte={name:`wikiLink`,tokenize:(e,t,n)=>{let r=0,i=0,a=0;return o;function o(t){return t===N7?(e.enter(`wikiLink`),e.enter(`wikiLinkMarker`),e.consume(t),s):n(t)}function s(t){return t===N7?(e.consume(t),e.exit(`wikiLinkMarker`),e.enter(`wikiLinkTarget`),c):n(t)}function c(t){return t===null||t===-5||t===-4||t===-3||t===N7?n(t):t===P7?r===0?n(t):(e.exit(`wikiLinkTarget`),d(t)):t===I7?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),l):t===F7?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),r++,c)}function l(t){return t===null||t===-5||t===-4||t===-3||t===N7?n(t):t===P7?i===0?n(t):(e.exit(`wikiLinkAnchor`),d(t)):t===F7?i===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),u):(e.consume(t),i++,l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===N7?n(t):t===P7?a===0?n(t):(e.exit(`wikiLinkAlias`),d(t)):(e.consume(t),a++,u)}function d(t){return t===P7?(e.enter(`wikiLinkMarker`),e.consume(t),f):n(t)}function f(r){return r===P7?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLink`),t):n(r)}}},Ste={name:`wikiLinkEmbed`,tokenize:(e,t,n)=>{let r=0,i=0,a=0;return o;function o(t){return t===M7?(e.enter(`wikiLinkEmbed`),e.enter(`wikiLinkEmbedBang`),e.consume(t),e.exit(`wikiLinkEmbedBang`),s):n(t)}function s(t){return t===N7?(e.enter(`wikiLinkMarker`),e.consume(t),c):n(t)}function c(t){return t===N7?(e.consume(t),e.exit(`wikiLinkMarker`),e.enter(`wikiLinkTarget`),l):n(t)}function l(t){return t===null||t===-5||t===-4||t===-3||t===N7?n(t):t===P7?r===0?n(t):(e.exit(`wikiLinkTarget`),f(t)):t===I7?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAnchor`),u):t===F7?r===0?n(t):(e.exit(`wikiLinkTarget`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),r++,l)}function u(t){return t===null||t===-5||t===-4||t===-3||t===N7?n(t):t===P7?i===0?n(t):(e.exit(`wikiLinkAnchor`),f(t)):t===F7?i===0?n(t):(e.exit(`wikiLinkAnchor`),e.enter(`wikiLinkSeparator`),e.consume(t),e.exit(`wikiLinkSeparator`),e.enter(`wikiLinkAlias`),d):(e.consume(t),i++,u)}function d(t){return t===null||t===-5||t===-4||t===-3||t===N7?n(t):t===P7?a===0?n(t):(e.exit(`wikiLinkAlias`),f(t)):(e.consume(t),a++,d)}function f(t){return t===P7?(e.enter(`wikiLinkMarker`),e.consume(t),p):n(t)}function p(r){return r===P7?(e.consume(r),e.exit(`wikiLinkMarker`),e.exit(`wikiLinkEmbed`),t):n(r)}}};function Cte(){return{text:{[N7]:xte,[M7]:Ste}}}function wte(e){this.enter({type:`wikiLink`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function Tte(e){this.enter({type:`wikiLinkEmbed`,value:``,data:{target:``,anchor:null,alias:null},children:[]},e)}function L7(e){return e.stack[e.stack.length-1]}function Ete(e){let t=L7(this),n=this.sliceSerialize(e);t.data.target=n.trim(),n!==t.data.target&&(t.data.sourceTarget=n)}function Dte(e){let t=L7(this),n=this.sliceSerialize(e),r=n.trim();t.data.anchor=r.length?r:null,t.data.anchor!==null&&n!==r&&(t.data.sourceAnchor=n)}function Ote(e){let t=L7(this),n=this.sliceSerialize(e),r=n.trim();t.data.alias=r.length?r:null,t.data.alias!==null&&n!==r&&(t.data.sourceAlias=n)}function R7(e){let{target:t,anchor:n,alias:r}=e.data,i=r||(n?`${t}#${n}`:t);e.value=i,e.children=[{type:`text`,value:i}]}function kte(e){R7(L7(this)),this.exit(e)}function Ate(e){R7(L7(this)),this.exit(e)}var z7={enter:{wikiLink:wte,wikiLinkEmbed:Tte},exit:{wikiLinkTarget:Ete,wikiLinkAnchor:Dte,wikiLinkAlias:Ote,wikiLink:kte,wikiLinkEmbed:Ate}};function B7(e,t){return typeof e==`string`&&e.trim()===t?e:t}var V7={handlers:{wikiLink:e=>{let t=e,n=t.data?.target??``,r=t.data?.anchor,i=t.data?.alias,a=`[[${B7(t.data?.sourceTarget,n)}`;return r&&(a+=`#${B7(t.data?.sourceAnchor,r)}`),i&&(a+=`|${B7(t.data?.sourceAlias,i)}`),`${a}]]`},wikiLinkEmbed:e=>{let t=e,n=t.data?.target??``,r=t.data?.anchor,i=t.data?.alias,a=`![[${n}`;return r&&(a+=`#${r}`),i&&(a+=`|${i}`),`${a}]]`}},unsafe:[{character:`[`,inConstruct:[`phrasing`]}]},H7=Cte();function U7(){let e=this.data();e.micromarkExtensions||=[],e.micromarkExtensions.some(e=>e===H7)||e.micromarkExtensions.push(H7),e.fromMarkdownExtensions||=[],e.fromMarkdownExtensions.some(e=>e===z7)||e.fromMarkdownExtensions.push(z7),e.toMarkdownExtensions||=[],e.toMarkdownExtensions.some(e=>e===V7)||e.toMarkdownExtensions.push(V7)}function jte(e){return e.children.some(e=>{let t=e.type;return t!==`yaml`&&t!==`toml`})?e:{...e,children:[...e.children,{type:`paragraph`,children:[]}]}}var Mte=[{name:`remark-parse`,plugin:FG},{name:`remark-mdx-agnostic`,plugin:D7},{name:`remark-gfm`,plugin:OU},{name:`remark-math`,plugin:XW,options:{singleDollarTextMath:!1}},{name:`remark-wiki-link`,plugin:U7},{name:`remark-github-alerts`,plugin:RW,options:m5},{name:`callout-transformer`,plugin:f5},{name:`restore-from-mdx`,plugin:z8},{name:`restore-entity-refs`,plugin:X8},{name:`restore-backslash-escapes`,plugin:e5},{name:`details-accordion-promoter`,plugin:V5},{name:`image-promoter`,plugin:Y5},{name:`indented-code-promoter`,plugin:t7},{name:`math-promoter`,plugin:r7},{name:`single-dollar-math-promoter`,plugin:k7},{name:`highlight-promoter`,plugin:J5},{name:`mermaid-promoter`,plugin:x7},{name:`comment-promoter`,plugin:x5},{name:`merged-post-parse-walker`,plugin:y7},{name:`ensure-non-empty-doc`,plugin:()=>jte}];function Nte(e){let t=LU();for(let e of Mte)t=`options`in e&&e.options!==void 0?t.use(e.plugin,e.options):t.use(e.plugin);return t=t.use(lW,{schema:e.schema,handlers:e.handlers}),t.freeze(),t}function Pte(e){let t=LU().use(PW,[`yaml`]).use(OU,{tablePipeAlign:!1}).use(XW,{singleDollarTextMath:!1}).use(D7).use(U7).use(j7).use(kU,{bullet:`-`,fences:!0,rule:`-`,join:[C7],...e.toMarkdownHandlers?{handlers:e.toMarkdownHandlers}:{}});return t.freeze(),t}function W7(e){return e.charCodeAt(0)===65279?{source:e.slice(1),hadBom:!0}:{source:e,hadBom:!1}}var G7=3,K7=/^\n+$/,q7=/^\n{2,}$/;function J7(e,t,n){let r,i,a,o=e.children;if(o.length>0){let e=o[0]?.position?.start?.offset;if(typeof e==`number`&&e>0){let n=t.slice(0,e);K7.test(n)&&(r=n)}let n=o[o.length-1]?.position?.end?.offset;if(typeof n==`number`&&n<=t.length){let e=t.slice(n);q7.test(e)&&(i=e)}let s=[],c=!1;for(let e=1;e<o.length;e++){let n=o[e-1]?.position?.end?.offset,r=o[e]?.position?.start?.offset,i=null;if(typeof n==`number`&&typeof r==`number`&&r>=n){let e=t.slice(n,r);RegExp(`^\\n{${G7},}$`).test(e)&&(i=e.length-1,c=!0)}s.push(i)}c&&(a=s)}if(!n&&r===void 0&&i===void 0&&!a)return;let s={...n?{bom:!0}:{},...r===void 0?{}:{leading:r},...i===void 0?{}:{trailing:i},...a?{gapBlankLines:a}:{}};return e.data??={},e.data.sourceDocBoundary=s,s}function Fte(e){if(typeof e!=`object`||!e)return;let t=e,n={};return t.bom===!0&&(n.bom=!0),typeof t.leading==`string`&&K7.test(t.leading)&&(n.leading=t.leading),typeof t.trailing==`string`&&q7.test(t.trailing)&&(n.trailing=t.trailing),Array.isArray(t.gapBlankLines)&&t.gapBlankLines.every(e=>e===null||typeof e==`number`&&Number.isInteger(e)&&e>=G7-1)&&(n.gapBlankLines=t.gapBlankLines),n.bom||n.leading||n.trailing||n.gapBlankLines?n:void 0}function Ite(e,t){let{source:n,hadBom:r}=W7(e),i=new OP(q8(L8($8(n)))),a=t.parse(i);i.value=n;let o=t.runSync(a,i),s=J7(o,n,r),c=t.stringify(o);return s?c.type.create({...c.attrs,sourceDocBoundary:s},c.content,c.marks):c}function Lte(e,t){let{source:n,hadBom:r}=W7(e),i=new OP(q8(L8($8(n)))),a=t.parse(i);i.value=n;let o=t.runSync(a,i);return J7(o,n,r),o}function Rte(e,t,n){let r=dW(e,{schema:n.schema,nodeHandlers:n.pmNodeHandlers,markHandlers:n.pmMarkHandlers}),i=Fte(e.attrs?.sourceDocBoundary),a=i?.gapBlankLines;if(a&&a.length===r.children.length-1)for(let e=1;e<r.children.length;e++){let t=a[e-1];if(typeof t==`number`){let n=r.children[e];n.data??={},n.data.sourcePrecedingBlankLines=t}}let o=String(t.stringify(r));return i?.leading&&(o=i.leading+o),i?.trailing&&(o=o.replace(/\n+$/,``)+i.trailing),i?.bom&&(o=`\uFEFF${o}`),o}function zte(){return!1}function Bte(e){let t=e.lastIndexOf(`/`);return t===-1?``:t===0?`/`:e.slice(0,t)}function Vte(e,t){let n=e?`${e}/${t}`:t,r=n.startsWith(`/`),i=[];for(let e of n.split(`/`))if(!(e===``||e===`.`)){if(e===`..`){let e=i[i.length-1];i.length>0&&e!==`..`?i.pop():r||i.push(`..`);continue}i.push(e)}let a=i.join(`/`);return r?`/${a}`:a}function Y7(e,t){if(typeof e!=`string`||e===``||!t||e.startsWith(`/`)||!B0(e))return e;let n=Vte(Bte(t),e);return n===``||n===`..`||n.startsWith(`../`)?(zte()&&console.warn(`[resolve-image-url] doc-relative path escapes contentDir; emitting raw URL: ${e} (from sourcePath ${t})`),e):`/${n}`}var Hte=Object.assign($te,{peek:()=>`$`}),Ute=Object.assign(ene,{peek:()=>`~`}),Wte=(()=>{for(let e of E7.extensions??[]){let t=e?.handlers?.mdxJsxFlowElement;if(typeof t==`function`)return t}throw Error(`mdast-util-mdx-jsx mdxJsxFlowElement to-markdown handler not found — the dirty MDX JSX serialize path cannot bind. Likely a breaking change in mdast-util-mdx-jsx (pinned in the root overrides); re-run the markdown-pipeline upgrade protocol (test:fidelity).`)})(),Gte={text(e,t,n,r){if(typeof e.data?.sourceRaw==`string`&&h2(e.data.sourceRaw,e.value??``))return e.data.sourceRaw;if(e.data?.escapedChars?.length){let t=e.value??``,i=e.data.escapedChars,a=``,o=0;for(let{offset:e,char:s}of i)e>o&&(a+=e9(n,t.slice(o,e),{...r,before:r.before+a,after:`\\`})),a+=`\\${s}`,o=e+1;return o<t.length&&(a+=e9(n,t.slice(o),{...r,before:r.before+a})),a}return e9(n,(e.value??``).replaceAll(`\xA0`,` `),r)},emphasis(e,t,n,r){let i=e.data?.sourceDelimiter??`*`,a=n.createTracker(r),o=n.enter(`emphasis`),s=a.move(i);return s+=r9(n.containerPhrasing(e,{before:s,after:i,...a.current()}),r,i),s+=a.move(i),o(),s},strong(e,t,n,r){let i=e.data?.sourceDelimiter??`**`,a=n.createTracker(r),o=n.enter(`strong`),s=a.move(i);return s+=r9(n.containerPhrasing(e,{before:s,after:i,...a.current()}),r,i),s+=a.move(i),o(),s},link(e,t,n,r){if(e.data?.sourceStyle===`autolink`)return`<${e.url??``}>`;if(e.data?.sourceStyle===`gfm-autolink`){let t=e.children?.length===1?e.children[0]:null;if(t?.type===`text`&&typeof t.value==`string`)return t.value}let i=n.createTracker(r),a=n.enter(`link`),o=n.enter(`label`),s=i.move(`[`);s+=i.move(n.containerPhrasing(e,{before:s,after:`](`,...i.current()})),s+=i.move(`](`),o();let c=n.enter(`destinationRaw`),l=String(e.url??``),u=e.data?.sourceUrlForm===`angle-bracketed`,d=l.startsWith(`<`)&&l.endsWith(`>`),f=u&&!d?`<${l}>`:$7(l);if(s+=i.move(f),c(),e.title){let t=e.data?.sourceTitleMarker??`double`;s+=i.move(Q7(e.title,t))}return s+=i.move(`)`),a(),s},image(e,t,n,r){let i=n.createTracker(r),a=n.enter(`image`),o=n.enter(`label`),s=i.move(`})),s+=i.move(`](`),o();let c=n.enter(`destinationRaw`);if(s+=i.move($7(String(e.url??``))),c(),e.title){let t=n.enter(`titleQuote`);s+=i.move(` "`),s+=i.move(n.safe(e.title,{before:s,after:`"`,...i.current()})),s+=i.move(`"`),t()}return s+=i.move(`)`),a(),s},definition(e,t,n,r){let i=e.data?.sourceLayout??`inline`,a=e.data?.sourceTitleMarker??`double`,o=n.enter(`definition`),s=n.createTracker(r),c=n.enter(`label`),l=s.move(`[`);l+=s.move(n.safe(n.associationId(e),{before:l,after:`]`,...s.current()})),l+=s.move(`]:`),c();let u=i===`multiline`?`
|
|
491
491
|
`:` `;l+=s.move(u);let d=String(e.url??``);if(!d||/[\0- ]/.test(d)){let e=n.enter(`destinationLiteral`);l+=s.move(`<`),l+=s.move(n.safe(d,{before:l,after:`>`,...s.current()})),l+=s.move(`>`),e()}else{let e=n.enter(`destinationRaw`);l+=s.move($7(d)),e()}if(e.title){let t=i===`multiline`?`
|
|
492
492
|
`:` `;l+=s.move(Q7(e.title,a,t))}return o(),l},thematicBreak(e){return e.data?.sourceRaw??`---`},break(e){return e.data?.sourceStyle===`backslash`?`\\
|
|
493
493
|
`:`
|
|
@@ -497,7 +497,7 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
|
|
|
497
497
|
`)}let n=e.data?.sourceFenceChar===`~`?`~`:"`",r=Math.max(3,e.data?.sourceFenceLength??3),i=RegExp(`^ {0,3}(\\${n}+)[ \\t]*$`);for(let e of t.split(`
|
|
498
498
|
`)){let t=i.exec(e);t&&t[1].length>=r&&(r=t[1].length+1)}let a=e.data?.sourceClosingFenceLength,o=typeof a==`number`&&a>r?a:r,s=e.data?.sourceFenceIndent,c=typeof s==`number`&&s>=1&&s<=3?` `.repeat(s):``,l=e.data?.sourceInfoPadding,u=n.repeat(r),d=e.lang??``,f=`${u}${d&&typeof l==`number`&&l>=1?` `.repeat(l):``}${d}${e.meta?` ${e.meta}`:``}\n${t}\n${n.repeat(o)}`;return c?f.split(`
|
|
499
499
|
`).map(e=>e.length>0?`${c}${e}`:e).join(`
|
|
500
|
-
`):f},inlineCode(e,t,n){let r=e.value??``,i=e.data?.sourceFenceChar===`~`?`~`:"`",a=typeof e.data?.sourceFenceLength==`number`&&e.data.sourceFenceLength>0?e.data.sourceFenceLength:1,o=i==="`"?"`":`~`,s=a;for(;RegExp(`(^|[^${o}])${o.repeat(s)}([^${o}]|$)`).test(r);)s+=1;let c=i.repeat(s);/[^ \r\n]/.test(r)&&(e.data?.sourcePadded===!0||/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||r.startsWith(i)||r.endsWith(i))&&(r=` ${r} `);let l=`${c}${r}${c}`;return n.stack.includes(`tableCell`)?l.replace(/\|/g,`\\$&`):l},inlineMath:
|
|
500
|
+
`):f},inlineCode(e,t,n){let r=e.value??``,i=e.data?.sourceFenceChar===`~`?`~`:"`",a=typeof e.data?.sourceFenceLength==`number`&&e.data.sourceFenceLength>0?e.data.sourceFenceLength:1,o=i==="`"?"`":`~`,s=a;for(;RegExp(`(^|[^${o}])${o.repeat(s)}([^${o}]|$)`).test(r);)s+=1;let c=i.repeat(s);/[^ \r\n]/.test(r)&&(e.data?.sourcePadded===!0||/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||r.startsWith(i)||r.endsWith(i))&&(r=` ${r} `);let l=`${c}${r}${c}`;return n.stack.includes(`tableCell`)?l.replace(/\|/g,`\\$&`):l},inlineMath:Hte,delete:Ute,heading(e,t,n,r){let i=e.data?.sourceStyle??`atx`,a=e.depth;if(i===`setext`&&(a===1||a===2)){let t=n.containerPhrasing(e,{...r,before:`
|
|
501
501
|
`,after:`
|
|
502
502
|
`}),i=e.data?.sourceUnderlineLength,o=typeof i==`number`&&i>=1?i:Math.max(t.length,3);return`${t}\n${(a===1?`=`:`-`).repeat(o)}`}let o=e.data?.sourceLeadingIndent,s=typeof o==`number`&&o>=1&&o<=3?` `.repeat(o):``,c=e.data?.sourceInteriorSpacing,l=typeof c==`number`&&c>=2?` `.repeat(c):` `,u=`#`.repeat(a),d=n.containerPhrasing(e,{...r,before:`${u} `,after:`
|
|
503
503
|
`}),f=e.data?.sourceTrailingHashes;if(typeof f==`number`&&f>0){let e=`#`.repeat(f);return d?`${s}${u}${l}${d} ${e}`:`${s}${u} ${e}`}return d?`${s}${u}${l}${d}`:`${s}${u}`},list(e,t,n,r){let i=n.options.bullet||`-`,a=!!e.ordered,o=n.bulletCurrent,s=n.bulletLastUsed;if(!a){let t=e.data?.bulletMarker;(t===`-`||t===`*`||t===`+`)&&(n.bulletCurrent=t)}let c=e.children||[],l=[],u=a?e.data?.listMarkerDelimiter??`.`:null,d=e.start??1;for(let t=0;t<c.length;t++){let o=c[t],s=o.data?.sourceOrdinal,f=typeof s==`number`&&s>=0?s:d+t,p=a?`${f}${u}`:e.data?.bulletMarker??i,m=o.data?.sourceMarkerSpacing,h=typeof m==`number`&&m>=2&&m<=4?m:1,g=` `.repeat(h),_=p;o.checked===!0?_+=`${g}[${o.data?.sourceCheckboxChar===`X`?`X`:`x`}]`:o.checked===!1&&(_+=`${g}[ ]`);let v=o.data?.sourceContinuationIndent,y=p.length+h,b=typeof v==`number`&&v>=y&&v<=y+3?v:y,x=` `.repeat(b),S=o.checked===null||o.checked===void 0?g:` `,C=n.containerFlow(o,r).split(`
|
|
@@ -506,5 +506,5 @@ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#pl
|
|
|
506
506
|
|
|
507
507
|
`:`
|
|
508
508
|
`;return l.join(f)},table(e,t,n,r){let i=n.enter(`table`),a=[],o=[],s=e.children??[];for(let e of s){let t=e.children??[],i=[],s=[];for(let e of t){let t=n.enter(`tableCell`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,{...r,before:` `,after:` `});a(),t(),i.push(o);let c=e.data?.sourcePadding;s.push(c&&typeof c.left==`number`&&typeof c.right==`number`?{left:c.left,right:c.right}:null)}a.push(i),o.push(s)}i();let c=e.align??[],l=e.data?.sourceDashCounts,u=a[0]?.length??0,d=a.slice(1).reduce((e,t)=>Math.max(e,t.length),0),f=Math.max(u,d,c.length),p=[];for(let e=0;e<f;e++){let t=c[e],n=``,r=``;t===`center`?(n=`:`,r=`:`):t===`left`?n=`:`:t===`right`&&(r=`:`);let i=l?.[e],a=typeof i==`number`&&i>=1?i:1;p.push(n+`-`.repeat(a)+r)}let m=(e,t)=>{let n=[];for(let r=0;r<f;r++){let i=e[r]??``,a=t[r]??{left:1,right:1};n.push(` `.repeat(a.left)+i+` `.repeat(a.right))}let r=v&&!v.leading?``:`|`,i=v&&!v.trailing?``:`|`;return`${r}${n.join(`|`)}${i}`},h=e.data?.sourceAlignmentPadding,g=Array.from({length:f},(e,t)=>{let n=h?.[t];return n&&typeof n.left==`number`&&typeof n.right==`number`?n:null}),_=e.data?.sourceOuterPipes,v=_&&f>=2&&a.every(e=>{let t=(e[0]??``).trim(),n=(e[f-1]??``).trim();return(_.leading||t.length>0)&&(_.trailing||n.length>0&&!n.endsWith(`\\`))})?_:null;if(a.length===0)return m(p,g);let y=[];y.push(m(a[0],o[0]??[])),y.push(m(p,g));for(let e=1;e<a.length;e++)y.push(m(a[e],o[e]??[]));return y.join(`
|
|
509
|
-
`)},mdxJsxFlowElement(e,t,n,r){let i=e,a=i.data?.sourceRaw;if(typeof a==`string`)return a;let o=i.data?.htmlBoundary;if(o&&typeof o.opener==`string`&&typeof o.closer==`string`){let e=n.containerFlow({type:`root`,children:i.children??[]},r);return`${o.opener}\n\n${e}\n\n${o.closer}`}let s=i.name??``,c=X7(i.attributes??[]);return!i.children||i.children.length===0?s?c?`<${s} ${c} />`:`<${s} />`:``:
|
|
510
|
-
`||e[r]===`\r`;let i=n.after.charCodeAt(0);return Number.isNaN(i)||i===10||i===13}function Zte(e,t){let n=``,r=0;for(;r<e.length;){let i=e.charAt(r);if(i===`\\`){n+=e.slice(r,r+2),r+=2;continue}if(i===`*`||i===`_`||i===`~`||i===`=`){let a=r+1;for(;a<e.length&&e.charAt(a)===i;)a++;let o=r===0?t.before.charCodeAt(t.before.length-1):e.charCodeAt(r-1);if(i===`=`)n+=(Number.isNaN(o)||o===10||o===13)&&Xte(e,a,t)?`\\${e.slice(r,a)}`:e.slice(r,a);else{let s=a<e.length?e.charCodeAt(a):t.after.charCodeAt(0);n+=Yte(i,o,s)?`\\${i}`.repeat(a-r):e.slice(r,a)}r=a;continue}n+=i,r+=1}return n}function r9(e,t,n){let r=n.startsWith(`_`)?`_`:`*`,i=e,a=i.charCodeAt(0);i9(t.before.charCodeAt(t.before.length-1),a,r)&&(i=a9(a)+i.slice(1));let o=i.charCodeAt(i.length-1);return i9(t.after.charCodeAt(0),o,r)&&(i=i.slice(0,-1)+a9(o)),i}function i9(e,t,n){return!(yz(t)!==t9||n===`_`&&yz(e)===void 0)}function a9(e){return`&#x${e.toString(16).toUpperCase()};`}function Qte(e,t,n,r){let i=e.value??``,a=e.data?.sourceDelimiter,o=typeof a==`string`&&/^\$+$/.test(a)?a.length:2;for(o===1&&!ene(i,r)&&(o=2);RegExp(`(^|[^$])${`\\$`.repeat(o)}([^$]|$)`).test(i);)o++;let s=`$`.repeat(o);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` ${i} `);let c=-1;for(;++c<n.unsafe.length;){let e=n.unsafe[c];if(!e.atBreak)continue;let t=n.compilePattern(e),r;for(;(r=t.exec(i))!==null;){let e=r.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=`${i.slice(0,e)} ${i.slice(r.index+1)}`}}return s+i+s}function $te(e,t,n,r){let i=e.data?.sourceDelimiter===`~`?`~`:`~~`,a=n.createTracker(r),o=n.enter(`strikethrough`),s=a.move(i);return s+=n.containerPhrasing(e,{...a.current(),before:s,after:`~`}),s+=a.move(i),o(),s}function ene(e,t){return!(e.length===0||!/^\S/.test(e)||!/\S$/.test(e)||/[$\r\n]/.test(e)||e.endsWith(`\\`)||/\\[!-/:-@[-`{-~]/.test(e)||/^\d/.test(t.after)||t.before.endsWith(`\\`))}function o9(e){if(!Number.isFinite(e)||e<0)return``;if(e<1024)return`${e} B`;let t=[`KiB`,`MiB`,`GiB`,`TiB`],n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(1).replace(/\.0$/,``)} ${t[r]}`}var tne=class{schema;handlers;pmNodeHandlers;pmMarkHandlers;parseProcessor;serializeProcessor;parseCtx={current:{}};constructor(e){this.schema=Mb(e.extensions),this.handlers=sne(this.schema,this.parseCtx);let{nodeHandlers:t,markHandlers:n}=cne(this.schema);this.pmNodeHandlers=t,this.pmMarkHandlers=n,this.parseProcessor=Mte({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers}),this.serializeProcessor=Nte({toMarkdownHandlers:Wte})}parse(e,t){if(!e.trim())return{type:`doc`,content:[{type:`paragraph`,content:[]}]};this.parseCtx.current=t??{};try{return Fte(e,this.parseProcessor).toJSON()}finally{this.parseCtx.current={}}}parseToMdast(e){return e.trim()?Ite(e,this.parseProcessor):{type:`root`,children:[]}}parseWithFallback(e,t){return e.trim()?$6(e,{parse:e=>this.parse(e,t)}):{type:`doc`,content:[{type:`paragraph`,content:[]}]}}serialize(e){let t;try{t=this.schema.nodeFromJSON(e)}catch(t){let n=`MarkdownManager.serialize() failed: schema rejected JSONContent (type=${e.type}, childCount=${e.content?.length??0})`;throw Error(n,{cause:t})}return Lte(t,this.serializeProcessor,{schema:this.schema,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers})}},s9=A6();function nne(e,t){let n=new Map;for(let e of t)n.set(e.name,e);let r={};for(let t of e){if(t.type===`mdxJsxExpressionAttribute`)continue;let e=t.name,i=n.get(e);if(t.value===null||t.value===void 0){r[e]=!0;continue}if(typeof t.value==`string`){if(i?.type===`number`){let n=Number(t.value);r[e]=Number.isNaN(n)?t.value:n}else i?.type===`boolean`?r[e]=t.value===`true`:r[e]=t.value;continue}let a=t.value.value;try{r[e]=JSON.parse(a)}catch{r[e]=a}}return r}function rne(e){let t=!1;return e.descendants(e=>t||e.type.name===`jsxInline`?!1:e.type.name===`jsxComponent`&&e.attrs.sourceDirty?(t=!0,!1):!0),t}function ine(e){return e.attrs.sourceDirty||rne(e)}function ane(e){if(e.type!==`paragraph`)return!1;let t=e.children??[];return t.length===0?!0:t.every(e=>e.type===`text`&&e.value===``)}function c9(e,t){if(!t)return e;let n={};return t.sourceFenceChar&&(n.sourceFenceChar=t.sourceFenceChar),typeof t.sourceFenceLength==`number`&&(n.sourceFenceLength=t.sourceFenceLength),t.sourcePadded===!0&&(n.sourcePadded=!0),Object.keys(n).length===0?e:{...e,data:n}}function l9(e,t){if(e.length===0)return c9({type:`inlineCode`,value:``},t);if(e.every(e=>e.type===`text`))return c9({type:`inlineCode`,value:e.map(e=>e.value).join(``)},t);if(e.length===1&&`children`in e[0]){let n=e[0];return{...n,children:[l9(n.children,t)]}}return c9({type:`inlineCode`,value:u9(e)},t)}function u9(e){let t=``;for(let n of e)n.type===`text`?t+=n.value:`children`in n&&Array.isArray(n.children)?t+=u9(n.children):`value`in n&&typeof n.value==`string`&&(t+=n.value);return t}var one=Z1;function sne(e,t){let n=e.nodes,r=e.marks,i={};n.paragraph&&(i.paragraph=(e,t,r)=>{let i=r.all(e).flat(),a=i.some(e=>e?.isBlock&&!e?.isInline),o=i.some(e=>e?.isInline||e?.isText||e?.isTextblock);if(a&&!o)return i.length===1?i[0]:i;if(a&&o){let e=i.filter(e=>!e?.isBlock||e?.isInline),t=i.filter(e=>e?.isBlock&&!e?.isInline),r=[],a=n.paragraph.createAndFill(null,e.length>0?e:null);return a&&r.push(a),r.push(...t),r.length===1?r[0]:r}return n.paragraph.createAndFill(null,i.length>0?i:null)}),n.blockquote&&(i.blockquote=sW(n.blockquote,e=>({sourceMarkerSpacings:e.data?.sourceMarkerSpacings??null}))),n.tableCell&&(i.tableCell=(e=>(t,r,i)=>{let a=i.all(t).flat();if(a.length>0&&n.paragraph){let t=n.paragraph.create(null,a);return e.createAndFill(null,[t])}return e.createAndFill(null,null)})(n.tableCell)),n.tableRow&&(i.tableRow=sW(n.tableRow)),n.table&&n.tableRow&&n.tableCell&&(i.table=(e,t,r)=>{let i=e.align??[],a=e.children??[],o=[];for(let e=0;e<a.length;e++){let t=a[e];if(t.type!==`tableRow`)continue;let s=t.children??[],c=[];for(let t=0;t<s.length;t++){let a=s[t];if(a.type!==`tableCell`)continue;let o=r.all(a).flat(),l=o.length>0&&n.paragraph?[n.paragraph.create(null,o)]:null,u=i[t]??null,d=e===0&&n.tableHeader?n.tableHeader:n.tableCell,f=a.data?.sourcePadding??null,p=d.createAndFill({align:u,sourcePadding:f},l);p&&c.push(p)}let l=n.tableRow.createAndFill(null,c.length>0?c:null);l&&o.push(l)}let s=e.data?.sourceDashCounts??null,c=e.data?.sourceOuterPipes??null,l=e.data?.sourceAlignmentPadding??null;return n.table.createAndFill({sourceDashCounts:s,sourceOuterPipes:c,sourceAlignmentPadding:l},o.length>0?o:null)}),n.image&&(i.image=e=>{let r=e.url??``,i=Y7(r,t.current.sourcePath);return n.image.createAndFill({src:i,alt:e.alt??null,title:e.title??null,sourceUrl:i===r?null:r})},n.imageReference?i.imageReference=e=>n.imageReference.createAndFill({alt:e.alt??``,label:e.label??e.identifier??``,identifier:e.identifier??``,referenceType:e.referenceType??`shortcut`}):i.imageReference=e=>n.image.createAndFill({src:``,alt:e.alt??null,title:null})),r.escapeMark&&(i.text=t=>{let n=t.value??``,i=typeof t.data?.sourceRaw==`string`?t.data.sourceRaw:null;if(!n&&!i)return null;if(i){let t=n.replaceAll(`\xA0`,` `);return r.sourceLiteral?e.text(t,[r.sourceLiteral.create({sourceRaw:i})]):e.text(t)}let a=t.data?.escapedChars,o=t.data?.entityRefSpans;if(!a?.length&&!o?.length)return e.text(n.replaceAll(`\xA0`,` `));let s=[...(a??[]).map(e=>({kind:`escape`,offset:e.offset,length:1})),...(o??[]).map(e=>({kind:`entity`,offset:e.offset,length:e.length,raw:e.raw}))];s.sort((e,t)=>e.offset-t.offset);let c=[];for(let e of s){let t=c[c.length-1];e.kind===`entity`&&t?.kind===`entity`&&t.offset+t.length===e.offset&&p2(t.raw)!==null&&u2(e.raw)?c[c.length-1]={kind:`entity`,offset:t.offset,length:t.length+e.length,raw:t.raw+e.raw}:c.push(e)}let l=[],u=0;for(let t of c){if(t.offset>u){let r=n.slice(u,t.offset).replaceAll(`\xA0`,` `);r&&l.push(e.text(r))}if(t.offset<n.length){let i=n.slice(t.offset,t.offset+t.length).replaceAll(`\xA0`,` `);if(i)if(t.kind===`escape`)l.push(e.text(i,[r.escapeMark.create()]));else if(r.sourceLiteral){let n=p2(t.raw);l.push(e.text(n??i,[r.sourceLiteral.create({sourceRaw:t.raw})]))}else l.push(e.text(i));u=t.offset+t.length}}if(u<n.length){let t=n.slice(u).replaceAll(`\xA0`,` `);t&&l.push(e.text(t))}return l.length===1?l[0]:l}),r.code&&(i.inlineCode=t=>e.text(t.value,[r.code.create({sourceFenceChar:t.data?.sourceFenceChar??"`",sourceFenceLength:typeof t.data?.sourceFenceLength==`number`?t.data.sourceFenceLength:1,sourcePadded:t.data?.sourcePadded===!0})]));let a=r.strike??r.delete;if(a&&(i.delete=cW(a,e=>({sourceDelimiter:e.data?.sourceDelimiter===`~`?`~`:`~~`}))),r.highlight&&(i.mark=cW(r.highlight)),r.comment&&(i.comment=cW(r.comment,e=>({sourceForm:e.data?.sourceForm??`percent`}))),n.commentBlock&&(i.commentBlock=sW(n.commentBlock,e=>({sourceForm:e.data?.sourceForm??`percent`,sourceLayout:e.data?.sourceLayout??`block`}))),r.emphasis&&(i.emphasis=cW(r.emphasis,e=>({sourceDelimiter:e.data?.sourceDelimiter??`*`}))),r.strong&&(i.strong=cW(r.strong,e=>({sourceDelimiter:e.data?.sourceDelimiter??`**`}))),n.heading&&(i.heading=sW(n.heading,e=>({level:e.depth,headingStyle:e.data?.sourceStyle??`atx`,sourceTrailingHashes:e.data?.sourceTrailingHashes??null,sourceUnderlineLength:e.data?.sourceUnderlineLength??null,sourceContiguousNext:e.data?.sourceContiguousNext??!1,sourceLeadingIndent:e.data?.sourceLeadingIndent??null,sourceInteriorSpacing:e.data?.sourceInteriorSpacing??null}))),n.codeBlock&&(i.code=t=>{let r=t.value?[e.text(t.value)]:[];return n.codeBlock.createAndFill({language:t.lang??null,meta:t.meta??null,fenceDelimiter:t.data?.sourceFenceChar??"`",fenceLength:t.data?.sourceFenceLength??3,sourceStyle:t.data?.sourceStyle??`fenced`,sourceClosingFenceLength:t.data?.sourceClosingFenceLength??null,sourceFenceIndent:t.data?.sourceFenceIndent??null,sourceInfoPadding:t.data?.sourceInfoPadding??null,sourceIndents:t.data?.sourceIndents??null},r)}),n.thematicBreak&&(i.thematicBreak=e=>n.thematicBreak.createAndFill({sourceRaw:e.data?.sourceRaw??`---`})),n.hardBreak&&(i.break=e=>n.hardBreak.createAndFill({hardBreakStyle:e.data?.sourceStyle??`spaces`})),n.list&&(i.list=sW(n.list,e=>({ordered:!!e.ordered,start:e.start??1,spread:!!e.spread,bulletMarker:e.data?.bulletMarker??null,listMarkerDelimiter:e.data?.listMarkerDelimiter??null}))),n.listItem&&(i.listItem=sW(n.listItem,e=>({checked:e.checked??null,spread:!!e.spread,sourceMarkerSpacing:e.data?.sourceMarkerSpacing??null,sourceOrdinal:e.data?.sourceOrdinal??null,sourceCheckboxChar:e.data?.sourceCheckboxChar??null,sourceContinuationIndent:e.data?.sourceContinuationIndent??null}))),r.link){let t=r.sourceLiteral;i.link=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[](${n.url??``})`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:n.url??``,title:n.title??null,linkStyle:n.data?.sourceStyle??`inline`,refLabel:null,sourceUrlForm:n.data?.sourceUrlForm??null,sourceTitleMarker:n.data?.sourceTitleMarker??null});return o.map(e=>e.mark(s.addToSet(e.marks)))},i.linkReference=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[${n.label??``}][${n.identifier??``}]`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:``,title:null,linkStyle:n.referenceType??`shortcut`,refLabel:n.label??n.identifier??null});return o.map(e=>e.mark(s.addToSet(e.marks)))}}n.htmlBlock&&(i.html=e=>n.htmlBlock.createAndFill({content:e.value??``}));let o=n.linkDefinition??n.linkRefDef;if(o){let e=!!o.spec.attrs?.url,t=!!o.spec.attrs?.href,n=!!o.spec.attrs?.identifier,r=!!o.spec.attrs?.sourceLayout,a=!!o.spec.attrs?.sourceTitleMarker;i.definition=i=>{let s={title:i.title??null};return n&&(s.identifier=i.identifier??``),s.label=i.label??i.identifier??``,e?s.url=i.url??``:t&&(s.href=i.url??``),r&&(s.sourceLayout=i.data?.sourceLayout??null),a&&(s.sourceTitleMarker=i.data?.sourceTitleMarker??null),o.createAndFill(s)}}if(n.jsxComponent){let r=e=>{if(e&&typeof e==`object`&&`sourceRaw`in e){let t=e.sourceRaw;if(typeof t==`string`)return t}};i.mdxJsxFlowElement=(e,i,a)=>{let o=e.name??``,s=s9.getOrWildcard(o),c=nne(e.attributes,s.props);if(o===`CommonMarkImage`&&typeof c.src==`string`){let e=c.src,n=Y7(e,t.current.sourcePath);n!==e&&(c.src=n,c.sourceUrl=e)}let l=a.all(e).flat();return n.jsxComponent.createAndFill({componentName:o,kind:`element`,attributes:e.attributes,sourceRaw:r(e.data)??``,sourceDirty:!1,props:c},l.length?l:void 0)};let a=(e,t)=>{let n=e.attributes?.find(e=>e.type===`mdxJsxAttribute`&&e.name===t);return n&&typeof n.value==`string`?n.value:null};i.mdxJsxTextElement=t=>{if(t.name===`InlineMath`&&n.mathInline){let e=a(t,`formula`)??``,r=a(t,`id`);return n.mathInline.create({formula:e,id:r??null})}if(t.name===`Tag`&&n.tag){let e=a(t,`value`)??``;return n.tag.create({value:e})}if(n.jsxInline){let i=r(t.data)??``;return n.jsxInline.createAndFill({},i?[e.text(i)]:null)}return n.jsxComponent.createAndFill({sourceRaw:r(t.data)??``})},i.mdxFlowExpression=e=>{let t=r(e.data)??`{${e.value??``}}`;return n.jsxComponent.createAndFill({kind:`expression`,sourceRaw:t,sourceDirty:!1})},i.mdxTextExpression=t=>{let n=r(t.data)??`{${t.value??``}}`;return e.text(n)}}return n.wikiLink&&(i.wikiLink=e=>n.wikiLink.createAndFill({target:e.data?.target??``,alias:e.data?.alias??null,anchor:e.data?.anchor??null,sourceTarget:e.data?.sourceTarget??null,sourceAnchor:e.data?.sourceAnchor??null,sourceAlias:e.data?.sourceAlias??null})),n.tag&&(i.tag=e=>n.tag.createAndFill({value:e.value})),n.wikiLinkEmbed&&(i.wikiLinkEmbed=(i,a)=>{let o=i.data?.target??``,s=i.data?.alias??null,c=i.data?.anchor??null,l=A2(o),{resolveEmbed:u,sourcePath:d}=t.current,f=u&&d?u(o,d)??null:null,p=f?`/${f}`:o,m=a?.type===`paragraph`&&Array.isArray(a.children)&&a.children.length===1;if(m&&one.has(l)&&n.jsxComponent&&s9.has(`WikiEmbedImage`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedImage`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,alt:s??o,target:o,anchor:c,alias:s}});if(m&&Q1.has(l)&&n.jsxComponent&&s9.has(`WikiEmbedVideo`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedVideo`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,title:s??o,target:o,anchor:c,alias:s}});if(m&&e0.has(l)&&n.jsxComponent&&s9.has(`WikiEmbedAudio`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedAudio`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,title:s??o,target:o,anchor:c,alias:s}});if(m&&t0.has(l)&&n.jsxComponent&&s9.has(`WikiEmbedFile`)){let{resolveSize:e}=t.current,r=e&&d?e(o,d)??null:null,i=r===null?null:o9(r);return n.jsxComponent.createAndFill({componentName:`WikiEmbedFile`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,target:o,anchor:c,alias:s,size:i}})}let h=s||(c?`${o}#${c}`:o);if(r.link){let t=r.link.create({href:p,title:null,linkStyle:`inline`,refLabel:null,sourceForm:`wikiembed`,target:o,anchor:c,alias:s});return e.text(h,[t])}throw Error("[wikiLinkEmbed handler] schema lacks `link` mark — cannot dispatch without violating the STOP rule against emitting PM wikiLinkEmbed server-side")}),n.mathInline&&(i.inlineMath=e=>n.mathInline.create({formula:e.value??``,sourceDelimiter:e.data?.sourceDelimiter??null})),i.math||=t=>{let r=t.value==null?`«unknown:${t.type}»`:t.value;return n.rawMdxFallback?(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled block mdast: ${t.type}`})),n.rawMdxFallback.createAndFill({reason:`Unhandled block mdast: ${t.type}`},r?[e.text(r)]:null)):null},i.inlineMath||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled inline mdast: ${t.type}`})),t.value==null?e.text(`«unknown:${t.type}»`):e.text(t.value)),n.footnoteReference?i.footnoteReference=e=>n.footnoteReference.create({identifier:e.identifier,label:e.label??e.identifier}):i.footnoteReference||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteReference`,reason:`FootnoteReference extension missing — recovering [^id] source`})),e.text(`[^${t.label??t.identifier}]`)),n.footnoteDefinition?i.footnoteDefinition=sW(n.footnoteDefinition,e=>{let t=e;return{identifier:t.identifier,label:t.label??t.identifier}}):i.footnoteDefinition||=t=>{console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteDefinition`,reason:`FootnoteDefinition extension missing — recovering [^id]: marker`}));let r=`[^${t.label??t.identifier}]: `;return n.paragraph?n.paragraph.create(null,e.text(r)):null},i.rawMdxFallbackMdast=t=>{if(!n.rawMdxFallback)return null;let r=t.position?{start:t.position.start?.offset??0,end:t.position.end?.offset??0}:{start:0,end:0};return console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.originalType,reason:`Unhandled mdast: ${t.originalType}`,unresolvedPosition:t.unresolvedPosition??!1})),n.rawMdxFallback.createAndFill({reason:`Unhandled mdast: ${t.originalType}`,originalSpan:r},t.value?[e.text(t.value)]:null)},i}function cne(e){let t={},n={},r=e.nodes,i=e.marks;r.paragraph&&(t.paragraph=pW(`paragraph`)),r.blockquote&&(t.blockquote=pW(`blockquote`,e=>{let t=e.attrs.sourceMarkerSpacings,n={};return Array.isArray(t)&&t.length>0&&(n.sourceMarkerSpacings=t),Object.keys(n).length>0?{data:n}:{}})),r.heading&&(t.heading=pW(`heading`,e=>({depth:e.attrs.level,data:{sourceStyle:e.attrs.headingStyle,sourceTrailingHashes:e.attrs.sourceTrailingHashes??void 0,sourceUnderlineLength:e.attrs.sourceUnderlineLength??void 0,sourceContiguousNext:e.attrs.sourceContiguousNext===!0?!0:void 0,sourceLeadingIndent:e.attrs.sourceLeadingIndent??void 0,sourceInteriorSpacing:e.attrs.sourceInteriorSpacing??void 0}}))),r.codeBlock&&(t.codeBlock=e=>{let t=e.attrs.sourceStyle===`indented`?`indented`:`fenced`;return{type:`code`,lang:t===`indented`?null:e.attrs.language??null,meta:t===`indented`?null:e.attrs.meta??null,value:e.textContent??``,data:{sourceFenceChar:e.attrs.fenceDelimiter,sourceFenceLength:e.attrs.fenceLength,sourceStyle:t,sourceClosingFenceLength:e.attrs.sourceClosingFenceLength??void 0,sourceFenceIndent:e.attrs.sourceFenceIndent??void 0,sourceInfoPadding:e.attrs.sourceInfoPadding??void 0,sourceIndents:e.attrs.sourceIndents??void 0}}}),r.thematicBreak&&(t.thematicBreak=e=>({type:`thematicBreak`,data:{sourceRaw:e.attrs.sourceRaw}})),r.hardBreak&&(t.hardBreak=e=>({type:`break`,data:{sourceStyle:e.attrs.hardBreakStyle}})),r.list&&(t.list=pW(`list`,e=>({ordered:e.attrs.ordered??!1,start:e.attrs.ordered?e.attrs.start??1:null,spread:e.attrs.spread??!1,data:{bulletMarker:e.attrs.bulletMarker,listMarkerDelimiter:e.attrs.listMarkerDelimiter}}))),r.listItem&&(t.listItem=(e,t,n)=>{let r=n.all(e),i=r.length>1&&ane(r[0])?r.slice(1):r,a={};return typeof e.attrs.sourceMarkerSpacing==`number`&&(a.sourceMarkerSpacing=e.attrs.sourceMarkerSpacing),typeof e.attrs.sourceOrdinal==`number`&&(a.sourceOrdinal=e.attrs.sourceOrdinal),e.attrs.sourceCheckboxChar===`X`&&(a.sourceCheckboxChar=`X`),typeof e.attrs.sourceContinuationIndent==`number`&&(a.sourceContinuationIndent=e.attrs.sourceContinuationIndent),{type:`listItem`,checked:e.attrs.checked??null,spread:e.attrs.spread??!1,...Object.keys(a).length>0?{data:a}:{},children:i}}),r.table&&(t.table=(e,t,n)=>{let r=n.all(e),i=[],a=e.firstChild;a&&a.forEach(e=>{let t=e.attrs.align;i.push(t===`left`||t===`right`||t===`center`?t:null)});let o=r.filter(e=>e.type===`tableRow`),s=e.attrs.sourceDashCounts,c={};Array.isArray(s)&&s.length>0&&(c.sourceDashCounts=s);let l=e.attrs.sourceOuterPipes;typeof l==`object`&&l&&typeof l.leading==`boolean`&&typeof l.trailing==`boolean`&&(c.sourceOuterPipes=l);let u=e.attrs.sourceAlignmentPadding;Array.isArray(u)&&u.length>0&&(c.sourceAlignmentPadding=u);let d=Object.keys(c).length>0?c:void 0,f={type:`table`,align:i,children:o};return d&&(f.data=d),f}),r.tableRow&&(t.tableRow=pW(`tableRow`));let a=e=>{let t=e.attrs.sourcePadding,n={};return typeof t==`object`&&t&&typeof t.left==`number`&&typeof t.right==`number`&&(n.sourcePadding=t),Object.keys(n).length>0?{data:n}:{}};if(r.tableCell&&(t.tableCell=pW(`tableCell`,a)),r.tableHeader&&(t.tableHeader=pW(`tableCell`,a)),r.image&&(t.image=e=>({type:`image`,url:e.attrs.sourceUrl??e.attrs.src,alt:e.attrs.alt,title:e.attrs.title})),r.imageReference&&(t.imageReference=e=>{let t=e.attrs.label??``,n=e.attrs.identifier??t;return{type:`imageReference`,alt:e.attrs.alt??``,identifier:n,label:t||n,referenceType:e.attrs.referenceType??`shortcut`}}),r.htmlBlock&&(t.htmlBlock=e=>({type:`html`,value:e.attrs.content})),r.linkDefinition??r.linkRefDef){let e=r.linkDefinition?`linkDefinition`:`linkRefDef`;t[e]=e=>{let t={},n=e.attrs.sourceLayout;(n===`multiline`||n===`inline`)&&(t.sourceLayout=n);let r=e.attrs.sourceTitleMarker;(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r);let i={type:`definition`,identifier:e.attrs.identifier??e.attrs.label??``,label:e.attrs.label??e.attrs.identifier??``,url:e.attrs.url??e.attrs.href??``,title:e.attrs.title};return Object.keys(t).length>0&&(i.data=t),i}}if(r.jsxComponent&&(t.jsxComponent=(e,t,n)=>{if(e.attrs.kind===`expression`)return{type:`html`,value:e.attrs.sourceRaw??``};let r=e.attrs.componentName||null,i=Array.isArray(e.attrs.attributes)?e.attrs.attributes:[];return!ine(e)&&e.attrs.sourceRaw?{type:`mdxJsxFlowElement`,name:r,attributes:i,children:[],data:{sourceRaw:String(e.attrs.sourceRaw)}}:s9.getOrWildcard(r??`*`).serialize(e,{all:e=>n.all(e),registry:s9,serializeChildren:()=>{throw Error(`SerializeContext.serializeChildren is not available in the PM→mdast handler. Compat descriptors that need markdown-byte body rendering must emit a marker mdast node and let the to-markdown handler render the body via state.containerFlow.`)}})}),r.rawMdxFallback&&(t.rawMdxFallback=e=>{let t=e.textContent??``,n=typeof e.attrs.reason==`string`?e.attrs.reason:``,r=e.attrs.originalSpan;return{type:`rawMdxFallback`,value:t,data:{reason:n,originalSpan:r&&typeof r==`object`&&`start`in r&&`end`in r?{start:Number(r.start)||0,end:Number(r.end)||0}:{start:0,end:0}}}}),r.jsxInline&&(t.jsxInline=e=>{let t=e.attrs.sourceRaw||e.textContent||``;return{type:`mdxJsxTextElement`,name:null,attributes:[],children:[],data:{sourceRaw:String(t)}}}),r.mathInline&&(t.mathInline=e=>{let t=e.attrs.formula??``,n=e.attrs.id;if(typeof n==`string`&&n.length>0)return{type:`mdxJsxTextElement`,name:`InlineMath`,attributes:[{type:`mdxJsxAttribute`,name:`formula`,value:t},{type:`mdxJsxAttribute`,name:`id`,value:n}],children:[]};let r=e.attrs.sourceDelimiter;return{type:`inlineMath`,value:t,...typeof r==`string`&&r.length>0?{data:{sourceDelimiter:r}}:{}}}),r.wikiLink&&(t.wikiLink=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLink`,value:i,data:{target:t,anchor:n,alias:r,sourceTarget:typeof e.attrs.sourceTarget==`string`?e.attrs.sourceTarget:null,sourceAnchor:typeof e.attrs.sourceAnchor==`string`?e.attrs.sourceAnchor:null,sourceAlias:typeof e.attrs.sourceAlias==`string`?e.attrs.sourceAlias:null},children:[{type:`text`,value:i}]}}),r.tag&&(t.tag=e=>({type:`tag`,value:String(e.attrs.value??``)})),r.wikiLinkEmbed&&(t.wikiLinkEmbed=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLinkEmbed`,value:i,data:{target:t,anchor:n,alias:r},children:[{type:`text`,value:i}]}}),i.emphasis&&(n.emphasis=mW(`emphasis`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),i.strong&&(n.strong=mW(`strong`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),i.code&&(n.code=(e,t,n)=>{let r=e.attrs.sourceFenceChar,i=e.attrs.sourceFenceLength;return l9(n,{sourceFenceChar:r,sourceFenceLength:i,sourcePadded:e.attrs.sourcePadded===!0?!0:void 0})}),i.strike??i.delete){let e=i.strike?`strike`:`delete`;n[e]=mW(`delete`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter===`~`?`~`:`~~`}}))}return i.highlight&&(n.highlight=mW(`mark`)),i.comment&&(n.comment=mW(`comment`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`}}))),r.commentBlock&&(t.commentBlock=pW(`commentBlock`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`,sourceLayout:e.attrs.sourceLayout===`inline`?`inline`:`block`}}))),r.footnoteReference&&(t.footnoteReference=e=>{let t=String(e.attrs.identifier??``);return{type:`footnoteReference`,identifier:t,label:e.attrs.label?String(e.attrs.label):t}}),r.footnoteDefinition&&(t.footnoteDefinition=pW(`footnoteDefinition`,e=>({identifier:String(e.attrs.identifier??``),label:e.attrs.label?String(e.attrs.label):String(e.attrs.identifier??``)}))),i.link&&(n.link=(e,t,n)=>{if(e.attrs.sourceForm===`wikiembed`){let t=typeof e.attrs.target==`string`&&e.attrs.target.length>0?e.attrs.target:e.attrs.href??``,r=typeof e.attrs.anchor==`string`&&e.attrs.anchor.length>0?e.attrs.anchor:null,i=typeof e.attrs.alias==`string`&&e.attrs.alias.length>0?e.attrs.alias:null,a=i||(r?`${t}#${r}`:t),o=n.map(e=>`value`in e&&typeof e.value==`string`?e.value:``).join(``);return o!==a&&o.trim().length>0&&!o.includes(`]]`)&&(i=o,a=o),{type:`wikiLinkEmbed`,value:a,data:{target:t,anchor:r,alias:i},children:[{type:`text`,value:a}]}}let r=e.attrs.linkStyle;if(r===`autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`autolink`}};if(r===`gfm-autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`gfm-autolink`}};if(r===`inline`||!r){let t={};e.attrs.sourceUrlForm===`angle-bracketed`&&(t.sourceUrlForm=`angle-bracketed`);let r=e.attrs.sourceTitleMarker;return(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r),{type:`link`,url:e.attrs.href??``,title:e.attrs.title??null,children:n,...Object.keys(t).length>0?{data:t}:{}}}return{type:`linkReference`,identifier:(e.attrs.refLabel??``).toLowerCase(),label:e.attrs.refLabel,referenceType:r,children:n}}),i.escapeMark&&(n.escapeMark=(e,t,n)=>{for(let e of n)if(e.type===`text`&&e.value){let t=e;t.data??={},t.data.escapedChars??=[];for(let e=0;e<t.value.length;e++)t.data.escapedChars.push({offset:e,char:t.value[e]})}return n.length===1?n[0]:n}),i.sourceLiteral&&(n.sourceLiteral=(e,t,n)=>{let r=typeof e.attrs.sourceRaw==`string`?e.attrs.sourceRaw:``;if(n.length===1&&n[0]?.type===`text`){let e=n[0],t=r||e.value;return h2(t,e.value)&&(e.data??={},e.data.sourceRaw=t),e}return{type:`text`,value:n.filter(e=>e.type===`text`).map(e=>e.value??``).join(``)||r}}),{nodeHandlers:t,markHandlers:n}}var lne=/\p{M}+/gu,une=/[^\p{L}\p{N}]+/gu,dne=/^-+|-+$/g;function d9(e){return e.trim().normalize(`NFKD`).replace(lne,``).toLowerCase().replace(une,`-`).replace(dne,``)}function fne(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function pne(e,t){let n=d9(e);return n?fne(n,t):``}function f9(e,t){let n=d9(e);return t?`#${n}-${d9(t)}`:`#${n}`}var p9=new Set([`img`,`video`,`audio`,`mark`]),mne=new Map(O6.flatMap(e=>e.surface===`compat`&&p9.has(e.rendersAs)?[[e.name,e]]:[]));function m9(e){let t={};for(let n of e.attributes){if(n.type!==`mdxJsxAttribute`)return null;let e=n.name.toLowerCase();if(!(e.length>=3&&e.startsWith(`on`)))if(n.value===null)t[n.name]=!0;else if(typeof n.value==`string`)t[n.name]=n.value;else return null}return t}function h9(e){let t=e.name;if(!t||!p9.has(t))return null;let n=m9(e);return n===null?null:{type:`element`,tagName:t,properties:n,children:[]}}function g9(e){let t=e.name;if(!t)return null;let n=mne.get(t);if(!n)return null;let r=m9(e);if(r===null)return null;let i=n.translateProps(r),a={};for(let[e,t]of Object.entries(i))(typeof t==`string`||typeof t==`boolean`)&&(a[e]=t);return{type:`element`,tagName:n.rendersAs,properties:a,children:[]}}var hne=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-link`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:f9(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},gne=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-embed`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:f9(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},_ne=(e,t)=>{let n=t,r=h9(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=g9(n);if(i){e.patch(t,i);let n=e.applyData(t,i);return n.tagName===`img`?{type:`element`,tagName:`p`,properties:{},children:[n]}:n}let a={type:`element`,tagName:`pre`,properties:{className:[`mdx-component`]},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]}]};return e.patch(t,a),e.applyData(t,a)},vne=(e,t)=>{let n=t,r=h9(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=g9(n);if(i)return e.patch(t,i),e.applyData(t,i);let a={type:`element`,tagName:`span`,properties:{className:[`mdx-inline`],dataJsxInline:``},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]};return e.patch(t,a),e.applyData(t,a)},yne=(e,t)=>{let n=t,r=n.data.reason||`unknown`,i=n.value||``,a=r.replace(/--/g,`—`),o={type:`comment`,value:` Parse error: ${a} `},s={type:`element`,tagName:`pre`,properties:{className:[`mdx-fallback`],dataRawMdxFallback:``,dataReason:a},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:i}]}]};return e.patch(t,s),[o,e.applyData(t,s)]},bne=(e,t)=>{let n={type:`element`,tagName:`mark`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)};function _9(e){if(typeof e!=`object`||!e)return``;let t=e;return typeof t.value==`string`?t.value:Array.isArray(t.children)?t.children.map(_9).join(``):``}var v9={wikiLink:hne,wikiLinkEmbed:gne,mdxJsxFlowElement:_ne,mdxJsxTextElement:vne,rawMdxFallback:yne,mark:bne,tag:(e,t)=>{let n=t.value,r={type:`element`,tagName:`a`,properties:{className:[`tag`],dataTag:n,href:`#tag/${n}`},children:[{type:`text`,value:`#${n}`}]};return e.patch(t,r),e.applyData(t,r)},comment:(e,t)=>{let n={type:`comment`,value:_9(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},commentBlock:(e,t)=>{let n={type:`comment`,value:_9(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`sup`,properties:{id:`fnref-${n}`,dataFootnoteRef:``,dataFootnoteId:n,className:[`footnote-ref`]},children:[{type:`element`,tagName:`a`,properties:{href:`#fn-${n}`,className:[`footnote-ref-link`]},children:[{type:`text`,value:`[${n}]`}]}]};return e.patch(t,r),e.applyData(t,r)},footnoteDefinition:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`aside`,properties:{id:`fn-${n}`,dataFootnoteDef:``,dataFootnoteId:n,className:[`footnote-def`]},children:[{type:`element`,tagName:`div`,properties:{className:[`footnote-body`]},children:e.all(t)},{type:`element`,tagName:`a`,properties:{href:`#fnref-${n}`,className:[`footnote-backref`],ariaLabel:`Back to reference`},children:[{type:`text`,value:`↩`}]}]};return e.patch(t,r),e.applyData(t,r)}},xne=/url\s*\(\s*['"]?\s*(?:javascript|vbscript|data)\s*:/i,Sne=/\bexpression\s*\(/i,Cne=1e4;function wne(e){return!(e.length>Cne||xne.test(e)||Sne.test(e))}function y9(e){for(let t of e.split(`,`)){let e=t.trim();if(e!==``&&!z0(e.split(/\s+/)[0]??``))return!1}return!0}var Tne={a:[`href`,`title`],img:[`src`,`alt`,`title`],video:[`src`,`title`],audio:[`src`,`title`],code:[`className`]},Ene=new Set([`href`,`src`]),Dne=bV(`<>`),b9=()=>e=>{JF(e,`element`,e=>{let t=Tne[e.tagName.toLowerCase()],n=e.properties;if(!(!t||!n))for(let e of t){let t=n[e];if(Array.isArray(t)){let r=t.map(e=>typeof e==`string`?K8(e):e);r.some((e,n)=>e!==t[n])&&(n[e]=r);continue}if(typeof t!=`string`)continue;let r;if(Ene.has(e))if(t===`<>`||t===Dne)r=``;else{let e=K8(t);r=e===t?t:bV(e)}else r=K8(t);r!==t&&(n[e]=r)}})},x9=()=>e=>{JF(e,`element`,e=>{let t=e.tagName.toLowerCase(),n=e.properties;if(!n)return;if(t===`a`||t===`area`||t===`link`||t===`base`){let e=n.href;typeof e==`string`&&!z0(e)&&delete n.href}if(t===`img`||t===`iframe`||t===`script`||t===`embed`||t===`source`||t===`audio`||t===`video`||t===`track`){let e=n.src;typeof e==`string`&&!z0(e)&&delete n.src}if(t===`form`){let e=n.action;typeof e==`string`&&!z0(e)&&delete n.action}if(t===`img`||t===`source`){let e=n.srcSet;typeof e==`string`&&!y9(e)&&delete n.srcSet;let t=n.srcset;typeof t==`string`&&!y9(t)&&delete n.srcset}if(t===`video`){let e=n.poster;typeof e==`string`&&!z0(e)&&delete n.poster}let r=n.style;typeof r==`string`&&!wne(r)&&delete n.style})};function One(e){let t=RU().use(cY,{handlers:v9}).use(b9).use(x9).use(xJ),n=t.runSync(e);return String(t.stringify(n))}function kne(e){let t=RU().use(IG).use(FW,[`yaml`]).use(D7).use(kU).use(U7).use(cY,{handlers:v9}).use(b9).use(x9).use(xJ);return String(t.processSync(e))}Cq(),IK(),LK(),A({docName:m4,summary:g4,content:E().optional(),...h4}).loose(),A({docName:m4,summary:g4,markdown:E(),position:j([`append`,`prepend`,`replace`]).optional(),extension:j([`.md`,`.mdx`]).optional(),...h4}).loose(),A({docName:m4,summary:g4,find:E().min(1),replace:E(),offset:D().int().nonnegative().optional(),...h4}).loose(),A({docName:m4,connectionId:E().min(1),scope:j([`last`,`session`,`file`]).optional(),...h4}).loose();var S9=A({value:E(),truncatedFrom:D().int().nonnegative().optional(),hint:E().optional()}).loose(),Ane=Ka(`kind`,[A({kind:M(`inline`),content:E()}),A({kind:M(`truncated`),byteLength:D().int().nonnegative(),hint:E()})]),C9=A({kind:M(`content-divergence`),intendedBytes:D().int().nonnegative(),actualBytes:D().int().nonnegative(),byteDelta:D().int(),divergenceType:E().optional(),currentState:Ane.optional(),hint:E().optional()}).loose(),jne=A({type:M(`orphan`),parentCandidates:k(E()),message:E()}).loose(),w9=A({kind:M(`disk-edit-reconciled`),intendedBytes:D().int().nonnegative(),actualBytes:D().int().nonnegative(),byteDelta:D().int(),mergeOutcome:E().optional(),hint:E().optional()}).loose(),T9=Ka(`kind`,[C9,w9]),E9=k(Ka(`kind`,[C9,w9,A({kind:M(`mermaid-parse-error`),fenceIndex:D().int().positive(),fenceFirstLine:E(),message:E(),line:D().int().positive().optional()}).loose()])).min(1);A({timestamp:E().min(1),summary:S9.optional(),warning:T9.optional(),warnings:E9.optional()}).loose(),A({timestamp:E().min(1),subscriberCount:D().int().nonnegative(),systemSubscriberCount:D().int().nonnegative(),hints:k(jne).optional(),summary:S9.optional(),warning:T9.optional(),warnings:E9.optional()}).loose(),A({timestamp:E().min(1),subscriberCount:D().int().nonnegative(),systemSubscriberCount:D().int().nonnegative(),summary:S9.optional(),warning:T9.optional(),warnings:E9.optional()}).loose(),A({docName:E().min(1),scope:j([`last`,`session`]),undone:O()}).loose(),A({docName:m4,patch:Xa(E(),Wa([t$,Fa()])),types:Xa(E(),j(QQ)).optional(),summary:g4,...h4}).loose(),A({timestamp:E().min(1),subscriberCount:D().int().nonnegative(),systemSubscriberCount:D().int().nonnegative(),appliedKeys:k(E()),summary:S9.optional(),warning:T9.optional(),warnings:E9.optional()}).loose(),A({entries:k(A({level:j([`info`,`warn`,`error`]),message:E().max(I4),event:E().optional(),fields:Xa(E(),La()).optional(),ts:D().optional(),sourceId:E().optional(),lineNumber:D().optional()}).loose()).max(100)}).loose(),A({accepted:D().int().min(0)}).loose();var Mne=A({status:E().min(1),reason:E()}).loose();A({docName:E().min(1),content:E(),lifecycle:Mne.nullable()}).loose();var D9=A({kind:j([`document`,`asset`,`folder`,`file`]).default(`document`),docName:E().min(1).optional(),docExt:E().min(1).default(`.md`),size:D().int().nonnegative(),modified:E().min(1),isSymlink:O().default(!1),canonicalDocName:E().nullable().default(null),targetPath:E().nullable().default(null),path:E().min(1).optional(),assetExt:E().min(1).optional(),mediaKind:j([`image`,`video`,`audio`,`pdf`,`text`]).nullable().optional(),referencedBy:k(E().min(1)).optional(),hasChildren:O().optional()}).loose().refine(e=>e.kind===`document`?e.docName!==void 0&&e.path===void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.kind===`folder`?e.docName===void 0&&e.path!==void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0:e.kind===`file`?e.path!==void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.path!==void 0&&e.assetExt!==void 0&&e.referencedBy!==void 0&&e.hasChildren===void 0,{message:`document/asset/folder/file kind must match its required fields (document → docName; asset → path+assetExt+referencedBy; folder → path only, no docName; file → path, no mediaKind/referencedBy/hasChildren)`}),Nne=A({documents:k(D9),truncated:O().optional()}).loose(),Pne=A({source:E().min(1),anchor:E().nullable(),title:E(),snippet:E().nullable()}).loose(),Fne=A({docName:E().min(1),backlinks:k(Pne)}).loose();A({counts:Xa(E().min(1),D().int().nonnegative())}).loose();var Ine=Ka(`kind`,[A({kind:M(`doc`),docName:E().min(1),anchor:E().nullable(),title:E(),snippet:E().nullable()}).loose(),A({kind:M(`external`),url:E().min(1),title:E(),snippet:E().nullable()}).loose()]),Lne=A({docName:E().min(1),forwardLinks:k(Ine)}).loose(),Rne=Ka(`kind`,[A({id:E().min(1),kind:M(`doc`),docName:E().min(1),anchor:E().nullable(),label:E(),cluster:E().nullable(),category:E().nullable(),tags:k(E()).nullable()}).loose(),A({id:E().min(1),kind:M(`external`),url:E().min(1),label:E()}).loose()]),zne=A({source:E().min(1),target:E().min(1)}).loose(),Bne=A({nodes:k(Rne),links:k(zne)}).loose(),Vne=A({ts:D().int().min(0),url:E(),method:E(),ua:E().optional(),origin:E().optional(),referer:E().optional(),host:E().optional(),remote:E().optional(),secChUa:E().optional(),secChUaMobile:E().optional(),secChUaPlatform:E().optional(),secFetchSite:E().optional(),secFetchDest:E().optional(),secFetchMode:E().optional(),secFetchUser:E().optional()}).loose(),Hne=A({app:Wa([M(`cursor`),M(`codex`),M(`claude`),Fa()]),signals_fired:k(E())}).loose();A({entries:k(Vne),count:D().int().min(0),detection:Hne}).loose(),A({writers:k(A({id:E().min(1),name:E().optional(),email:E().optional()}).loose()).optional(),summary:g4,...h4}).loose(),A({checkpointRef:E().min(1)}).loose();var Une=A({v:D().int().optional(),id:E().min(1),name:E().min(1),colorSeed:E().optional(),docs:k(E()),summaries:k(E()).optional()}).loose();A({entries:k(A({sha:E().min(1),timestamp:E().min(1),author:E(),authorEmail:E(),type:j([`checkpoint`,`wip`,`upstream`,`park`]),message:E(),contributors:k(Une),checkpoint:La().nullable()}).loose()),total:D().int().nonnegative().optional(),truncated:O().optional(),hasMore:O().optional()}).loose(),A({sha:E().regex(/^[0-9a-f]{40}$/i),content:E(),timestamp:E(),author:E()}).loose();var Wne=A({contentDir:E().min(1),pathSeparator:j([`/`,`\\`]),symlinkResolved:O()}).loose();k(Ka(`source`,[A({docName:E().min(1),timestamp:E().min(1),size:D().int().nonnegative(),source:M(`flat`)}).loose(),A({docName:E().min(1),timestamp:E().min(1),source:M(`timeline`),sha:E().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."});var Gne=A({orphans:k(A({docName:E().min(1),title:E()}).loose())}).loose(),Kne=A({hubs:k(A({docName:E().min(1),title:E(),count:D().int().nonnegative()}).loose())}).loose(),qne=A({source:E().min(1),title:E(),snippet:E().nullable()}).loose();A({deadLinks:k(A({target:E().min(1),sources:k(qne)}).loose())}).loose(),A({target:A({docName:E().min(1),title:E(),aliases:k(E())}).loose(),mentions:k(A({source:E().min(1),excerpt:E(),offset:D().int().nonnegative()}).loose()),truncated:O()}).loose(),A({projectPath:E().min(1)}).loose();var Jne=j([`not-a-git-worktree`,`init-failed`]);Ka(`ok`,[A({ok:M(!0),projectPath:E().min(1)}).loose(),A({ok:M(!1),reason:Jne,message:E().min(1)}).loose()]),A({host:E().min(1).optional()}).loose(),A({key:E().min(1)}).loose(),A({keyPresent:O()}).loose(),A({name:E().refine(e=>e.trim().length>0,{message:`name must be non-empty`}),email:E().refine(e=>e.trim().length>0,{message:`email must be non-empty`})}).loose(),A({authenticated:O()}).loose(),A({}).loose();var Yne=A({stackIndex:D().int().min(0),ts:D().int().min(0),additions:D().int().min(0),deletions:D().int().min(0)}).loose(),Xne=A({docName:E().min(1),additionsTotal:D().int().min(0),deletionsTotal:D().int().min(0),lastTs:D().int().min(0),bursts:k(Yne)}).loose(),Zne=A({displayName:E().min(1),color:E().min(1),icon:E().optional(),connectionId:E().min(1)}).loose(),Qne=A({sessionAlive:O(),agent:Zne.nullable(),files:k(Xne)}).loose(),$ne=A({diff:E(),generatedAt:D().int().min(0)}).loose();A({}).loose(),A({}).loose(),A({}).loose(),A({}).loose(),A({}).loose(),A({}).loose();var ere=A({displayName:E().min(1),icon:E(),color:E().min(1),currentDoc:E().nullable(),mode:j([`idle`,`writing`]),ts:D().int().min(0)}).loose();A({presence:Xa(E().min(1),ere)}).loose(),Xa(E().min(1),O()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`}),A({path:E().min(1,`path must be non-empty`)}).loose(),A({}).loose();var tre=A({fromDocName:E().min(1),toDocName:E().min(1)}).loose(),nre=A({fromPath:E().min(1),toPath:E().min(1)}).loose();A({}).loose(),A({path:E().min(1),...h4,summary:g4}).loose();var rre=A({docName:E().min(1)}).loose();A({path:E().min(1),...h4,summary:g4}).loose();var ire=A({path:E().min(1)}).loose();A({kind:j([`file`,`folder`]),path:E().min(1),...h4,summary:g4}).loose();var are=A({kind:j([`file`,`folder`]),path:E().min(1),duplicatedDocNames:k(E().min(1))}).loose(),ore=A({pages:k(A({docName:E().min(1),title:E(),docExt:E().min(1),size:D().int().nonnegative(),modified:E().min(1),icon:E().min(1).max(2048).optional()}).loose())}).loose(),sre=A({level:D().int().min(1).max(6),text:E(),slug:E()}).loose(),cre=A({docName:E().min(1),headings:k(sre)}).loose(),lre=A({docName:E().min(1),rewrites:D().int().nonnegative()}).loose();A({kind:j([`file`,`folder`,`asset`]),fromPath:E().min(1),toPath:E().min(1),...h4,summary:g4}).loose();var ure=A({renamed:k(tre),renamedAssets:k(nre),rewrittenDocs:k(lre).optional(),summary:S9.optional()}).loose();A({kind:j([`file`,`folder`,`asset`]),path:E().min(1),...h4}).loose();var dre=A({deletedDocNames:k(E().min(1))}).loose();A({kind:j([`file`,`folder`,`asset`]),path:E().min(1),...h4,summary:g4}).loose();var fre=A({deletedDocNames:k(E().min(1))}).loose();A({docName:E().min(1),commitSha:E().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:g4,...h4}).loose(),A({restoredFrom:E().min(1),timestamp:E().min(1),summary:S9.optional(),warning:C9.optional(),warnings:E9.optional()}).loose();var pre=j([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),mre=A({label:E().min(1),webUrl:ha().nullable()}).loose(),hre=Ka(`checkStatus`,[A({checkStatus:M(`allowed`)}).loose(),A({checkStatus:M(`denied`),deniedReason:j([`no-collaborator`,`private-no-access`,`repo-not-found`])}).loose(),A({checkStatus:M(`unknown`),unknownError:j([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`]).optional()}).loose()]),O9=j([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`semantic-protected-branch`]);A({state:pre,lastSyncUtc:E().nullable(),lastFetchUtc:E().nullable(),lastPushedSha:E().nullable(),ahead:D().int().min(0),behind:D().int().min(0),consecutiveFailures:D().int().min(0),conflictCount:D().int().min(0),hasRemote:O(),syncEnabled:O(),identityUnresolved:O(),remote:mre.nullable().optional(),pushError:E().optional(),pushErrorCode:O9.optional(),pullError:E().optional(),pullErrorCode:O9.optional(),pausedReason:E().optional(),pushPermission:hre.optional()}).loose(),A({op:j([`sync`,`push`,`pull`]).optional()}).loose(),A({op:j([`sync`,`push`,`pull`])}).loose(),A({conflicts:k(A({file:E().min(1),detectedAt:E().min(1),oursSha:E().optional(),theirsSha:E().optional(),baseSha:E().optional()}).loose())}).loose(),A({file:E().min(1),strategy:j([`mine`,`theirs`,`content`,`delete`]),content:E().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0&&e.content!==``,{message:`content must be a non-empty string when strategy is 'content'`,path:[`content`]}),A({}).loose(),A({file:E().min(1),base:E(),ours:E(),theirs:E(),kind:j([`both-modified`,`delete-modify`,`modify-delete`]),lifecycleStatus:E().nullable()}).loose(),A({plan:yo(e=>e!==void 0,{message:`plan is required`})}).loose(),A({plan:yo(e=>e!==void 0,{message:`plan is required`})}).loose(),A({result:yo(e=>e!==void 0,{message:`result is required`})}).loose();var gre=A({path:E().min(1),summary:E().min(1)}).loose(),_re=A({files:D().int().nonnegative(),folders:D().int().nonnegative()}).loose();A({packs:k(A({id:E().min(1),name:E().min(1),description:E().min(1),defaultSubfolder:E().optional(),folders:k(gre),entryCounts:_re}).loose())}).loose(),A({noOpen:O().optional(),out:E().min(1).optional()}).loose();var vre=A({reason:j([`unsupported-platform`,`spawn-error`]),message:E()}).loose();Ka(`status`,[A({status:M(`installed`),outputPath:E(),size:D().int().nonnegative(),sha256:E(),skillVersion:E()}).loose(),A({status:M(`built`),outputPath:E(),size:D().int().nonnegative(),sha256:E(),skillVersion:E(),handoffError:vre.optional()}).loose(),A({status:M(`failed`),buildError:E()}).loose(),A({status:M(`skip-current`),skillVersion:E(),recordedAt:E().optional()}).loose()]),A({tags:k(A({name:E().min(1),count:D().int().nonnegative(),isLeaf:O()}).loose())}).loose();var yre=A({docName:E().min(1),title:E(),matchingTags:k(E().min(1)),snippet:E().nullable()}).loose();A({name:E().min(1),docs:k(yre)}).loose(),A({folder:La(),frontmatter_local:Xa(E(),La()).nullable()}).loose(),A({path:E(),frontmatter:Xa(E(),La()).optional()}).loose(),A({applied:La()}).loose();var k9=Xa(E(),La()).meta({description:`Free-form frontmatter map embedded in template payloads.`});A({template:A({name:E().min(1),folder:E(),scope:j([`local`,`inherited`]),path:E().min(1),frontmatter:k9,body:E()}).strict()}).strict();var bre=A({templates:k(A({name:E().min(1),title:E().optional(),description:E().optional(),path:E().min(1),source_folder:E()}).strict()),truncated:O()}).strict();A({folder:E(),name:E(),body:E().optional(),frontmatter:k9.optional(),...h4,summary:g4}).strict(),A({path:E().min(1),created:O(),warnings:k(E())}).strict(),A({existed:O(),path:E().min(1)}).strict(),A({fromFolder:E(),fromName:E(),toFolder:E(),toName:E(),body:E().optional(),frontmatter:k9.optional(),...h4,summary:g4}).strict(),A({from:E().min(1),to:E().min(1),committed:O()}).strict(),A({query:E().optional(),intent:j([`autocomplete`,`full_text`,`omnibar`]).optional(),scopes:k(j([`page`,`folder`,`content`,`file`])).optional(),scope:E().optional(),limit:D().int().nonnegative().optional(),semantic:O().optional(),source:j([`omnibar`,`mcp`,`http`]).optional()}).loose();var xre=A({kind:j([`page`,`folder`,`content`,`file`]),path:E().min(1),title:E(),score:D(),signals:Xa(E(),La()),snippet:E().optional()}).loose(),Sre=A({capable:O(),applied:O(),coverage:A({embedded:D().int().nonnegative(),total:D().int().nonnegative()})}).loose();A({enabled:O(),keyPresent:O(),keySource:j([`file`,`env`]).nullable(),keyHint:E().nullable(),ready:O(),capable:O(),embedded:D().int().nonnegative(),total:D().int().nonnegative()}).loose(),A({query:E(),intent:j([`autocomplete`,`full_text`,`omnibar`]),results:k(xre),elapsedMs:D().nonnegative(),semantic:Sre.optional(),truncated:O().optional()}).loose();var Cre=A({version:E().min(1),recordedAt:E().min(1)}).loose();A({currentVersion:E().min(1),targets:Xa(E(),Cre.nullable())}).loose();var wre=`server-info`,Tre=`branch-switched`,Ere=`disk-ack`,Dre=`config-validation-rejected`,Ore=`config-ignore-nested-error`,A9=j([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`]),kre=A({v:M(1),ch:M(wre),seq:D(),serverInstanceId:E().min(1),currentBranch:E().min(1).optional()}).loose(),Are=A({v:M(1),ch:M(Tre),seq:D(),branch:E().min(1)}).loose(),jre=A({v:M(1),ch:A9,seq:D()}).loose(),Mre=A({v:M(1),ch:M(Ere),seq:D(),docName:E().min(1),sv:E().min(1)}).loose(),Nre=A({v:M(1),ch:M(Dre),seq:D(),docName:E().min(1),error:Ou}).loose(),Pre=A({v:M(1),ch:M(Ore),seq:D(),path:E().min(1),error:E().min(1)}).loose(),Fre={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},j9=new WeakMap;function Ire(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function M9(e){return e.trim().toLowerCase()}function N9(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function Lre(e){let t=N9(e.path),n=e.title?.trim()||t,r=e.modifiedTs??0,i=e.path.split(`/`).filter(Boolean),a=new Set(i),o=[...new Set((e.aliases??[]).flatMap(e=>e.split(`/`).filter(Boolean)).filter(e=>!a.has(e)))];return{id:`${e.kind}:${e.path}`,kind:e.kind,path:e.path,title:n,name:t,pathSegments:[...i,...o].join(` `),content:e.content??``,modifiedTs:Number.isFinite(r)?r:0}}function P9(e){let t=rQ({schema:Fre});return e.length>0&&mQ(t,e),t}function Rre(e){let t={documents:e};return j9.set(t,P9(e)),t}function zre(e){let t=j9.get(e);if(t)return t;let n=P9(e.documents);return j9.set(e,n),n}function Bre(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function F9(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function Vre(e,t){let n=M9(t);if(!n)return 0;let r=M9(e.title),i=M9(e.name),a=M9(e.path),o=a.split(`/`);return r===n||i===n?700:a===n?650:r.startsWith(n)||i.startsWith(n)?600:o.some(e=>e.startsWith(n))?550:r.includes(n)||i.includes(n)?500:a.includes(n)?450:-1}var Hre=.5;function I9(e,t){let n=Vre(e,t);return n<=0?n:f4(e.path)?n*Hre:n}var Ure=60;function L9(e){return e===`file`?-Ure:0}function Wre(e){let t=e.map(e=>e.modifiedTs).filter(e=>Number.isFinite(e)&&e>0);if(t.length===0)return new Map;let n=1/0,r=-1/0;for(let e of t)e<n&&(n=e),e>r&&(r=e);let i=Math.max(1,r-n);return new Map(e.map(e=>[e.id,e.modifiedTs>0?(e.modifiedTs-n)/i*50:0]))}function Gre(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function Kre(e){return e===`full_text`?{title:8,name:7,path:5,pathSegments:4,content:1}:e===`autocomplete`?{title:10,name:9,path:5,pathSegments:4}:{title:8,name:7,path:5,pathSegments:4}}function qre(e,t){return M9(t).length<4?0:+(e===`full_text`)}function Jre(e,t,n={}){let r=n.intent??`omnibar`,i=Ire(n.limit),a=new Set(n.scopes??Bre(r)),o=e.documents.filter(e=>F9(e,a)),s=M9(t);if(!s)return o.slice().sort((e,t)=>e.path.localeCompare(t.path)).slice(0,i).map(e=>({document:e,score:0,signals:{lexical:0,fullText:0,recency:0}}));let c=WQ(zre(e),{term:s,properties:Gre(r),boost:Kre(r),tolerance:qre(r,s),limit:Math.max(i*4,40)}),l=new Map(c.hits.filter(e=>F9(e.document,a)).map(e=>[e.document.id,e.score])),u=Wre(o),d=new Map;for(let e of o)I9(e,s)>=0&&d.set(e.id,e);for(let e of c.hits)F9(e.document,a)&&d.set(e.document.id,e.document);return n.semantic?Yre({scopedDocuments:o,candidates:d,fullTextScores:l,recency:u,normalizedQuery:s,semantic:n.semantic,limit:i}):[...d.values()].map(e=>{let t=Math.max(0,I9(e,s)),n=l.get(e.id)??0,r=u.get(e.id)??0;return{document:e,score:t+n*20+r+L9(e.kind),signals:{lexical:t,fullText:n,recency:r}}}).sort((e,t)=>e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score).slice(0,i)}function R9(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function Yre(e){let{scopedDocuments:t,candidates:n,fullTextScores:r,recency:i,normalizedQuery:a,semantic:o,limit:s}=e,c=o.rrfK??60,l=o.candidateLimit??64,u=o.similarityFloor??0,d=o.scores,f=new Map(t.map(e=>[e.id,e])),p=[...d.entries()].filter(([e,t])=>t>=u&&f.has(e)).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).slice(0,l);for(let[e]of p)if(!n.has(e)){let t=f.get(e);t&&n.set(e,t)}let m=[...n.values()].map(e=>{let t=Math.max(0,I9(e,a)),n=r.get(e.id)??0,o=i.get(e.id)??0,s=d.get(e.id),c=s!==void 0&&s>=u;return{document:e,score:t+n*20+o+L9(e.kind),signals:c?{lexical:t,fullText:n,recency:o,vector:s}:{lexical:t,fullText:n,recency:o},lexical:t,fullText:n,recency:o,cosine:s}}),h=R9(m.filter(e=>e.fullText>0).sort((e,t)=>t.fullText-e.fullText||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),g=R9(m.filter(e=>e.cosine!==void 0&&e.cosine>=u).sort((e,t)=>t.cosine-e.cosine||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),_=e=>{let t=0,n=h.get(e);n!==void 0&&(t+=1/(c+n));let r=g.get(e);return r!==void 0&&(t+=1/(c+r)),t};return m.sort((e,t)=>{let n=+(e.lexical>0),r=+(t.lexical>0);if(n!==r)return r-n;if(n===1)return e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score;let i=_(e.document.id),a=_(t.document.id);return i===a?e.recency===t.recency?e.document.path.localeCompare(t.document.path):t.recency-e.recency:a-i}).map(({document:e,score:t,signals:n})=>({document:e,score:t,signals:n})).slice(0,s)}function Xre(e){return`https://github.com/${e.owner}/${e.repo}.git`}function Zre(e,t){return!e||e.length===0?`true`:t.detached?`detached`:t.currentBranch===null||t.currentBranch===e?`true`:`false`}var z9=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),B9=globalThis;B9[z9]===void 0&&(B9[z9]=mr());var V9=B9[z9],H9=Ha({version:E().regex(/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(V9,{description:`Recorded skill version for this target.`}),recordedAt:qi().register(V9,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:j([`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`]).register(V9,{description:`Install-source surface that recorded this entry.`}).optional()});Ha({schema:M(1).register(V9,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:Ha({"claude-cowork":H9.optional(),"cli-hosts":H9.optional()}).register(V9,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({})});var U9=class extends Error{chunksCompleted;totalChunks;bytesWritten;bytesRemaining;cause;constructor(e,t){let n=e instanceof Error?e.message:typeof e==`string`?e:`unknown error`;super(`chunked insert failed after ${t.chunksCompleted}/${t.totalChunks} chunks (${t.bytesWritten} bytes written, ${t.bytesRemaining} bytes lost): ${n}`),this.name=`ChunkedInsertError`,this.chunksCompleted=t.chunksCompleted,this.totalChunks=t.totalChunks,this.bytesWritten=t.bytesWritten,this.bytesRemaining=t.bytesRemaining,this.cause=e}};async function Qre(e,t,n,r,i={}){let a=i.thresholdBytes??512e3,o=i.chunkSizeBytes??51200,s=i.origin,c=i.yieldFn??$re,l=i.resolveOffset??(e=>e);if(r.length<=a){e.transact(()=>{t.insert(n,r)},s);return}let u=Math.ceil(r.length/o),d=0,f=n,p=0,m=0;for(;d<r.length;){let n=Math.min(d+o,r.length),i=r.slice(d,n);try{let n=l(f);e.transact(()=>{t.insert(n,i)},s)}catch(e){throw new U9(e,{chunksCompleted:p,totalChunks:u,bytesWritten:m,bytesRemaining:r.length-d})}p++,m+=i.length,f+=i.length,d=n,d<r.length&&await c()}}function $re(){return new Promise(e=>{let t=globalThis;t.document?.hidden!==!0&&typeof t.requestAnimationFrame==`function`?t.requestAnimationFrame(()=>e()):setTimeout(()=>e(),0)})}function eie(){let e=!1,t=``,n=0;return r=>{let i=tie(r);return e?(i&&i.char===t&&i.len>=n&&!i.hasInfo&&(e=!1,t=``,n=0),!0):i?(e=!0,t=i.char,n=i.len,!0):!1}}function tie(e){let t=(e.endsWith(`\r`)?e.slice(0,-1):e).match(/^ {0,3}([`~])(\1{2,})(.*)$/);return t?{char:t[1],len:1+t[2].length,hasInfo:t[3].trim()!==``}:null}function nie(e){let t;try{t=new URL(e)}catch{return null}let n=t.pathname.match(/^\/video\/(\d+)/);if(n)return n[1]??null;let r=t.pathname.match(/^\/(\d+)/);return r?r[1]??null:null}function rie(e){if(typeof e!=`string`||e.length===0)return e;let t=t6(e);if(t){let e=t.noCookie?`www.youtube-nocookie.com`:`www.youtube.com`,n=t.startSeconds===null?``:`?start=${t.startSeconds}`;return`https://${e}/embed/${t.id}${n}`}if(X3(e)){let t=nie(e);return t?`https://player.vimeo.com/video/${t}`:e}let n=q3(e);if(n){let e=n.startRaw===null?``:`?t=${n.startRaw}`;return`https://www.loom.com/embed/${n.id}${e}`}return e}var iie=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],aie={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`},oie={cursor:`#FFFFFF`,windsurf:`#FFFFFF`},W9=[`#f0ece3`,`#fff5e1`,`#f9e1db`,`#f5def7`,`#ece2fb`,`#dce8fa`,`#DBF3FB`];function sie(e,t=iie){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}function cie(e){let t=e.trim();if(!t)return`?`;let n=t.split(/[-\s]+/).filter(Boolean);if(!n.length)return`?`;if(n.length>=2)return n.slice(0,2).map(e=>e[0]??``).join(``).toUpperCase();let r=n[0],i=[r[0]];for(let e=1;e<r.length&&i.length<2;e++){let t=r[e-1],n=r[e];t===t.toLowerCase()&&n===n.toUpperCase()&&n!==n.toLowerCase()&&i.push(n)}return i.length>=2?i.join(``).toUpperCase():r.slice(0,2).toUpperCase()}function lie(e){let t=e.trim();if(!t)return e;if(t.includes(` `)||!/[-_]/.test(t))return t;let n=t.split(/[-_]+/).filter(Boolean);return n.length?n.map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `):t}var uie={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,"codex-mcp-client":`openai`,copilot:`github`,cline:`cline`};function die(e){return e?uie[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}function fie(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2;if(i===a)return[0,0,o*100];let s=i-a,c=o>.5?s/(2-i-a):s/(i+a),l;return l=i===t?((n-r)/s+(n<r?6:0))/6:i===n?((r-t)/s+2)/6:((t-n)/s+4)/6,[l*360,c*100,o*100]}function pie(e,t,n){let r=t/100,i=n/100,a=r*Math.min(i,1-i),o=t=>{let n=(t+e/30)%12,r=i-a*Math.max(Math.min(n-3,9-n,1),-1);return Math.round(255*r).toString(16).padStart(2,`0`)};return`#${o(0)}${o(8)}${o(4)}`}function mie(e){let[t]=fie(e);return pie(t,45,32)}var hie=[`Curious`,`Brave`,`Clever`,`Swift`,`Gentle`,`Bright`,`Wise`,`Bold`,`Calm`,`Keen`],gie=[`Bird`,`Cat`,`Dog`,`Fish`,`Mouse`,`Rabbit`,`Shrimp`,`Snail`,`Squirrel`,`Turtle`],G9=`ok-user-name-v3`,K9=`ok-user-color-v3`;function q9(e){return e[Math.floor(Math.random()*e.length)]}function _ie(){return`${q9(hie)} ${q9(gie)}`}function vie(){return q9(W9)}function J9(e){try{return localStorage.getItem(e)}catch{return null}}function Y9(e,t){try{localStorage.setItem(e,t)}catch{}}function yie(){let e=new URLSearchParams(window.location.search).get(`coeditor`)||`standalone`,t=crypto.randomUUID(),n=J9(G9),r=J9(K9);return n||(n=_ie(),Y9(G9,n)),r||(r=vie(),Y9(K9,r)),{name:n,color:r,coeditor:e,tabId:t}}function bie(e,t){let n=e.trim();if(!n||/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=r>=0?n.slice(0,r):n,a=r>=0?n.slice(r+1):null,o=(i.split(`?`)[0]??``).trim();if(!o)return null;let s=(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=(s[1]??``).toLowerCase();if(e!==`md`&&e!==`mdx`)return null}let c=o.toLowerCase(),l=c.endsWith(`.mdx`)?o.slice(0,-4):c.endsWith(`.md`)?o.slice(0,-3):o,u=l.startsWith(`/`),d=u?l.slice(1):l,f=u?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of d.split(`/`))if(e===`..`){if(f.length===0)return null;f.pop()}else e!==`.`&&e!==``&&f.push(e);return f.length===0?null:{docName:f.join(`/`),anchor:a||null}}function xie(e){throw Error(`Unhandled ClassifiedLinkTarget variant: ${JSON.stringify(e)}`)}var X9=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function Z9(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function Q9(e){return e.split(`/`).filter(Boolean)}function $9(e){let t=e.trim();return X9.test(t)||t.startsWith(`//`)}function Sie(e,t){let n=e.trim();if(!n)return null;if(n.startsWith(`#`)){let e=n.slice(1).trim();return e?{kind:`anchor`,anchor:e}:null}if($9(n))return{kind:`external`,url:n};let r=bie(n,t);if(r)return{kind:`doc`,docName:r.docName,anchor:r.anchor};let i=Z9(n);return i&&i!==`md`&&i!==`mdx`?{kind:`asset`,url:n,ext:i}:null}function Cie(e,t){let n=e.trim();if(!n)return null;if($9(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=Z9(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function wie(e,t){let n=e.trim();if(!n||X9.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=((r>=0?n.slice(0,r):n).split(`?`)[0]??``).trim();if(!i)return null;let a=i.startsWith(`/`),o=a?i.slice(1):i,s=a?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of o.split(`/`))if(e===`..`){if(s.length===0)return null;s.pop()}else e!==`.`&&e!==``&&s.push(e);return s.length===0?null:s.join(`/`)}function Tie(e,t,n=null){let r=Q9(e);r.pop();let i=Q9(t),a=0;for(;a<r.length&&a<i.length&&r[a]===i[a];)a+=1;let o=r.slice(a).map(()=>`..`),s=i.slice(a),c=[...o,...s].join(`/`);return c||=i.at(-1)??t,!c.startsWith(`./`)&&!c.startsWith(`../`)&&(c=`./${c}`),`${c}.md${n?`#${n}`:``}`}function Eie(e){if(!e)return{height:null,viewerFragment:``};let t=e.split(`&`).filter(e=>e.length>0),n=null,r=[];for(let e of t){let t=e.indexOf(`=`);if(t===-1){r.push(e);continue}let i=e.slice(0,t),a=e.slice(t+1);if(i===`height`){let e=Number.parseInt(a,10);!Number.isNaN(e)&&e>0&&(n=e);continue}r.push(e)}return{height:n,viewerFragment:r.join(`&`)}}function Die(e){return e.replace(/[/\\:*?"<>|\0]/g,`-`).replace(/\s+/g,` `).replace(/-+/g,`-`).trim().replace(/^[-.\s]+|[-.\s]+$/g,``)}export{Gne as $,S$ as $n,uu as $r,eie as $t,D9 as A,i$ as An,tx as Ar,t1 as At,W9 as B,kne as Bn,Wv as Br,Sie as Bt,ire as C,U6 as Cn,kS as Cr,Q1 as Ct,L1 as D,F6 as Dn,Mb as Dr,Wne as Dt,i0 as E,R6 as En,Cb as Er,M2 as Et,w1 as F,W1 as Fn,rx as Fr,B2 as Ft,N0 as G,T0 as Gn,I as Gr,E0 as Gt,Kne as H,R3 as Hn,R as Hr,o1 as Ht,u$ as I,B0 as In,OS as Ir,Tie as It,W0 as J,q3 as Jn,bf as Jr,q2 as Jt,P0 as K,Y7 as Kn,Cp as Kr,sie as Kt,I2 as L,z0 as Ln,dS as Lr,Xre as Lt,are as M,$9 as Mn,Hy as Mr,u4 as Mt,B1 as N,s$ as Nn,My as Nr,L2 as Nt,dre as O,B6 as On,Pb as Or,xie as Ot,t0 as P,J3 as Pn,Sb as Pr,R2 as Pt,U1 as Q,t6 as Qn,F as Qr,cie as Qt,P2 as R,F2 as Rn,sv as Rr,Qre as Rt,b0 as S,L6 as Sn,MS as Sr,F4 as St,a0 as T,H6 as Tn,lb as Tr,k2 as Tt,Z1 as U,y0 as Un,Hp as Ur,s1 as Ut,P3 as V,One as Vn,Op as Vr,Cie as Vt,f7 as W,b1 as Wn,Gp as Wr,P1 as Wt,tne as X,z4 as Xn,P as Xr,K2 as Xt,Bne as Y,Eie as Yn,tf as Yr,G2 as Yt,e2 as Z,D2 as Zn,ud as Zr,c4 as Zt,O1 as _,L3 as _n,lE as _r,C4 as _t,e0 as a,A as ai,T1 as an,N2 as ar,P4 as at,F1 as b,G6 as bn,qx as br,bre as bt,Fne as c,h as ci,XQ as cn,d9 as cr,ZQ as ct,Nre as d,lie as dn,N9 as dr,I0 as dt,ru as ei,A6 as en,x$ as er,G1 as et,jre as f,c$ as fn,pte as fr,R0 as ft,j1 as g,E1 as gn,rE as gr,w4 as gt,i1 as h,O2 as hn,TT as hr,y4 as ht,z1 as i,M as ii,H1 as in,Jre as ir,N4 as it,Nne as j,R1 as jn,_S as jr,y1 as jt,A9 as k,V6 as kn,Fb as kr,p1 as kt,Are as l,D0 as ln,B4 as lr,t2 as lt,kre as m,yie as mn,WT as mr,M4 as mt,oie as n,ku as ni,Lre as nn,rie as nr,cre as nt,Qne as o,E as oi,A2 as on,d$ as or,L4 as ot,Mre as p,pne as pn,lte as pr,D1 as pt,I1 as q,E2 as qn,L as qr,J2 as qt,q1 as r,hu as ri,mie as rn,Die as rr,ore as rt,$ne as s,g as si,Z9 as sn,M0 as sr,I4 as st,aie as t,Mu as ti,Rre as tn,wie as tr,K1 as tt,Pre as u,o9 as un,f9 as ur,ure as ut,A1 as v,die as vn,eE as vr,D4 as vt,rre as w,z6 as wn,gS as wr,o0 as wt,U9 as x,I6 as xn,ex as xr,fre as xt,k1 as y,W6 as yn,cS as yr,x2 as yt,Lne as z,X3 as zn,uv as zr,Zre as zt};
|
|
509
|
+
`)},mdxJsxFlowElement(e,t,n,r){let i=e,a=i.data?.sourceRaw;if(typeof a==`string`)return a;let o=i.data?.htmlBoundary;if(o&&typeof o.opener==`string`&&typeof o.closer==`string`){let e=n.containerFlow({type:`root`,children:i.children??[]},r);return`${o.opener}\n\n${e}\n\n${o.closer}`}let s=i.name??``,c=X7(i.attributes??[]);return!i.children||i.children.length===0?s?c?`<${s} ${c} />`:`<${s} />`:``:Wte({...i,attributes:(i.attributes??[]).map(Kte)},t,n,r)},mark(e,t,n,r){let i=n.createTracker(r),a=n.enter(`mark`),o=i.move(`==`);return o+=n.containerPhrasing(e,{before:o,after:`==`,...i.current()}),o+=i.move(`==`),a(),o},comment(e,t,n,r){let i=e.data?.sourceForm,a=i===`html`?`<!-- `:`%%`,o=i===`html`?` -->`:`%%`,s=n.createTracker(r),c=n.enter(`comment`),l=s.move(a);return l+=n.containerPhrasing(e,{before:l,after:o,...s.current()}),l+=s.move(o),c(),l},commentBlock(e,t,n,r){let i=n.createTracker(r),a=n.enter(`commentBlock`),o=e.children??[],s=e.data?.sourceForm,c=e.data?.sourceLayout,l=o.length===1&&o[0]?.type===`paragraph`;if(s===`html`&&l){let e=o[0],t=n.containerPhrasing(e,{before:`<!-- `,after:` -->`,...i.current()});return a(),`<!-- ${t} -->`}if(c===`inline`&&l){let e=o[0],t=n.containerPhrasing(e,{before:`%% `,after:` %%`,...i.current()});return a(),`%% ${t} %%`}let u=n.containerFlow(e,i.current());return a(),`%%\n\n${u}\n\n%%`},mdxJsxTextElement(e){let t=e.data?.sourceRaw;if(typeof t==`string`)return t;let n=e.name??``,r=X7(e.attributes??[]);return r?`<${n} ${r} />`:`<${n}/>`},rawMdxFallback(e){return e.value??``},blockquote(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.containerFlow(e,a.current());i();let s=e.data?.sourceMarkerSpacings,c=0;return n.indentLines(o,(e,t,n)=>{if(n)return`>`;let r=s?.[c++];return r===`none`||r===0?`>${e}`:typeof r==`number`&&r>=2&&!e.startsWith(` `)?`>${` `.repeat(r)}${e}`:`> ${e}`})}};function X7(e){let t=[];for(let n of e){if(n.type===`mdxJsxExpressionAttribute`){t.push(`{${n.value}}`);continue}let e=n.name;if(n.value===null||n.value===void 0){t.push(e);continue}if(typeof n.value==`string`){n.value.includes(`"`)?t.push(`${e}={${Z7(n.value)}}`):t.push(`${e}="${n.value}"`);continue}t.push(`${e}={${n.value.value}}`)}return t.join(` `)}function Z7(e){return`"${e.replace(/\\/g,`\\\\`).replace(/"/g,`\\"`)}"`}function Kte(e){return e.type===`mdxJsxAttribute`&&typeof e.value==`string`&&e.value.includes(`"`)?{type:`mdxJsxAttribute`,name:e.name,value:{type:`mdxJsxAttributeValueExpression`,value:Z7(e.value)}}:e}function Q7(e,t,n=` `){return t===`single`?`${n}'${e.replace(/'/g,`\\'`)}'`:t===`paren`?`${n}(${e.replace(/[()]/g,`\\$&`)})`:`${n}"${e.replace(/"/g,`\\"`)}"`}function $7(e){if(!e)return``;let t=0,n=!0;for(let r of e)r===`(`?t++:r===`)`&&(t--,t<0&&(n=!1));return t!==0&&(n=!1),n?e:e.replace(/[\\()]/g,`\\$&`)}function qte(e){return e.replace(/(?<!\\)&(?=(#[0-9]+|#[xX][0-9A-Fa-f]+|[A-Za-z][A-Za-z0-9]*);)/g,(e,t)=>Jte(t)?e:`\\${e}`)}function Jte(e){if(e.charCodeAt(0)!==35)return!1;let t=e[1]===`x`||e[1]===`X`?Number.parseInt(e.slice(2),16):Number.parseInt(e.slice(1),10);return t===9||t===10||t===11||t===12||t===13||t===32}function e9(e,t,n){let r=e.unsafe;e.unsafe=r.filter(e=>!(e.character===`&`&&e.after===`[#A-Za-z]`||e.character===`<`||e.character===`[`||e.character===`(`||e.character==="`"||(e.character===`*`||e.character===`_`||e.character===`~`)&&e.inConstruct===`phrasing`||e.character===`=`&&e.atBreak===!0));let i;try{i=e.safe(t,n)}finally{e.unsafe=r}return qte(Qte(i,n))}var t9=1,Yte=2;function n9(e){if(Number.isNaN(e))return`ws`;let t=vz(e);return t===t9?`ws`:t===Yte?`punct`:`other`}function Xte(e,t,n){let r=n9(t),i=n9(n),a=i!==`ws`&&(i===`other`||r!==`other`),o=r!==`ws`&&(r===`other`||i!==`other`);return e===`_`?a&&(!o||r===`punct`)||o&&(!a||i===`punct`):a||o}function Zte(e,t,n){let r=t;for(;r<e.length&&(e[r]===` `||e[r]===` `);)r++;if(r<e.length)return e[r]===`
|
|
510
|
+
`||e[r]===`\r`;let i=n.after.charCodeAt(0);return Number.isNaN(i)||i===10||i===13}function Qte(e,t){let n=``,r=0;for(;r<e.length;){let i=e.charAt(r);if(i===`\\`){n+=e.slice(r,r+2),r+=2;continue}if(i===`*`||i===`_`||i===`~`||i===`=`){let a=r+1;for(;a<e.length&&e.charAt(a)===i;)a++;let o=r===0?t.before.charCodeAt(t.before.length-1):e.charCodeAt(r-1);if(i===`=`)n+=(Number.isNaN(o)||o===10||o===13)&&Zte(e,a,t)?`\\${e.slice(r,a)}`:e.slice(r,a);else{let s=a<e.length?e.charCodeAt(a):t.after.charCodeAt(0);n+=Xte(i,o,s)?`\\${i}`.repeat(a-r):e.slice(r,a)}r=a;continue}n+=i,r+=1}return n}function r9(e,t,n){let r=n.startsWith(`_`)?`_`:`*`,i=e,a=i.charCodeAt(0);i9(t.before.charCodeAt(t.before.length-1),a,r)&&(i=a9(a)+i.slice(1));let o=i.charCodeAt(i.length-1);return i9(t.after.charCodeAt(0),o,r)&&(i=i.slice(0,-1)+a9(o)),i}function i9(e,t,n){return!(vz(t)!==t9||n===`_`&&vz(e)===void 0)}function a9(e){return`&#x${e.toString(16).toUpperCase()};`}function $te(e,t,n,r){let i=e.value??``,a=e.data?.sourceDelimiter,o=typeof a==`string`&&/^\$+$/.test(a)?a.length:2;for(o===1&&!tne(i,r)&&(o=2);RegExp(`(^|[^$])${`\\$`.repeat(o)}([^$]|$)`).test(i);)o++;let s=`$`.repeat(o);/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^\$|\$$/.test(i))&&(i=` ${i} `);let c=-1;for(;++c<n.unsafe.length;){let e=n.unsafe[c];if(!e.atBreak)continue;let t=n.compilePattern(e),r;for(;(r=t.exec(i))!==null;){let e=r.index;i.codePointAt(e)===10&&i.codePointAt(e-1)===13&&e--,i=`${i.slice(0,e)} ${i.slice(r.index+1)}`}}return s+i+s}function ene(e,t,n,r){let i=e.data?.sourceDelimiter===`~`?`~`:`~~`,a=n.createTracker(r),o=n.enter(`strikethrough`),s=a.move(i);return s+=n.containerPhrasing(e,{...a.current(),before:s,after:`~`}),s+=a.move(i),o(),s}function tne(e,t){return!(e.length===0||!/^\S/.test(e)||!/\S$/.test(e)||/[$\r\n]/.test(e)||e.endsWith(`\\`)||/\\[!-/:-@[-`{-~]/.test(e)||/^\d/.test(t.after)||t.before.endsWith(`\\`))}function o9(e){if(!Number.isFinite(e)||e<0)return``;if(e<1024)return`${e} B`;let t=[`KiB`,`MiB`,`GiB`,`TiB`],n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(1).replace(/\.0$/,``)} ${t[r]}`}var nne=class{schema;handlers;pmNodeHandlers;pmMarkHandlers;parseProcessor;serializeProcessor;parseCtx={current:{}};constructor(e){this.schema=Mb(e.extensions),this.handlers=cne(this.schema,this.parseCtx);let{nodeHandlers:t,markHandlers:n}=lne(this.schema);this.pmNodeHandlers=t,this.pmMarkHandlers=n,this.parseProcessor=Nte({schema:this.schema,handlers:this.handlers,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers}),this.serializeProcessor=Pte({toMarkdownHandlers:Gte})}parse(e,t){if(!e.trim())return{type:`doc`,content:[{type:`paragraph`,content:[]}]};this.parseCtx.current=t??{};try{return Ite(e,this.parseProcessor).toJSON()}finally{this.parseCtx.current={}}}parseToMdast(e){return e.trim()?Lte(e,this.parseProcessor):{type:`root`,children:[]}}parseWithFallback(e,t){return e.trim()?$6(e,{parse:e=>this.parse(e,t)}):{type:`doc`,content:[{type:`paragraph`,content:[]}]}}serialize(e){let t;try{t=this.schema.nodeFromJSON(e)}catch(t){let n=`MarkdownManager.serialize() failed: schema rejected JSONContent (type=${e.type}, childCount=${e.content?.length??0})`;throw Error(n,{cause:t})}return Rte(t,this.serializeProcessor,{schema:this.schema,pmNodeHandlers:this.pmNodeHandlers,pmMarkHandlers:this.pmMarkHandlers})}},s9=A6();function rne(e,t){let n=new Map;for(let e of t)n.set(e.name,e);let r={};for(let t of e){if(t.type===`mdxJsxExpressionAttribute`)continue;let e=t.name,i=n.get(e);if(t.value===null||t.value===void 0){r[e]=!0;continue}if(typeof t.value==`string`){if(i?.type===`number`){let n=Number(t.value);r[e]=Number.isNaN(n)?t.value:n}else i?.type===`boolean`?r[e]=t.value===`true`:r[e]=t.value;continue}let a=t.value.value;try{r[e]=JSON.parse(a)}catch{r[e]=a}}return r}function ine(e){let t=!1;return e.descendants(e=>t||e.type.name===`jsxInline`?!1:e.type.name===`jsxComponent`&&e.attrs.sourceDirty?(t=!0,!1):!0),t}function ane(e){return e.attrs.sourceDirty||ine(e)}function one(e){if(e.type!==`paragraph`)return!1;let t=e.children??[];return t.length===0?!0:t.every(e=>e.type===`text`&&e.value===``)}function c9(e,t){if(!t)return e;let n={};return t.sourceFenceChar&&(n.sourceFenceChar=t.sourceFenceChar),typeof t.sourceFenceLength==`number`&&(n.sourceFenceLength=t.sourceFenceLength),t.sourcePadded===!0&&(n.sourcePadded=!0),Object.keys(n).length===0?e:{...e,data:n}}function l9(e,t){if(e.length===0)return c9({type:`inlineCode`,value:``},t);if(e.every(e=>e.type===`text`))return c9({type:`inlineCode`,value:e.map(e=>e.value).join(``)},t);if(e.length===1&&`children`in e[0]){let n=e[0];return{...n,children:[l9(n.children,t)]}}return c9({type:`inlineCode`,value:u9(e)},t)}function u9(e){let t=``;for(let n of e)n.type===`text`?t+=n.value:`children`in n&&Array.isArray(n.children)?t+=u9(n.children):`value`in n&&typeof n.value==`string`&&(t+=n.value);return t}var sne=Z1;function cne(e,t){let n=e.nodes,r=e.marks,i={};n.paragraph&&(i.paragraph=(e,t,r)=>{let i=r.all(e).flat(),a=i.some(e=>e?.isBlock&&!e?.isInline),o=i.some(e=>e?.isInline||e?.isText||e?.isTextblock);if(a&&!o)return i.length===1?i[0]:i;if(a&&o){let e=i.filter(e=>!e?.isBlock||e?.isInline),t=i.filter(e=>e?.isBlock&&!e?.isInline),r=[],a=n.paragraph.createAndFill(null,e.length>0?e:null);return a&&r.push(a),r.push(...t),r.length===1?r[0]:r}return n.paragraph.createAndFill(null,i.length>0?i:null)}),n.blockquote&&(i.blockquote=oW(n.blockquote,e=>({sourceMarkerSpacings:e.data?.sourceMarkerSpacings??null}))),n.tableCell&&(i.tableCell=(e=>(t,r,i)=>{let a=i.all(t).flat();if(a.length>0&&n.paragraph){let t=n.paragraph.create(null,a);return e.createAndFill(null,[t])}return e.createAndFill(null,null)})(n.tableCell)),n.tableRow&&(i.tableRow=oW(n.tableRow)),n.table&&n.tableRow&&n.tableCell&&(i.table=(e,t,r)=>{let i=e.align??[],a=e.children??[],o=[];for(let e=0;e<a.length;e++){let t=a[e];if(t.type!==`tableRow`)continue;let s=t.children??[],c=[];for(let t=0;t<s.length;t++){let a=s[t];if(a.type!==`tableCell`)continue;let o=r.all(a).flat(),l=o.length>0&&n.paragraph?[n.paragraph.create(null,o)]:null,u=i[t]??null,d=e===0&&n.tableHeader?n.tableHeader:n.tableCell,f=a.data?.sourcePadding??null,p=d.createAndFill({align:u,sourcePadding:f},l);p&&c.push(p)}let l=n.tableRow.createAndFill(null,c.length>0?c:null);l&&o.push(l)}let s=e.data?.sourceDashCounts??null,c=e.data?.sourceOuterPipes??null,l=e.data?.sourceAlignmentPadding??null;return n.table.createAndFill({sourceDashCounts:s,sourceOuterPipes:c,sourceAlignmentPadding:l},o.length>0?o:null)}),n.image&&(i.image=e=>{let r=e.url??``,i=Y7(r,t.current.sourcePath);return n.image.createAndFill({src:i,alt:e.alt??null,title:e.title??null,sourceUrl:i===r?null:r})},n.imageReference?i.imageReference=e=>n.imageReference.createAndFill({alt:e.alt??``,label:e.label??e.identifier??``,identifier:e.identifier??``,referenceType:e.referenceType??`shortcut`}):i.imageReference=e=>n.image.createAndFill({src:``,alt:e.alt??null,title:null})),r.escapeMark&&(i.text=t=>{let n=t.value??``,i=typeof t.data?.sourceRaw==`string`?t.data.sourceRaw:null;if(!n&&!i)return null;if(i){let t=n.replaceAll(`\xA0`,` `);return r.sourceLiteral?e.text(t,[r.sourceLiteral.create({sourceRaw:i})]):e.text(t)}let a=t.data?.escapedChars,o=t.data?.entityRefSpans;if(!a?.length&&!o?.length)return e.text(n.replaceAll(`\xA0`,` `));let s=[...(a??[]).map(e=>({kind:`escape`,offset:e.offset,length:1})),...(o??[]).map(e=>({kind:`entity`,offset:e.offset,length:e.length,raw:e.raw}))];s.sort((e,t)=>e.offset-t.offset);let c=[];for(let e of s){let t=c[c.length-1];e.kind===`entity`&&t?.kind===`entity`&&t.offset+t.length===e.offset&&p2(t.raw)!==null&&u2(e.raw)?c[c.length-1]={kind:`entity`,offset:t.offset,length:t.length+e.length,raw:t.raw+e.raw}:c.push(e)}let l=[],u=0;for(let t of c){if(t.offset>u){let r=n.slice(u,t.offset).replaceAll(`\xA0`,` `);r&&l.push(e.text(r))}if(t.offset<n.length){let i=n.slice(t.offset,t.offset+t.length).replaceAll(`\xA0`,` `);if(i)if(t.kind===`escape`)l.push(e.text(i,[r.escapeMark.create()]));else if(r.sourceLiteral){let n=p2(t.raw);l.push(e.text(n??i,[r.sourceLiteral.create({sourceRaw:t.raw})]))}else l.push(e.text(i));u=t.offset+t.length}}if(u<n.length){let t=n.slice(u).replaceAll(`\xA0`,` `);t&&l.push(e.text(t))}return l.length===1?l[0]:l}),r.code&&(i.inlineCode=t=>e.text(t.value,[r.code.create({sourceFenceChar:t.data?.sourceFenceChar??"`",sourceFenceLength:typeof t.data?.sourceFenceLength==`number`?t.data.sourceFenceLength:1,sourcePadded:t.data?.sourcePadded===!0})]));let a=r.strike??r.delete;if(a&&(i.delete=sW(a,e=>({sourceDelimiter:e.data?.sourceDelimiter===`~`?`~`:`~~`}))),r.highlight&&(i.mark=sW(r.highlight)),r.comment&&(i.comment=sW(r.comment,e=>({sourceForm:e.data?.sourceForm??`percent`}))),n.commentBlock&&(i.commentBlock=oW(n.commentBlock,e=>({sourceForm:e.data?.sourceForm??`percent`,sourceLayout:e.data?.sourceLayout??`block`}))),r.emphasis&&(i.emphasis=sW(r.emphasis,e=>({sourceDelimiter:e.data?.sourceDelimiter??`*`}))),r.strong&&(i.strong=sW(r.strong,e=>({sourceDelimiter:e.data?.sourceDelimiter??`**`}))),n.heading&&(i.heading=oW(n.heading,e=>({level:e.depth,headingStyle:e.data?.sourceStyle??`atx`,sourceTrailingHashes:e.data?.sourceTrailingHashes??null,sourceUnderlineLength:e.data?.sourceUnderlineLength??null,sourceContiguousNext:e.data?.sourceContiguousNext??!1,sourceLeadingIndent:e.data?.sourceLeadingIndent??null,sourceInteriorSpacing:e.data?.sourceInteriorSpacing??null}))),n.codeBlock&&(i.code=t=>{let r=t.value?[e.text(t.value)]:[];return n.codeBlock.createAndFill({language:t.lang??null,meta:t.meta??null,fenceDelimiter:t.data?.sourceFenceChar??"`",fenceLength:t.data?.sourceFenceLength??3,sourceStyle:t.data?.sourceStyle??`fenced`,sourceClosingFenceLength:t.data?.sourceClosingFenceLength??null,sourceFenceIndent:t.data?.sourceFenceIndent??null,sourceInfoPadding:t.data?.sourceInfoPadding??null,sourceIndents:t.data?.sourceIndents??null},r)}),n.thematicBreak&&(i.thematicBreak=e=>n.thematicBreak.createAndFill({sourceRaw:e.data?.sourceRaw??`---`})),n.hardBreak&&(i.break=e=>n.hardBreak.createAndFill({hardBreakStyle:e.data?.sourceStyle??`spaces`})),n.list&&(i.list=oW(n.list,e=>({ordered:!!e.ordered,start:e.start??1,spread:!!e.spread,bulletMarker:e.data?.bulletMarker??null,listMarkerDelimiter:e.data?.listMarkerDelimiter??null}))),n.listItem&&(i.listItem=oW(n.listItem,e=>({checked:e.checked??null,spread:!!e.spread,sourceMarkerSpacing:e.data?.sourceMarkerSpacing??null,sourceOrdinal:e.data?.sourceOrdinal??null,sourceCheckboxChar:e.data?.sourceCheckboxChar??null,sourceContinuationIndent:e.data?.sourceContinuationIndent??null}))),r.link){let t=r.sourceLiteral;i.link=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[](${n.url??``})`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:n.url??``,title:n.title??null,linkStyle:n.data?.sourceStyle??`inline`,refLabel:null,sourceUrlForm:n.data?.sourceUrlForm??null,sourceTitleMarker:n.data?.sourceTitleMarker??null});return o.map(e=>e.mark(s.addToSet(e.marks)))},i.linkReference=(n,i,a)=>{if((n.children??[]).length===0){let r=typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:`[${n.label??``}][${n.identifier??``}]`;return r?t?e.text(r,[t.create({sourceRaw:r})]):e.text(r):null}let o=a.all(n).flat(),s=r.link.create({href:``,title:null,linkStyle:n.referenceType??`shortcut`,refLabel:n.label??n.identifier??null});return o.map(e=>e.mark(s.addToSet(e.marks)))}}n.htmlBlock&&(i.html=e=>n.htmlBlock.createAndFill({content:e.value??``}));let o=n.linkDefinition??n.linkRefDef;if(o){let e=!!o.spec.attrs?.url,t=!!o.spec.attrs?.href,n=!!o.spec.attrs?.identifier,r=!!o.spec.attrs?.sourceLayout,a=!!o.spec.attrs?.sourceTitleMarker;i.definition=i=>{let s={title:i.title??null};return n&&(s.identifier=i.identifier??``),s.label=i.label??i.identifier??``,e?s.url=i.url??``:t&&(s.href=i.url??``),r&&(s.sourceLayout=i.data?.sourceLayout??null),a&&(s.sourceTitleMarker=i.data?.sourceTitleMarker??null),o.createAndFill(s)}}if(n.jsxComponent){let r=e=>{if(e&&typeof e==`object`&&`sourceRaw`in e){let t=e.sourceRaw;if(typeof t==`string`)return t}};i.mdxJsxFlowElement=(e,i,a)=>{let o=e.name??``,s=s9.getOrWildcard(o),c=rne(e.attributes,s.props);if(o===`CommonMarkImage`&&typeof c.src==`string`){let e=c.src,n=Y7(e,t.current.sourcePath);n!==e&&(c.src=n,c.sourceUrl=e)}let l=a.all(e).flat();return n.jsxComponent.createAndFill({componentName:o,kind:`element`,attributes:e.attributes,sourceRaw:r(e.data)??``,sourceDirty:!1,props:c},l.length?l:void 0)};let a=(e,t)=>{let n=e.attributes?.find(e=>e.type===`mdxJsxAttribute`&&e.name===t);return n&&typeof n.value==`string`?n.value:null};i.mdxJsxTextElement=t=>{if(t.name===`InlineMath`&&n.mathInline){let e=a(t,`formula`)??``,r=a(t,`id`);return n.mathInline.create({formula:e,id:r??null})}if(t.name===`Tag`&&n.tag){let e=a(t,`value`)??``;return n.tag.create({value:e})}if(n.jsxInline){let i=r(t.data)??``;return n.jsxInline.createAndFill({},i?[e.text(i)]:null)}return n.jsxComponent.createAndFill({sourceRaw:r(t.data)??``})},i.mdxFlowExpression=e=>{let t=r(e.data)??`{${e.value??``}}`;return n.jsxComponent.createAndFill({kind:`expression`,sourceRaw:t,sourceDirty:!1})},i.mdxTextExpression=t=>{let n=r(t.data)??`{${t.value??``}}`;return e.text(n)}}return n.wikiLink&&(i.wikiLink=e=>n.wikiLink.createAndFill({target:e.data?.target??``,alias:e.data?.alias??null,anchor:e.data?.anchor??null,sourceTarget:e.data?.sourceTarget??null,sourceAnchor:e.data?.sourceAnchor??null,sourceAlias:e.data?.sourceAlias??null})),n.tag&&(i.tag=e=>n.tag.createAndFill({value:e.value})),n.wikiLinkEmbed&&(i.wikiLinkEmbed=(i,a)=>{let o=i.data?.target??``,s=i.data?.alias??null,c=i.data?.anchor??null,l=A2(o),{resolveEmbed:u,sourcePath:d}=t.current,f=u&&d?u(o,d)??null:null,p=f?`/${f}`:o,m=a?.type===`paragraph`&&Array.isArray(a.children)&&a.children.length===1;if(m&&sne.has(l)&&n.jsxComponent&&s9.has(`WikiEmbedImage`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedImage`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,alt:s??o,target:o,anchor:c,alias:s}});if(m&&Q1.has(l)&&n.jsxComponent&&s9.has(`WikiEmbedVideo`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedVideo`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,title:s??o,target:o,anchor:c,alias:s}});if(m&&e0.has(l)&&n.jsxComponent&&s9.has(`WikiEmbedAudio`))return n.jsxComponent.createAndFill({componentName:`WikiEmbedAudio`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,title:s??o,target:o,anchor:c,alias:s}});if(m&&t0.has(l)&&n.jsxComponent&&s9.has(`WikiEmbedFile`)){let{resolveSize:e}=t.current,r=e&&d?e(o,d)??null:null,i=r===null?null:o9(r);return n.jsxComponent.createAndFill({componentName:`WikiEmbedFile`,kind:`element`,attributes:[],sourceRaw:``,sourceDirty:!1,props:{src:p,target:o,anchor:c,alias:s,size:i}})}let h=s||(c?`${o}#${c}`:o);if(r.link){let t=r.link.create({href:p,title:null,linkStyle:`inline`,refLabel:null,sourceForm:`wikiembed`,target:o,anchor:c,alias:s});return e.text(h,[t])}throw Error("[wikiLinkEmbed handler] schema lacks `link` mark — cannot dispatch without violating the STOP rule against emitting PM wikiLinkEmbed server-side")}),n.mathInline&&(i.inlineMath=e=>n.mathInline.create({formula:e.value??``,sourceDelimiter:e.data?.sourceDelimiter??null})),i.math||=t=>{let r=t.value==null?`«unknown:${t.type}»`:t.value;return n.rawMdxFallback?(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled block mdast: ${t.type}`})),n.rawMdxFallback.createAndFill({reason:`Unhandled block mdast: ${t.type}`},r?[e.text(r)]:null)):null},i.inlineMath||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.type,reason:`Unhandled inline mdast: ${t.type}`})),t.value==null?e.text(`«unknown:${t.type}»`):e.text(t.value)),n.footnoteReference?i.footnoteReference=e=>n.footnoteReference.create({identifier:e.identifier,label:e.label??e.identifier}):i.footnoteReference||=t=>(console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteReference`,reason:`FootnoteReference extension missing — recovering [^id] source`})),e.text(`[^${t.label??t.identifier}]`)),n.footnoteDefinition?i.footnoteDefinition=oW(n.footnoteDefinition,e=>{let t=e;return{identifier:t.identifier,label:t.label??t.identifier}}):i.footnoteDefinition||=t=>{console.warn(JSON.stringify({event:`unknown-mdast-type`,type:`footnoteDefinition`,reason:`FootnoteDefinition extension missing — recovering [^id]: marker`}));let r=`[^${t.label??t.identifier}]: `;return n.paragraph?n.paragraph.create(null,e.text(r)):null},i.rawMdxFallbackMdast=t=>{if(!n.rawMdxFallback)return null;let r=t.position?{start:t.position.start?.offset??0,end:t.position.end?.offset??0}:{start:0,end:0};return console.warn(JSON.stringify({event:`unknown-mdast-type`,type:t.originalType,reason:`Unhandled mdast: ${t.originalType}`,unresolvedPosition:t.unresolvedPosition??!1})),n.rawMdxFallback.createAndFill({reason:`Unhandled mdast: ${t.originalType}`,originalSpan:r},t.value?[e.text(t.value)]:null)},i}function lne(e){let t={},n={},r=e.nodes,i=e.marks;r.paragraph&&(t.paragraph=fW(`paragraph`)),r.blockquote&&(t.blockquote=fW(`blockquote`,e=>{let t=e.attrs.sourceMarkerSpacings,n={};return Array.isArray(t)&&t.length>0&&(n.sourceMarkerSpacings=t),Object.keys(n).length>0?{data:n}:{}})),r.heading&&(t.heading=fW(`heading`,e=>({depth:e.attrs.level,data:{sourceStyle:e.attrs.headingStyle,sourceTrailingHashes:e.attrs.sourceTrailingHashes??void 0,sourceUnderlineLength:e.attrs.sourceUnderlineLength??void 0,sourceContiguousNext:e.attrs.sourceContiguousNext===!0?!0:void 0,sourceLeadingIndent:e.attrs.sourceLeadingIndent??void 0,sourceInteriorSpacing:e.attrs.sourceInteriorSpacing??void 0}}))),r.codeBlock&&(t.codeBlock=e=>{let t=e.attrs.sourceStyle===`indented`?`indented`:`fenced`;return{type:`code`,lang:t===`indented`?null:e.attrs.language??null,meta:t===`indented`?null:e.attrs.meta??null,value:e.textContent??``,data:{sourceFenceChar:e.attrs.fenceDelimiter,sourceFenceLength:e.attrs.fenceLength,sourceStyle:t,sourceClosingFenceLength:e.attrs.sourceClosingFenceLength??void 0,sourceFenceIndent:e.attrs.sourceFenceIndent??void 0,sourceInfoPadding:e.attrs.sourceInfoPadding??void 0,sourceIndents:e.attrs.sourceIndents??void 0}}}),r.thematicBreak&&(t.thematicBreak=e=>({type:`thematicBreak`,data:{sourceRaw:e.attrs.sourceRaw}})),r.hardBreak&&(t.hardBreak=e=>({type:`break`,data:{sourceStyle:e.attrs.hardBreakStyle}})),r.list&&(t.list=fW(`list`,e=>({ordered:e.attrs.ordered??!1,start:e.attrs.ordered?e.attrs.start??1:null,spread:e.attrs.spread??!1,data:{bulletMarker:e.attrs.bulletMarker,listMarkerDelimiter:e.attrs.listMarkerDelimiter}}))),r.listItem&&(t.listItem=(e,t,n)=>{let r=n.all(e),i=r.length>1&&one(r[0])?r.slice(1):r,a={};return typeof e.attrs.sourceMarkerSpacing==`number`&&(a.sourceMarkerSpacing=e.attrs.sourceMarkerSpacing),typeof e.attrs.sourceOrdinal==`number`&&(a.sourceOrdinal=e.attrs.sourceOrdinal),e.attrs.sourceCheckboxChar===`X`&&(a.sourceCheckboxChar=`X`),typeof e.attrs.sourceContinuationIndent==`number`&&(a.sourceContinuationIndent=e.attrs.sourceContinuationIndent),{type:`listItem`,checked:e.attrs.checked??null,spread:e.attrs.spread??!1,...Object.keys(a).length>0?{data:a}:{},children:i}}),r.table&&(t.table=(e,t,n)=>{let r=n.all(e),i=[],a=e.firstChild;a&&a.forEach(e=>{let t=e.attrs.align;i.push(t===`left`||t===`right`||t===`center`?t:null)});let o=r.filter(e=>e.type===`tableRow`),s=e.attrs.sourceDashCounts,c={};Array.isArray(s)&&s.length>0&&(c.sourceDashCounts=s);let l=e.attrs.sourceOuterPipes;typeof l==`object`&&l&&typeof l.leading==`boolean`&&typeof l.trailing==`boolean`&&(c.sourceOuterPipes=l);let u=e.attrs.sourceAlignmentPadding;Array.isArray(u)&&u.length>0&&(c.sourceAlignmentPadding=u);let d=Object.keys(c).length>0?c:void 0,f={type:`table`,align:i,children:o};return d&&(f.data=d),f}),r.tableRow&&(t.tableRow=fW(`tableRow`));let a=e=>{let t=e.attrs.sourcePadding,n={};return typeof t==`object`&&t&&typeof t.left==`number`&&typeof t.right==`number`&&(n.sourcePadding=t),Object.keys(n).length>0?{data:n}:{}};if(r.tableCell&&(t.tableCell=fW(`tableCell`,a)),r.tableHeader&&(t.tableHeader=fW(`tableCell`,a)),r.image&&(t.image=e=>({type:`image`,url:e.attrs.sourceUrl??e.attrs.src,alt:e.attrs.alt,title:e.attrs.title})),r.imageReference&&(t.imageReference=e=>{let t=e.attrs.label??``,n=e.attrs.identifier??t;return{type:`imageReference`,alt:e.attrs.alt??``,identifier:n,label:t||n,referenceType:e.attrs.referenceType??`shortcut`}}),r.htmlBlock&&(t.htmlBlock=e=>({type:`html`,value:e.attrs.content})),r.linkDefinition??r.linkRefDef){let e=r.linkDefinition?`linkDefinition`:`linkRefDef`;t[e]=e=>{let t={},n=e.attrs.sourceLayout;(n===`multiline`||n===`inline`)&&(t.sourceLayout=n);let r=e.attrs.sourceTitleMarker;(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r);let i={type:`definition`,identifier:e.attrs.identifier??e.attrs.label??``,label:e.attrs.label??e.attrs.identifier??``,url:e.attrs.url??e.attrs.href??``,title:e.attrs.title};return Object.keys(t).length>0&&(i.data=t),i}}if(r.jsxComponent&&(t.jsxComponent=(e,t,n)=>{if(e.attrs.kind===`expression`)return{type:`html`,value:e.attrs.sourceRaw??``};let r=e.attrs.componentName||null,i=Array.isArray(e.attrs.attributes)?e.attrs.attributes:[];return!ane(e)&&e.attrs.sourceRaw?{type:`mdxJsxFlowElement`,name:r,attributes:i,children:[],data:{sourceRaw:String(e.attrs.sourceRaw)}}:s9.getOrWildcard(r??`*`).serialize(e,{all:e=>n.all(e),registry:s9,serializeChildren:()=>{throw Error(`SerializeContext.serializeChildren is not available in the PM→mdast handler. Compat descriptors that need markdown-byte body rendering must emit a marker mdast node and let the to-markdown handler render the body via state.containerFlow.`)}})}),r.rawMdxFallback&&(t.rawMdxFallback=e=>{let t=e.textContent??``,n=typeof e.attrs.reason==`string`?e.attrs.reason:``,r=e.attrs.originalSpan;return{type:`rawMdxFallback`,value:t,data:{reason:n,originalSpan:r&&typeof r==`object`&&`start`in r&&`end`in r?{start:Number(r.start)||0,end:Number(r.end)||0}:{start:0,end:0}}}}),r.jsxInline&&(t.jsxInline=e=>{let t=e.attrs.sourceRaw||e.textContent||``;return{type:`mdxJsxTextElement`,name:null,attributes:[],children:[],data:{sourceRaw:String(t)}}}),r.mathInline&&(t.mathInline=e=>{let t=e.attrs.formula??``,n=e.attrs.id;if(typeof n==`string`&&n.length>0)return{type:`mdxJsxTextElement`,name:`InlineMath`,attributes:[{type:`mdxJsxAttribute`,name:`formula`,value:t},{type:`mdxJsxAttribute`,name:`id`,value:n}],children:[]};let r=e.attrs.sourceDelimiter;return{type:`inlineMath`,value:t,...typeof r==`string`&&r.length>0?{data:{sourceDelimiter:r}}:{}}}),r.wikiLink&&(t.wikiLink=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLink`,value:i,data:{target:t,anchor:n,alias:r,sourceTarget:typeof e.attrs.sourceTarget==`string`?e.attrs.sourceTarget:null,sourceAnchor:typeof e.attrs.sourceAnchor==`string`?e.attrs.sourceAnchor:null,sourceAlias:typeof e.attrs.sourceAlias==`string`?e.attrs.sourceAlias:null},children:[{type:`text`,value:i}]}}),r.tag&&(t.tag=e=>({type:`tag`,value:String(e.attrs.value??``)})),r.wikiLinkEmbed&&(t.wikiLinkEmbed=e=>{let t=e.attrs.target??``,n=e.attrs.anchor??null,r=e.attrs.alias??null,i=r||(n?`${t}#${n}`:t);return{type:`wikiLinkEmbed`,value:i,data:{target:t,anchor:n,alias:r},children:[{type:`text`,value:i}]}}),i.emphasis&&(n.emphasis=pW(`emphasis`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),i.strong&&(n.strong=pW(`strong`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter}}))),i.code&&(n.code=(e,t,n)=>{let r=e.attrs.sourceFenceChar,i=e.attrs.sourceFenceLength;return l9(n,{sourceFenceChar:r,sourceFenceLength:i,sourcePadded:e.attrs.sourcePadded===!0?!0:void 0})}),i.strike??i.delete){let e=i.strike?`strike`:`delete`;n[e]=pW(`delete`,e=>({data:{sourceDelimiter:e.attrs.sourceDelimiter===`~`?`~`:`~~`}}))}return i.highlight&&(n.highlight=pW(`mark`)),i.comment&&(n.comment=pW(`comment`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`}}))),r.commentBlock&&(t.commentBlock=fW(`commentBlock`,e=>({data:{sourceForm:e.attrs.sourceForm===`html`?`html`:`percent`,sourceLayout:e.attrs.sourceLayout===`inline`?`inline`:`block`}}))),r.footnoteReference&&(t.footnoteReference=e=>{let t=String(e.attrs.identifier??``);return{type:`footnoteReference`,identifier:t,label:e.attrs.label?String(e.attrs.label):t}}),r.footnoteDefinition&&(t.footnoteDefinition=fW(`footnoteDefinition`,e=>({identifier:String(e.attrs.identifier??``),label:e.attrs.label?String(e.attrs.label):String(e.attrs.identifier??``)}))),i.link&&(n.link=(e,t,n)=>{if(e.attrs.sourceForm===`wikiembed`){let t=typeof e.attrs.target==`string`&&e.attrs.target.length>0?e.attrs.target:e.attrs.href??``,r=typeof e.attrs.anchor==`string`&&e.attrs.anchor.length>0?e.attrs.anchor:null,i=typeof e.attrs.alias==`string`&&e.attrs.alias.length>0?e.attrs.alias:null,a=i||(r?`${t}#${r}`:t),o=n.map(e=>`value`in e&&typeof e.value==`string`?e.value:``).join(``);return o!==a&&o.trim().length>0&&!o.includes(`]]`)&&(i=o,a=o),{type:`wikiLinkEmbed`,value:a,data:{target:t,anchor:r,alias:i},children:[{type:`text`,value:a}]}}let r=e.attrs.linkStyle;if(r===`autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`autolink`}};if(r===`gfm-autolink`)return{type:`link`,url:e.attrs.href??``,title:null,children:n,data:{sourceStyle:`gfm-autolink`}};if(r===`inline`||!r){let t={};e.attrs.sourceUrlForm===`angle-bracketed`&&(t.sourceUrlForm=`angle-bracketed`);let r=e.attrs.sourceTitleMarker;return(r===`single`||r===`double`||r===`paren`)&&(t.sourceTitleMarker=r),{type:`link`,url:e.attrs.href??``,title:e.attrs.title??null,children:n,...Object.keys(t).length>0?{data:t}:{}}}return{type:`linkReference`,identifier:(e.attrs.refLabel??``).toLowerCase(),label:e.attrs.refLabel,referenceType:r,children:n}}),i.escapeMark&&(n.escapeMark=(e,t,n)=>{for(let e of n)if(e.type===`text`&&e.value){let t=e;t.data??={},t.data.escapedChars??=[];for(let e=0;e<t.value.length;e++)t.data.escapedChars.push({offset:e,char:t.value[e]})}return n.length===1?n[0]:n}),i.sourceLiteral&&(n.sourceLiteral=(e,t,n)=>{let r=typeof e.attrs.sourceRaw==`string`?e.attrs.sourceRaw:``;if(n.length===1&&n[0]?.type===`text`){let e=n[0],t=r||e.value;return h2(t,e.value)&&(e.data??={},e.data.sourceRaw=t),e}return{type:`text`,value:n.filter(e=>e.type===`text`).map(e=>e.value??``).join(``)||r}}),{nodeHandlers:t,markHandlers:n}}var une=/\p{M}+/gu,dne=/[^\p{L}\p{N}]+/gu,fne=/^-+|-+$/g;function d9(e){return e.trim().normalize(`NFKD`).replace(une,``).toLowerCase().replace(dne,`-`).replace(fne,``)}function pne(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function mne(e,t){let n=d9(e);return n?pne(n,t):``}function f9(e,t){let n=d9(e);return t?`#${n}-${d9(t)}`:`#${n}`}var p9=new Set([`img`,`video`,`audio`,`mark`]),hne=new Map(O6.flatMap(e=>e.surface===`compat`&&p9.has(e.rendersAs)?[[e.name,e]]:[]));function m9(e){let t={};for(let n of e.attributes){if(n.type!==`mdxJsxAttribute`)return null;let e=n.name.toLowerCase();if(!(e.length>=3&&e.startsWith(`on`)))if(n.value===null)t[n.name]=!0;else if(typeof n.value==`string`)t[n.name]=n.value;else return null}return t}function h9(e){let t=e.name;if(!t||!p9.has(t))return null;let n=m9(e);return n===null?null:{type:`element`,tagName:t,properties:n,children:[]}}function g9(e){let t=e.name;if(!t)return null;let n=hne.get(t);if(!n)return null;let r=m9(e);if(r===null)return null;let i=n.translateProps(r),a={};for(let[e,t]of Object.entries(i))(typeof t==`string`||typeof t==`boolean`)&&(a[e]=t);return{type:`element`,tagName:n.rendersAs,properties:a,children:[]}}var gne=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-link`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:f9(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},_ne=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-embed`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:f9(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},vne=(e,t)=>{let n=t,r=h9(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=g9(n);if(i){e.patch(t,i);let n=e.applyData(t,i);return n.tagName===`img`?{type:`element`,tagName:`p`,properties:{},children:[n]}:n}let a={type:`element`,tagName:`pre`,properties:{className:[`mdx-component`]},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]}]};return e.patch(t,a),e.applyData(t,a)},yne=(e,t)=>{let n=t,r=h9(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=g9(n);if(i)return e.patch(t,i),e.applyData(t,i);let a={type:`element`,tagName:`span`,properties:{className:[`mdx-inline`],dataJsxInline:``},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]};return e.patch(t,a),e.applyData(t,a)},bne=(e,t)=>{let n=t,r=n.data.reason||`unknown`,i=n.value||``,a=r.replace(/--/g,`—`),o={type:`comment`,value:` Parse error: ${a} `},s={type:`element`,tagName:`pre`,properties:{className:[`mdx-fallback`],dataRawMdxFallback:``,dataReason:a},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:i}]}]};return e.patch(t,s),[o,e.applyData(t,s)]},xne=(e,t)=>{let n={type:`element`,tagName:`mark`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)};function _9(e){if(typeof e!=`object`||!e)return``;let t=e;return typeof t.value==`string`?t.value:Array.isArray(t.children)?t.children.map(_9).join(``):``}var v9={wikiLink:gne,wikiLinkEmbed:_ne,mdxJsxFlowElement:vne,mdxJsxTextElement:yne,rawMdxFallback:bne,mark:xne,tag:(e,t)=>{let n=t.value,r={type:`element`,tagName:`a`,properties:{className:[`tag`],dataTag:n,href:`#tag/${n}`},children:[{type:`text`,value:`#${n}`}]};return e.patch(t,r),e.applyData(t,r)},comment:(e,t)=>{let n={type:`comment`,value:_9(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},commentBlock:(e,t)=>{let n={type:`comment`,value:_9(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`sup`,properties:{id:`fnref-${n}`,dataFootnoteRef:``,dataFootnoteId:n,className:[`footnote-ref`]},children:[{type:`element`,tagName:`a`,properties:{href:`#fn-${n}`,className:[`footnote-ref-link`]},children:[{type:`text`,value:`[${n}]`}]}]};return e.patch(t,r),e.applyData(t,r)},footnoteDefinition:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`aside`,properties:{id:`fn-${n}`,dataFootnoteDef:``,dataFootnoteId:n,className:[`footnote-def`]},children:[{type:`element`,tagName:`div`,properties:{className:[`footnote-body`]},children:e.all(t)},{type:`element`,tagName:`a`,properties:{href:`#fnref-${n}`,className:[`footnote-backref`],ariaLabel:`Back to reference`},children:[{type:`text`,value:`↩`}]}]};return e.patch(t,r),e.applyData(t,r)}},Sne=/url\s*\(\s*['"]?\s*(?:javascript|vbscript|data)\s*:/i,Cne=/\bexpression\s*\(/i,wne=1e4;function Tne(e){return!(e.length>wne||Sne.test(e)||Cne.test(e))}function y9(e){for(let t of e.split(`,`)){let e=t.trim();if(e!==``&&!z0(e.split(/\s+/)[0]??``))return!1}return!0}var Ene={a:[`href`,`title`],img:[`src`,`alt`,`title`],video:[`src`,`title`],audio:[`src`,`title`],code:[`className`]},Dne=new Set([`href`,`src`]),One=yV(`<>`),b9=()=>e=>{qF(e,`element`,e=>{let t=Ene[e.tagName.toLowerCase()],n=e.properties;if(!(!t||!n))for(let e of t){let t=n[e];if(Array.isArray(t)){let r=t.map(e=>typeof e==`string`?K8(e):e);r.some((e,n)=>e!==t[n])&&(n[e]=r);continue}if(typeof t!=`string`)continue;let r;if(Dne.has(e))if(t===`<>`||t===One)r=``;else{let e=K8(t);r=e===t?t:yV(e)}else r=K8(t);r!==t&&(n[e]=r)}})},x9=()=>e=>{qF(e,`element`,e=>{let t=e.tagName.toLowerCase(),n=e.properties;if(!n)return;if(t===`a`||t===`area`||t===`link`||t===`base`){let e=n.href;typeof e==`string`&&!z0(e)&&delete n.href}if(t===`img`||t===`iframe`||t===`script`||t===`embed`||t===`source`||t===`audio`||t===`video`||t===`track`){let e=n.src;typeof e==`string`&&!z0(e)&&delete n.src}if(t===`form`){let e=n.action;typeof e==`string`&&!z0(e)&&delete n.action}if(t===`img`||t===`source`){let e=n.srcSet;typeof e==`string`&&!y9(e)&&delete n.srcSet;let t=n.srcset;typeof t==`string`&&!y9(t)&&delete n.srcset}if(t===`video`){let e=n.poster;typeof e==`string`&&!z0(e)&&delete n.poster}let r=n.style;typeof r==`string`&&!Tne(r)&&delete n.style})};function kne(e){let t=LU().use(sY,{handlers:v9}).use(b9).use(x9).use(bJ),n=t.runSync(e);return String(t.stringify(n))}function Ane(e){let t=LU().use(FG).use(PW,[`yaml`]).use(D7).use(OU).use(U7).use(sY,{handlers:v9}).use(b9).use(x9).use(bJ);return String(t.processSync(e))}Sq(),FK(),IK(),A({docName:m4,summary:g4,content:E().optional(),...h4}).loose(),A({docName:m4,summary:g4,markdown:E(),position:j([`append`,`prepend`,`replace`]).optional(),extension:j(F1).optional(),...h4}).loose(),A({docName:m4,summary:g4,find:E().min(1),replace:E(),offset:D().int().nonnegative().optional(),...h4}).loose(),A({docName:m4,connectionId:E().min(1),scope:j([`last`,`session`,`file`]).optional(),...h4}).loose();var S9=A({value:E(),truncatedFrom:D().int().nonnegative().optional(),hint:E().optional()}).loose(),jne=Ka(`kind`,[A({kind:M(`inline`),content:E()}),A({kind:M(`truncated`),byteLength:D().int().nonnegative(),hint:E()})]),C9=A({kind:M(`content-divergence`),intendedBytes:D().int().nonnegative(),actualBytes:D().int().nonnegative(),byteDelta:D().int(),divergenceType:E().optional(),currentState:jne.optional(),hint:E().optional()}).loose(),Mne=A({type:M(`orphan`),parentCandidates:k(E()),message:E()}).loose(),w9=A({kind:M(`disk-edit-reconciled`),intendedBytes:D().int().nonnegative(),actualBytes:D().int().nonnegative(),byteDelta:D().int(),mergeOutcome:E().optional(),hint:E().optional()}).loose(),T9=Ka(`kind`,[C9,w9]),E9=k(Ka(`kind`,[C9,w9,A({kind:M(`mermaid-parse-error`),fenceIndex:D().int().positive(),fenceFirstLine:E(),message:E(),line:D().int().positive().optional()}).loose()])).min(1);A({timestamp:E().min(1),summary:S9.optional(),warning:T9.optional(),warnings:E9.optional()}).loose(),A({timestamp:E().min(1),subscriberCount:D().int().nonnegative(),systemSubscriberCount:D().int().nonnegative(),hints:k(Mne).optional(),summary:S9.optional(),warning:T9.optional(),warnings:E9.optional()}).loose(),A({timestamp:E().min(1),subscriberCount:D().int().nonnegative(),systemSubscriberCount:D().int().nonnegative(),summary:S9.optional(),warning:T9.optional(),warnings:E9.optional()}).loose(),A({docName:E().min(1),scope:j([`last`,`session`]),undone:O()}).loose(),A({docName:m4,patch:Xa(E(),Wa([e$,Fa()])),types:Xa(E(),j(ZQ)).optional(),summary:g4,...h4}).loose(),A({timestamp:E().min(1),subscriberCount:D().int().nonnegative(),systemSubscriberCount:D().int().nonnegative(),appliedKeys:k(E()),summary:S9.optional(),warning:T9.optional(),warnings:E9.optional()}).loose(),A({entries:k(A({level:j([`info`,`warn`,`error`]),message:E().max(I4),event:E().optional(),fields:Xa(E(),La()).optional(),ts:D().optional(),sourceId:E().optional(),lineNumber:D().optional()}).loose()).max(100)}).loose(),A({accepted:D().int().min(0)}).loose();var Nne=A({status:E().min(1),reason:E()}).loose();A({docName:E().min(1),content:E(),lifecycle:Nne.nullable()}).loose();var D9=A({kind:j([`document`,`asset`,`folder`,`file`]).default(`document`),docName:E().min(1).optional(),docExt:E().min(1).default(`.md`),size:D().int().nonnegative(),modified:E().min(1),isSymlink:O().default(!1),canonicalDocName:E().nullable().default(null),targetPath:E().nullable().default(null),path:E().min(1).optional(),assetExt:E().min(1).optional(),mediaKind:j([`image`,`video`,`audio`,`pdf`,`text`]).nullable().optional(),referencedBy:k(E().min(1)).optional(),hasChildren:O().optional()}).loose().refine(e=>e.kind===`document`?e.docName!==void 0&&e.path===void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.kind===`folder`?e.docName===void 0&&e.path!==void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0:e.kind===`file`?e.path!==void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.path!==void 0&&e.assetExt!==void 0&&e.referencedBy!==void 0&&e.hasChildren===void 0,{message:`document/asset/folder/file kind must match its required fields (document → docName; asset → path+assetExt+referencedBy; folder → path only, no docName; file → path, no mediaKind/referencedBy/hasChildren)`}),Pne=A({documents:k(D9),truncated:O().optional()}).loose(),Fne=A({source:E().min(1),anchor:E().nullable(),title:E(),snippet:E().nullable()}).loose(),Ine=A({docName:E().min(1),backlinks:k(Fne)}).loose();A({counts:Xa(E().min(1),D().int().nonnegative())}).loose();var Lne=Ka(`kind`,[A({kind:M(`doc`),docName:E().min(1),anchor:E().nullable(),title:E(),snippet:E().nullable()}).loose(),A({kind:M(`external`),url:E().min(1),title:E(),snippet:E().nullable()}).loose()]),Rne=A({docName:E().min(1),forwardLinks:k(Lne)}).loose(),zne=Ka(`kind`,[A({id:E().min(1),kind:M(`doc`),docName:E().min(1),anchor:E().nullable(),label:E(),cluster:E().nullable(),category:E().nullable(),tags:k(E()).nullable()}).loose(),A({id:E().min(1),kind:M(`external`),url:E().min(1),label:E()}).loose()]),Bne=A({source:E().min(1),target:E().min(1)}).loose(),Vne=A({nodes:k(zne),links:k(Bne)}).loose(),Hne=A({ts:D().int().min(0),url:E(),method:E(),ua:E().optional(),origin:E().optional(),referer:E().optional(),host:E().optional(),remote:E().optional(),secChUa:E().optional(),secChUaMobile:E().optional(),secChUaPlatform:E().optional(),secFetchSite:E().optional(),secFetchDest:E().optional(),secFetchMode:E().optional(),secFetchUser:E().optional()}).loose(),Une=A({app:Wa([M(`cursor`),M(`codex`),M(`claude`),Fa()]),signals_fired:k(E())}).loose();A({entries:k(Hne),count:D().int().min(0),detection:Une}).loose(),A({writers:k(A({id:E().min(1),name:E().optional(),email:E().optional()}).loose()).optional(),summary:g4,...h4}).loose(),A({checkpointRef:E().min(1)}).loose();var Wne=A({v:D().int().optional(),id:E().min(1),name:E().min(1),colorSeed:E().optional(),docs:k(E()),summaries:k(E()).optional()}).loose();A({entries:k(A({sha:E().min(1),timestamp:E().min(1),author:E(),authorEmail:E(),type:j([`checkpoint`,`wip`,`upstream`,`park`]),message:E(),contributors:k(Wne),checkpoint:La().nullable()}).loose()),total:D().int().nonnegative().optional(),truncated:O().optional(),hasMore:O().optional()}).loose(),A({sha:E().regex(/^[0-9a-f]{40}$/i),content:E(),timestamp:E(),author:E()}).loose();var Gne=A({contentDir:E().min(1),pathSeparator:j([`/`,`\\`]),symlinkResolved:O()}).loose();k(Ka(`source`,[A({docName:E().min(1),timestamp:E().min(1),size:D().int().nonnegative(),source:M(`flat`)}).loose(),A({docName:E().min(1),timestamp:E().min(1),source:M(`timeline`),sha:E().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."});var Kne=A({orphans:k(A({docName:E().min(1),title:E()}).loose())}).loose(),qne=A({hubs:k(A({docName:E().min(1),title:E(),count:D().int().nonnegative()}).loose())}).loose(),Jne=A({source:E().min(1),title:E(),snippet:E().nullable()}).loose();A({deadLinks:k(A({target:E().min(1),sources:k(Jne)}).loose())}).loose(),A({target:A({docName:E().min(1),title:E(),aliases:k(E())}).loose(),mentions:k(A({source:E().min(1),excerpt:E(),offset:D().int().nonnegative()}).loose()),truncated:O()}).loose(),A({projectPath:E().min(1)}).loose();var Yne=j([`not-a-git-worktree`,`init-failed`]);Ka(`ok`,[A({ok:M(!0),projectPath:E().min(1)}).loose(),A({ok:M(!1),reason:Yne,message:E().min(1)}).loose()]),A({host:E().min(1).optional()}).loose(),A({key:E().min(1)}).loose(),A({keyPresent:O()}).loose(),A({name:E().refine(e=>e.trim().length>0,{message:`name must be non-empty`}),email:E().refine(e=>e.trim().length>0,{message:`email must be non-empty`})}).loose(),A({authenticated:O()}).loose(),A({}).loose();var Xne=A({stackIndex:D().int().min(0),ts:D().int().min(0),additions:D().int().min(0),deletions:D().int().min(0)}).loose(),Zne=A({docName:E().min(1),additionsTotal:D().int().min(0),deletionsTotal:D().int().min(0),lastTs:D().int().min(0),bursts:k(Xne)}).loose(),Qne=A({displayName:E().min(1),color:E().min(1),icon:E().optional(),connectionId:E().min(1)}).loose(),$ne=A({sessionAlive:O(),agent:Qne.nullable(),files:k(Zne)}).loose(),ere=A({diff:E(),generatedAt:D().int().min(0)}).loose();A({}).loose(),A({}).loose(),A({}).loose(),A({}).loose(),A({}).loose(),A({}).loose();var tre=A({displayName:E().min(1),icon:E(),color:E().min(1),currentDoc:E().nullable(),mode:j([`idle`,`writing`]),ts:D().int().min(0)}).loose();A({presence:Xa(E().min(1),tre)}).loose(),Xa(E().min(1),O()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`}),A({path:E().min(1,`path must be non-empty`)}).loose(),A({}).loose();var nre=A({fromDocName:E().min(1),toDocName:E().min(1)}).loose(),rre=A({fromPath:E().min(1),toPath:E().min(1)}).loose();A({}).loose(),A({path:E().min(1),...h4,summary:g4}).loose();var ire=A({docName:E().min(1)}).loose();A({path:E().min(1),...h4,summary:g4}).loose();var are=A({path:E().min(1)}).loose();A({kind:j([`file`,`folder`]),path:E().min(1),...h4,summary:g4}).loose();var ore=A({kind:j([`file`,`folder`]),path:E().min(1),duplicatedDocNames:k(E().min(1))}).loose(),sre=A({pages:k(A({docName:E().min(1),title:E(),docExt:E().min(1),size:D().int().nonnegative(),modified:E().min(1),icon:E().min(1).max(2048).optional()}).loose())}).loose(),cre=A({level:D().int().min(1).max(6),text:E(),slug:E()}).loose(),lre=A({docName:E().min(1),headings:k(cre)}).loose(),ure=A({docName:E().min(1),rewrites:D().int().nonnegative()}).loose();A({kind:j([`file`,`folder`,`asset`]),fromPath:E().min(1),toPath:E().min(1),...h4,summary:g4}).loose();var dre=A({renamed:k(nre),renamedAssets:k(rre),rewrittenDocs:k(ure).optional(),summary:S9.optional()}).loose();A({kind:j([`file`,`folder`,`asset`]),path:E().min(1),...h4}).loose();var fre=A({deletedDocNames:k(E().min(1))}).loose();A({kind:j([`file`,`folder`,`asset`]),path:E().min(1),...h4,summary:g4}).loose();var pre=A({deletedDocNames:k(E().min(1))}).loose();A({docName:E().min(1),commitSha:E().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:g4,...h4}).loose(),A({restoredFrom:E().min(1),timestamp:E().min(1),summary:S9.optional(),warning:C9.optional(),warnings:E9.optional()}).loose();var mre=j([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),hre=A({label:E().min(1),webUrl:ha().nullable()}).loose(),gre=Ka(`checkStatus`,[A({checkStatus:M(`allowed`)}).loose(),A({checkStatus:M(`denied`),deniedReason:j([`no-collaborator`,`private-no-access`,`repo-not-found`])}).loose(),A({checkStatus:M(`unknown`),unknownError:j([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`]).optional()}).loose()]),O9=j([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`semantic-protected-branch`]);A({state:mre,lastSyncUtc:E().nullable(),lastFetchUtc:E().nullable(),lastPushedSha:E().nullable(),ahead:D().int().min(0),behind:D().int().min(0),consecutiveFailures:D().int().min(0),conflictCount:D().int().min(0),hasRemote:O(),syncEnabled:O(),identityUnresolved:O(),remote:hre.nullable().optional(),pushError:E().optional(),pushErrorCode:O9.optional(),pullError:E().optional(),pullErrorCode:O9.optional(),pausedReason:E().optional(),pushPermission:gre.optional()}).loose(),A({op:j([`sync`,`push`,`pull`]).optional()}).loose(),A({op:j([`sync`,`push`,`pull`])}).loose(),A({conflicts:k(A({file:E().min(1),detectedAt:E().min(1),oursSha:E().optional(),theirsSha:E().optional(),baseSha:E().optional()}).loose())}).loose(),A({file:E().min(1),strategy:j([`mine`,`theirs`,`content`,`delete`]),content:E().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0&&e.content!==``,{message:`content must be a non-empty string when strategy is 'content'`,path:[`content`]}),A({}).loose(),A({file:E().min(1),base:E(),ours:E(),theirs:E(),kind:j([`both-modified`,`delete-modify`,`modify-delete`]),lifecycleStatus:E().nullable()}).loose(),A({plan:yo(e=>e!==void 0,{message:`plan is required`})}).loose(),A({plan:yo(e=>e!==void 0,{message:`plan is required`})}).loose(),A({result:yo(e=>e!==void 0,{message:`result is required`})}).loose();var _re=A({path:E().min(1),summary:E().min(1)}).loose(),vre=A({files:D().int().nonnegative(),folders:D().int().nonnegative()}).loose();A({packs:k(A({id:E().min(1),name:E().min(1),description:E().min(1),defaultSubfolder:E().optional(),folders:k(_re),entryCounts:vre}).loose())}).loose(),A({noOpen:O().optional(),out:E().min(1).optional()}).loose();var yre=A({reason:j([`unsupported-platform`,`spawn-error`]),message:E()}).loose();Ka(`status`,[A({status:M(`installed`),outputPath:E(),size:D().int().nonnegative(),sha256:E(),skillVersion:E()}).loose(),A({status:M(`built`),outputPath:E(),size:D().int().nonnegative(),sha256:E(),skillVersion:E(),handoffError:yre.optional()}).loose(),A({status:M(`failed`),buildError:E()}).loose(),A({status:M(`skip-current`),skillVersion:E(),recordedAt:E().optional()}).loose()]),A({tags:k(A({name:E().min(1),count:D().int().nonnegative(),isLeaf:O()}).loose())}).loose();var bre=A({docName:E().min(1),title:E(),matchingTags:k(E().min(1)),snippet:E().nullable()}).loose();A({name:E().min(1),docs:k(bre)}).loose(),A({folder:La(),frontmatter_local:Xa(E(),La()).nullable()}).loose(),A({path:E(),frontmatter:Xa(E(),La()).optional()}).loose(),A({applied:La()}).loose();var k9=Xa(E(),La()).meta({description:`Free-form frontmatter map embedded in template payloads.`});A({template:A({name:E().min(1),folder:E(),scope:j([`local`,`inherited`]),path:E().min(1),frontmatter:k9,body:E()}).strict()}).strict();var xre=A({templates:k(A({name:E().min(1),title:E().optional(),description:E().optional(),path:E().min(1),source_folder:E()}).strict()),truncated:O()}).strict();A({folder:E(),name:E(),body:E().optional(),frontmatter:k9.optional(),...h4,summary:g4}).strict(),A({path:E().min(1),created:O(),warnings:k(E())}).strict(),A({existed:O(),path:E().min(1)}).strict(),A({fromFolder:E(),fromName:E(),toFolder:E(),toName:E(),body:E().optional(),frontmatter:k9.optional(),...h4,summary:g4}).strict(),A({from:E().min(1),to:E().min(1),committed:O()}).strict(),A({query:E().optional(),intent:j([`autocomplete`,`full_text`,`omnibar`]).optional(),scopes:k(j([`page`,`folder`,`content`,`file`])).optional(),scope:E().optional(),limit:D().int().nonnegative().optional(),semantic:O().optional(),source:j([`omnibar`,`mcp`,`http`]).optional()}).loose();var Sre=A({kind:j([`page`,`folder`,`content`,`file`]),path:E().min(1),title:E(),score:D(),signals:Xa(E(),La()),snippet:E().optional()}).loose(),Cre=A({capable:O(),applied:O(),coverage:A({embedded:D().int().nonnegative(),total:D().int().nonnegative()})}).loose();A({enabled:O(),keyPresent:O(),keySource:j([`file`,`env`]).nullable(),keyHint:E().nullable(),ready:O(),capable:O(),embedded:D().int().nonnegative(),total:D().int().nonnegative()}).loose(),A({query:E(),intent:j([`autocomplete`,`full_text`,`omnibar`]),results:k(Sre),elapsedMs:D().nonnegative(),semantic:Cre.optional(),truncated:O().optional()}).loose();var wre=A({version:E().min(1),recordedAt:E().min(1)}).loose();A({currentVersion:E().min(1),targets:Xa(E(),wre.nullable())}).loose();var Tre=`server-info`,Ere=`branch-switched`,Dre=`disk-ack`,Ore=`config-validation-rejected`,kre=`config-ignore-nested-error`,A9=j([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`]),Are=A({v:M(1),ch:M(Tre),seq:D(),serverInstanceId:E().min(1),currentBranch:E().min(1).optional()}).loose(),jre=A({v:M(1),ch:M(Ere),seq:D(),branch:E().min(1)}).loose(),Mre=A({v:M(1),ch:A9,seq:D()}).loose(),Nre=A({v:M(1),ch:M(Dre),seq:D(),docName:E().min(1),sv:E().min(1)}).loose(),Pre=A({v:M(1),ch:M(Ore),seq:D(),docName:E().min(1),error:Ou}).loose(),Fre=A({v:M(1),ch:M(kre),seq:D(),path:E().min(1),error:E().min(1)}).loose(),Ire={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},j9=new WeakMap;function Lre(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function M9(e){return e.trim().toLowerCase()}function N9(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function Rre(e){let t=N9(e.path),n=e.title?.trim()||t,r=e.modifiedTs??0,i=e.path.split(`/`).filter(Boolean),a=new Set(i),o=[...new Set((e.aliases??[]).flatMap(e=>e.split(`/`).filter(Boolean)).filter(e=>!a.has(e)))];return{id:`${e.kind}:${e.path}`,kind:e.kind,path:e.path,title:n,name:t,pathSegments:[...i,...o].join(` `),content:e.content??``,modifiedTs:Number.isFinite(r)?r:0}}function P9(e){let t=nQ({schema:Ire});return e.length>0&&pQ(t,e),t}function zre(e){let t={documents:e};return j9.set(t,P9(e)),t}function Bre(e){let t=j9.get(e);if(t)return t;let n=P9(e.documents);return j9.set(e,n),n}function Vre(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function F9(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function Hre(e,t){let n=M9(t);if(!n)return 0;let r=M9(e.title),i=M9(e.name),a=M9(e.path),o=a.split(`/`);return r===n||i===n?700:a===n?650:r.startsWith(n)||i.startsWith(n)?600:o.some(e=>e.startsWith(n))?550:r.includes(n)||i.includes(n)?500:a.includes(n)?450:-1}var Ure=.5;function I9(e,t){let n=Hre(e,t);return n<=0?n:f4(e.path)?n*Ure:n}var Wre=60;function L9(e){return e===`file`?-Wre:0}function Gre(e){let t=e.map(e=>e.modifiedTs).filter(e=>Number.isFinite(e)&&e>0);if(t.length===0)return new Map;let n=1/0,r=-1/0;for(let e of t)e<n&&(n=e),e>r&&(r=e);let i=Math.max(1,r-n);return new Map(e.map(e=>[e.id,e.modifiedTs>0?(e.modifiedTs-n)/i*50:0]))}function Kre(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function qre(e){return e===`full_text`?{title:8,name:7,path:5,pathSegments:4,content:1}:e===`autocomplete`?{title:10,name:9,path:5,pathSegments:4}:{title:8,name:7,path:5,pathSegments:4}}function Jre(e,t){return M9(t).length<4?0:+(e===`full_text`)}function Yre(e,t,n={}){let r=n.intent??`omnibar`,i=Lre(n.limit),a=new Set(n.scopes??Vre(r)),o=e.documents.filter(e=>F9(e,a)),s=M9(t);if(!s)return o.slice().sort((e,t)=>e.path.localeCompare(t.path)).slice(0,i).map(e=>({document:e,score:0,signals:{lexical:0,fullText:0,recency:0}}));let c=UQ(Bre(e),{term:s,properties:Kre(r),boost:qre(r),tolerance:Jre(r,s),limit:Math.max(i*4,40)}),l=new Map(c.hits.filter(e=>F9(e.document,a)).map(e=>[e.document.id,e.score])),u=Gre(o),d=new Map;for(let e of o)I9(e,s)>=0&&d.set(e.id,e);for(let e of c.hits)F9(e.document,a)&&d.set(e.document.id,e.document);return n.semantic?Xre({scopedDocuments:o,candidates:d,fullTextScores:l,recency:u,normalizedQuery:s,semantic:n.semantic,limit:i}):[...d.values()].map(e=>{let t=Math.max(0,I9(e,s)),n=l.get(e.id)??0,r=u.get(e.id)??0;return{document:e,score:t+n*20+r+L9(e.kind),signals:{lexical:t,fullText:n,recency:r}}}).sort((e,t)=>e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score).slice(0,i)}function R9(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function Xre(e){let{scopedDocuments:t,candidates:n,fullTextScores:r,recency:i,normalizedQuery:a,semantic:o,limit:s}=e,c=o.rrfK??60,l=o.candidateLimit??64,u=o.similarityFloor??0,d=o.scores,f=new Map(t.map(e=>[e.id,e])),p=[...d.entries()].filter(([e,t])=>t>=u&&f.has(e)).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).slice(0,l);for(let[e]of p)if(!n.has(e)){let t=f.get(e);t&&n.set(e,t)}let m=[...n.values()].map(e=>{let t=Math.max(0,I9(e,a)),n=r.get(e.id)??0,o=i.get(e.id)??0,s=d.get(e.id),c=s!==void 0&&s>=u;return{document:e,score:t+n*20+o+L9(e.kind),signals:c?{lexical:t,fullText:n,recency:o,vector:s}:{lexical:t,fullText:n,recency:o},lexical:t,fullText:n,recency:o,cosine:s}}),h=R9(m.filter(e=>e.fullText>0).sort((e,t)=>t.fullText-e.fullText||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),g=R9(m.filter(e=>e.cosine!==void 0&&e.cosine>=u).sort((e,t)=>t.cosine-e.cosine||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),_=e=>{let t=0,n=h.get(e);n!==void 0&&(t+=1/(c+n));let r=g.get(e);return r!==void 0&&(t+=1/(c+r)),t};return m.sort((e,t)=>{let n=+(e.lexical>0),r=+(t.lexical>0);if(n!==r)return r-n;if(n===1)return e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score;let i=_(e.document.id),a=_(t.document.id);return i===a?e.recency===t.recency?e.document.path.localeCompare(t.document.path):t.recency-e.recency:a-i}).map(({document:e,score:t,signals:n})=>({document:e,score:t,signals:n})).slice(0,s)}function Zre(e){return`https://github.com/${e.owner}/${e.repo}.git`}function Qre(e,t){return!e||e.length===0?`true`:t.detached?`detached`:t.currentBranch===null||t.currentBranch===e?`true`:`false`}var z9=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),B9=globalThis;B9[z9]===void 0&&(B9[z9]=mr());var V9=B9[z9],H9=Ha({version:E().regex(/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(V9,{description:`Recorded skill version for this target.`}),recordedAt:qi().register(V9,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:j([`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`]).register(V9,{description:`Install-source surface that recorded this entry.`}).optional()});Ha({schema:M(1).register(V9,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:Ha({"claude-cowork":H9.optional(),"cli-hosts":H9.optional()}).register(V9,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({})});var U9=class extends Error{chunksCompleted;totalChunks;bytesWritten;bytesRemaining;cause;constructor(e,t){let n=e instanceof Error?e.message:typeof e==`string`?e:`unknown error`;super(`chunked insert failed after ${t.chunksCompleted}/${t.totalChunks} chunks (${t.bytesWritten} bytes written, ${t.bytesRemaining} bytes lost): ${n}`),this.name=`ChunkedInsertError`,this.chunksCompleted=t.chunksCompleted,this.totalChunks=t.totalChunks,this.bytesWritten=t.bytesWritten,this.bytesRemaining=t.bytesRemaining,this.cause=e}};async function $re(e,t,n,r,i={}){let a=i.thresholdBytes??512e3,o=i.chunkSizeBytes??51200,s=i.origin,c=i.yieldFn??eie,l=i.resolveOffset??(e=>e);if(r.length<=a){e.transact(()=>{t.insert(n,r)},s);return}let u=Math.ceil(r.length/o),d=0,f=n,p=0,m=0;for(;d<r.length;){let n=Math.min(d+o,r.length),i=r.slice(d,n);try{let n=l(f);e.transact(()=>{t.insert(n,i)},s)}catch(e){throw new U9(e,{chunksCompleted:p,totalChunks:u,bytesWritten:m,bytesRemaining:r.length-d})}p++,m+=i.length,f+=i.length,d=n,d<r.length&&await c()}}function eie(){return new Promise(e=>{let t=globalThis;t.document?.hidden!==!0&&typeof t.requestAnimationFrame==`function`?t.requestAnimationFrame(()=>e()):setTimeout(()=>e(),0)})}function tie(){let e=!1,t=``,n=0;return r=>{let i=nie(r);return e?(i&&i.char===t&&i.len>=n&&!i.hasInfo&&(e=!1,t=``,n=0),!0):i?(e=!0,t=i.char,n=i.len,!0):!1}}function nie(e){let t=(e.endsWith(`\r`)?e.slice(0,-1):e).match(/^ {0,3}([`~])(\1{2,})(.*)$/);return t?{char:t[1],len:1+t[2].length,hasInfo:t[3].trim()!==``}:null}function rie(e){let t;try{t=new URL(e)}catch{return null}let n=t.pathname.match(/^\/video\/(\d+)/);if(n)return n[1]??null;let r=t.pathname.match(/^\/(\d+)/);return r?r[1]??null:null}function iie(e){if(typeof e!=`string`||e.length===0)return e;let t=t6(e);if(t){let e=t.noCookie?`www.youtube-nocookie.com`:`www.youtube.com`,n=t.startSeconds===null?``:`?start=${t.startSeconds}`;return`https://${e}/embed/${t.id}${n}`}if(X3(e)){let t=rie(e);return t?`https://player.vimeo.com/video/${t}`:e}let n=q3(e);if(n){let e=n.startRaw===null?``:`?t=${n.startRaw}`;return`https://www.loom.com/embed/${n.id}${e}`}return e}var aie=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],oie={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`},sie={cursor:`#FFFFFF`,windsurf:`#FFFFFF`},W9=[`#f0ece3`,`#fff5e1`,`#f9e1db`,`#f5def7`,`#ece2fb`,`#dce8fa`,`#DBF3FB`];function cie(e,t=aie){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}function lie(e){let t=e.trim();if(!t)return`?`;let n=t.split(/[-\s]+/).filter(Boolean);if(!n.length)return`?`;if(n.length>=2)return n.slice(0,2).map(e=>e[0]??``).join(``).toUpperCase();let r=n[0],i=[r[0]];for(let e=1;e<r.length&&i.length<2;e++){let t=r[e-1],n=r[e];t===t.toLowerCase()&&n===n.toUpperCase()&&n!==n.toLowerCase()&&i.push(n)}return i.length>=2?i.join(``).toUpperCase():r.slice(0,2).toUpperCase()}function uie(e){let t=e.trim();if(!t)return e;if(t.includes(` `)||!/[-_]/.test(t))return t;let n=t.split(/[-_]+/).filter(Boolean);return n.length?n.map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `):t}var die={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,"codex-mcp-client":`openai`,copilot:`github`,cline:`cline`};function fie(e){return e?die[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}function pie(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2;if(i===a)return[0,0,o*100];let s=i-a,c=o>.5?s/(2-i-a):s/(i+a),l;return l=i===t?((n-r)/s+(n<r?6:0))/6:i===n?((r-t)/s+2)/6:((t-n)/s+4)/6,[l*360,c*100,o*100]}function mie(e,t,n){let r=t/100,i=n/100,a=r*Math.min(i,1-i),o=t=>{let n=(t+e/30)%12,r=i-a*Math.max(Math.min(n-3,9-n,1),-1);return Math.round(255*r).toString(16).padStart(2,`0`)};return`#${o(0)}${o(8)}${o(4)}`}function hie(e){let[t]=pie(e);return mie(t,45,32)}var gie=[`Curious`,`Brave`,`Clever`,`Swift`,`Gentle`,`Bright`,`Wise`,`Bold`,`Calm`,`Keen`],_ie=[`Bird`,`Cat`,`Dog`,`Fish`,`Mouse`,`Rabbit`,`Shrimp`,`Snail`,`Squirrel`,`Turtle`],G9=`ok-user-name-v3`,K9=`ok-user-color-v3`;function q9(e){return e[Math.floor(Math.random()*e.length)]}function vie(){return`${q9(gie)} ${q9(_ie)}`}function yie(){return q9(W9)}function J9(e){try{return localStorage.getItem(e)}catch{return null}}function Y9(e,t){try{localStorage.setItem(e,t)}catch{}}function bie(){let e=new URLSearchParams(window.location.search).get(`coeditor`)||`standalone`,t=crypto.randomUUID(),n=J9(G9),r=J9(K9);return n||(n=vie(),Y9(G9,n)),r||(r=yie(),Y9(K9,r)),{name:n,color:r,coeditor:e,tabId:t}}function xie(e,t){let n=e.trim();if(!n||/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=r>=0?n.slice(0,r):n,a=r>=0?n.slice(r+1):null,o=(i.split(`?`)[0]??``).trim();if(!o)return null;let s=(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=(s[1]??``).toLowerCase();if(e!==`md`&&e!==`mdx`)return null}let c=o.toLowerCase(),l=c.endsWith(`.mdx`)?o.slice(0,-4):c.endsWith(`.md`)?o.slice(0,-3):o,u=l.startsWith(`/`),d=u?l.slice(1):l,f=u?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of d.split(`/`))if(e===`..`){if(f.length===0)return null;f.pop()}else e!==`.`&&e!==``&&f.push(e);return f.length===0?null:{docName:f.join(`/`),anchor:a||null}}function Sie(e){throw Error(`Unhandled ClassifiedLinkTarget variant: ${JSON.stringify(e)}`)}var X9=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function Z9(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function Q9(e){return e.split(`/`).filter(Boolean)}function $9(e){let t=e.trim();return X9.test(t)||t.startsWith(`//`)}function Cie(e,t){let n=e.trim();if(!n)return null;if(n.startsWith(`#`)){let e=n.slice(1).trim();return e?{kind:`anchor`,anchor:e}:null}if($9(n))return{kind:`external`,url:n};let r=xie(n,t);if(r)return{kind:`doc`,docName:r.docName,anchor:r.anchor};let i=Z9(n);return i&&i!==`md`&&i!==`mdx`?{kind:`asset`,url:n,ext:i}:null}function wie(e,t){let n=e.trim();if(!n)return null;if($9(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=Z9(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function Tie(e,t){let n=e.trim();if(!n||X9.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=((r>=0?n.slice(0,r):n).split(`?`)[0]??``).trim();if(!i)return null;let a=i.startsWith(`/`),o=a?i.slice(1):i,s=a?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of o.split(`/`))if(e===`..`){if(s.length===0)return null;s.pop()}else e!==`.`&&e!==``&&s.push(e);return s.length===0?null:s.join(`/`)}function Eie(e,t,n=null){let r=Q9(e);r.pop();let i=Q9(t),a=0;for(;a<r.length&&a<i.length&&r[a]===i[a];)a+=1;let o=r.slice(a).map(()=>`..`),s=i.slice(a),c=[...o,...s].join(`/`);return c||=i.at(-1)??t,!c.startsWith(`./`)&&!c.startsWith(`../`)&&(c=`./${c}`),`${c}.md${n?`#${n}`:``}`}function Die(e){if(!e)return{height:null,viewerFragment:``};let t=e.split(`&`).filter(e=>e.length>0),n=null,r=[];for(let e of t){let t=e.indexOf(`=`);if(t===-1){r.push(e);continue}let i=e.slice(0,t),a=e.slice(t+1);if(i===`height`){let e=Number.parseInt(a,10);!Number.isNaN(e)&&e>0&&(n=e);continue}r.push(e)}return{height:n,viewerFragment:r.join(`&`)}}function Oie(e){return e.replace(/[/\\:*?"<>|\0]/g,`-`).replace(/\s+/g,` `).replace(/-+/g,`-`).trim().replace(/^[-.\s]+|[-.\s]+$/g,``)}export{Kne as $,x$ as $n,uu as $r,tie as $t,D9 as A,r$ as An,tx as Ar,e1 as At,W9 as B,Ane as Bn,Wv as Br,Cie as Bt,are as C,U6 as Cn,kS as Cr,Q1 as Ct,L1 as D,F6 as Dn,Mb as Dr,Gne as Dt,i0 as E,R6 as En,Cb as Er,M2 as Et,C1 as F,W1 as Fn,rx as Fr,B2 as Ft,N0 as G,T0 as Gn,I as Gr,E0 as Gt,qne as H,R3 as Hn,R as Hr,a1 as Ht,l$ as I,B0 as In,OS as Ir,Eie as It,W0 as J,q3 as Jn,bf as Jr,q2 as Jt,P0 as K,Y7 as Kn,Cp as Kr,cie as Kt,I2 as L,z0 as Ln,dS as Lr,Zre as Lt,ore as M,$9 as Mn,Hy as Mr,u4 as Mt,B1 as N,o$ as Nn,My as Nr,L2 as Nt,fre as O,B6 as On,Pb as Or,Sie as Ot,t0 as P,J3 as Pn,Sb as Pr,R2 as Pt,U1 as Q,t6 as Qn,F as Qr,lie as Qt,P2 as R,F2 as Rn,sv as Rr,$re as Rt,b0 as S,L6 as Sn,MS as Sr,F4 as St,a0 as T,H6 as Tn,lb as Tr,k2 as Tt,Z1 as U,y0 as Un,Hp as Ur,o1 as Ut,P3 as V,kne as Vn,Op as Vr,wie as Vt,f7 as W,y1 as Wn,Gp as Wr,N1 as Wt,nne as X,z4 as Xn,P as Xr,K2 as Xt,Vne as Y,Die as Yn,tf as Yr,G2 as Yt,e2 as Z,D2 as Zn,ud as Zr,c4 as Zt,D1 as _,L3 as _n,lE as _r,C4 as _t,e0 as a,A as ai,w1 as an,N2 as ar,P4 as at,P1 as b,G6 as bn,qx as br,xre as bt,Ine as c,h as ci,YQ as cn,d9 as cr,XQ as ct,Pre as d,uie as dn,N9 as dr,I0 as dt,ru as ei,A6 as en,b$ as er,G1 as et,Mre as f,s$ as fn,mte as fr,R0 as ft,A1 as g,T1 as gn,rE as gr,w4 as gt,r1 as h,O2 as hn,TT as hr,y4 as ht,z1 as i,M as ii,H1 as in,Yre as ir,N4 as it,Pne as j,R1 as jn,_S as jr,v1 as jt,A9 as k,V6 as kn,Fb as kr,f1 as kt,jre as l,D0 as ln,B4 as lr,t2 as lt,Are as m,bie as mn,WT as mr,M4 as mt,sie as n,ku as ni,Rre as nn,iie as nr,lre as nt,$ne as o,E as oi,A2 as on,u$ as or,L4 as ot,Nre as p,mne as pn,ute as pr,E1 as pt,I1 as q,E2 as qn,L as qr,J2 as qt,q1 as r,hu as ri,hie as rn,Oie as rr,sre as rt,ere as s,g as si,Z9 as sn,M0 as sr,I4 as st,oie as t,Mu as ti,zre as tn,Tie as tr,K1 as tt,Fre as u,o9 as un,f9 as ur,dre as ut,k1 as v,fie as vn,eE as vr,D4 as vt,ire as w,z6 as wn,gS as wr,o0 as wt,U9 as x,I6 as xn,ex as xr,pre as xt,O1 as y,W6 as yn,cS as yr,x2 as yt,Rne as z,X3 as zn,uv as zr,Qre as zt};
|