import{g as Ue}from"./copy-to-clipboard-ebbzfRrE.js";import{r as Ge}from"./entities-cg2bgkkV.js";import{d as We,c as Qe}from"./uc.micro-05tmOiB-.js";import{m as Le}from"./mdurl-VWZ1KHdU.js";import{l as Ve}from"./linkify-it-Rn4CjAEN.js";import{r as Je}from"./punycode-HZlgMKS9.js";var E={},Oe=Ge;(function(n){function e(d){return Object.prototype.toString.call(d)}function r(d){return e(d)==="[object String]"}var i=Object.prototype.hasOwnProperty;function l(d,A){return i.call(d,A)}function o(d){var A=Array.prototype.slice.call(arguments,1);return A.forEach(function(g){if(g){if(typeof g!="object")throw new TypeError(g+"must be object");Object.keys(g).forEach(function(O){d[O]=g[O]})}}),d}function t(d,A,g){return[].concat(d.slice(0,A),g,d.slice(A+1))}function c(d){return!(d>=55296&&d<=57343||d>=64976&&d<=65007||(d&65535)===65535||(d&65535)===65534||d>=0&&d<=8||d===11||d>=14&&d<=31||d>=127&&d<=159||d>1114111)}function f(d){if(d>65535){d-=65536;var A=55296+(d>>10),g=56320+(d&1023);return String.fromCharCode(A,g)}return String.fromCharCode(d)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,u=/&([a-z#][a-z0-9]{1,31});/gi,p=new RegExp(s.source+"|"+u.source,"gi"),h=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i,a=Oe;function v(d,A){var g;return l(a,A)?a[A]:A.charCodeAt(0)===35&&h.test(A)&&(g=A[1].toLowerCase()==="x"?parseInt(A.slice(2),16):parseInt(A.slice(1),10),c(g))?f(g):d}function x(d){return d.indexOf("\\")<0?d:d.replace(s,"$1")}function C(d){return d.indexOf("\\")<0&&d.indexOf("&")<0?d:d.replace(p,function(A,g,O){return g||v(A,O)})}var _=/[&<>"]/,k=/[&<>"]/g,b={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function y(d){return b[d]}function S(d){return _.test(d)?d.replace(k,y):d}var m=/[.?*+^$[\]\\(){}|-]/g;function T(d){return d.replace(m,"\\$&")}function w(d){switch(d){case 9:case 32:return!0}return!1}function L(d){if(d>=8192&&d<=8202)return!0;switch(d){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}var M=Qe;function P(d){return M.test(d)}function B(d){switch(d){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function H(d){return d=d.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(d=d.replace(/ẞ/g,"ß")),d.toLowerCase().toUpperCase()}n.lib={},n.lib.mdurl=Le,n.lib.ucmicro=We(),n.assign=o,n.isString=r,n.has=l,n.unescapeMd=x,n.unescapeAll=C,n.isValidEntityCode=c,n.fromCodePoint=f,n.escapeHtml=S,n.arrayReplaceAt=t,n.isSpace=w,n.isWhiteSpace=L,n.isMdAsciiPunct=B,n.isPunctChar=P,n.escapeRE=T,n.normalizeReference=H})(E);var J={},Ye=function(e,r,i){var l,o,t,c,f=-1,s=e.posMax,u=e.pos;for(e.pos=r+1,l=1;e.pos<s;){if(t=e.src.charCodeAt(e.pos),t===93&&(l--,l===0)){o=!0;break}if(c=e.pos,e.md.inline.skipToken(e),t===91){if(c===e.pos-1)l++;else if(i)return e.pos=u,-1}}return o&&(f=e.pos),e.pos=u,f},ke=E.unescapeAll,Ke=function(e,r,i){var l,o,t=r,c={ok:!1,pos:0,lines:0,str:""};if(e.charCodeAt(t)===60){for(t++;t<i;){if(l=e.charCodeAt(t),l===10||l===60)return c;if(l===62)return c.pos=t+1,c.str=ke(e.slice(r+1,t)),c.ok=!0,c;if(l===92&&t+1<i){t+=2;continue}t++}return c}for(o=0;t<i&&(l=e.charCodeAt(t),!(l===32||l<32||l===127));){if(l===92&&t+1<i){if(e.charCodeAt(t+1)===32)break;t+=2;continue}if(l===40&&(o++,o>32))return c;if(l===41){if(o===0)break;o--}t++}return r===t||o!==0||(c.str=ke(e.slice(r,t)),c.pos=t,c.ok=!0),c},Xe=E.unescapeAll,er=function(e,r,i){var l,o,t=0,c=r,f={ok:!1,pos:0,lines:0,str:""};if(c>=i||(o=e.charCodeAt(c),o!==34&&o!==39&&o!==40))return f;for(c++,o===40&&(o=41);c<i;){if(l=e.charCodeAt(c),l===o)return f.pos=c+1,f.lines=t,f.str=Xe(e.slice(r+1,c)),f.ok=!0,f;if(l===40&&o===41)return f;l===10?t++:l===92&&c+1<i&&(c++,e.charCodeAt(c)===10&&t++),c++}return f};J.parseLinkLabel=Ye;J.parseLinkDestination=Ke;J.parseLinkTitle=er;var rr=E.assign,nr=E.unescapeAll,F=E.escapeHtml,$={};$.code_inline=function(n,e,r,i,l){var o=n[e];return"<code"+l.renderAttrs(o)+">"+F(o.content)+"</code>"};$.code_block=function(n,e,r,i,l){var o=n[e];return"<pre"+l.renderAttrs(o)+"><code>"+F(n[e].content)+`</code></pre>
`};$.fence=function(n,e,r,i,l){var o=n[e],t=o.info?nr(o.info).trim():"",c="",f="",s,u,p,h,a;return t&&(p=t.split(/(\s+)/g),c=p[0],f=p.slice(2).join("")),r.highlight?s=r.highlight(o.content,c,f)||F(o.content):s=F(o.content),s.indexOf("<pre")===0?s+`
`:t?(u=o.attrIndex("class"),h=o.attrs?o.attrs.slice():[],u<0?h.push(["class",r.langPrefix+c]):(h[u]=h[u].slice(),h[u][1]+=" "+r.langPrefix+c),a={attrs:h},"<pre><code"+l.renderAttrs(a)+">"+s+`</code></pre>
`):"<pre><code"+l.renderAttrs(o)+">"+s+`</code></pre>
`};$.image=function(n,e,r,i,l){var o=n[e];return o.attrs[o.attrIndex("alt")][1]=l.renderInlineAsText(o.children,r,i),l.renderToken(n,e,r)};$.hardbreak=function(n,e,r){return r.xhtmlOut?`<br />
`:`<br>
`};$.softbreak=function(n,e,r){return r.breaks?r.xhtmlOut?`<br />
`:`<br>
`:`
`};$.text=function(n,e){return F(n[e].content)};$.html_block=function(n,e){return n[e].content};$.html_inline=function(n,e){return n[e].content};function j(){this.rules=rr({},$)}j.prototype.renderAttrs=function(e){var r,i,l;if(!e.attrs)return"";for(l="",r=0,i=e.attrs.length;r<i;r++)l+=" "+F(e.attrs[r][0])+'="'+F(e.attrs[r][1])+'"';return l};j.prototype.renderToken=function(e,r,i){var l,o="",t=!1,c=e[r];return c.hidden?"":(c.block&&c.nesting!==-1&&r&&e[r-1].hidden&&(o+=`
`),o+=(c.nesting===-1?"</":"<")+c.tag,o+=this.renderAttrs(c),c.nesting===0&&i.xhtmlOut&&(o+=" /"),c.block&&(t=!0,c.nesting===1&&r+1<e.length&&(l=e[r+1],(l.type==="inline"||l.hidden||l.nesting===-1&&l.tag===c.tag)&&(t=!1))),o+=t?`>
`:">",o)};j.prototype.renderInline=function(n,e,r){for(var i,l="",o=this.rules,t=0,c=n.length;t<c;t++)i=n[t].type,typeof o[i]<"u"?l+=o[i](n,t,e,r,this):l+=this.renderToken(n,t,e);return l};j.prototype.renderInlineAsText=function(n,e,r){for(var i="",l=0,o=n.length;l<o;l++)n[l].type==="text"?i+=n[l].content:n[l].type==="image"?i+=this.renderInlineAsText(n[l].children,e,r):n[l].type==="softbreak"&&(i+=`
`);return i};j.prototype.render=function(n,e,r){var i,l,o,t="",c=this.rules;for(i=0,l=n.length;i<l;i++)o=n[i].type,o==="inline"?t+=this.renderInline(n[i].children,e,r):typeof c[o]<"u"?t+=c[o](n,i,e,r,this):t+=this.renderToken(n,i,e,r);return t};var ir=j;function R(){this.__rules__=[],this.__cache__=null}R.prototype.__find__=function(n){for(var e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===n)return e;return-1};R.prototype.__compile__=function(){var n=this,e=[""];n.__rules__.forEach(function(r){r.enabled&&r.alt.forEach(function(i){e.indexOf(i)<0&&e.push(i)})}),n.__cache__={},e.forEach(function(r){n.__cache__[r]=[],n.__rules__.forEach(function(i){i.enabled&&(r&&i.alt.indexOf(r)<0||n.__cache__[r].push(i.fn))})})};R.prototype.at=function(n,e,r){var i=this.__find__(n),l=r||{};if(i===-1)throw new Error("Parser rule not found: "+n);this.__rules__[i].fn=e,this.__rules__[i].alt=l.alt||[],this.__cache__=null};R.prototype.before=function(n,e,r,i){var l=this.__find__(n),o=i||{};if(l===-1)throw new Error("Parser rule not found: "+n);this.__rules__.splice(l,0,{name:e,enabled:!0,fn:r,alt:o.alt||[]}),this.__cache__=null};R.prototype.after=function(n,e,r,i){var l=this.__find__(n),o=i||{};if(l===-1)throw new Error("Parser rule not found: "+n);this.__rules__.splice(l+1,0,{name:e,enabled:!0,fn:r,alt:o.alt||[]}),this.__cache__=null};R.prototype.push=function(n,e,r){var i=r||{};this.__rules__.push({name:n,enabled:!0,fn:e,alt:i.alt||[]}),this.__cache__=null};R.prototype.enable=function(n,e){Array.isArray(n)||(n=[n]);var r=[];return n.forEach(function(i){var l=this.__find__(i);if(l<0){if(e)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[l].enabled=!0,r.push(i)},this),this.__cache__=null,r};R.prototype.enableOnly=function(n,e){Array.isArray(n)||(n=[n]),this.__rules__.forEach(function(r){r.enabled=!1}),this.enable(n,e)};R.prototype.disable=function(n,e){Array.isArray(n)||(n=[n]);var r=[];return n.forEach(function(i){var l=this.__find__(i);if(l<0){if(e)return;throw new Error("Rules manager: invalid rule name "+i)}this.__rules__[l].enabled=!1,r.push(i)},this),this.__cache__=null,r};R.prototype.getRules=function(n){return this.__cache__===null&&this.__compile__(),this.__cache__[n]||[]};var se=R,or=/\r\n?|\n/g,lr=/\0/g,tr=function(e){var r;r=e.src.replace(or,`
`),r=r.replace(lr,"�"),e.src=r},fr=function(e){var r;e.inlineMode?(r=new e.Token("inline","",0),r.content=e.src,r.map=[0,1],r.children=[],e.tokens.push(r)):e.md.block.parse(e.src,e.md,e.env,e.tokens)},cr=function(e){var r=e.tokens,i,l,o;for(l=0,o=r.length;l<o;l++)i=r[l],i.type==="inline"&&e.md.inline.parse(i.content,e.md,e.env,i.children)},sr=E.arrayReplaceAt;function ur(n){return/^<a[>\s]/i.test(n)}function ar(n){return/^<\/a\s*>/i.test(n)}var hr=function(e){var r,i,l,o,t,c,f,s,u,p,h,a,v,x,C,_,k=e.tokens,b;if(e.md.options.linkify){for(i=0,l=k.length;i<l;i++)if(!(k[i].type!=="inline"||!e.md.linkify.pretest(k[i].content)))for(o=k[i].children,v=0,r=o.length-1;r>=0;r--){if(c=o[r],c.type==="link_close"){for(r--;o[r].level!==c.level&&o[r].type!=="link_open";)r--;continue}if(c.type==="html_inline"&&(ur(c.content)&&v>0&&v--,ar(c.content)&&v++),!(v>0)&&c.type==="text"&&e.md.linkify.test(c.content)){for(u=c.content,b=e.md.linkify.match(u),f=[],a=c.level,h=0,b.length>0&&b[0].index===0&&r>0&&o[r-1].type==="text_special"&&(b=b.slice(1)),s=0;s<b.length;s++)x=b[s].url,C=e.md.normalizeLink(x),e.md.validateLink(C)&&(_=b[s].text,b[s].schema?b[s].schema==="mailto:"&&!/^mailto:/i.test(_)?_=e.md.normalizeLinkText("mailto:"+_).replace(/^mailto:/,""):_=e.md.normalizeLinkText(_):_=e.md.normalizeLinkText("http://"+_).replace(/^http:\/\//,""),p=b[s].index,p>h&&(t=new e.Token("text","",0),t.content=u.slice(h,p),t.level=a,f.push(t)),t=new e.Token("link_open","a",1),t.attrs=[["href",C]],t.level=a++,t.markup="linkify",t.info="auto",f.push(t),t=new e.Token("text","",0),t.content=_,t.level=a,f.push(t),t=new e.Token("link_close","a",-1),t.level=--a,t.markup="linkify",t.info="auto",f.push(t),h=b[s].lastIndex);h<u.length&&(t=new e.Token("text","",0),t.content=u.slice(h),t.level=a,f.push(t)),k[i].children=o=sr(o,r,f)}}}},De=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,pr=/\((c|tm|r)\)/i,dr=/\((c|tm|r)\)/ig,kr={c:"©",r:"®",tm:"™"};function mr(n,e){return kr[e.toLowerCase()]}function xr(n){var e,r,i=0;for(e=n.length-1;e>=0;e--)r=n[e],r.type==="text"&&!i&&(r.content=r.content.replace(dr,mr)),r.type==="link_open"&&r.info==="auto"&&i--,r.type==="link_close"&&r.info==="auto"&&i++}function gr(n){var e,r,i=0;for(e=n.length-1;e>=0;e--)r=n[e],r.type==="text"&&!i&&De.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&i--,r.type==="link_close"&&r.info==="auto"&&i++}var _r=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)e.tokens[r].type==="inline"&&(pr.test(e.tokens[r].content)&&xr(e.tokens[r].children),De.test(e.tokens[r].content)&&gr(e.tokens[r].children))},me=E.isWhiteSpace,xe=E.isPunctChar,ge=E.isMdAsciiPunct,vr=/['"]/,_e=/['"]/g,ve="’";function W(n,e,r){return n.slice(0,e)+r+n.slice(e+1)}function br(n,e){var r,i,l,o,t,c,f,s,u,p,h,a,v,x,C,_,k,b,y,S,m;for(y=[],r=0;r<n.length;r++){for(i=n[r],f=n[r].level,k=y.length-1;k>=0&&!(y[k].level<=f);k--);if(y.length=k+1,i.type==="text"){l=i.content,t=0,c=l.length;e:for(;t<c&&(_e.lastIndex=t,o=_e.exec(l),!!o);){if(C=_=!0,t=o.index+1,b=o[0]==="'",u=32,o.index-1>=0)u=l.charCodeAt(o.index-1);else for(k=r-1;k>=0&&!(n[k].type==="softbreak"||n[k].type==="hardbreak");k--)if(n[k].content){u=n[k].content.charCodeAt(n[k].content.length-1);break}if(p=32,t<c)p=l.charCodeAt(t);else for(k=r+1;k<n.length&&!(n[k].type==="softbreak"||n[k].type==="hardbreak");k++)if(n[k].content){p=n[k].content.charCodeAt(0);break}if(h=ge(u)||xe(String.fromCharCode(u)),a=ge(p)||xe(String.fromCharCode(p)),v=me(u),x=me(p),x?C=!1:a&&(v||h||(C=!1)),v?_=!1:h&&(x||a||(_=!1)),p===34&&o[0]==='"'&&u>=48&&u<=57&&(_=C=!1),C&&_&&(C=h,_=a),!C&&!_){b&&(i.content=W(i.content,o.index,ve));continue}if(_){for(k=y.length-1;k>=0&&(s=y[k],!(y[k].level<f));k--)if(s.single===b&&y[k].level===f){s=y[k],b?(S=e.md.options.quotes[2],m=e.md.options.quotes[3]):(S=e.md.options.quotes[0],m=e.md.options.quotes[1]),i.content=W(i.content,o.index,m),n[s.token].content=W(n[s.token].content,s.pos,S),t+=m.length-1,s.token===r&&(t+=S.length-1),l=i.content,c=l.length,y.length=k;continue e}}C?y.push({token:r,pos:o.index,single:b,level:f}):_&&b&&(i.content=W(i.content,o.index,ve))}}}}var Cr=function(e){var r;if(e.md.options.typographer)for(r=e.tokens.length-1;r>=0;r--)e.tokens[r].type!=="inline"||!vr.test(e.tokens[r].content)||br(e.tokens[r].children,e)},Ar=function(e){var r,i,l,o,t,c,f=e.tokens;for(r=0,i=f.length;r<i;r++)if(f[r].type==="inline"){for(l=f[r].children,t=l.length,o=0;o<t;o++)l[o].type==="text_special"&&(l[o].type="text");for(o=c=0;o<t;o++)l[o].type==="text"&&o+1<t&&l[o+1].type==="text"?l[o+1].content=l[o].content+l[o+1].content:(o!==c&&(l[c]=l[o]),c++);o!==c&&(l.length=c)}};function N(n,e,r){this.type=n,this.tag=e,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}N.prototype.attrIndex=function(e){var r,i,l;if(!this.attrs)return-1;for(r=this.attrs,i=0,l=r.length;i<l;i++)if(r[i][0]===e)return i;return-1};N.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]};N.prototype.attrSet=function(e,r){var i=this.attrIndex(e),l=[e,r];i<0?this.attrPush(l):this.attrs[i]=l};N.prototype.attrGet=function(e){var r=this.attrIndex(e),i=null;return r>=0&&(i=this.attrs[r][1]),i};N.prototype.attrJoin=function(e,r){var i=this.attrIndex(e);i<0?this.attrPush([e,r]):this.attrs[i][1]=this.attrs[i][1]+" "+r};var ue=N,yr=ue;function Fe(n,e,r){this.src=n,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=e}Fe.prototype.Token=yr;var Er=Fe,Sr=se,ne=[["normalize",tr],["block",fr],["inline",cr],["linkify",hr],["replacements",_r],["smartquotes",Cr],["text_join",Ar]];function ae(){this.ruler=new Sr;for(var n=0;n<ne.length;n++)this.ruler.push(ne[n][0],ne[n][1])}ae.prototype.process=function(n){var e,r,i;for(i=this.ruler.getRules(""),e=0,r=i.length;e<r;e++)i[e](n)};ae.prototype.State=Er;var Mr=ae,ie=E.isSpace;function oe(n,e){var r=n.bMarks[e]+n.tShift[e],i=n.eMarks[e];return n.src.slice(r,i)}function be(n){var e=[],r=0,i=n.length,l,o=!1,t=0,c="";for(l=n.charCodeAt(r);r<i;)l===124&&(o?(c+=n.substring(t,r-1),t=r):(e.push(c+n.substring(t,r)),c="",t=r+1)),o=l===92,r++,l=n.charCodeAt(r);return e.push(c+n.substring(t)),e}var Tr=function(e,r,i,l){var o,t,c,f,s,u,p,h,a,v,x,C,_,k,b,y,S,m;if(r+2>i||(u=r+1,e.sCount[u]<e.blkIndent)||e.sCount[u]-e.blkIndent>=4||(c=e.bMarks[u]+e.tShift[u],c>=e.eMarks[u])||(S=e.src.charCodeAt(c++),S!==124&&S!==45&&S!==58)||c>=e.eMarks[u]||(m=e.src.charCodeAt(c++),m!==124&&m!==45&&m!==58&&!ie(m))||S===45&&ie(m))return!1;for(;c<e.eMarks[u];){if(o=e.src.charCodeAt(c),o!==124&&o!==45&&o!==58&&!ie(o))return!1;c++}for(t=oe(e,r+1),p=t.split("|"),v=[],f=0;f<p.length;f++){if(x=p[f].trim(),!x){if(f===0||f===p.length-1)continue;return!1}if(!/^:?-+:?$/.test(x))return!1;x.charCodeAt(x.length-1)===58?v.push(x.charCodeAt(0)===58?"center":"right"):x.charCodeAt(0)===58?v.push("left"):v.push("")}if(t=oe(e,r).trim(),t.indexOf("|")===-1||e.sCount[r]-e.blkIndent>=4||(p=be(t),p.length&&p[0]===""&&p.shift(),p.length&&p[p.length-1]===""&&p.pop(),h=p.length,h===0||h!==v.length))return!1;if(l)return!0;for(k=e.parentType,e.parentType="table",y=e.md.block.ruler.getRules("blockquote"),a=e.push("table_open","table",1),a.map=C=[r,0],a=e.push("thead_open","thead",1),a.map=[r,r+1],a=e.push("tr_open","tr",1),a.map=[r,r+1],f=0;f<p.length;f++)a=e.push("th_open","th",1),v[f]&&(a.attrs=[["style","text-align:"+v[f]]]),a=e.push("inline","",0),a.content=p[f].trim(),a.children=[],a=e.push("th_close","th",-1);for(a=e.push("tr_close","tr",-1),a=e.push("thead_close","thead",-1),u=r+2;u<i&&!(e.sCount[u]<e.blkIndent);u++){for(b=!1,f=0,s=y.length;f<s;f++)if(y[f](e,u,i,!0)){b=!0;break}if(b||(t=oe(e,u).trim(),!t)||e.sCount[u]-e.blkIndent>=4)break;for(p=be(t),p.length&&p[0]===""&&p.shift(),p.length&&p[p.length-1]===""&&p.pop(),u===r+2&&(a=e.push("tbody_open","tbody",1),a.map=_=[r+2,0]),a=e.push("tr_open","tr",1),a.map=[u,u+1],f=0;f<h;f++)a=e.push("td_open","td",1),v[f]&&(a.attrs=[["style","text-align:"+v[f]]]),a=e.push("inline","",0),a.content=p[f]?p[f].trim():"",a.children=[],a=e.push("td_close","td",-1);a=e.push("tr_close","tr",-1)}return _&&(a=e.push("tbody_close","tbody",-1),_[1]=u),a=e.push("table_close","table",-1),C[1]=u,e.parentType=k,e.line=u,!0},wr=function(e,r,i){var l,o,t;if(e.sCount[r]-e.blkIndent<4)return!1;for(o=l=r+1;l<i;){if(e.isEmpty(l)){l++;continue}if(e.sCount[l]-e.blkIndent>=4){l++,o=l;continue}break}return e.line=o,t=e.push("code_block","code",0),t.content=e.getLines(r,o,4+e.blkIndent,!1)+`
`,t.map=[r,e.line],!0},Ir=function(e,r,i,l){var o,t,c,f,s,u,p,h=!1,a=e.bMarks[r]+e.tShift[r],v=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||a+3>v||(o=e.src.charCodeAt(a),o!==126&&o!==96)||(s=a,a=e.skipChars(a,o),t=a-s,t<3)||(p=e.src.slice(s,a),c=e.src.slice(a,v),o===96&&c.indexOf(String.fromCharCode(o))>=0))return!1;if(l)return!0;for(f=r;f++,!(f>=i||(a=s=e.bMarks[f]+e.tShift[f],v=e.eMarks[f],a<v&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(a)===o&&!(e.sCount[f]-e.blkIndent>=4)&&(a=e.skipChars(a,o),!(a-s<t)&&(a=e.skipSpaces(a),!(a<v)))){h=!0;break}return t=e.sCount[r],e.line=f+(h?1:0),u=e.push("fence","code",0),u.info=c,u.content=e.getLines(r+1,f,t,!0),u.markup=p,u.map=[r,e.line],!0},Rr=E.isSpace,Pr=function(e,r,i,l){var o,t,c,f,s,u,p,h,a,v,x,C,_,k,b,y,S,m,T,w,L=e.lineMax,M=e.bMarks[r]+e.tShift[r],P=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||e.src.charCodeAt(M)!==62)return!1;if(l)return!0;for(v=[],x=[],k=[],b=[],m=e.md.block.ruler.getRules("blockquote"),_=e.parentType,e.parentType="blockquote",h=r;h<i&&(w=e.sCount[h]<e.blkIndent,M=e.bMarks[h]+e.tShift[h],P=e.eMarks[h],!(M>=P));h++){if(e.src.charCodeAt(M++)===62&&!w){for(f=e.sCount[h]+1,e.src.charCodeAt(M)===32?(M++,f++,o=!1,y=!0):e.src.charCodeAt(M)===9?(y=!0,(e.bsCount[h]+f)%4===3?(M++,f++,o=!1):o=!0):y=!1,a=f,v.push(e.bMarks[h]),e.bMarks[h]=M;M<P&&(t=e.src.charCodeAt(M),Rr(t));){t===9?a+=4-(a+e.bsCount[h]+(o?1:0))%4:a++;M++}u=M>=P,x.push(e.bsCount[h]),e.bsCount[h]=e.sCount[h]+1+(y?1:0),k.push(e.sCount[h]),e.sCount[h]=a-f,b.push(e.tShift[h]),e.tShift[h]=M-e.bMarks[h];continue}if(u)break;for(S=!1,c=0,s=m.length;c<s;c++)if(m[c](e,h,i,!0)){S=!0;break}if(S){e.lineMax=h,e.blkIndent!==0&&(v.push(e.bMarks[h]),x.push(e.bsCount[h]),b.push(e.tShift[h]),k.push(e.sCount[h]),e.sCount[h]-=e.blkIndent);break}v.push(e.bMarks[h]),x.push(e.bsCount[h]),b.push(e.tShift[h]),k.push(e.sCount[h]),e.sCount[h]=-1}for(C=e.blkIndent,e.blkIndent=0,T=e.push("blockquote_open","blockquote",1),T.markup=">",T.map=p=[r,0],e.md.block.tokenize(e,r,h),T=e.push("blockquote_close","blockquote",-1),T.markup=">",e.lineMax=L,e.parentType=_,p[1]=e.line,c=0;c<b.length;c++)e.bMarks[c+r]=v[c],e.tShift[c+r]=b[c],e.sCount[c+r]=k[c],e.bsCount[c+r]=x[c];return e.blkIndent=C,!0},$r=E.isSpace,zr=function(e,r,i,l){var o,t,c,f,s=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||(o=e.src.charCodeAt(s++),o!==42&&o!==45&&o!==95))return!1;for(t=1;s<u;){if(c=e.src.charCodeAt(s++),c!==o&&!$r(c))return!1;c===o&&t++}return t<3?!1:(l||(e.line=r+1,f=e.push("hr","hr",0),f.map=[r,e.line],f.markup=Array(t+1).join(String.fromCharCode(o))),!0)},Be=E.isSpace;function Ce(n,e){var r,i,l,o;return i=n.bMarks[e]+n.tShift[e],l=n.eMarks[e],r=n.src.charCodeAt(i++),r!==42&&r!==45&&r!==43||i<l&&(o=n.src.charCodeAt(i),!Be(o))?-1:i}function Ae(n,e){var r,i=n.bMarks[e]+n.tShift[e],l=i,o=n.eMarks[e];if(l+1>=o||(r=n.src.charCodeAt(l++),r<48||r>57))return-1;for(;;){if(l>=o)return-1;if(r=n.src.charCodeAt(l++),r>=48&&r<=57){if(l-i>=10)return-1;continue}if(r===41||r===46)break;return-1}return l<o&&(r=n.src.charCodeAt(l),!Be(r))?-1:l}function Lr(n,e){var r,i,l=n.level+2;for(r=e+2,i=n.tokens.length-2;r<i;r++)n.tokens[r].level===l&&n.tokens[r].type==="paragraph_open"&&(n.tokens[r+2].hidden=!0,n.tokens[r].hidden=!0,r+=2)}var Or=function(e,r,i,l){var o,t,c,f,s,u,p,h,a,v,x,C,_,k,b,y,S,m,T,w,L,M,P,B,H,d,A,g=r,O=!1,de=!0;if(e.sCount[g]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[g]-e.listIndent>=4&&e.sCount[g]<e.blkIndent)return!1;if(l&&e.parentType==="paragraph"&&e.sCount[g]>=e.blkIndent&&(O=!0),(M=Ae(e,g))>=0){if(p=!0,B=e.bMarks[g]+e.tShift[g],_=Number(e.src.slice(B,M-1)),O&&_!==1)return!1}else if((M=Ce(e,g))>=0)p=!1;else return!1;if(O&&e.skipSpaces(M)>=e.eMarks[g])return!1;if(l)return!0;for(C=e.src.charCodeAt(M-1),x=e.tokens.length,p?(A=e.push("ordered_list_open","ol",1),_!==1&&(A.attrs=[["start",_]])):A=e.push("bullet_list_open","ul",1),A.map=v=[g,0],A.markup=String.fromCharCode(C),P=!1,d=e.md.block.ruler.getRules("list"),S=e.parentType,e.parentType="list";g<i;){for(L=M,k=e.eMarks[g],u=b=e.sCount[g]+M-(e.bMarks[g]+e.tShift[g]);L<k;){if(o=e.src.charCodeAt(L),o===9)b+=4-(b+e.bsCount[g])%4;else if(o===32)b++;else break;L++}if(t=L,t>=k?s=1:s=b-u,s>4&&(s=1),f=u+s,A=e.push("list_item_open","li",1),A.markup=String.fromCharCode(C),A.map=h=[g,0],p&&(A.info=e.src.slice(B,M-1)),w=e.tight,T=e.tShift[g],m=e.sCount[g],y=e.listIndent,e.listIndent=e.blkIndent,e.blkIndent=f,e.tight=!0,e.tShift[g]=t-e.bMarks[g],e.sCount[g]=b,t>=k&&e.isEmpty(g+1)?e.line=Math.min(e.line+2,i):e.md.block.tokenize(e,g,i,!0),(!e.tight||P)&&(de=!1),P=e.line-g>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=y,e.tShift[g]=T,e.sCount[g]=m,e.tight=w,A=e.push("list_item_close","li",-1),A.markup=String.fromCharCode(C),g=e.line,h[1]=g,g>=i||e.sCount[g]<e.blkIndent||e.sCount[g]-e.blkIndent>=4)break;for(H=!1,c=0,a=d.length;c<a;c++)if(d[c](e,g,i,!0)){H=!0;break}if(H)break;if(p){if(M=Ae(e,g),M<0)break;B=e.bMarks[g]+e.tShift[g]}else if(M=Ce(e,g),M<0)break;if(C!==e.src.charCodeAt(M-1))break}return p?A=e.push("ordered_list_close","ol",-1):A=e.push("bullet_list_close","ul",-1),A.markup=String.fromCharCode(C),v[1]=g,e.line=g,e.parentType=S,de&&Lr(e,x),!0},Dr=E.normalizeReference,Q=E.isSpace,Fr=function(e,r,i,l){var o,t,c,f,s,u,p,h,a,v,x,C,_,k,b,y,S=0,m=e.bMarks[r]+e.tShift[r],T=e.eMarks[r],w=r+1;if(e.sCount[r]-e.blkIndent>=4||e.src.charCodeAt(m)!==91)return!1;for(;++m<T;)if(e.src.charCodeAt(m)===93&&e.src.charCodeAt(m-1)!==92){if(m+1===T||e.src.charCodeAt(m+1)!==58)return!1;break}for(f=e.lineMax,b=e.md.block.ruler.getRules("reference"),v=e.parentType,e.parentType="reference";w<f&&!e.isEmpty(w);w++)if(!(e.sCount[w]-e.blkIndent>3)&&!(e.sCount[w]<0)){for(k=!1,u=0,p=b.length;u<p;u++)if(b[u](e,w,f,!0)){k=!0;break}if(k)break}for(_=e.getLines(r,w,e.blkIndent,!1).trim(),T=_.length,m=1;m<T;m++){if(o=_.charCodeAt(m),o===91)return!1;if(o===93){a=m;break}else o===10?S++:o===92&&(m++,m<T&&_.charCodeAt(m)===10&&S++)}if(a<0||_.charCodeAt(a+1)!==58)return!1;for(m=a+2;m<T;m++)if(o=_.charCodeAt(m),o===10)S++;else if(!Q(o))break;if(x=e.md.helpers.parseLinkDestination(_,m,T),!x.ok||(s=e.md.normalizeLink(x.str),!e.md.validateLink(s)))return!1;for(m=x.pos,S+=x.lines,t=m,c=S,C=m;m<T;m++)if(o=_.charCodeAt(m),o===10)S++;else if(!Q(o))break;for(x=e.md.helpers.parseLinkTitle(_,m,T),m<T&&C!==m&&x.ok?(y=x.str,m=x.pos,S+=x.lines):(y="",m=t,S=c);m<T&&(o=_.charCodeAt(m),!!Q(o));)m++;if(m<T&&_.charCodeAt(m)!==10&&y)for(y="",m=t,S=c;m<T&&(o=_.charCodeAt(m),!!Q(o));)m++;return m<T&&_.charCodeAt(m)!==10||(h=Dr(_.slice(1,a)),!h)?!1:(l||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[h]>"u"&&(e.env.references[h]={title:y,href:s}),e.parentType=v,e.line=r+S+1),!0)},Br=["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","section","source","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Y={},qr="[a-zA-Z_:][a-zA-Z0-9:._-]*",jr="[^\"'=<>`\\x00-\\x20]+",Nr="'[^']*'",Hr='"[^"]*"',Zr="(?:"+jr+"|"+Nr+"|"+Hr+")",Ur="(?:\\s+"+qr+"(?:\\s*=\\s*"+Zr+")?)",qe="<[A-Za-z][A-Za-z0-9\\-]*"+Ur+"*\\s*\\/?>",je="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Gr="<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->",Wr="<[?][\\s\\S]*?[?]>",Qr="<![A-Z]+\\s+[^>]*>",Vr="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",Jr=new RegExp("^(?:"+qe+"|"+je+"|"+Gr+"|"+Wr+"|"+Qr+"|"+Vr+")"),Yr=new RegExp("^(?:"+qe+"|"+je+")");Y.HTML_TAG_RE=Jr;Y.HTML_OPEN_CLOSE_TAG_RE=Yr;var Kr=Br,Xr=Y.HTML_OPEN_CLOSE_TAG_RE,q=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+Kr.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Xr.source+"\\s*$"),/^$/,!1]],en=function(e,r,i,l){var o,t,c,f,s=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(s)!==60)return!1;for(f=e.src.slice(s,u),o=0;o<q.length&&!q[o][0].test(f);o++);if(o===q.length)return!1;if(l)return q[o][2];if(t=r+1,!q[o][1].test(f)){for(;t<i&&!(e.sCount[t]<e.blkIndent);t++)if(s=e.bMarks[t]+e.tShift[t],u=e.eMarks[t],f=e.src.slice(s,u),q[o][1].test(f)){f.length!==0&&t++;break}}return e.line=t,c=e.push("html_block","",0),c.map=[r,t],c.content=e.getLines(r,t,e.blkIndent,!0),!0},ye=E.isSpace,rn=function(e,r,i,l){var o,t,c,f,s=e.bMarks[r]+e.tShift[r],u=e.eMarks[r];if(e.sCount[r]-e.blkIndent>=4||(o=e.src.charCodeAt(s),o!==35||s>=u))return!1;for(t=1,o=e.src.charCodeAt(++s);o===35&&s<u&&t<=6;)t++,o=e.src.charCodeAt(++s);return t>6||s<u&&!ye(o)?!1:(l||(u=e.skipSpacesBack(u,s),c=e.skipCharsBack(u,35,s),c>s&&ye(e.src.charCodeAt(c-1))&&(u=c),e.line=r+1,f=e.push("heading_open","h"+String(t),1),f.markup="########".slice(0,t),f.map=[r,e.line],f=e.push("inline","",0),f.content=e.src.slice(s,u).trim(),f.map=[r,e.line],f.children=[],f=e.push("heading_close","h"+String(t),-1),f.markup="########".slice(0,t)),!0)},nn=function(e,r,i){var l,o,t,c,f,s,u,p,h,a=r+1,v,x=e.md.block.ruler.getRules("paragraph");if(e.sCount[r]-e.blkIndent>=4)return!1;for(v=e.parentType,e.parentType="paragraph";a<i&&!e.isEmpty(a);a++)if(!(e.sCount[a]-e.blkIndent>3)){if(e.sCount[a]>=e.blkIndent&&(s=e.bMarks[a]+e.tShift[a],u=e.eMarks[a],s<u&&(h=e.src.charCodeAt(s),(h===45||h===61)&&(s=e.skipChars(s,h),s=e.skipSpaces(s),s>=u)))){p=h===61?1:2;break}if(!(e.sCount[a]<0)){for(o=!1,t=0,c=x.length;t<c;t++)if(x[t](e,a,i,!0)){o=!0;break}if(o)break}}return p?(l=e.getLines(r,a,e.blkIndent,!1).trim(),e.line=a+1,f=e.push("heading_open","h"+String(p),1),f.markup=String.fromCharCode(h),f.map=[r,e.line],f=e.push("inline","",0),f.content=l,f.map=[r,e.line-1],f.children=[],f=e.push("heading_close","h"+String(p),-1),f.markup=String.fromCharCode(h),e.parentType=v,!0):!1},on=function(e,r,i){var l,o,t,c,f,s,u=r+1,p=e.md.block.ruler.getRules("paragraph");for(s=e.parentType,e.parentType="paragraph";u<i&&!e.isEmpty(u);u++)if(!(e.sCount[u]-e.blkIndent>3)&&!(e.sCount[u]<0)){for(o=!1,t=0,c=p.length;t<c;t++)if(p[t](e,u,i,!0)){o=!0;break}if(o)break}return l=e.getLines(r,u,e.blkIndent,!1).trim(),e.line=u,f=e.push("paragraph_open","p",1),f.map=[r,e.line],f=e.push("inline","",0),f.content=l,f.map=[r,e.line],f.children=[],f=e.push("paragraph_close","p",-1),e.parentType=s,!0},Ne=ue,K=E.isSpace;function z(n,e,r,i){var l,o,t,c,f,s,u,p;for(this.src=n,this.md=e,this.env=r,this.tokens=i,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0,this.result="",o=this.src,p=!1,t=c=s=u=0,f=o.length;c<f;c++){if(l=o.charCodeAt(c),!p)if(K(l)){s++,l===9?u+=4-u%4:u++;continue}else p=!0;(l===10||c===f-1)&&(l!==10&&c++,this.bMarks.push(t),this.eMarks.push(c),this.tShift.push(s),this.sCount.push(u),this.bsCount.push(0),p=!1,s=0,u=0,t=c+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}z.prototype.push=function(n,e,r){var i=new Ne(n,e,r);return i.block=!0,r<0&&this.level--,i.level=this.level,r>0&&this.level++,this.tokens.push(i),i};z.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]};z.prototype.skipEmptyLines=function(e){for(var r=this.lineMax;e<r&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e};z.prototype.skipSpaces=function(e){for(var r,i=this.src.length;e<i&&(r=this.src.charCodeAt(e),!!K(r));e++);return e};z.prototype.skipSpacesBack=function(e,r){if(e<=r)return e;for(;e>r;)if(!K(this.src.charCodeAt(--e)))return e+1;return e};z.prototype.skipChars=function(e,r){for(var i=this.src.length;e<i&&this.src.charCodeAt(e)===r;e++);return e};z.prototype.skipCharsBack=function(e,r,i){if(e<=i)return e;for(;e>i;)if(r!==this.src.charCodeAt(--e))return e+1;return e};z.prototype.getLines=function(e,r,i,l){var o,t,c,f,s,u,p,h=e;if(e>=r)return"";for(u=new Array(r-e),o=0;h<r;h++,o++){for(t=0,p=f=this.bMarks[h],h+1<r||l?s=this.eMarks[h]+1:s=this.eMarks[h];f<s&&t<i;){if(c=this.src.charCodeAt(f),K(c))c===9?t+=4-(t+this.bsCount[h])%4:t++;else if(f-p<this.tShift[h])t++;else break;f++}t>i?u[o]=new Array(t-i+1).join(" ")+this.src.slice(f,s):u[o]=this.src.slice(f,s)}return u.join("")};z.prototype.Token=Ne;var ln=z,tn=se,V=[["table",Tr,["paragraph","reference"]],["code",wr],["fence",Ir,["paragraph","reference","blockquote","list"]],["blockquote",Pr,["paragraph","reference","blockquote","list"]],["hr",zr,["paragraph","reference","blockquote","list"]],["list",Or,["paragraph","reference","blockquote"]],["reference",Fr],["html_block",en,["paragraph","reference","blockquote"]],["heading",rn,["paragraph","reference","blockquote"]],["lheading",nn],["paragraph",on]];function X(){this.ruler=new tn;for(var n=0;n<V.length;n++)this.ruler.push(V[n][0],V[n][1],{alt:(V[n][2]||[]).slice()})}X.prototype.tokenize=function(n,e,r){for(var i,l,o,t=this.ruler.getRules(""),c=t.length,f=e,s=!1,u=n.md.options.maxNesting;f<r&&(n.line=f=n.skipEmptyLines(f),!(f>=r||n.sCount[f]<n.blkIndent));){if(n.level>=u){n.line=r;break}for(o=n.line,l=0;l<c;l++)if(i=t[l](n,f,r,!1),i){if(o>=n.line)throw new Error("block rule didn't increment state.line");break}if(!i)throw new Error("none of the block rules matched");n.tight=!s,n.isEmpty(n.line-1)&&(s=!0),f=n.line,f<r&&n.isEmpty(f)&&(s=!0,f++,n.line=f)}};X.prototype.parse=function(n,e,r,i){var l;n&&(l=new this.State(n,e,r,i),this.tokenize(l,l.line,l.lineMax))};X.prototype.State=ln;var fn=X;function cn(n){switch(n){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}var sn=function(e,r){for(var i=e.pos;i<e.posMax&&!cn(e.src.charCodeAt(i));)i++;return i===e.pos?!1:(r||(e.pending+=e.src.slice(e.pos,i)),e.pos=i,!0)},un=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i,an=function(e,r){var i,l,o,t,c,f,s,u;return!e.md.options.linkify||e.linkLevel>0||(i=e.pos,l=e.posMax,i+3>l)||e.src.charCodeAt(i)!==58||e.src.charCodeAt(i+1)!==47||e.src.charCodeAt(i+2)!==47||(o=e.pending.match(un),!o)||(t=o[1],c=e.md.linkify.matchAtStart(e.src.slice(i-t.length)),!c)||(f=c.url,f.length<=t.length)||(f=f.replace(/\*+$/,""),s=e.md.normalizeLink(f),!e.md.validateLink(s))?!1:(r||(e.pending=e.pending.slice(0,-t.length),u=e.push("link_open","a",1),u.attrs=[["href",s]],u.markup="linkify",u.info="auto",u=e.push("text","",0),u.content=e.md.normalizeLinkText(f),u=e.push("link_close","a",-1),u.markup="linkify",u.info="auto"),e.pos+=f.length-t.length,!0)},hn=E.isSpace,pn=function(e,r){var i,l,o,t=e.pos;if(e.src.charCodeAt(t)!==10)return!1;if(i=e.pending.length-1,l=e.posMax,!r)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){for(o=i-1;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(t++;t<l&&hn(e.src.charCodeAt(t));)t++;return e.pos=t,!0},dn=E.isSpace,he=[];for(var Ee=0;Ee<256;Ee++)he.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(n){he[n.charCodeAt(0)]=1});var kn=function(e,r){var i,l,o,t,c,f=e.pos,s=e.posMax;if(e.src.charCodeAt(f)!==92||(f++,f>=s))return!1;if(i=e.src.charCodeAt(f),i===10){for(r||e.push("hardbreak","br",0),f++;f<s&&(i=e.src.charCodeAt(f),!!dn(i));)f++;return e.pos=f,!0}return t=e.src[f],i>=55296&&i<=56319&&f+1<s&&(l=e.src.charCodeAt(f+1),l>=56320&&l<=57343&&(t+=e.src[f+1],f++)),o="\\"+t,r||(c=e.push("text_special","",0),i<256&&he[i]!==0?c.content=t:c.content=o,c.markup=o,c.info="escape"),e.pos=f+1,!0},mn=function(e,r){var i,l,o,t,c,f,s,u,p=e.pos,h=e.src.charCodeAt(p);if(h!==96)return!1;for(i=p,p++,l=e.posMax;p<l&&e.src.charCodeAt(p)===96;)p++;if(o=e.src.slice(i,p),s=o.length,e.backticksScanned&&(e.backticks[s]||0)<=i)return r||(e.pending+=o),e.pos+=s,!0;for(f=p;(c=e.src.indexOf("`",f))!==-1;){for(f=c+1;f<l&&e.src.charCodeAt(f)===96;)f++;if(u=f-c,u===s)return r||(t=e.push("code_inline","code",0),t.markup=o,t.content=e.src.slice(p,c).replace(/\n/g," ").replace(/^ (.+) $/,"$1")),e.pos=f,!0;e.backticks[u]=c}return e.backticksScanned=!0,r||(e.pending+=o),e.pos+=s,!0},ee={};ee.tokenize=function(e,r){var i,l,o,t,c,f=e.pos,s=e.src.charCodeAt(f);if(r||s!==126||(l=e.scanDelims(e.pos,!0),t=l.length,c=String.fromCharCode(s),t<2))return!1;for(t%2&&(o=e.push("text","",0),o.content=c,t--),i=0;i<t;i+=2)o=e.push("text","",0),o.content=c+c,e.delimiters.push({marker:s,length:0,token:e.tokens.length-1,end:-1,open:l.can_open,close:l.can_close});return e.pos+=l.length,!0};function Se(n,e){var r,i,l,o,t,c=[],f=e.length;for(r=0;r<f;r++)l=e[r],l.marker===126&&l.end!==-1&&(o=e[l.end],t=n.tokens[l.token],t.type="s_open",t.tag="s",t.nesting=1,t.markup="~~",t.content="",t=n.tokens[o.token],t.type="s_close",t.tag="s",t.nesting=-1,t.markup="~~",t.content="",n.tokens[o.token-1].type==="text"&&n.tokens[o.token-1].content==="~"&&c.push(o.token-1));for(;c.length;){for(r=c.pop(),i=r+1;i<n.tokens.length&&n.tokens[i].type==="s_close";)i++;i--,r!==i&&(t=n.tokens[i],n.tokens[i]=n.tokens[r],n.tokens[r]=t)}}ee.postProcess=function(e){var r,i=e.tokens_meta,l=e.tokens_meta.length;for(Se(e,e.delimiters),r=0;r<l;r++)i[r]&&i[r].delimiters&&Se(e,i[r].delimiters)};var re={};re.tokenize=function(e,r){var i,l,o,t=e.pos,c=e.src.charCodeAt(t);if(r||c!==95&&c!==42)return!1;for(l=e.scanDelims(e.pos,c===42),i=0;i<l.length;i++)o=e.push("text","",0),o.content=String.fromCharCode(c),e.delimiters.push({marker:c,length:l.length,token:e.tokens.length-1,end:-1,open:l.can_open,close:l.can_close});return e.pos+=l.length,!0};function Me(n,e){var r,i,l,o,t,c,f=e.length;for(r=f-1;r>=0;r--)i=e[r],!(i.marker!==95&&i.marker!==42)&&i.end!==-1&&(l=e[i.end],c=r>0&&e[r-1].end===i.end+1&&e[r-1].marker===i.marker&&e[r-1].token===i.token-1&&e[i.end+1].token===l.token+1,t=String.fromCharCode(i.marker),o=n.tokens[i.token],o.type=c?"strong_open":"em_open",o.tag=c?"strong":"em",o.nesting=1,o.markup=c?t+t:t,o.content="",o=n.tokens[l.token],o.type=c?"strong_close":"em_close",o.tag=c?"strong":"em",o.nesting=-1,o.markup=c?t+t:t,o.content="",c&&(n.tokens[e[r-1].token].content="",n.tokens[e[i.end+1].token].content="",r--))}re.postProcess=function(e){var r,i=e.tokens_meta,l=e.tokens_meta.length;for(Me(e,e.delimiters),r=0;r<l;r++)i[r]&&i[r].delimiters&&Me(e,i[r].delimiters)};var xn=E.normalizeReference,le=E.isSpace,gn=function(e,r){var i,l,o,t,c,f,s,u,p,h="",a="",v=e.pos,x=e.posMax,C=e.pos,_=!0;if(e.src.charCodeAt(e.pos)!==91||(c=e.pos+1,t=e.md.helpers.parseLinkLabel(e,e.pos,!0),t<0))return!1;if(f=t+1,f<x&&e.src.charCodeAt(f)===40){for(_=!1,f++;f<x&&(l=e.src.charCodeAt(f),!(!le(l)&&l!==10));f++);if(f>=x)return!1;if(C=f,s=e.md.helpers.parseLinkDestination(e.src,f,e.posMax),s.ok){for(h=e.md.normalizeLink(s.str),e.md.validateLink(h)?f=s.pos:h="",C=f;f<x&&(l=e.src.charCodeAt(f),!(!le(l)&&l!==10));f++);if(s=e.md.helpers.parseLinkTitle(e.src,f,e.posMax),f<x&&C!==f&&s.ok)for(a=s.str,f=s.pos;f<x&&(l=e.src.charCodeAt(f),!(!le(l)&&l!==10));f++);}(f>=x||e.src.charCodeAt(f)!==41)&&(_=!0),f++}if(_){if(typeof e.env.references>"u")return!1;if(f<x&&e.src.charCodeAt(f)===91?(C=f+1,f=e.md.helpers.parseLinkLabel(e,f),f>=0?o=e.src.slice(C,f++):f=t+1):f=t+1,o||(o=e.src.slice(c,t)),u=e.env.references[xn(o)],!u)return e.pos=v,!1;h=u.href,a=u.title}return r||(e.pos=c,e.posMax=t,p=e.push("link_open","a",1),p.attrs=i=[["href",h]],a&&i.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,p=e.push("link_close","a",-1)),e.pos=f,e.posMax=x,!0},_n=E.normalizeReference,te=E.isSpace,vn=function(e,r){var i,l,o,t,c,f,s,u,p,h,a,v,x,C="",_=e.pos,k=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91||(f=e.pos+2,c=e.md.helpers.parseLinkLabel(e,e.pos+1,!1),c<0))return!1;if(s=c+1,s<k&&e.src.charCodeAt(s)===40){for(s++;s<k&&(l=e.src.charCodeAt(s),!(!te(l)&&l!==10));s++);if(s>=k)return!1;for(x=s,p=e.md.helpers.parseLinkDestination(e.src,s,e.posMax),p.ok&&(C=e.md.normalizeLink(p.str),e.md.validateLink(C)?s=p.pos:C=""),x=s;s<k&&(l=e.src.charCodeAt(s),!(!te(l)&&l!==10));s++);if(p=e.md.helpers.parseLinkTitle(e.src,s,e.posMax),s<k&&x!==s&&p.ok)for(h=p.str,s=p.pos;s<k&&(l=e.src.charCodeAt(s),!(!te(l)&&l!==10));s++);else h="";if(s>=k||e.src.charCodeAt(s)!==41)return e.pos=_,!1;s++}else{if(typeof e.env.references>"u")return!1;if(s<k&&e.src.charCodeAt(s)===91?(x=s+1,s=e.md.helpers.parseLinkLabel(e,s),s>=0?t=e.src.slice(x,s++):s=c+1):s=c+1,t||(t=e.src.slice(f,c)),u=e.env.references[_n(t)],!u)return e.pos=_,!1;C=u.href,h=u.title}return r||(o=e.src.slice(f,c),e.md.inline.parse(o,e.md,e.env,v=[]),a=e.push("image","img",0),a.attrs=i=[["src",C],["alt",""]],a.children=v,a.content=o,h&&i.push(["title",h])),e.pos=s,e.posMax=k,!0},bn=/^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Cn=/^([a-zA-Z][a-zA-Z0-9+.\-]{1,31}):([^<>\x00-\x20]*)$/,An=function(e,r){var i,l,o,t,c,f,s=e.pos;if(e.src.charCodeAt(s)!==60)return!1;for(c=e.pos,f=e.posMax;;){if(++s>=f||(t=e.src.charCodeAt(s),t===60))return!1;if(t===62)break}return i=e.src.slice(c+1,s),Cn.test(i)?(l=e.md.normalizeLink(i),e.md.validateLink(l)?(r||(o=e.push("link_open","a",1),o.attrs=[["href",l]],o.markup="autolink",o.info="auto",o=e.push("text","",0),o.content=e.md.normalizeLinkText(i),o=e.push("link_close","a",-1),o.markup="autolink",o.info="auto"),e.pos+=i.length+2,!0):!1):bn.test(i)?(l=e.md.normalizeLink("mailto:"+i),e.md.validateLink(l)?(r||(o=e.push("link_open","a",1),o.attrs=[["href",l]],o.markup="autolink",o.info="auto",o=e.push("text","",0),o.content=e.md.normalizeLinkText(i),o=e.push("link_close","a",-1),o.markup="autolink",o.info="auto"),e.pos+=i.length+2,!0):!1):!1},yn=Y.HTML_TAG_RE;function En(n){return/^<a[>\s]/i.test(n)}function Sn(n){return/^<\/a\s*>/i.test(n)}function Mn(n){var e=n|32;return e>=97&&e<=122}var Tn=function(e,r){var i,l,o,t,c=e.pos;return!e.md.options.html||(o=e.posMax,e.src.charCodeAt(c)!==60||c+2>=o)||(i=e.src.charCodeAt(c+1),i!==33&&i!==63&&i!==47&&!Mn(i))||(l=e.src.slice(c).match(yn),!l)?!1:(r||(t=e.push("html_inline","",0),t.content=l[0],En(t.content)&&e.linkLevel++,Sn(t.content)&&e.linkLevel--),e.pos+=l[0].length,!0)},Te=Oe,wn=E.has,In=E.isValidEntityCode,we=E.fromCodePoint,Rn=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Pn=/^&([a-z][a-z0-9]{1,31});/i,$n=function(e,r){var i,l,o,t,c=e.pos,f=e.posMax;if(e.src.charCodeAt(c)!==38||c+1>=f)return!1;if(i=e.src.charCodeAt(c+1),i===35){if(o=e.src.slice(c).match(Rn),o)return r||(l=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),t=e.push("text_special","",0),t.content=In(l)?we(l):we(65533),t.markup=o[0],t.info="entity"),e.pos+=o[0].length,!0}else if(o=e.src.slice(c).match(Pn),o&&wn(Te,o[1]))return r||(t=e.push("text_special","",0),t.content=Te[o[1]],t.markup=o[0],t.info="entity"),e.pos+=o[0].length,!0;return!1};function Ie(n){var e,r,i,l,o,t,c,f,s={},u=n.length;if(u){var p=0,h=-2,a=[];for(e=0;e<u;e++)if(i=n[e],a.push(0),(n[p].marker!==i.marker||h!==i.token-1)&&(p=e),h=i.token,i.length=i.length||0,!!i.close){for(s.hasOwnProperty(i.marker)||(s[i.marker]=[-1,-1,-1,-1,-1,-1]),o=s[i.marker][(i.open?3:0)+i.length%3],r=p-a[p]-1,t=r;r>o;r-=a[r]+1)if(l=n[r],l.marker===i.marker&&l.open&&l.end<0&&(c=!1,(l.close||i.open)&&(l.length+i.length)%3===0&&(l.length%3!==0||i.length%3!==0)&&(c=!0),!c)){f=r>0&&!n[r-1].open?a[r-1]+1:0,a[e]=e-r+f,a[r]=f,i.open=!1,l.end=e,l.close=!1,t=-1,h=-2;break}t!==-1&&(s[i.marker][(i.open?3:0)+(i.length||0)%3]=t)}}}var zn=function(e){var r,i=e.tokens_meta,l=e.tokens_meta.length;for(Ie(e.delimiters),r=0;r<l;r++)i[r]&&i[r].delimiters&&Ie(i[r].delimiters)},Ln=function(e){var r,i,l=0,o=e.tokens,t=e.tokens.length;for(r=i=0;r<t;r++)o[r].nesting<0&&l--,o[r].level=l,o[r].nesting>0&&l++,o[r].type==="text"&&r+1<t&&o[r+1].type==="text"?o[r+1].content=o[r].content+o[r+1].content:(r!==i&&(o[i]=o[r]),i++);r!==i&&(o.length=i)},pe=ue,Re=E.isWhiteSpace,Pe=E.isPunctChar,$e=E.isMdAsciiPunct;function U(n,e,r,i){this.src=n,this.env=r,this.md=e,this.tokens=i,this.tokens_meta=Array(i.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}U.prototype.pushPending=function(){var n=new pe("text","",0);return n.content=this.pending,n.level=this.pendingLevel,this.tokens.push(n),this.pending="",n};U.prototype.push=function(n,e,r){this.pending&&this.pushPending();var i=new pe(n,e,r),l=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],l={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(l),i};U.prototype.scanDelims=function(n,e){var r=n,i,l,o,t,c,f,s,u,p,h=!0,a=!0,v=this.posMax,x=this.src.charCodeAt(n);for(i=n>0?this.src.charCodeAt(n-1):32;r<v&&this.src.charCodeAt(r)===x;)r++;return o=r-n,l=r<v?this.src.charCodeAt(r):32,s=$e(i)||Pe(String.fromCharCode(i)),p=$e(l)||Pe(String.fromCharCode(l)),f=Re(i),u=Re(l),u?h=!1:p&&(f||s||(h=!1)),f?a=!1:s&&(u||p||(a=!1)),e?(t=h,c=a):(t=h&&(!a||s),c=a&&(!h||p)),{can_open:t,can_close:c,length:o}};U.prototype.Token=pe;var On=U,ze=se,fe=[["text",sn],["linkify",an],["newline",pn],["escape",kn],["backticks",mn],["strikethrough",ee.tokenize],["emphasis",re.tokenize],["link",gn],["image",vn],["autolink",An],["html_inline",Tn],["entity",$n]],ce=[["balance_pairs",zn],["strikethrough",ee.postProcess],["emphasis",re.postProcess],["fragments_join",Ln]];function G(){var n;for(this.ruler=new ze,n=0;n<fe.length;n++)this.ruler.push(fe[n][0],fe[n][1]);for(this.ruler2=new ze,n=0;n<ce.length;n++)this.ruler2.push(ce[n][0],ce[n][1])}G.prototype.skipToken=function(n){var e,r,i=n.pos,l=this.ruler.getRules(""),o=l.length,t=n.md.options.maxNesting,c=n.cache;if(typeof c[i]<"u"){n.pos=c[i];return}if(n.level<t){for(r=0;r<o;r++)if(n.level++,e=l[r](n,!0),n.level--,e){if(i>=n.pos)throw new Error("inline rule didn't increment state.pos");break}}else n.pos=n.posMax;e||n.pos++,c[i]=n.pos};G.prototype.tokenize=function(n){for(var e,r,i,l=this.ruler.getRules(""),o=l.length,t=n.posMax,c=n.md.options.maxNesting;n.pos<t;){if(i=n.pos,n.level<c){for(r=0;r<o;r++)if(e=l[r](n,!1),e){if(i>=n.pos)throw new Error("inline rule didn't increment state.pos");break}}if(e){if(n.pos>=t)break;continue}n.pending+=n.src[n.pos++]}n.pending&&n.pushPending()};G.prototype.parse=function(n,e,r,i){var l,o,t,c=new this.State(n,e,r,i);for(this.tokenize(c),o=this.ruler2.getRules(""),t=o.length,l=0;l<t;l++)o[l](c)};G.prototype.State=On;var Dn=G,Fn={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},Bn={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},qn={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},Z=E,jn=J,Nn=ir,Hn=Mr,Zn=fn,Un=Dn,Gn=Ve,D=Le,He=Je,Wn={default:Fn,zero:Bn,commonmark:qn},Qn=/^(vbscript|javascript|file|data):/,Vn=/^data:image\/(gif|png|jpeg|webp);/;function Jn(n){var e=n.trim().toLowerCase();return Qn.test(e)?!!Vn.test(e):!0}var Ze=["http:","https:","mailto:"];function Yn(n){var e=D.parse(n,!0);if(e.hostname&&(!e.protocol||Ze.indexOf(e.protocol)>=0))try{e.hostname=He.toASCII(e.hostname)}catch{}return D.encode(D.format(e))}function Kn(n){var e=D.parse(n,!0);if(e.hostname&&(!e.protocol||Ze.indexOf(e.protocol)>=0))try{e.hostname=He.toUnicode(e.hostname)}catch{}return D.decode(D.format(e),D.decode.defaultChars+"%")}function I(n,e){if(!(this instanceof I))return new I(n,e);e||Z.isString(n)||(e=n||{},n="default"),this.inline=new Un,this.block=new Zn,this.core=new Hn,this.renderer=new Nn,this.linkify=new Gn,this.validateLink=Jn,this.normalizeLink=Yn,this.normalizeLinkText=Kn,this.utils=Z,this.helpers=Z.assign({},jn),this.options={},this.configure(n),e&&this.set(e)}I.prototype.set=function(n){return Z.assign(this.options,n),this};I.prototype.configure=function(n){var e=this,r;if(Z.isString(n)&&(r=n,n=Wn[r],!n))throw new Error('Wrong `markdown-it` preset "'+r+'", check name');if(!n)throw new Error("Wrong `markdown-it` preset, can't be empty");return n.options&&e.set(n.options),n.components&&Object.keys(n.components).forEach(function(i){n.components[i].rules&&e[i].ruler.enableOnly(n.components[i].rules),n.components[i].rules2&&e[i].ruler2.enableOnly(n.components[i].rules2)}),this};I.prototype.enable=function(n,e){var r=[];Array.isArray(n)||(n=[n]),["core","block","inline"].forEach(function(l){r=r.concat(this[l].ruler.enable(n,!0))},this),r=r.concat(this.inline.ruler2.enable(n,!0));var i=n.filter(function(l){return r.indexOf(l)<0});if(i.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+i);return this};I.prototype.disable=function(n,e){var r=[];Array.isArray(n)||(n=[n]),["core","block","inline"].forEach(function(l){r=r.concat(this[l].ruler.disable(n,!0))},this),r=r.concat(this.inline.ruler2.disable(n,!0));var i=n.filter(function(l){return r.indexOf(l)<0});if(i.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+i);return this};I.prototype.use=function(n){var e=[this].concat(Array.prototype.slice.call(arguments,1));return n.apply(n,e),this};I.prototype.parse=function(n,e){if(typeof n!="string")throw new Error("Input data should be a String");var r=new this.core.State(n,this,e);return this.core.process(r),r.tokens};I.prototype.render=function(n,e){return e=e||{},this.renderer.render(this.parse(n,e),this.options,e)};I.prototype.parseInline=function(n,e){var r=new this.core.State(n,this,e);return r.inlineMode=!0,this.core.process(r),r.tokens};I.prototype.renderInline=function(n,e){return e=e||{},this.renderer.render(this.parseInline(n,e),this.options,e)};var Xn=I,ei=Xn;const fi=Ue(ei);export{fi as F};
