@townco/gui-template 0.1.90 → 0.1.94
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/acp-sdk-C76JZERC.js +1 -0
- package/dist/assets/{framer-motion-DBbHpXpX.js → framer-motion-C-FfYRqi.js} +2 -2
- package/dist/assets/{icons-1FDIcXQd.js → icons-Hw9CPBRX.js} +1 -1
- package/dist/assets/{index-rBLGThrv.js → index-B8Bkd7Zr.js} +9 -9
- package/dist/assets/{markdown-C0NpIQMG.js → markdown-D44wP98Y.js} +13 -13
- package/dist/assets/{radix-BaMamYBO.js → radix-CCc9gvVp.js} +2 -2
- package/dist/assets/{react-DGEdbr_j.js → react-CiYvVQki.js} +6 -6
- package/dist/assets/{vendor-CfDyrXXV.js → vendor-D6ejVflZ.js} +279 -279
- package/dist/index.html +8 -8
- package/package.json +4 -4
- package/dist/assets/acp-sdk-CS-scXJG.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`,cr:"\r",space:" ",replacementCharacter:"�"},ee=be(/[A-Za-z]/),Z=be(/[\dA-Za-z]/)
|
|
3
|
-
`:" ")+o.indentLines(o.containerFlow(r,s.current()),n?cr:ya))),c(),l}}function ya(e,n,t){return n===0?e:cr(e,n,t)}function cr(e,n,t){return(t?"":" ")+e}const ba=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];pr.peek=Ia;function
|
|
1
|
+
import{a5 as rr,a6 as ir,a7 as Ni,a8 as g,a9 as pt,aa as ar,ab as _e,ac as Fi,ad as jt,ae as Mi,af as rt,ag as Pt,ah as Ke,ai as hn,aj as mn,ak as dn,al as qe,am as pe,an as ze,ao as Pi,ap as Dt,aq as Di,ar as Li,as as Ht,at as Bi,au as gn,av as $t,aw as Vt,ax as Wt,ay as xn,az as xe,aA as Ee,aB as Ze,aC as or,aD as sr,aE as Qt,aF as ve,aG as _i,aH as kn,aI as vi,aJ as Oi,aK as qi,aL as lt,aM as Ri,aN as Ui,aO as ji,aP as yt,aQ as yn,aR as Lt,aS as Le}from"./vendor-D6ejVflZ.js";import{k as bn}from"./katex-Dnem94XJ.js";const u={carriageReturn:-5,lineFeed:-4,carriageReturnLineFeed:-3,horizontalTab:-2,virtualSpace:-1,eof:null,nul:0,ht:9,lf:10,vt:11,cr:13,space:32,exclamationMark:33,quotationMark:34,numberSign:35,dollarSign:36,percentSign:37,ampersand:38,apostrophe:39,leftParenthesis:40,rightParenthesis:41,asterisk:42,plusSign:43,comma:44,dash:45,dot:46,slash:47,digit0:48,digit1:49,digit2:50,digit3:51,digit4:52,digit5:53,digit6:54,digit7:55,digit8:56,digit9:57,colon:58,semicolon:59,lessThan:60,equalsTo:61,greaterThan:62,questionMark:63,atSign:64,uppercaseA:65,uppercaseH:72,uppercaseW:87,uppercaseX:88,leftSquareBracket:91,backslash:92,rightSquareBracket:93,caret:94,underscore:95,graveAccent:96,lowercaseA:97,lowercaseH:104,lowercaseW:119,lowercaseX:120,leftCurlyBrace:123,verticalBar:124,tilde:126,del:127,byteOrderMarker:65279,replacementCharacter:65533},A={attentionSideAfter:2,atxHeadingOpeningFenceSizeMax:6,autolinkDomainSizeMax:63,autolinkSchemeSizeMax:32,cdataOpeningString:"CDATA[",characterGroupPunctuation:2,characterGroupWhitespace:1,characterReferenceDecimalSizeMax:7,characterReferenceHexadecimalSizeMax:6,characterReferenceNamedSizeMax:31,codeFencedSequenceSizeMin:3,contentTypeContent:"content",contentTypeFlow:"flow",contentTypeString:"string",contentTypeText:"text",hardBreakPrefixSizeMin:2,htmlBasic:6,htmlCdata:5,htmlComment:2,htmlComplete:7,htmlDeclaration:4,htmlInstruction:3,htmlRawSizeMax:8,htmlRaw:1,linkResourceDestinationBalanceMax:32,linkReferenceSizeMax:999,listItemValueSizeMax:10,numericBaseDecimal:10,numericBaseHexadecimal:16,tabSize:4,thematicBreakMarkerCountMin:3,v8MaxSafeChunkSize:1e4},p={data:"data",whitespace:"whitespace",lineEnding:"lineEnding",lineEndingBlank:"lineEndingBlank",linePrefix:"linePrefix",lineSuffix:"lineSuffix",atxHeading:"atxHeading",atxHeadingSequence:"atxHeadingSequence",atxHeadingText:"atxHeadingText",autolink:"autolink",autolinkEmail:"autolinkEmail",autolinkMarker:"autolinkMarker",autolinkProtocol:"autolinkProtocol",characterEscape:"characterEscape",characterEscapeValue:"characterEscapeValue",characterReference:"characterReference",characterReferenceMarker:"characterReferenceMarker",characterReferenceMarkerNumeric:"characterReferenceMarkerNumeric",characterReferenceMarkerHexadecimal:"characterReferenceMarkerHexadecimal",characterReferenceValue:"characterReferenceValue",codeFenced:"codeFenced",codeFencedFence:"codeFencedFence",codeFencedFenceSequence:"codeFencedFenceSequence",codeFencedFenceInfo:"codeFencedFenceInfo",codeFencedFenceMeta:"codeFencedFenceMeta",codeFlowValue:"codeFlowValue",codeIndented:"codeIndented",codeText:"codeText",codeTextData:"codeTextData",codeTextPadding:"codeTextPadding",codeTextSequence:"codeTextSequence",content:"content",definition:"definition",definitionDestination:"definitionDestination",definitionDestinationLiteral:"definitionDestinationLiteral",definitionDestinationLiteralMarker:"definitionDestinationLiteralMarker",definitionDestinationRaw:"definitionDestinationRaw",definitionDestinationString:"definitionDestinationString",definitionLabel:"definitionLabel",definitionLabelMarker:"definitionLabelMarker",definitionLabelString:"definitionLabelString",definitionMarker:"definitionMarker",definitionTitle:"definitionTitle",definitionTitleMarker:"definitionTitleMarker",definitionTitleString:"definitionTitleString",emphasis:"emphasis",emphasisSequence:"emphasisSequence",emphasisText:"emphasisText",escapeMarker:"escapeMarker",hardBreakEscape:"hardBreakEscape",hardBreakTrailing:"hardBreakTrailing",htmlFlow:"htmlFlow",htmlFlowData:"htmlFlowData",htmlText:"htmlText",htmlTextData:"htmlTextData",image:"image",label:"label",labelText:"labelText",labelLink:"labelLink",labelImage:"labelImage",labelMarker:"labelMarker",labelImageMarker:"labelImageMarker",labelEnd:"labelEnd",link:"link",paragraph:"paragraph",reference:"reference",referenceMarker:"referenceMarker",referenceString:"referenceString",resource:"resource",resourceDestination:"resourceDestination",resourceDestinationLiteral:"resourceDestinationLiteral",resourceDestinationLiteralMarker:"resourceDestinationLiteralMarker",resourceDestinationRaw:"resourceDestinationRaw",resourceDestinationString:"resourceDestinationString",resourceMarker:"resourceMarker",resourceTitle:"resourceTitle",resourceTitleMarker:"resourceTitleMarker",resourceTitleString:"resourceTitleString",setextHeading:"setextHeading",setextHeadingText:"setextHeadingText",setextHeadingLine:"setextHeadingLine",setextHeadingLineSequence:"setextHeadingLineSequence",strong:"strong",strongSequence:"strongSequence",strongText:"strongText",thematicBreak:"thematicBreak",thematicBreakSequence:"thematicBreakSequence",blockQuote:"blockQuote",blockQuotePrefix:"blockQuotePrefix",blockQuoteMarker:"blockQuoteMarker",blockQuotePrefixWhitespace:"blockQuotePrefixWhitespace",listOrdered:"listOrdered",listUnordered:"listUnordered",listItemIndent:"listItemIndent",listItemMarker:"listItemMarker",listItemPrefix:"listItemPrefix",listItemPrefixWhitespace:"listItemPrefixWhitespace",listItemValue:"listItemValue",chunkContent:"chunkContent",chunkFlow:"chunkFlow",chunkText:"chunkText",chunkString:"chunkString"},ce={ht:" ",lf:`
|
|
2
|
+
`,cr:"\r",space:" ",replacementCharacter:"�"},ee=be(/[A-Za-z]/),Z=be(/[\dA-Za-z]/),Hi=be(/[#-'*+\--9=?A-Z^-~]/);function ft(e){return e!==null&&(e<u.space||e===u.del)}const Bt=be(/\d/),$i=be(/[\dA-Fa-f]/),Vi=be(/[!-/:-@[-`{-~]/);function F(e){return e!==null&&e<u.horizontalTab}function V(e){return e!==null&&(e<u.nul||e===u.space)}function R(e){return e===u.horizontalTab||e===u.virtualSpace||e===u.space}const dt=be(new RegExp("\\p{P}|\\p{S}","u")),Ae=be(/\s/);function be(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Wi(e,n,t){const a=rr((t||{}).ignore||[]),o=Qi(n);let i=-1;for(;++i<o.length;)ir(e,"text",s);function s(c,f){let h=-1,d;for(;++h<f.length;){const m=f[h],y=d?d.children:void 0;if(a(m,y?y.indexOf(m):void 0,d))return;d=m}if(d)return l(c,f)}function l(c,f){const h=f[f.length-1],d=o[i][0],m=o[i][1];let y=0;const I=h.children.indexOf(c);let T=!1,E=[];d.lastIndex=0;let N=d.exec(c.value);for(;N;){const D=N.index,_={index:N.index,input:N.input,stack:[...f,c]};let w=m(...N,_);if(typeof w=="string"&&(w=w.length>0?{type:"text",value:w}:void 0),w===!1?d.lastIndex=D+1:(y!==D&&E.push({type:"text",value:c.value.slice(y,D)}),Array.isArray(w)?E.push(...w):w&&E.push(w),y=D+N[0].length,T=!0),!d.global)break;N=d.exec(c.value)}return T?(y<c.value.length&&E.push({type:"text",value:c.value.slice(y)}),h.children.splice(I,1,...E)):E=[c],I+E.length}}function Qi(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const t=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<t.length;){const a=t[r];n.push([Gi(a[0]),Xi(a[1])])}return n}function Gi(e){return typeof e=="string"?new RegExp(Ni(e),"g"):e}function Xi(e){return typeof e=="function"?e:function(){return e}}const bt="phrasing",St=["autolink","link","image","label"];function Ji(){return{transforms:[ra],enter:{literalAutolink:Ki,literalAutolinkEmail:wt,literalAutolinkHttp:wt,literalAutolinkWww:wt},exit:{literalAutolink:na,literalAutolinkEmail:ta,literalAutolinkHttp:Zi,literalAutolinkWww:ea}}}function Yi(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:bt,notInConstruct:St},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:bt,notInConstruct:St},{character:":",before:"[ps]",after:"\\/",inConstruct:bt,notInConstruct:St}]}}function Ki(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function wt(e){this.config.enter.autolinkProtocol.call(this,e)}function Zi(e){this.config.exit.autolinkProtocol.call(this,e)}function ea(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];g(n.type==="link"),n.url="http://"+this.sliceSerialize(e)}function ta(e){this.config.exit.autolinkEmail.call(this,e)}function na(e){this.exit(e)}function ra(e){Wi(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ia],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),aa]],{ignore:["link","linkReference"]})}function ia(e,n,t,r,a){let o="";if(!lr(a)||(/^w/i.test(n)&&(t=n+t,n="",o="http://"),!oa(t)))return!1;const i=sa(t+r);if(!i[0])return!1;const s={type:"link",title:null,url:o+n+i[0],children:[{type:"text",value:n+i[0]}]};return i[1]?[s,{type:"text",value:i[1]}]:s}function aa(e,n,t,r){return!lr(r,!0)||/[-\d_]$/.test(t)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+t,children:[{type:"text",value:n+"@"+t}]}}function oa(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function sa(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const a=pt(e,"(");let o=pt(e,")");for(;r!==-1&&a>o;)e+=t.slice(0,r+1),t=t.slice(r+1),r=t.indexOf(")"),o++;return[e,t]}function lr(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||Ae(t)||dt(t))&&(!n||t!==47)}function le(e){return e.replace(/[\t\n\r ]+/g,ce.space).replace(/^ | $/g,"").toLowerCase().toUpperCase()}ur.peek=ga;function la(){this.buffer()}function ua(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ca(){this.buffer()}function pa(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function fa(e){const n=this.resume(),t=this.stack[this.stack.length-1];g(t.type==="footnoteReference"),t.identifier=le(this.sliceSerialize(e)).toLowerCase(),t.label=n}function ha(e){this.exit(e)}function ma(e){const n=this.resume(),t=this.stack[this.stack.length-1];g(t.type==="footnoteDefinition"),t.identifier=le(this.sliceSerialize(e)).toLowerCase(),t.label=n}function da(e){this.exit(e)}function ga(){return"["}function ur(e,n,t,r){const a=t.createTracker(r);let o=a.move("[^");const i=t.enter("footnoteReference"),s=t.enter("reference");return o+=a.move(t.safe(t.associationId(e),{after:"]",before:o})),s(),i(),o+=a.move("]"),o}function xa(){return{enter:{gfmFootnoteCallString:la,gfmFootnoteCall:ua,gfmFootnoteDefinitionLabelString:ca,gfmFootnoteDefinition:pa},exit:{gfmFootnoteCallString:fa,gfmFootnoteCall:ha,gfmFootnoteDefinitionLabelString:ma,gfmFootnoteDefinition:da}}}function ka(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:ur},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(r,a,o,i){const s=o.createTracker(i);let l=s.move("[^");const c=o.enter("footnoteDefinition"),f=o.enter("label");return l+=s.move(o.safe(o.associationId(r),{before:l,after:"]"})),f(),l+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),l+=s.move((n?`
|
|
3
|
+
`:" ")+o.indentLines(o.containerFlow(r,s.current()),n?cr:ya))),c(),l}}function ya(e,n,t){return n===0?e:cr(e,n,t)}function cr(e,n,t){return(t?"":" ")+e}const ba=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];pr.peek=Ia;function Sa(){return{canContainEols:["delete"],enter:{strikethrough:Ca},exit:{strikethrough:Ta}}}function wa(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:ba}],handlers:{delete:pr}}}function Ca(e){this.enter({type:"delete",children:[]},e)}function Ta(e){this.exit(e)}function pr(e,n,t,r){const a=t.createTracker(r),o=t.enter("strikethrough");let i=a.move("~~");return i+=t.containerPhrasing(e,{...a.current(),before:i,after:"~"}),i+=a.move("~~"),o(),i}function Ia(){return"~"}function Ea(e,n,t,r){const a=t.enter("blockquote"),o=t.createTracker(r);o.move("> "),o.shift(2);const i=t.indentLines(t.containerFlow(e,o.current()),za);return a(),i}function za(e,n,t){return">"+(t?"":" ")+e}function Aa(e,n){return Sn(e,n.inConstruct,!0)&&!Sn(e,n.notInConstruct,!1)}function Sn(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let r=-1;for(;++r<n.length;)if(e.includes(n[r]))return!0;return!1}function wn(e,n,t,r){let a=-1;for(;++a<t.unsafe.length;)if(t.unsafe[a].character===`
|
|
4
4
|
`&&Aa(t.stack,t.unsafe[a]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
5
5
|
`}function Na(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Fa(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function Ma(e,n,t,r){const a=Fa(t),o=e.value||"",i=a==="`"?"GraveAccent":"Tilde";if(Na(e,t)){const h=t.enter("codeIndented"),d=t.indentLines(o,Pa);return h(),d}const s=t.createTracker(r),l=a.repeat(Math.max(ar(o,a)+1,3)),c=t.enter("codeFenced");let f=s.move(l);if(e.lang){const h=t.enter(`codeFencedLang${i}`);f+=s.move(t.safe(e.lang,{before:f,after:" ",encode:["`"],...s.current()})),h()}if(e.lang&&e.meta){const h=t.enter(`codeFencedMeta${i}`);f+=s.move(" "),f+=s.move(t.safe(e.meta,{before:f,after:`
|
|
6
6
|
`,encode:["`"],...s.current()})),h()}return f+=s.move(`
|
|
@@ -11,25 +11,25 @@ import{Y as rr,Z as ir,_ as Ni,$ as g,a0 as pt,a1 as ar,a2 as _e,a3 as Fi,a4 as
|
|
|
11
11
|
`});return h(),f(),d+`
|
|
12
12
|
`+(a===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
|
|
13
13
|
`))+1))}const i="#".repeat(a),s=t.enter("headingAtx"),l=t.enter("phrasing");o.move(i+" ");let c=t.containerPhrasing(e,{before:"# ",after:`
|
|
14
|
-
`,...o.current()});return/^[\t ]/.test(c)&&(c=Xe(c.charCodeAt(0))+c.slice(1)),c=c?i+" "+c:i,t.options.closeAtx&&(c+=" "+i),l(),s(),c}mr.peek=Ra;function mr(e){return e.value||""}function Ra(){return"<"}dr.peek=Ua;function dr(e,n,t,r){const a=Gt(t),o=a==='"'?"Quote":"Apostrophe",i=t.enter("image");let s=t.enter("label");const l=t.createTracker(r);let c=l.move("![");return c+=l.move(t.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(t.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=t.enter("destinationRaw"),c+=l.move(t.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=t.enter(`title${o}`),c+=l.move(" "+a),c+=l.move(t.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),s()),c+=l.move(")"),i(),c}function Ua(){return"!"}gr.peek=ja;function gr(e,n,t,r){const a=e.referenceType,o=t.enter("imageReference");let i=t.enter("label");const s=t.createTracker(r);let l=s.move("![");const c=t.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const f=t.stack;t.stack=[],i=t.enter("reference");const h=t.safe(t.associationId(e),{before:l,after:"]",...s.current()});return i(),t.stack=f,o(),a==="full"||!c||c!==h?l+=s.move(h+"]"):a==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function ja(){return"!"}xr.peek
|
|
14
|
+
`,...o.current()});return/^[\t ]/.test(c)&&(c=Xe(c.charCodeAt(0))+c.slice(1)),c=c?i+" "+c:i,t.options.closeAtx&&(c+=" "+i),l(),s(),c}mr.peek=Ra;function mr(e){return e.value||""}function Ra(){return"<"}dr.peek=Ua;function dr(e,n,t,r){const a=Gt(t),o=a==='"'?"Quote":"Apostrophe",i=t.enter("image");let s=t.enter("label");const l=t.createTracker(r);let c=l.move("![");return c+=l.move(t.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=t.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(t.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=t.enter("destinationRaw"),c+=l.move(t.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=t.enter(`title${o}`),c+=l.move(" "+a),c+=l.move(t.safe(e.title,{before:c,after:a,...l.current()})),c+=l.move(a),s()),c+=l.move(")"),i(),c}function Ua(){return"!"}gr.peek=ja;function gr(e,n,t,r){const a=e.referenceType,o=t.enter("imageReference");let i=t.enter("label");const s=t.createTracker(r);let l=s.move("![");const c=t.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const f=t.stack;t.stack=[],i=t.enter("reference");const h=t.safe(t.associationId(e),{before:l,after:"]",...s.current()});return i(),t.stack=f,o(),a==="full"||!c||c!==h?l+=s.move(h+"]"):a==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function ja(){return"!"}xr.peek=Ha;function xr(e,n,t){let r=e.value||"",a="`",o=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(r);)a+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<t.unsafe.length;){const i=t.unsafe[o],s=t.compilePattern(i);let l;if(i.atBreak)for(;l=s.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return a+r+a}function Ha(){return"`"}function kr(e,n){const t=Xt(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(t===e.url||"mailto:"+t===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}yr.peek=$a;function yr(e,n,t,r){const a=Gt(t),o=a==='"'?"Quote":"Apostrophe",i=t.createTracker(r);let s,l;if(kr(e,t)){const f=t.stack;t.stack=[],s=t.enter("autolink");let h=i.move("<");return h+=i.move(t.containerPhrasing(e,{before:h,after:">",...i.current()})),h+=i.move(">"),s(),t.stack=f,h}s=t.enter("link"),l=t.enter("label");let c=i.move("[");return c+=i.move(t.containerPhrasing(e,{before:c,after:"](",...i.current()})),c+=i.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=t.enter("destinationLiteral"),c+=i.move("<"),c+=i.move(t.safe(e.url,{before:c,after:">",...i.current()})),c+=i.move(">")):(l=t.enter("destinationRaw"),c+=i.move(t.safe(e.url,{before:c,after:e.title?" ":")",...i.current()}))),l(),e.title&&(l=t.enter(`title${o}`),c+=i.move(" "+a),c+=i.move(t.safe(e.title,{before:c,after:a,...i.current()})),c+=i.move(a),l()),c+=i.move(")"),s(),c}function $a(e,n,t){return kr(e,t)?"<":"["}br.peek=Va;function br(e,n,t,r){const a=e.referenceType,o=t.enter("linkReference");let i=t.enter("label");const s=t.createTracker(r);let l=s.move("[");const c=t.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),i();const f=t.stack;t.stack=[],i=t.enter("reference");const h=t.safe(t.associationId(e),{before:l,after:"]",...s.current()});return i(),t.stack=f,o(),a==="full"||!c||c!==h?l+=s.move(h+"]"):a==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function Va(){return"["}function Jt(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function Wa(e){const n=Jt(e),t=e.options.bulletOther;if(!t)return n==="*"?"-":"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(t===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+t+"`) to be different");return t}function Qa(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function Sr(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function Ga(e,n,t,r){const a=t.enter("list"),o=t.bulletCurrent;let i=e.ordered?Qa(t):Jt(t);const s=e.ordered?i==="."?")":".":Wa(t);let l=n&&t.bulletLastUsed?i===t.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((i==="*"||i==="-")&&f&&(!f.children||!f.children[0])&&t.stack[t.stack.length-1]==="list"&&t.stack[t.stack.length-2]==="listItem"&&t.stack[t.stack.length-3]==="list"&&t.stack[t.stack.length-4]==="listItem"&&t.indexStack[t.indexStack.length-1]===0&&t.indexStack[t.indexStack.length-2]===0&&t.indexStack[t.indexStack.length-3]===0&&(l=!0),Sr(t)===i&&f){let h=-1;for(;++h<e.children.length;){const d=e.children[h];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(i=s),t.bulletCurrent=i;const c=t.containerFlow(e,r);return t.bulletLastUsed=i,t.bulletCurrent=o,a(),c}function Xa(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function Ja(e,n,t,r){const a=Xa(t);let o=t.bulletCurrent||Jt(t);n&&n.type==="list"&&n.ordered&&(o=(typeof n.start=="number"&&n.start>-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+o);let i=o.length+1;(a==="tab"||a==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(i=Math.ceil(i/4)*4);const s=t.createTracker(r);s.move(o+" ".repeat(i-o.length)),s.shift(i);const l=t.enter("listItem"),c=t.indentLines(t.containerFlow(e,s.current()),f);return l(),c;function f(h,d,m){return d?(m?"":" ".repeat(i))+h:(m?o:o+" ".repeat(i-o.length))+h}}function Ya(e,n,t,r){const a=t.enter("paragraph"),o=t.enter("phrasing"),i=t.containerPhrasing(e,r);return o(),a(),i}const Ka=rr(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Za(e,n,t,r){return(e.children.some(function(i){return Ka(i)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function eo(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}wr.peek=to;function wr(e,n,t,r){const a=eo(t),o=t.enter("strong"),i=t.createTracker(r),s=i.move(a+a);let l=i.move(t.containerPhrasing(e,{after:a,before:s,...i.current()}));const c=l.charCodeAt(0),f=ht(r.before.charCodeAt(r.before.length-1),c,a);f.inside&&(l=Xe(c)+l.slice(1));const h=l.charCodeAt(l.length-1),d=ht(r.after.charCodeAt(0),h,a);d.inside&&(l=l.slice(0,-1)+Xe(h));const m=i.move(a+a);return o(),t.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},s+l+m}function to(e,n,t){return t.options.strong||"*"}function no(e,n,t,r){return t.safe(e.value,r)}function ro(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function io(e,n,t){const r=(Sr(t)+(t.options.ruleSpaces?" ":"")).repeat(ro(t));return t.options.ruleSpaces?r.slice(0,-1):r}const Cr={blockquote:Ea,break:wn,code:Ma,definition:Da,emphasis:fr,hardBreak:wn,heading:qa,html:mr,image:dr,imageReference:gr,inlineCode:xr,link:yr,linkReference:br,list:Ga,listItem:Ja,paragraph:Ya,root:Za,strong:wr,text:no,thematicBreak:io};function Tr(e,n){const t=Number.parseInt(e,n);return t<u.ht||t===u.vt||t>u.cr&&t<u.space||t>u.tilde&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?ce.replacementCharacter:String.fromCodePoint(t)}const ao=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function oo(e){return e.replace(ao,so)}function so(e,n,t){if(n)return n;if(t.charCodeAt(0)===u.numberSign){const a=t.charCodeAt(1),o=a===u.lowercaseX||a===u.uppercaseX;return Tr(t.slice(o?2:1),o?A.numericBaseHexadecimal:A.numericBaseDecimal)}return jt(t)||e}function lo(){return{enter:{table:uo,tableData:Tn,tableHeader:Tn,tableRow:po},exit:{codeText:fo,table:co,tableData:Ct,tableHeader:Ct,tableRow:Ct}}}function uo(e){const n=e._align;g(n,"expected `_align` on table"),this.enter({type:"table",align:n.map(function(t){return t==="none"?null:t}),children:[]},e),this.data.inTable=!0}function co(e){this.exit(e),this.data.inTable=void 0}function po(e){this.enter({type:"tableRow",children:[]},e)}function Ct(e){this.exit(e)}function Tn(e){this.enter({type:"tableCell",children:[]},e)}function fo(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,ho));const t=this.stack[this.stack.length-1];g(t.type==="inlineCode"),t.value=n,this.exit(e)}function ho(e,n){return n==="|"?n:e}function mo(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,a=n.stringLength,o=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
15
15
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:i,tableCell:l,tableRow:s}};function i(m,y,z,I){return c(f(m,z,I),m.align)}function s(m,y,z,I){const T=h(m,z,I),E=c([T]);return E.slice(0,E.indexOf(`
|
|
16
|
-
`))}function l(m,y,z,I){const T=z.enter("tableCell"),E=z.enter("phrasing"),N=z.containerPhrasing(m,{...I,before:o,after:o});return E(),T(),N}function c(m,y){return Mi(m,{align:y,alignDelimiters:r,padding:t,stringLength:a})}function f(m,y,z){const I=m.children;let T=-1;const E=[],N=y.enter("table");for(;++T<I.length;)E[T]=h(I[T],y,z);return N(),E}function h(m,y,z){const I=m.children;let T=-1;const E=[],N=y.enter("tableRow");for(;++T<I.length;)E[T]=l(I[T],m,y,z);return N(),E}function d(m,y,z){let I=Cr.inlineCode(m,y,z);return z.stack.includes("tableCell")&&(I=I.replace(/\|/g,"\\$&")),I}}function go(){return{exit:{taskListCheckValueChecked:In,taskListCheckValueUnchecked:In,paragraph:ko}}}function xo(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:yo}}}function In(e){const n=this.stack[this.stack.length-2];g(n.type==="listItem"),n.checked=e.type==="taskListCheckValueChecked"}function ko(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1];g(t.type==="paragraph");const r=t.children[0];if(r&&r.type==="text"){const a=n.children;let o=-1,i;for(;++o<a.length;){const s=a[o];if(s.type==="paragraph"){i=s;break}}i===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function yo(e,n,t,r){const a=e.children[0],o=typeof e.checked=="boolean"&&a&&a.type==="paragraph",i="["+(e.checked?"x":" ")+"] ",s=t.createTracker(r);o&&s.move(i);let l=Cr.listItem(e,n,t,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(f){return f+i}}function bo(){return[Yi(),xa(),wa(),lo(),go()]}function wo(e){return{extensions:[Ji(),ka(e),Sa(),mo(e),xo()]}}function K(e,n,t,r){const a=e.length;let o=0,i;if(n<0?n=-n>a?0:a+n:n=n>a?a:n,t=t>0?t:0,r.length<A.v8MaxSafeChunkSize)i=Array.from(r),i.unshift(n,t),e.splice(...i);else for(t&&e.splice(n,t);o<r.length;)i=r.slice(o,o+A.v8MaxSafeChunkSize),i.unshift(n,0),e.splice(...i),o+=A.v8MaxSafeChunkSize,n+=A.v8MaxSafeChunkSize}function J(e,n){return e.length>0?(K(e,e.length,0,n),e):n}const En={}.hasOwnProperty;function Ir(e){const n={};let t=-1;for(;++t<e.length;)So(n,e[t]);return n}function So(e,n){let t;for(t in n){const a=(En.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t];let i;if(o)for(i in o){En.call(a,i)||(a[i]=[]);const s=o[i];Co(a[i],Array.isArray(s)?s:s?[s]:[])}}}function Co(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);K(e,0,0,r)}const To={tokenize:Fo,partial:!0},Er={tokenize:Mo,partial:!0},zr={tokenize:Po,partial:!0},Ar={tokenize:Do,partial:!0},Io={tokenize:Lo,partial:!0},Nr={name:"wwwAutolink",tokenize:Ao,previous:Mr},Fr={name:"protocolAutolink",tokenize:No,previous:Pr},ke={name:"emailAutolink",tokenize:zo,previous:Dr},fe={};function Eo(){return{text:fe}}let Te=u.digit0;for(;Te<u.leftCurlyBrace;)fe[Te]=ke,Te++,Te===u.colon?Te=u.uppercaseA:Te===u.leftSquareBracket&&(Te=u.lowercaseA);fe[u.plusSign]=ke;fe[u.dash]=ke;fe[u.dot]=ke;fe[u.underscore]=ke;fe[u.uppercaseH]=[ke,Fr];fe[u.lowercaseH]=[ke,Fr];fe[u.uppercaseW]=[ke,Nr];fe[u.lowercaseW]=[ke,Nr];function zo(e,n,t){const r=this;let a,o;return i;function i(h){return!_t(h)||!Dr.call(r,r.previous)||Jt(r.events)?t(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(h))}function s(h){return _t(h)?(e.consume(h),s):h===u.atSign?(e.consume(h),l):t(h)}function l(h){return h===u.dot?e.check(Io,f,c)(h):h===u.dash||h===u.underscore||Z(h)?(o=!0,e.consume(h),l):f(h)}function c(h){return e.consume(h),a=!0,l}function f(h){return o&&a&&ee(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(h)):t(h)}}function Ao(e,n,t){const r=this;return a;function a(i){return i!==u.uppercaseW&&i!==u.lowercaseW||!Mr.call(r,r.previous)||Jt(r.events)?t(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(To,e.attempt(Er,e.attempt(zr,o),t),t)(i))}function o(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(i)}}function No(e,n,t){const r=this;let a="",o=!1;return i;function i(h){return(h===u.uppercaseH||h===u.lowercaseH)&&Pr.call(r,r.previous)&&!Jt(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(h),e.consume(h),s):t(h)}function s(h){if(ee(h)&&a.length<5)return a+=String.fromCodePoint(h),e.consume(h),s;if(h===u.colon){const d=a.toLowerCase();if(d==="http"||d==="https")return e.consume(h),l}return t(h)}function l(h){return h===u.slash?(e.consume(h),o?c:(o=!0,l)):t(h)}function c(h){return h===u.eof||ft(h)||V(h)||Ae(h)||dt(h)?t(h):e.attempt(Er,e.attempt(zr,f),t)(h)}function f(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(h)}}function Fo(e,n,t){let r=0;return a;function a(i){return(i===u.uppercaseW||i===u.lowercaseW)&&r<3?(r++,e.consume(i),a):i===u.dot&&r===3?(e.consume(i),o):t(i)}function o(i){return i===u.eof?t(i):n(i)}}function Mo(e,n,t){let r,a,o;return i;function i(c){return c===u.dot||c===u.underscore?e.check(Ar,l,s)(c):c===u.eof||V(c)||Ae(c)||c!==u.dash&&dt(c)?l(c):(o=!0,e.consume(c),i)}function s(c){return c===u.underscore?r=!0:(a=r,r=void 0),e.consume(c),i}function l(c){return a||r||!o?t(c):n(c)}}function Po(e,n){let t=0,r=0;return a;function a(i){return i===u.leftParenthesis?(t++,e.consume(i),a):i===u.rightParenthesis&&r<t?o(i):i===u.exclamationMark||i===u.quotationMark||i===u.ampersand||i===u.apostrophe||i===u.rightParenthesis||i===u.asterisk||i===u.comma||i===u.dot||i===u.colon||i===u.semicolon||i===u.lessThan||i===u.questionMark||i===u.rightSquareBracket||i===u.underscore||i===u.tilde?e.check(Ar,n,o)(i):i===u.eof||V(i)||Ae(i)?n(i):(e.consume(i),a)}function o(i){return i===u.rightParenthesis&&r++,e.consume(i),a}}function Do(e,n,t){return r;function r(s){return s===u.exclamationMark||s===u.quotationMark||s===u.apostrophe||s===u.rightParenthesis||s===u.asterisk||s===u.comma||s===u.dot||s===u.colon||s===u.semicolon||s===u.questionMark||s===u.underscore||s===u.tilde?(e.consume(s),r):s===u.ampersand?(e.consume(s),o):s===u.rightSquareBracket?(e.consume(s),a):s===u.lessThan||s===u.eof||V(s)||Ae(s)?n(s):t(s)}function a(s){return s===u.eof||s===u.leftParenthesis||s===u.leftSquareBracket||V(s)||Ae(s)?n(s):r(s)}function o(s){return ee(s)?i(s):t(s)}function i(s){return s===u.semicolon?(e.consume(s),r):ee(s)?(e.consume(s),i):t(s)}}function Lo(e,n,t){return r;function r(o){return e.consume(o),a}function a(o){return Z(o)?t(o):n(o)}}function Mr(e){return e===u.eof||e===u.leftParenthesis||e===u.asterisk||e===u.underscore||e===u.leftSquareBracket||e===u.rightSquareBracket||e===u.tilde||V(e)}function Pr(e){return!ee(e)}function Dr(e){return!(e===u.slash||_t(e))}function _t(e){return e===u.plusSign||e===u.dash||e===u.dot||e===u.underscore||Z(e)}function Jt(e){let n=e.length,t=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}function Re(e){const n=[];let t=-1,r=0,a=0;for(;++t<e.length;){const o=e.charCodeAt(t);let i="";if(o===u.percentSign&&Z(e.charCodeAt(t+1))&&Z(e.charCodeAt(t+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(i=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(t+1);o<56320&&s>56319&&s<57344?(i=String.fromCharCode(o,s),a=1):i=ce.replacementCharacter}else i=String.fromCharCode(o);i&&(n.push(e.slice(r,t),encodeURIComponent(i)),r=t+a+1,i=""),a&&(t+=a,a=0)}return n.join("")+e.slice(r)}function Ue(e,n,t){const r=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}const vt={name:"attention",resolveAll:Bo,tokenize:_o};function Bo(e,n){let t=-1,r,a,o,i,s,l,c,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const h={...e[r][1].end},d={...e[t][1].start};zn(h,-l),zn(d,l),i={type:l>1?p.strongSequence:p.emphasisSequence,start:h,end:{...e[r][1].end}},s={type:l>1?p.strongSequence:p.emphasisSequence,start:{...e[t][1].start},end:d},o={type:l>1?p.strongText:p.emphasisText,start:{...e[r][1].end},end:{...e[t][1].start}},a={type:l>1?p.strong:p.emphasis,start:{...i.start},end:{...s.end}},e[r][1].end={...i.start},e[t][1].start={...s.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=J(c,[["enter",e[r][1],n],["exit",e[r][1],n]])),c=J(c,[["enter",a,n],["enter",i,n],["exit",i,n],["enter",o,n]]),g(n.parser.constructs.insideSpan.null,"expected `insideSpan` to be populated"),c=J(c,Ue(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),c=J(c,[["exit",o,n],["enter",s,n],["exit",s,n],["exit",a,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,c=J(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,K(e,r-1,t-r+3,c),t=r+c.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function _o(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Oe(r);let o;return i;function i(l){return g(l===u.asterisk||l===u.underscore,"expected asterisk or underscore"),o=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===o)return e.consume(l),s;const c=e.exit("attentionSequence"),f=Oe(l);g(t,"expected `attentionMarkers` to be populated");const h=!f||f===A.characterGroupPunctuation&&a||t.includes(l),d=!a||a===A.characterGroupPunctuation&&f||t.includes(r);return c._open=!!(o===u.asterisk?h:h&&(a||!d)),c._close=!!(o===u.asterisk?d:d&&(f||!h)),n(l)}}function zn(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const vo={name:"autolink",tokenize:Oo};function Oo(e,n,t){let r=0;return a;function a(m){return g(m===u.lessThan,"expected `<`"),e.enter(p.autolink),e.enter(p.autolinkMarker),e.consume(m),e.exit(p.autolinkMarker),e.enter(p.autolinkProtocol),o}function o(m){return ee(m)?(e.consume(m),i):m===u.atSign?t(m):c(m)}function i(m){return m===u.plusSign||m===u.dash||m===u.dot||Z(m)?(r=1,s(m)):c(m)}function s(m){return m===u.colon?(e.consume(m),r=0,l):(m===u.plusSign||m===u.dash||m===u.dot||Z(m))&&r++<A.autolinkSchemeSizeMax?(e.consume(m),s):(r=0,c(m))}function l(m){return m===u.greaterThan?(e.exit(p.autolinkProtocol),e.enter(p.autolinkMarker),e.consume(m),e.exit(p.autolinkMarker),e.exit(p.autolink),n):m===u.eof||m===u.space||m===u.lessThan||ft(m)?t(m):(e.consume(m),l)}function c(m){return m===u.atSign?(e.consume(m),f):$i(m)?(e.consume(m),c):t(m)}function f(m){return Z(m)?h(m):t(m)}function h(m){return m===u.dot?(e.consume(m),r=0,f):m===u.greaterThan?(e.exit(p.autolinkProtocol).type=p.autolinkEmail,e.enter(p.autolinkMarker),e.consume(m),e.exit(p.autolinkMarker),e.exit(p.autolink),n):d(m)}function d(m){if((m===u.dash||Z(m))&&r++<A.autolinkDomainSizeMax){const y=m===u.dash?d:h;return e.consume(m),y}return t(m)}}function U(e,n,t,r){const a=r?r-1:Number.POSITIVE_INFINITY;let o=0;return i;function i(l){return R(l)?(e.enter(t),s(l)):n(l)}function s(l){return R(l)&&o++<a?(e.consume(l),s):(e.exit(t),n(l))}}const et={partial:!0,tokenize:qo};function qo(e,n,t){return r;function r(o){return R(o)?U(e,a,p.linePrefix)(o):a(o)}function a(o){return o===u.eof||F(o)?n(o):t(o)}}const Lr={continuation:{tokenize:Uo},exit:jo,name:"blockQuote",tokenize:Ro};function Ro(e,n,t){const r=this;return a;function a(i){if(i===u.greaterThan){const s=r.containerState;return g(s,"expected `containerState` to be defined in container"),s.open||(e.enter(p.blockQuote,{_container:!0}),s.open=!0),e.enter(p.blockQuotePrefix),e.enter(p.blockQuoteMarker),e.consume(i),e.exit(p.blockQuoteMarker),o}return t(i)}function o(i){return R(i)?(e.enter(p.blockQuotePrefixWhitespace),e.consume(i),e.exit(p.blockQuotePrefixWhitespace),e.exit(p.blockQuotePrefix),n):(e.exit(p.blockQuotePrefix),n(i))}}function Uo(e,n,t){const r=this;return a;function a(i){return R(i)?(g(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),U(e,o,p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:A.tabSize)(i)):o(i)}function o(i){return e.attempt(Lr,n,t)(i)}}function jo(e){e.exit(p.blockQuote)}const Br={name:"characterEscape",tokenize:$o};function $o(e,n,t){return r;function r(o){return g(o===u.backslash,"expected `\\`"),e.enter(p.characterEscape),e.enter(p.escapeMarker),e.consume(o),e.exit(p.escapeMarker),a}function a(o){return Vi(o)?(e.enter(p.characterEscapeValue),e.consume(o),e.exit(p.characterEscapeValue),e.exit(p.characterEscape),n):t(o)}}const _r={name:"characterReference",tokenize:Ho};function Ho(e,n,t){const r=this;let a=0,o,i;return s;function s(h){return g(h===u.ampersand,"expected `&`"),e.enter(p.characterReference),e.enter(p.characterReferenceMarker),e.consume(h),e.exit(p.characterReferenceMarker),l}function l(h){return h===u.numberSign?(e.enter(p.characterReferenceMarkerNumeric),e.consume(h),e.exit(p.characterReferenceMarkerNumeric),c):(e.enter(p.characterReferenceValue),o=A.characterReferenceNamedSizeMax,i=Z,f(h))}function c(h){return h===u.uppercaseX||h===u.lowercaseX?(e.enter(p.characterReferenceMarkerHexadecimal),e.consume(h),e.exit(p.characterReferenceMarkerHexadecimal),e.enter(p.characterReferenceValue),o=A.characterReferenceHexadecimalSizeMax,i=Hi,f):(e.enter(p.characterReferenceValue),o=A.characterReferenceDecimalSizeMax,i=Bt,f(h))}function f(h){if(h===u.semicolon&&a){const d=e.exit(p.characterReferenceValue);return i===Z&&!jt(r.sliceSerialize(d))?t(h):(e.enter(p.characterReferenceMarker),e.consume(h),e.exit(p.characterReferenceMarker),e.exit(p.characterReference),n)}return i(h)&&a++<o?(e.consume(h),f):t(h)}}const An={partial:!0,tokenize:Wo},Nn={concrete:!0,name:"codeFenced",tokenize:Vo};function Vo(e,n,t){const r=this,a={partial:!0,tokenize:_};let o=0,i=0,s;return l;function l(S){return c(S)}function c(S){g(S===u.graveAccent||S===u.tilde,"expected `` ` `` or `~`");const v=r.events[r.events.length-1];return o=v&&v[1].type===p.linePrefix?v[2].sliceSerialize(v[1],!0).length:0,s=S,e.enter(p.codeFenced),e.enter(p.codeFencedFence),e.enter(p.codeFencedFenceSequence),f(S)}function f(S){return S===s?(i++,e.consume(S),f):i<A.codeFencedSequenceSizeMin?t(S):(e.exit(p.codeFencedFenceSequence),R(S)?U(e,h,p.whitespace)(S):h(S))}function h(S){return S===u.eof||F(S)?(e.exit(p.codeFencedFence),r.interrupt?n(S):e.check(An,z,D)(S)):(e.enter(p.codeFencedFenceInfo),e.enter(p.chunkString,{contentType:A.contentTypeString}),d(S))}function d(S){return S===u.eof||F(S)?(e.exit(p.chunkString),e.exit(p.codeFencedFenceInfo),h(S)):R(S)?(e.exit(p.chunkString),e.exit(p.codeFencedFenceInfo),U(e,m,p.whitespace)(S)):S===u.graveAccent&&S===s?t(S):(e.consume(S),d)}function m(S){return S===u.eof||F(S)?h(S):(e.enter(p.codeFencedFenceMeta),e.enter(p.chunkString,{contentType:A.contentTypeString}),y(S))}function y(S){return S===u.eof||F(S)?(e.exit(p.chunkString),e.exit(p.codeFencedFenceMeta),h(S)):S===u.graveAccent&&S===s?t(S):(e.consume(S),y)}function z(S){return g(F(S),"expected eol"),e.attempt(a,D,I)(S)}function I(S){return g(F(S),"expected eol"),e.enter(p.lineEnding),e.consume(S),e.exit(p.lineEnding),T}function T(S){return o>0&&R(S)?U(e,E,p.linePrefix,o+1)(S):E(S)}function E(S){return S===u.eof||F(S)?e.check(An,z,D)(S):(e.enter(p.codeFlowValue),N(S))}function N(S){return S===u.eof||F(S)?(e.exit(p.codeFlowValue),E(S)):(e.consume(S),N)}function D(S){return e.exit(p.codeFenced),n(S)}function _(S,v,$){let B=0;return b;function b(O){return g(F(O),"expected eol"),S.enter(p.lineEnding),S.consume(O),S.exit(p.lineEnding),Q}function Q(O){return g(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),S.enter(p.codeFencedFence),R(O)?U(S,j,p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:A.tabSize)(O):j(O)}function j(O){return O===s?(S.enter(p.codeFencedFenceSequence),M(O)):$(O)}function M(O){return O===s?(B++,S.consume(O),M):B>=i?(S.exit(p.codeFencedFenceSequence),R(O)?U(S,L,p.whitespace)(O):L(O)):$(O)}function L(O){return O===u.eof||F(O)?(S.exit(p.codeFencedFence),v(O)):$(O)}}}function Wo(e,n,t){const r=this;return a;function a(i){return i===u.eof?t(i):(g(F(i),"expected eol"),e.enter(p.lineEnding),e.consume(i),e.exit(p.lineEnding),o)}function o(i){return r.parser.lazy[r.now().line]?t(i):n(i)}}const Tt={name:"codeIndented",tokenize:Go},Qo={partial:!0,tokenize:Xo};function Go(e,n,t){const r=this;return a;function a(c){return g(R(c)),e.enter(p.codeIndented),U(e,o,p.linePrefix,A.tabSize+1)(c)}function o(c){const f=r.events[r.events.length-1];return f&&f[1].type===p.linePrefix&&f[2].sliceSerialize(f[1],!0).length>=A.tabSize?i(c):t(c)}function i(c){return c===u.eof?l(c):F(c)?e.attempt(Qo,i,l)(c):(e.enter(p.codeFlowValue),s(c))}function s(c){return c===u.eof||F(c)?(e.exit(p.codeFlowValue),i(c)):(e.consume(c),s)}function l(c){return e.exit(p.codeIndented),n(c)}}function Xo(e,n,t){const r=this;return a;function a(i){return r.parser.lazy[r.now().line]?t(i):F(i)?(e.enter(p.lineEnding),e.consume(i),e.exit(p.lineEnding),a):U(e,o,p.linePrefix,A.tabSize+1)(i)}function o(i){const s=r.events[r.events.length-1];return s&&s[1].type===p.linePrefix&&s[2].sliceSerialize(s[1],!0).length>=A.tabSize?n(i):F(i)?a(i):t(i)}}const Yo={name:"codeText",previous:vr,resolve:Jo,tokenize:Ko};function Jo(e){let n=e.length-4,t=3,r,a;if((e[t][1].type===p.lineEnding||e[t][1].type==="space")&&(e[n][1].type===p.lineEnding||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type===p.codeTextData){e[t][1].type=p.codeTextPadding,e[n][1].type=p.codeTextPadding,t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)a===void 0?r!==n&&e[r][1].type!==p.lineEnding&&(a=r):(r===n||e[r][1].type===p.lineEnding)&&(e[a][1].type=p.codeTextData,r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),n-=r-a-2,r=a+2),a=void 0);return e}function vr(e){return e!==u.graveAccent||this.events[this.events.length-1][1].type===p.characterEscape}function Ko(e,n,t){const r=this;let a=0,o,i;return s;function s(d){return g(d===u.graveAccent,"expected `` ` ``"),g(vr.call(r,r.previous),"expected correct previous"),e.enter(p.codeText),e.enter(p.codeTextSequence),l(d)}function l(d){return d===u.graveAccent?(e.consume(d),a++,l):(e.exit(p.codeTextSequence),c(d))}function c(d){return d===u.eof?t(d):d===u.space?(e.enter("space"),e.consume(d),e.exit("space"),c):d===u.graveAccent?(i=e.enter(p.codeTextSequence),o=0,h(d)):F(d)?(e.enter(p.lineEnding),e.consume(d),e.exit(p.lineEnding),c):(e.enter(p.codeTextData),f(d))}function f(d){return d===u.eof||d===u.space||d===u.graveAccent||F(d)?(e.exit(p.codeTextData),c(d)):(e.consume(d),f)}function h(d){return d===u.graveAccent?(e.consume(d),o++,h):o===a?(e.exit(p.codeTextSequence),e.exit(p.codeText),n(d)):(i.type=p.codeTextData,f(d))}}class Zo{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const a=t||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&Qe(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Qe(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Qe(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);Qe(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Qe(this.left,t.reverse())}}}function Qe(e,n){let t=0;if(n.length<A.v8MaxSafeChunkSize)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+A.v8MaxSafeChunkSize)),t+=A.v8MaxSafeChunkSize}function Or(e){const n={};let t=-1,r,a,o,i,s,l,c;const f=new Zo(e);for(;++t<f.length;){for(;t in n;)t=n[t];if(r=f.get(t),t&&r[1].type===p.chunkFlow&&f.get(t-1)[1].type===p.listItemPrefix&&(g(r[1]._tokenizer,"expected `_tokenizer` on subtokens"),l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type===p.lineEndingBlank&&(o+=2),o<l.length&&l[o][1].type===p.content))for(;++o<l.length&&l[o][1].type!==p.content;)l[o][1].type===p.chunkText&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,es(f,t)),t=n[t],c=!0);else if(r[1]._container){for(o=t,a=void 0;o--;)if(i=f.get(o),i[1].type===p.lineEnding||i[1].type===p.lineEndingBlank)i[0]==="enter"&&(a&&(f.get(a)[1].type=p.lineEndingBlank),i[1].type=p.lineEnding,a=o);else if(!(i[1].type===p.linePrefix||i[1].type===p.listItemIndent))break;a&&(r[1].end={...f.get(a)[1].start},s=f.slice(a,t),s.unshift(r),f.splice(a,t-a+1,s))}}return K(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!c}function es(e,n){const t=e.get(n)[1],r=e.get(n)[2];let a=n-1;const o=[];g(t.contentType,"expected `contentType` on subtokens");let i=t._tokenizer;i||(i=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const s=i.events,l=[],c={};let f,h,d=-1,m=t,y=0,z=0;const I=[z];for(;m;){for(;e.get(++a)[1]!==m;);g(!h||m.previous===h,"expected previous to match"),g(!h||h.next===m,"expected next to match"),o.push(a),m._tokenizer||(f=r.sliceStream(m),m.next||f.push(u.eof),h&&i.defineSkip(m.start),m._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(f),m._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),h=m,m=m.next}for(m=t;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(g(m,"expected a current token"),z=d+1,I.push(z),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(i.events=[],m?(m._tokenizer=void 0,m.previous=void 0,g(!m.next,"expected no next token")):I.pop(),d=I.length;d--;){const T=s.slice(I[d],I[d+1]),E=o.pop();g(E!==void 0,"expected a start position when splicing"),l.push([E,E+T.length-1]),e.splice(E,2,T)}for(l.reverse(),d=-1;++d<l.length;)c[y+l[d][0]]=y+l[d][1],y+=l[d][1]-l[d][0]-1;return c}const ts={resolve:rs,tokenize:is},ns={partial:!0,tokenize:as};function rs(e){return Or(e),e}function is(e,n){let t;return r;function r(s){return g(s!==u.eof&&!F(s),"expected no eof or eol"),e.enter(p.content),t=e.enter(p.chunkContent,{contentType:A.contentTypeContent}),a(s)}function a(s){return s===u.eof?o(s):F(s)?e.check(ns,i,o)(s):(e.consume(s),a)}function o(s){return e.exit(p.chunkContent),e.exit(p.content),n(s)}function i(s){return g(F(s),"expected eol"),e.consume(s),e.exit(p.chunkContent),g(t,"expected previous token"),t.next=e.enter(p.chunkContent,{contentType:A.contentTypeContent,previous:t}),t=t.next,a}}function as(e,n,t){const r=this;return a;function a(i){return g(F(i),"expected a line ending"),e.exit(p.chunkContent),e.enter(p.lineEnding),e.consume(i),e.exit(p.lineEnding),U(e,o,p.linePrefix)}function o(i){if(i===u.eof||F(i))return t(i);g(r.parser.constructs.disable.null,"expected `disable.null` to be populated");const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type===p.linePrefix&&s[2].sliceSerialize(s[1],!0).length>=A.tabSize?n(i):e.interrupt(r.parser.constructs.flow,t,n)(i)}}function qr(e,n,t,r,a,o,i,s,l){const c=l||Number.POSITIVE_INFINITY;let f=0;return h;function h(T){return T===u.lessThan?(e.enter(r),e.enter(a),e.enter(o),e.consume(T),e.exit(o),d):T===u.eof||T===u.space||T===u.rightParenthesis||ft(T)?t(T):(e.enter(r),e.enter(i),e.enter(s),e.enter(p.chunkString,{contentType:A.contentTypeString}),z(T))}function d(T){return T===u.greaterThan?(e.enter(o),e.consume(T),e.exit(o),e.exit(a),e.exit(r),n):(e.enter(s),e.enter(p.chunkString,{contentType:A.contentTypeString}),m(T))}function m(T){return T===u.greaterThan?(e.exit(p.chunkString),e.exit(s),d(T)):T===u.eof||T===u.lessThan||F(T)?t(T):(e.consume(T),T===u.backslash?y:m)}function y(T){return T===u.lessThan||T===u.greaterThan||T===u.backslash?(e.consume(T),m):m(T)}function z(T){return!f&&(T===u.eof||T===u.rightParenthesis||V(T))?(e.exit(p.chunkString),e.exit(s),e.exit(i),e.exit(r),n(T)):f<c&&T===u.leftParenthesis?(e.consume(T),f++,z):T===u.rightParenthesis?(e.consume(T),f--,z):T===u.eof||T===u.space||T===u.leftParenthesis||ft(T)?t(T):(e.consume(T),T===u.backslash?I:z)}function I(T){return T===u.leftParenthesis||T===u.rightParenthesis||T===u.backslash?(e.consume(T),z):z(T)}}function Rr(e,n,t,r,a,o){const i=this;let s=0,l;return c;function c(m){return g(m===u.leftSquareBracket,"expected `[`"),e.enter(r),e.enter(a),e.consume(m),e.exit(a),e.enter(o),f}function f(m){return s>A.linkReferenceSizeMax||m===u.eof||m===u.leftSquareBracket||m===u.rightSquareBracket&&!l||m===u.caret&&!s&&"_hiddenFootnoteSupport"in i.parser.constructs?t(m):m===u.rightSquareBracket?(e.exit(o),e.enter(a),e.consume(m),e.exit(a),e.exit(r),n):F(m)?(e.enter(p.lineEnding),e.consume(m),e.exit(p.lineEnding),f):(e.enter(p.chunkString,{contentType:A.contentTypeString}),h(m))}function h(m){return m===u.eof||m===u.leftSquareBracket||m===u.rightSquareBracket||F(m)||s++>A.linkReferenceSizeMax?(e.exit(p.chunkString),f(m)):(e.consume(m),l||(l=!R(m)),m===u.backslash?d:h)}function d(m){return m===u.leftSquareBracket||m===u.backslash||m===u.rightSquareBracket?(e.consume(m),s++,h):h(m)}}function Ur(e,n,t,r,a,o){let i;return s;function s(d){return d===u.quotationMark||d===u.apostrophe||d===u.leftParenthesis?(e.enter(r),e.enter(a),e.consume(d),e.exit(a),i=d===u.leftParenthesis?u.rightParenthesis:d,l):t(d)}function l(d){return d===i?(e.enter(a),e.consume(d),e.exit(a),e.exit(r),n):(e.enter(o),c(d))}function c(d){return d===i?(e.exit(o),l(i)):d===u.eof?t(d):F(d)?(e.enter(p.lineEnding),e.consume(d),e.exit(p.lineEnding),U(e,c,p.linePrefix)):(e.enter(p.chunkString,{contentType:A.contentTypeString}),f(d))}function f(d){return d===i||d===u.eof||F(d)?(e.exit(p.chunkString),c(d)):(e.consume(d),d===u.backslash?h:f)}function h(d){return d===i||d===u.backslash?(e.consume(d),f):f(d)}}function Ge(e,n){let t;return r;function r(a){return F(a)?(e.enter(p.lineEnding),e.consume(a),e.exit(p.lineEnding),t=!0,r):R(a)?U(e,r,t?p.linePrefix:p.lineSuffix)(a):n(a)}}const os={name:"definition",tokenize:ls},ss={partial:!0,tokenize:us};function ls(e,n,t){const r=this;let a;return o;function o(m){return e.enter(p.definition),i(m)}function i(m){return g(m===u.leftSquareBracket,"expected `[`"),Rr.call(r,e,s,t,p.definitionLabel,p.definitionLabelMarker,p.definitionLabelString)(m)}function s(m){return a=le(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===u.colon?(e.enter(p.definitionMarker),e.consume(m),e.exit(p.definitionMarker),l):t(m)}function l(m){return V(m)?Ge(e,c)(m):c(m)}function c(m){return qr(e,f,t,p.definitionDestination,p.definitionDestinationLiteral,p.definitionDestinationLiteralMarker,p.definitionDestinationRaw,p.definitionDestinationString)(m)}function f(m){return e.attempt(ss,h,h)(m)}function h(m){return R(m)?U(e,d,p.whitespace)(m):d(m)}function d(m){return m===u.eof||F(m)?(e.exit(p.definition),r.parser.defined.push(a),n(m)):t(m)}}function us(e,n,t){return r;function r(s){return V(s)?Ge(e,a)(s):t(s)}function a(s){return Ur(e,o,t,p.definitionTitle,p.definitionTitleMarker,p.definitionTitleString)(s)}function o(s){return R(s)?U(e,i,p.whitespace)(s):i(s)}function i(s){return s===u.eof||F(s)?n(s):t(s)}}const cs={name:"hardBreakEscape",tokenize:ps};function ps(e,n,t){return r;function r(o){return g(o===u.backslash,"expected `\\`"),e.enter(p.hardBreakEscape),e.consume(o),a}function a(o){return F(o)?(e.exit(p.hardBreakEscape),n(o)):t(o)}}const fs={name:"headingAtx",resolve:hs,tokenize:ms};function hs(e,n){let t=e.length-2,r=3,a,o;return e[r][1].type===p.whitespace&&(r+=2),t-2>r&&e[t][1].type===p.whitespace&&(t-=2),e[t][1].type===p.atxHeadingSequence&&(r===t-1||t-4>r&&e[t-2][1].type===p.whitespace)&&(t-=r+1===t?2:4),t>r&&(a={type:p.atxHeadingText,start:e[r][1].start,end:e[t][1].end},o={type:p.chunkText,start:e[r][1].start,end:e[t][1].end,contentType:A.contentTypeText},K(e,r,t-r+1,[["enter",a,n],["enter",o,n],["exit",o,n],["exit",a,n]])),e}function ms(e,n,t){let r=0;return a;function a(f){return e.enter(p.atxHeading),o(f)}function o(f){return g(f===u.numberSign,"expected `#`"),e.enter(p.atxHeadingSequence),i(f)}function i(f){return f===u.numberSign&&r++<A.atxHeadingOpeningFenceSizeMax?(e.consume(f),i):f===u.eof||V(f)?(e.exit(p.atxHeadingSequence),s(f)):t(f)}function s(f){return f===u.numberSign?(e.enter(p.atxHeadingSequence),l(f)):f===u.eof||F(f)?(e.exit(p.atxHeading),n(f)):R(f)?U(e,s,p.whitespace)(f):(e.enter(p.atxHeadingText),c(f))}function l(f){return f===u.numberSign?(e.consume(f),l):(e.exit(p.atxHeadingSequence),s(f))}function c(f){return f===u.eof||f===u.numberSign||V(f)?(e.exit(p.atxHeadingText),s(f)):(e.consume(f),c)}}const ds=["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"],Fn=["pre","script","style","textarea"],gs={concrete:!0,name:"htmlFlow",resolveTo:ys,tokenize:bs},xs={partial:!0,tokenize:Ss},ks={partial:!0,tokenize:ws};function ys(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type===p.htmlFlow););return n>1&&e[n-2][1].type===p.linePrefix&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function bs(e,n,t){const r=this;let a,o,i,s,l;return c;function c(k){return f(k)}function f(k){return g(k===u.lessThan,"expected `<`"),e.enter(p.htmlFlow),e.enter(p.htmlFlowData),e.consume(k),h}function h(k){return k===u.exclamationMark?(e.consume(k),d):k===u.slash?(e.consume(k),o=!0,z):k===u.questionMark?(e.consume(k),a=A.htmlInstruction,r.interrupt?n:x):ee(k)?(g(k!==null),e.consume(k),i=String.fromCharCode(k),I):t(k)}function d(k){return k===u.dash?(e.consume(k),a=A.htmlComment,m):k===u.leftSquareBracket?(e.consume(k),a=A.htmlCdata,s=0,y):ee(k)?(e.consume(k),a=A.htmlDeclaration,r.interrupt?n:x):t(k)}function m(k){return k===u.dash?(e.consume(k),r.interrupt?n:x):t(k)}function y(k){const re=A.cdataOpeningString;return k===re.charCodeAt(s++)?(e.consume(k),s===re.length?r.interrupt?n:j:y):t(k)}function z(k){return ee(k)?(g(k!==null),e.consume(k),i=String.fromCharCode(k),I):t(k)}function I(k){if(k===u.eof||k===u.slash||k===u.greaterThan||V(k)){const re=k===u.slash,we=i.toLowerCase();return!re&&!o&&Fn.includes(we)?(a=A.htmlRaw,r.interrupt?n(k):j(k)):ds.includes(i.toLowerCase())?(a=A.htmlBasic,re?(e.consume(k),T):r.interrupt?n(k):j(k)):(a=A.htmlComplete,r.interrupt&&!r.parser.lazy[r.now().line]?t(k):o?E(k):N(k))}return k===u.dash||Z(k)?(e.consume(k),i+=String.fromCharCode(k),I):t(k)}function T(k){return k===u.greaterThan?(e.consume(k),r.interrupt?n:j):t(k)}function E(k){return R(k)?(e.consume(k),E):b(k)}function N(k){return k===u.slash?(e.consume(k),b):k===u.colon||k===u.underscore||ee(k)?(e.consume(k),D):R(k)?(e.consume(k),N):b(k)}function D(k){return k===u.dash||k===u.dot||k===u.colon||k===u.underscore||Z(k)?(e.consume(k),D):_(k)}function _(k){return k===u.equalsTo?(e.consume(k),S):R(k)?(e.consume(k),_):N(k)}function S(k){return k===u.eof||k===u.lessThan||k===u.equalsTo||k===u.greaterThan||k===u.graveAccent?t(k):k===u.quotationMark||k===u.apostrophe?(e.consume(k),l=k,v):R(k)?(e.consume(k),S):$(k)}function v(k){return k===l?(e.consume(k),l=null,B):k===u.eof||F(k)?t(k):(e.consume(k),v)}function $(k){return k===u.eof||k===u.quotationMark||k===u.apostrophe||k===u.slash||k===u.lessThan||k===u.equalsTo||k===u.greaterThan||k===u.graveAccent||V(k)?_(k):(e.consume(k),$)}function B(k){return k===u.slash||k===u.greaterThan||R(k)?N(k):t(k)}function b(k){return k===u.greaterThan?(e.consume(k),Q):t(k)}function Q(k){return k===u.eof||F(k)?j(k):R(k)?(e.consume(k),Q):t(k)}function j(k){return k===u.dash&&a===A.htmlComment?(e.consume(k),W):k===u.lessThan&&a===A.htmlRaw?(e.consume(k),G):k===u.greaterThan&&a===A.htmlDeclaration?(e.consume(k),se):k===u.questionMark&&a===A.htmlInstruction?(e.consume(k),x):k===u.rightSquareBracket&&a===A.htmlCdata?(e.consume(k),ue):F(k)&&(a===A.htmlBasic||a===A.htmlComplete)?(e.exit(p.htmlFlowData),e.check(xs,he,M)(k)):k===u.eof||F(k)?(e.exit(p.htmlFlowData),M(k)):(e.consume(k),j)}function M(k){return e.check(ks,L,he)(k)}function L(k){return g(F(k)),e.enter(p.lineEnding),e.consume(k),e.exit(p.lineEnding),O}function O(k){return k===u.eof||F(k)?M(k):(e.enter(p.htmlFlowData),j(k))}function W(k){return k===u.dash?(e.consume(k),x):j(k)}function G(k){return k===u.slash?(e.consume(k),i="",oe):j(k)}function oe(k){if(k===u.greaterThan){const re=i.toLowerCase();return Fn.includes(re)?(e.consume(k),se):j(k)}return ee(k)&&i.length<A.htmlRawSizeMax?(g(k!==null),e.consume(k),i+=String.fromCharCode(k),oe):j(k)}function ue(k){return k===u.rightSquareBracket?(e.consume(k),x):j(k)}function x(k){return k===u.greaterThan?(e.consume(k),se):k===u.dash&&a===A.htmlComment?(e.consume(k),x):j(k)}function se(k){return k===u.eof||F(k)?(e.exit(p.htmlFlowData),he(k)):(e.consume(k),se)}function he(k){return e.exit(p.htmlFlow),n(k)}}function ws(e,n,t){const r=this;return a;function a(i){return F(i)?(e.enter(p.lineEnding),e.consume(i),e.exit(p.lineEnding),o):t(i)}function o(i){return r.parser.lazy[r.now().line]?t(i):n(i)}}function Ss(e,n,t){return r;function r(a){return g(F(a),"expected a line ending"),e.enter(p.lineEnding),e.consume(a),e.exit(p.lineEnding),e.attempt(et,n,t)}}const Cs={name:"htmlText",tokenize:Ts};function Ts(e,n,t){const r=this;let a,o,i;return s;function s(x){return g(x===u.lessThan,"expected `<`"),e.enter(p.htmlText),e.enter(p.htmlTextData),e.consume(x),l}function l(x){return x===u.exclamationMark?(e.consume(x),c):x===u.slash?(e.consume(x),_):x===u.questionMark?(e.consume(x),N):ee(x)?(e.consume(x),$):t(x)}function c(x){return x===u.dash?(e.consume(x),f):x===u.leftSquareBracket?(e.consume(x),o=0,y):ee(x)?(e.consume(x),E):t(x)}function f(x){return x===u.dash?(e.consume(x),m):t(x)}function h(x){return x===u.eof?t(x):x===u.dash?(e.consume(x),d):F(x)?(i=h,G(x)):(e.consume(x),h)}function d(x){return x===u.dash?(e.consume(x),m):h(x)}function m(x){return x===u.greaterThan?W(x):x===u.dash?d(x):h(x)}function y(x){const se=A.cdataOpeningString;return x===se.charCodeAt(o++)?(e.consume(x),o===se.length?z:y):t(x)}function z(x){return x===u.eof?t(x):x===u.rightSquareBracket?(e.consume(x),I):F(x)?(i=z,G(x)):(e.consume(x),z)}function I(x){return x===u.rightSquareBracket?(e.consume(x),T):z(x)}function T(x){return x===u.greaterThan?W(x):x===u.rightSquareBracket?(e.consume(x),T):z(x)}function E(x){return x===u.eof||x===u.greaterThan?W(x):F(x)?(i=E,G(x)):(e.consume(x),E)}function N(x){return x===u.eof?t(x):x===u.questionMark?(e.consume(x),D):F(x)?(i=N,G(x)):(e.consume(x),N)}function D(x){return x===u.greaterThan?W(x):N(x)}function _(x){return ee(x)?(e.consume(x),S):t(x)}function S(x){return x===u.dash||Z(x)?(e.consume(x),S):v(x)}function v(x){return F(x)?(i=v,G(x)):R(x)?(e.consume(x),v):W(x)}function $(x){return x===u.dash||Z(x)?(e.consume(x),$):x===u.slash||x===u.greaterThan||V(x)?B(x):t(x)}function B(x){return x===u.slash?(e.consume(x),W):x===u.colon||x===u.underscore||ee(x)?(e.consume(x),b):F(x)?(i=B,G(x)):R(x)?(e.consume(x),B):W(x)}function b(x){return x===u.dash||x===u.dot||x===u.colon||x===u.underscore||Z(x)?(e.consume(x),b):Q(x)}function Q(x){return x===u.equalsTo?(e.consume(x),j):F(x)?(i=Q,G(x)):R(x)?(e.consume(x),Q):B(x)}function j(x){return x===u.eof||x===u.lessThan||x===u.equalsTo||x===u.greaterThan||x===u.graveAccent?t(x):x===u.quotationMark||x===u.apostrophe?(e.consume(x),a=x,M):F(x)?(i=j,G(x)):R(x)?(e.consume(x),j):(e.consume(x),L)}function M(x){return x===a?(e.consume(x),a=void 0,O):x===u.eof?t(x):F(x)?(i=M,G(x)):(e.consume(x),M)}function L(x){return x===u.eof||x===u.quotationMark||x===u.apostrophe||x===u.lessThan||x===u.equalsTo||x===u.graveAccent?t(x):x===u.slash||x===u.greaterThan||V(x)?B(x):(e.consume(x),L)}function O(x){return x===u.slash||x===u.greaterThan||V(x)?B(x):t(x)}function W(x){return x===u.greaterThan?(e.consume(x),e.exit(p.htmlTextData),e.exit(p.htmlText),n):t(x)}function G(x){return g(i,"expected return state"),g(F(x),"expected eol"),e.exit(p.htmlTextData),e.enter(p.lineEnding),e.consume(x),e.exit(p.lineEnding),oe}function oe(x){return g(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),R(x)?U(e,ue,p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:A.tabSize)(x):ue(x)}function ue(x){return e.enter(p.htmlTextData),i(x)}}const Kt={name:"labelEnd",resolveAll:As,resolveTo:Ns,tokenize:Fs},Is={tokenize:Ms},Es={tokenize:Ps},zs={tokenize:Ds};function As(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type===p.labelImage||r.type===p.labelLink||r.type===p.labelEnd){const a=r.type===p.labelImage?4:2;r.type=p.data,n+=a}}return e.length!==t.length&&K(e,0,e.length,t),e}function Ns(e,n){let t=e.length,r=0,a,o,i,s;for(;t--;)if(a=e[t][1],o){if(a.type===p.link||a.type===p.labelLink&&a._inactive)break;e[t][0]==="enter"&&a.type===p.labelLink&&(a._inactive=!0)}else if(i){if(e[t][0]==="enter"&&(a.type===p.labelImage||a.type===p.labelLink)&&!a._balanced&&(o=t,a.type!==p.labelLink)){r=2;break}}else a.type===p.labelEnd&&(i=t);g(o!==void 0,"`open` is supposed to be found"),g(i!==void 0,"`close` is supposed to be found");const l={type:e[o][1].type===p.labelLink?p.link:p.image,start:{...e[o][1].start},end:{...e[e.length-1][1].end}},c={type:p.label,start:{...e[o][1].start},end:{...e[i][1].end}},f={type:p.labelText,start:{...e[o+r+2][1].end},end:{...e[i-2][1].start}};return s=[["enter",l,n],["enter",c,n]],s=J(s,e.slice(o+1,o+r+3)),s=J(s,[["enter",f,n]]),g(n.parser.constructs.insideSpan.null,"expected `insideSpan.null` to be populated"),s=J(s,Ue(n.parser.constructs.insideSpan.null,e.slice(o+r+4,i-3),n)),s=J(s,[["exit",f,n],e[i-2],e[i-1],["exit",c,n]]),s=J(s,e.slice(i+1)),s=J(s,[["exit",l,n]]),K(e,o,e.length,s),e}function Fs(e,n,t){const r=this;let a=r.events.length,o,i;for(;a--;)if((r.events[a][1].type===p.labelImage||r.events[a][1].type===p.labelLink)&&!r.events[a][1]._balanced){o=r.events[a][1];break}return s;function s(d){return g(d===u.rightSquareBracket,"expected `]`"),o?o._inactive?h(d):(i=r.parser.defined.includes(le(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter(p.labelEnd),e.enter(p.labelMarker),e.consume(d),e.exit(p.labelMarker),e.exit(p.labelEnd),l):t(d)}function l(d){return d===u.leftParenthesis?e.attempt(Is,f,i?f:h)(d):d===u.leftSquareBracket?e.attempt(Es,f,i?c:h)(d):i?f(d):h(d)}function c(d){return e.attempt(zs,f,h)(d)}function f(d){return n(d)}function h(d){return o._balanced=!0,t(d)}}function Ms(e,n,t){return r;function r(h){return g(h===u.leftParenthesis,"expected left paren"),e.enter(p.resource),e.enter(p.resourceMarker),e.consume(h),e.exit(p.resourceMarker),a}function a(h){return V(h)?Ge(e,o)(h):o(h)}function o(h){return h===u.rightParenthesis?f(h):qr(e,i,s,p.resourceDestination,p.resourceDestinationLiteral,p.resourceDestinationLiteralMarker,p.resourceDestinationRaw,p.resourceDestinationString,A.linkResourceDestinationBalanceMax)(h)}function i(h){return V(h)?Ge(e,l)(h):f(h)}function s(h){return t(h)}function l(h){return h===u.quotationMark||h===u.apostrophe||h===u.leftParenthesis?Ur(e,c,t,p.resourceTitle,p.resourceTitleMarker,p.resourceTitleString)(h):f(h)}function c(h){return V(h)?Ge(e,f)(h):f(h)}function f(h){return h===u.rightParenthesis?(e.enter(p.resourceMarker),e.consume(h),e.exit(p.resourceMarker),e.exit(p.resource),n):t(h)}}function Ps(e,n,t){const r=this;return a;function a(s){return g(s===u.leftSquareBracket,"expected left bracket"),Rr.call(r,e,o,i,p.reference,p.referenceMarker,p.referenceString)(s)}function o(s){return r.parser.defined.includes(le(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(s):t(s)}function i(s){return t(s)}}function Ds(e,n,t){return r;function r(o){return g(o===u.leftSquareBracket,"expected left bracket"),e.enter(p.reference),e.enter(p.referenceMarker),e.consume(o),e.exit(p.referenceMarker),a}function a(o){return o===u.rightSquareBracket?(e.enter(p.referenceMarker),e.consume(o),e.exit(p.referenceMarker),e.exit(p.reference),n):t(o)}}const Ls={name:"labelStartImage",resolveAll:Kt.resolveAll,tokenize:Bs};function Bs(e,n,t){const r=this;return a;function a(s){return g(s===u.exclamationMark,"expected `!`"),e.enter(p.labelImage),e.enter(p.labelImageMarker),e.consume(s),e.exit(p.labelImageMarker),o}function o(s){return s===u.leftSquareBracket?(e.enter(p.labelMarker),e.consume(s),e.exit(p.labelMarker),e.exit(p.labelImage),i):t(s)}function i(s){return s===u.caret&&"_hiddenFootnoteSupport"in r.parser.constructs?t(s):n(s)}}const _s={name:"labelStartLink",resolveAll:Kt.resolveAll,tokenize:vs};function vs(e,n,t){const r=this;return a;function a(i){return g(i===u.leftSquareBracket,"expected `[`"),e.enter(p.labelLink),e.enter(p.labelMarker),e.consume(i),e.exit(p.labelMarker),e.exit(p.labelLink),o}function o(i){return i===u.caret&&"_hiddenFootnoteSupport"in r.parser.constructs?t(i):n(i)}}const It={name:"lineEnding",tokenize:Os};function Os(e,n){return t;function t(r){return g(F(r),"expected eol"),e.enter(p.lineEnding),e.consume(r),e.exit(p.lineEnding),U(e,n,p.linePrefix)}}const ut={name:"thematicBreak",tokenize:qs};function qs(e,n,t){let r=0,a;return o;function o(c){return e.enter(p.thematicBreak),i(c)}function i(c){return g(c===u.asterisk||c===u.dash||c===u.underscore,"expected `*`, `-`, or `_`"),a=c,s(c)}function s(c){return c===a?(e.enter(p.thematicBreakSequence),l(c)):r>=A.thematicBreakMarkerCountMin&&(c===u.eof||F(c))?(e.exit(p.thematicBreak),n(c)):t(c)}function l(c){return c===a?(e.consume(c),r++,l):(e.exit(p.thematicBreakSequence),R(c)?U(e,s,p.whitespace)(c):s(c))}}const ne={continuation:{tokenize:$s},exit:Vs,name:"list",tokenize:js},Rs={partial:!0,tokenize:Ws},Us={partial:!0,tokenize:Hs};function js(e,n,t){const r=this,a=r.events[r.events.length-1];let o=a&&a[1].type===p.linePrefix?a[2].sliceSerialize(a[1],!0).length:0,i=0;return s;function s(m){g(r.containerState,"expected state");const y=r.containerState.type||(m===u.asterisk||m===u.plusSign||m===u.dash?p.listUnordered:p.listOrdered);if(y===p.listUnordered?!r.containerState.marker||m===r.containerState.marker:Bt(m)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y===p.listUnordered)return e.enter(p.listItemPrefix),m===u.asterisk||m===u.dash?e.check(ut,t,c)(m):c(m);if(!r.interrupt||m===u.digit1)return e.enter(p.listItemPrefix),e.enter(p.listItemValue),l(m)}return t(m)}function l(m){return g(r.containerState,"expected state"),Bt(m)&&++i<A.listItemValueSizeMax?(e.consume(m),l):(!r.interrupt||i<2)&&(r.containerState.marker?m===r.containerState.marker:m===u.rightParenthesis||m===u.dot)?(e.exit(p.listItemValue),c(m)):t(m)}function c(m){return g(r.containerState,"expected state"),g(m!==u.eof,"eof (`null`) is not a marker"),e.enter(p.listItemMarker),e.consume(m),e.exit(p.listItemMarker),r.containerState.marker=r.containerState.marker||m,e.check(et,r.interrupt?t:f,e.attempt(Rs,d,h))}function f(m){return g(r.containerState,"expected state"),r.containerState.initialBlankLine=!0,o++,d(m)}function h(m){return R(m)?(e.enter(p.listItemPrefixWhitespace),e.consume(m),e.exit(p.listItemPrefixWhitespace),d):t(m)}function d(m){return g(r.containerState,"expected state"),r.containerState.size=o+r.sliceSerialize(e.exit(p.listItemPrefix),!0).length,n(m)}}function $s(e,n,t){const r=this;return g(r.containerState,"expected state"),r.containerState._closeFlow=void 0,e.check(et,a,o);function a(s){return g(r.containerState,"expected state"),g(typeof r.containerState.size=="number","expected size"),r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,U(e,n,p.listItemIndent,r.containerState.size+1)(s)}function o(s){return g(r.containerState,"expected state"),r.containerState.furtherBlankLines||!R(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Us,n,i)(s))}function i(s){return g(r.containerState,"expected state"),r.containerState._closeFlow=!0,r.interrupt=void 0,g(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),U(e,e.attempt(ne,n,t),p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:A.tabSize)(s)}}function Hs(e,n,t){const r=this;return g(r.containerState,"expected state"),g(typeof r.containerState.size=="number","expected size"),U(e,a,p.listItemIndent,r.containerState.size+1);function a(o){g(r.containerState,"expected state");const i=r.events[r.events.length-1];return i&&i[1].type===p.listItemIndent&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?n(o):t(o)}}function Vs(e){g(this.containerState,"expected state"),g(typeof this.containerState.type=="string","expected type"),e.exit(this.containerState.type)}function Ws(e,n,t){const r=this;return g(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),U(e,a,p.listItemPrefixWhitespace,r.parser.constructs.disable.null.includes("codeIndented")?void 0:A.tabSize+1);function a(o){const i=r.events[r.events.length-1];return!R(o)&&i&&i[1].type===p.listItemPrefixWhitespace?n(o):t(o)}}const Mn={name:"setextUnderline",resolveTo:Qs,tokenize:Gs};function Qs(e,n){let t=e.length,r,a,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type===p.content){r=t;break}e[t][1].type===p.paragraph&&(a=t)}else e[t][1].type===p.content&&e.splice(t,1),!o&&e[t][1].type===p.definition&&(o=t);g(a!==void 0,"expected a `text` index to be found"),g(r!==void 0,"expected a `text` index to be found"),g(e[r][2]===n,"enter context should be same"),g(e[e.length-1][2]===n,"enter context should be same");const i={type:p.setextHeading,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=p.setextHeadingText,o?(e.splice(a,0,["enter",i,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end={...e[o][1].end}):e[r][1]=i,e.push(["exit",i,n]),e}function Gs(e,n,t){const r=this;let a;return o;function o(c){let f=r.events.length,h;for(g(c===u.dash||c===u.equalsTo,"expected `=` or `-`");f--;)if(r.events[f][1].type!==p.lineEnding&&r.events[f][1].type!==p.linePrefix&&r.events[f][1].type!==p.content){h=r.events[f][1].type===p.paragraph;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter(p.setextHeadingLine),a=c,i(c)):t(c)}function i(c){return e.enter(p.setextHeadingLineSequence),s(c)}function s(c){return c===a?(e.consume(c),s):(e.exit(p.setextHeadingLineSequence),R(c)?U(e,l,p.lineSuffix)(c):l(c))}function l(c){return c===u.eof||F(c)?(e.exit(p.setextHeadingLine),n(c)):t(c)}}const Xs={tokenize:rl,partial:!0};function Ys(){return{document:{[u.leftSquareBracket]:{name:"gfmFootnoteDefinition",tokenize:el,continuation:{tokenize:tl},exit:nl}},text:{[u.leftSquareBracket]:{name:"gfmFootnoteCall",tokenize:Zs},[u.rightSquareBracket]:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Js,resolveTo:Ks}}}}function Js(e,n,t){const r=this;let a=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;a--;){const l=r.events[a][1];if(l.type===p.labelImage){i=l;break}if(l.type==="gfmFootnoteCall"||l.type===p.labelLink||l.type===p.label||l.type===p.image||l.type===p.link)break}return s;function s(l){if(g(l===u.rightSquareBracket,"expected `]`"),!i||!i._balanced)return t(l);const c=le(r.sliceSerialize({start:i.end,end:r.now()}));return c.codePointAt(0)!==u.caret||!o.includes(c.slice(1))?t(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),n(l))}}function Ks(e,n){let t=e.length,r;for(;t--;)if(e[t][1].type===p.labelImage&&e[t][0]==="enter"){r=e[t][1];break}g(r,"expected `labelStart` to resolve"),e[t+1][1].type=p.data,e[t+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},s={type:p.chunkString,contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[e[t+1],e[t+2],["enter",a,n],e[t+3],e[t+4],["enter",o,n],["exit",o,n],["enter",i,n],["enter",s,n],["exit",s,n],["exit",i,n],e[e.length-2],e[e.length-1],["exit",a,n]];return e.splice(t,e.length-t+1,...l),e}function Zs(e,n,t){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,i;return s;function s(h){return g(h===u.leftSquareBracket,"expected `[`"),e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==u.caret?t(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(h){if(o>A.linkReferenceSizeMax||h===u.rightSquareBracket&&!i||h===u.eof||h===u.leftSquareBracket||V(h))return t(h);if(h===u.rightSquareBracket){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return a.includes(le(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(h)}return V(h)||(i=!0),o++,e.consume(h),h===u.backslash?f:c}function f(h){return h===u.leftSquareBracket||h===u.backslash||h===u.rightSquareBracket?(e.consume(h),o++,c):c(h)}}function el(e,n,t){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i=0,s;return l;function l(y){return g(y===u.leftSquareBracket,"expected `[`"),e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(y){return y===u.caret?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):t(y)}function f(y){if(i>A.linkReferenceSizeMax||y===u.rightSquareBracket&&!s||y===u.eof||y===u.leftSquareBracket||V(y))return t(y);if(y===u.rightSquareBracket){e.exit("chunkString");const z=e.exit("gfmFootnoteDefinitionLabelString");return o=le(r.sliceSerialize(z)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return V(y)||(s=!0),i++,e.consume(y),y===u.backslash?h:f}function h(y){return y===u.leftSquareBracket||y===u.backslash||y===u.rightSquareBracket?(e.consume(y),i++,f):f(y)}function d(y){return y===u.colon?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),a.includes(o)||a.push(o),U(e,m,"gfmFootnoteDefinitionWhitespace")):t(y)}function m(y){return n(y)}}function tl(e,n,t){return e.check(et,n,e.attempt(Xs,n,t))}function nl(e){e.exit("gfmFootnoteDefinition")}function rl(e,n,t){const r=this;return U(e,a,"gfmFootnoteDefinitionIndent",A.tabSize+1);function a(o){const i=r.events[r.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===A.tabSize?n(o):t(o)}}function il(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:a};return t==null&&(t=!0),{text:{[u.tilde]:r},insideSpan:{null:[r]},attentionMarkers:{null:[u.tilde]}};function a(i,s){let l=-1;for(;++l<i.length;)if(i[l][0]==="enter"&&i[l][1].type==="strikethroughSequenceTemporary"&&i[l][1]._close){let c=l;for(;c--;)if(i[c][0]==="exit"&&i[c][1].type==="strikethroughSequenceTemporary"&&i[c][1]._open&&i[l][1].end.offset-i[l][1].start.offset===i[c][1].end.offset-i[c][1].start.offset){i[l][1].type="strikethroughSequence",i[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},i[c][1].start),end:Object.assign({},i[l][1].end)},h={type:"strikethroughText",start:Object.assign({},i[c][1].end),end:Object.assign({},i[l][1].start)},d=[["enter",f,s],["enter",i[c][1],s],["exit",i[c][1],s],["enter",h,s]],m=s.parser.constructs.insideSpan.null;m&&K(d,d.length,0,Ue(m,i.slice(c+1,l),s)),K(d,d.length,0,[["exit",h,s],["enter",i[l][1],s],["exit",i[l][1],s],["exit",f,s]]),K(i,c-1,l-c+3,d),l=c+d.length-2;break}}for(l=-1;++l<i.length;)i[l][1].type==="strikethroughSequenceTemporary"&&(i[l][1].type=p.data);return i}function o(i,s,l){const c=this.previous,f=this.events;let h=0;return d;function d(y){return g(y===u.tilde,"expected `~`"),c===u.tilde&&f[f.length-1][1].type!==p.characterEscape?l(y):(i.enter("strikethroughSequenceTemporary"),m(y))}function m(y){const z=Oe(c);if(y===u.tilde)return h>1?l(y):(i.consume(y),h++,m);if(h<2&&!t)return l(y);const I=i.exit("strikethroughSequenceTemporary"),T=Oe(y);return I._open=!T||T===A.attentionSideAfter&&!!z,I._close=!z||z===A.attentionSideAfter&&!!T,s(y)}}}class al{constructor(){this.map=[]}add(n,t,r){ol(this,n,t,r)}consume(n){if(this.map.sort(function(o,i){return o[0]-i[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let a=r.pop();for(;a;){for(const o of a)n.push(o);a=r.pop()}this.map.length=0}}function ol(e,n,t,r){let a=0;if(!(t===0&&r.length===0)){for(;a<e.map.length;){if(e.map[a][0]===n){e.map[a][1]+=t,e.map[a][2].push(...r);return}a+=1}e.map.push([n,t,r])}}function sl(e,n){g(e[n][1].type==="table","expected table");let t=!1;const r=[];for(;n<e.length;){const a=e[n];if(t){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}function ll(){return{flow:{null:{name:"table",tokenize:ul,resolveAll:cl}}}}function ul(e,n,t){const r=this;let a=0,o=0,i;return s;function s(b){let Q=r.events.length-1;for(;Q>-1;){const L=r.events[Q][1].type;if(L===p.lineEnding||L===p.linePrefix)Q--;else break}const j=Q>-1?r.events[Q][1].type:null,M=j==="tableHead"||j==="tableRow"?S:l;return M===S&&r.parser.lazy[r.now().line]?t(b):M(b)}function l(b){return e.enter("tableHead"),e.enter("tableRow"),c(b)}function c(b){return b===u.verticalBar||(i=!0,o+=1),f(b)}function f(b){return b===u.eof?t(b):F(b)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter(p.lineEnding),e.consume(b),e.exit(p.lineEnding),m):t(b):R(b)?U(e,f,p.whitespace)(b):(o+=1,i&&(i=!1,a+=1),b===u.verticalBar?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),i=!0,f):(e.enter(p.data),h(b)))}function h(b){return b===u.eof||b===u.verticalBar||V(b)?(e.exit(p.data),f(b)):(e.consume(b),b===u.backslash?d:h)}function d(b){return b===u.backslash||b===u.verticalBar?(e.consume(b),h):h(b)}function m(b){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(b):(e.enter("tableDelimiterRow"),i=!1,R(b)?(g(r.parser.constructs.disable.null,"expected `disabled.null`"),U(e,y,p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:A.tabSize)(b)):y(b))}function y(b){return b===u.dash||b===u.colon?I(b):b===u.verticalBar?(i=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),z):_(b)}function z(b){return R(b)?U(e,I,p.whitespace)(b):I(b)}function I(b){return b===u.colon?(o+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),T):b===u.dash?(o+=1,T(b)):b===u.eof||F(b)?D(b):_(b)}function T(b){return b===u.dash?(e.enter("tableDelimiterFiller"),E(b)):_(b)}function E(b){return b===u.dash?(e.consume(b),E):b===u.colon?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(b))}function N(b){return R(b)?U(e,D,p.whitespace)(b):D(b)}function D(b){return b===u.verticalBar?y(b):b===u.eof||F(b)?!i||a!==o?_(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(b)):_(b)}function _(b){return t(b)}function S(b){return e.enter("tableRow"),v(b)}function v(b){return b===u.verticalBar?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),v):b===u.eof||F(b)?(e.exit("tableRow"),n(b)):R(b)?U(e,v,p.whitespace)(b):(e.enter(p.data),$(b))}function $(b){return b===u.eof||b===u.verticalBar||V(b)?(e.exit(p.data),v(b)):(e.consume(b),b===u.backslash?B:$)}function B(b){return b===u.backslash||b===u.verticalBar?(e.consume(b),$):$(b)}}function cl(e,n){let t=-1,r=!0,a=0,o=[0,0,0,0],i=[0,0,0,0],s=!1,l=0,c,f,h;const d=new al;for(;++t<e.length;){const m=e[t],y=m[1];m[0]==="enter"?y.type==="tableHead"?(s=!1,l!==0&&(g(c,"there should be a table opening"),Pn(d,n,l,c,f),f=void 0,l=0),c={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},d.add(t,0,[["enter",c,n]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(r=!0,h=void 0,o=[0,0,0,0],i=[0,t+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},d.add(t,0,[["enter",f,n]])),a=y.type==="tableDelimiterRow"?2:f?3:1):a&&(y.type===p.data||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,i[2]===0&&(o[1]!==0&&(i[0]=i[1],h=it(d,n,o,a,void 0,h),o=[0,0,0,0]),i[2]=t)):y.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(i[0]=i[1],h=it(d,n,o,a,void 0,h)),o=i,i=[o[1],t,0,0])):y.type==="tableHead"?(s=!0,l=t):y.type==="tableRow"||y.type==="tableDelimiterRow"?(l=t,o[1]!==0?(i[0]=i[1],h=it(d,n,o,a,t,h)):i[1]!==0&&(h=it(d,n,i,a,t,h)),a=0):a&&(y.type===p.data||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(i[3]=t)}for(l!==0&&(g(c,"expected table opening"),Pn(d,n,l,c,f)),d.consume(n.events),t=-1;++t<n.events.length;){const m=n.events[t];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=sl(n.events,t))}return e}function it(e,n,t,r,a,o){const i=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";t[0]!==0&&(g(o,"expected previous cell enter"),o.end=Object.assign({},Pe(n.events,t[0])),e.add(t[0],0,[["exit",o,n]]));const l=Pe(n.events,t[1]);if(o={type:i,start:Object.assign({},l),end:Object.assign({},l)},e.add(t[1],0,[["enter",o,n]]),t[2]!==0){const c=Pe(n.events,t[2]),f=Pe(n.events,t[3]),h={type:s,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",h,n]]),g(t[3]!==0),r!==2){const d=n.events[t[2]],m=n.events[t[3]];if(d[1].end=Object.assign({},m[1].end),d[1].type=p.chunkText,d[1].contentType=A.contentTypeText,t[3]>t[2]+1){const y=t[2]+1,z=t[3]-t[2]-1;e.add(y,z,[])}}e.add(t[3]+1,0,[["exit",h,n]])}return a!==void 0&&(o.end=Object.assign({},Pe(n.events,a)),e.add(a,0,[["exit",o,n]]),o=void 0),o}function Pn(e,n,t,r,a){const o=[],i=Pe(n.events,t);a&&(a.end=Object.assign({},i),o.push(["exit",a,n])),r.end=Object.assign({},i),o.push(["exit",r,n]),e.add(t+1,0,o)}function Pe(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const pl={name:"tasklistCheck",tokenize:hl};function fl(){return{text:{[u.leftSquareBracket]:pl}}}function hl(e,n,t){const r=this;return a;function a(l){return g(l===u.leftSquareBracket,"expected `[`"),r.previous!==u.eof||!r._gfmTasklistFirstContentOfListItem?t(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),o)}function o(l){return V(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),i):l===u.uppercaseX||l===u.lowercaseX?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),i):t(l)}function i(l){return l===u.rightSquareBracket?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):t(l)}function s(l){return F(l)?n(l):R(l)?e.check({tokenize:ml},n,t)(l):t(l)}}function ml(e,n,t){return U(e,r,p.whitespace);function r(a){return a===u.eof?t(a):n(a)}}function dl(e){return Ir([Eo(),Ys(),il(e),ll(),fl()])}const gl={};function If(e){const n=this,t=e||gl,r=n.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),i=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(dl(t)),o.push(bo()),i.push(wo(t))}function Ef({defaultOrigin:e="",allowedLinkPrefixes:n=[],allowedImagePrefixes:t=[],allowDataImages:r=!1,allowedProtocols:a=[],blockedImageClass:o="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:i="text-gray-500"}){const s=n.length&&!n.every(c=>c==="*"),l=t.length&&!t.every(c=>c==="*");if(!e&&(s||l))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return c=>{const f=bl(e,n,t,r,a,o,i);_e(c,f)}}function Dn(e,n){if(typeof e!="string")return null;try{return new URL(e)}catch{if(n)try{return new URL(e,n)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function xl(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const kl=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),yl=new Set(["javascript:","data:","file:","vbscript:"]);function Ln(e,n,t,r=!1,a=!1,o=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!a)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return a&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const f=e.substring(5);if(f&&f.length>0&&f!=="invalid")return e}}catch{return null}return null}const i=Dn(e,t);if(!i||yl.has(i.protocol)||!(kl.has(i.protocol)||o.includes(i.protocol)||o.includes("*")))return null;if(i.protocol==="mailto:"||!i.protocol.match(/^https?:$/))return i.href;const l=xl(e);return i&&n.some(c=>{const f=Dn(c,t);return!f||f.origin!==i.origin?!1:i.href.startsWith(f.href)})?l?i.pathname+i.search+i.hash:i.href:n.includes("*")?i.protocol!=="https:"&&i.protocol!=="http:"?null:l?i.pathname+i.search+i.hash:i.href:null}const Et=Symbol("node-seen"),bl=(e,n,t,r,a,o,i)=>{const s=(l,c,f)=>{if(l.type!=="element"||l[Et])return rt;if(l.tagName==="a"){const h=Ln(l.properties.href,n,e,!1,!1,a);return h===null?(l[Et]=!0,_e(l,s),f&&typeof c=="number"&&(f.children[c]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(l.properties.href),class:i},children:[...l.children,{type:"text",value:" [blocked]"}]}),Pt):(l.properties.href=h,l.properties.target="_blank",l.properties.rel="noopener noreferrer",rt)}if(l.tagName==="img"){const h=Ln(l.properties.src,t,e,r,!0,a);return h===null?(l[Et]=!0,_e(l,s),f&&typeof c=="number"&&(f.children[c]={type:"element",tagName:"span",properties:{class:o},children:[{type:"text",value:"[Image blocked: "+String(l.properties.alt||"No description")+"]"}]}),Pt):(l.properties.src=h,rt)}return rt};return s},Bn=/[#.]/g;function wl(e,n){const t=e||"",r={};let a=0,o,i;for(;a<t.length;){Bn.lastIndex=a;const s=Bn.exec(t),l=t.slice(a,s?s.index:t.length);l&&(o?o==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:i=l,a+=l.length),s&&(o=s[0],a++)}return{type:"element",tagName:i||n||"div",properties:r,children:[]}}function jr(e,n,t){const r=t?Il(t):void 0;function a(o,i,...s){let l;if(o==null){l={type:"root",children:[]};const c=i;s.unshift(c)}else{l=wl(o,n);const c=l.tagName.toLowerCase(),f=r?r.get(c):void 0;if(l.tagName=f||c,Sl(i))s.unshift(i);else for(const[h,d]of Object.entries(i))Cl(e,l.properties,h,d)}for(const c of s)Ot(l.children,c);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return a}function Sl(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const n=e,t=Object.keys(e);for(const r of t){const a=n[r];if(a&&typeof a=="object"){if(!Array.isArray(a))return!0;const o=a;for(const i of o)if(typeof i!="number"&&typeof i!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Cl(e,n,t,r){const a=Ke(e,t);let o;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;o=r}else typeof r=="boolean"?o=r:typeof r=="string"?a.spaceSeparated?o=hn(r):a.commaSeparated?o=mn(r):a.commaOrSpaceSeparated?o=hn(mn(r).join(" ")):o=_n(a,a.property,r):Array.isArray(r)?o=[...r]:o=a.property==="style"?Tl(r):String(r);if(Array.isArray(o)){const i=[];for(const s of o)i.push(_n(a,a.property,s));o=i}a.property==="className"&&Array.isArray(n.className)&&(o=n.className.concat(o)),n[a.property]=o}}function Ot(e,n){if(n!=null)if(typeof n=="number"||typeof n=="string")e.push({type:"text",value:String(n)});else if(Array.isArray(n))for(const t of n)Ot(e,t);else if(typeof n=="object"&&"type"in n)n.type==="root"?Ot(e,n.children):e.push(n);else throw new Error("Expected node, nodes, or string, got `"+n+"`")}function _n(e,n,t){if(typeof t=="string"){if(e.number&&t&&!Number.isNaN(Number(t)))return Number(t);if((e.boolean||e.overloadedBoolean)&&(t===""||dn(t)===dn(n)))return!0}return t}function Tl(e){const n=[];for(const[t,r]of Object.entries(e))n.push([t,r].join(": "));return n.join("; ")}function Il(e){const n=new Map;for(const t of e)n.set(t.toLowerCase(),t);return n}const El=["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"],zl=jr(qe,"div"),Al=jr(pe,"g",El),$r={}.hasOwnProperty,Nl=Object.prototype;function Hr(e,n){const t=n||{};return Zt({file:t.file||void 0,location:!1,schema:t.space==="svg"?pe:qe,verbose:t.verbose||!1},e)}function Zt(e,n){let t;switch(n.nodeName){case"#comment":{const r=n;return t={type:"comment",value:r.data},ct(e,r,t),t}case"#document":case"#document-fragment":{const r=n,a="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(t={type:"root",children:Vr(e,n.childNodes),data:{quirksMode:a}},e.file&&e.location){const o=String(e.file),i=Pi(o),s=i.toPoint(0),l=i.toPoint(o.length);g(s,"expected `start`"),g(l,"expected `end`"),t.position={start:s,end:l}}return t}case"#documentType":{const r=n;return t={type:"doctype"},ct(e,r,t),t}case"#text":{const r=n;return t={type:"text",value:r.value},ct(e,r,t),t}default:return t=Fl(e,n),t}}function Vr(e,n){let t=-1;const r=[];for(;++t<n.length;){const a=Zt(e,n[t]);r.push(a)}return r}function Fl(e,n){const t=e.schema;e.schema=n.namespaceURI===ze.svg?pe:qe;let r=-1;const a={};for(;++r<n.attrs.length;){const s=n.attrs[r],l=(s.prefix?s.prefix+":":"")+s.name;$r.call(Nl,l)||(a[l]=s.value)}const i=(e.schema.space==="svg"?Al:zl)(n.tagName,a,Vr(e,n.childNodes));if(ct(e,n,i),i.tagName==="template"){const s=n,l=s.sourceCodeLocation,c=l&&l.startTag&&De(l.startTag),f=l&&l.endTag&&De(l.endTag),h=Zt(e,s.content);c&&f&&e.file&&(h.position={start:c.end,end:f.start}),i.content=h}return e.schema=t,i}function ct(e,n,t){if("sourceCodeLocation"in n&&n.sourceCodeLocation&&e.file){const r=Ml(e,t,n.sourceCodeLocation);r&&(e.location=!0,t.position=r)}}function Ml(e,n,t){const r=De(t);if(n.type==="element"){const a=n.children[n.children.length-1];if(r&&!t.endTag&&a&&a.position&&a.position.end&&(r.end=Object.assign({},a.position.end)),e.verbose){const o={};let i;if(t.attrs)for(i in t.attrs)$r.call(t.attrs,i)&&(o[Ke(e.schema,i).property]=De(t.attrs[i]));g(t.startTag,"a start tag should exist");const s=De(t.startTag),l=t.endTag?De(t.endTag):void 0,c={opening:s};l&&(c.closing=l),c.properties=o,n.data={position:c}}}return r}function De(e){const n=vn({line:e.startLine,column:e.startCol,offset:e.startOffset}),t=vn({line:e.endLine,column:e.endCol,offset:e.endOffset});return n||t?{start:n,end:t}:void 0}function vn(e){return e.line&&e.column?e:void 0}const Pl={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"}},Dl="https://html.spec.whatwg.org/multipage/parsing.html#parse-error-",Ll=/-[a-z]/g,Bl=/%c(?:([-+])(\d+))?/g,_l=/%x/g,vl={2:!0,1:!1,0:null},Ol={};function ql(e,n){const t=n||Ol,r=t.onerror,a=e instanceof Dt?e:new Dt(e),o=t.fragment?Di:Li,i=String(a),s=o(i,{sourceCodeLocationInfo:!0,onParseError:t.onerror?l:null,scriptingEnabled:!1});return Hr(s,{file:a,space:t.space,verbose:t.verbose});function l(c){const f=c.code,h=Rl(f),d=t[h],m=d??!0,y=typeof m=="number"?m:m?1:0;if(y){const I=Pl[h];g(I,"expected known error from `parse5`");const T=new $t(z(I.reason),{place:{start:{line:c.startLine,column:c.startCol,offset:c.startOffset},end:{line:c.endLine,column:c.endCol,offset:c.endOffset}},ruleId:f,source:"hast-util-from-html"});a.path&&(T.file=a.path,T.name=a.path+":"+T.name),T.fatal=vl[y],T.note=z(I.description),T.url=I.url===!1?void 0:Dl+f,g(r,"`internalOnerror` is not passed if `onerror` is not set"),r(T)}function z(I){return I.replace(Bl,T).replace(_l,E);function T(N,D,_){const S=(_?Number.parseInt(_,10):0)*(D==="-"?-1:1),v=i.charAt(c.startOffset+S);return jl(v)}function E(){return $l(i.charCodeAt(c.startOffset))}}}}function Rl(e){return e.replace(Ll,Ul)}function Ul(e){return e.charAt(1).toUpperCase()}function jl(e){return e==="`"?"` ` `":e}function $l(e){return"0x"+e.toString(16).toUpperCase()}function Hl(e,n){const t=ql(e,n);return Bi(t,{force:!0}),delete t.data,t}const Ne=(function(e){if(e==null)return Ql;if(typeof e=="string")return Wl(e);if(typeof e=="object")return Vl(e);if(typeof e=="function")return en(e);throw new Error("Expected function, string, or array as `test`")});function Vl(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=Ne(e[t]);return en(r);function r(...a){let o=-1;for(;++o<n.length;)if(n[o].apply(this,a))return!0;return!1}}function Wl(e){return en(n);function n(t){return t.tagName===e}}function en(e){return n;function n(t,r,a){return!!(Gl(t)&&e.call(this,t,typeof r=="number"?r:void 0,a||void 0))}}function Ql(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function Gl(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const On=/\n/g,qn=/[\t ]+/g,qt=Ne("br"),Rn=Ne(nu),Xl=Ne("p"),Un=Ne("tr"),Yl=Ne(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",tu,ru]),Wr=Ne(["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"]);function Jl(e,n){const t=n||{},r="children"in e?e.children:[],a=Wr(e),o=Xr(e,{whitespace:t.whitespace||"normal"}),i=[];(e.type==="text"||e.type==="comment")&&i.push(...Gr(e,{breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)i.push(...Qr(r[s],e,{whitespace:o,breakBefore:s?void 0:a,breakAfter:s<r.length-1?qt(r[s+1]):a}));const l=[];let c;for(s=-1;++s<i.length;){const f=i[s];typeof f=="number"?c!==void 0&&f>c&&(c=f):f&&(c!==void 0&&c>-1&&l.push(`
|
|
17
|
-
`.repeat(c)||" "),c=-1,l.push(f))}return l.join("")}function Qr(e,n,t){return e.type==="element"?Kl(e,n,t):e.type==="text"?t.whitespace==="normal"?Gr(e,t):Zl(e):[]}function Kl(e,n,t){const r=Xr(e,t),a=e.children||[];let o=-1,i=[];if(
|
|
18
|
-
`:Xl(e)?(s=2,l=2):Wr(e)&&(s=1,l=1);++o<a.length;)i=i.concat(Qr(a[o],e,{whitespace:r,breakBefore:o?void 0:s,breakAfter:o<a.length-1?qt(a[o+1]):l}));return Rn(e)&&gn(n,e,Rn)&&i.push(" "),s&&i.unshift(s),l&&i.push(l),i}function Gr(e,n){const t=String(e.value),r=[],a=[];let o=0;for(;o<=t.length;){On.lastIndex=o;const l=On.exec(t),c=l&&"index"in l?l.index:t.length;r.push(eu(t.slice(o,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?n.breakBefore:!0,c===t.length?n.breakAfter:!0)),o=c+1}let i=-1,s;for(;++i<r.length;)r[i].charCodeAt(r[i].length-1)===8203||i<r.length-1&&r[i+1].charCodeAt(0)===8203?(a.push(r[i]),s=void 0):r[i]?(typeof s=="number"&&a.push(s),a.push(r[i]),s=0):(i===0||i===r.length-1)&&a.push(0);return a}function Zl(e){return[String(e.value)]}function eu(e,n,t){const r=[];let a=0,o;for(;a<e.length;){qn.lastIndex=a;const i=qn.exec(e);o=i?i.index:e.length,!a&&!o&&i&&!n&&r.push(""),a!==o&&r.push(e.slice(a,o)),a=i?o+i[0].length:o}return a!==o&&!t&&r.push(""),r.join(" ")}function Xr(e,n){if(e.type==="element"){const t=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return t.wrap?"pre-wrap":"pre";case"td":case"th":return t.noWrap?"nowrap":n.whitespace;case"textarea":return"pre-wrap"}}return n.whitespace}function tu(e){return!!(e.properties||{}).hidden}function nu(e){return e.tagName==="td"||e.tagName==="th"}function ru(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const iu={},au=[];function zf(e){const n=e||iu;return function(t,r){ir(t,"element",function(a,o){const i=Array.isArray(a.properties.className)?a.properties.className:au,s=i.includes("language-math"),l=i.includes("math-display"),c=i.includes("math-inline");let f=l;if(!s&&!l&&!c)return;let h=o[o.length-1],d=a;if(a.tagName==="code"&&s&&h&&h.type==="element"&&h.tagName==="pre"&&(d=h,h=o[o.length-2],f=!0),!h)return;const m=Jl(d,{whitespace:"pre"});let y;try{y=bn.renderToString(m,{...n,displayMode:f,throwOnError:!0})}catch(I){const T=I,E=T.name.toLowerCase();r.message("Could not render math with KaTeX",{ancestors:[...o,a],cause:T,place:a.position,ruleId:E,source:"rehype-katex"});try{y=bn.renderToString(m,{...n,displayMode:f,strict:"ignore",throwOnError:!1})}catch{y=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(n.errorColor||"#cc0000"),title:String(I)},children:[{type:"text",value:m}]}]}}typeof y=="string"&&(y=Hl(y,{fragment:!0}).children);const z=h.children.indexOf(d);return h.children.splice(z,1,...y),Pt})}}const ou={},su={}.hasOwnProperty,Yr=Ht("type",{handlers:{root:uu,element:mu,text:fu,comment:hu,doctype:pu}});function lu(e,n){const r=(n||ou).space;return Yr(e,r==="svg"?pe:qe)}function uu(e,n){const t={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return t.childNodes=tn(e.children,t,n),je(e,t),t}function cu(e,n){const t={nodeName:"#document-fragment",childNodes:[]};return t.childNodes=tn(e.children,t,n),je(e,t),t}function pu(e){const n={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return je(e,n),n}function fu(e){const n={nodeName:"#text",value:e.value,parentNode:null};return je(e,n),n}function hu(e){const n={nodeName:"#comment",data:e.value,parentNode:null};return je(e,n),n}function mu(e,n){const t=n;let r=t;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&t.space==="html"&&(r=pe);const a=[];let o;if(e.properties){for(o in e.properties)if(o!=="children"&&su.call(e.properties,o)){const l=du(r,o,e.properties[o]);l&&a.push(l)}}const i=r.space;g(i);const s={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:ze[i],childNodes:[],parentNode:null};return s.childNodes=tn(e.children,s,r),je(e,s),e.tagName==="template"&&e.content&&(s.content=cu(e.content,r)),s}function du(e,n,t){const r=Ke(e,n);if(t===!1||t===null||t===void 0||typeof t=="number"&&Number.isNaN(t)||!t&&r.boolean)return;Array.isArray(t)&&(t=r.commaSeparated?Vt(t):Wt(t));const a={name:r.attribute,value:t===!0?"":String(t)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const o=a.name.indexOf(":");o<0?a.prefix="":(a.name=a.name.slice(o+1),a.prefix=r.attribute.slice(0,o)),a.namespace=ze[r.space]}return a}function tn(e,n,t){let r=-1;const a=[];if(e)for(;++r<e.length;){const o=Yr(e[r],t);o.parentNode=n,a.push(o)}return a}function je(e,n){const t=e.position;t&&t.start&&t.end&&(g(typeof t.start.offset=="number"),g(typeof t.end.offset=="number"),n.sourceCodeLocation={startLine:t.start.line,startCol:t.start.column,startOffset:t.start.offset,endLine:t.end.line,endCol:t.end.column,endOffset:t.end.offset})}const gu=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,xu=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),jn={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Jr(e,n){const t=zu(e),r=Ht("type",{handlers:{root:ku,element:yu,text:bu,comment:Zr,doctype:wu,raw:Cu},unknown:Tu}),a={parser:t?new xn(jn):xn.getFragmentParser(void 0,jn),handle(s){r(s,a)},stitches:!1,options:n||{}};r(e,a),$e(a,xe());const o=t?a.parser.document:a.parser.getFragment(),i=Hr(o,{file:a.options.file});return a.stitches&&_e(i,"comment",function(s,l,c){const f=s;if(f.value.stitch&&c&&l!==void 0){const h=c.children;return h[l]=f.value.stitch,l}}),i.type==="root"&&i.children.length===1&&i.children[0].type===e.type?i.children[0]:i}function Kr(e,n){let t=-1;if(e)for(;++t<e.length;)n.handle(e[t])}function ku(e,n){Kr(e.children,n)}function yu(e,n){Iu(e,n),Kr(e.children,n),Eu(e,n)}function bu(e,n){n.parser.tokenizer.state>4&&(n.parser.tokenizer.state=0);const t={type:Ze.CHARACTER,chars:e.value,location:tt(e)};$e(n,xe(e)),n.parser.currentToken=t,n.parser._processToken(n.parser.currentToken)}function wu(e,n){const t={type:Ze.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:tt(e)};$e(n,xe(e)),n.parser.currentToken=t,n.parser._processToken(n.parser.currentToken)}function Su(e,n){n.stitches=!0;const t=Au(e);if("children"in e&&"children"in t){const r=Jr({type:"root",children:e.children},n.options);t.children=r.children}Zr({type:"comment",value:{stitch:t}},n)}function Zr(e,n){const t=e.value,r={type:Ze.COMMENT,data:t,location:tt(e)};$e(n,xe(e)),n.parser.currentToken=r,n.parser._processToken(n.parser.currentToken)}function Cu(e,n){if(n.parser.tokenizer.preprocessor.html="",n.parser.tokenizer.preprocessor.pos=-1,n.parser.tokenizer.preprocessor.lastGapPos=-2,n.parser.tokenizer.preprocessor.gapStack=[],n.parser.tokenizer.preprocessor.skipNextNewLine=!1,n.parser.tokenizer.preprocessor.lastChunkWritten=!1,n.parser.tokenizer.preprocessor.endOfChunkHit=!1,n.parser.tokenizer.preprocessor.isEol=!1,ei(n,xe(e)),n.parser.tokenizer.write(n.options.tagfilter?e.value.replace(gu,"<$1$2"):e.value,!1),n.parser.tokenizer._runParsingLoop(),n.parser.tokenizer.state===72||n.parser.tokenizer.state===78){n.parser.tokenizer.preprocessor.lastChunkWritten=!0;const t=n.parser.tokenizer._consume();n.parser.tokenizer._callState(t)}}function Tu(e,n){const t=e;if(n.options.passThrough&&n.options.passThrough.includes(t.type))Su(t,n);else{let r="";throw xu.has(t.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+t.type+"` node"+r)}}function $e(e,n){ei(e,n);const t=e.parser.tokenizer.currentCharacterToken;t&&t.location&&(t.location.endLine=e.parser.tokenizer.preprocessor.line,t.location.endCol=e.parser.tokenizer.preprocessor.col+1,t.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=t,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Ee.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function ei(e,n){if(n&&n.offset!==void 0){const t={startLine:n.line,startCol:n.column,startOffset:n.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-n.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=n.offset,e.parser.tokenizer.preprocessor.line=n.line,e.parser.tokenizer.currentLocation=t}}function Iu(e,n){const t=e.tagName.toLowerCase();if(n.parser.tokenizer.state===Ee.PLAINTEXT)return;$e(n,xe(e));const r=n.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:ze.html;a===ze.html&&t==="svg"&&(a=ze.svg);const o=lu({...e,children:[]},{space:a===ze.svg?"svg":"html"}),i={type:Ze.START_TAG,tagName:t,tagID:or(t),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:tt(e)};n.parser.currentToken=i,n.parser._processToken(n.parser.currentToken),n.parser.tokenizer.lastStartTagName=t}function Eu(e,n){const t=e.tagName.toLowerCase();if(!n.parser.tokenizer.inForeignNode&&sr.includes(t)||n.parser.tokenizer.state===Ee.PLAINTEXT)return;$e(n,Qt(e));const r={type:Ze.END_TAG,tagName:t,tagID:or(t),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:tt(e)};n.parser.currentToken=r,n.parser._processToken(n.parser.currentToken),t===n.parser.tokenizer.lastStartTagName&&(n.parser.tokenizer.state===Ee.RCDATA||n.parser.tokenizer.state===Ee.RAWTEXT||n.parser.tokenizer.state===Ee.SCRIPT_DATA)&&(n.parser.tokenizer.state=Ee.DATA)}function zu(e){const n=e.type==="root"?e.children[0]:e;return!!(n&&(n.type==="doctype"||n.type==="element"&&n.tagName.toLowerCase()==="html"))}function tt(e){const n=xe(e)||{line:void 0,column:void 0,offset:void 0},t=Qt(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:n.line,startCol:n.column,startOffset:n.offset,endLine:t.line,endCol:t.column,endOffset:t.offset}}function Au(e){return"children"in e?ve({...e,children:[]}):ve(e)}function Af(e){return function(n,t){return Jr(n,{...e,file:t})}}var Nu=Object.defineProperty,Fu=(e,n,t)=>n in e?Nu(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Mu=(e,n,t)=>Fu(e,n+"",t);function Pu(e){return new RegExp("^\\p{Emoji_Presentation}","u").test(String.fromCodePoint(e))}function Du(e){if(!e||e<4352)return!1;switch(_i(e)){case"fullwidth":case"halfwidth":return!0;case"wide":return!Pu(e);case"narrow":return!1;case"ambiguous":return 917760<=e&&e<=917999?null:!1;case"neutral":return new RegExp("^\\p{sc=Hangul}","u").test(String.fromCodePoint(e))}}function Lu(e,n){return n!==65025||!e||e<8216?!1:e===8216||e===8217||e===8220||e===8221}function Bu(e){return e!==null&&e>=65024&&e<=65038}var _u=ti(new RegExp("\\p{P}|\\p{S}","u")),vu=ti(/\s/);function ti(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCodePoint(t))}}var ae;(e=>{e.spaceOrPunctuation=3,e.cjk=4096,e.cjkPunctuation=4098,e.ivs=8192,e.cjkOrIvs=12288,e.nonEmojiGeneralUseVS=16384,e.variationSelector=24576,e.ivsToCjkRightShift=1})(ae||(ae={}));function Be(e){if(e===u.eof||V(e)||vu(e))return A.characterGroupWhitespace;let n=0;if(e>=4352){if(Bu(e))return ae.nonEmojiGeneralUseVS;switch(Du(e)){case null:return ae.ivs;case!0:n|=ae.cjk;break}}return _u(e)&&(n|=A.characterGroupPunctuation),n}function ni(e,n,t){if(!Uu(e))return e;const r=n(),a=Be(r);return!r||Ye(a)?e:Lu(r,t)?ae.cjkPunctuation:Ou(a)}function Ou(e){return e&~ae.ivs}function Ye(e){return!!(e&A.characterGroupWhitespace)}function mt(e){return(e&ae.cjkPunctuation)===A.characterGroupPunctuation}function Rt(e){return!!(e&ae.cjk)}function qu(e){return e===ae.ivs}function Ru(e){return!!(e&ae.cjkOrIvs)}function Uu(e){return e===ae.nonEmojiGeneralUseVS}function $n(e){return!!(e&ae.spaceOrPunctuation)}function ri(e){return!!(e&&e>=55296&&e<=56319)}function ii(e){return!!(e&&e>=56320&&e<=57343)}function ai(e,n,t){if(n._bufferIndex<2)return e;const a=t({start:{...n,_bufferIndex:n._bufferIndex-2},end:n}).codePointAt(0);return a&&a>=65536?a:e}function ju(e,n,t){const r=e>=65536?2:1;if(n._bufferIndex<1+r)return null;const a=n._bufferIndex-r-2,o=t({start:{...n,_bufferIndex:a>=0?a:0},end:{...n,_bufferIndex:n._bufferIndex-r}}),i=o.charCodeAt(o.length-1);if(Number.isNaN(i))return null;if(o.length<2||i<56320||57343<i)return i;const s=o.codePointAt(0);return s&&s>=65536?s:i}var oi=class{constructor(e,n,t){this.previousCode=e,this.nowPoint=n,this.sliceSerialize=t,Mu(this,"cachedValue")}value(){return this.cachedValue===void 0&&(this.cachedValue=ju(this.previousCode,this.nowPoint,this.sliceSerialize)),this.cachedValue}};function si(e,n,t){const r=t({start:n,end:{...n,_bufferIndex:n._bufferIndex+2}}).codePointAt(0);return r&&r>=65536?r:e}var zt={name:"attention",resolveAll:$u,tokenize:Hu};function $u(e,n){let t=-1,r,a,o,i,s,l,c,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const h={...e[r][1].end},d={...e[t][1].start};Hn(h,-l),Hn(d,l),i={type:l>1?p.strongSequence:p.emphasisSequence,start:h,end:{...e[r][1].end}},s={type:l>1?p.strongSequence:p.emphasisSequence,start:{...e[t][1].start},end:d},o={type:l>1?p.strongText:p.emphasisText,start:{...e[r][1].end},end:{...e[t][1].start}},a={type:l>1?p.strong:p.emphasis,start:{...i.start},end:{...s.end}},e[r][1].end={...i.start},e[t][1].start={...s.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=J(c,[["enter",e[r][1],n],["exit",e[r][1],n]])),c=J(c,[["enter",a,n],["enter",i,n],["exit",i,n],["enter",o,n]]),g(n.parser.constructs.insideSpan.null,"expected `insideSpan` to be populated"),c=J(c,Ue(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),c=J(c,[["exit",o,n],["enter",s,n],["exit",s,n],["exit",a,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,c=J(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,K(e,r-1,t-r+3,c),t=r+c.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Hu(e,n){const t=this.parser.constructs.attentionMarkers.null,{now:r,sliceSerialize:a,previous:o}=this,i=ii(o)?ai(o,r(),a):o,s=Be(i),l=new oi(i,r(),a),c=ni(s,l.value.bind(l),i);let f;return h;function h(m){return g(m===u.asterisk||m===u.underscore,"expected asterisk or underscore"),f=m,e.enter("attentionSequence"),d(m)}function d(m){if(m===f)return e.consume(m),d;const y=e.exit("attentionSequence"),z=ri(m)?si(m,r(),a):m,I=Be(z);g(t,"expected `attentionMarkers` to be populated");const T=mt(c),E=T||Ye(c),N=mt(I),D=N||Ye(I),_=Ru(c),S=!D||N&&(E||_)||t.includes(m),v=!E||T&&(D||Rt(I))||t.includes(i);return y._open=!!(f===u.asterisk?S:S&&($n(c)||!v)),y._close=!!(f===u.asterisk?v:v&&($n(I)||!S)),n(m)}}function Hn(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}function Vu(){return{text:{[u.asterisk]:zt,[u.underscore]:zt},insideSpan:{null:[zt]}}}function Nf(){const e=this.data();(e.micromarkExtensions||(e.micromarkExtensions=[])).push(Vu())}function Wu(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:a};return t==null&&(t=!0),{text:{[u.tilde]:r},insideSpan:{null:[r]},attentionMarkers:{null:[u.tilde]}};function a(i,s){let l=-1;for(;++l<i.length;)if(i[l][0]==="enter"&&i[l][1].type==="strikethroughSequenceTemporary"&&i[l][1]._close){let c=l;for(;c--;)if(i[c][0]==="exit"&&i[c][1].type==="strikethroughSequenceTemporary"&&i[c][1]._open&&i[l][1].end.offset-i[l][1].start.offset===i[c][1].end.offset-i[c][1].start.offset){i[l][1].type="strikethroughSequence",i[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},i[c][1].start),end:Object.assign({},i[l][1].end)},h={type:"strikethroughText",start:Object.assign({},i[c][1].end),end:Object.assign({},i[l][1].start)},d=[["enter",f,s],["enter",i[c][1],s],["exit",i[c][1],s],["enter",h,s]],m=s.parser.constructs.insideSpan.null;m&&K(d,d.length,0,Ue(m,i.slice(c+1,l),s)),K(d,d.length,0,[["exit",h,s],["enter",i[l][1],s],["exit",i[l][1],s],["exit",f,s]]),K(i,c-1,l-c+3,d),l=c+d.length-2;break}}for(l=-1;++l<i.length;)i[l][1].type==="strikethroughSequenceTemporary"&&(i[l][1].type=p.data);return i}function o(i,s,l){const{now:c,sliceSerialize:f,previous:h}=this,d=ii(h)?ai(h,c(),f):h,m=Be(d),y=new oi(d,c(),f),z=ni(m,y.value.bind(y),d),I=this.events;let T=0;return E;function E(D){return g(D===u.tilde,"expected `~`"),d===u.tilde&&I[I.length-1][1].type!==p.characterEscape?l(D):(i.enter("strikethroughSequenceTemporary"),N(D))}function N(D){const _=Be(d);if(D===u.tilde)return T>1?l(D):(i.consume(D),T++,N);if(T<2&&!t)return l(D);const S=i.exit("strikethroughSequenceTemporary"),v=ri(D)?si(D,c(),f):D,$=Be(v),b=mt(z)||Ye(z),j=mt($)||Ye($),M=Rt(z)||qu(_);return S._open=!j||$===A.attentionSideAfter&&(b||M),S._close=!b||_===A.attentionSideAfter&&(j||Rt($)),s(D)}}}function Ff(e){const n=this.data();(n.micromarkExtensions||(n.micromarkExtensions=[])).push(Wu(e))}function Qu(){return{enter:{mathFlow:e,mathFlowFenceMeta:n,mathText:o},exit:{mathFlow:a,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:s,mathText:i,mathTextData:s}};function e(l){const c={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[c]}},l)}function n(){this.buffer()}function t(){const l=this.resume(),c=this.stack[this.stack.length-1];g(c.type==="math"),c.meta=l}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function a(l){const c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),f=this.stack[this.stack.length-1];g(f.type==="math"),this.exit(l),f.value=c;const h=f.data.hChildren[0];g(h.type==="element"),g(h.tagName==="code"),h.children.push({type:"text",value:c}),this.data.mathFlowInside=void 0}function o(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function i(l){const c=this.resume(),f=this.stack[this.stack.length-1];g(f.type==="inlineMath"),this.exit(l),f.value=c,f.data.hChildren.push({type:"text",value:c})}function s(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function Gu(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),r.peek=a,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
|
|
16
|
+
`))}function l(m,y,z,I){const T=z.enter("tableCell"),E=z.enter("phrasing"),N=z.containerPhrasing(m,{...I,before:o,after:o});return E(),T(),N}function c(m,y){return Mi(m,{align:y,alignDelimiters:r,padding:t,stringLength:a})}function f(m,y,z){const I=m.children;let T=-1;const E=[],N=y.enter("table");for(;++T<I.length;)E[T]=h(I[T],y,z);return N(),E}function h(m,y,z){const I=m.children;let T=-1;const E=[],N=y.enter("tableRow");for(;++T<I.length;)E[T]=l(I[T],m,y,z);return N(),E}function d(m,y,z){let I=Cr.inlineCode(m,y,z);return z.stack.includes("tableCell")&&(I=I.replace(/\|/g,"\\$&")),I}}function go(){return{exit:{taskListCheckValueChecked:In,taskListCheckValueUnchecked:In,paragraph:ko}}}function xo(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:yo}}}function In(e){const n=this.stack[this.stack.length-2];g(n.type==="listItem"),n.checked=e.type==="taskListCheckValueChecked"}function ko(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1];g(t.type==="paragraph");const r=t.children[0];if(r&&r.type==="text"){const a=n.children;let o=-1,i;for(;++o<a.length;){const s=a[o];if(s.type==="paragraph"){i=s;break}}i===t&&(r.value=r.value.slice(1),r.value.length===0?t.children.shift():t.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,t.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function yo(e,n,t,r){const a=e.children[0],o=typeof e.checked=="boolean"&&a&&a.type==="paragraph",i="["+(e.checked?"x":" ")+"] ",s=t.createTracker(r);o&&s.move(i);let l=Cr.listItem(e,n,t,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(f){return f+i}}function bo(){return[Ji(),xa(),Sa(),lo(),go()]}function So(e){return{extensions:[Yi(),ka(e),wa(),mo(e),xo()]}}function K(e,n,t,r){const a=e.length;let o=0,i;if(n<0?n=-n>a?0:a+n:n=n>a?a:n,t=t>0?t:0,r.length<A.v8MaxSafeChunkSize)i=Array.from(r),i.unshift(n,t),e.splice(...i);else for(t&&e.splice(n,t);o<r.length;)i=r.slice(o,o+A.v8MaxSafeChunkSize),i.unshift(n,0),e.splice(...i),o+=A.v8MaxSafeChunkSize,n+=A.v8MaxSafeChunkSize}function Y(e,n){return e.length>0?(K(e,e.length,0,n),e):n}const En={}.hasOwnProperty;function Ir(e){const n={};let t=-1;for(;++t<e.length;)wo(n,e[t]);return n}function wo(e,n){let t;for(t in n){const a=(En.call(e,t)?e[t]:void 0)||(e[t]={}),o=n[t];let i;if(o)for(i in o){En.call(a,i)||(a[i]=[]);const s=o[i];Co(a[i],Array.isArray(s)?s:s?[s]:[])}}}function Co(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);K(e,0,0,r)}const To={tokenize:Fo,partial:!0},Er={tokenize:Mo,partial:!0},zr={tokenize:Po,partial:!0},Ar={tokenize:Do,partial:!0},Io={tokenize:Lo,partial:!0},Nr={name:"wwwAutolink",tokenize:Ao,previous:Mr},Fr={name:"protocolAutolink",tokenize:No,previous:Pr},ke={name:"emailAutolink",tokenize:zo,previous:Dr},fe={};function Eo(){return{text:fe}}let Te=u.digit0;for(;Te<u.leftCurlyBrace;)fe[Te]=ke,Te++,Te===u.colon?Te=u.uppercaseA:Te===u.leftSquareBracket&&(Te=u.lowercaseA);fe[u.plusSign]=ke;fe[u.dash]=ke;fe[u.dot]=ke;fe[u.underscore]=ke;fe[u.uppercaseH]=[ke,Fr];fe[u.lowercaseH]=[ke,Fr];fe[u.uppercaseW]=[ke,Nr];fe[u.lowercaseW]=[ke,Nr];function zo(e,n,t){const r=this;let a,o;return i;function i(h){return!_t(h)||!Dr.call(r,r.previous)||Yt(r.events)?t(h):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(h))}function s(h){return _t(h)?(e.consume(h),s):h===u.atSign?(e.consume(h),l):t(h)}function l(h){return h===u.dot?e.check(Io,f,c)(h):h===u.dash||h===u.underscore||Z(h)?(o=!0,e.consume(h),l):f(h)}function c(h){return e.consume(h),a=!0,l}function f(h){return o&&a&&ee(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(h)):t(h)}}function Ao(e,n,t){const r=this;return a;function a(i){return i!==u.uppercaseW&&i!==u.lowercaseW||!Mr.call(r,r.previous)||Yt(r.events)?t(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(To,e.attempt(Er,e.attempt(zr,o),t),t)(i))}function o(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(i)}}function No(e,n,t){const r=this;let a="",o=!1;return i;function i(h){return(h===u.uppercaseH||h===u.lowercaseH)&&Pr.call(r,r.previous)&&!Yt(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(h),e.consume(h),s):t(h)}function s(h){if(ee(h)&&a.length<5)return a+=String.fromCodePoint(h),e.consume(h),s;if(h===u.colon){const d=a.toLowerCase();if(d==="http"||d==="https")return e.consume(h),l}return t(h)}function l(h){return h===u.slash?(e.consume(h),o?c:(o=!0,l)):t(h)}function c(h){return h===u.eof||ft(h)||V(h)||Ae(h)||dt(h)?t(h):e.attempt(Er,e.attempt(zr,f),t)(h)}function f(h){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(h)}}function Fo(e,n,t){let r=0;return a;function a(i){return(i===u.uppercaseW||i===u.lowercaseW)&&r<3?(r++,e.consume(i),a):i===u.dot&&r===3?(e.consume(i),o):t(i)}function o(i){return i===u.eof?t(i):n(i)}}function Mo(e,n,t){let r,a,o;return i;function i(c){return c===u.dot||c===u.underscore?e.check(Ar,l,s)(c):c===u.eof||V(c)||Ae(c)||c!==u.dash&&dt(c)?l(c):(o=!0,e.consume(c),i)}function s(c){return c===u.underscore?r=!0:(a=r,r=void 0),e.consume(c),i}function l(c){return a||r||!o?t(c):n(c)}}function Po(e,n){let t=0,r=0;return a;function a(i){return i===u.leftParenthesis?(t++,e.consume(i),a):i===u.rightParenthesis&&r<t?o(i):i===u.exclamationMark||i===u.quotationMark||i===u.ampersand||i===u.apostrophe||i===u.rightParenthesis||i===u.asterisk||i===u.comma||i===u.dot||i===u.colon||i===u.semicolon||i===u.lessThan||i===u.questionMark||i===u.rightSquareBracket||i===u.underscore||i===u.tilde?e.check(Ar,n,o)(i):i===u.eof||V(i)||Ae(i)?n(i):(e.consume(i),a)}function o(i){return i===u.rightParenthesis&&r++,e.consume(i),a}}function Do(e,n,t){return r;function r(s){return s===u.exclamationMark||s===u.quotationMark||s===u.apostrophe||s===u.rightParenthesis||s===u.asterisk||s===u.comma||s===u.dot||s===u.colon||s===u.semicolon||s===u.questionMark||s===u.underscore||s===u.tilde?(e.consume(s),r):s===u.ampersand?(e.consume(s),o):s===u.rightSquareBracket?(e.consume(s),a):s===u.lessThan||s===u.eof||V(s)||Ae(s)?n(s):t(s)}function a(s){return s===u.eof||s===u.leftParenthesis||s===u.leftSquareBracket||V(s)||Ae(s)?n(s):r(s)}function o(s){return ee(s)?i(s):t(s)}function i(s){return s===u.semicolon?(e.consume(s),r):ee(s)?(e.consume(s),i):t(s)}}function Lo(e,n,t){return r;function r(o){return e.consume(o),a}function a(o){return Z(o)?t(o):n(o)}}function Mr(e){return e===u.eof||e===u.leftParenthesis||e===u.asterisk||e===u.underscore||e===u.leftSquareBracket||e===u.rightSquareBracket||e===u.tilde||V(e)}function Pr(e){return!ee(e)}function Dr(e){return!(e===u.slash||_t(e))}function _t(e){return e===u.plusSign||e===u.dash||e===u.dot||e===u.underscore||Z(e)}function Yt(e){let n=e.length,t=!1;for(;n--;){const r=e[n][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){t=!0;break}if(r._gfmAutolinkLiteralWalkedInto){t=!1;break}}return e.length>0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}function Re(e){const n=[];let t=-1,r=0,a=0;for(;++t<e.length;){const o=e.charCodeAt(t);let i="";if(o===u.percentSign&&Z(e.charCodeAt(t+1))&&Z(e.charCodeAt(t+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(i=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(t+1);o<56320&&s>56319&&s<57344?(i=String.fromCharCode(o,s),a=1):i=ce.replacementCharacter}else i=String.fromCharCode(o);i&&(n.push(e.slice(r,t),encodeURIComponent(i)),r=t+a+1,i=""),a&&(t+=a,a=0)}return n.join("")+e.slice(r)}function Ue(e,n,t){const r=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!r.includes(o)&&(n=o(n,t),r.push(o))}return n}const vt={name:"attention",resolveAll:Bo,tokenize:_o};function Bo(e,n){let t=-1,r,a,o,i,s,l,c,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const h={...e[r][1].end},d={...e[t][1].start};zn(h,-l),zn(d,l),i={type:l>1?p.strongSequence:p.emphasisSequence,start:h,end:{...e[r][1].end}},s={type:l>1?p.strongSequence:p.emphasisSequence,start:{...e[t][1].start},end:d},o={type:l>1?p.strongText:p.emphasisText,start:{...e[r][1].end},end:{...e[t][1].start}},a={type:l>1?p.strong:p.emphasis,start:{...i.start},end:{...s.end}},e[r][1].end={...i.start},e[t][1].start={...s.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Y(c,[["enter",e[r][1],n],["exit",e[r][1],n]])),c=Y(c,[["enter",a,n],["enter",i,n],["exit",i,n],["enter",o,n]]),g(n.parser.constructs.insideSpan.null,"expected `insideSpan` to be populated"),c=Y(c,Ue(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),c=Y(c,[["exit",o,n],["enter",s,n],["exit",s,n],["exit",a,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,c=Y(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,K(e,r-1,t-r+3,c),t=r+c.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function _o(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Oe(r);let o;return i;function i(l){return g(l===u.asterisk||l===u.underscore,"expected asterisk or underscore"),o=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===o)return e.consume(l),s;const c=e.exit("attentionSequence"),f=Oe(l);g(t,"expected `attentionMarkers` to be populated");const h=!f||f===A.characterGroupPunctuation&&a||t.includes(l),d=!a||a===A.characterGroupPunctuation&&f||t.includes(r);return c._open=!!(o===u.asterisk?h:h&&(a||!d)),c._close=!!(o===u.asterisk?d:d&&(f||!h)),n(l)}}function zn(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const vo={name:"autolink",tokenize:Oo};function Oo(e,n,t){let r=0;return a;function a(m){return g(m===u.lessThan,"expected `<`"),e.enter(p.autolink),e.enter(p.autolinkMarker),e.consume(m),e.exit(p.autolinkMarker),e.enter(p.autolinkProtocol),o}function o(m){return ee(m)?(e.consume(m),i):m===u.atSign?t(m):c(m)}function i(m){return m===u.plusSign||m===u.dash||m===u.dot||Z(m)?(r=1,s(m)):c(m)}function s(m){return m===u.colon?(e.consume(m),r=0,l):(m===u.plusSign||m===u.dash||m===u.dot||Z(m))&&r++<A.autolinkSchemeSizeMax?(e.consume(m),s):(r=0,c(m))}function l(m){return m===u.greaterThan?(e.exit(p.autolinkProtocol),e.enter(p.autolinkMarker),e.consume(m),e.exit(p.autolinkMarker),e.exit(p.autolink),n):m===u.eof||m===u.space||m===u.lessThan||ft(m)?t(m):(e.consume(m),l)}function c(m){return m===u.atSign?(e.consume(m),f):Hi(m)?(e.consume(m),c):t(m)}function f(m){return Z(m)?h(m):t(m)}function h(m){return m===u.dot?(e.consume(m),r=0,f):m===u.greaterThan?(e.exit(p.autolinkProtocol).type=p.autolinkEmail,e.enter(p.autolinkMarker),e.consume(m),e.exit(p.autolinkMarker),e.exit(p.autolink),n):d(m)}function d(m){if((m===u.dash||Z(m))&&r++<A.autolinkDomainSizeMax){const y=m===u.dash?d:h;return e.consume(m),y}return t(m)}}function U(e,n,t,r){const a=r?r-1:Number.POSITIVE_INFINITY;let o=0;return i;function i(l){return R(l)?(e.enter(t),s(l)):n(l)}function s(l){return R(l)&&o++<a?(e.consume(l),s):(e.exit(t),n(l))}}const et={partial:!0,tokenize:qo};function qo(e,n,t){return r;function r(o){return R(o)?U(e,a,p.linePrefix)(o):a(o)}function a(o){return o===u.eof||F(o)?n(o):t(o)}}const Lr={continuation:{tokenize:Uo},exit:jo,name:"blockQuote",tokenize:Ro};function Ro(e,n,t){const r=this;return a;function a(i){if(i===u.greaterThan){const s=r.containerState;return g(s,"expected `containerState` to be defined in container"),s.open||(e.enter(p.blockQuote,{_container:!0}),s.open=!0),e.enter(p.blockQuotePrefix),e.enter(p.blockQuoteMarker),e.consume(i),e.exit(p.blockQuoteMarker),o}return t(i)}function o(i){return R(i)?(e.enter(p.blockQuotePrefixWhitespace),e.consume(i),e.exit(p.blockQuotePrefixWhitespace),e.exit(p.blockQuotePrefix),n):(e.exit(p.blockQuotePrefix),n(i))}}function Uo(e,n,t){const r=this;return a;function a(i){return R(i)?(g(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),U(e,o,p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:A.tabSize)(i)):o(i)}function o(i){return e.attempt(Lr,n,t)(i)}}function jo(e){e.exit(p.blockQuote)}const Br={name:"characterEscape",tokenize:Ho};function Ho(e,n,t){return r;function r(o){return g(o===u.backslash,"expected `\\`"),e.enter(p.characterEscape),e.enter(p.escapeMarker),e.consume(o),e.exit(p.escapeMarker),a}function a(o){return Vi(o)?(e.enter(p.characterEscapeValue),e.consume(o),e.exit(p.characterEscapeValue),e.exit(p.characterEscape),n):t(o)}}const _r={name:"characterReference",tokenize:$o};function $o(e,n,t){const r=this;let a=0,o,i;return s;function s(h){return g(h===u.ampersand,"expected `&`"),e.enter(p.characterReference),e.enter(p.characterReferenceMarker),e.consume(h),e.exit(p.characterReferenceMarker),l}function l(h){return h===u.numberSign?(e.enter(p.characterReferenceMarkerNumeric),e.consume(h),e.exit(p.characterReferenceMarkerNumeric),c):(e.enter(p.characterReferenceValue),o=A.characterReferenceNamedSizeMax,i=Z,f(h))}function c(h){return h===u.uppercaseX||h===u.lowercaseX?(e.enter(p.characterReferenceMarkerHexadecimal),e.consume(h),e.exit(p.characterReferenceMarkerHexadecimal),e.enter(p.characterReferenceValue),o=A.characterReferenceHexadecimalSizeMax,i=$i,f):(e.enter(p.characterReferenceValue),o=A.characterReferenceDecimalSizeMax,i=Bt,f(h))}function f(h){if(h===u.semicolon&&a){const d=e.exit(p.characterReferenceValue);return i===Z&&!jt(r.sliceSerialize(d))?t(h):(e.enter(p.characterReferenceMarker),e.consume(h),e.exit(p.characterReferenceMarker),e.exit(p.characterReference),n)}return i(h)&&a++<o?(e.consume(h),f):t(h)}}const An={partial:!0,tokenize:Wo},Nn={concrete:!0,name:"codeFenced",tokenize:Vo};function Vo(e,n,t){const r=this,a={partial:!0,tokenize:_};let o=0,i=0,s;return l;function l(w){return c(w)}function c(w){g(w===u.graveAccent||w===u.tilde,"expected `` ` `` or `~`");const v=r.events[r.events.length-1];return o=v&&v[1].type===p.linePrefix?v[2].sliceSerialize(v[1],!0).length:0,s=w,e.enter(p.codeFenced),e.enter(p.codeFencedFence),e.enter(p.codeFencedFenceSequence),f(w)}function f(w){return w===s?(i++,e.consume(w),f):i<A.codeFencedSequenceSizeMin?t(w):(e.exit(p.codeFencedFenceSequence),R(w)?U(e,h,p.whitespace)(w):h(w))}function h(w){return w===u.eof||F(w)?(e.exit(p.codeFencedFence),r.interrupt?n(w):e.check(An,z,D)(w)):(e.enter(p.codeFencedFenceInfo),e.enter(p.chunkString,{contentType:A.contentTypeString}),d(w))}function d(w){return w===u.eof||F(w)?(e.exit(p.chunkString),e.exit(p.codeFencedFenceInfo),h(w)):R(w)?(e.exit(p.chunkString),e.exit(p.codeFencedFenceInfo),U(e,m,p.whitespace)(w)):w===u.graveAccent&&w===s?t(w):(e.consume(w),d)}function m(w){return w===u.eof||F(w)?h(w):(e.enter(p.codeFencedFenceMeta),e.enter(p.chunkString,{contentType:A.contentTypeString}),y(w))}function y(w){return w===u.eof||F(w)?(e.exit(p.chunkString),e.exit(p.codeFencedFenceMeta),h(w)):w===u.graveAccent&&w===s?t(w):(e.consume(w),y)}function z(w){return g(F(w),"expected eol"),e.attempt(a,D,I)(w)}function I(w){return g(F(w),"expected eol"),e.enter(p.lineEnding),e.consume(w),e.exit(p.lineEnding),T}function T(w){return o>0&&R(w)?U(e,E,p.linePrefix,o+1)(w):E(w)}function E(w){return w===u.eof||F(w)?e.check(An,z,D)(w):(e.enter(p.codeFlowValue),N(w))}function N(w){return w===u.eof||F(w)?(e.exit(p.codeFlowValue),E(w)):(e.consume(w),N)}function D(w){return e.exit(p.codeFenced),n(w)}function _(w,v,H){let B=0;return b;function b(O){return g(F(O),"expected eol"),w.enter(p.lineEnding),w.consume(O),w.exit(p.lineEnding),Q}function Q(O){return g(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),w.enter(p.codeFencedFence),R(O)?U(w,j,p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:A.tabSize)(O):j(O)}function j(O){return O===s?(w.enter(p.codeFencedFenceSequence),M(O)):H(O)}function M(O){return O===s?(B++,w.consume(O),M):B>=i?(w.exit(p.codeFencedFenceSequence),R(O)?U(w,L,p.whitespace)(O):L(O)):H(O)}function L(O){return O===u.eof||F(O)?(w.exit(p.codeFencedFence),v(O)):H(O)}}}function Wo(e,n,t){const r=this;return a;function a(i){return i===u.eof?t(i):(g(F(i),"expected eol"),e.enter(p.lineEnding),e.consume(i),e.exit(p.lineEnding),o)}function o(i){return r.parser.lazy[r.now().line]?t(i):n(i)}}const Tt={name:"codeIndented",tokenize:Go},Qo={partial:!0,tokenize:Xo};function Go(e,n,t){const r=this;return a;function a(c){return g(R(c)),e.enter(p.codeIndented),U(e,o,p.linePrefix,A.tabSize+1)(c)}function o(c){const f=r.events[r.events.length-1];return f&&f[1].type===p.linePrefix&&f[2].sliceSerialize(f[1],!0).length>=A.tabSize?i(c):t(c)}function i(c){return c===u.eof?l(c):F(c)?e.attempt(Qo,i,l)(c):(e.enter(p.codeFlowValue),s(c))}function s(c){return c===u.eof||F(c)?(e.exit(p.codeFlowValue),i(c)):(e.consume(c),s)}function l(c){return e.exit(p.codeIndented),n(c)}}function Xo(e,n,t){const r=this;return a;function a(i){return r.parser.lazy[r.now().line]?t(i):F(i)?(e.enter(p.lineEnding),e.consume(i),e.exit(p.lineEnding),a):U(e,o,p.linePrefix,A.tabSize+1)(i)}function o(i){const s=r.events[r.events.length-1];return s&&s[1].type===p.linePrefix&&s[2].sliceSerialize(s[1],!0).length>=A.tabSize?n(i):F(i)?a(i):t(i)}}const Jo={name:"codeText",previous:vr,resolve:Yo,tokenize:Ko};function Yo(e){let n=e.length-4,t=3,r,a;if((e[t][1].type===p.lineEnding||e[t][1].type==="space")&&(e[n][1].type===p.lineEnding||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type===p.codeTextData){e[t][1].type=p.codeTextPadding,e[n][1].type=p.codeTextPadding,t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)a===void 0?r!==n&&e[r][1].type!==p.lineEnding&&(a=r):(r===n||e[r][1].type===p.lineEnding)&&(e[a][1].type=p.codeTextData,r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),n-=r-a-2,r=a+2),a=void 0);return e}function vr(e){return e!==u.graveAccent||this.events[this.events.length-1][1].type===p.characterEscape}function Ko(e,n,t){const r=this;let a=0,o,i;return s;function s(d){return g(d===u.graveAccent,"expected `` ` ``"),g(vr.call(r,r.previous),"expected correct previous"),e.enter(p.codeText),e.enter(p.codeTextSequence),l(d)}function l(d){return d===u.graveAccent?(e.consume(d),a++,l):(e.exit(p.codeTextSequence),c(d))}function c(d){return d===u.eof?t(d):d===u.space?(e.enter("space"),e.consume(d),e.exit("space"),c):d===u.graveAccent?(i=e.enter(p.codeTextSequence),o=0,h(d)):F(d)?(e.enter(p.lineEnding),e.consume(d),e.exit(p.lineEnding),c):(e.enter(p.codeTextData),f(d))}function f(d){return d===u.eof||d===u.space||d===u.graveAccent||F(d)?(e.exit(p.codeTextData),c(d)):(e.consume(d),f)}function h(d){return d===u.graveAccent?(e.consume(d),o++,h):o===a?(e.exit(p.codeTextSequence),e.exit(p.codeText),n(d)):(i.type=p.codeTextData,f(d))}}class Zo{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(n,r):n>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const a=t||0;this.setCursor(Math.trunc(n));const o=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&Qe(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Qe(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Qe(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const t=this.left.splice(n,Number.POSITIVE_INFINITY);Qe(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Qe(this.left,t.reverse())}}}function Qe(e,n){let t=0;if(n.length<A.v8MaxSafeChunkSize)e.push(...n);else for(;t<n.length;)e.push(...n.slice(t,t+A.v8MaxSafeChunkSize)),t+=A.v8MaxSafeChunkSize}function Or(e){const n={};let t=-1,r,a,o,i,s,l,c;const f=new Zo(e);for(;++t<f.length;){for(;t in n;)t=n[t];if(r=f.get(t),t&&r[1].type===p.chunkFlow&&f.get(t-1)[1].type===p.listItemPrefix&&(g(r[1]._tokenizer,"expected `_tokenizer` on subtokens"),l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type===p.lineEndingBlank&&(o+=2),o<l.length&&l[o][1].type===p.content))for(;++o<l.length&&l[o][1].type!==p.content;)l[o][1].type===p.chunkText&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,es(f,t)),t=n[t],c=!0);else if(r[1]._container){for(o=t,a=void 0;o--;)if(i=f.get(o),i[1].type===p.lineEnding||i[1].type===p.lineEndingBlank)i[0]==="enter"&&(a&&(f.get(a)[1].type=p.lineEndingBlank),i[1].type=p.lineEnding,a=o);else if(!(i[1].type===p.linePrefix||i[1].type===p.listItemIndent))break;a&&(r[1].end={...f.get(a)[1].start},s=f.slice(a,t),s.unshift(r),f.splice(a,t-a+1,s))}}return K(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!c}function es(e,n){const t=e.get(n)[1],r=e.get(n)[2];let a=n-1;const o=[];g(t.contentType,"expected `contentType` on subtokens");let i=t._tokenizer;i||(i=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const s=i.events,l=[],c={};let f,h,d=-1,m=t,y=0,z=0;const I=[z];for(;m;){for(;e.get(++a)[1]!==m;);g(!h||m.previous===h,"expected previous to match"),g(!h||h.next===m,"expected next to match"),o.push(a),m._tokenizer||(f=r.sliceStream(m),m.next||f.push(u.eof),h&&i.defineSkip(m.start),m._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(f),m._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),h=m,m=m.next}for(m=t;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(g(m,"expected a current token"),z=d+1,I.push(z),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(i.events=[],m?(m._tokenizer=void 0,m.previous=void 0,g(!m.next,"expected no next token")):I.pop(),d=I.length;d--;){const T=s.slice(I[d],I[d+1]),E=o.pop();g(E!==void 0,"expected a start position when splicing"),l.push([E,E+T.length-1]),e.splice(E,2,T)}for(l.reverse(),d=-1;++d<l.length;)c[y+l[d][0]]=y+l[d][1],y+=l[d][1]-l[d][0]-1;return c}const ts={resolve:rs,tokenize:is},ns={partial:!0,tokenize:as};function rs(e){return Or(e),e}function is(e,n){let t;return r;function r(s){return g(s!==u.eof&&!F(s),"expected no eof or eol"),e.enter(p.content),t=e.enter(p.chunkContent,{contentType:A.contentTypeContent}),a(s)}function a(s){return s===u.eof?o(s):F(s)?e.check(ns,i,o)(s):(e.consume(s),a)}function o(s){return e.exit(p.chunkContent),e.exit(p.content),n(s)}function i(s){return g(F(s),"expected eol"),e.consume(s),e.exit(p.chunkContent),g(t,"expected previous token"),t.next=e.enter(p.chunkContent,{contentType:A.contentTypeContent,previous:t}),t=t.next,a}}function as(e,n,t){const r=this;return a;function a(i){return g(F(i),"expected a line ending"),e.exit(p.chunkContent),e.enter(p.lineEnding),e.consume(i),e.exit(p.lineEnding),U(e,o,p.linePrefix)}function o(i){if(i===u.eof||F(i))return t(i);g(r.parser.constructs.disable.null,"expected `disable.null` to be populated");const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type===p.linePrefix&&s[2].sliceSerialize(s[1],!0).length>=A.tabSize?n(i):e.interrupt(r.parser.constructs.flow,t,n)(i)}}function qr(e,n,t,r,a,o,i,s,l){const c=l||Number.POSITIVE_INFINITY;let f=0;return h;function h(T){return T===u.lessThan?(e.enter(r),e.enter(a),e.enter(o),e.consume(T),e.exit(o),d):T===u.eof||T===u.space||T===u.rightParenthesis||ft(T)?t(T):(e.enter(r),e.enter(i),e.enter(s),e.enter(p.chunkString,{contentType:A.contentTypeString}),z(T))}function d(T){return T===u.greaterThan?(e.enter(o),e.consume(T),e.exit(o),e.exit(a),e.exit(r),n):(e.enter(s),e.enter(p.chunkString,{contentType:A.contentTypeString}),m(T))}function m(T){return T===u.greaterThan?(e.exit(p.chunkString),e.exit(s),d(T)):T===u.eof||T===u.lessThan||F(T)?t(T):(e.consume(T),T===u.backslash?y:m)}function y(T){return T===u.lessThan||T===u.greaterThan||T===u.backslash?(e.consume(T),m):m(T)}function z(T){return!f&&(T===u.eof||T===u.rightParenthesis||V(T))?(e.exit(p.chunkString),e.exit(s),e.exit(i),e.exit(r),n(T)):f<c&&T===u.leftParenthesis?(e.consume(T),f++,z):T===u.rightParenthesis?(e.consume(T),f--,z):T===u.eof||T===u.space||T===u.leftParenthesis||ft(T)?t(T):(e.consume(T),T===u.backslash?I:z)}function I(T){return T===u.leftParenthesis||T===u.rightParenthesis||T===u.backslash?(e.consume(T),z):z(T)}}function Rr(e,n,t,r,a,o){const i=this;let s=0,l;return c;function c(m){return g(m===u.leftSquareBracket,"expected `[`"),e.enter(r),e.enter(a),e.consume(m),e.exit(a),e.enter(o),f}function f(m){return s>A.linkReferenceSizeMax||m===u.eof||m===u.leftSquareBracket||m===u.rightSquareBracket&&!l||m===u.caret&&!s&&"_hiddenFootnoteSupport"in i.parser.constructs?t(m):m===u.rightSquareBracket?(e.exit(o),e.enter(a),e.consume(m),e.exit(a),e.exit(r),n):F(m)?(e.enter(p.lineEnding),e.consume(m),e.exit(p.lineEnding),f):(e.enter(p.chunkString,{contentType:A.contentTypeString}),h(m))}function h(m){return m===u.eof||m===u.leftSquareBracket||m===u.rightSquareBracket||F(m)||s++>A.linkReferenceSizeMax?(e.exit(p.chunkString),f(m)):(e.consume(m),l||(l=!R(m)),m===u.backslash?d:h)}function d(m){return m===u.leftSquareBracket||m===u.backslash||m===u.rightSquareBracket?(e.consume(m),s++,h):h(m)}}function Ur(e,n,t,r,a,o){let i;return s;function s(d){return d===u.quotationMark||d===u.apostrophe||d===u.leftParenthesis?(e.enter(r),e.enter(a),e.consume(d),e.exit(a),i=d===u.leftParenthesis?u.rightParenthesis:d,l):t(d)}function l(d){return d===i?(e.enter(a),e.consume(d),e.exit(a),e.exit(r),n):(e.enter(o),c(d))}function c(d){return d===i?(e.exit(o),l(i)):d===u.eof?t(d):F(d)?(e.enter(p.lineEnding),e.consume(d),e.exit(p.lineEnding),U(e,c,p.linePrefix)):(e.enter(p.chunkString,{contentType:A.contentTypeString}),f(d))}function f(d){return d===i||d===u.eof||F(d)?(e.exit(p.chunkString),c(d)):(e.consume(d),d===u.backslash?h:f)}function h(d){return d===i||d===u.backslash?(e.consume(d),f):f(d)}}function Ge(e,n){let t;return r;function r(a){return F(a)?(e.enter(p.lineEnding),e.consume(a),e.exit(p.lineEnding),t=!0,r):R(a)?U(e,r,t?p.linePrefix:p.lineSuffix)(a):n(a)}}const os={name:"definition",tokenize:ls},ss={partial:!0,tokenize:us};function ls(e,n,t){const r=this;let a;return o;function o(m){return e.enter(p.definition),i(m)}function i(m){return g(m===u.leftSquareBracket,"expected `[`"),Rr.call(r,e,s,t,p.definitionLabel,p.definitionLabelMarker,p.definitionLabelString)(m)}function s(m){return a=le(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===u.colon?(e.enter(p.definitionMarker),e.consume(m),e.exit(p.definitionMarker),l):t(m)}function l(m){return V(m)?Ge(e,c)(m):c(m)}function c(m){return qr(e,f,t,p.definitionDestination,p.definitionDestinationLiteral,p.definitionDestinationLiteralMarker,p.definitionDestinationRaw,p.definitionDestinationString)(m)}function f(m){return e.attempt(ss,h,h)(m)}function h(m){return R(m)?U(e,d,p.whitespace)(m):d(m)}function d(m){return m===u.eof||F(m)?(e.exit(p.definition),r.parser.defined.push(a),n(m)):t(m)}}function us(e,n,t){return r;function r(s){return V(s)?Ge(e,a)(s):t(s)}function a(s){return Ur(e,o,t,p.definitionTitle,p.definitionTitleMarker,p.definitionTitleString)(s)}function o(s){return R(s)?U(e,i,p.whitespace)(s):i(s)}function i(s){return s===u.eof||F(s)?n(s):t(s)}}const cs={name:"hardBreakEscape",tokenize:ps};function ps(e,n,t){return r;function r(o){return g(o===u.backslash,"expected `\\`"),e.enter(p.hardBreakEscape),e.consume(o),a}function a(o){return F(o)?(e.exit(p.hardBreakEscape),n(o)):t(o)}}const fs={name:"headingAtx",resolve:hs,tokenize:ms};function hs(e,n){let t=e.length-2,r=3,a,o;return e[r][1].type===p.whitespace&&(r+=2),t-2>r&&e[t][1].type===p.whitespace&&(t-=2),e[t][1].type===p.atxHeadingSequence&&(r===t-1||t-4>r&&e[t-2][1].type===p.whitespace)&&(t-=r+1===t?2:4),t>r&&(a={type:p.atxHeadingText,start:e[r][1].start,end:e[t][1].end},o={type:p.chunkText,start:e[r][1].start,end:e[t][1].end,contentType:A.contentTypeText},K(e,r,t-r+1,[["enter",a,n],["enter",o,n],["exit",o,n],["exit",a,n]])),e}function ms(e,n,t){let r=0;return a;function a(f){return e.enter(p.atxHeading),o(f)}function o(f){return g(f===u.numberSign,"expected `#`"),e.enter(p.atxHeadingSequence),i(f)}function i(f){return f===u.numberSign&&r++<A.atxHeadingOpeningFenceSizeMax?(e.consume(f),i):f===u.eof||V(f)?(e.exit(p.atxHeadingSequence),s(f)):t(f)}function s(f){return f===u.numberSign?(e.enter(p.atxHeadingSequence),l(f)):f===u.eof||F(f)?(e.exit(p.atxHeading),n(f)):R(f)?U(e,s,p.whitespace)(f):(e.enter(p.atxHeadingText),c(f))}function l(f){return f===u.numberSign?(e.consume(f),l):(e.exit(p.atxHeadingSequence),s(f))}function c(f){return f===u.eof||f===u.numberSign||V(f)?(e.exit(p.atxHeadingText),s(f)):(e.consume(f),c)}}const ds=["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"],Fn=["pre","script","style","textarea"],gs={concrete:!0,name:"htmlFlow",resolveTo:ys,tokenize:bs},xs={partial:!0,tokenize:ws},ks={partial:!0,tokenize:Ss};function ys(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type===p.htmlFlow););return n>1&&e[n-2][1].type===p.linePrefix&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function bs(e,n,t){const r=this;let a,o,i,s,l;return c;function c(k){return f(k)}function f(k){return g(k===u.lessThan,"expected `<`"),e.enter(p.htmlFlow),e.enter(p.htmlFlowData),e.consume(k),h}function h(k){return k===u.exclamationMark?(e.consume(k),d):k===u.slash?(e.consume(k),o=!0,z):k===u.questionMark?(e.consume(k),a=A.htmlInstruction,r.interrupt?n:x):ee(k)?(g(k!==null),e.consume(k),i=String.fromCharCode(k),I):t(k)}function d(k){return k===u.dash?(e.consume(k),a=A.htmlComment,m):k===u.leftSquareBracket?(e.consume(k),a=A.htmlCdata,s=0,y):ee(k)?(e.consume(k),a=A.htmlDeclaration,r.interrupt?n:x):t(k)}function m(k){return k===u.dash?(e.consume(k),r.interrupt?n:x):t(k)}function y(k){const re=A.cdataOpeningString;return k===re.charCodeAt(s++)?(e.consume(k),s===re.length?r.interrupt?n:j:y):t(k)}function z(k){return ee(k)?(g(k!==null),e.consume(k),i=String.fromCharCode(k),I):t(k)}function I(k){if(k===u.eof||k===u.slash||k===u.greaterThan||V(k)){const re=k===u.slash,Se=i.toLowerCase();return!re&&!o&&Fn.includes(Se)?(a=A.htmlRaw,r.interrupt?n(k):j(k)):ds.includes(i.toLowerCase())?(a=A.htmlBasic,re?(e.consume(k),T):r.interrupt?n(k):j(k)):(a=A.htmlComplete,r.interrupt&&!r.parser.lazy[r.now().line]?t(k):o?E(k):N(k))}return k===u.dash||Z(k)?(e.consume(k),i+=String.fromCharCode(k),I):t(k)}function T(k){return k===u.greaterThan?(e.consume(k),r.interrupt?n:j):t(k)}function E(k){return R(k)?(e.consume(k),E):b(k)}function N(k){return k===u.slash?(e.consume(k),b):k===u.colon||k===u.underscore||ee(k)?(e.consume(k),D):R(k)?(e.consume(k),N):b(k)}function D(k){return k===u.dash||k===u.dot||k===u.colon||k===u.underscore||Z(k)?(e.consume(k),D):_(k)}function _(k){return k===u.equalsTo?(e.consume(k),w):R(k)?(e.consume(k),_):N(k)}function w(k){return k===u.eof||k===u.lessThan||k===u.equalsTo||k===u.greaterThan||k===u.graveAccent?t(k):k===u.quotationMark||k===u.apostrophe?(e.consume(k),l=k,v):R(k)?(e.consume(k),w):H(k)}function v(k){return k===l?(e.consume(k),l=null,B):k===u.eof||F(k)?t(k):(e.consume(k),v)}function H(k){return k===u.eof||k===u.quotationMark||k===u.apostrophe||k===u.slash||k===u.lessThan||k===u.equalsTo||k===u.greaterThan||k===u.graveAccent||V(k)?_(k):(e.consume(k),H)}function B(k){return k===u.slash||k===u.greaterThan||R(k)?N(k):t(k)}function b(k){return k===u.greaterThan?(e.consume(k),Q):t(k)}function Q(k){return k===u.eof||F(k)?j(k):R(k)?(e.consume(k),Q):t(k)}function j(k){return k===u.dash&&a===A.htmlComment?(e.consume(k),W):k===u.lessThan&&a===A.htmlRaw?(e.consume(k),G):k===u.greaterThan&&a===A.htmlDeclaration?(e.consume(k),se):k===u.questionMark&&a===A.htmlInstruction?(e.consume(k),x):k===u.rightSquareBracket&&a===A.htmlCdata?(e.consume(k),ue):F(k)&&(a===A.htmlBasic||a===A.htmlComplete)?(e.exit(p.htmlFlowData),e.check(xs,he,M)(k)):k===u.eof||F(k)?(e.exit(p.htmlFlowData),M(k)):(e.consume(k),j)}function M(k){return e.check(ks,L,he)(k)}function L(k){return g(F(k)),e.enter(p.lineEnding),e.consume(k),e.exit(p.lineEnding),O}function O(k){return k===u.eof||F(k)?M(k):(e.enter(p.htmlFlowData),j(k))}function W(k){return k===u.dash?(e.consume(k),x):j(k)}function G(k){return k===u.slash?(e.consume(k),i="",oe):j(k)}function oe(k){if(k===u.greaterThan){const re=i.toLowerCase();return Fn.includes(re)?(e.consume(k),se):j(k)}return ee(k)&&i.length<A.htmlRawSizeMax?(g(k!==null),e.consume(k),i+=String.fromCharCode(k),oe):j(k)}function ue(k){return k===u.rightSquareBracket?(e.consume(k),x):j(k)}function x(k){return k===u.greaterThan?(e.consume(k),se):k===u.dash&&a===A.htmlComment?(e.consume(k),x):j(k)}function se(k){return k===u.eof||F(k)?(e.exit(p.htmlFlowData),he(k)):(e.consume(k),se)}function he(k){return e.exit(p.htmlFlow),n(k)}}function Ss(e,n,t){const r=this;return a;function a(i){return F(i)?(e.enter(p.lineEnding),e.consume(i),e.exit(p.lineEnding),o):t(i)}function o(i){return r.parser.lazy[r.now().line]?t(i):n(i)}}function ws(e,n,t){return r;function r(a){return g(F(a),"expected a line ending"),e.enter(p.lineEnding),e.consume(a),e.exit(p.lineEnding),e.attempt(et,n,t)}}const Cs={name:"htmlText",tokenize:Ts};function Ts(e,n,t){const r=this;let a,o,i;return s;function s(x){return g(x===u.lessThan,"expected `<`"),e.enter(p.htmlText),e.enter(p.htmlTextData),e.consume(x),l}function l(x){return x===u.exclamationMark?(e.consume(x),c):x===u.slash?(e.consume(x),_):x===u.questionMark?(e.consume(x),N):ee(x)?(e.consume(x),H):t(x)}function c(x){return x===u.dash?(e.consume(x),f):x===u.leftSquareBracket?(e.consume(x),o=0,y):ee(x)?(e.consume(x),E):t(x)}function f(x){return x===u.dash?(e.consume(x),m):t(x)}function h(x){return x===u.eof?t(x):x===u.dash?(e.consume(x),d):F(x)?(i=h,G(x)):(e.consume(x),h)}function d(x){return x===u.dash?(e.consume(x),m):h(x)}function m(x){return x===u.greaterThan?W(x):x===u.dash?d(x):h(x)}function y(x){const se=A.cdataOpeningString;return x===se.charCodeAt(o++)?(e.consume(x),o===se.length?z:y):t(x)}function z(x){return x===u.eof?t(x):x===u.rightSquareBracket?(e.consume(x),I):F(x)?(i=z,G(x)):(e.consume(x),z)}function I(x){return x===u.rightSquareBracket?(e.consume(x),T):z(x)}function T(x){return x===u.greaterThan?W(x):x===u.rightSquareBracket?(e.consume(x),T):z(x)}function E(x){return x===u.eof||x===u.greaterThan?W(x):F(x)?(i=E,G(x)):(e.consume(x),E)}function N(x){return x===u.eof?t(x):x===u.questionMark?(e.consume(x),D):F(x)?(i=N,G(x)):(e.consume(x),N)}function D(x){return x===u.greaterThan?W(x):N(x)}function _(x){return ee(x)?(e.consume(x),w):t(x)}function w(x){return x===u.dash||Z(x)?(e.consume(x),w):v(x)}function v(x){return F(x)?(i=v,G(x)):R(x)?(e.consume(x),v):W(x)}function H(x){return x===u.dash||Z(x)?(e.consume(x),H):x===u.slash||x===u.greaterThan||V(x)?B(x):t(x)}function B(x){return x===u.slash?(e.consume(x),W):x===u.colon||x===u.underscore||ee(x)?(e.consume(x),b):F(x)?(i=B,G(x)):R(x)?(e.consume(x),B):W(x)}function b(x){return x===u.dash||x===u.dot||x===u.colon||x===u.underscore||Z(x)?(e.consume(x),b):Q(x)}function Q(x){return x===u.equalsTo?(e.consume(x),j):F(x)?(i=Q,G(x)):R(x)?(e.consume(x),Q):B(x)}function j(x){return x===u.eof||x===u.lessThan||x===u.equalsTo||x===u.greaterThan||x===u.graveAccent?t(x):x===u.quotationMark||x===u.apostrophe?(e.consume(x),a=x,M):F(x)?(i=j,G(x)):R(x)?(e.consume(x),j):(e.consume(x),L)}function M(x){return x===a?(e.consume(x),a=void 0,O):x===u.eof?t(x):F(x)?(i=M,G(x)):(e.consume(x),M)}function L(x){return x===u.eof||x===u.quotationMark||x===u.apostrophe||x===u.lessThan||x===u.equalsTo||x===u.graveAccent?t(x):x===u.slash||x===u.greaterThan||V(x)?B(x):(e.consume(x),L)}function O(x){return x===u.slash||x===u.greaterThan||V(x)?B(x):t(x)}function W(x){return x===u.greaterThan?(e.consume(x),e.exit(p.htmlTextData),e.exit(p.htmlText),n):t(x)}function G(x){return g(i,"expected return state"),g(F(x),"expected eol"),e.exit(p.htmlTextData),e.enter(p.lineEnding),e.consume(x),e.exit(p.lineEnding),oe}function oe(x){return g(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),R(x)?U(e,ue,p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:A.tabSize)(x):ue(x)}function ue(x){return e.enter(p.htmlTextData),i(x)}}const Kt={name:"labelEnd",resolveAll:As,resolveTo:Ns,tokenize:Fs},Is={tokenize:Ms},Es={tokenize:Ps},zs={tokenize:Ds};function As(e){let n=-1;const t=[];for(;++n<e.length;){const r=e[n][1];if(t.push(e[n]),r.type===p.labelImage||r.type===p.labelLink||r.type===p.labelEnd){const a=r.type===p.labelImage?4:2;r.type=p.data,n+=a}}return e.length!==t.length&&K(e,0,e.length,t),e}function Ns(e,n){let t=e.length,r=0,a,o,i,s;for(;t--;)if(a=e[t][1],o){if(a.type===p.link||a.type===p.labelLink&&a._inactive)break;e[t][0]==="enter"&&a.type===p.labelLink&&(a._inactive=!0)}else if(i){if(e[t][0]==="enter"&&(a.type===p.labelImage||a.type===p.labelLink)&&!a._balanced&&(o=t,a.type!==p.labelLink)){r=2;break}}else a.type===p.labelEnd&&(i=t);g(o!==void 0,"`open` is supposed to be found"),g(i!==void 0,"`close` is supposed to be found");const l={type:e[o][1].type===p.labelLink?p.link:p.image,start:{...e[o][1].start},end:{...e[e.length-1][1].end}},c={type:p.label,start:{...e[o][1].start},end:{...e[i][1].end}},f={type:p.labelText,start:{...e[o+r+2][1].end},end:{...e[i-2][1].start}};return s=[["enter",l,n],["enter",c,n]],s=Y(s,e.slice(o+1,o+r+3)),s=Y(s,[["enter",f,n]]),g(n.parser.constructs.insideSpan.null,"expected `insideSpan.null` to be populated"),s=Y(s,Ue(n.parser.constructs.insideSpan.null,e.slice(o+r+4,i-3),n)),s=Y(s,[["exit",f,n],e[i-2],e[i-1],["exit",c,n]]),s=Y(s,e.slice(i+1)),s=Y(s,[["exit",l,n]]),K(e,o,e.length,s),e}function Fs(e,n,t){const r=this;let a=r.events.length,o,i;for(;a--;)if((r.events[a][1].type===p.labelImage||r.events[a][1].type===p.labelLink)&&!r.events[a][1]._balanced){o=r.events[a][1];break}return s;function s(d){return g(d===u.rightSquareBracket,"expected `]`"),o?o._inactive?h(d):(i=r.parser.defined.includes(le(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter(p.labelEnd),e.enter(p.labelMarker),e.consume(d),e.exit(p.labelMarker),e.exit(p.labelEnd),l):t(d)}function l(d){return d===u.leftParenthesis?e.attempt(Is,f,i?f:h)(d):d===u.leftSquareBracket?e.attempt(Es,f,i?c:h)(d):i?f(d):h(d)}function c(d){return e.attempt(zs,f,h)(d)}function f(d){return n(d)}function h(d){return o._balanced=!0,t(d)}}function Ms(e,n,t){return r;function r(h){return g(h===u.leftParenthesis,"expected left paren"),e.enter(p.resource),e.enter(p.resourceMarker),e.consume(h),e.exit(p.resourceMarker),a}function a(h){return V(h)?Ge(e,o)(h):o(h)}function o(h){return h===u.rightParenthesis?f(h):qr(e,i,s,p.resourceDestination,p.resourceDestinationLiteral,p.resourceDestinationLiteralMarker,p.resourceDestinationRaw,p.resourceDestinationString,A.linkResourceDestinationBalanceMax)(h)}function i(h){return V(h)?Ge(e,l)(h):f(h)}function s(h){return t(h)}function l(h){return h===u.quotationMark||h===u.apostrophe||h===u.leftParenthesis?Ur(e,c,t,p.resourceTitle,p.resourceTitleMarker,p.resourceTitleString)(h):f(h)}function c(h){return V(h)?Ge(e,f)(h):f(h)}function f(h){return h===u.rightParenthesis?(e.enter(p.resourceMarker),e.consume(h),e.exit(p.resourceMarker),e.exit(p.resource),n):t(h)}}function Ps(e,n,t){const r=this;return a;function a(s){return g(s===u.leftSquareBracket,"expected left bracket"),Rr.call(r,e,o,i,p.reference,p.referenceMarker,p.referenceString)(s)}function o(s){return r.parser.defined.includes(le(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(s):t(s)}function i(s){return t(s)}}function Ds(e,n,t){return r;function r(o){return g(o===u.leftSquareBracket,"expected left bracket"),e.enter(p.reference),e.enter(p.referenceMarker),e.consume(o),e.exit(p.referenceMarker),a}function a(o){return o===u.rightSquareBracket?(e.enter(p.referenceMarker),e.consume(o),e.exit(p.referenceMarker),e.exit(p.reference),n):t(o)}}const Ls={name:"labelStartImage",resolveAll:Kt.resolveAll,tokenize:Bs};function Bs(e,n,t){const r=this;return a;function a(s){return g(s===u.exclamationMark,"expected `!`"),e.enter(p.labelImage),e.enter(p.labelImageMarker),e.consume(s),e.exit(p.labelImageMarker),o}function o(s){return s===u.leftSquareBracket?(e.enter(p.labelMarker),e.consume(s),e.exit(p.labelMarker),e.exit(p.labelImage),i):t(s)}function i(s){return s===u.caret&&"_hiddenFootnoteSupport"in r.parser.constructs?t(s):n(s)}}const _s={name:"labelStartLink",resolveAll:Kt.resolveAll,tokenize:vs};function vs(e,n,t){const r=this;return a;function a(i){return g(i===u.leftSquareBracket,"expected `[`"),e.enter(p.labelLink),e.enter(p.labelMarker),e.consume(i),e.exit(p.labelMarker),e.exit(p.labelLink),o}function o(i){return i===u.caret&&"_hiddenFootnoteSupport"in r.parser.constructs?t(i):n(i)}}const It={name:"lineEnding",tokenize:Os};function Os(e,n){return t;function t(r){return g(F(r),"expected eol"),e.enter(p.lineEnding),e.consume(r),e.exit(p.lineEnding),U(e,n,p.linePrefix)}}const ut={name:"thematicBreak",tokenize:qs};function qs(e,n,t){let r=0,a;return o;function o(c){return e.enter(p.thematicBreak),i(c)}function i(c){return g(c===u.asterisk||c===u.dash||c===u.underscore,"expected `*`, `-`, or `_`"),a=c,s(c)}function s(c){return c===a?(e.enter(p.thematicBreakSequence),l(c)):r>=A.thematicBreakMarkerCountMin&&(c===u.eof||F(c))?(e.exit(p.thematicBreak),n(c)):t(c)}function l(c){return c===a?(e.consume(c),r++,l):(e.exit(p.thematicBreakSequence),R(c)?U(e,s,p.whitespace)(c):s(c))}}const ne={continuation:{tokenize:Hs},exit:Vs,name:"list",tokenize:js},Rs={partial:!0,tokenize:Ws},Us={partial:!0,tokenize:$s};function js(e,n,t){const r=this,a=r.events[r.events.length-1];let o=a&&a[1].type===p.linePrefix?a[2].sliceSerialize(a[1],!0).length:0,i=0;return s;function s(m){g(r.containerState,"expected state");const y=r.containerState.type||(m===u.asterisk||m===u.plusSign||m===u.dash?p.listUnordered:p.listOrdered);if(y===p.listUnordered?!r.containerState.marker||m===r.containerState.marker:Bt(m)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y===p.listUnordered)return e.enter(p.listItemPrefix),m===u.asterisk||m===u.dash?e.check(ut,t,c)(m):c(m);if(!r.interrupt||m===u.digit1)return e.enter(p.listItemPrefix),e.enter(p.listItemValue),l(m)}return t(m)}function l(m){return g(r.containerState,"expected state"),Bt(m)&&++i<A.listItemValueSizeMax?(e.consume(m),l):(!r.interrupt||i<2)&&(r.containerState.marker?m===r.containerState.marker:m===u.rightParenthesis||m===u.dot)?(e.exit(p.listItemValue),c(m)):t(m)}function c(m){return g(r.containerState,"expected state"),g(m!==u.eof,"eof (`null`) is not a marker"),e.enter(p.listItemMarker),e.consume(m),e.exit(p.listItemMarker),r.containerState.marker=r.containerState.marker||m,e.check(et,r.interrupt?t:f,e.attempt(Rs,d,h))}function f(m){return g(r.containerState,"expected state"),r.containerState.initialBlankLine=!0,o++,d(m)}function h(m){return R(m)?(e.enter(p.listItemPrefixWhitespace),e.consume(m),e.exit(p.listItemPrefixWhitespace),d):t(m)}function d(m){return g(r.containerState,"expected state"),r.containerState.size=o+r.sliceSerialize(e.exit(p.listItemPrefix),!0).length,n(m)}}function Hs(e,n,t){const r=this;return g(r.containerState,"expected state"),r.containerState._closeFlow=void 0,e.check(et,a,o);function a(s){return g(r.containerState,"expected state"),g(typeof r.containerState.size=="number","expected size"),r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,U(e,n,p.listItemIndent,r.containerState.size+1)(s)}function o(s){return g(r.containerState,"expected state"),r.containerState.furtherBlankLines||!R(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Us,n,i)(s))}function i(s){return g(r.containerState,"expected state"),r.containerState._closeFlow=!0,r.interrupt=void 0,g(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),U(e,e.attempt(ne,n,t),p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:A.tabSize)(s)}}function $s(e,n,t){const r=this;return g(r.containerState,"expected state"),g(typeof r.containerState.size=="number","expected size"),U(e,a,p.listItemIndent,r.containerState.size+1);function a(o){g(r.containerState,"expected state");const i=r.events[r.events.length-1];return i&&i[1].type===p.listItemIndent&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?n(o):t(o)}}function Vs(e){g(this.containerState,"expected state"),g(typeof this.containerState.type=="string","expected type"),e.exit(this.containerState.type)}function Ws(e,n,t){const r=this;return g(r.parser.constructs.disable.null,"expected `disable.null` to be populated"),U(e,a,p.listItemPrefixWhitespace,r.parser.constructs.disable.null.includes("codeIndented")?void 0:A.tabSize+1);function a(o){const i=r.events[r.events.length-1];return!R(o)&&i&&i[1].type===p.listItemPrefixWhitespace?n(o):t(o)}}const Mn={name:"setextUnderline",resolveTo:Qs,tokenize:Gs};function Qs(e,n){let t=e.length,r,a,o;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type===p.content){r=t;break}e[t][1].type===p.paragraph&&(a=t)}else e[t][1].type===p.content&&e.splice(t,1),!o&&e[t][1].type===p.definition&&(o=t);g(a!==void 0,"expected a `text` index to be found"),g(r!==void 0,"expected a `text` index to be found"),g(e[r][2]===n,"enter context should be same"),g(e[e.length-1][2]===n,"enter context should be same");const i={type:p.setextHeading,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=p.setextHeadingText,o?(e.splice(a,0,["enter",i,n]),e.splice(o+1,0,["exit",e[r][1],n]),e[r][1].end={...e[o][1].end}):e[r][1]=i,e.push(["exit",i,n]),e}function Gs(e,n,t){const r=this;let a;return o;function o(c){let f=r.events.length,h;for(g(c===u.dash||c===u.equalsTo,"expected `=` or `-`");f--;)if(r.events[f][1].type!==p.lineEnding&&r.events[f][1].type!==p.linePrefix&&r.events[f][1].type!==p.content){h=r.events[f][1].type===p.paragraph;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter(p.setextHeadingLine),a=c,i(c)):t(c)}function i(c){return e.enter(p.setextHeadingLineSequence),s(c)}function s(c){return c===a?(e.consume(c),s):(e.exit(p.setextHeadingLineSequence),R(c)?U(e,l,p.lineSuffix)(c):l(c))}function l(c){return c===u.eof||F(c)?(e.exit(p.setextHeadingLine),n(c)):t(c)}}const Xs={tokenize:rl,partial:!0};function Js(){return{document:{[u.leftSquareBracket]:{name:"gfmFootnoteDefinition",tokenize:el,continuation:{tokenize:tl},exit:nl}},text:{[u.leftSquareBracket]:{name:"gfmFootnoteCall",tokenize:Zs},[u.rightSquareBracket]:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Ys,resolveTo:Ks}}}}function Ys(e,n,t){const r=this;let a=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i;for(;a--;){const l=r.events[a][1];if(l.type===p.labelImage){i=l;break}if(l.type==="gfmFootnoteCall"||l.type===p.labelLink||l.type===p.label||l.type===p.image||l.type===p.link)break}return s;function s(l){if(g(l===u.rightSquareBracket,"expected `]`"),!i||!i._balanced)return t(l);const c=le(r.sliceSerialize({start:i.end,end:r.now()}));return c.codePointAt(0)!==u.caret||!o.includes(c.slice(1))?t(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),n(l))}}function Ks(e,n){let t=e.length,r;for(;t--;)if(e[t][1].type===p.labelImage&&e[t][0]==="enter"){r=e[t][1];break}g(r,"expected `labelStart` to resolve"),e[t+1][1].type=p.data,e[t+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[t+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[t+3][1].end),end:Object.assign({},e[t+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},s={type:p.chunkString,contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},l=[e[t+1],e[t+2],["enter",a,n],e[t+3],e[t+4],["enter",o,n],["exit",o,n],["enter",i,n],["enter",s,n],["exit",s,n],["exit",i,n],e[e.length-2],e[e.length-1],["exit",a,n]];return e.splice(t,e.length-t+1,...l),e}function Zs(e,n,t){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,i;return s;function s(h){return g(h===u.leftSquareBracket,"expected `[`"),e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==u.caret?t(h):(e.enter("gfmFootnoteCallMarker"),e.consume(h),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(h){if(o>A.linkReferenceSizeMax||h===u.rightSquareBracket&&!i||h===u.eof||h===u.leftSquareBracket||V(h))return t(h);if(h===u.rightSquareBracket){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return a.includes(le(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(h)}return V(h)||(i=!0),o++,e.consume(h),h===u.backslash?f:c}function f(h){return h===u.leftSquareBracket||h===u.backslash||h===u.rightSquareBracket?(e.consume(h),o++,c):c(h)}}function el(e,n,t){const r=this,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,i=0,s;return l;function l(y){return g(y===u.leftSquareBracket,"expected `[`"),e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(y){return y===u.caret?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):t(y)}function f(y){if(i>A.linkReferenceSizeMax||y===u.rightSquareBracket&&!s||y===u.eof||y===u.leftSquareBracket||V(y))return t(y);if(y===u.rightSquareBracket){e.exit("chunkString");const z=e.exit("gfmFootnoteDefinitionLabelString");return o=le(r.sliceSerialize(z)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return V(y)||(s=!0),i++,e.consume(y),y===u.backslash?h:f}function h(y){return y===u.leftSquareBracket||y===u.backslash||y===u.rightSquareBracket?(e.consume(y),i++,f):f(y)}function d(y){return y===u.colon?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),a.includes(o)||a.push(o),U(e,m,"gfmFootnoteDefinitionWhitespace")):t(y)}function m(y){return n(y)}}function tl(e,n,t){return e.check(et,n,e.attempt(Xs,n,t))}function nl(e){e.exit("gfmFootnoteDefinition")}function rl(e,n,t){const r=this;return U(e,a,"gfmFootnoteDefinitionIndent",A.tabSize+1);function a(o){const i=r.events[r.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===A.tabSize?n(o):t(o)}}function il(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:a};return t==null&&(t=!0),{text:{[u.tilde]:r},insideSpan:{null:[r]},attentionMarkers:{null:[u.tilde]}};function a(i,s){let l=-1;for(;++l<i.length;)if(i[l][0]==="enter"&&i[l][1].type==="strikethroughSequenceTemporary"&&i[l][1]._close){let c=l;for(;c--;)if(i[c][0]==="exit"&&i[c][1].type==="strikethroughSequenceTemporary"&&i[c][1]._open&&i[l][1].end.offset-i[l][1].start.offset===i[c][1].end.offset-i[c][1].start.offset){i[l][1].type="strikethroughSequence",i[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},i[c][1].start),end:Object.assign({},i[l][1].end)},h={type:"strikethroughText",start:Object.assign({},i[c][1].end),end:Object.assign({},i[l][1].start)},d=[["enter",f,s],["enter",i[c][1],s],["exit",i[c][1],s],["enter",h,s]],m=s.parser.constructs.insideSpan.null;m&&K(d,d.length,0,Ue(m,i.slice(c+1,l),s)),K(d,d.length,0,[["exit",h,s],["enter",i[l][1],s],["exit",i[l][1],s],["exit",f,s]]),K(i,c-1,l-c+3,d),l=c+d.length-2;break}}for(l=-1;++l<i.length;)i[l][1].type==="strikethroughSequenceTemporary"&&(i[l][1].type=p.data);return i}function o(i,s,l){const c=this.previous,f=this.events;let h=0;return d;function d(y){return g(y===u.tilde,"expected `~`"),c===u.tilde&&f[f.length-1][1].type!==p.characterEscape?l(y):(i.enter("strikethroughSequenceTemporary"),m(y))}function m(y){const z=Oe(c);if(y===u.tilde)return h>1?l(y):(i.consume(y),h++,m);if(h<2&&!t)return l(y);const I=i.exit("strikethroughSequenceTemporary"),T=Oe(y);return I._open=!T||T===A.attentionSideAfter&&!!z,I._close=!z||z===A.attentionSideAfter&&!!T,s(y)}}}class al{constructor(){this.map=[]}add(n,t,r){ol(this,n,t,r)}consume(n){if(this.map.sort(function(o,i){return o[0]-i[0]}),this.map.length===0)return;let t=this.map.length;const r=[];for(;t>0;)t-=1,r.push(n.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),n.length=this.map[t][0];r.push(n.slice()),n.length=0;let a=r.pop();for(;a;){for(const o of a)n.push(o);a=r.pop()}this.map.length=0}}function ol(e,n,t,r){let a=0;if(!(t===0&&r.length===0)){for(;a<e.map.length;){if(e.map[a][0]===n){e.map[a][1]+=t,e.map[a][2].push(...r);return}a+=1}e.map.push([n,t,r])}}function sl(e,n){g(e[n][1].type==="table","expected table");let t=!1;const r=[];for(;n<e.length;){const a=e[n];if(t){if(a[0]==="enter")a[1].type==="tableContent"&&r.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(t=!0);n+=1}return r}function ll(){return{flow:{null:{name:"table",tokenize:ul,resolveAll:cl}}}}function ul(e,n,t){const r=this;let a=0,o=0,i;return s;function s(b){let Q=r.events.length-1;for(;Q>-1;){const L=r.events[Q][1].type;if(L===p.lineEnding||L===p.linePrefix)Q--;else break}const j=Q>-1?r.events[Q][1].type:null,M=j==="tableHead"||j==="tableRow"?w:l;return M===w&&r.parser.lazy[r.now().line]?t(b):M(b)}function l(b){return e.enter("tableHead"),e.enter("tableRow"),c(b)}function c(b){return b===u.verticalBar||(i=!0,o+=1),f(b)}function f(b){return b===u.eof?t(b):F(b)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter(p.lineEnding),e.consume(b),e.exit(p.lineEnding),m):t(b):R(b)?U(e,f,p.whitespace)(b):(o+=1,i&&(i=!1,a+=1),b===u.verticalBar?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),i=!0,f):(e.enter(p.data),h(b)))}function h(b){return b===u.eof||b===u.verticalBar||V(b)?(e.exit(p.data),f(b)):(e.consume(b),b===u.backslash?d:h)}function d(b){return b===u.backslash||b===u.verticalBar?(e.consume(b),h):h(b)}function m(b){return r.interrupt=!1,r.parser.lazy[r.now().line]?t(b):(e.enter("tableDelimiterRow"),i=!1,R(b)?(g(r.parser.constructs.disable.null,"expected `disabled.null`"),U(e,y,p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:A.tabSize)(b)):y(b))}function y(b){return b===u.dash||b===u.colon?I(b):b===u.verticalBar?(i=!0,e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),z):_(b)}function z(b){return R(b)?U(e,I,p.whitespace)(b):I(b)}function I(b){return b===u.colon?(o+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),T):b===u.dash?(o+=1,T(b)):b===u.eof||F(b)?D(b):_(b)}function T(b){return b===u.dash?(e.enter("tableDelimiterFiller"),E(b)):_(b)}function E(b){return b===u.dash?(e.consume(b),E):b===u.colon?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(b),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(b))}function N(b){return R(b)?U(e,D,p.whitespace)(b):D(b)}function D(b){return b===u.verticalBar?y(b):b===u.eof||F(b)?!i||a!==o?_(b):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(b)):_(b)}function _(b){return t(b)}function w(b){return e.enter("tableRow"),v(b)}function v(b){return b===u.verticalBar?(e.enter("tableCellDivider"),e.consume(b),e.exit("tableCellDivider"),v):b===u.eof||F(b)?(e.exit("tableRow"),n(b)):R(b)?U(e,v,p.whitespace)(b):(e.enter(p.data),H(b))}function H(b){return b===u.eof||b===u.verticalBar||V(b)?(e.exit(p.data),v(b)):(e.consume(b),b===u.backslash?B:H)}function B(b){return b===u.backslash||b===u.verticalBar?(e.consume(b),H):H(b)}}function cl(e,n){let t=-1,r=!0,a=0,o=[0,0,0,0],i=[0,0,0,0],s=!1,l=0,c,f,h;const d=new al;for(;++t<e.length;){const m=e[t],y=m[1];m[0]==="enter"?y.type==="tableHead"?(s=!1,l!==0&&(g(c,"there should be a table opening"),Pn(d,n,l,c,f),f=void 0,l=0),c={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},d.add(t,0,[["enter",c,n]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(r=!0,h=void 0,o=[0,0,0,0],i=[0,t+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},d.add(t,0,[["enter",f,n]])),a=y.type==="tableDelimiterRow"?2:f?3:1):a&&(y.type===p.data||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(r=!1,i[2]===0&&(o[1]!==0&&(i[0]=i[1],h=it(d,n,o,a,void 0,h),o=[0,0,0,0]),i[2]=t)):y.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(i[0]=i[1],h=it(d,n,o,a,void 0,h)),o=i,i=[o[1],t,0,0])):y.type==="tableHead"?(s=!0,l=t):y.type==="tableRow"||y.type==="tableDelimiterRow"?(l=t,o[1]!==0?(i[0]=i[1],h=it(d,n,o,a,t,h)):i[1]!==0&&(h=it(d,n,i,a,t,h)),a=0):a&&(y.type===p.data||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(i[3]=t)}for(l!==0&&(g(c,"expected table opening"),Pn(d,n,l,c,f)),d.consume(n.events),t=-1;++t<n.events.length;){const m=n.events[t];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=sl(n.events,t))}return e}function it(e,n,t,r,a,o){const i=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";t[0]!==0&&(g(o,"expected previous cell enter"),o.end=Object.assign({},Pe(n.events,t[0])),e.add(t[0],0,[["exit",o,n]]));const l=Pe(n.events,t[1]);if(o={type:i,start:Object.assign({},l),end:Object.assign({},l)},e.add(t[1],0,[["enter",o,n]]),t[2]!==0){const c=Pe(n.events,t[2]),f=Pe(n.events,t[3]),h={type:s,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(t[2],0,[["enter",h,n]]),g(t[3]!==0),r!==2){const d=n.events[t[2]],m=n.events[t[3]];if(d[1].end=Object.assign({},m[1].end),d[1].type=p.chunkText,d[1].contentType=A.contentTypeText,t[3]>t[2]+1){const y=t[2]+1,z=t[3]-t[2]-1;e.add(y,z,[])}}e.add(t[3]+1,0,[["exit",h,n]])}return a!==void 0&&(o.end=Object.assign({},Pe(n.events,a)),e.add(a,0,[["exit",o,n]]),o=void 0),o}function Pn(e,n,t,r,a){const o=[],i=Pe(n.events,t);a&&(a.end=Object.assign({},i),o.push(["exit",a,n])),r.end=Object.assign({},i),o.push(["exit",r,n]),e.add(t+1,0,o)}function Pe(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const pl={name:"tasklistCheck",tokenize:hl};function fl(){return{text:{[u.leftSquareBracket]:pl}}}function hl(e,n,t){const r=this;return a;function a(l){return g(l===u.leftSquareBracket,"expected `[`"),r.previous!==u.eof||!r._gfmTasklistFirstContentOfListItem?t(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),o)}function o(l){return V(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),i):l===u.uppercaseX||l===u.lowercaseX?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),i):t(l)}function i(l){return l===u.rightSquareBracket?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):t(l)}function s(l){return F(l)?n(l):R(l)?e.check({tokenize:ml},n,t)(l):t(l)}}function ml(e,n,t){return U(e,r,p.whitespace);function r(a){return a===u.eof?t(a):n(a)}}function dl(e){return Ir([Eo(),Js(),il(e),ll(),fl()])}const gl={};function If(e){const n=this,t=e||gl,r=n.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),i=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(dl(t)),o.push(bo()),i.push(So(t))}function Ef({defaultOrigin:e="",allowedLinkPrefixes:n=[],allowedImagePrefixes:t=[],allowDataImages:r=!1,allowedProtocols:a=[],blockedImageClass:o="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:i="text-gray-500"}){const s=n.length&&!n.every(c=>c==="*"),l=t.length&&!t.every(c=>c==="*");if(!e&&(s||l))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return c=>{const f=bl(e,n,t,r,a,o,i);_e(c,f)}}function Dn(e,n){if(typeof e!="string")return null;try{return new URL(e)}catch{if(n)try{return new URL(e,n)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function xl(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const kl=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),yl=new Set(["javascript:","data:","file:","vbscript:"]);function Ln(e,n,t,r=!1,a=!1,o=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!a)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return a&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const f=e.substring(5);if(f&&f.length>0&&f!=="invalid")return e}}catch{return null}return null}const i=Dn(e,t);if(!i||yl.has(i.protocol)||!(kl.has(i.protocol)||o.includes(i.protocol)||o.includes("*")))return null;if(i.protocol==="mailto:"||!i.protocol.match(/^https?:$/))return i.href;const l=xl(e);return i&&n.some(c=>{const f=Dn(c,t);return!f||f.origin!==i.origin?!1:i.href.startsWith(f.href)})?l?i.pathname+i.search+i.hash:i.href:n.includes("*")?i.protocol!=="https:"&&i.protocol!=="http:"?null:l?i.pathname+i.search+i.hash:i.href:null}const Et=Symbol("node-seen"),bl=(e,n,t,r,a,o,i)=>{const s=(l,c,f)=>{if(l.type!=="element"||l[Et])return rt;if(l.tagName==="a"){const h=Ln(l.properties.href,n,e,!1,!1,a);return h===null?(l[Et]=!0,_e(l,s),f&&typeof c=="number"&&(f.children[c]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(l.properties.href),class:i},children:[...l.children,{type:"text",value:" [blocked]"}]}),Pt):(l.properties.href=h,l.properties.target="_blank",l.properties.rel="noopener noreferrer",rt)}if(l.tagName==="img"){const h=Ln(l.properties.src,t,e,r,!0,a);return h===null?(l[Et]=!0,_e(l,s),f&&typeof c=="number"&&(f.children[c]={type:"element",tagName:"span",properties:{class:o},children:[{type:"text",value:"[Image blocked: "+String(l.properties.alt||"No description")+"]"}]}),Pt):(l.properties.src=h,rt)}return rt};return s},Bn=/[#.]/g;function Sl(e,n){const t=e||"",r={};let a=0,o,i;for(;a<t.length;){Bn.lastIndex=a;const s=Bn.exec(t),l=t.slice(a,s?s.index:t.length);l&&(o?o==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:i=l,a+=l.length),s&&(o=s[0],a++)}return{type:"element",tagName:i||n||"div",properties:r,children:[]}}function jr(e,n,t){const r=t?Il(t):void 0;function a(o,i,...s){let l;if(o==null){l={type:"root",children:[]};const c=i;s.unshift(c)}else{l=Sl(o,n);const c=l.tagName.toLowerCase(),f=r?r.get(c):void 0;if(l.tagName=f||c,wl(i))s.unshift(i);else for(const[h,d]of Object.entries(i))Cl(e,l.properties,h,d)}for(const c of s)Ot(l.children,c);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return a}function wl(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const n=e,t=Object.keys(e);for(const r of t){const a=n[r];if(a&&typeof a=="object"){if(!Array.isArray(a))return!0;const o=a;for(const i of o)if(typeof i!="number"&&typeof i!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Cl(e,n,t,r){const a=Ke(e,t);let o;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;o=r}else typeof r=="boolean"?o=r:typeof r=="string"?a.spaceSeparated?o=hn(r):a.commaSeparated?o=mn(r):a.commaOrSpaceSeparated?o=hn(mn(r).join(" ")):o=_n(a,a.property,r):Array.isArray(r)?o=[...r]:o=a.property==="style"?Tl(r):String(r);if(Array.isArray(o)){const i=[];for(const s of o)i.push(_n(a,a.property,s));o=i}a.property==="className"&&Array.isArray(n.className)&&(o=n.className.concat(o)),n[a.property]=o}}function Ot(e,n){if(n!=null)if(typeof n=="number"||typeof n=="string")e.push({type:"text",value:String(n)});else if(Array.isArray(n))for(const t of n)Ot(e,t);else if(typeof n=="object"&&"type"in n)n.type==="root"?Ot(e,n.children):e.push(n);else throw new Error("Expected node, nodes, or string, got `"+n+"`")}function _n(e,n,t){if(typeof t=="string"){if(e.number&&t&&!Number.isNaN(Number(t)))return Number(t);if((e.boolean||e.overloadedBoolean)&&(t===""||dn(t)===dn(n)))return!0}return t}function Tl(e){const n=[];for(const[t,r]of Object.entries(e))n.push([t,r].join(": "));return n.join("; ")}function Il(e){const n=new Map;for(const t of e)n.set(t.toLowerCase(),t);return n}const El=["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"],zl=jr(qe,"div"),Al=jr(pe,"g",El),Hr={}.hasOwnProperty,Nl=Object.prototype;function $r(e,n){const t=n||{};return Zt({file:t.file||void 0,location:!1,schema:t.space==="svg"?pe:qe,verbose:t.verbose||!1},e)}function Zt(e,n){let t;switch(n.nodeName){case"#comment":{const r=n;return t={type:"comment",value:r.data},ct(e,r,t),t}case"#document":case"#document-fragment":{const r=n,a="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(t={type:"root",children:Vr(e,n.childNodes),data:{quirksMode:a}},e.file&&e.location){const o=String(e.file),i=Pi(o),s=i.toPoint(0),l=i.toPoint(o.length);g(s,"expected `start`"),g(l,"expected `end`"),t.position={start:s,end:l}}return t}case"#documentType":{const r=n;return t={type:"doctype"},ct(e,r,t),t}case"#text":{const r=n;return t={type:"text",value:r.value},ct(e,r,t),t}default:return t=Fl(e,n),t}}function Vr(e,n){let t=-1;const r=[];for(;++t<n.length;){const a=Zt(e,n[t]);r.push(a)}return r}function Fl(e,n){const t=e.schema;e.schema=n.namespaceURI===ze.svg?pe:qe;let r=-1;const a={};for(;++r<n.attrs.length;){const s=n.attrs[r],l=(s.prefix?s.prefix+":":"")+s.name;Hr.call(Nl,l)||(a[l]=s.value)}const i=(e.schema.space==="svg"?Al:zl)(n.tagName,a,Vr(e,n.childNodes));if(ct(e,n,i),i.tagName==="template"){const s=n,l=s.sourceCodeLocation,c=l&&l.startTag&&De(l.startTag),f=l&&l.endTag&&De(l.endTag),h=Zt(e,s.content);c&&f&&e.file&&(h.position={start:c.end,end:f.start}),i.content=h}return e.schema=t,i}function ct(e,n,t){if("sourceCodeLocation"in n&&n.sourceCodeLocation&&e.file){const r=Ml(e,t,n.sourceCodeLocation);r&&(e.location=!0,t.position=r)}}function Ml(e,n,t){const r=De(t);if(n.type==="element"){const a=n.children[n.children.length-1];if(r&&!t.endTag&&a&&a.position&&a.position.end&&(r.end=Object.assign({},a.position.end)),e.verbose){const o={};let i;if(t.attrs)for(i in t.attrs)Hr.call(t.attrs,i)&&(o[Ke(e.schema,i).property]=De(t.attrs[i]));g(t.startTag,"a start tag should exist");const s=De(t.startTag),l=t.endTag?De(t.endTag):void 0,c={opening:s};l&&(c.closing=l),c.properties=o,n.data={position:c}}}return r}function De(e){const n=vn({line:e.startLine,column:e.startCol,offset:e.startOffset}),t=vn({line:e.endLine,column:e.endCol,offset:e.endOffset});return n||t?{start:n,end:t}:void 0}function vn(e){return e.line&&e.column?e:void 0}const Pl={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"}},Dl="https://html.spec.whatwg.org/multipage/parsing.html#parse-error-",Ll=/-[a-z]/g,Bl=/%c(?:([-+])(\d+))?/g,_l=/%x/g,vl={2:!0,1:!1,0:null},Ol={};function ql(e,n){const t=n||Ol,r=t.onerror,a=e instanceof Dt?e:new Dt(e),o=t.fragment?Di:Li,i=String(a),s=o(i,{sourceCodeLocationInfo:!0,onParseError:t.onerror?l:null,scriptingEnabled:!1});return $r(s,{file:a,space:t.space,verbose:t.verbose});function l(c){const f=c.code,h=Rl(f),d=t[h],m=d??!0,y=typeof m=="number"?m:m?1:0;if(y){const I=Pl[h];g(I,"expected known error from `parse5`");const T=new Ht(z(I.reason),{place:{start:{line:c.startLine,column:c.startCol,offset:c.startOffset},end:{line:c.endLine,column:c.endCol,offset:c.endOffset}},ruleId:f,source:"hast-util-from-html"});a.path&&(T.file=a.path,T.name=a.path+":"+T.name),T.fatal=vl[y],T.note=z(I.description),T.url=I.url===!1?void 0:Dl+f,g(r,"`internalOnerror` is not passed if `onerror` is not set"),r(T)}function z(I){return I.replace(Bl,T).replace(_l,E);function T(N,D,_){const w=(_?Number.parseInt(_,10):0)*(D==="-"?-1:1),v=i.charAt(c.startOffset+w);return jl(v)}function E(){return Hl(i.charCodeAt(c.startOffset))}}}}function Rl(e){return e.replace(Ll,Ul)}function Ul(e){return e.charAt(1).toUpperCase()}function jl(e){return e==="`"?"` ` `":e}function Hl(e){return"0x"+e.toString(16).toUpperCase()}function $l(e,n){const t=ql(e,n);return Bi(t,{force:!0}),delete t.data,t}const Ne=(function(e){if(e==null)return Ql;if(typeof e=="string")return Wl(e);if(typeof e=="object")return Vl(e);if(typeof e=="function")return en(e);throw new Error("Expected function, string, or array as `test`")});function Vl(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=Ne(e[t]);return en(r);function r(...a){let o=-1;for(;++o<n.length;)if(n[o].apply(this,a))return!0;return!1}}function Wl(e){return en(n);function n(t){return t.tagName===e}}function en(e){return n;function n(t,r,a){return!!(Gl(t)&&e.call(this,t,typeof r=="number"?r:void 0,a||void 0))}}function Ql(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function Gl(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const On=/\n/g,qn=/[\t ]+/g,qt=Ne("br"),Rn=Ne(nu),Xl=Ne("p"),Un=Ne("tr"),Jl=Ne(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",tu,ru]),Wr=Ne(["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"]);function Yl(e,n){const t=n||{},r="children"in e?e.children:[],a=Wr(e),o=Xr(e,{whitespace:t.whitespace||"normal"}),i=[];(e.type==="text"||e.type==="comment")&&i.push(...Gr(e,{breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)i.push(...Qr(r[s],e,{whitespace:o,breakBefore:s?void 0:a,breakAfter:s<r.length-1?qt(r[s+1]):a}));const l=[];let c;for(s=-1;++s<i.length;){const f=i[s];typeof f=="number"?c!==void 0&&f>c&&(c=f):f&&(c!==void 0&&c>-1&&l.push(`
|
|
17
|
+
`.repeat(c)||" "),c=-1,l.push(f))}return l.join("")}function Qr(e,n,t){return e.type==="element"?Kl(e,n,t):e.type==="text"?t.whitespace==="normal"?Gr(e,t):Zl(e):[]}function Kl(e,n,t){const r=Xr(e,t),a=e.children||[];let o=-1,i=[];if(Jl(e))return i;let s,l;for(qt(e)||Un(e)&&gn(n,e,Un)?l=`
|
|
18
|
+
`:Xl(e)?(s=2,l=2):Wr(e)&&(s=1,l=1);++o<a.length;)i=i.concat(Qr(a[o],e,{whitespace:r,breakBefore:o?void 0:s,breakAfter:o<a.length-1?qt(a[o+1]):l}));return Rn(e)&&gn(n,e,Rn)&&i.push(" "),s&&i.unshift(s),l&&i.push(l),i}function Gr(e,n){const t=String(e.value),r=[],a=[];let o=0;for(;o<=t.length;){On.lastIndex=o;const l=On.exec(t),c=l&&"index"in l?l.index:t.length;r.push(eu(t.slice(o,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?n.breakBefore:!0,c===t.length?n.breakAfter:!0)),o=c+1}let i=-1,s;for(;++i<r.length;)r[i].charCodeAt(r[i].length-1)===8203||i<r.length-1&&r[i+1].charCodeAt(0)===8203?(a.push(r[i]),s=void 0):r[i]?(typeof s=="number"&&a.push(s),a.push(r[i]),s=0):(i===0||i===r.length-1)&&a.push(0);return a}function Zl(e){return[String(e.value)]}function eu(e,n,t){const r=[];let a=0,o;for(;a<e.length;){qn.lastIndex=a;const i=qn.exec(e);o=i?i.index:e.length,!a&&!o&&i&&!n&&r.push(""),a!==o&&r.push(e.slice(a,o)),a=i?o+i[0].length:o}return a!==o&&!t&&r.push(""),r.join(" ")}function Xr(e,n){if(e.type==="element"){const t=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return t.wrap?"pre-wrap":"pre";case"td":case"th":return t.noWrap?"nowrap":n.whitespace;case"textarea":return"pre-wrap"}}return n.whitespace}function tu(e){return!!(e.properties||{}).hidden}function nu(e){return e.tagName==="td"||e.tagName==="th"}function ru(e){return e.tagName==="dialog"&&!(e.properties||{}).open}const iu={},au=[];function zf(e){const n=e||iu;return function(t,r){ir(t,"element",function(a,o){const i=Array.isArray(a.properties.className)?a.properties.className:au,s=i.includes("language-math"),l=i.includes("math-display"),c=i.includes("math-inline");let f=l;if(!s&&!l&&!c)return;let h=o[o.length-1],d=a;if(a.tagName==="code"&&s&&h&&h.type==="element"&&h.tagName==="pre"&&(d=h,h=o[o.length-2],f=!0),!h)return;const m=Yl(d,{whitespace:"pre"});let y;try{y=bn.renderToString(m,{...n,displayMode:f,throwOnError:!0})}catch(I){const T=I,E=T.name.toLowerCase();r.message("Could not render math with KaTeX",{ancestors:[...o,a],cause:T,place:a.position,ruleId:E,source:"rehype-katex"});try{y=bn.renderToString(m,{...n,displayMode:f,strict:"ignore",throwOnError:!1})}catch{y=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(n.errorColor||"#cc0000"),title:String(I)},children:[{type:"text",value:m}]}]}}typeof y=="string"&&(y=$l(y,{fragment:!0}).children);const z=h.children.indexOf(d);return h.children.splice(z,1,...y),Pt})}}const ou={},su={}.hasOwnProperty,Jr=$t("type",{handlers:{root:uu,element:mu,text:fu,comment:hu,doctype:pu}});function lu(e,n){const r=(n||ou).space;return Jr(e,r==="svg"?pe:qe)}function uu(e,n){const t={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return t.childNodes=tn(e.children,t,n),je(e,t),t}function cu(e,n){const t={nodeName:"#document-fragment",childNodes:[]};return t.childNodes=tn(e.children,t,n),je(e,t),t}function pu(e){const n={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return je(e,n),n}function fu(e){const n={nodeName:"#text",value:e.value,parentNode:null};return je(e,n),n}function hu(e){const n={nodeName:"#comment",data:e.value,parentNode:null};return je(e,n),n}function mu(e,n){const t=n;let r=t;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&t.space==="html"&&(r=pe);const a=[];let o;if(e.properties){for(o in e.properties)if(o!=="children"&&su.call(e.properties,o)){const l=du(r,o,e.properties[o]);l&&a.push(l)}}const i=r.space;g(i);const s={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:ze[i],childNodes:[],parentNode:null};return s.childNodes=tn(e.children,s,r),je(e,s),e.tagName==="template"&&e.content&&(s.content=cu(e.content,r)),s}function du(e,n,t){const r=Ke(e,n);if(t===!1||t===null||t===void 0||typeof t=="number"&&Number.isNaN(t)||!t&&r.boolean)return;Array.isArray(t)&&(t=r.commaSeparated?Vt(t):Wt(t));const a={name:r.attribute,value:t===!0?"":String(t)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const o=a.name.indexOf(":");o<0?a.prefix="":(a.name=a.name.slice(o+1),a.prefix=r.attribute.slice(0,o)),a.namespace=ze[r.space]}return a}function tn(e,n,t){let r=-1;const a=[];if(e)for(;++r<e.length;){const o=Jr(e[r],t);o.parentNode=n,a.push(o)}return a}function je(e,n){const t=e.position;t&&t.start&&t.end&&(g(typeof t.start.offset=="number"),g(typeof t.end.offset=="number"),n.sourceCodeLocation={startLine:t.start.line,startCol:t.start.column,startOffset:t.start.offset,endLine:t.end.line,endCol:t.end.column,endOffset:t.end.offset})}const gu=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,xu=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),jn={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Yr(e,n){const t=zu(e),r=$t("type",{handlers:{root:ku,element:yu,text:bu,comment:Zr,doctype:Su,raw:Cu},unknown:Tu}),a={parser:t?new xn(jn):xn.getFragmentParser(void 0,jn),handle(s){r(s,a)},stitches:!1,options:n||{}};r(e,a),He(a,xe());const o=t?a.parser.document:a.parser.getFragment(),i=$r(o,{file:a.options.file});return a.stitches&&_e(i,"comment",function(s,l,c){const f=s;if(f.value.stitch&&c&&l!==void 0){const h=c.children;return h[l]=f.value.stitch,l}}),i.type==="root"&&i.children.length===1&&i.children[0].type===e.type?i.children[0]:i}function Kr(e,n){let t=-1;if(e)for(;++t<e.length;)n.handle(e[t])}function ku(e,n){Kr(e.children,n)}function yu(e,n){Iu(e,n),Kr(e.children,n),Eu(e,n)}function bu(e,n){n.parser.tokenizer.state>4&&(n.parser.tokenizer.state=0);const t={type:Ze.CHARACTER,chars:e.value,location:tt(e)};He(n,xe(e)),n.parser.currentToken=t,n.parser._processToken(n.parser.currentToken)}function Su(e,n){const t={type:Ze.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:tt(e)};He(n,xe(e)),n.parser.currentToken=t,n.parser._processToken(n.parser.currentToken)}function wu(e,n){n.stitches=!0;const t=Au(e);if("children"in e&&"children"in t){const r=Yr({type:"root",children:e.children},n.options);t.children=r.children}Zr({type:"comment",value:{stitch:t}},n)}function Zr(e,n){const t=e.value,r={type:Ze.COMMENT,data:t,location:tt(e)};He(n,xe(e)),n.parser.currentToken=r,n.parser._processToken(n.parser.currentToken)}function Cu(e,n){if(n.parser.tokenizer.preprocessor.html="",n.parser.tokenizer.preprocessor.pos=-1,n.parser.tokenizer.preprocessor.lastGapPos=-2,n.parser.tokenizer.preprocessor.gapStack=[],n.parser.tokenizer.preprocessor.skipNextNewLine=!1,n.parser.tokenizer.preprocessor.lastChunkWritten=!1,n.parser.tokenizer.preprocessor.endOfChunkHit=!1,n.parser.tokenizer.preprocessor.isEol=!1,ei(n,xe(e)),n.parser.tokenizer.write(n.options.tagfilter?e.value.replace(gu,"<$1$2"):e.value,!1),n.parser.tokenizer._runParsingLoop(),n.parser.tokenizer.state===72||n.parser.tokenizer.state===78){n.parser.tokenizer.preprocessor.lastChunkWritten=!0;const t=n.parser.tokenizer._consume();n.parser.tokenizer._callState(t)}}function Tu(e,n){const t=e;if(n.options.passThrough&&n.options.passThrough.includes(t.type))wu(t,n);else{let r="";throw xu.has(t.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+t.type+"` node"+r)}}function He(e,n){ei(e,n);const t=e.parser.tokenizer.currentCharacterToken;t&&t.location&&(t.location.endLine=e.parser.tokenizer.preprocessor.line,t.location.endCol=e.parser.tokenizer.preprocessor.col+1,t.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=t,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Ee.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function ei(e,n){if(n&&n.offset!==void 0){const t={startLine:n.line,startCol:n.column,startOffset:n.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-n.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=n.offset,e.parser.tokenizer.preprocessor.line=n.line,e.parser.tokenizer.currentLocation=t}}function Iu(e,n){const t=e.tagName.toLowerCase();if(n.parser.tokenizer.state===Ee.PLAINTEXT)return;He(n,xe(e));const r=n.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:ze.html;a===ze.html&&t==="svg"&&(a=ze.svg);const o=lu({...e,children:[]},{space:a===ze.svg?"svg":"html"}),i={type:Ze.START_TAG,tagName:t,tagID:or(t),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:tt(e)};n.parser.currentToken=i,n.parser._processToken(n.parser.currentToken),n.parser.tokenizer.lastStartTagName=t}function Eu(e,n){const t=e.tagName.toLowerCase();if(!n.parser.tokenizer.inForeignNode&&sr.includes(t)||n.parser.tokenizer.state===Ee.PLAINTEXT)return;He(n,Qt(e));const r={type:Ze.END_TAG,tagName:t,tagID:or(t),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:tt(e)};n.parser.currentToken=r,n.parser._processToken(n.parser.currentToken),t===n.parser.tokenizer.lastStartTagName&&(n.parser.tokenizer.state===Ee.RCDATA||n.parser.tokenizer.state===Ee.RAWTEXT||n.parser.tokenizer.state===Ee.SCRIPT_DATA)&&(n.parser.tokenizer.state=Ee.DATA)}function zu(e){const n=e.type==="root"?e.children[0]:e;return!!(n&&(n.type==="doctype"||n.type==="element"&&n.tagName.toLowerCase()==="html"))}function tt(e){const n=xe(e)||{line:void 0,column:void 0,offset:void 0},t=Qt(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:n.line,startCol:n.column,startOffset:n.offset,endLine:t.line,endCol:t.column,endOffset:t.offset}}function Au(e){return"children"in e?ve({...e,children:[]}):ve(e)}function Af(e){return function(n,t){return Yr(n,{...e,file:t})}}var Nu=Object.defineProperty,Fu=(e,n,t)=>n in e?Nu(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,Mu=(e,n,t)=>Fu(e,n+"",t);function Pu(e){return new RegExp("^\\p{Emoji_Presentation}","u").test(String.fromCodePoint(e))}function Du(e){if(!e||e<4352)return!1;switch(_i(e)){case"fullwidth":case"halfwidth":return!0;case"wide":return!Pu(e);case"narrow":return!1;case"ambiguous":return 917760<=e&&e<=917999?null:!1;case"neutral":return new RegExp("^\\p{sc=Hangul}","u").test(String.fromCodePoint(e))}}function Lu(e,n){return n!==65025||!e||e<8216?!1:e===8216||e===8217||e===8220||e===8221}function Bu(e){return e!==null&&e>=65024&&e<=65038}var _u=ti(new RegExp("\\p{P}|\\p{S}","u")),vu=ti(/\s/);function ti(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCodePoint(t))}}var ae;(e=>{e.spaceOrPunctuation=3,e.cjk=4096,e.cjkPunctuation=4098,e.ivs=8192,e.cjkOrIvs=12288,e.nonEmojiGeneralUseVS=16384,e.variationSelector=24576,e.ivsToCjkRightShift=1})(ae||(ae={}));function Be(e){if(e===u.eof||V(e)||vu(e))return A.characterGroupWhitespace;let n=0;if(e>=4352){if(Bu(e))return ae.nonEmojiGeneralUseVS;switch(Du(e)){case null:return ae.ivs;case!0:n|=ae.cjk;break}}return _u(e)&&(n|=A.characterGroupPunctuation),n}function ni(e,n,t){if(!Uu(e))return e;const r=n(),a=Be(r);return!r||Je(a)?e:Lu(r,t)?ae.cjkPunctuation:Ou(a)}function Ou(e){return e&~ae.ivs}function Je(e){return!!(e&A.characterGroupWhitespace)}function mt(e){return(e&ae.cjkPunctuation)===A.characterGroupPunctuation}function Rt(e){return!!(e&ae.cjk)}function qu(e){return e===ae.ivs}function Ru(e){return!!(e&ae.cjkOrIvs)}function Uu(e){return e===ae.nonEmojiGeneralUseVS}function Hn(e){return!!(e&ae.spaceOrPunctuation)}function ri(e){return!!(e&&e>=55296&&e<=56319)}function ii(e){return!!(e&&e>=56320&&e<=57343)}function ai(e,n,t){if(n._bufferIndex<2)return e;const a=t({start:{...n,_bufferIndex:n._bufferIndex-2},end:n}).codePointAt(0);return a&&a>=65536?a:e}function ju(e,n,t){const r=e>=65536?2:1;if(n._bufferIndex<1+r)return null;const a=n._bufferIndex-r-2,o=t({start:{...n,_bufferIndex:a>=0?a:0},end:{...n,_bufferIndex:n._bufferIndex-r}}),i=o.charCodeAt(o.length-1);if(Number.isNaN(i))return null;if(o.length<2||i<56320||57343<i)return i;const s=o.codePointAt(0);return s&&s>=65536?s:i}var oi=class{constructor(e,n,t){this.previousCode=e,this.nowPoint=n,this.sliceSerialize=t,Mu(this,"cachedValue")}value(){return this.cachedValue===void 0&&(this.cachedValue=ju(this.previousCode,this.nowPoint,this.sliceSerialize)),this.cachedValue}};function si(e,n,t){const r=t({start:n,end:{...n,_bufferIndex:n._bufferIndex+2}}).codePointAt(0);return r&&r>=65536?r:e}var zt={name:"attention",resolveAll:Hu,tokenize:$u};function Hu(e,n){let t=-1,r,a,o,i,s,l,c,f;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const h={...e[r][1].end},d={...e[t][1].start};$n(h,-l),$n(d,l),i={type:l>1?p.strongSequence:p.emphasisSequence,start:h,end:{...e[r][1].end}},s={type:l>1?p.strongSequence:p.emphasisSequence,start:{...e[t][1].start},end:d},o={type:l>1?p.strongText:p.emphasisText,start:{...e[r][1].end},end:{...e[t][1].start}},a={type:l>1?p.strong:p.emphasis,start:{...i.start},end:{...s.end}},e[r][1].end={...i.start},e[t][1].start={...s.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Y(c,[["enter",e[r][1],n],["exit",e[r][1],n]])),c=Y(c,[["enter",a,n],["enter",i,n],["exit",i,n],["enter",o,n]]),g(n.parser.constructs.insideSpan.null,"expected `insideSpan` to be populated"),c=Y(c,Ue(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),c=Y(c,[["exit",o,n],["enter",s,n],["exit",s,n],["exit",a,n]]),e[t][1].end.offset-e[t][1].start.offset?(f=2,c=Y(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):f=0,K(e,r-1,t-r+3,c),t=r+c.length-f-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function $u(e,n){const t=this.parser.constructs.attentionMarkers.null,{now:r,sliceSerialize:a,previous:o}=this,i=ii(o)?ai(o,r(),a):o,s=Be(i),l=new oi(i,r(),a),c=ni(s,l.value.bind(l),i);let f;return h;function h(m){return g(m===u.asterisk||m===u.underscore,"expected asterisk or underscore"),f=m,e.enter("attentionSequence"),d(m)}function d(m){if(m===f)return e.consume(m),d;const y=e.exit("attentionSequence"),z=ri(m)?si(m,r(),a):m,I=Be(z);g(t,"expected `attentionMarkers` to be populated");const T=mt(c),E=T||Je(c),N=mt(I),D=N||Je(I),_=Ru(c),w=!D||N&&(E||_)||t.includes(m),v=!E||T&&(D||Rt(I))||t.includes(i);return y._open=!!(f===u.asterisk?w:w&&(Hn(c)||!v)),y._close=!!(f===u.asterisk?v:v&&(Hn(I)||!w)),n(m)}}function $n(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}function Vu(){return{text:{[u.asterisk]:zt,[u.underscore]:zt},insideSpan:{null:[zt]}}}function Nf(){const e=this.data();(e.micromarkExtensions||(e.micromarkExtensions=[])).push(Vu())}function Wu(e){let t=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:a};return t==null&&(t=!0),{text:{[u.tilde]:r},insideSpan:{null:[r]},attentionMarkers:{null:[u.tilde]}};function a(i,s){let l=-1;for(;++l<i.length;)if(i[l][0]==="enter"&&i[l][1].type==="strikethroughSequenceTemporary"&&i[l][1]._close){let c=l;for(;c--;)if(i[c][0]==="exit"&&i[c][1].type==="strikethroughSequenceTemporary"&&i[c][1]._open&&i[l][1].end.offset-i[l][1].start.offset===i[c][1].end.offset-i[c][1].start.offset){i[l][1].type="strikethroughSequence",i[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},i[c][1].start),end:Object.assign({},i[l][1].end)},h={type:"strikethroughText",start:Object.assign({},i[c][1].end),end:Object.assign({},i[l][1].start)},d=[["enter",f,s],["enter",i[c][1],s],["exit",i[c][1],s],["enter",h,s]],m=s.parser.constructs.insideSpan.null;m&&K(d,d.length,0,Ue(m,i.slice(c+1,l),s)),K(d,d.length,0,[["exit",h,s],["enter",i[l][1],s],["exit",i[l][1],s],["exit",f,s]]),K(i,c-1,l-c+3,d),l=c+d.length-2;break}}for(l=-1;++l<i.length;)i[l][1].type==="strikethroughSequenceTemporary"&&(i[l][1].type=p.data);return i}function o(i,s,l){const{now:c,sliceSerialize:f,previous:h}=this,d=ii(h)?ai(h,c(),f):h,m=Be(d),y=new oi(d,c(),f),z=ni(m,y.value.bind(y),d),I=this.events;let T=0;return E;function E(D){return g(D===u.tilde,"expected `~`"),d===u.tilde&&I[I.length-1][1].type!==p.characterEscape?l(D):(i.enter("strikethroughSequenceTemporary"),N(D))}function N(D){const _=Be(d);if(D===u.tilde)return T>1?l(D):(i.consume(D),T++,N);if(T<2&&!t)return l(D);const w=i.exit("strikethroughSequenceTemporary"),v=ri(D)?si(D,c(),f):D,H=Be(v),b=mt(z)||Je(z),j=mt(H)||Je(H),M=Rt(z)||qu(_);return w._open=!j||H===A.attentionSideAfter&&(b||M),w._close=!b||_===A.attentionSideAfter&&(j||Rt(H)),s(D)}}}function Ff(e){const n=this.data();(n.micromarkExtensions||(n.micromarkExtensions=[])).push(Wu(e))}function Qu(){return{enter:{mathFlow:e,mathFlowFenceMeta:n,mathText:o},exit:{mathFlow:a,mathFlowFence:r,mathFlowFenceMeta:t,mathFlowValue:s,mathText:i,mathTextData:s}};function e(l){const c={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[c]}},l)}function n(){this.buffer()}function t(){const l=this.resume(),c=this.stack[this.stack.length-1];g(c.type==="math"),c.meta=l}function r(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function a(l){const c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),f=this.stack[this.stack.length-1];g(f.type==="math"),this.exit(l),f.value=c;const h=f.data.hChildren[0];g(h.type==="element"),g(h.tagName==="code"),h.children.push({type:"text",value:c}),this.data.mathFlowInside=void 0}function o(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function i(l){const c=this.resume(),f=this.stack[this.stack.length-1];g(f.type==="inlineMath"),this.exit(l),f.value=c,f.data.hChildren.push({type:"text",value:c})}function s(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function Gu(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),r.peek=a,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
|
|
19
19
|
`,inConstruct:"mathFlowMeta"},{character:"$",after:n?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:t,inlineMath:r}};function t(o,i,s,l){const c=o.value||"",f=s.createTracker(l),h="$".repeat(Math.max(ar(c,"$")+1,2)),d=s.enter("mathFlow");let m=f.move(h);if(o.meta){const y=s.enter("mathFlowMeta");m+=f.move(s.safe(o.meta,{after:`
|
|
20
20
|
`,before:m,encode:["$"],...f.current()})),y()}return m+=f.move(`
|
|
21
21
|
`),c&&(m+=f.move(c+`
|
|
22
|
-
`)),m+=f.move(h),d(),m}function r(o,i,s){let l=o.value||"",c=1;for(n||c++;new RegExp("(^|[^$])"+"\\$".repeat(c)+"([^$]|$)").test(l);)c++;const f="$".repeat(c);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let h=-1;for(;++h<s.unsafe.length;){const d=s.unsafe[h];if(!d.atBreak)continue;const m=s.compilePattern(d);let y;for(;y=m.exec(l);){let z=y.index;l.codePointAt(z)===10&&l.codePointAt(z-1)===13&&z--,l=l.slice(0,z)+" "+l.slice(y.index+1)}}return f+l+f}function a(){return"$"}}const Xu={tokenize:Yu,concrete:!0,name:"mathFlow"},Vn={tokenize:Ju,partial:!0};function Yu(e,n,t){const r=this,a=r.events[r.events.length-1],o=a&&a[1].type===p.linePrefix?a[2].sliceSerialize(a[1],!0).length:0;let i=0;return s;function s(E){return g(E===u.dollarSign,"expected `$`"),e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),l(E)}function l(E){return E===u.dollarSign?(e.consume(E),i++,l):i<2?t(E):(e.exit("mathFlowFenceSequence"),U(e,c,p.whitespace)(E))}function c(E){return E===u.eof||F(E)?h(E):(e.enter("mathFlowFenceMeta"),e.enter(p.chunkString,{contentType:A.contentTypeString}),f(E))}function f(E){return E===u.eof||F(E)?(e.exit(p.chunkString),e.exit("mathFlowFenceMeta"),h(E)):E===u.dollarSign?t(E):(e.consume(E),f)}function h(E){return e.exit("mathFlowFence"),r.interrupt?n(E):e.attempt(Vn,d,I)(E)}function d(E){return e.attempt({tokenize:T,partial:!0},I,m)(E)}function m(E){return(o?U(e,y,p.linePrefix,o+1):y)(E)}function y(E){return E===u.eof?I(E):F(E)?e.attempt(Vn,d,I)(E):(e.enter("mathFlowValue"),z(E))}function z(E){return E===u.eof||F(E)?(e.exit("mathFlowValue"),y(E)):(e.consume(E),z)}function I(E){return e.exit("mathFlow"),n(E)}function T(E,N,D){let _=0;return g(r.parser.constructs.disable.null,"expected `disable.null`"),U(E,S,p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:A.tabSize);function S(B){return E.enter("mathFlowFence"),E.enter("mathFlowFenceSequence"),v(B)}function v(B){return B===u.dollarSign?(_++,E.consume(B),v):_<i?D(B):(E.exit("mathFlowFenceSequence"),U(E,$,p.whitespace)(B))}function $(B){return B===u.eof||F(B)?(E.exit("mathFlowFence"),N(B)):D(B)}}}function Ju(e,n,t){const r=this;return a;function a(i){return i===null?n(i):(g(F(i),"expected eol"),e.enter(p.lineEnding),e.consume(i),e.exit(p.lineEnding),o)}function o(i){return r.parser.lazy[r.now().line]?t(i):n(i)}}function Ku(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),{tokenize:r,resolve:Zu,previous:Wn,name:"mathText"};function r(a,o,i){const s=this;let l=0,c,f;return h;function h(I){return g(I===u.dollarSign,"expected `$`"),g(Wn.call(s,s.previous),"expected correct previous"),a.enter("mathText"),a.enter("mathTextSequence"),d(I)}function d(I){return I===u.dollarSign?(a.consume(I),l++,d):l<2&&!t?i(I):(a.exit("mathTextSequence"),m(I))}function m(I){return I===u.eof?i(I):I===u.dollarSign?(f=a.enter("mathTextSequence"),c=0,z(I)):I===u.space?(a.enter("space"),a.consume(I),a.exit("space"),m):F(I)?(a.enter(p.lineEnding),a.consume(I),a.exit(p.lineEnding),m):(a.enter("mathTextData"),y(I))}function y(I){return I===u.eof||I===u.space||I===u.dollarSign||F(I)?(a.exit("mathTextData"),m(I)):(a.consume(I),y)}function z(I){return I===u.dollarSign?(a.consume(I),c++,z):c===l?(a.exit("mathTextSequence"),a.exit("mathText"),o(I)):(f.type="mathTextData",y(I))}}}function Zu(e){let n=e.length-4,t=3,r,a;if((e[t][1].type===p.lineEnding||e[t][1].type==="space")&&(e[n][1].type===p.lineEnding||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="mathTextData"){e[n][1].type="mathTextPadding",e[t][1].type="mathTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)a===void 0?r!==n&&e[r][1].type!==p.lineEnding&&(a=r):(r===n||e[r][1].type===p.lineEnding)&&(e[a][1].type="mathTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),n-=r-a-2,r=a+2),a=void 0);return e}function Wn(e){return e!==u.dollarSign||this.events[this.events.length-1][1].type===p.characterEscape}function ec(e){return{flow:{[u.dollarSign]:Xu},text:{[u.dollarSign]:Ku(e)}}}const tc={};function Mf(e){const n=this,t=e||tc,r=n.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),i=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(ec(t)),o.push(Qu()),i.push(Gu(t))}const nc=/[ \t\n\f\r]/g;function gt(e){return typeof e=="object"?e.type==="text"?Qn(e.value):!1:Qn(e)}function Qn(e){return e.replace(nc,"")===""}const nn={}.hasOwnProperty,rc=new Map,ic=/[A-Z]/g,ac=new Set(["table","tbody","thead","tfoot","tr"]),oc=new Set(["td","th"]),li="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Pf(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=mc(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=hc(t,n.jsx,n.jsxs)}const a={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?pe:qe,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=ui(a,e,void 0);return o&&typeof o!="string"?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function ui(e,n,t){if(n.type==="element")return sc(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return lc(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return cc(e,n,t);if(n.type==="mdxjsEsm")return uc(e,n);if(n.type==="root")return pc(e,n,t);if(n.type==="text")return fc(e,n)}function sc(e,n,t){const r=e.schema;let a=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=pe,e.schema=a),e.ancestors.push(n);const o=pi(e,n.tagName,!1),i=dc(e,n);let s=an(e,n);return ac.has(n.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!gt(l):!0})),ci(e,i,o,n),rn(i,s),e.ancestors.pop(),e.schema=r,e.create(n,o,i,t)}function lc(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return g(r.type==="ExpressionStatement"),e.evaluater.evaluateExpression(r.expression)}Je(e,n.position)}function uc(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Je(e,n.position)}function cc(e,n,t){const r=e.schema;let a=r;n.name==="svg"&&r.space==="html"&&(a=pe,e.schema=a),e.ancestors.push(n);const o=n.name===null?e.Fragment:pi(e,n.name,!0),i=gc(e,n),s=an(e,n);return ci(e,i,o,n),rn(i,s),e.ancestors.pop(),e.schema=r,e.create(n,o,i,t)}function pc(e,n,t){const r={};return rn(r,an(e,n)),e.create(n,e.Fragment,r,t)}function fc(e,n){return n.value}function ci(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function rn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function hc(e,n,t){return r;function r(a,o,i,s){const c=Array.isArray(i.children)?t:n;return s?c(o,i,s):c(o,i)}}function mc(e,n){return t;function t(r,a,o,i){const s=Array.isArray(o.children),l=xe(r);return n(a,o,i,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function dc(e,n){const t={};let r,a;for(a in n.properties)if(a!=="children"&&nn.call(n.properties,a)){const o=xc(e,a,n.properties[a]);if(o){const[i,s]=o;e.tableCellAlignToStyle&&i==="align"&&typeof s=="string"&&oc.has(n.tagName)?r=s:t[i]=s}}if(r){const o=t.style||(t.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function gc(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];g(o.type==="ExpressionStatement");const i=o.expression;g(i.type==="ObjectExpression");const s=i.properties[0];g(s.type==="SpreadElement"),Object.assign(t,e.evaluater.evaluateExpression(s.argument))}else Je(e,n.position);else{const a=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];g(s.type==="ExpressionStatement"),o=e.evaluater.evaluateExpression(s.expression)}else Je(e,n.position);else o=r.value===null?!0:r.value;t[a]=o}return t}function an(e,n){const t=[];let r=-1;const a=e.passKeys?new Map:rc;for(;++r<n.children.length;){const o=n.children[r];let i;if(e.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const c=a.get(l)||0;i=l+"-"+c,a.set(l,c+1)}}const s=ui(e,o,i);s!==void 0&&t.push(s)}return t}function xc(e,n,t){const r=Ke(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?Vt(t):Wt(t)),r.property==="style"){let a=typeof t=="object"?t:kc(e,String(t));return e.stylePropertyNameCase==="css"&&(a=yc(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?vi[r.property]||r.property:r.attribute,t]}}function kc(e,n){try{return Oi(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,a=new $t("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=li+"#cannot-parse-style-attribute",a}}function pi(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const a=n.split(".");let o=-1,i;for(;++o<a.length;){const s=kn(a[o])?{type:"Identifier",name:a[o]}:{type:"Literal",value:a[o]};i=i?{type:"MemberExpression",object:i,property:s,computed:!!(o&&s.type==="Literal"),optional:!1}:s}g(i,"always a result"),r=i}else r=kn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const a=r.value;return nn.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);Je(e)}function Je(e,n){const t=new $t("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=li+"#cannot-handle-mdx-estrees-without-createevaluater",t}function yc(e){const n={};let t;for(t in e)nn.call(e,t)&&(n[bc(t)]=e[t]);return n}function bc(e){let n=e.replace(ic,wc);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function wc(e){return"-"+e.toLowerCase()}const Sc={tokenize:Cc};function Cc(e){const n=e.attempt(this.parser.constructs.contentInitial,r,a);let t;return n;function r(s){if(g(s===u.eof||F(s),"expected eol or eof"),s===u.eof){e.consume(s);return}return e.enter(p.lineEnding),e.consume(s),e.exit(p.lineEnding),U(e,n,p.linePrefix)}function a(s){return g(s!==u.eof&&!F(s),"expected anything other than a line ending or EOF"),e.enter(p.paragraph),o(s)}function o(s){const l=e.enter(p.chunkText,{contentType:A.contentTypeText,previous:t});return t&&(t.next=l),t=l,i(s)}function i(s){if(s===u.eof){e.exit(p.chunkText),e.exit(p.paragraph),e.consume(s);return}return F(s)?(e.consume(s),e.exit(p.chunkText),o):(e.consume(s),i)}}const Tc={tokenize:Ic},Gn={tokenize:Ec};function Ic(e){const n=this,t=[];let r=0,a,o,i;return s;function s(N){if(r<t.length){const D=t[r];return n.containerState=D[1],g(D[0].continuation,"expected `continuation` to be defined on container construct"),e.attempt(D[0].continuation,l,c)(N)}return c(N)}function l(N){if(g(n.containerState,"expected `containerState` to be defined after continuation"),r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,a&&E();const D=n.events.length;let _=D,S;for(;_--;)if(n.events[_][0]==="exit"&&n.events[_][1].type===p.chunkFlow){S=n.events[_][1].end;break}g(S,"could not find previous flow chunk"),T(r);let v=D;for(;v<n.events.length;)n.events[v][1].end={...S},v++;return K(n.events,_+1,0,n.events.slice(D)),n.events.length=v,c(N)}return s(N)}function c(N){if(r===t.length){if(!a)return d(N);if(a.currentConstruct&&a.currentConstruct.concrete)return y(N);n.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Gn,f,h)(N)}function f(N){return a&&E(),T(r),d(N)}function h(N){return n.parser.lazy[n.now().line]=r!==t.length,i=n.now().offset,y(N)}function d(N){return n.containerState={},e.attempt(Gn,m,y)(N)}function m(N){return g(n.currentConstruct,"expected `currentConstruct` to be defined on tokenizer"),g(n.containerState,"expected `containerState` to be defined on tokenizer"),r++,t.push([n.currentConstruct,n.containerState]),d(N)}function y(N){if(N===u.eof){a&&E(),T(0),e.consume(N);return}return a=a||n.parser.flow(n.now()),e.enter(p.chunkFlow,{_tokenizer:a,contentType:A.contentTypeFlow,previous:o}),z(N)}function z(N){if(N===u.eof){I(e.exit(p.chunkFlow),!0),T(0),e.consume(N);return}return F(N)?(e.consume(N),I(e.exit(p.chunkFlow)),r=0,n.interrupt=void 0,s):(e.consume(N),z)}function I(N,D){g(a,"expected `childFlow` to be defined when continuing");const _=n.sliceStream(N);if(D&&_.push(null),N.previous=o,o&&(o.next=N),o=N,a.defineSkip(N.start),a.write(_),n.parser.lazy[N.start.line]){let S=a.events.length;for(;S--;)if(a.events[S][1].start.offset<i&&(!a.events[S][1].end||a.events[S][1].end.offset>i))return;const v=n.events.length;let $=v,B,b;for(;$--;)if(n.events[$][0]==="exit"&&n.events[$][1].type===p.chunkFlow){if(B){b=n.events[$][1].end;break}B=!0}for(g(b,"could not find previous flow chunk"),T(r),S=v;S<n.events.length;)n.events[S][1].end={...b},S++;K(n.events,$+1,0,n.events.slice(v)),n.events.length=S}}function T(N){let D=t.length;for(;D-- >N;){const _=t[D];n.containerState=_[1],g(_[0].exit,"expected `exit` to be defined on container construct"),_[0].exit.call(n,e)}t.length=N}function E(){g(n.containerState,"expected `containerState` to be defined when closing flow"),g(a,"expected `childFlow` to be defined when closing it"),a.write([u.eof]),o=void 0,a=void 0,n.containerState._closeFlow=void 0}}function Ec(e,n,t){return g(this.parser.constructs.disable.null,"expected `disable.null` to be populated"),U(e,e.attempt(this.parser.constructs.document,n,t),p.linePrefix,this.parser.constructs.disable.null.includes("codeIndented")?void 0:A.tabSize)}const zc={tokenize:Ac};function Ac(e){const n=this,t=e.attempt(et,r,e.attempt(this.parser.constructs.flowInitial,a,U(e,e.attempt(this.parser.constructs.flow,a,e.attempt(ts,a)),p.linePrefix)));return t;function r(o){if(g(o===u.eof||F(o),"expected eol or eof"),o===u.eof){e.consume(o);return}return e.enter(p.lineEndingBlank),e.consume(o),e.exit(p.lineEndingBlank),n.currentConstruct=void 0,t}function a(o){if(g(o===u.eof||F(o),"expected eol or eof"),o===u.eof){e.consume(o);return}return e.enter(p.lineEnding),e.consume(o),e.exit(p.lineEnding),n.currentConstruct=void 0,t}}const Nc={resolveAll:hi()},Fc=fi("string"),Mc=fi("text");function fi(e){return{resolveAll:hi(e==="text"?Pc:void 0),tokenize:n};function n(t){const r=this,a=this.parser.constructs[e],o=t.attempt(a,i,s);return i;function i(f){return c(f)?o(f):s(f)}function s(f){if(f===u.eof){t.consume(f);return}return t.enter(p.data),t.consume(f),l}function l(f){return c(f)?(t.exit(p.data),o(f)):(t.consume(f),l)}function c(f){if(f===u.eof)return!0;const h=a[f];let d=-1;if(h)for(g(Array.isArray(h),"expected `disable.null` to be populated");++d<h.length;){const m=h[d];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function hi(e){return n;function n(t,r){let a=-1,o;for(;++a<=t.length;)o===void 0?t[a]&&t[a][1].type===p.data&&(o=a,a++):(!t[a]||t[a][1].type!==p.data)&&(a!==o+2&&(t[o][1].end=t[a-1][1].end,t.splice(o+2,a-o-2),a=o+2),o=void 0);return e?e(t,r):t}}function Pc(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type===p.lineEnding)&&e[t-1][1].type===p.data){const r=e[t-1][1],a=n.sliceStream(r);let o=a.length,i=-1,s=0,l;for(;o--;){const c=a[o];if(typeof c=="string"){for(i=c.length;c.charCodeAt(i-1)===u.space;)s++,i--;if(i)break;i=-1}else if(c===u.horizontalTab)l=!0,s++;else if(c!==u.virtualSpace){o++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(s=0),s){const c={type:t===e.length||l||s<A.hardBreakPrefixSizeMin?p.lineSuffix:p.hardBreakTrailing,start:{_bufferIndex:o?i:r.start._bufferIndex+i,_index:r.start._index+o,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(t,0,["enter",c,n],["exit",c,n]),t+=2)}t++}return e}const Dc={[u.asterisk]:ne,[u.plusSign]:ne,[u.dash]:ne,[u.digit0]:ne,[u.digit1]:ne,[u.digit2]:ne,[u.digit3]:ne,[u.digit4]:ne,[u.digit5]:ne,[u.digit6]:ne,[u.digit7]:ne,[u.digit8]:ne,[u.digit9]:ne,[u.greaterThan]:Lr},Lc={[u.leftSquareBracket]:os},Bc={[u.horizontalTab]:Tt,[u.virtualSpace]:Tt,[u.space]:Tt},_c={[u.numberSign]:fs,[u.asterisk]:ut,[u.dash]:[Mn,ut],[u.lessThan]:gs,[u.equalsTo]:Mn,[u.underscore]:ut,[u.graveAccent]:Nn,[u.tilde]:Nn},vc={[u.ampersand]:_r,[u.backslash]:Br},Oc={[u.carriageReturn]:It,[u.lineFeed]:It,[u.carriageReturnLineFeed]:It,[u.exclamationMark]:Ls,[u.ampersand]:_r,[u.asterisk]:vt,[u.lessThan]:[vo,Cs],[u.leftSquareBracket]:_s,[u.backslash]:[cs,Br],[u.rightSquareBracket]:Kt,[u.underscore]:vt,[u.graveAccent]:Yo},qc={null:[vt,Nc]},Rc={null:[u.asterisk,u.underscore]},Uc={null:[]},jc=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Rc,contentInitial:Lc,disable:Uc,document:Dc,flow:_c,flowInitial:Bc,insideSpan:qc,string:vc,text:Oc},Symbol.toStringTag,{value:"Module"})),Ie=qi("micromark");function $c(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const a={},o=[];let i=[],s=[],l=!0;const c={attempt:B(v),check:B($),consume:D,enter:_,exit:S,interrupt:B($,{interrupt:!0})},f={code:u.eof,containerState:{},defineSkip:T,events:[],now:I,parser:e,previous:u.eof,sliceSerialize:y,sliceStream:z,write:m};let h=n.tokenize.call(f,c),d;return n.resolveAll&&o.push(n),f;function m(M){return i=J(i,M),E(),i[i.length-1]!==u.eof?[]:(b(n,0),f.events=Ue(o,f.events,f),f.events)}function y(M,L){return Vc(z(M),L)}function z(M){return Hc(i,M)}function I(){const{_bufferIndex:M,_index:L,line:O,column:W,offset:G}=r;return{_bufferIndex:M,_index:L,line:O,column:W,offset:G}}function T(M){a[M.line]=M.column,j(),Ie("position: define skip: `%j`",r)}function E(){let M;for(;r._index<i.length;){const L=i[r._index];if(typeof L=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<L.length;)N(L.charCodeAt(r._bufferIndex));else N(L)}}function N(M){g(l===!0,"expected character to be consumed"),l=void 0,Ie("main: passing `%s` to %s",M,h&&h.name),d=M,g(typeof h=="function","expected state"),h=h(M)}function D(M){g(M===d,"expected given code to equal expected code"),Ie("consume: `%s`",M),g(l===void 0,"expected code to not have been consumed: this might be because `return x(code)` instead of `return x` was used"),g(M===null?f.events.length===0||f.events[f.events.length-1][0]==="exit":f.events[f.events.length-1][0]==="enter","expected last token to be open"),F(M)?(r.line++,r.column=1,r.offset+=M===u.carriageReturnLineFeed?2:1,j(),Ie("position: after eol: `%j`",r)):M!==u.virtualSpace&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=M,l=!0}function _(M,L){const O=L||{};return O.type=M,O.start=I(),g(typeof M=="string","expected string type"),g(M.length>0,"expected non-empty string"),Ie("enter: `%s`",M),f.events.push(["enter",O,f]),s.push(O),O}function S(M){g(typeof M=="string","expected string type"),g(M.length>0,"expected non-empty string");const L=s.pop();return g(L,"cannot close w/o open tokens"),L.end=I(),g(M===L.type,"expected exit token to match current token"),g(!(L.start._index===L.end._index&&L.start._bufferIndex===L.end._bufferIndex),"expected non-empty token (`"+M+"`)"),Ie("exit: `%s`",L.type),f.events.push(["exit",L,f]),L}function v(M,L){b(M,L.from)}function $(M,L){L.restore()}function B(M,L){return O;function O(W,G,oe){let ue,x,se,he;return Array.isArray(W)?re(W):"tokenize"in W?re([W]):k(W);function k(X){return He;function He(me){const Se=me!==null&&X[me],Fe=me!==null&&X.null,kt=[...Array.isArray(Se)?Se:Se?[Se]:[],...Array.isArray(Fe)?Fe:Fe?[Fe]:[]];return re(kt)(me)}}function re(X){return ue=X,x=0,X.length===0?(g(oe,"expected `bogusState` to be given"),oe):we(X[x])}function we(X){return He;function He(me){return he=Q(),se=X,X.partial||(f.currentConstruct=X),g(f.parser.constructs.disable.null,"expected `disable.null` to be populated"),X.name&&f.parser.constructs.disable.null.includes(X.name)?nt(me):X.tokenize.call(L?Object.assign(Object.create(f),L):f,c,xt,nt)(me)}}function xt(X){return g(X===d,"expected code"),l=!0,M(se,he),G}function nt(X){return g(X===d,"expected code"),l=!0,he.restore(),++x<ue.length?we(ue[x]):oe}}}function b(M,L){M.resolveAll&&!o.includes(M)&&o.push(M),M.resolve&&K(f.events,L,f.events.length-L,M.resolve(f.events.slice(L),f)),M.resolveTo&&(f.events=M.resolveTo(f.events,f)),g(M.partial||f.events.length===0||f.events[f.events.length-1][0]==="exit","expected last token to end")}function Q(){const M=I(),L=f.previous,O=f.currentConstruct,W=f.events.length,G=Array.from(s);return{from:W,restore:oe};function oe(){r=M,f.previous=L,f.currentConstruct=O,f.events.length=W,s=G,j(),Ie("position: restore: `%j`",r)}}function j(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function Hc(e,n){const t=n.start._index,r=n.start._bufferIndex,a=n.end._index,o=n.end._bufferIndex;let i;if(t===a)g(o>-1,"expected non-negative end buffer index"),g(r>-1,"expected non-negative start buffer index"),i=[e[t].slice(r,o)];else{if(i=e.slice(t,a),r>-1){const s=i[0];typeof s=="string"?i[0]=s.slice(r):(g(r===0,"expected `startBufferIndex` to be `0`"),i.shift())}o>0&&i.push(e[a].slice(0,o))}return i}function Vc(e,n){let t=-1;const r=[];let a;for(;++t<e.length;){const o=e[t];let i;if(typeof o=="string")i=o;else switch(o){case u.carriageReturn:{i=ce.cr;break}case u.lineFeed:{i=ce.lf;break}case u.carriageReturnLineFeed:{i=ce.cr+ce.lf;break}case u.horizontalTab:{i=n?ce.space:ce.ht;break}case u.virtualSpace:{if(!n&&a)continue;i=ce.space;break}default:g(typeof o=="number","expected number"),i=String.fromCharCode(o)}a=o===u.horizontalTab,r.push(i)}return r.join("")}function Wc(e){const r={constructs:Ir([jc,...(e||{}).extensions||[]]),content:a(Sc),defined:[],document:a(Tc),flow:a(zc),lazy:{},string:a(Fc),text:a(Mc)};return r;function a(o){return i;function i(s){return $c(r,o,s)}}}function Qc(e){for(;!Or(e););return e}const Xn=/[\0\t\n\r]/g;function Gc(){let e=1,n="",t=!0,r;return a;function a(o,i,s){const l=[];let c,f,h,d,m;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(i||void 0).decode(o)),h=0,n="",t&&(o.charCodeAt(0)===u.byteOrderMarker&&h++,t=void 0);h<o.length;){if(Xn.lastIndex=h,c=Xn.exec(o),d=c&&c.index!==void 0?c.index:o.length,m=o.charCodeAt(d),!c){n=o.slice(h);break}if(m===u.lf&&h===d&&r)l.push(u.carriageReturnLineFeed),r=void 0;else switch(r&&(l.push(u.carriageReturn),r=void 0),h<d&&(l.push(o.slice(h,d)),e+=d-h),m){case u.nul:{l.push(u.replacementCharacter),e++;break}case u.ht:{for(f=Math.ceil(e/A.tabSize)*A.tabSize,l.push(u.horizontalTab);e++<f;)l.push(u.virtualSpace);break}case u.lf:{l.push(u.lineFeed),e=1;break}default:r=!0,e=1}h=d+1}return s&&(r&&l.push(u.carriageReturn),n&&l.push(n),l.push(u.eof)),l}}const mi={}.hasOwnProperty;function Xc(e,n,t){return typeof n!="string"&&(t=n,n=void 0),Yc(t)(Qc(Wc(t).document().write(Gc()(e,n,!0))))}function Yc(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(pn),autolinkProtocol:B,autolinkEmail:B,atxHeading:o(ln),blockQuote:o(me),characterEscape:B,characterReference:B,codeFenced:o(Se),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:o(Se,i),codeText:o(Fe,i),codeTextData:B,data:B,codeFlowValue:B,definition:o(kt),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:o(Si),hardBreakEscape:o(un),hardBreakTrailing:o(un),htmlFlow:o(cn,i),htmlFlowData:B,htmlText:o(cn,i),htmlTextData:B,image:o(Ci),label:i,link:o(pn),listItem:o(Ti),listItemValue:d,listOrdered:o(fn,h),listUnordered:o(fn),paragraph:o(Ii),reference:k,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:o(ln),strong:o(Ei),thematicBreak:o(Ai)},exit:{atxHeading:l(),atxHeadingSequence:_,autolink:l(),autolinkEmail:He,autolinkProtocol:X,blockQuote:l(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:we,characterReferenceMarkerNumeric:we,characterReferenceValue:xt,characterReference:nt,codeFenced:l(I),codeFencedFence:z,codeFencedFenceInfo:m,codeFencedFenceMeta:y,codeFlowValue:b,codeIndented:l(T),codeText:l(O),codeTextData:b,data:b,definition:l(),definitionDestinationString:D,definitionLabelString:E,definitionTitleString:N,emphasis:l(),hardBreakEscape:l(j),hardBreakTrailing:l(j),htmlFlow:l(M),htmlFlowData:b,htmlText:l(L),htmlTextData:b,image:l(G),label:ue,labelText:oe,lineEnding:Q,link:l(W),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:re,resourceDestinationString:x,resourceTitleString:se,resource:he,setextHeading:l($),setextHeadingLineSequence:v,setextHeadingText:S,strong:l(),thematicBreak:l()}};di(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(w){let C={type:"root",children:[]};const P={stack:[C],tokenStack:[],config:n,enter:s,exit:c,buffer:i,resume:f,data:t},q=[];let H=-1;for(;++H<w.length;)if(w[H][1].type===p.listOrdered||w[H][1].type===p.listUnordered)if(w[H][0]==="enter")q.push(H);else{const te=q.pop();g(typeof te=="number","expected list ot be open"),H=a(w,te,H)}for(H=-1;++H<w.length;){const te=n[w[H][0]];mi.call(te,w[H][1].type)&&te[w[H][1].type].call(Object.assign({sliceSerialize:w[H][2].sliceSerialize},P),w[H][1])}if(P.tokenStack.length>0){const te=P.tokenStack[P.tokenStack.length-1];(te[1]||Yn).call(P,void 0,te[0])}for(C.position={start:ye(w.length>0?w[0][1].start:{line:1,column:1,offset:0}),end:ye(w.length>0?w[w.length-2][1].end:{line:1,column:1,offset:0})},H=-1;++H<n.transforms.length;)C=n.transforms[H](C)||C;return C}function a(w,C,P){let q=C-1,H=-1,te=!1,Ce,de,Ve,We;for(;++q<=P;){const ie=w[q];switch(ie[1].type){case p.listUnordered:case p.listOrdered:case p.blockQuote:{ie[0]==="enter"?H++:H--,We=void 0;break}case p.lineEndingBlank:{ie[0]==="enter"&&(Ce&&!We&&!H&&!Ve&&(Ve=q),We=void 0);break}case p.linePrefix:case p.listItemValue:case p.listItemMarker:case p.listItemPrefix:case p.listItemPrefixWhitespace:break;default:We=void 0}if(!H&&ie[0]==="enter"&&ie[1].type===p.listItemPrefix||H===-1&&ie[0]==="exit"&&(ie[1].type===p.listUnordered||ie[1].type===p.listOrdered)){if(Ce){let Me=q;for(de=void 0;Me--;){const ge=w[Me];if(ge[1].type===p.lineEnding||ge[1].type===p.lineEndingBlank){if(ge[0]==="exit")continue;de&&(w[de][1].type=p.lineEndingBlank,te=!0),ge[1].type=p.lineEnding,de=Me}else if(!(ge[1].type===p.linePrefix||ge[1].type===p.blockQuotePrefix||ge[1].type===p.blockQuotePrefixWhitespace||ge[1].type===p.blockQuoteMarker||ge[1].type===p.listItemIndent))break}Ve&&(!de||Ve<de)&&(Ce._spread=!0),Ce.end=Object.assign({},de?w[de][1].start:ie[1].end),w.splice(de||q,0,["exit",Ce,ie[2]]),q++,P++}if(ie[1].type===p.listItemPrefix){const Me={type:"listItem",_spread:!1,start:Object.assign({},ie[1].start),end:void 0};Ce=Me,w.splice(q,0,["enter",Me,ie[2]]),q++,P++,Ve=void 0,We=!0}}}return w[C][1]._spread=te,P}function o(w,C){return P;function P(q){s.call(this,w(q),q),C&&C.call(this,q)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(w,C,P){const q=this.stack[this.stack.length-1];g(q,"expected `parent`"),g("children"in q,"expected `parent`"),q.children.push(w),this.stack.push(w),this.tokenStack.push([C,P||void 0]),w.position={start:ye(C.start),end:void 0}}function l(w){return C;function C(P){w&&w.call(this,P),c.call(this,P)}}function c(w,C){const P=this.stack.pop();g(P,"expected `node`");const q=this.tokenStack.pop();if(q)q[0].type!==w.type&&(C?C.call(this,w,q[0]):(q[1]||Yn).call(this,w,q[0]));else throw new Error("Cannot close `"+w.type+"` ("+lt({start:w.start,end:w.end})+"): it’s not open");g(P.type!=="fragment","unexpected fragment `exit`ed"),g(P.position,"expected `position` to be defined"),P.position.end=ye(w.end)}function f(){return Xt(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function d(w){if(this.data.expectingFirstListItemValue){const C=this.stack[this.stack.length-2];g(C,"expected nodes on stack"),g(C.type==="list","expected list on stack"),C.start=Number.parseInt(this.sliceSerialize(w),A.numericBaseDecimal),this.data.expectingFirstListItemValue=void 0}}function m(){const w=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="code","expected code on stack"),C.lang=w}function y(){const w=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="code","expected code on stack"),C.meta=w}function z(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function I(){const w=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="code","expected code on stack"),C.value=w.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const w=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="code","expected code on stack"),C.value=w.replace(/(\r?\n|\r)$/g,"")}function E(w){const C=this.resume(),P=this.stack[this.stack.length-1];g(P,"expected node on stack"),g(P.type==="definition","expected definition on stack"),P.label=C,P.identifier=le(this.sliceSerialize(w)).toLowerCase()}function N(){const w=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="definition","expected definition on stack"),C.title=w}function D(){const w=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="definition","expected definition on stack"),C.url=w}function _(w){const C=this.stack[this.stack.length-1];if(g(C,"expected node on stack"),g(C.type==="heading","expected heading on stack"),!C.depth){const P=this.sliceSerialize(w).length;g(P===1||P===2||P===3||P===4||P===5||P===6,"expected `depth` between `1` and `6`"),C.depth=P}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function v(w){const C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="heading","expected heading on stack"),C.depth=this.sliceSerialize(w).codePointAt(0)===u.equalsTo?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function B(w){const C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g("children"in C,"expected parent on stack");const P=C.children;let q=P[P.length-1];(!q||q.type!=="text")&&(q=zi(),q.position={start:ye(w.start),end:void 0},P.push(q)),this.stack.push(q)}function b(w){const C=this.stack.pop();g(C,"expected a `node` to be on the stack"),g("value"in C,"expected a `literal` to be on the stack"),g(C.position,"expected `node` to have an open position"),C.value+=this.sliceSerialize(w),C.position.end=ye(w.end)}function Q(w){const C=this.stack[this.stack.length-1];if(g(C,"expected `node`"),this.data.atHardBreak){g("children"in C,"expected `parent`");const P=C.children[C.children.length-1];g(P.position,"expected tail to have a starting position"),P.position.end=ye(w.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(C.type)&&(B.call(this,w),b.call(this,w))}function j(){this.data.atHardBreak=!0}function M(){const w=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="html","expected html on stack"),C.value=w}function L(){const w=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="html","expected html on stack"),C.value=w}function O(){const w=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="inlineCode","expected inline code on stack"),C.value=w}function W(){const w=this.stack[this.stack.length-1];if(g(w,"expected node on stack"),g(w.type==="link","expected link on stack"),this.data.inReference){const C=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=C,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function G(){const w=this.stack[this.stack.length-1];if(g(w,"expected node on stack"),g(w.type==="image","expected image on stack"),this.data.inReference){const C=this.data.referenceType||"shortcut";w.type+="Reference",w.referenceType=C,delete w.url,delete w.title}else delete w.identifier,delete w.label;this.data.referenceType=void 0}function oe(w){const C=this.sliceSerialize(w),P=this.stack[this.stack.length-2];g(P,"expected ancestor on stack"),g(P.type==="image"||P.type==="link","expected image or link on stack"),P.label=oo(C),P.identifier=le(C).toLowerCase()}function ue(){const w=this.stack[this.stack.length-1];g(w,"expected node on stack"),g(w.type==="fragment","expected fragment on stack");const C=this.resume(),P=this.stack[this.stack.length-1];if(g(P,"expected node on stack"),g(P.type==="image"||P.type==="link","expected image or link on stack"),this.data.inReference=!0,P.type==="link"){const q=w.children;P.children=q}else P.alt=C}function x(){const w=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="image"||C.type==="link","expected image or link on stack"),C.url=w}function se(){const w=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="image"||C.type==="link","expected image or link on stack"),C.title=w}function he(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function re(w){const C=this.resume(),P=this.stack[this.stack.length-1];g(P,"expected node on stack"),g(P.type==="image"||P.type==="link","expected image reference or link reference on stack"),P.label=C,P.identifier=le(this.sliceSerialize(w)).toLowerCase(),this.data.referenceType="full"}function we(w){g(w.type==="characterReferenceMarkerNumeric"||w.type==="characterReferenceMarkerHexadecimal"),this.data.characterReferenceType=w.type}function xt(w){const C=this.sliceSerialize(w),P=this.data.characterReferenceType;let q;if(P)q=Tr(C,P===p.characterReferenceMarkerNumeric?A.numericBaseDecimal:A.numericBaseHexadecimal),this.data.characterReferenceType=void 0;else{const te=jt(C);g(te!==!1,"expected reference to decode"),q=te}const H=this.stack[this.stack.length-1];g(H,"expected `node`"),g("value"in H,"expected `node.value`"),H.value+=q}function nt(w){const C=this.stack.pop();g(C,"expected `node`"),g(C.position,"expected `node.position`"),C.position.end=ye(w.end)}function X(w){b.call(this,w);const C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="link","expected link on stack"),C.url=this.sliceSerialize(w)}function He(w){b.call(this,w);const C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="link","expected link on stack"),C.url="mailto:"+this.sliceSerialize(w)}function me(){return{type:"blockquote",children:[]}}function Se(){return{type:"code",lang:null,meta:null,value:""}}function Fe(){return{type:"inlineCode",value:""}}function kt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Si(){return{type:"emphasis",children:[]}}function ln(){return{type:"heading",depth:0,children:[]}}function un(){return{type:"break"}}function cn(){return{type:"html",value:""}}function Ci(){return{type:"image",title:null,url:"",alt:null}}function pn(){return{type:"link",title:null,url:"",children:[]}}function fn(w){return{type:"list",ordered:w.type==="listOrdered",start:null,spread:w._spread,children:[]}}function Ti(w){return{type:"listItem",spread:w._spread,checked:null,children:[]}}function Ii(){return{type:"paragraph",children:[]}}function Ei(){return{type:"strong",children:[]}}function zi(){return{type:"text",value:""}}function Ai(){return{type:"thematicBreak"}}}function ye(e){return{line:e.line,column:e.column,offset:e.offset}}function di(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?di(e,r):Jc(e,r)}}function Jc(e,n){let t;for(t in n)if(mi.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function Yn(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+lt({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+lt({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+lt({start:n.start,end:n.end})+") is still open")}function Df(e){const n=this;n.parser=t;function t(r){return Xc(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Kc(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function Zc(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
|
|
22
|
+
`)),m+=f.move(h),d(),m}function r(o,i,s){let l=o.value||"",c=1;for(n||c++;new RegExp("(^|[^$])"+"\\$".repeat(c)+"([^$]|$)").test(l);)c++;const f="$".repeat(c);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let h=-1;for(;++h<s.unsafe.length;){const d=s.unsafe[h];if(!d.atBreak)continue;const m=s.compilePattern(d);let y;for(;y=m.exec(l);){let z=y.index;l.codePointAt(z)===10&&l.codePointAt(z-1)===13&&z--,l=l.slice(0,z)+" "+l.slice(y.index+1)}}return f+l+f}function a(){return"$"}}const Xu={tokenize:Ju,concrete:!0,name:"mathFlow"},Vn={tokenize:Yu,partial:!0};function Ju(e,n,t){const r=this,a=r.events[r.events.length-1],o=a&&a[1].type===p.linePrefix?a[2].sliceSerialize(a[1],!0).length:0;let i=0;return s;function s(E){return g(E===u.dollarSign,"expected `$`"),e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),l(E)}function l(E){return E===u.dollarSign?(e.consume(E),i++,l):i<2?t(E):(e.exit("mathFlowFenceSequence"),U(e,c,p.whitespace)(E))}function c(E){return E===u.eof||F(E)?h(E):(e.enter("mathFlowFenceMeta"),e.enter(p.chunkString,{contentType:A.contentTypeString}),f(E))}function f(E){return E===u.eof||F(E)?(e.exit(p.chunkString),e.exit("mathFlowFenceMeta"),h(E)):E===u.dollarSign?t(E):(e.consume(E),f)}function h(E){return e.exit("mathFlowFence"),r.interrupt?n(E):e.attempt(Vn,d,I)(E)}function d(E){return e.attempt({tokenize:T,partial:!0},I,m)(E)}function m(E){return(o?U(e,y,p.linePrefix,o+1):y)(E)}function y(E){return E===u.eof?I(E):F(E)?e.attempt(Vn,d,I)(E):(e.enter("mathFlowValue"),z(E))}function z(E){return E===u.eof||F(E)?(e.exit("mathFlowValue"),y(E)):(e.consume(E),z)}function I(E){return e.exit("mathFlow"),n(E)}function T(E,N,D){let _=0;return g(r.parser.constructs.disable.null,"expected `disable.null`"),U(E,w,p.linePrefix,r.parser.constructs.disable.null.includes("codeIndented")?void 0:A.tabSize);function w(B){return E.enter("mathFlowFence"),E.enter("mathFlowFenceSequence"),v(B)}function v(B){return B===u.dollarSign?(_++,E.consume(B),v):_<i?D(B):(E.exit("mathFlowFenceSequence"),U(E,H,p.whitespace)(B))}function H(B){return B===u.eof||F(B)?(E.exit("mathFlowFence"),N(B)):D(B)}}}function Yu(e,n,t){const r=this;return a;function a(i){return i===null?n(i):(g(F(i),"expected eol"),e.enter(p.lineEnding),e.consume(i),e.exit(p.lineEnding),o)}function o(i){return r.parser.lazy[r.now().line]?t(i):n(i)}}function Ku(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),{tokenize:r,resolve:Zu,previous:Wn,name:"mathText"};function r(a,o,i){const s=this;let l=0,c,f;return h;function h(I){return g(I===u.dollarSign,"expected `$`"),g(Wn.call(s,s.previous),"expected correct previous"),a.enter("mathText"),a.enter("mathTextSequence"),d(I)}function d(I){return I===u.dollarSign?(a.consume(I),l++,d):l<2&&!t?i(I):(a.exit("mathTextSequence"),m(I))}function m(I){return I===u.eof?i(I):I===u.dollarSign?(f=a.enter("mathTextSequence"),c=0,z(I)):I===u.space?(a.enter("space"),a.consume(I),a.exit("space"),m):F(I)?(a.enter(p.lineEnding),a.consume(I),a.exit(p.lineEnding),m):(a.enter("mathTextData"),y(I))}function y(I){return I===u.eof||I===u.space||I===u.dollarSign||F(I)?(a.exit("mathTextData"),m(I)):(a.consume(I),y)}function z(I){return I===u.dollarSign?(a.consume(I),c++,z):c===l?(a.exit("mathTextSequence"),a.exit("mathText"),o(I)):(f.type="mathTextData",y(I))}}}function Zu(e){let n=e.length-4,t=3,r,a;if((e[t][1].type===p.lineEnding||e[t][1].type==="space")&&(e[n][1].type===p.lineEnding||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="mathTextData"){e[n][1].type="mathTextPadding",e[t][1].type="mathTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)a===void 0?r!==n&&e[r][1].type!==p.lineEnding&&(a=r):(r===n||e[r][1].type===p.lineEnding)&&(e[a][1].type="mathTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),n-=r-a-2,r=a+2),a=void 0);return e}function Wn(e){return e!==u.dollarSign||this.events[this.events.length-1][1].type===p.characterEscape}function ec(e){return{flow:{[u.dollarSign]:Xu},text:{[u.dollarSign]:Ku(e)}}}const tc={};function Mf(e){const n=this,t=e||tc,r=n.data(),a=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),i=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);a.push(ec(t)),o.push(Qu()),i.push(Gu(t))}const nc=/[ \t\n\f\r]/g;function gt(e){return typeof e=="object"?e.type==="text"?Qn(e.value):!1:Qn(e)}function Qn(e){return e.replace(nc,"")===""}const nn={}.hasOwnProperty,rc=new Map,ic=/[A-Z]/g,ac=new Set(["table","tbody","thead","tfoot","tr"]),oc=new Set(["td","th"]),li="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Pf(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=mc(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=hc(t,n.jsx,n.jsxs)}const a={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?pe:qe,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},o=ui(a,e,void 0);return o&&typeof o!="string"?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function ui(e,n,t){if(n.type==="element")return sc(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return lc(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return cc(e,n,t);if(n.type==="mdxjsEsm")return uc(e,n);if(n.type==="root")return pc(e,n,t);if(n.type==="text")return fc(e,n)}function sc(e,n,t){const r=e.schema;let a=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=pe,e.schema=a),e.ancestors.push(n);const o=pi(e,n.tagName,!1),i=dc(e,n);let s=an(e,n);return ac.has(n.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!gt(l):!0})),ci(e,i,o,n),rn(i,s),e.ancestors.pop(),e.schema=r,e.create(n,o,i,t)}function lc(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return g(r.type==="ExpressionStatement"),e.evaluater.evaluateExpression(r.expression)}Ye(e,n.position)}function uc(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Ye(e,n.position)}function cc(e,n,t){const r=e.schema;let a=r;n.name==="svg"&&r.space==="html"&&(a=pe,e.schema=a),e.ancestors.push(n);const o=n.name===null?e.Fragment:pi(e,n.name,!0),i=gc(e,n),s=an(e,n);return ci(e,i,o,n),rn(i,s),e.ancestors.pop(),e.schema=r,e.create(n,o,i,t)}function pc(e,n,t){const r={};return rn(r,an(e,n)),e.create(n,e.Fragment,r,t)}function fc(e,n){return n.value}function ci(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function rn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function hc(e,n,t){return r;function r(a,o,i,s){const c=Array.isArray(i.children)?t:n;return s?c(o,i,s):c(o,i)}}function mc(e,n){return t;function t(r,a,o,i){const s=Array.isArray(o.children),l=xe(r);return n(a,o,i,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function dc(e,n){const t={};let r,a;for(a in n.properties)if(a!=="children"&&nn.call(n.properties,a)){const o=xc(e,a,n.properties[a]);if(o){const[i,s]=o;e.tableCellAlignToStyle&&i==="align"&&typeof s=="string"&&oc.has(n.tagName)?r=s:t[i]=s}}if(r){const o=t.style||(t.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function gc(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];g(o.type==="ExpressionStatement");const i=o.expression;g(i.type==="ObjectExpression");const s=i.properties[0];g(s.type==="SpreadElement"),Object.assign(t,e.evaluater.evaluateExpression(s.argument))}else Ye(e,n.position);else{const a=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];g(s.type==="ExpressionStatement"),o=e.evaluater.evaluateExpression(s.expression)}else Ye(e,n.position);else o=r.value===null?!0:r.value;t[a]=o}return t}function an(e,n){const t=[];let r=-1;const a=e.passKeys?new Map:rc;for(;++r<n.children.length;){const o=n.children[r];let i;if(e.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const c=a.get(l)||0;i=l+"-"+c,a.set(l,c+1)}}const s=ui(e,o,i);s!==void 0&&t.push(s)}return t}function xc(e,n,t){const r=Ke(e.schema,n);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?Vt(t):Wt(t)),r.property==="style"){let a=typeof t=="object"?t:kc(e,String(t));return e.stylePropertyNameCase==="css"&&(a=yc(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?vi[r.property]||r.property:r.attribute,t]}}function kc(e,n){try{return Oi(n,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const r=t,a=new Ht("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=li+"#cannot-parse-style-attribute",a}}function pi(e,n,t){let r;if(!t)r={type:"Literal",value:n};else if(n.includes(".")){const a=n.split(".");let o=-1,i;for(;++o<a.length;){const s=kn(a[o])?{type:"Identifier",name:a[o]}:{type:"Literal",value:a[o]};i=i?{type:"MemberExpression",object:i,property:s,computed:!!(o&&s.type==="Literal"),optional:!1}:s}g(i,"always a result"),r=i}else r=kn(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(r.type==="Literal"){const a=r.value;return nn.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ye(e)}function Ye(e,n){const t=new Ht("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=e.filePath||void 0,t.url=li+"#cannot-handle-mdx-estrees-without-createevaluater",t}function yc(e){const n={};let t;for(t in e)nn.call(e,t)&&(n[bc(t)]=e[t]);return n}function bc(e){let n=e.replace(ic,Sc);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function Sc(e){return"-"+e.toLowerCase()}const wc={tokenize:Cc};function Cc(e){const n=e.attempt(this.parser.constructs.contentInitial,r,a);let t;return n;function r(s){if(g(s===u.eof||F(s),"expected eol or eof"),s===u.eof){e.consume(s);return}return e.enter(p.lineEnding),e.consume(s),e.exit(p.lineEnding),U(e,n,p.linePrefix)}function a(s){return g(s!==u.eof&&!F(s),"expected anything other than a line ending or EOF"),e.enter(p.paragraph),o(s)}function o(s){const l=e.enter(p.chunkText,{contentType:A.contentTypeText,previous:t});return t&&(t.next=l),t=l,i(s)}function i(s){if(s===u.eof){e.exit(p.chunkText),e.exit(p.paragraph),e.consume(s);return}return F(s)?(e.consume(s),e.exit(p.chunkText),o):(e.consume(s),i)}}const Tc={tokenize:Ic},Gn={tokenize:Ec};function Ic(e){const n=this,t=[];let r=0,a,o,i;return s;function s(N){if(r<t.length){const D=t[r];return n.containerState=D[1],g(D[0].continuation,"expected `continuation` to be defined on container construct"),e.attempt(D[0].continuation,l,c)(N)}return c(N)}function l(N){if(g(n.containerState,"expected `containerState` to be defined after continuation"),r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,a&&E();const D=n.events.length;let _=D,w;for(;_--;)if(n.events[_][0]==="exit"&&n.events[_][1].type===p.chunkFlow){w=n.events[_][1].end;break}g(w,"could not find previous flow chunk"),T(r);let v=D;for(;v<n.events.length;)n.events[v][1].end={...w},v++;return K(n.events,_+1,0,n.events.slice(D)),n.events.length=v,c(N)}return s(N)}function c(N){if(r===t.length){if(!a)return d(N);if(a.currentConstruct&&a.currentConstruct.concrete)return y(N);n.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Gn,f,h)(N)}function f(N){return a&&E(),T(r),d(N)}function h(N){return n.parser.lazy[n.now().line]=r!==t.length,i=n.now().offset,y(N)}function d(N){return n.containerState={},e.attempt(Gn,m,y)(N)}function m(N){return g(n.currentConstruct,"expected `currentConstruct` to be defined on tokenizer"),g(n.containerState,"expected `containerState` to be defined on tokenizer"),r++,t.push([n.currentConstruct,n.containerState]),d(N)}function y(N){if(N===u.eof){a&&E(),T(0),e.consume(N);return}return a=a||n.parser.flow(n.now()),e.enter(p.chunkFlow,{_tokenizer:a,contentType:A.contentTypeFlow,previous:o}),z(N)}function z(N){if(N===u.eof){I(e.exit(p.chunkFlow),!0),T(0),e.consume(N);return}return F(N)?(e.consume(N),I(e.exit(p.chunkFlow)),r=0,n.interrupt=void 0,s):(e.consume(N),z)}function I(N,D){g(a,"expected `childFlow` to be defined when continuing");const _=n.sliceStream(N);if(D&&_.push(null),N.previous=o,o&&(o.next=N),o=N,a.defineSkip(N.start),a.write(_),n.parser.lazy[N.start.line]){let w=a.events.length;for(;w--;)if(a.events[w][1].start.offset<i&&(!a.events[w][1].end||a.events[w][1].end.offset>i))return;const v=n.events.length;let H=v,B,b;for(;H--;)if(n.events[H][0]==="exit"&&n.events[H][1].type===p.chunkFlow){if(B){b=n.events[H][1].end;break}B=!0}for(g(b,"could not find previous flow chunk"),T(r),w=v;w<n.events.length;)n.events[w][1].end={...b},w++;K(n.events,H+1,0,n.events.slice(v)),n.events.length=w}}function T(N){let D=t.length;for(;D-- >N;){const _=t[D];n.containerState=_[1],g(_[0].exit,"expected `exit` to be defined on container construct"),_[0].exit.call(n,e)}t.length=N}function E(){g(n.containerState,"expected `containerState` to be defined when closing flow"),g(a,"expected `childFlow` to be defined when closing it"),a.write([u.eof]),o=void 0,a=void 0,n.containerState._closeFlow=void 0}}function Ec(e,n,t){return g(this.parser.constructs.disable.null,"expected `disable.null` to be populated"),U(e,e.attempt(this.parser.constructs.document,n,t),p.linePrefix,this.parser.constructs.disable.null.includes("codeIndented")?void 0:A.tabSize)}const zc={tokenize:Ac};function Ac(e){const n=this,t=e.attempt(et,r,e.attempt(this.parser.constructs.flowInitial,a,U(e,e.attempt(this.parser.constructs.flow,a,e.attempt(ts,a)),p.linePrefix)));return t;function r(o){if(g(o===u.eof||F(o),"expected eol or eof"),o===u.eof){e.consume(o);return}return e.enter(p.lineEndingBlank),e.consume(o),e.exit(p.lineEndingBlank),n.currentConstruct=void 0,t}function a(o){if(g(o===u.eof||F(o),"expected eol or eof"),o===u.eof){e.consume(o);return}return e.enter(p.lineEnding),e.consume(o),e.exit(p.lineEnding),n.currentConstruct=void 0,t}}const Nc={resolveAll:hi()},Fc=fi("string"),Mc=fi("text");function fi(e){return{resolveAll:hi(e==="text"?Pc:void 0),tokenize:n};function n(t){const r=this,a=this.parser.constructs[e],o=t.attempt(a,i,s);return i;function i(f){return c(f)?o(f):s(f)}function s(f){if(f===u.eof){t.consume(f);return}return t.enter(p.data),t.consume(f),l}function l(f){return c(f)?(t.exit(p.data),o(f)):(t.consume(f),l)}function c(f){if(f===u.eof)return!0;const h=a[f];let d=-1;if(h)for(g(Array.isArray(h),"expected `disable.null` to be populated");++d<h.length;){const m=h[d];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function hi(e){return n;function n(t,r){let a=-1,o;for(;++a<=t.length;)o===void 0?t[a]&&t[a][1].type===p.data&&(o=a,a++):(!t[a]||t[a][1].type!==p.data)&&(a!==o+2&&(t[o][1].end=t[a-1][1].end,t.splice(o+2,a-o-2),a=o+2),o=void 0);return e?e(t,r):t}}function Pc(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type===p.lineEnding)&&e[t-1][1].type===p.data){const r=e[t-1][1],a=n.sliceStream(r);let o=a.length,i=-1,s=0,l;for(;o--;){const c=a[o];if(typeof c=="string"){for(i=c.length;c.charCodeAt(i-1)===u.space;)s++,i--;if(i)break;i=-1}else if(c===u.horizontalTab)l=!0,s++;else if(c!==u.virtualSpace){o++;break}}if(n._contentTypeTextTrailing&&t===e.length&&(s=0),s){const c={type:t===e.length||l||s<A.hardBreakPrefixSizeMin?p.lineSuffix:p.hardBreakTrailing,start:{_bufferIndex:o?i:r.start._bufferIndex+i,_index:r.start._index+o,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(t,0,["enter",c,n],["exit",c,n]),t+=2)}t++}return e}const Dc={[u.asterisk]:ne,[u.plusSign]:ne,[u.dash]:ne,[u.digit0]:ne,[u.digit1]:ne,[u.digit2]:ne,[u.digit3]:ne,[u.digit4]:ne,[u.digit5]:ne,[u.digit6]:ne,[u.digit7]:ne,[u.digit8]:ne,[u.digit9]:ne,[u.greaterThan]:Lr},Lc={[u.leftSquareBracket]:os},Bc={[u.horizontalTab]:Tt,[u.virtualSpace]:Tt,[u.space]:Tt},_c={[u.numberSign]:fs,[u.asterisk]:ut,[u.dash]:[Mn,ut],[u.lessThan]:gs,[u.equalsTo]:Mn,[u.underscore]:ut,[u.graveAccent]:Nn,[u.tilde]:Nn},vc={[u.ampersand]:_r,[u.backslash]:Br},Oc={[u.carriageReturn]:It,[u.lineFeed]:It,[u.carriageReturnLineFeed]:It,[u.exclamationMark]:Ls,[u.ampersand]:_r,[u.asterisk]:vt,[u.lessThan]:[vo,Cs],[u.leftSquareBracket]:_s,[u.backslash]:[cs,Br],[u.rightSquareBracket]:Kt,[u.underscore]:vt,[u.graveAccent]:Jo},qc={null:[vt,Nc]},Rc={null:[u.asterisk,u.underscore]},Uc={null:[]},jc=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Rc,contentInitial:Lc,disable:Uc,document:Dc,flow:_c,flowInitial:Bc,insideSpan:qc,string:vc,text:Oc},Symbol.toStringTag,{value:"Module"})),Ie=qi("micromark");function Hc(e,n,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const a={},o=[];let i=[],s=[],l=!0;const c={attempt:B(v),check:B(H),consume:D,enter:_,exit:w,interrupt:B(H,{interrupt:!0})},f={code:u.eof,containerState:{},defineSkip:T,events:[],now:I,parser:e,previous:u.eof,sliceSerialize:y,sliceStream:z,write:m};let h=n.tokenize.call(f,c),d;return n.resolveAll&&o.push(n),f;function m(M){return i=Y(i,M),E(),i[i.length-1]!==u.eof?[]:(b(n,0),f.events=Ue(o,f.events,f),f.events)}function y(M,L){return Vc(z(M),L)}function z(M){return $c(i,M)}function I(){const{_bufferIndex:M,_index:L,line:O,column:W,offset:G}=r;return{_bufferIndex:M,_index:L,line:O,column:W,offset:G}}function T(M){a[M.line]=M.column,j(),Ie("position: define skip: `%j`",r)}function E(){let M;for(;r._index<i.length;){const L=i[r._index];if(typeof L=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<L.length;)N(L.charCodeAt(r._bufferIndex));else N(L)}}function N(M){g(l===!0,"expected character to be consumed"),l=void 0,Ie("main: passing `%s` to %s",M,h&&h.name),d=M,g(typeof h=="function","expected state"),h=h(M)}function D(M){g(M===d,"expected given code to equal expected code"),Ie("consume: `%s`",M),g(l===void 0,"expected code to not have been consumed: this might be because `return x(code)` instead of `return x` was used"),g(M===null?f.events.length===0||f.events[f.events.length-1][0]==="exit":f.events[f.events.length-1][0]==="enter","expected last token to be open"),F(M)?(r.line++,r.column=1,r.offset+=M===u.carriageReturnLineFeed?2:1,j(),Ie("position: after eol: `%j`",r)):M!==u.virtualSpace&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===i[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=M,l=!0}function _(M,L){const O=L||{};return O.type=M,O.start=I(),g(typeof M=="string","expected string type"),g(M.length>0,"expected non-empty string"),Ie("enter: `%s`",M),f.events.push(["enter",O,f]),s.push(O),O}function w(M){g(typeof M=="string","expected string type"),g(M.length>0,"expected non-empty string");const L=s.pop();return g(L,"cannot close w/o open tokens"),L.end=I(),g(M===L.type,"expected exit token to match current token"),g(!(L.start._index===L.end._index&&L.start._bufferIndex===L.end._bufferIndex),"expected non-empty token (`"+M+"`)"),Ie("exit: `%s`",L.type),f.events.push(["exit",L,f]),L}function v(M,L){b(M,L.from)}function H(M,L){L.restore()}function B(M,L){return O;function O(W,G,oe){let ue,x,se,he;return Array.isArray(W)?re(W):"tokenize"in W?re([W]):k(W);function k(X){return $e;function $e(me){const we=me!==null&&X[me],Fe=me!==null&&X.null,kt=[...Array.isArray(we)?we:we?[we]:[],...Array.isArray(Fe)?Fe:Fe?[Fe]:[]];return re(kt)(me)}}function re(X){return ue=X,x=0,X.length===0?(g(oe,"expected `bogusState` to be given"),oe):Se(X[x])}function Se(X){return $e;function $e(me){return he=Q(),se=X,X.partial||(f.currentConstruct=X),g(f.parser.constructs.disable.null,"expected `disable.null` to be populated"),X.name&&f.parser.constructs.disable.null.includes(X.name)?nt(me):X.tokenize.call(L?Object.assign(Object.create(f),L):f,c,xt,nt)(me)}}function xt(X){return g(X===d,"expected code"),l=!0,M(se,he),G}function nt(X){return g(X===d,"expected code"),l=!0,he.restore(),++x<ue.length?Se(ue[x]):oe}}}function b(M,L){M.resolveAll&&!o.includes(M)&&o.push(M),M.resolve&&K(f.events,L,f.events.length-L,M.resolve(f.events.slice(L),f)),M.resolveTo&&(f.events=M.resolveTo(f.events,f)),g(M.partial||f.events.length===0||f.events[f.events.length-1][0]==="exit","expected last token to end")}function Q(){const M=I(),L=f.previous,O=f.currentConstruct,W=f.events.length,G=Array.from(s);return{from:W,restore:oe};function oe(){r=M,f.previous=L,f.currentConstruct=O,f.events.length=W,s=G,j(),Ie("position: restore: `%j`",r)}}function j(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function $c(e,n){const t=n.start._index,r=n.start._bufferIndex,a=n.end._index,o=n.end._bufferIndex;let i;if(t===a)g(o>-1,"expected non-negative end buffer index"),g(r>-1,"expected non-negative start buffer index"),i=[e[t].slice(r,o)];else{if(i=e.slice(t,a),r>-1){const s=i[0];typeof s=="string"?i[0]=s.slice(r):(g(r===0,"expected `startBufferIndex` to be `0`"),i.shift())}o>0&&i.push(e[a].slice(0,o))}return i}function Vc(e,n){let t=-1;const r=[];let a;for(;++t<e.length;){const o=e[t];let i;if(typeof o=="string")i=o;else switch(o){case u.carriageReturn:{i=ce.cr;break}case u.lineFeed:{i=ce.lf;break}case u.carriageReturnLineFeed:{i=ce.cr+ce.lf;break}case u.horizontalTab:{i=n?ce.space:ce.ht;break}case u.virtualSpace:{if(!n&&a)continue;i=ce.space;break}default:g(typeof o=="number","expected number"),i=String.fromCharCode(o)}a=o===u.horizontalTab,r.push(i)}return r.join("")}function Wc(e){const r={constructs:Ir([jc,...(e||{}).extensions||[]]),content:a(wc),defined:[],document:a(Tc),flow:a(zc),lazy:{},string:a(Fc),text:a(Mc)};return r;function a(o){return i;function i(s){return Hc(r,o,s)}}}function Qc(e){for(;!Or(e););return e}const Xn=/[\0\t\n\r]/g;function Gc(){let e=1,n="",t=!0,r;return a;function a(o,i,s){const l=[];let c,f,h,d,m;for(o=n+(typeof o=="string"?o.toString():new TextDecoder(i||void 0).decode(o)),h=0,n="",t&&(o.charCodeAt(0)===u.byteOrderMarker&&h++,t=void 0);h<o.length;){if(Xn.lastIndex=h,c=Xn.exec(o),d=c&&c.index!==void 0?c.index:o.length,m=o.charCodeAt(d),!c){n=o.slice(h);break}if(m===u.lf&&h===d&&r)l.push(u.carriageReturnLineFeed),r=void 0;else switch(r&&(l.push(u.carriageReturn),r=void 0),h<d&&(l.push(o.slice(h,d)),e+=d-h),m){case u.nul:{l.push(u.replacementCharacter),e++;break}case u.ht:{for(f=Math.ceil(e/A.tabSize)*A.tabSize,l.push(u.horizontalTab);e++<f;)l.push(u.virtualSpace);break}case u.lf:{l.push(u.lineFeed),e=1;break}default:r=!0,e=1}h=d+1}return s&&(r&&l.push(u.carriageReturn),n&&l.push(n),l.push(u.eof)),l}}const mi={}.hasOwnProperty;function Xc(e,n,t){return typeof n!="string"&&(t=n,n=void 0),Jc(t)(Qc(Wc(t).document().write(Gc()(e,n,!0))))}function Jc(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(pn),autolinkProtocol:B,autolinkEmail:B,atxHeading:o(ln),blockQuote:o(me),characterEscape:B,characterReference:B,codeFenced:o(we),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:o(we,i),codeText:o(Fe,i),codeTextData:B,data:B,codeFlowValue:B,definition:o(kt),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:o(wi),hardBreakEscape:o(un),hardBreakTrailing:o(un),htmlFlow:o(cn,i),htmlFlowData:B,htmlText:o(cn,i),htmlTextData:B,image:o(Ci),label:i,link:o(pn),listItem:o(Ti),listItemValue:d,listOrdered:o(fn,h),listUnordered:o(fn),paragraph:o(Ii),reference:k,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:o(ln),strong:o(Ei),thematicBreak:o(Ai)},exit:{atxHeading:l(),atxHeadingSequence:_,autolink:l(),autolinkEmail:$e,autolinkProtocol:X,blockQuote:l(),characterEscapeValue:b,characterReferenceMarkerHexadecimal:Se,characterReferenceMarkerNumeric:Se,characterReferenceValue:xt,characterReference:nt,codeFenced:l(I),codeFencedFence:z,codeFencedFenceInfo:m,codeFencedFenceMeta:y,codeFlowValue:b,codeIndented:l(T),codeText:l(O),codeTextData:b,data:b,definition:l(),definitionDestinationString:D,definitionLabelString:E,definitionTitleString:N,emphasis:l(),hardBreakEscape:l(j),hardBreakTrailing:l(j),htmlFlow:l(M),htmlFlowData:b,htmlText:l(L),htmlTextData:b,image:l(G),label:ue,labelText:oe,lineEnding:Q,link:l(W),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:re,resourceDestinationString:x,resourceTitleString:se,resource:he,setextHeading:l(H),setextHeadingLineSequence:v,setextHeadingText:w,strong:l(),thematicBreak:l()}};di(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(S){let C={type:"root",children:[]};const P={stack:[C],tokenStack:[],config:n,enter:s,exit:c,buffer:i,resume:f,data:t},q=[];let $=-1;for(;++$<S.length;)if(S[$][1].type===p.listOrdered||S[$][1].type===p.listUnordered)if(S[$][0]==="enter")q.push($);else{const te=q.pop();g(typeof te=="number","expected list ot be open"),$=a(S,te,$)}for($=-1;++$<S.length;){const te=n[S[$][0]];mi.call(te,S[$][1].type)&&te[S[$][1].type].call(Object.assign({sliceSerialize:S[$][2].sliceSerialize},P),S[$][1])}if(P.tokenStack.length>0){const te=P.tokenStack[P.tokenStack.length-1];(te[1]||Jn).call(P,void 0,te[0])}for(C.position={start:ye(S.length>0?S[0][1].start:{line:1,column:1,offset:0}),end:ye(S.length>0?S[S.length-2][1].end:{line:1,column:1,offset:0})},$=-1;++$<n.transforms.length;)C=n.transforms[$](C)||C;return C}function a(S,C,P){let q=C-1,$=-1,te=!1,Ce,de,Ve,We;for(;++q<=P;){const ie=S[q];switch(ie[1].type){case p.listUnordered:case p.listOrdered:case p.blockQuote:{ie[0]==="enter"?$++:$--,We=void 0;break}case p.lineEndingBlank:{ie[0]==="enter"&&(Ce&&!We&&!$&&!Ve&&(Ve=q),We=void 0);break}case p.linePrefix:case p.listItemValue:case p.listItemMarker:case p.listItemPrefix:case p.listItemPrefixWhitespace:break;default:We=void 0}if(!$&&ie[0]==="enter"&&ie[1].type===p.listItemPrefix||$===-1&&ie[0]==="exit"&&(ie[1].type===p.listUnordered||ie[1].type===p.listOrdered)){if(Ce){let Me=q;for(de=void 0;Me--;){const ge=S[Me];if(ge[1].type===p.lineEnding||ge[1].type===p.lineEndingBlank){if(ge[0]==="exit")continue;de&&(S[de][1].type=p.lineEndingBlank,te=!0),ge[1].type=p.lineEnding,de=Me}else if(!(ge[1].type===p.linePrefix||ge[1].type===p.blockQuotePrefix||ge[1].type===p.blockQuotePrefixWhitespace||ge[1].type===p.blockQuoteMarker||ge[1].type===p.listItemIndent))break}Ve&&(!de||Ve<de)&&(Ce._spread=!0),Ce.end=Object.assign({},de?S[de][1].start:ie[1].end),S.splice(de||q,0,["exit",Ce,ie[2]]),q++,P++}if(ie[1].type===p.listItemPrefix){const Me={type:"listItem",_spread:!1,start:Object.assign({},ie[1].start),end:void 0};Ce=Me,S.splice(q,0,["enter",Me,ie[2]]),q++,P++,Ve=void 0,We=!0}}}return S[C][1]._spread=te,P}function o(S,C){return P;function P(q){s.call(this,S(q),q),C&&C.call(this,q)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(S,C,P){const q=this.stack[this.stack.length-1];g(q,"expected `parent`"),g("children"in q,"expected `parent`"),q.children.push(S),this.stack.push(S),this.tokenStack.push([C,P||void 0]),S.position={start:ye(C.start),end:void 0}}function l(S){return C;function C(P){S&&S.call(this,P),c.call(this,P)}}function c(S,C){const P=this.stack.pop();g(P,"expected `node`");const q=this.tokenStack.pop();if(q)q[0].type!==S.type&&(C?C.call(this,S,q[0]):(q[1]||Jn).call(this,S,q[0]));else throw new Error("Cannot close `"+S.type+"` ("+lt({start:S.start,end:S.end})+"): it’s not open");g(P.type!=="fragment","unexpected fragment `exit`ed"),g(P.position,"expected `position` to be defined"),P.position.end=ye(S.end)}function f(){return Xt(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function d(S){if(this.data.expectingFirstListItemValue){const C=this.stack[this.stack.length-2];g(C,"expected nodes on stack"),g(C.type==="list","expected list on stack"),C.start=Number.parseInt(this.sliceSerialize(S),A.numericBaseDecimal),this.data.expectingFirstListItemValue=void 0}}function m(){const S=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="code","expected code on stack"),C.lang=S}function y(){const S=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="code","expected code on stack"),C.meta=S}function z(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function I(){const S=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="code","expected code on stack"),C.value=S.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const S=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="code","expected code on stack"),C.value=S.replace(/(\r?\n|\r)$/g,"")}function E(S){const C=this.resume(),P=this.stack[this.stack.length-1];g(P,"expected node on stack"),g(P.type==="definition","expected definition on stack"),P.label=C,P.identifier=le(this.sliceSerialize(S)).toLowerCase()}function N(){const S=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="definition","expected definition on stack"),C.title=S}function D(){const S=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="definition","expected definition on stack"),C.url=S}function _(S){const C=this.stack[this.stack.length-1];if(g(C,"expected node on stack"),g(C.type==="heading","expected heading on stack"),!C.depth){const P=this.sliceSerialize(S).length;g(P===1||P===2||P===3||P===4||P===5||P===6,"expected `depth` between `1` and `6`"),C.depth=P}}function w(){this.data.setextHeadingSlurpLineEnding=!0}function v(S){const C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="heading","expected heading on stack"),C.depth=this.sliceSerialize(S).codePointAt(0)===u.equalsTo?1:2}function H(){this.data.setextHeadingSlurpLineEnding=void 0}function B(S){const C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g("children"in C,"expected parent on stack");const P=C.children;let q=P[P.length-1];(!q||q.type!=="text")&&(q=zi(),q.position={start:ye(S.start),end:void 0},P.push(q)),this.stack.push(q)}function b(S){const C=this.stack.pop();g(C,"expected a `node` to be on the stack"),g("value"in C,"expected a `literal` to be on the stack"),g(C.position,"expected `node` to have an open position"),C.value+=this.sliceSerialize(S),C.position.end=ye(S.end)}function Q(S){const C=this.stack[this.stack.length-1];if(g(C,"expected `node`"),this.data.atHardBreak){g("children"in C,"expected `parent`");const P=C.children[C.children.length-1];g(P.position,"expected tail to have a starting position"),P.position.end=ye(S.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(C.type)&&(B.call(this,S),b.call(this,S))}function j(){this.data.atHardBreak=!0}function M(){const S=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="html","expected html on stack"),C.value=S}function L(){const S=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="html","expected html on stack"),C.value=S}function O(){const S=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="inlineCode","expected inline code on stack"),C.value=S}function W(){const S=this.stack[this.stack.length-1];if(g(S,"expected node on stack"),g(S.type==="link","expected link on stack"),this.data.inReference){const C=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=C,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function G(){const S=this.stack[this.stack.length-1];if(g(S,"expected node on stack"),g(S.type==="image","expected image on stack"),this.data.inReference){const C=this.data.referenceType||"shortcut";S.type+="Reference",S.referenceType=C,delete S.url,delete S.title}else delete S.identifier,delete S.label;this.data.referenceType=void 0}function oe(S){const C=this.sliceSerialize(S),P=this.stack[this.stack.length-2];g(P,"expected ancestor on stack"),g(P.type==="image"||P.type==="link","expected image or link on stack"),P.label=oo(C),P.identifier=le(C).toLowerCase()}function ue(){const S=this.stack[this.stack.length-1];g(S,"expected node on stack"),g(S.type==="fragment","expected fragment on stack");const C=this.resume(),P=this.stack[this.stack.length-1];if(g(P,"expected node on stack"),g(P.type==="image"||P.type==="link","expected image or link on stack"),this.data.inReference=!0,P.type==="link"){const q=S.children;P.children=q}else P.alt=C}function x(){const S=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="image"||C.type==="link","expected image or link on stack"),C.url=S}function se(){const S=this.resume(),C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="image"||C.type==="link","expected image or link on stack"),C.title=S}function he(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function re(S){const C=this.resume(),P=this.stack[this.stack.length-1];g(P,"expected node on stack"),g(P.type==="image"||P.type==="link","expected image reference or link reference on stack"),P.label=C,P.identifier=le(this.sliceSerialize(S)).toLowerCase(),this.data.referenceType="full"}function Se(S){g(S.type==="characterReferenceMarkerNumeric"||S.type==="characterReferenceMarkerHexadecimal"),this.data.characterReferenceType=S.type}function xt(S){const C=this.sliceSerialize(S),P=this.data.characterReferenceType;let q;if(P)q=Tr(C,P===p.characterReferenceMarkerNumeric?A.numericBaseDecimal:A.numericBaseHexadecimal),this.data.characterReferenceType=void 0;else{const te=jt(C);g(te!==!1,"expected reference to decode"),q=te}const $=this.stack[this.stack.length-1];g($,"expected `node`"),g("value"in $,"expected `node.value`"),$.value+=q}function nt(S){const C=this.stack.pop();g(C,"expected `node`"),g(C.position,"expected `node.position`"),C.position.end=ye(S.end)}function X(S){b.call(this,S);const C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="link","expected link on stack"),C.url=this.sliceSerialize(S)}function $e(S){b.call(this,S);const C=this.stack[this.stack.length-1];g(C,"expected node on stack"),g(C.type==="link","expected link on stack"),C.url="mailto:"+this.sliceSerialize(S)}function me(){return{type:"blockquote",children:[]}}function we(){return{type:"code",lang:null,meta:null,value:""}}function Fe(){return{type:"inlineCode",value:""}}function kt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function wi(){return{type:"emphasis",children:[]}}function ln(){return{type:"heading",depth:0,children:[]}}function un(){return{type:"break"}}function cn(){return{type:"html",value:""}}function Ci(){return{type:"image",title:null,url:"",alt:null}}function pn(){return{type:"link",title:null,url:"",children:[]}}function fn(S){return{type:"list",ordered:S.type==="listOrdered",start:null,spread:S._spread,children:[]}}function Ti(S){return{type:"listItem",spread:S._spread,checked:null,children:[]}}function Ii(){return{type:"paragraph",children:[]}}function Ei(){return{type:"strong",children:[]}}function zi(){return{type:"text",value:""}}function Ai(){return{type:"thematicBreak"}}}function ye(e){return{line:e.line,column:e.column,offset:e.offset}}function di(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?di(e,r):Yc(e,r)}}function Yc(e,n){let t;for(t in n)if(mi.call(n,t))switch(t){case"canContainEols":{const r=n[t];r&&e[t].push(...r);break}case"transforms":{const r=n[t];r&&e[t].push(...r);break}case"enter":case"exit":{const r=n[t];r&&Object.assign(e[t],r);break}}}function Jn(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+lt({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+lt({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+lt({start:n.start,end:n.end})+") is still open")}function Df(e){const n=this;n.parser=t;function t(r){return Xc(r,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Kc(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function Zc(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
|
|
23
23
|
`}]}function ep(e,n){const t=n.value?n.value+`
|
|
24
24
|
`:"",r={},a=n.lang?n.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return n.meta&&(o.data={meta:n.meta}),e.patch(n,o),o=e.applyData(n,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(n,o),o}function tp(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function np(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function rp(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),a=Re(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let i,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),i=e.footnoteOrder.length):i=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+a,id:t+"fnref-"+a+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(n,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(n,c),e.applyData(n,c)}function ip(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ap(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function gi(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+r}];const a=e.all(n),o=a[0];o&&o.type==="text"?o.value="["+o.value:a.unshift({type:"text",value:"["});const i=a[a.length-1];return i&&i.type==="text"?i.value+=r:a.push({type:"text",value:r}),a}function op(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return gi(e,n);const a={src:Re(r.url||""),alt:n.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(n,o),e.applyData(n,o)}function sp(e,n){const t={src:Re(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function lp(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function up(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return gi(e,n);const a={href:Re(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const o={type:"element",tagName:"a",properties:a,children:e.all(n)};return e.patch(n,o),e.applyData(n,o)}function cp(e,n){const t={href:Re(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function pp(e,n,t){const r=e.all(n),a=t?fp(t):xi(n),o={},i=[];if(typeof n.checked=="boolean"){const f=r[0];let h;f&&f.type==="element"&&f.tagName==="p"?h=f:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const f=r[s];(a||s!==0||f.type!=="element"||f.tagName!=="p")&&i.push({type:"text",value:`
|
|
25
25
|
`}),f.type==="element"&&f.tagName==="p"&&!a?i.push(...f.children):i.push(f)}const l=r[r.length-1];l&&(a||l.type!=="element"||l.tagName!=="p")&&i.push({type:"text",value:`
|
|
26
|
-
`});const c={type:"element",tagName:"li",properties:o,children:i};return e.patch(n,c),e.applyData(n,c)}function fp(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=xi(t[r])}return n}function xi(e){const n=e.spread;return n??e.children.length>1}function hp(e,n){const t={},r=e.all(n);let a=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++a<r.length;){const i=r[a];if(i.type==="element"&&i.tagName==="li"&&i.properties&&Array.isArray(i.properties.className)&&i.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const o={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,o),e.applyData(n,o)}function mp(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function dp(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function gp(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function xp(e,n){const t=e.all(n),r=t.shift(),a=[];if(r){const i={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],i),a.push(i)}if(t.length>0){const i={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},s=xe(n.children[1]),l=Qt(n.children[n.children.length-1]);s&&l&&(i.position={start:s,end:l}),a.push(i)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(n,o),e.applyData(n,o)}function kp(e,n,t){const r=t?t.children:void 0,o=(r?r.indexOf(n):1)===0?"th":"td",i=t&&t.type==="table"?t.align:void 0,s=i?i.length:n.children.length;let l=-1;const c=[];for(;++l<s;){const h=n.children[l],d={},m=i?i[l]:void 0;m&&(d.align=m);let y={type:"element",tagName:o,properties:d,children:[]};h&&(y.children=e.all(h),e.patch(h,y),y=e.applyData(h,y)),c.push(y)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(n,f),e.applyData(n,f)}function yp(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function bp(e,n){const t={type:"text",value:Ri(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function
|
|
26
|
+
`});const c={type:"element",tagName:"li",properties:o,children:i};return e.patch(n,c),e.applyData(n,c)}function fp(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=xi(t[r])}return n}function xi(e){const n=e.spread;return n??e.children.length>1}function hp(e,n){const t={},r=e.all(n);let a=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++a<r.length;){const i=r[a];if(i.type==="element"&&i.tagName==="li"&&i.properties&&Array.isArray(i.properties.className)&&i.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const o={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,o),e.applyData(n,o)}function mp(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function dp(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function gp(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function xp(e,n){const t=e.all(n),r=t.shift(),a=[];if(r){const i={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],i),a.push(i)}if(t.length>0){const i={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},s=xe(n.children[1]),l=Qt(n.children[n.children.length-1]);s&&l&&(i.position={start:s,end:l}),a.push(i)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(n,o),e.applyData(n,o)}function kp(e,n,t){const r=t?t.children:void 0,o=(r?r.indexOf(n):1)===0?"th":"td",i=t&&t.type==="table"?t.align:void 0,s=i?i.length:n.children.length;let l=-1;const c=[];for(;++l<s;){const h=n.children[l],d={},m=i?i[l]:void 0;m&&(d.align=m);let y={type:"element",tagName:o,properties:d,children:[]};h&&(y.children=e.all(h),e.patch(h,y),y=e.applyData(h,y)),c.push(y)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(n,f),e.applyData(n,f)}function yp(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function bp(e,n){const t={type:"text",value:Ri(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Sp(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const wp={blockquote:Kc,break:Zc,code:ep,delete:tp,emphasis:np,footnoteReference:rp,heading:ip,html:ap,imageReference:op,image:sp,inlineCode:lp,linkReference:up,link:cp,listItem:pp,list:hp,paragraph:mp,root:dp,strong:gp,table:xp,tableCell:yp,tableRow:kp,text:bp,thematicBreak:Sp,toml:at,yaml:at,definition:at,footnoteDefinition:at};function at(){}function Cp(e,n){const t=[{type:"text",value:"↩"}];return n>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),t}function Tp(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function Ip(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||Cp,r=e.options.footnoteBackLabel||Tp,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const f=e.all(c),h=String(c.identifier).toUpperCase(),d=Re(h.toLowerCase());let m=0;const y=[],z=e.footnoteCounts.get(h);for(;z!==void 0&&++m<=z;){y.length>0&&y.push({type:"text",value:" "});let E=typeof t=="string"?t:t(l,m);typeof E=="string"&&(E={type:"text",value:E}),y.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+d+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,m),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const I=f[f.length-1];if(I&&I.type==="element"&&I.tagName==="p"){const E=I.children[I.children.length-1];E&&E.type==="text"?E.value+=" ":I.children.push({type:"text",value:" "}),I.children.push(...y)}else f.push(...y);const T={type:"element",tagName:"li",properties:{id:n+"fn-"+d},children:e.wrap(f,!0)};e.patch(c,T),s.push(T)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...ve(i),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
27
27
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
28
|
-
`}]}}const Ut={}.hasOwnProperty,Ep={};function zp(e,n){const t=n||Ep,r=new Map,a=new Map,o=new Map,i={...
|
|
28
|
+
`}]}}const Ut={}.hasOwnProperty,Ep={};function zp(e,n){const t=n||Ep,r=new Map,a=new Map,o=new Map,i={...wp,...t.handlers},s={all:c,applyData:Np,definitionById:r,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:i,one:l,options:t,patch:Ap,wrap:Mp};return _e(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const h=f.type==="definition"?r:a,d=String(f.identifier).toUpperCase();h.has(d)||h.set(d,f)}}),s;function l(f,h){const d=f.type,m=s.handlers[d];if(Ut.call(s.handlers,d)&&m)return m(s,f,h);if(s.options.passThrough&&s.options.passThrough.includes(d)){if("children"in f){const{children:z,...I}=f,T=ve(I);return T.children=s.all(f),T}return ve(f)}return(s.options.unknownHandler||Fp)(s,f,h)}function c(f){const h=[];if("children"in f){const d=f.children;let m=-1;for(;++m<d.length;){const y=s.one(d[m],f);if(y){if(m&&d[m-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=Yn(y.value)),!Array.isArray(y)&&y.type==="element")){const z=y.children[0];z&&z.type==="text"&&(z.value=Yn(z.value))}Array.isArray(y)?h.push(...y):h.push(y)}}}return h}}function Ap(e,n){e.position&&(n.position=Ui(e))}function Np(e,n){let t=n;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const i="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:i}}t.type==="element"&&o&&Object.assign(t.properties,ve(o)),"children"in t&&t.children&&a!==null&&a!==void 0&&(t.children=a)}return t}function Fp(e,n){const t=n.data||{},r="value"in n&&!(Ut.call(t,"hProperties")||Ut.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function Mp(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
|
|
29
29
|
`});++r<e.length;)r&&t.push({type:"text",value:`
|
|
30
30
|
`}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
|
|
31
|
-
`}),t}function
|
|
32
|
-
`},a)),o}function Lf(e,n){return e&&"run"in e?async function(t,r){const a=Kn(t,{file:r,...n});await e.run(a,r)}:function(t,r){return Kn(t,{file:r,...e||n})}}const Pp=(function(e){const r=this.constructor.prototype,a=r[e],o=function(){return a.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),Dp={}.hasOwnProperty;class on extends Pp{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=ji()}copy(){const n=new on;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(yt(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(Ft("data",this.frozen),this.namespace[n]=t,this):Dp.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Ft("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=t.call(n,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=ot(n),r=this.parser||this.Parser;return At("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),At("process",this.parser||this.Parser),Nt("process",this.compiler||this.Compiler),t?a(void 0,t):new Promise(a);function a(o,i){const s=ot(n),l=r.parse(s);r.run(l,s,function(f,h,d){if(f||!h||!d)return c(f);const m=h,y=r.stringify(m,d);Bp(y)?d.value=y:d.result=y,c(f,d)});function c(f,h){f||!h?i(f):o?o(h):(g(t,"`done` is defined if `resolve` is not"),t(void 0,h))}}}processSync(n){let t=!1,r;return this.freeze(),At("processSync",this.parser||this.Parser),Nt("processSync",this.compiler||this.Compiler),this.process(n,a),er("processSync","process",t),g(r,"we either bailed on an error or have a tree"),r;function a(o,i){t=!0,yn(o),r=i}}run(n,t,r){Zn(n),this.freeze();const a=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(i,s){g(typeof t!="function","`file` can’t be a `done` anymore, we checked");const l=ot(t);a.run(n,l,c);function c(f,h,d){const m=h||n;f?s(f):i?i(m):(g(r,"`done` is defined if `resolve` is not"),r(void 0,m,d))}}}runSync(n,t){let r=!1,a;return this.run(n,t,o),er("runSync","run",r),g(a,"we either bailed on an error or have a tree"),a;function o(i,s){yn(i),a=s,r=!0}}stringify(n,t){this.freeze();const r=ot(t),a=this.compiler||this.Compiler;return Nt("stringify",a),Zn(n),a(n,r)}use(n,...t){const r=this.attachers,a=this.namespace;if(Ft("use",this.frozen),n!=null)if(typeof n=="function")l(n,t);else if(typeof n=="object")Array.isArray(n)?s(n):i(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...h]=c;l(f,h)}else i(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function i(c){if(!("plugins"in c)&&!("settings"in c))throw new 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");s(c.plugins),c.settings&&(a.settings=yt(!0,a.settings,c.settings))}function s(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const h=c[f];o(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,f){let h=-1,d=-1;for(;++h<r.length;)if(r[h][0]===c){d=h;break}if(d===-1)r.push([c,...f]);else if(f.length>0){let[m,...y]=f;const z=r[d][1];Lt(z)&&Lt(m)&&(m=yt(!0,z,m)),r[d]=[c,m,...y]}}}}const Bf=new on().freeze();function At(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Nt(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ft(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Zn(e){if(!Lt(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function er(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function ot(e){return Lp(e)?e:new Dt(e)}function Lp(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Bp(e){return typeof e=="string"||_p(e)}function _p(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vp=/^>|^->|<!--|-->|--!>|<!-$/g,Op=[">"],qp=["<",">"];function Rp(e,n,t,r){return r.settings.bogusComments?"<?"+Le(e.value,Object.assign({},r.settings.characterReferences,{subset:Op}))+">":"<!--"+e.value.replace(vp,a)+"-->";function a(o){return Le(o,Object.assign({},r.settings.characterReferences,{subset:qp}))}}function Up(e,n,t,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}const
|
|
31
|
+
`}),t}function Yn(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function Kn(e,n){const t=zp(e,n),r=t.one(e,void 0),a=Ip(t),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&(g("children"in o),o.children.push({type:"text",value:`
|
|
32
|
+
`},a)),o}function Lf(e,n){return e&&"run"in e?async function(t,r){const a=Kn(t,{file:r,...n});await e.run(a,r)}:function(t,r){return Kn(t,{file:r,...e||n})}}const Pp=(function(e){const r=this.constructor.prototype,a=r[e],o=function(){return a.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),Dp={}.hasOwnProperty;class on extends Pp{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=ji()}copy(){const n=new on;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];n.use(...r)}return n.data(yt(!0,{},this.namespace)),n}data(n,t){return typeof n=="string"?arguments.length===2?(Ft("data",this.frozen),this.namespace[n]=t,this):Dp.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Ft("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=t.call(n,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const t=ot(n),r=this.parser||this.Parser;return At("parse",r),r(String(t),t)}process(n,t){const r=this;return this.freeze(),At("process",this.parser||this.Parser),Nt("process",this.compiler||this.Compiler),t?a(void 0,t):new Promise(a);function a(o,i){const s=ot(n),l=r.parse(s);r.run(l,s,function(f,h,d){if(f||!h||!d)return c(f);const m=h,y=r.stringify(m,d);Bp(y)?d.value=y:d.result=y,c(f,d)});function c(f,h){f||!h?i(f):o?o(h):(g(t,"`done` is defined if `resolve` is not"),t(void 0,h))}}}processSync(n){let t=!1,r;return this.freeze(),At("processSync",this.parser||this.Parser),Nt("processSync",this.compiler||this.Compiler),this.process(n,a),er("processSync","process",t),g(r,"we either bailed on an error or have a tree"),r;function a(o,i){t=!0,yn(o),r=i}}run(n,t,r){Zn(n),this.freeze();const a=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?o(void 0,r):new Promise(o);function o(i,s){g(typeof t!="function","`file` can’t be a `done` anymore, we checked");const l=ot(t);a.run(n,l,c);function c(f,h,d){const m=h||n;f?s(f):i?i(m):(g(r,"`done` is defined if `resolve` is not"),r(void 0,m,d))}}}runSync(n,t){let r=!1,a;return this.run(n,t,o),er("runSync","run",r),g(a,"we either bailed on an error or have a tree"),a;function o(i,s){yn(i),a=s,r=!0}}stringify(n,t){this.freeze();const r=ot(t),a=this.compiler||this.Compiler;return Nt("stringify",a),Zn(n),a(n,r)}use(n,...t){const r=this.attachers,a=this.namespace;if(Ft("use",this.frozen),n!=null)if(typeof n=="function")l(n,t);else if(typeof n=="object")Array.isArray(n)?s(n):i(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function o(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...h]=c;l(f,h)}else i(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function i(c){if(!("plugins"in c)&&!("settings"in c))throw new 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");s(c.plugins),c.settings&&(a.settings=yt(!0,a.settings,c.settings))}function s(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const h=c[f];o(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,f){let h=-1,d=-1;for(;++h<r.length;)if(r[h][0]===c){d=h;break}if(d===-1)r.push([c,...f]);else if(f.length>0){let[m,...y]=f;const z=r[d][1];Lt(z)&&Lt(m)&&(m=yt(!0,z,m)),r[d]=[c,m,...y]}}}}const Bf=new on().freeze();function At(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Nt(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ft(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Zn(e){if(!Lt(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function er(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function ot(e){return Lp(e)?e:new Dt(e)}function Lp(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Bp(e){return typeof e=="string"||_p(e)}function _p(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const vp=/^>|^->|<!--|-->|--!>|<!-$/g,Op=[">"],qp=["<",">"];function Rp(e,n,t,r){return r.settings.bogusComments?"<?"+Le(e.value,Object.assign({},r.settings.characterReferences,{subset:Op}))+">":"<!--"+e.value.replace(vp,a)+"-->";function a(o){return Le(o,Object.assign({},r.settings.characterReferences,{subset:qp}))}}function Up(e,n,t,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}const J=yi(1),ki=yi(-1),jp=[];function yi(e){return n;function n(t,r,a){const o=t?t.children:jp;let i=(r||0)+e,s=o[i];if(!a)for(;s&>(s);)i+=e,s=o[i];return s}}const Hp={}.hasOwnProperty;function bi(e){return n;function n(t,r,a){return Hp.call(e,t.tagName)&&e[t.tagName](t,r,a)}}const sn=bi({body:Vp,caption:Mt,colgroup:Mt,dd:Xp,dt:Gp,head:Mt,html:$p,li:Qp,optgroup:Jp,option:Yp,p:Wp,rp:tr,rt:tr,tbody:Zp,td:nr,tfoot:ef,th:nr,thead:Kp,tr:tf});function Mt(e,n,t){const r=J(t,n,!0);return!r||r.type!=="comment"&&!(r.type==="text"&>(r.value.charAt(0)))}function $p(e,n,t){const r=J(t,n);return!r||r.type!=="comment"}function Vp(e,n,t){const r=J(t,n);return!r||r.type!=="comment"}function Wp(e,n,t){const r=J(t,n);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"):!t||!(t.type==="element"&&(t.tagName==="a"||t.tagName==="audio"||t.tagName==="del"||t.tagName==="ins"||t.tagName==="map"||t.tagName==="noscript"||t.tagName==="video"))}function Qp(e,n,t){const r=J(t,n);return!r||r.type==="element"&&r.tagName==="li"}function Gp(e,n,t){const r=J(t,n);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Xp(e,n,t){const r=J(t,n);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function tr(e,n,t){const r=J(t,n);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function Jp(e,n,t){const r=J(t,n);return!r||r.type==="element"&&r.tagName==="optgroup"}function Yp(e,n,t){const r=J(t,n);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function Kp(e,n,t){const r=J(t,n);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function Zp(e,n,t){const r=J(t,n);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function ef(e,n,t){return!J(t,n)}function tf(e,n,t){const r=J(t,n);return!r||r.type==="element"&&r.tagName==="tr"}function nr(e,n,t){const r=J(t,n);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const nf=bi({body:of,colgroup:sf,head:af,html:rf,tbody:lf});function rf(e){const n=J(e,-1);return!n||n.type!=="comment"}function af(e){const n=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(n.has(r.tagName))return!1;n.add(r.tagName)}const t=e.children[0];return!t||t.type==="element"}function of(e){const n=J(e,-1,!0);return!n||n.type!=="comment"&&!(n.type==="text"&>(n.value.charAt(0)))&&!(n.type==="element"&&(n.tagName==="meta"||n.tagName==="link"||n.tagName==="script"||n.tagName==="style"||n.tagName==="template"))}function sf(e,n,t){const r=ki(t,n),a=J(e,-1,!0);return t&&r&&r.type==="element"&&r.tagName==="colgroup"&&sn(r,t.children.indexOf(r),t)?!1:!!(a&&a.type==="element"&&a.tagName==="col")}function lf(e,n,t){const r=ki(t,n),a=J(e,-1);return t&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&sn(r,t.children.indexOf(r),t)?!1:!!(a&&a.type==="element"&&a.tagName==="tr")}const st={name:[[`
|
|
33
33
|
\f\r &/=>`.split(""),`
|
|
34
34
|
\f\r "&'/=>\``.split("")],[`\0
|
|
35
35
|
\f\r "&'/<=>`.split(""),`\0
|
|
@@ -37,4 +37,4 @@ import{Y as rr,Z as ir,_ as Ni,$ as g,a0 as pt,a1 as ar,a2 as _e,a3 as Fi,a4 as
|
|
|
37
37
|
\f\r &>`.split(""),`\0
|
|
38
38
|
\f\r "&'<=>\``.split("")],[`\0
|
|
39
39
|
\f\r "&'<=>\``.split(""),`\0
|
|
40
|
-
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function uf(e,n,t,r){const a=r.schema,o=a.space==="svg"?!1:r.settings.omitOptionalTags;let i=a.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const s=[];let l;a.space==="html"&&e.tagName==="svg"&&(r.schema=pe);const c=cf(r,e.properties),f=r.all(a.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=a,f&&(i=!1),(c||!o||!nf(e,n,t))&&(s.push("<",e.tagName,c?" "+c:""),i&&(a.space==="svg"||r.settings.closeSelfClosing)&&(l=c.charAt(c.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&s.push(" "),s.push("/")),s.push(">")),s.push(f),!i&&(!o||!sn(e,n,t))&&s.push("</"+e.tagName+">"),s.join("")}function cf(e,n){const t=[];let r=-1,a;if(n){for(a in n)if(n[a]!==null&&n[a]!==void 0){const o=pf(e,a,n[a]);o&&t.push(o)}}for(;++r<t.length;){const o=e.settings.tightAttributes?t[r].charAt(t[r].length-1):void 0;r!==t.length-1&&o!=='"'&&o!=="'"&&(t[r]+=" ")}return t.join("")}function pf(e,n,t){const r=Ke(e.schema,n),a=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let i=e.quote,s;if(r.overloadedBoolean&&(t===r.attribute||t==="")?t=!0:(r.boolean||r.overloadedBoolean)&&(typeof t!="string"||t===r.attribute||t==="")&&(t=!!t),t==null||t===!1||typeof t=="number"&&Number.isNaN(t))return"";const l=Le(r.attribute,Object.assign({},e.settings.characterReferences,{subset:st.name[a][o]}));return t===!0||(t=Array.isArray(t)?(r.commaSeparated?Vt:Wt)(t,{padLeft:!e.settings.tightCommaSeparatedLists}):String(t),e.settings.collapseEmptyAttributes&&!t)?l:(e.settings.preferUnquoted&&(s=Le(t,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:st.unquoted[a][o]}))),s!==t&&(e.settings.quoteSmart&&pt(t,i)>pt(t,e.alternative)&&(i=e.alternative),s=i+Le(t,Object.assign({},e.settings.characterReferences,{subset:(i==="'"?st.single:st.double)[a][o],attribute:!0}))+i),l+(s&&"="+s))}const ff=["<","&"];function
|
|
40
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function uf(e,n,t,r){const a=r.schema,o=a.space==="svg"?!1:r.settings.omitOptionalTags;let i=a.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const s=[];let l;a.space==="html"&&e.tagName==="svg"&&(r.schema=pe);const c=cf(r,e.properties),f=r.all(a.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=a,f&&(i=!1),(c||!o||!nf(e,n,t))&&(s.push("<",e.tagName,c?" "+c:""),i&&(a.space==="svg"||r.settings.closeSelfClosing)&&(l=c.charAt(c.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&s.push(" "),s.push("/")),s.push(">")),s.push(f),!i&&(!o||!sn(e,n,t))&&s.push("</"+e.tagName+">"),s.join("")}function cf(e,n){const t=[];let r=-1,a;if(n){for(a in n)if(n[a]!==null&&n[a]!==void 0){const o=pf(e,a,n[a]);o&&t.push(o)}}for(;++r<t.length;){const o=e.settings.tightAttributes?t[r].charAt(t[r].length-1):void 0;r!==t.length-1&&o!=='"'&&o!=="'"&&(t[r]+=" ")}return t.join("")}function pf(e,n,t){const r=Ke(e.schema,n),a=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let i=e.quote,s;if(r.overloadedBoolean&&(t===r.attribute||t==="")?t=!0:(r.boolean||r.overloadedBoolean)&&(typeof t!="string"||t===r.attribute||t==="")&&(t=!!t),t==null||t===!1||typeof t=="number"&&Number.isNaN(t))return"";const l=Le(r.attribute,Object.assign({},e.settings.characterReferences,{subset:st.name[a][o]}));return t===!0||(t=Array.isArray(t)?(r.commaSeparated?Vt:Wt)(t,{padLeft:!e.settings.tightCommaSeparatedLists}):String(t),e.settings.collapseEmptyAttributes&&!t)?l:(e.settings.preferUnquoted&&(s=Le(t,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:st.unquoted[a][o]}))),s!==t&&(e.settings.quoteSmart&&pt(t,i)>pt(t,e.alternative)&&(i=e.alternative),s=i+Le(t,Object.assign({},e.settings.characterReferences,{subset:(i==="'"?st.single:st.double)[a][o],attribute:!0}))+i),l+(s&&"="+s))}const ff=["<","&"];function Si(e,n,t,r){return t&&t.type==="element"&&(t.tagName==="script"||t.tagName==="style")?e.value:Le(e.value,Object.assign({},r.settings.characterReferences,{subset:ff}))}function hf(e,n,t,r){return r.settings.allowDangerousHtml?e.value:Si(e,n,t,r)}function mf(e,n,t,r){return r.all(e)}const df=$t("type",{invalid:gf,unknown:xf,handlers:{comment:Rp,doctype:Up,element:uf,raw:hf,root:mf,text:Si}});function gf(e){throw new Error("Expected node, not `"+e+"`")}function xf(e){const n=e;throw new Error("Cannot compile unknown node `"+n.type+"`")}const kf={},yf={},bf=[];function _f(e,n){const t=n||kf,r=t.quote||'"',a=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Sf,all:wf,settings:{omitOptionalTags:t.omitOptionalTags||!1,allowParseErrors:t.allowParseErrors||!1,allowDangerousCharacters:t.allowDangerousCharacters||!1,quoteSmart:t.quoteSmart||!1,preferUnquoted:t.preferUnquoted||!1,tightAttributes:t.tightAttributes||!1,upperDoctype:t.upperDoctype||!1,tightDoctype:t.tightDoctype||!1,bogusComments:t.bogusComments||!1,tightCommaSeparatedLists:t.tightCommaSeparatedLists||!1,tightSelfClosing:t.tightSelfClosing||!1,collapseEmptyAttributes:t.collapseEmptyAttributes||!1,allowDangerousHtml:t.allowDangerousHtml||!1,voids:t.voids||sr,characterReferences:t.characterReferences||yf,closeSelfClosing:t.closeSelfClosing||!1,closeEmptyElements:t.closeEmptyElements||!1},schema:t.space==="svg"?pe:qe,quote:r,alternative:a}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Sf(e,n,t){return df(e,n,t,this)}function wf(e){const n=[],t=e&&e.children||bf;let r=-1;for(;++r<t.length;)n[r]=this.one(t[r],r,e);return n.join("")}export{Lf as a,zf as b,Mf as c,Af as d,Ff as e,Nf as f,If as g,Ef as h,_f as i,Df as r,Pf as t,Bf as u};
|