md-editor-v3 4.15.1 → 4.15.2

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.
@@ -553,7 +553,7 @@ const HeadingPlugin = (md, options) => {
553
553
  var _a;
554
554
  const token = tokens[idx];
555
555
  const text = ((_a = tokens[idx + 1].children) == null ? void 0 : _a.reduce((p, c) => {
556
- return p + c.type === "text" ? c.content || "" : "";
556
+ return p + (["text", "code_inline"].includes(c.type) ? c.content || "" : "");
557
557
  }, "")) || "";
558
558
  const level = token.markup.length;
559
559
  options.headsRef.value.push({
@@ -552,7 +552,7 @@ const HeadingPlugin = (md, options) => {
552
552
  var _a;
553
553
  const token = tokens[idx];
554
554
  const text = ((_a = tokens[idx + 1].children) == null ? void 0 : _a.reduce((p, c) => {
555
- return p + c.type === "text" ? c.content || "" : "";
555
+ return p + (["text", "code_inline"].includes(c.type) ? c.content || "" : "");
556
556
  }, "")) || "";
557
557
  const level = token.markup.length;
558
558
  options.headsRef.value.push({
package/lib/umd/index.js CHANGED
@@ -112,7 +112,7 @@ See: https://github.com/francoischalifour/medium-zoom`)}},BV=function(t){var n=d
112
112
  `),t=t.replace(t6,"�"),e.src=t}function i6(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function r6(e){const t=e.tokens;for(let n=0,i=t.length;n<i;n++){const r=t[n];r.type==="inline"&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}function o6(e){return/^<a[>\s]/i.test(e)}function a6(e){return/^<\/a\s*>/i.test(e)}function O6(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,i=t.length;n<i;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let r=t[n].children,o=0;for(let a=r.length-1;a>=0;a--){const O=r[a];if(O.type==="link_close"){for(a--;r[a].level!==O.level&&r[a].type!=="link_open";)a--;continue}if(O.type==="html_inline"&&(o6(O.content)&&o>0&&o--,a6(O.content)&&o++),!(o>0)&&O.type==="text"&&e.md.linkify.test(O.content)){const l=O.content;let s=e.md.linkify.match(l);const u=[];let c=O.level,f=0;s.length>0&&s[0].index===0&&a>0&&r[a-1].type==="text_special"&&(s=s.slice(1));for(let h=0;h<s.length;h++){const p=s[h].url,m=e.md.normalizeLink(p);if(!e.md.validateLink(m))continue;let Q=s[h].text;s[h].schema?s[h].schema==="mailto:"&&!/^mailto:/i.test(Q)?Q=e.md.normalizeLinkText("mailto:"+Q).replace(/^mailto:/,""):Q=e.md.normalizeLinkText(Q):Q=e.md.normalizeLinkText("http://"+Q).replace(/^http:\/\//,"");const $=s[h].index;if($>f){const P=new e.Token("text","",0);P.content=l.slice(f,$),P.level=c,u.push(P)}const b=new e.Token("link_open","a",1);b.attrs=[["href",m]],b.level=c++,b.markup="linkify",b.info="auto",u.push(b);const S=new e.Token("text","",0);S.content=Q,S.level=c,u.push(S);const k=new e.Token("link_close","a",-1);k.level=--c,k.markup="linkify",k.info="auto",u.push(k),f=s[h].lastIndex}if(f<l.length){const h=new e.Token("text","",0);h.content=l.slice(f),h.level=c,u.push(h)}t[n].children=r=nx(r,a,u)}}}}const ox=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,l6=/\((c|tm|r)\)/i,s6=/\((c|tm|r)\)/ig,u6={c:"©",r:"®",tm:"™"};function c6(e,t){return u6[t.toLowerCase()]}function f6(e){let t=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!t&&(i.content=i.content.replace(s6,c6)),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function d6(e){let t=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!t&&ox.test(i.content)&&(i.content=i.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–")),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function h6(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(l6.test(e.tokens[t].content)&&f6(e.tokens[t].children),ox.test(e.tokens[t].content)&&d6(e.tokens[t].children))}const p6=/['"]/,ax=/['"]/g,Ox="’";function Rc(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function m6(e,t){let n;const i=[];for(let r=0;r<e.length;r++){const o=e[r],a=e[r].level;for(n=i.length-1;n>=0&&!(i[n].level<=a);n--);if(i.length=n+1,o.type!=="text")continue;let O=o.content,l=0,s=O.length;e:for(;l<s;){ax.lastIndex=l;const u=ax.exec(O);if(!u)break;let c=!0,f=!0;l=u.index+1;const h=u[0]==="'";let p=32;if(u.index-1>=0)p=O.charCodeAt(u.index-1);else for(n=r-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){p=e[n].content.charCodeAt(e[n].content.length-1);break}let m=32;if(l<s)m=O.charCodeAt(l);else for(n=r+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){m=e[n].content.charCodeAt(0);break}const Q=Al(p)||jl(String.fromCharCode(p)),$=Al(m)||jl(String.fromCharCode(m)),b=Cl(p),S=Cl(m);if(S?c=!1:$&&(b||Q||(c=!1)),b?f=!1:Q&&(S||$||(f=!1)),m===34&&u[0]==='"'&&p>=48&&p<=57&&(f=c=!1),c&&f&&(c=Q,f=$),!c&&!f){h&&(o.content=Rc(o.content,u.index,Ox));continue}if(f)for(n=i.length-1;n>=0;n--){let k=i[n];if(i[n].level<a)break;if(k.single===h&&i[n].level===a){k=i[n];let P,R;h?(P=t.md.options.quotes[2],R=t.md.options.quotes[3]):(P=t.md.options.quotes[0],R=t.md.options.quotes[1]),o.content=Rc(o.content,u.index,R),e[k.token].content=Rc(e[k.token].content,k.pos,P),l+=R.length-1,k.token===r&&(l+=P.length-1),O=o.content,s=O.length,i.length=n;continue e}}c?i.push({token:r,pos:u.index,single:h,level:a}):f&&h&&(o.content=Rc(o.content,u.index,Ox))}}}function g6(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!p6.test(e.tokens[t].content)||m6(e.tokens[t].children,e)}function $6(e){let t,n;const i=e.tokens,r=i.length;for(let o=0;o<r;o++){if(i[o].type!=="inline")continue;const a=i[o].children,O=a.length;for(t=0;t<O;t++)a[t].type==="text_special"&&(a[t].type="text");for(t=n=0;t<O;t++)a[t].type==="text"&&t+1<O&&a[t+1].type==="text"?a[t+1].content=a[t].content+a[t+1].content:(t!==n&&(a[n]=a[t]),n++);t!==n&&(a.length=n)}}const Um=[["normalize",n6],["block",i6],["inline",r6],["linkify",O6],["replacements",h6],["smartquotes",g6],["text_join",$6]];function Em(){this.ruler=new pn;for(let e=0;e<Um.length;e++)this.ruler.push(Um[e][0],Um[e][1])}Em.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,i=t.length;n<i;n++)t[n](e)},Em.prototype.State=rx;function Ki(e,t,n,i){this.src=e,this.md=t,this.env=n,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;const r=this.src;for(let o=0,a=0,O=0,l=0,s=r.length,u=!1;a<s;a++){const c=r.charCodeAt(a);if(!u)if(Le(c)){O++,c===9?l+=4-l%4:l++;continue}else u=!0;(c===10||a===s-1)&&(c!==10&&a++,this.bMarks.push(o),this.eMarks.push(a),this.tShift.push(O),this.sCount.push(l),this.bsCount.push(0),u=!1,O=0,l=0,o=a+1)}this.bMarks.push(r.length),this.eMarks.push(r.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Ki.prototype.push=function(e,t,n){const i=new Qi(e,t,n);return i.block=!0,n<0&&this.level--,i.level=this.level,n>0&&this.level++,this.tokens.push(i),i},Ki.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},Ki.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t},Ki.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){const i=this.src.charCodeAt(t);if(!Le(i))break}return t},Ki.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!Le(this.src.charCodeAt(--t)))return t+1;return t},Ki.prototype.skipChars=function(t,n){for(let i=this.src.length;t<i&&this.src.charCodeAt(t)===n;t++);return t},Ki.prototype.skipCharsBack=function(t,n,i){if(t<=i)return t;for(;t>i;)if(n!==this.src.charCodeAt(--t))return t+1;return t},Ki.prototype.getLines=function(t,n,i,r){if(t>=n)return"";const o=new Array(n-t);for(let a=0,O=t;O<n;O++,a++){let l=0;const s=this.bMarks[O];let u=s,c;for(O+1<n||r?c=this.eMarks[O]+1:c=this.eMarks[O];u<c&&l<i;){const f=this.src.charCodeAt(u);if(Le(f))f===9?l+=4-(l+this.bsCount[O])%4:l++;else if(u-s<this.tShift[O])l++;else break;u++}l>i?o[a]=new Array(l-i+1).join(" ")+this.src.slice(u,c):o[a]=this.src.slice(u,c)}return o.join("")},Ki.prototype.Token=Qi;const Q6=65536;function Ym(e,t){const n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];return e.src.slice(n,i)}function lx(e){const t=[],n=e.length;let i=0,r=e.charCodeAt(i),o=!1,a=0,O="";for(;i<n;)r===124&&(o?(O+=e.substring(a,i-1),a=i):(t.push(O+e.substring(a,i)),O="",a=i+1)),o=r===92,i++,r=e.charCodeAt(i);return t.push(O+e.substring(a)),t}function b6(e,t,n,i){if(t+2>n)return!1;let r=t+1;if(e.sCount[r]<e.blkIndent||e.sCount[r]-e.blkIndent>=4)return!1;let o=e.bMarks[r]+e.tShift[r];if(o>=e.eMarks[r])return!1;const a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58||o>=e.eMarks[r])return!1;const O=e.src.charCodeAt(o++);if(O!==124&&O!==45&&O!==58&&!Le(O)||a===45&&Le(O))return!1;for(;o<e.eMarks[r];){const k=e.src.charCodeAt(o);if(k!==124&&k!==45&&k!==58&&!Le(k))return!1;o++}let l=Ym(e,t+1),s=l.split("|");const u=[];for(let k=0;k<s.length;k++){const P=s[k].trim();if(!P){if(k===0||k===s.length-1)continue;return!1}if(!/^:?-+:?$/.test(P))return!1;P.charCodeAt(P.length-1)===58?u.push(P.charCodeAt(0)===58?"center":"right"):P.charCodeAt(0)===58?u.push("left"):u.push("")}if(l=Ym(e,t).trim(),l.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;s=lx(l),s.length&&s[0]===""&&s.shift(),s.length&&s[s.length-1]===""&&s.pop();const c=s.length;if(c===0||c!==u.length)return!1;if(i)return!0;const f=e.parentType;e.parentType="table";const h=e.md.block.ruler.getRules("blockquote"),p=e.push("table_open","table",1),m=[t,0];p.map=m;const Q=e.push("thead_open","thead",1);Q.map=[t,t+1];const $=e.push("tr_open","tr",1);$.map=[t,t+1];for(let k=0;k<s.length;k++){const P=e.push("th_open","th",1);u[k]&&(P.attrs=[["style","text-align:"+u[k]]]);const R=e.push("inline","",0);R.content=s[k].trim(),R.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let b,S=0;for(r=t+2;r<n&&!(e.sCount[r]<e.blkIndent);r++){let k=!1;for(let R=0,v=h.length;R<v;R++)if(h[R](e,r,n,!0)){k=!0;break}if(k||(l=Ym(e,r).trim(),!l)||e.sCount[r]-e.blkIndent>=4||(s=lx(l),s.length&&s[0]===""&&s.shift(),s.length&&s[s.length-1]===""&&s.pop(),S+=c-s.length,S>Q6))break;if(r===t+2){const R=e.push("tbody_open","tbody",1);R.map=b=[t+2,0]}const P=e.push("tr_open","tr",1);P.map=[r,r+1];for(let R=0;R<c;R++){const v=e.push("td_open","td",1);u[R]&&(v.attrs=[["style","text-align:"+u[R]]]);const w=e.push("inline","",0);w.content=s[R]?s[R].trim():"",w.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return b&&(e.push("tbody_close","tbody",-1),b[1]=r),e.push("table_close","table",-1),m[1]=r,e.parentType=f,e.line=r,!0}function y6(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let i=t+1,r=i;for(;i<n;){if(e.isEmpty(i)){i++;continue}if(e.sCount[i]-e.blkIndent>=4){i++,r=i;continue}break}e.line=r;const o=e.push("code_block","code",0);return o.content=e.getLines(t,r,4+e.blkIndent,!1)+`
113
113
  `,o.map=[t,e.line],!0}function S6(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||r+3>o)return!1;const a=e.src.charCodeAt(r);if(a!==126&&a!==96)return!1;let O=r;r=e.skipChars(r,a);let l=r-O;if(l<3)return!1;const s=e.src.slice(O,r),u=e.src.slice(r,o);if(a===96&&u.indexOf(String.fromCharCode(a))>=0)return!1;if(i)return!0;let c=t,f=!1;for(;c++,!(c>=n||(r=O=e.bMarks[c]+e.tShift[c],o=e.eMarks[c],r<o&&e.sCount[c]<e.blkIndent));)if(e.src.charCodeAt(r)===a&&!(e.sCount[c]-e.blkIndent>=4)&&(r=e.skipChars(r,a),!(r-O<l)&&(r=e.skipSpaces(r),!(r<o)))){f=!0;break}l=e.sCount[t],e.line=c+(f?1:0);const h=e.push("fence","code",0);return h.info=u,h.content=e.getLines(t+1,c,l,!0),h.markup=s,h.map=[t,e.line],!0}function P6(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];const a=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(r)!==62)return!1;if(i)return!0;const O=[],l=[],s=[],u=[],c=e.md.block.ruler.getRules("blockquote"),f=e.parentType;e.parentType="blockquote";let h=!1,p;for(p=t;p<n;p++){const S=e.sCount[p]<e.blkIndent;if(r=e.bMarks[p]+e.tShift[p],o=e.eMarks[p],r>=o)break;if(e.src.charCodeAt(r++)===62&&!S){let P=e.sCount[p]+1,R,v;e.src.charCodeAt(r)===32?(r++,P++,v=!1,R=!0):e.src.charCodeAt(r)===9?(R=!0,(e.bsCount[p]+P)%4===3?(r++,P++,v=!1):v=!0):R=!1;let w=P;for(O.push(e.bMarks[p]),e.bMarks[p]=r;r<o;){const x=e.src.charCodeAt(r);if(Le(x))x===9?w+=4-(w+e.bsCount[p]+(v?1:0))%4:w++;else break;r++}h=r>=o,l.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(R?1:0),s.push(e.sCount[p]),e.sCount[p]=w-P,u.push(e.tShift[p]),e.tShift[p]=r-e.bMarks[p];continue}if(h)break;let k=!1;for(let P=0,R=c.length;P<R;P++)if(c[P](e,p,n,!0)){k=!0;break}if(k){e.lineMax=p,e.blkIndent!==0&&(O.push(e.bMarks[p]),l.push(e.bsCount[p]),u.push(e.tShift[p]),s.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}O.push(e.bMarks[p]),l.push(e.bsCount[p]),u.push(e.tShift[p]),s.push(e.sCount[p]),e.sCount[p]=-1}const m=e.blkIndent;e.blkIndent=0;const Q=e.push("blockquote_open","blockquote",1);Q.markup=">";const $=[t,0];Q.map=$,e.md.block.tokenize(e,t,p);const b=e.push("blockquote_close","blockquote",-1);b.markup=">",e.lineMax=a,e.parentType=f,$[1]=e.line;for(let S=0;S<u.length;S++)e.bMarks[S+t]=O[S],e.tShift[S+t]=u[S],e.sCount[S+t]=s[S],e.bsCount[S+t]=l[S];return e.blkIndent=m,!0}function k6(e,t,n,i){const r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(o++);if(a!==42&&a!==45&&a!==95)return!1;let O=1;for(;o<r;){const s=e.src.charCodeAt(o++);if(s!==a&&!Le(s))return!1;s===a&&O++}if(O<3)return!1;if(i)return!0;e.line=t+1;const l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(O+1).join(String.fromCharCode(a)),!0}function sx(e,t){const n=e.eMarks[t];let i=e.bMarks[t]+e.tShift[t];const r=e.src.charCodeAt(i++);if(r!==42&&r!==45&&r!==43)return-1;if(i<n){const o=e.src.charCodeAt(i);if(!Le(o))return-1}return i}function ux(e,t){const n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];let r=n;if(r+1>=i)return-1;let o=e.src.charCodeAt(r++);if(o<48||o>57)return-1;for(;;){if(r>=i)return-1;if(o=e.src.charCodeAt(r++),o>=48&&o<=57){if(r-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return r<i&&(o=e.src.charCodeAt(r),!Le(o))?-1:r}function x6(e,t){const n=e.level+2;for(let i=t+2,r=e.tokens.length-2;i<r;i++)e.tokens[i].level===n&&e.tokens[i].type==="paragraph_open"&&(e.tokens[i+2].hidden=!0,e.tokens[i].hidden=!0,i+=2)}function v6(e,t,n,i){let r,o,a,O,l=t,s=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let u=!1;i&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(u=!0);let c,f,h;if((h=ux(e,l))>=0){if(c=!0,a=e.bMarks[l]+e.tShift[l],f=Number(e.src.slice(a,h-1)),u&&f!==1)return!1}else if((h=sx(e,l))>=0)c=!1;else return!1;if(u&&e.skipSpaces(h)>=e.eMarks[l])return!1;if(i)return!0;const p=e.src.charCodeAt(h-1),m=e.tokens.length;c?(O=e.push("ordered_list_open","ol",1),f!==1&&(O.attrs=[["start",f]])):O=e.push("bullet_list_open","ul",1);const Q=[l,0];O.map=Q,O.markup=String.fromCharCode(p);let $=!1;const b=e.md.block.ruler.getRules("list"),S=e.parentType;for(e.parentType="list";l<n;){o=h,r=e.eMarks[l];const k=e.sCount[l]+h-(e.bMarks[l]+e.tShift[l]);let P=k;for(;o<r;){const Z=e.src.charCodeAt(o);if(Z===9)P+=4-(P+e.bsCount[l])%4;else if(Z===32)P++;else break;o++}const R=o;let v;R>=r?v=1:v=P-k,v>4&&(v=1);const w=k+v;O=e.push("list_item_open","li",1),O.markup=String.fromCharCode(p);const x=[l,0];O.map=x,c&&(O.info=e.src.slice(a,h-1));const U=e.tight,q=e.tShift[l],V=e.sCount[l],E=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=w,e.tight=!0,e.tShift[l]=R-e.bMarks[l],e.sCount[l]=P,R>=r&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||$)&&(s=!1),$=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=E,e.tShift[l]=q,e.sCount[l]=V,e.tight=U,O=e.push("list_item_close","li",-1),O.markup=String.fromCharCode(p),l=e.line,x[1]=l,l>=n||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let X=!1;for(let Z=0,W=b.length;Z<W;Z++)if(b[Z](e,l,n,!0)){X=!0;break}if(X)break;if(c){if(h=ux(e,l),h<0)break;a=e.bMarks[l]+e.tShift[l]}else if(h=sx(e,l),h<0)break;if(p!==e.src.charCodeAt(h-1))break}return c?O=e.push("ordered_list_close","ol",-1):O=e.push("bullet_list_close","ul",-1),O.markup=String.fromCharCode(p),Q[1]=l,e.line=l,e.parentType=S,s&&x6(e,m),!0}function w6(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],a=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(r)!==91)return!1;function O(b){const S=e.lineMax;if(b>=S||e.isEmpty(b))return null;let k=!1;if(e.sCount[b]-e.blkIndent>3&&(k=!0),e.sCount[b]<0&&(k=!0),!k){const v=e.md.block.ruler.getRules("reference"),w=e.parentType;e.parentType="reference";let x=!1;for(let U=0,q=v.length;U<q;U++)if(v[U](e,b,S,!0)){x=!0;break}if(e.parentType=w,x)return null}const P=e.bMarks[b]+e.tShift[b],R=e.eMarks[b];return e.src.slice(P,R+1)}let l=e.src.slice(r,o+1);o=l.length;let s=-1;for(r=1;r<o;r++){const b=l.charCodeAt(r);if(b===91)return!1;if(b===93){s=r;break}else if(b===10){const S=O(a);S!==null&&(l+=S,o=l.length,a++)}else if(b===92&&(r++,r<o&&l.charCodeAt(r)===10)){const S=O(a);S!==null&&(l+=S,o=l.length,a++)}}if(s<0||l.charCodeAt(s+1)!==58)return!1;for(r=s+2;r<o;r++){const b=l.charCodeAt(r);if(b===10){const S=O(a);S!==null&&(l+=S,o=l.length,a++)}else if(!Le(b))break}const u=e.md.helpers.parseLinkDestination(l,r,o);if(!u.ok)return!1;const c=e.md.normalizeLink(u.str);if(!e.md.validateLink(c))return!1;r=u.pos;const f=r,h=a,p=r;for(;r<o;r++){const b=l.charCodeAt(r);if(b===10){const S=O(a);S!==null&&(l+=S,o=l.length,a++)}else if(!Le(b))break}let m=e.md.helpers.parseLinkTitle(l,r,o);for(;m.can_continue;){const b=O(a);if(b===null)break;l+=b,r=o,o=l.length,a++,m=e.md.helpers.parseLinkTitle(l,r,o,m)}let Q;for(r<o&&p!==r&&m.ok?(Q=m.str,r=m.pos):(Q="",r=f,a=h);r<o;){const b=l.charCodeAt(r);if(!Le(b))break;r++}if(r<o&&l.charCodeAt(r)!==10&&Q)for(Q="",r=f,a=h;r<o;){const b=l.charCodeAt(r);if(!Le(b))break;r++}if(r<o&&l.charCodeAt(r)!==10)return!1;const $=_c(l.slice(1,s));return $?(i||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[$]>"u"&&(e.env.references[$]={title:Q,href:c}),e.line=a),!0):!1}const X6=["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"],T6="[a-zA-Z_:][a-zA-Z0-9:._-]*",_6="(?:"+"[^\"'=<>`\\x00-\\x20]+"+"|"+"'[^']*'"+"|"+'"[^"]*"'+")",cx="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+T6+"(?:\\s*=\\s*"+_6+")?)")+"*\\s*\\/?>",fx="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",R6="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",z6="<[?][\\s\\S]*?[?]>",W6="<![A-Za-z][^>]*>",q6="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",Z6=new RegExp("^(?:"+cx+"|"+fx+"|"+R6+"|"+z6+"|"+W6+"|"+q6+")"),U6=new RegExp("^(?:"+cx+"|"+fx+")"),aO=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+X6.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(U6.source+"\\s*$"),/^$/,!1]];function E6(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(r)!==60)return!1;let a=e.src.slice(r,o),O=0;for(;O<aO.length&&!aO[O][0].test(a);O++);if(O===aO.length)return!1;if(i)return aO[O][2];let l=t+1;if(!aO[O][1].test(a)){for(;l<n&&!(e.sCount[l]<e.blkIndent);l++)if(r=e.bMarks[l]+e.tShift[l],o=e.eMarks[l],a=e.src.slice(r,o),aO[O][1].test(a)){a.length!==0&&l++;break}}e.line=l;const s=e.push("html_block","",0);return s.map=[t,l],s.content=e.getLines(t,l,e.blkIndent,!0),!0}function Y6(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.src.charCodeAt(r);if(a!==35||r>=o)return!1;let O=1;for(a=e.src.charCodeAt(++r);a===35&&r<o&&O<=6;)O++,a=e.src.charCodeAt(++r);if(O>6||r<o&&!Le(a))return!1;if(i)return!0;o=e.skipSpacesBack(o,r);const l=e.skipCharsBack(o,35,r);l>r&&Le(e.src.charCodeAt(l-1))&&(o=l),e.line=t+1;const s=e.push("heading_open","h"+String(O),1);s.markup="########".slice(0,O),s.map=[t,e.line];const u=e.push("inline","",0);u.content=e.src.slice(r,o).trim(),u.map=[t,e.line],u.children=[];const c=e.push("heading_close","h"+String(O),-1);return c.markup="########".slice(0,O),!0}function V6(e,t,n){const i=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const r=e.parentType;e.parentType="paragraph";let o=0,a,O=t+1;for(;O<n&&!e.isEmpty(O);O++){if(e.sCount[O]-e.blkIndent>3)continue;if(e.sCount[O]>=e.blkIndent){let h=e.bMarks[O]+e.tShift[O];const p=e.eMarks[O];if(h<p&&(a=e.src.charCodeAt(h),(a===45||a===61)&&(h=e.skipChars(h,a),h=e.skipSpaces(h),h>=p))){o=a===61?1:2;break}}if(e.sCount[O]<0)continue;let f=!1;for(let h=0,p=i.length;h<p;h++)if(i[h](e,O,n,!0)){f=!0;break}if(f)break}if(!o)return!1;const l=e.getLines(t,O,e.blkIndent,!1).trim();e.line=O+1;const s=e.push("heading_open","h"+String(o),1);s.markup=String.fromCharCode(a),s.map=[t,e.line];const u=e.push("inline","",0);u.content=l,u.map=[t,e.line-1],u.children=[];const c=e.push("heading_close","h"+String(o),-1);return c.markup=String.fromCharCode(a),e.parentType=r,!0}function C6(e,t,n){const i=e.md.block.ruler.getRules("paragraph"),r=e.parentType;let o=t+1;for(e.parentType="paragraph";o<n&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3||e.sCount[o]<0)continue;let s=!1;for(let u=0,c=i.length;u<c;u++)if(i[u](e,o,n,!0)){s=!0;break}if(s)break}const a=e.getLines(t,o,e.blkIndent,!1).trim();e.line=o;const O=e.push("paragraph_open","p",1);O.map=[t,e.line];const l=e.push("inline","",0);return l.content=a,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=r,!0}const zc=[["table",b6,["paragraph","reference"]],["code",y6],["fence",S6,["paragraph","reference","blockquote","list"]],["blockquote",P6,["paragraph","reference","blockquote","list"]],["hr",k6,["paragraph","reference","blockquote","list"]],["list",v6,["paragraph","reference","blockquote"]],["reference",w6],["html_block",E6,["paragraph","reference","blockquote"]],["heading",Y6,["paragraph","reference","blockquote"]],["lheading",V6],["paragraph",C6]];function Wc(){this.ruler=new pn;for(let e=0;e<zc.length;e++)this.ruler.push(zc[e][0],zc[e][1],{alt:(zc[e][2]||[]).slice()})}Wc.prototype.tokenize=function(e,t,n){const i=this.ruler.getRules(""),r=i.length,o=e.md.options.maxNesting;let a=t,O=!1;for(;a<n&&(e.line=a=e.skipEmptyLines(a),!(a>=n||e.sCount[a]<e.blkIndent));){if(e.level>=o){e.line=n;break}const l=e.line;let s=!1;for(let u=0;u<r;u++)if(s=i[u](e,a,n,!1),s){if(l>=e.line)throw new Error("block rule didn't increment state.line");break}if(!s)throw new Error("none of the block rules matched");e.tight=!O,e.isEmpty(e.line-1)&&(O=!0),a=e.line,a<n&&e.isEmpty(a)&&(O=!0,a++,e.line=a)}},Wc.prototype.parse=function(e,t,n,i){if(!e)return;const r=new this.State(e,t,n,i);this.tokenize(r,r.line,r.lineMax)},Wc.prototype.State=Ki;function Gl(e,t,n,i){this.src=e,this.env=n,this.md=t,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}Gl.prototype.pushPending=function(){const e=new Qi("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},Gl.prototype.push=function(e,t,n){this.pending&&this.pushPending();const i=new Qi(e,t,n);let r=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(r),i},Gl.prototype.scanDelims=function(e,t){const n=this.posMax,i=this.src.charCodeAt(e),r=e>0?this.src.charCodeAt(e-1):32;let o=e;for(;o<n&&this.src.charCodeAt(o)===i;)o++;const a=o-e,O=o<n?this.src.charCodeAt(o):32,l=Al(r)||jl(String.fromCharCode(r)),s=Al(O)||jl(String.fromCharCode(O)),u=Cl(r),c=Cl(O),f=!c&&(!s||u||l),h=!u&&(!l||c||s);return{can_open:f&&(t||!h||l),can_close:h&&(t||!f||s),length:a}},Gl.prototype.Token=Qi;function j6(e){switch(e){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}}function A6(e,t){let n=e.pos;for(;n<e.posMax&&!j6(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const G6=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function I6(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,i=e.posMax;if(n+3>i||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const r=e.pending.match(G6);if(!r)return!1;const o=r[1],a=e.md.linkify.matchAtStart(e.src.slice(n-o.length));if(!a)return!1;let O=a.url;if(O.length<=o.length)return!1;O=O.replace(/\*+$/,"");const l=e.md.normalizeLink(O);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const s=e.push("link_open","a",1);s.attrs=[["href",l]],s.markup="linkify",s.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(O);const c=e.push("link_close","a",-1);c.markup="linkify",c.info="auto"}return e.pos+=O.length-o.length,!0}function D6(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const i=e.pending.length-1,r=e.posMax;if(!t)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){let o=i-1;for(;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(n++;n<r&&Le(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const Vm=[];for(let e=0;e<256;e++)Vm.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Vm[e.charCodeAt(0)]=1});function N6(e,t){let n=e.pos;const i=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=i))return!1;let r=e.src.charCodeAt(n);if(r===10){for(t||e.push("hardbreak","br",0),n++;n<i&&(r=e.src.charCodeAt(n),!!Le(r));)n++;return e.pos=n,!0}let o=e.src[n];if(r>=55296&&r<=56319&&n+1<i){const O=e.src.charCodeAt(n+1);O>=56320&&O<=57343&&(o+=e.src[n+1],n++)}const a="\\"+o;if(!t){const O=e.push("text_special","",0);r<256&&Vm[r]!==0?O.content=o:O.content=a,O.markup=a,O.info="escape"}return e.pos=n+1,!0}function L6(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const r=n;n++;const o=e.posMax;for(;n<o&&e.src.charCodeAt(n)===96;)n++;const a=e.src.slice(r,n),O=a.length;if(e.backticksScanned&&(e.backticks[O]||0)<=r)return t||(e.pending+=a),e.pos+=O,!0;let l=n,s;for(;(s=e.src.indexOf("`",l))!==-1;){for(l=s+1;l<o&&e.src.charCodeAt(l)===96;)l++;const u=l-s;if(u===O){if(!t){const c=e.push("code_inline","code",0);c.markup=a,c.content=e.src.slice(n,s).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[u]=s}return e.backticksScanned=!0,t||(e.pending+=a),e.pos+=O,!0}function F6(e,t){const n=e.pos,i=e.src.charCodeAt(n);if(t||i!==126)return!1;const r=e.scanDelims(e.pos,!0);let o=r.length;const a=String.fromCharCode(i);if(o<2)return!1;let O;o%2&&(O=e.push("text","",0),O.content=a,o--);for(let l=0;l<o;l+=2)O=e.push("text","",0),O.content=a+a,e.delimiters.push({marker:i,length:0,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0}function dx(e,t){let n;const i=[],r=t.length;for(let o=0;o<r;o++){const a=t[o];if(a.marker!==126||a.end===-1)continue;const O=t[a.end];n=e.tokens[a.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[O.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[O.token-1].type==="text"&&e.tokens[O.token-1].content==="~"&&i.push(O.token-1)}for(;i.length;){const o=i.pop();let a=o+1;for(;a<e.tokens.length&&e.tokens[a].type==="s_close";)a++;a--,o!==a&&(n=e.tokens[a],e.tokens[a]=e.tokens[o],e.tokens[o]=n)}}function M6(e){const t=e.tokens_meta,n=e.tokens_meta.length;dx(e,e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&dx(e,t[i].delimiters)}const hx={tokenize:F6,postProcess:M6};function B6(e,t){const n=e.pos,i=e.src.charCodeAt(n);if(t||i!==95&&i!==42)return!1;const r=e.scanDelims(e.pos,i===42);for(let o=0;o<r.length;o++){const a=e.push("text","",0);a.content=String.fromCharCode(i),e.delimiters.push({marker:i,length:r.length,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close})}return e.pos+=r.length,!0}function px(e,t){const n=t.length;for(let i=n-1;i>=0;i--){const r=t[i];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;const o=t[r.end],a=i>0&&t[i-1].end===r.end+1&&t[i-1].marker===r.marker&&t[i-1].token===r.token-1&&t[r.end+1].token===o.token+1,O=String.fromCharCode(r.marker),l=e.tokens[r.token];l.type=a?"strong_open":"em_open",l.tag=a?"strong":"em",l.nesting=1,l.markup=a?O+O:O,l.content="";const s=e.tokens[o.token];s.type=a?"strong_close":"em_close",s.tag=a?"strong":"em",s.nesting=-1,s.markup=a?O+O:O,s.content="",a&&(e.tokens[t[i-1].token].content="",e.tokens[t[r.end+1].token].content="",i--)}}function H6(e){const t=e.tokens_meta,n=e.tokens_meta.length;px(e,e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&px(e,t[i].delimiters)}const mx={tokenize:B6,postProcess:H6};function K6(e,t){let n,i,r,o,a="",O="",l=e.pos,s=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const u=e.pos,c=e.posMax,f=e.pos+1,h=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(h<0)return!1;let p=h+1;if(p<c&&e.src.charCodeAt(p)===40){for(s=!1,p++;p<c&&(n=e.src.charCodeAt(p),!(!Le(n)&&n!==10));p++);if(p>=c)return!1;if(l=p,r=e.md.helpers.parseLinkDestination(e.src,p,e.posMax),r.ok){for(a=e.md.normalizeLink(r.str),e.md.validateLink(a)?p=r.pos:a="",l=p;p<c&&(n=e.src.charCodeAt(p),!(!Le(n)&&n!==10));p++);if(r=e.md.helpers.parseLinkTitle(e.src,p,e.posMax),p<c&&l!==p&&r.ok)for(O=r.str,p=r.pos;p<c&&(n=e.src.charCodeAt(p),!(!Le(n)&&n!==10));p++);}(p>=c||e.src.charCodeAt(p)!==41)&&(s=!0),p++}if(s){if(typeof e.env.references>"u")return!1;if(p<c&&e.src.charCodeAt(p)===91?(l=p+1,p=e.md.helpers.parseLinkLabel(e,p),p>=0?i=e.src.slice(l,p++):p=h+1):p=h+1,i||(i=e.src.slice(f,h)),o=e.env.references[_c(i)],!o)return e.pos=u,!1;a=o.href,O=o.title}if(!t){e.pos=f,e.posMax=h;const m=e.push("link_open","a",1),Q=[["href",a]];m.attrs=Q,O&&Q.push(["title",O]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=p,e.posMax=c,!0}function J6(e,t){let n,i,r,o,a,O,l,s,u="";const c=e.pos,f=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const h=e.pos+2,p=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(p<0)return!1;if(o=p+1,o<f&&e.src.charCodeAt(o)===40){for(o++;o<f&&(n=e.src.charCodeAt(o),!(!Le(n)&&n!==10));o++);if(o>=f)return!1;for(s=o,O=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),O.ok&&(u=e.md.normalizeLink(O.str),e.md.validateLink(u)?o=O.pos:u=""),s=o;o<f&&(n=e.src.charCodeAt(o),!(!Le(n)&&n!==10));o++);if(O=e.md.helpers.parseLinkTitle(e.src,o,e.posMax),o<f&&s!==o&&O.ok)for(l=O.str,o=O.pos;o<f&&(n=e.src.charCodeAt(o),!(!Le(n)&&n!==10));o++);else l="";if(o>=f||e.src.charCodeAt(o)!==41)return e.pos=c,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o<f&&e.src.charCodeAt(o)===91?(s=o+1,o=e.md.helpers.parseLinkLabel(e,o),o>=0?r=e.src.slice(s,o++):o=p+1):o=p+1,r||(r=e.src.slice(h,p)),a=e.env.references[_c(r)],!a)return e.pos=c,!1;u=a.href,l=a.title}if(!t){i=e.src.slice(h,p);const m=[];e.md.inline.parse(i,e.md,e.env,m);const Q=e.push("image","img",0),$=[["src",u],["alt",""]];Q.attrs=$,Q.children=m,Q.content=i,l&&$.push(["title",l])}return e.pos=o,e.posMax=f,!0}const eC=/^([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])?)*)$/,tC=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function nC(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const i=e.pos,r=e.posMax;for(;;){if(++n>=r)return!1;const a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}const o=e.src.slice(i+1,n);if(tC.test(o)){const a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){const O=e.push("link_open","a",1);O.attrs=[["href",a]],O.markup="autolink",O.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);const s=e.push("link_close","a",-1);s.markup="autolink",s.info="auto"}return e.pos+=o.length+2,!0}if(eC.test(o)){const a=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(a))return!1;if(!t){const O=e.push("link_open","a",1);O.attrs=[["href",a]],O.markup="autolink",O.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);const s=e.push("link_close","a",-1);s.markup="autolink",s.info="auto"}return e.pos+=o.length+2,!0}return!1}function iC(e){return/^<a[>\s]/i.test(e)}function rC(e){return/^<\/a\s*>/i.test(e)}function oC(e){const t=e|32;return t>=97&&t<=122}function aC(e,t){if(!e.md.options.html)return!1;const n=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==60||i+2>=n)return!1;const r=e.src.charCodeAt(i+1);if(r!==33&&r!==63&&r!==47&&!oC(r))return!1;const o=e.src.slice(i).match(Z6);if(!o)return!1;if(!t){const a=e.push("html_inline","",0);a.content=o[0],iC(a.content)&&e.linkLevel++,rC(a.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const OC=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,lC=/^&([a-z][a-z0-9]{1,31});/i;function sC(e,t){const n=e.pos,i=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=i)return!1;if(e.src.charCodeAt(n+1)===35){const o=e.src.slice(n).match(OC);if(o){if(!t){const a=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),O=e.push("text_special","",0);O.content=Zm(a)?Tc(a):Tc(65533),O.markup=o[0],O.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(n).match(lC);if(o){const a=tx(o[0]);if(a!==o[0]){if(!t){const O=e.push("text_special","",0);O.content=a,O.markup=o[0],O.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function gx(e){const t={},n=e.length;if(!n)return;let i=0,r=-2;const o=[];for(let a=0;a<n;a++){const O=e[a];if(o.push(0),(e[i].marker!==O.marker||r!==O.token-1)&&(i=a),r=O.token,O.length=O.length||0,!O.close)continue;t.hasOwnProperty(O.marker)||(t[O.marker]=[-1,-1,-1,-1,-1,-1]);const l=t[O.marker][(O.open?3:0)+O.length%3];let s=i-o[i]-1,u=s;for(;s>l;s-=o[s]+1){const c=e[s];if(c.marker===O.marker&&c.open&&c.end<0){let f=!1;if((c.close||O.open)&&(c.length+O.length)%3===0&&(c.length%3!==0||O.length%3!==0)&&(f=!0),!f){const h=s>0&&!e[s-1].open?o[s-1]+1:0;o[a]=a-s+h,o[s]=h,O.open=!1,c.end=a,c.close=!1,u=-1,r=-2;break}}}u!==-1&&(t[O.marker][(O.open?3:0)+(O.length||0)%3]=u)}}function uC(e){const t=e.tokens_meta,n=e.tokens_meta.length;gx(e.delimiters);for(let i=0;i<n;i++)t[i]&&t[i].delimiters&&gx(t[i].delimiters)}function cC(e){let t,n,i=0;const r=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++)r[t].nesting<0&&i--,r[t].level=i,r[t].nesting>0&&i++,r[t].type==="text"&&t+1<o&&r[t+1].type==="text"?r[t+1].content=r[t].content+r[t+1].content:(t!==n&&(r[n]=r[t]),n++);t!==n&&(r.length=n)}const Cm=[["text",A6],["linkify",I6],["newline",D6],["escape",N6],["backticks",L6],["strikethrough",hx.tokenize],["emphasis",mx.tokenize],["link",K6],["image",J6],["autolink",nC],["html_inline",aC],["entity",sC]],jm=[["balance_pairs",uC],["strikethrough",hx.postProcess],["emphasis",mx.postProcess],["fragments_join",cC]];function Il(){this.ruler=new pn;for(let e=0;e<Cm.length;e++)this.ruler.push(Cm[e][0],Cm[e][1]);this.ruler2=new pn;for(let e=0;e<jm.length;e++)this.ruler2.push(jm[e][0],jm[e][1])}Il.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),i=n.length,r=e.md.options.maxNesting,o=e.cache;if(typeof o[t]<"u"){e.pos=o[t];return}let a=!1;if(e.level<r){for(let O=0;O<i;O++)if(e.level++,a=n[O](e,!0),e.level--,a){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,o[t]=e.pos},Il.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,i=e.posMax,r=e.md.options.maxNesting;for(;e.pos<i;){const o=e.pos;let a=!1;if(e.level<r){for(let O=0;O<n;O++)if(a=t[O](e,!1),a){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=i)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},Il.prototype.parse=function(e,t,n,i){const r=new this.State(e,t,n,i);this.tokenize(r);const o=this.ruler2.getRules(""),a=o.length;for(let O=0;O<a;O++)o[O](r)},Il.prototype.State=Gl;function fC(e){const t={};e=e||{},t.src_Any=Bk.source,t.src_Cc=Hk.source,t.src_Z=Jk.source,t.src_P=Rm.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><|]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Am(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(i){e[i]=n[i]})}),e}function qc(e){return Object.prototype.toString.call(e)}function dC(e){return qc(e)==="[object String]"}function hC(e){return qc(e)==="[object Object]"}function pC(e){return qc(e)==="[object RegExp]"}function $x(e){return qc(e)==="[object Function]"}function mC(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Qx={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function gC(e){return Object.keys(e||{}).reduce(function(t,n){return t||Qx.hasOwnProperty(n)},!1)}const $C={"http:":{validate:function(e,t,n){const i=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(i)?i.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const i=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(i)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:i.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const i=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(i)?i.match(n.re.mailto)[0].length:0}}},QC="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",bC="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function yC(e){e.__index__=-1,e.__text_cache__=""}function SC(e){return function(t,n){const i=t.slice(n);return e.test(i)?i.match(e)[0].length:0}}function bx(){return function(e,t){t.normalize(e)}}function Zc(e){const t=e.re=fC(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(QC),n.push(t.src_xn),t.src_tlds=n.join("|");function i(O){return O.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(i(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(i(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(i(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(i(t.tpl_host_fuzzy_test),"i");const r=[];e.__compiled__={};function o(O,l){throw new Error('(LinkifyIt) Invalid schema "'+O+'": '+l)}Object.keys(e.__schemas__).forEach(function(O){const l=e.__schemas__[O];if(l===null)return;const s={validate:null,link:null};if(e.__compiled__[O]=s,hC(l)){pC(l.validate)?s.validate=SC(l.validate):$x(l.validate)?s.validate=l.validate:o(O,l),$x(l.normalize)?s.normalize=l.normalize:l.normalize?o(O,l):s.normalize=bx();return}if(dC(l)){r.push(O);return}o(O,l)}),r.forEach(function(O){e.__compiled__[e.__schemas__[O]]&&(e.__compiled__[O].validate=e.__compiled__[e.__schemas__[O]].validate,e.__compiled__[O].normalize=e.__compiled__[e.__schemas__[O]].normalize)}),e.__compiled__[""]={validate:null,normalize:bx()};const a=Object.keys(e.__compiled__).filter(function(O){return O.length>0&&e.__compiled__[O]}).map(mC).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),yC(e)}function PC(e,t){const n=e.__index__,i=e.__last_index__,r=e.__text_cache__.slice(n,i);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=i+t,this.raw=r,this.text=r,this.url=r}function Gm(e,t){const n=new PC(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Tn(e,t){if(!(this instanceof Tn))return new Tn(e,t);t||gC(e)&&(t=e,e={}),this.__opts__=Am({},Qx,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Am({},$C,e),this.__compiled__={},this.__tlds__=bC,this.__tlds_replaced__=!1,this.re={},Zc(this)}Tn.prototype.add=function(t,n){return this.__schemas__[t]=n,Zc(this),this},Tn.prototype.set=function(t){return this.__opts__=Am(this.__opts__,t),this},Tn.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,i,r,o,a,O,l,s,u;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(n=l.exec(t))!==null;)if(o=this.testSchemaAt(t,n[2],l.lastIndex),o){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(s=t.search(this.re.host_fuzzy_test),s>=0&&(this.__index__<0||s<this.__index__)&&(i=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(a=i.index+i[1].length,(this.__index__<0||a<this.__index__)&&(this.__schema__="",this.__index__=a,this.__last_index__=i.index+i[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(u=t.indexOf("@"),u>=0&&(r=t.match(this.re.email_fuzzy))!==null&&(a=r.index+r[1].length,O=r.index+r[0].length,(this.__index__<0||a<this.__index__||a===this.__index__&&O>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=O))),this.__index__>=0},Tn.prototype.pretest=function(t){return this.re.pretest.test(t)},Tn.prototype.testSchemaAt=function(t,n,i){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,i,this):0},Tn.prototype.match=function(t){const n=[];let i=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(Gm(this,i)),i=this.__last_index__);let r=i?t.slice(i):t;for(;this.test(r);)n.push(Gm(this,i)),r=r.slice(this.__last_index__),i+=this.__last_index__;return n.length?n:null},Tn.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const i=this.testSchemaAt(t,n[2],n[0].length);return i?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+i,Gm(this,0)):null},Tn.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(i,r,o){return i!==o[r-1]}).reverse(),Zc(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Zc(this),this)},Tn.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)},Tn.prototype.onCompile=function(){};const OO=2147483647,Ji=36,Im=1,Dl=26,kC=38,xC=700,yx=72,Sx=128,Px="-",vC=/^xn--/,wC=/[^\0-\x7F]/,XC=/[\x2E\u3002\uFF0E\uFF61]/g,TC={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Dm=Ji-Im,er=Math.floor,Nm=String.fromCharCode;function io(e){throw new RangeError(TC[e])}function _C(e,t){const n=[];let i=e.length;for(;i--;)n[i]=t(e[i]);return n}function kx(e,t){const n=e.split("@");let i="";n.length>1&&(i=n[0]+"@",e=n[1]),e=e.replace(XC,".");const r=e.split("."),o=_C(r,t).join(".");return i+o}function xx(e){const t=[];let n=0;const i=e.length;for(;n<i;){const r=e.charCodeAt(n++);if(r>=55296&&r<=56319&&n<i){const o=e.charCodeAt(n++);(o&64512)==56320?t.push(((r&1023)<<10)+(o&1023)+65536):(t.push(r),n--)}else t.push(r)}return t}const RC=e=>String.fromCodePoint(...e),zC=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Ji},vx=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},wx=function(e,t,n){let i=0;for(e=n?er(e/xC):e>>1,e+=er(e/t);e>Dm*Dl>>1;i+=Ji)e=er(e/Dm);return er(i+(Dm+1)*e/(e+kC))},Xx=function(e){const t=[],n=e.length;let i=0,r=Sx,o=yx,a=e.lastIndexOf(Px);a<0&&(a=0);for(let O=0;O<a;++O)e.charCodeAt(O)>=128&&io("not-basic"),t.push(e.charCodeAt(O));for(let O=a>0?a+1:0;O<n;){const l=i;for(let u=1,c=Ji;;c+=Ji){O>=n&&io("invalid-input");const f=zC(e.charCodeAt(O++));f>=Ji&&io("invalid-input"),f>er((OO-i)/u)&&io("overflow"),i+=f*u;const h=c<=o?Im:c>=o+Dl?Dl:c-o;if(f<h)break;const p=Ji-h;u>er(OO/p)&&io("overflow"),u*=p}const s=t.length+1;o=wx(i-l,s,l==0),er(i/s)>OO-r&&io("overflow"),r+=er(i/s),i%=s,t.splice(i++,0,r)}return String.fromCodePoint(...t)},Tx=function(e){const t=[];e=xx(e);const n=e.length;let i=Sx,r=0,o=yx;for(const l of e)l<128&&t.push(Nm(l));const a=t.length;let O=a;for(a&&t.push(Px);O<n;){let l=OO;for(const u of e)u>=i&&u<l&&(l=u);const s=O+1;l-i>er((OO-r)/s)&&io("overflow"),r+=(l-i)*s,i=l;for(const u of e)if(u<i&&++r>OO&&io("overflow"),u===i){let c=r;for(let f=Ji;;f+=Ji){const h=f<=o?Im:f>=o+Dl?Dl:f-o;if(c<h)break;const p=c-h,m=Ji-h;t.push(Nm(vx(h+p%m,0))),c=er(p/m)}t.push(Nm(vx(c,0))),o=wx(r,s,O===a),r=0,++O}++r,++i}return t.join("")},_x={version:"2.3.1",ucs2:{decode:xx,encode:RC},decode:Xx,encode:Tx,toASCII:function(e){return kx(e,function(t){return wC.test(t)?"xn--"+Tx(t):t})},toUnicode:function(e){return kx(e,function(t){return vC.test(t)?Xx(t.slice(4).toLowerCase()):t})}},WC={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{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"]}}},commonmark:{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"]}}}},qC=/^(vbscript|javascript|file|data):/,ZC=/^data:image\/(gif|png|jpeg|webp);/;function UC(e){const t=e.trim().toLowerCase();return qC.test(t)?ZC.test(t):!0}const Rx=["http:","https:","mailto:"];function EC(e){const t=_m(e,!0);if(t.hostname&&(!t.protocol||Rx.indexOf(t.protocol)>=0))try{t.hostname=_x.toASCII(t.hostname)}catch{}return Vl(Tm(t))}function YC(e){const t=_m(e,!0);if(t.hostname&&(!t.protocol||Rx.indexOf(t.protocol)>=0))try{t.hostname=_x.toUnicode(t.hostname)}catch{}return iO(Tm(t),iO.defaultChars+"%")}function Jn(e,t){if(!(this instanceof Jn))return new Jn(e,t);t||qm(e)||(t=e||{},e="default"),this.inline=new Il,this.block=new Wc,this.core=new Em,this.renderer=new oO,this.linkify=new Tn,this.validateLink=UC,this.normalizeLink=EC,this.normalizeLinkText=YC,this.utils=M3,this.helpers=Xc({},J3),this.options={},this.configure(e),t&&this.set(t)}Jn.prototype.set=function(e){return Xc(this.options,e),this},Jn.prototype.configure=function(e){const t=this;if(qm(e)){const n=e;if(e=WC[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this},Jn.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){n=n.concat(this[r].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const i=e.filter(function(r){return n.indexOf(r)<0});if(i.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+i);return this},Jn.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(r){n=n.concat(this[r].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const i=e.filter(function(r){return n.indexOf(r)<0});if(i.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+i);return this},Jn.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},Jn.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens},Jn.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},Jn.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens},Jn.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};const zx=new Set([!0,!1,"alt","title"]);function Wx(e,t){return(Array.isArray(e)?e:[]).filter(([n])=>n!==t)}function qx(e,t){e&&e.attrs&&(e.attrs=Wx(e.attrs,t))}function VC(e,t){if(!zx.has(e))throw new TypeError(`figcaption must be one of: ${[...zx]}.`);if(e==="alt")return t.content;const n=t.attrs.find(([i])=>i==="title");return Array.isArray(n)&&n[1]?(qx(t,"title"),n[1]):void 0}function CC(e,t){t=t||{},e.core.ruler.before("linkify","image_figures",function(n){let i=1;for(let r=1,o=n.tokens.length;r<o-1;++r){const a=n.tokens[r];if(a.type!=="inline"||!a.children||a.children.length!==1&&a.children.length!==3||a.children.length===1&&a.children[0].type!=="image")continue;if(a.children.length===3){const[s,u,c]=a.children;if(s.type!=="link_open"||u.type!=="image"||c.type!=="link_close")continue}if(r!==0&&n.tokens[r-1].type!=="paragraph_open"||r!==o-1&&n.tokens[r+1].type!=="paragraph_close")continue;const O=n.tokens[r-1];let l;if(O.type="figure_open",O.tag="figure",n.tokens[r+1].type="figure_close",n.tokens[r+1].tag="figure",t.dataType&&n.tokens[r-1].attrPush(["data-type","image"]),t.link&&a.children.length===1){[l]=a.children;const s=new n.Token("link_open","a",1);s.attrPush(["href",l.attrGet("src")]),a.children.unshift(s),a.children.push(new n.Token("link_close","a",-1))}if(l=a.children.length===1?a.children[0]:a.children[1],t.figcaption){const s=VC(t.figcaption,l);if(s){const[u]=e.parseInline(s,n.env);a.children.push(new n.Token("figcaption_open","figcaption",1)),a.children.push(...u.children),a.children.push(new n.Token("figcaption_close","figcaption",-1)),l.attrs&&(l.attrs=Wx(l.attrs,"title"))}}if(t.copyAttrs&&l.attrs){const s=t.copyAttrs===!0?"":t.copyAttrs;O.attrs=l.attrs.filter(([u])=>u.match(s)).map(u=>Array.from(u))}if(t.tabindex&&(n.tokens[r-1].attrPush(["tabindex",i]),i++),t.lazy&&(l.attrs.some(([s])=>s==="loading")||l.attrs.push(["loading","lazy"])),t.async&&(l.attrs.some(([s])=>s==="decoding")||l.attrs.push(["decoding","async"])),t.classes&&typeof t.classes=="string"){let s=!1;for(let u=0,c=l.attrs.length;u<c&&!s;u++){const f=l.attrs[u];f[0]==="class"&&(f[1]=`${f[1]} ${t.classes}`,s=!0)}s||l.attrs.push(["class",t.classes])}if(t.removeSrc){const s=l.attrs.find(([u])=>u==="src");l.attrs.push(["data-src",s[1]]),qx(l,"src")}}})}var Lm=!0,Zx=!1,Ux=!1,jC=function(e,t){t&&(Lm=!t.enabled,Zx=!!t.label,Ux=!!t.labelAfter),e.core.ruler.after("inline","github-task-lists",function(n){for(var i=n.tokens,r=2;r<i.length;r++)GC(i,r)&&(IC(i[r],n.Token),Ex(i[r-2],"class","task-list-item"+(Lm?"":" enabled")),Ex(i[AC(i,r-2)],"class","contains-task-list"))})};function Ex(e,t,n){var i=e.attrIndex(t),r=[t,n];i<0?e.attrPush(r):e.attrs[i]=r}function AC(e,t){for(var n=e[t].level-1,i=t-1;i>=0;i--)if(e[i].level===n)return i;return-1}function GC(e,t){return MC(e[t])&&BC(e[t-1])&&HC(e[t-2])&&KC(e[t])}function IC(e,t){if(e.children.unshift(DC(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),Zx)if(Ux){e.children.pop();var n="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+n+'">',e.children.push(FC(e.content,n,t))}else e.children.unshift(NC(t)),e.children.push(LC(t))}function DC(e,t){var n=new t("html_inline","",0),i=Lm?' disabled="" ':"";return e.content.indexOf("[ ] ")===0?n.content='<input class="task-list-item-checkbox"'+i+'type="checkbox">':(e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0)&&(n.content='<input class="task-list-item-checkbox" checked=""'+i+'type="checkbox">'),n}function NC(e){var t=new e("html_inline","",0);return t.content="<label>",t}function LC(e){var t=new e("html_inline","",0);return t.content="</label>",t}function FC(e,t,n){var i=new n("html_inline","",0);return i.content='<label class="task-list-item-label" for="'+t+'">'+e+"</label>",i.attrs=[{for:t}],i}function MC(e){return e.type==="inline"}function BC(e){return e.type==="paragraph_open"}function HC(e){return e.type==="list_item_open"}function KC(e){return e.content.indexOf("[ ] ")===0||e.content.indexOf("[x] ")===0||e.content.indexOf("[X] ")===0}const JC=Xm(jC);var Fm={exports:{}},tt={},Mm={exports:{}},Io={};function Yx(){var e={};return e["align-content"]=!1,e["align-items"]=!1,e["align-self"]=!1,e["alignment-adjust"]=!1,e["alignment-baseline"]=!1,e.all=!1,e["anchor-point"]=!1,e.animation=!1,e["animation-delay"]=!1,e["animation-direction"]=!1,e["animation-duration"]=!1,e["animation-fill-mode"]=!1,e["animation-iteration-count"]=!1,e["animation-name"]=!1,e["animation-play-state"]=!1,e["animation-timing-function"]=!1,e.azimuth=!1,e["backface-visibility"]=!1,e.background=!0,e["background-attachment"]=!0,e["background-clip"]=!0,e["background-color"]=!0,e["background-image"]=!0,e["background-origin"]=!0,e["background-position"]=!0,e["background-repeat"]=!0,e["background-size"]=!0,e["baseline-shift"]=!1,e.binding=!1,e.bleed=!1,e["bookmark-label"]=!1,e["bookmark-level"]=!1,e["bookmark-state"]=!1,e.border=!0,e["border-bottom"]=!0,e["border-bottom-color"]=!0,e["border-bottom-left-radius"]=!0,e["border-bottom-right-radius"]=!0,e["border-bottom-style"]=!0,e["border-bottom-width"]=!0,e["border-collapse"]=!0,e["border-color"]=!0,e["border-image"]=!0,e["border-image-outset"]=!0,e["border-image-repeat"]=!0,e["border-image-slice"]=!0,e["border-image-source"]=!0,e["border-image-width"]=!0,e["border-left"]=!0,e["border-left-color"]=!0,e["border-left-style"]=!0,e["border-left-width"]=!0,e["border-radius"]=!0,e["border-right"]=!0,e["border-right-color"]=!0,e["border-right-style"]=!0,e["border-right-width"]=!0,e["border-spacing"]=!0,e["border-style"]=!0,e["border-top"]=!0,e["border-top-color"]=!0,e["border-top-left-radius"]=!0,e["border-top-right-radius"]=!0,e["border-top-style"]=!0,e["border-top-width"]=!0,e["border-width"]=!0,e.bottom=!1,e["box-decoration-break"]=!0,e["box-shadow"]=!0,e["box-sizing"]=!0,e["box-snap"]=!0,e["box-suppress"]=!0,e["break-after"]=!0,e["break-before"]=!0,e["break-inside"]=!0,e["caption-side"]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e["clip-path"]=!1,e["clip-rule"]=!1,e.color=!0,e["color-interpolation-filters"]=!0,e["column-count"]=!1,e["column-fill"]=!1,e["column-gap"]=!1,e["column-rule"]=!1,e["column-rule-color"]=!1,e["column-rule-style"]=!1,e["column-rule-width"]=!1,e["column-span"]=!1,e["column-width"]=!1,e.columns=!1,e.contain=!1,e.content=!1,e["counter-increment"]=!1,e["counter-reset"]=!1,e["counter-set"]=!1,e.crop=!1,e.cue=!1,e["cue-after"]=!1,e["cue-before"]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e["display-inside"]=!0,e["display-list"]=!0,e["display-outside"]=!0,e["dominant-baseline"]=!1,e.elevation=!1,e["empty-cells"]=!1,e.filter=!1,e.flex=!1,e["flex-basis"]=!1,e["flex-direction"]=!1,e["flex-flow"]=!1,e["flex-grow"]=!1,e["flex-shrink"]=!1,e["flex-wrap"]=!1,e.float=!1,e["float-offset"]=!1,e["flood-color"]=!1,e["flood-opacity"]=!1,e["flow-from"]=!1,e["flow-into"]=!1,e.font=!0,e["font-family"]=!0,e["font-feature-settings"]=!0,e["font-kerning"]=!0,e["font-language-override"]=!0,e["font-size"]=!0,e["font-size-adjust"]=!0,e["font-stretch"]=!0,e["font-style"]=!0,e["font-synthesis"]=!0,e["font-variant"]=!0,e["font-variant-alternates"]=!0,e["font-variant-caps"]=!0,e["font-variant-east-asian"]=!0,e["font-variant-ligatures"]=!0,e["font-variant-numeric"]=!0,e["font-variant-position"]=!0,e["font-weight"]=!0,e.grid=!1,e["grid-area"]=!1,e["grid-auto-columns"]=!1,e["grid-auto-flow"]=!1,e["grid-auto-rows"]=!1,e["grid-column"]=!1,e["grid-column-end"]=!1,e["grid-column-start"]=!1,e["grid-row"]=!1,e["grid-row-end"]=!1,e["grid-row-start"]=!1,e["grid-template"]=!1,e["grid-template-areas"]=!1,e["grid-template-columns"]=!1,e["grid-template-rows"]=!1,e["hanging-punctuation"]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e["image-orientation"]=!1,e["image-resolution"]=!1,e["ime-mode"]=!1,e["initial-letters"]=!1,e["inline-box-align"]=!1,e["justify-content"]=!1,e["justify-items"]=!1,e["justify-self"]=!1,e.left=!1,e["letter-spacing"]=!0,e["lighting-color"]=!0,e["line-box-contain"]=!1,e["line-break"]=!1,e["line-grid"]=!1,e["line-height"]=!1,e["line-snap"]=!1,e["line-stacking"]=!1,e["line-stacking-ruby"]=!1,e["line-stacking-shift"]=!1,e["line-stacking-strategy"]=!1,e["list-style"]=!0,e["list-style-image"]=!0,e["list-style-position"]=!0,e["list-style-type"]=!0,e.margin=!0,e["margin-bottom"]=!0,e["margin-left"]=!0,e["margin-right"]=!0,e["margin-top"]=!0,e["marker-offset"]=!1,e["marker-side"]=!1,e.marks=!1,e.mask=!1,e["mask-box"]=!1,e["mask-box-outset"]=!1,e["mask-box-repeat"]=!1,e["mask-box-slice"]=!1,e["mask-box-source"]=!1,e["mask-box-width"]=!1,e["mask-clip"]=!1,e["mask-image"]=!1,e["mask-origin"]=!1,e["mask-position"]=!1,e["mask-repeat"]=!1,e["mask-size"]=!1,e["mask-source-type"]=!1,e["mask-type"]=!1,e["max-height"]=!0,e["max-lines"]=!1,e["max-width"]=!0,e["min-height"]=!0,e["min-width"]=!0,e["move-to"]=!1,e["nav-down"]=!1,e["nav-index"]=!1,e["nav-left"]=!1,e["nav-right"]=!1,e["nav-up"]=!1,e["object-fit"]=!1,e["object-position"]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e["outline-color"]=!1,e["outline-offset"]=!1,e["outline-style"]=!1,e["outline-width"]=!1,e.overflow=!1,e["overflow-wrap"]=!1,e["overflow-x"]=!1,e["overflow-y"]=!1,e.padding=!0,e["padding-bottom"]=!0,e["padding-left"]=!0,e["padding-right"]=!0,e["padding-top"]=!0,e.page=!1,e["page-break-after"]=!1,e["page-break-before"]=!1,e["page-break-inside"]=!1,e["page-policy"]=!1,e.pause=!1,e["pause-after"]=!1,e["pause-before"]=!1,e.perspective=!1,e["perspective-origin"]=!1,e.pitch=!1,e["pitch-range"]=!1,e["play-during"]=!1,e.position=!1,e["presentation-level"]=!1,e.quotes=!1,e["region-fragment"]=!1,e.resize=!1,e.rest=!1,e["rest-after"]=!1,e["rest-before"]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e["rotation-point"]=!1,e["ruby-align"]=!1,e["ruby-merge"]=!1,e["ruby-position"]=!1,e["shape-image-threshold"]=!1,e["shape-outside"]=!1,e["shape-margin"]=!1,e.size=!1,e.speak=!1,e["speak-as"]=!1,e["speak-header"]=!1,e["speak-numeral"]=!1,e["speak-punctuation"]=!1,e["speech-rate"]=!1,e.stress=!1,e["string-set"]=!1,e["tab-size"]=!1,e["table-layout"]=!1,e["text-align"]=!0,e["text-align-last"]=!0,e["text-combine-upright"]=!0,e["text-decoration"]=!0,e["text-decoration-color"]=!0,e["text-decoration-line"]=!0,e["text-decoration-skip"]=!0,e["text-decoration-style"]=!0,e["text-emphasis"]=!0,e["text-emphasis-color"]=!0,e["text-emphasis-position"]=!0,e["text-emphasis-style"]=!0,e["text-height"]=!0,e["text-indent"]=!0,e["text-justify"]=!0,e["text-orientation"]=!0,e["text-overflow"]=!0,e["text-shadow"]=!0,e["text-space-collapse"]=!0,e["text-transform"]=!0,e["text-underline-position"]=!0,e["text-wrap"]=!0,e.top=!1,e.transform=!1,e["transform-origin"]=!1,e["transform-style"]=!1,e.transition=!1,e["transition-delay"]=!1,e["transition-duration"]=!1,e["transition-property"]=!1,e["transition-timing-function"]=!1,e["unicode-bidi"]=!1,e["vertical-align"]=!1,e.visibility=!1,e["voice-balance"]=!1,e["voice-duration"]=!1,e["voice-family"]=!1,e["voice-pitch"]=!1,e["voice-range"]=!1,e["voice-rate"]=!1,e["voice-stress"]=!1,e["voice-volume"]=!1,e.volume=!1,e["white-space"]=!1,e.widows=!1,e.width=!0,e["will-change"]=!1,e["word-break"]=!0,e["word-spacing"]=!0,e["word-wrap"]=!0,e["wrap-flow"]=!1,e["wrap-through"]=!1,e["writing-mode"]=!1,e["z-index"]=!1,e}function e9(e,t,n){}function t9(e,t,n){}var n9=/javascript\s*\:/img;function i9(e,t){return n9.test(t)?"":t}Io.whiteList=Yx(),Io.getDefaultWhiteList=Yx,Io.onAttr=e9,Io.onIgnoreAttr=t9,Io.safeAttrValue=i9;var r9={indexOf:function(e,t){var n,i;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var i,r;if(Array.prototype.forEach)return e.forEach(t,n);for(i=0,r=e.length;i<r;i++)t.call(n,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}},Nl=r9;function o9(e,t){e=Nl.trimRight(e),e[e.length-1]!==";"&&(e+=";");var n=e.length,i=!1,r=0,o=0,a="";function O(){if(!i){var u=Nl.trim(e.slice(r,o)),c=u.indexOf(":");if(c!==-1){var f=Nl.trim(u.slice(0,c)),h=Nl.trim(u.slice(c+1));if(f){var p=t(r,a.length,f,h,u);p&&(a+=p+"; ")}}}r=o+1}for(;o<n;o++){var l=e[o];if(l==="/"&&e[o+1]==="*"){var s=e.indexOf("*/",o+2);if(s===-1)break;o=s+1,r=o+1,i=!1}else l==="("?i=!0:l===")"?i=!1:l===";"?i||O():l===`
114
114
  `&&O()}return Nl.trim(a)}var a9=o9,Uc=Io,O9=a9;function Vx(e){return e==null}function l9(e){var t={};for(var n in e)t[n]=e[n];return t}function Cx(e){e=l9(e||{}),e.whiteList=e.whiteList||Uc.whiteList,e.onAttr=e.onAttr||Uc.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||Uc.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||Uc.safeAttrValue,this.options=e}Cx.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,i=n.whiteList,r=n.onAttr,o=n.onIgnoreAttr,a=n.safeAttrValue,O=O9(e,function(l,s,u,c,f){var h=i[u],p=!1;if(h===!0?p=h:typeof h=="function"?p=h(c):h instanceof RegExp&&(p=h.test(c)),p!==!0&&(p=!1),c=a(u,c),!!c){var m={position:s,sourcePosition:l,source:f,isWhite:p};if(p){var Q=r(u,c,m);return Vx(Q)?u+":"+c:Q}else{var Q=o(u,c,m);if(!Vx(Q))return Q}}});return O};var s9=Cx;(function(e,t){var n=Io,i=s9;function r(a,O){var l=new i(O);return l.process(a)}t=e.exports=r,t.FilterCSS=i;for(var o in n)t[o]=n[o];typeof window<"u"&&(window.filterCSS=e.exports)})(Mm,Mm.exports);var Bm=Mm.exports,Hm={indexOf:function(e,t){var n,i;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,i=e.length;n<i;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var i,r;if(Array.prototype.forEach)return e.forEach(t,n);for(i=0,r=e.length;i<r;i++)t.call(n,e[i],i,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/,n=t.exec(e);return n?n.index:-1}},u9=Bm.FilterCSS,c9=Bm.getDefaultWhiteList,Ec=Hm;function jx(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var Ax=new u9;function f9(e,t,n){}function d9(e,t,n){}function h9(e,t,n){}function p9(e,t,n){}function Gx(e){return e.replace(g9,"&lt;").replace($9,"&gt;")}function m9(e,t,n,i){if(n=Hx(n),t==="href"||t==="src"){if(n=Ec.trim(n),n==="#")return"#";if(!(n.substr(0,7)==="http://"||n.substr(0,8)==="https://"||n.substr(0,7)==="mailto:"||n.substr(0,4)==="tel:"||n.substr(0,11)==="data:image/"||n.substr(0,6)==="ftp://"||n.substr(0,2)==="./"||n.substr(0,3)==="../"||n[0]==="#"||n[0]==="/"))return""}else if(t==="background"){if(Yc.lastIndex=0,Yc.test(n))return""}else if(t==="style"){if(Ix.lastIndex=0,Ix.test(n)||(Dx.lastIndex=0,Dx.test(n)&&(Yc.lastIndex=0,Yc.test(n))))return"";i!==!1&&(i=i||Ax,n=i.process(n))}return n=Kx(n),n}var g9=/</g,$9=/>/g,Q9=/"/g,b9=/&quot;/g,y9=/&#([a-zA-Z0-9]*);?/gim,S9=/&colon;?/gim,P9=/&newline;?/gim,Yc=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,Ix=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,Dx=/u\s*r\s*l\s*\(.*/gi;function Nx(e){return e.replace(Q9,"&quot;")}function Lx(e){return e.replace(b9,'"')}function Fx(e){return e.replace(y9,function(n,i){return i[0]==="x"||i[0]==="X"?String.fromCharCode(parseInt(i.substr(1),16)):String.fromCharCode(parseInt(i,10))})}function Mx(e){return e.replace(S9,":").replace(P9," ")}function Bx(e){for(var t="",n=0,i=e.length;n<i;n++)t+=e.charCodeAt(n)<32?" ":e.charAt(n);return Ec.trim(t)}function Hx(e){return e=Lx(e),e=Fx(e),e=Mx(e),e=Bx(e),e}function Kx(e){return e=Nx(e),e=Gx(e),e}function k9(){return""}function x9(e,t){typeof t!="function"&&(t=function(){});var n=!Array.isArray(e);function i(a){return n?!0:Ec.indexOf(e,a)!==-1}var r=[],o=!1;return{onIgnoreTag:function(a,O,l){if(i(a))if(l.isClosing){var s="[/removed]",u=l.position+s.length;return r.push([o!==!1?o:l.position,u]),o=!1,s}else return o||(o=l.position),"[removed]";else return t(a,O,l)},remove:function(a){var O="",l=0;return Ec.forEach(r,function(s){O+=a.slice(l,s[0]),l=s[1]}),O+=a.slice(l),O}}}function v9(e){for(var t="",n=0;n<e.length;){var i=e.indexOf("<!--",n);if(i===-1){t+=e.slice(n);break}t+=e.slice(n,i);var r=e.indexOf("-->",i);if(r===-1)break;n=r+3}return t}function w9(e){var t=e.split("");return t=t.filter(function(n){var i=n.charCodeAt(0);return i===127?!1:i<=31?i===10||i===13:!0}),t.join("")}tt.whiteList=jx(),tt.getDefaultWhiteList=jx,tt.onTag=f9,tt.onIgnoreTag=d9,tt.onTagAttr=h9,tt.onIgnoreTagAttr=p9,tt.safeAttrValue=m9,tt.escapeHtml=Gx,tt.escapeQuote=Nx,tt.unescapeQuote=Lx,tt.escapeHtmlEntities=Fx,tt.escapeDangerHtml5Entities=Mx,tt.clearNonPrintableCharacter=Bx,tt.friendlyAttrValue=Hx,tt.escapeAttrValue=Kx,tt.onIgnoreTagStripAll=k9,tt.StripTagBody=x9,tt.stripCommentTag=v9,tt.stripBlankChar=w9,tt.attributeWrapSign='"',tt.cssFilter=Ax,tt.getDefaultCSSWhiteList=c9;var Vc={},ro=Hm;function X9(e){var t=ro.spaceIndex(e),n;return t===-1?n=e.slice(1,-1):n=e.slice(1,t+1),n=ro.trim(n).toLowerCase(),n.slice(0,1)==="/"&&(n=n.slice(1)),n.slice(-1)==="/"&&(n=n.slice(0,-1)),n}function T9(e){return e.slice(0,2)==="</"}function _9(e,t,n){var i="",r=0,o=!1,a=!1,O=0,l=e.length,s="",u="";e:for(O=0;O<l;O++){var c=e.charAt(O);if(o===!1){if(c==="<"){o=O;continue}}else if(a===!1){if(c==="<"){i+=n(e.slice(r,O)),o=O,r=O;continue}if(c===">"||O===l-1){i+=n(e.slice(r,o)),u=e.slice(o,O+1),s=X9(u),i+=t(o,i.length,s,u,T9(u)),r=O+1,o=!1;continue}if(c==='"'||c==="'")for(var f=1,h=e.charAt(O-f);h.trim()===""||h==="=";){if(h==="="){a=c;continue e}h=e.charAt(O-++f)}}else if(c===a){a=!1;continue}}return r<l&&(i+=n(e.substr(r))),i}var R9=/[^a-zA-Z0-9\\_:.-]/gim;function z9(e,t){var n=0,i=0,r=[],o=!1,a=e.length;function O(f,h){if(f=ro.trim(f),f=f.replace(R9,"").toLowerCase(),!(f.length<1)){var p=t(f,h||"");p&&r.push(p)}}for(var l=0;l<a;l++){var s=e.charAt(l),u,c;if(o===!1&&s==="="){o=e.slice(n,l),n=l+1,i=e.charAt(n)==='"'||e.charAt(n)==="'"?n:q9(e,l+1);continue}if(o!==!1&&l===i){if(c=e.indexOf(s,l+1),c===-1)break;u=ro.trim(e.slice(i+1,c)),O(o,u),o=!1,l=c,n=l+1;continue}if(/\s|\n|\t/.test(s))if(e=e.replace(/\s|\n|\t/g," "),o===!1)if(c=W9(e,l),c===-1){u=ro.trim(e.slice(n,l)),O(u),o=!1,n=l+1;continue}else{l=c-1;continue}else if(c=Z9(e,l-1),c===-1){u=ro.trim(e.slice(n,l)),u=Jx(u),O(o,u),o=!1,n=l+1;continue}else continue}return n<e.length&&(o===!1?O(e.slice(n)):O(o,Jx(ro.trim(e.slice(n))))),ro.trim(r.join(" "))}function W9(e,t){for(;t<e.length;t++){var n=e[t];if(n!==" ")return n==="="?t:-1}}function q9(e,t){for(;t<e.length;t++){var n=e[t];if(n!==" ")return n==="'"||n==='"'?t:-1}}function Z9(e,t){for(;t>0;t--){var n=e[t];if(n!==" ")return n==="="?t:-1}}function U9(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function Jx(e){return U9(e)?e.substr(1,e.length-2):e}Vc.parseTag=_9,Vc.parseAttr=z9;var E9=Bm.FilterCSS,ei=tt,ev=Vc,Y9=ev.parseTag,V9=ev.parseAttr,Cc=Hm;function jc(e){return e==null}function C9(e){var t=Cc.spaceIndex(e);if(t===-1)return{html:"",closing:e[e.length-2]==="/"};e=Cc.trim(e.slice(t+1,-1));var n=e[e.length-1]==="/";return n&&(e=Cc.trim(e.slice(0,-1))),{html:e,closing:n}}function j9(e){var t={};for(var n in e)t[n]=e[n];return t}function A9(e){var t={};for(var n in e)Array.isArray(e[n])?t[n.toLowerCase()]=e[n].map(function(i){return i.toLowerCase()}):t[n.toLowerCase()]=e[n];return t}function tv(e){e=j9(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=ei.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=A9(e.whiteList||e.allowList):e.whiteList=ei.whiteList,this.attributeWrapSign=e.singleQuotedAttributeValue===!0?"'":ei.attributeWrapSign,e.onTag=e.onTag||ei.onTag,e.onTagAttr=e.onTagAttr||ei.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||ei.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||ei.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||ei.safeAttrValue,e.escapeHtml=e.escapeHtml||ei.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new E9(e.css))}tv.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,i=n.whiteList,r=n.onTag,o=n.onIgnoreTag,a=n.onTagAttr,O=n.onIgnoreTagAttr,l=n.safeAttrValue,s=n.escapeHtml,u=t.attributeWrapSign,c=t.cssFilter;n.stripBlankChar&&(e=ei.stripBlankChar(e)),n.allowCommentTag||(e=ei.stripCommentTag(e));var f=!1;n.stripIgnoreTagBody&&(f=ei.StripTagBody(n.stripIgnoreTagBody,o),o=f.onIgnoreTag);var h=Y9(e,function(p,m,Q,$,b){var S={sourcePosition:p,position:m,isClosing:b,isWhite:Object.prototype.hasOwnProperty.call(i,Q)},k=r(Q,$,S);if(!jc(k))return k;if(S.isWhite){if(S.isClosing)return"</"+Q+">";var P=C9($),R=i[Q],v=V9(P.html,function(w,x){var U=Cc.indexOf(R,w)!==-1,q=a(Q,w,x,U);return jc(q)?U?(x=l(Q,w,x,c),x?w+"="+u+x+u:w):(q=O(Q,w,x,U),jc(q)?void 0:q):q});return $="<"+Q,v&&($+=" "+v),P.closing&&($+=" /"),$+=">",$}else return k=o(Q,$,S),jc(k)?s($):k},s);return f&&(h=f.remove(h)),h};var G9=tv;(function(e,t){var n=tt,i=Vc,r=G9;function o(O,l){var s=new r(l);return s.process(O)}t=e.exports=o,t.filterXSS=o,t.FilterXSS=r,function(){for(var O in n)t[O]=n[O];for(var l in i)t[l]=i[l]}(),typeof window<"u"&&(window.filterXSS=e.exports);function a(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}a()&&(self.filterXSS=e.exports)})(Fm,Fm.exports);var I9=Fm.exports;const nv=I9;var D9=function(t,{xss:n}={}){const i=new nv.FilterXSS(typeof n=="function"?n(nv):n);function r(a){return a=i.process(a),a}function o(a){for(let O=0;O<a.tokens.length;O++){let l=a.tokens[O];if(l.type==="html_block"&&(l.content=r(l.content)),l.type==="inline"){let s=l.children;for(let u=0;u<s.length;u++)s[u].type==="html_inline"&&(s[u].content=r(s[u].content))}}}t.core.ruler.after("linkify","xss",o)};const N9=Xm(D9),L9=e=>{const t=g.inject("highlight"),n=g.shallowRef(pt.editorExtensions.highlight.instance);return g.onMounted(()=>{e.noHighlight||n.value||(un("link",{...t.value.css,rel:"stylesheet",id:`${z}-hlCss`}),un("script",{...t.value.js,id:`${z}-hljs`,onload(){n.value=window.hljs}},"hljs"))}),g.watch(()=>t.value.css,()=>{cW("link",{...t.value.css,rel:"stylesheet",id:`${z}-hlCss`})}),n},lO=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,iv=new Set,Km=typeof process=="object"&&process?process:{},rv=(e,t,n,i)=>{typeof Km.emitWarning=="function"?Km.emitWarning(e,t,n,i):console.error(`[${n}] ${t}: ${e}`)};let Ac=globalThis.AbortController,ov=globalThis.AbortSignal;if(typeof Ac>"u"){ov=class{constructor(){Xe(this,"onabort");Xe(this,"_onabort",[]);Xe(this,"reason");Xe(this,"aborted",!1)}addEventListener(i,r){this._onabort.push(r)}},Ac=class{constructor(){Xe(this,"signal",new ov);t()}abort(i){var r,o;if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(const a of this.signal._onabort)a(i);(o=(r=this.signal).onabort)==null||o.call(r,i)}}};let e=((Cz=Km.env)==null?void 0:Cz.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const t=()=>{e&&(e=!1,rv("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}const F9=e=>!iv.has(e),oo=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),av=e=>oo(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?Gc:null:null;class Gc extends Array{constructor(t){super(t),this.fill(0)}}const pa=class pa{constructor(t,n){Xe(this,"heap");Xe(this,"length");if(!T(pa,RO))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(t),this.length=0}static create(t){const n=av(t);if(!n)return[];fe(pa,RO,!0);const i=new pa(t,n);return fe(pa,RO,!1),i}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}};RO=new WeakMap,$e(pa,RO,!1);let Jm=pa;const AQ=class AQ{constructor(t){$e(this,As);$e(this,Td);$e(this,Or);$e(this,lr);$e(this,Ds);$e(this,qO);$e(this,ZO);$e(this,Ne);$e(this,Ns);$e(this,$a);$e(this,Ti,void 0);$e(this,En,void 0);$e(this,_i,void 0);$e(this,Ri,void 0);$e(this,zO,void 0);Xe(this,"ttl");Xe(this,"ttlResolution");Xe(this,"ttlAutopurge");Xe(this,"updateAgeOnGet");Xe(this,"updateAgeOnHas");Xe(this,"allowStale");Xe(this,"noDisposeOnSet");Xe(this,"noUpdateTTL");Xe(this,"maxEntrySize");Xe(this,"sizeCalculation");Xe(this,"noDeleteOnFetchRejection");Xe(this,"noDeleteOnStaleGet");Xe(this,"allowStaleOnFetchAbort");Xe(this,"allowStaleOnFetchRejection");Xe(this,"ignoreFetchAbort");$e(this,Tt,void 0);$e(this,zi,void 0);$e(this,St,void 0);$e(this,He,void 0);$e(this,me,void 0);$e(this,ln,void 0);$e(this,Yn,void 0);$e(this,Jt,void 0);$e(this,Zt,void 0);$e(this,Wi,void 0);$e(this,Ut,void 0);$e(this,qi,void 0);$e(this,Zi,void 0);$e(this,Vn,void 0);$e(this,Ui,void 0);$e(this,yo,void 0);$e(this,sn,void 0);$e(this,ma,()=>{});$e(this,qr,()=>{});$e(this,Gs,()=>{});$e(this,Cn,()=>!1);$e(this,ga,t=>{});$e(this,WO,(t,n,i)=>{});$e(this,Is,(t,n,i,r)=>{if(i||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});Xe(this,zOe,"LRUCache");const{max:n=0,ttl:i,ttlResolution:r=1,ttlAutopurge:o,updateAgeOnGet:a,updateAgeOnHas:O,allowStale:l,dispose:s,disposeAfter:u,noDisposeOnSet:c,noUpdateTTL:f,maxSize:h=0,maxEntrySize:p=0,sizeCalculation:m,fetchMethod:Q,noDeleteOnFetchRejection:$,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:k,ignoreFetchAbort:P}=t;if(n!==0&&!oo(n))throw new TypeError("max option must be a nonnegative integer");const R=n?av(n):Array;if(!R)throw new Error("invalid max value: "+n);if(fe(this,Ti,n),fe(this,En,h),this.maxEntrySize=p||T(this,En),this.sizeCalculation=m,this.sizeCalculation){if(!T(this,En)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(Q!==void 0&&typeof Q!="function")throw new TypeError("fetchMethod must be a function if specified");if(fe(this,zO,Q),fe(this,yo,!!Q),fe(this,St,new Map),fe(this,He,new Array(n).fill(void 0)),fe(this,me,new Array(n).fill(void 0)),fe(this,ln,new R(n)),fe(this,Yn,new R(n)),fe(this,Jt,0),fe(this,Zt,0),fe(this,Wi,Jm.create(n)),fe(this,Tt,0),fe(this,zi,0),typeof s=="function"&&fe(this,_i,s),typeof u=="function"?(fe(this,Ri,u),fe(this,Ut,[])):(fe(this,Ri,void 0),fe(this,Ut,void 0)),fe(this,Ui,!!T(this,_i)),fe(this,sn,!!T(this,Ri)),this.noDisposeOnSet=!!c,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!$,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!k,this.ignoreFetchAbort=!!P,this.maxEntrySize!==0){if(T(this,En)!==0&&!oo(T(this,En)))throw new TypeError("maxSize must be a positive integer if specified");if(!oo(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");le(this,Td,Mz).call(this)}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!O,this.ttlResolution=oo(r)||r===0?r:1,this.ttlAutopurge=!!o,this.ttl=i||0,this.ttl){if(!oo(this.ttl))throw new TypeError("ttl must be a positive integer if specified");le(this,As,NQ).call(this)}if(T(this,Ti)===0&&this.ttl===0&&T(this,En)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!T(this,Ti)&&!T(this,En)){const v="LRU_CACHE_UNBOUNDED";F9(v)&&(iv.add(v),rv("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",v,AQ))}}static unsafeExposeInternals(t){return{starts:T(t,Zi),ttls:T(t,Vn),sizes:T(t,qi),keyMap:T(t,St),keyList:T(t,He),valList:T(t,me),next:T(t,ln),prev:T(t,Yn),get head(){return T(t,Jt)},get tail(){return T(t,Zt)},free:T(t,Wi),isBackgroundFetch:n=>{var i;return le(i=t,Ne,Je).call(i,n)},backgroundFetch:(n,i,r,o)=>{var a;return le(a=t,ZO,Ld).call(a,n,i,r,o)},moveToTail:n=>{var i;return le(i=t,$a,Ks).call(i,n)},indexes:n=>{var i;return le(i=t,Or,ko).call(i,n)},rindexes:n=>{var i;return le(i=t,lr,xo).call(i,n)},isStale:n=>{var i;return T(i=t,Cn).call(i,n)}}}get max(){return T(this,Ti)}get maxSize(){return T(this,En)}get calculatedSize(){return T(this,zi)}get size(){return T(this,Tt)}get fetchMethod(){return T(this,zO)}get dispose(){return T(this,_i)}get disposeAfter(){return T(this,Ri)}getRemainingTTL(t){return T(this,St).has(t)?1/0:0}*entries(){for(const t of le(this,Or,ko).call(this))T(this,me)[t]!==void 0&&T(this,He)[t]!==void 0&&!le(this,Ne,Je).call(this,T(this,me)[t])&&(yield[T(this,He)[t],T(this,me)[t]])}*rentries(){for(const t of le(this,lr,xo).call(this))T(this,me)[t]!==void 0&&T(this,He)[t]!==void 0&&!le(this,Ne,Je).call(this,T(this,me)[t])&&(yield[T(this,He)[t],T(this,me)[t]])}*keys(){for(const t of le(this,Or,ko).call(this)){const n=T(this,He)[t];n!==void 0&&!le(this,Ne,Je).call(this,T(this,me)[t])&&(yield n)}}*rkeys(){for(const t of le(this,lr,xo).call(this)){const n=T(this,He)[t];n!==void 0&&!le(this,Ne,Je).call(this,T(this,me)[t])&&(yield n)}}*values(){for(const t of le(this,Or,ko).call(this))T(this,me)[t]!==void 0&&!le(this,Ne,Je).call(this,T(this,me)[t])&&(yield T(this,me)[t])}*rvalues(){for(const t of le(this,lr,xo).call(this))T(this,me)[t]!==void 0&&!le(this,Ne,Je).call(this,T(this,me)[t])&&(yield T(this,me)[t])}[Symbol.iterator](){return this.entries()}find(t,n={}){for(const i of le(this,Or,ko).call(this)){const r=T(this,me)[i],o=le(this,Ne,Je).call(this,r)?r.__staleWhileFetching:r;if(o!==void 0&&t(o,T(this,He)[i],this))return this.get(T(this,He)[i],n)}}forEach(t,n=this){for(const i of le(this,Or,ko).call(this)){const r=T(this,me)[i],o=le(this,Ne,Je).call(this,r)?r.__staleWhileFetching:r;o!==void 0&&t.call(n,o,T(this,He)[i],this)}}rforEach(t,n=this){for(const i of le(this,lr,xo).call(this)){const r=T(this,me)[i],o=le(this,Ne,Je).call(this,r)?r.__staleWhileFetching:r;o!==void 0&&t.call(n,o,T(this,He)[i],this)}}purgeStale(){let t=!1;for(const n of le(this,lr,xo).call(this,{allowStale:!0}))T(this,Cn).call(this,n)&&(this.delete(T(this,He)[n]),t=!0);return t}info(t){const n=T(this,St).get(t);if(n===void 0)return;const i=T(this,me)[n],r=le(this,Ne,Je).call(this,i)?i.__staleWhileFetching:i;if(r===void 0)return;const o={value:r};if(T(this,Vn)&&T(this,Zi)){const a=T(this,Vn)[n],O=T(this,Zi)[n];if(a&&O){const l=a-(lO.now()-O);o.ttl=l,o.start=Date.now()}}return T(this,qi)&&(o.size=T(this,qi)[n]),o}dump(){const t=[];for(const n of le(this,Or,ko).call(this,{allowStale:!0})){const i=T(this,He)[n],r=T(this,me)[n],o=le(this,Ne,Je).call(this,r)?r.__staleWhileFetching:r;if(o===void 0||i===void 0)continue;const a={value:o};if(T(this,Vn)&&T(this,Zi)){a.ttl=T(this,Vn)[n];const O=lO.now()-T(this,Zi)[n];a.start=Math.floor(Date.now()-O)}T(this,qi)&&(a.size=T(this,qi)[n]),t.unshift([i,a])}return t}load(t){this.clear();for(const[n,i]of t){if(i.start){const r=Date.now()-i.start;i.start=lO.now()-r}this.set(n,i.value,i)}}set(t,n,i={}){var f,h,p,m,Q;if(n===void 0)return this.delete(t),this;const{ttl:r=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:O=this.sizeCalculation,status:l}=i;let{noUpdateTTL:s=this.noUpdateTTL}=i;const u=T(this,Is).call(this,t,n,i.size||0,O);if(this.maxEntrySize&&u>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(t),this;let c=T(this,Tt)===0?void 0:T(this,St).get(t);if(c===void 0)c=T(this,Tt)===0?T(this,Zt):T(this,Wi).length!==0?T(this,Wi).pop():T(this,Tt)===T(this,Ti)?le(this,qO,Nd).call(this,!1):T(this,Tt),T(this,He)[c]=t,T(this,me)[c]=n,T(this,St).set(t,c),T(this,ln)[T(this,Zt)]=c,T(this,Yn)[c]=T(this,Zt),fe(this,Zt,c),Dd(this,Tt)._++,T(this,WO).call(this,c,u,l),l&&(l.set="add"),s=!1;else{le(this,$a,Ks).call(this,c);const $=T(this,me)[c];if(n!==$){if(T(this,yo)&&le(this,Ne,Je).call(this,$)){$.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:b}=$;b!==void 0&&!a&&(T(this,Ui)&&((f=T(this,_i))==null||f.call(this,b,t,"set")),T(this,sn)&&((h=T(this,Ut))==null||h.push([b,t,"set"])))}else a||(T(this,Ui)&&((p=T(this,_i))==null||p.call(this,$,t,"set")),T(this,sn)&&((m=T(this,Ut))==null||m.push([$,t,"set"])));if(T(this,ga).call(this,c),T(this,WO).call(this,c,u,l),T(this,me)[c]=n,l){l.set="replace";const b=$&&le(this,Ne,Je).call(this,$)?$.__staleWhileFetching:$;b!==void 0&&(l.oldValue=b)}}else l&&(l.set="update")}if(r!==0&&!T(this,Vn)&&le(this,As,NQ).call(this),T(this,Vn)&&(s||T(this,Gs).call(this,c,r,o),l&&T(this,qr).call(this,l,c)),!a&&T(this,sn)&&T(this,Ut)){const $=T(this,Ut);let b;for(;b=$==null?void 0:$.shift();)(Q=T(this,Ri))==null||Q.call(this,...b)}return this}pop(){var t;try{for(;T(this,Tt);){const n=T(this,me)[T(this,Jt)];if(le(this,qO,Nd).call(this,!0),le(this,Ne,Je).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(T(this,sn)&&T(this,Ut)){const n=T(this,Ut);let i;for(;i=n==null?void 0:n.shift();)(t=T(this,Ri))==null||t.call(this,...i)}}}has(t,n={}){const{updateAgeOnHas:i=this.updateAgeOnHas,status:r}=n,o=T(this,St).get(t);if(o!==void 0){const a=T(this,me)[o];if(le(this,Ne,Je).call(this,a)&&a.__staleWhileFetching===void 0)return!1;if(T(this,Cn).call(this,o))r&&(r.has="stale",T(this,qr).call(this,r,o));else return i&&T(this,ma).call(this,o),r&&(r.has="hit",T(this,qr).call(this,r,o)),!0}else r&&(r.has="miss");return!1}peek(t,n={}){const{allowStale:i=this.allowStale}=n,r=T(this,St).get(t);if(r===void 0||!i&&T(this,Cn).call(this,r))return;const o=T(this,me)[r];return le(this,Ne,Je).call(this,o)?o.__staleWhileFetching:o}async fetch(t,n={}){const{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:O=this.noDisposeOnSet,size:l=0,sizeCalculation:s=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:h=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:m,forceRefresh:Q=!1,status:$,signal:b}=n;if(!T(this,yo))return $&&($.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:o,status:$});const S={allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:o,ttl:a,noDisposeOnSet:O,size:l,sizeCalculation:s,noUpdateTTL:u,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:p,ignoreFetchAbort:h,status:$,signal:b};let k=T(this,St).get(t);if(k===void 0){$&&($.fetch="miss");const P=le(this,ZO,Ld).call(this,t,k,S,m);return P.__returned=P}else{const P=T(this,me)[k];if(le(this,Ne,Je).call(this,P)){const U=i&&P.__staleWhileFetching!==void 0;return $&&($.fetch="inflight",U&&($.returnedStale=!0)),U?P.__staleWhileFetching:P.__returned=P}const R=T(this,Cn).call(this,k);if(!Q&&!R)return $&&($.fetch="hit"),le(this,$a,Ks).call(this,k),r&&T(this,ma).call(this,k),$&&T(this,qr).call(this,$,k),P;const v=le(this,ZO,Ld).call(this,t,k,S,m),x=v.__staleWhileFetching!==void 0&&i;return $&&($.fetch=R?"stale":"refresh",x&&R&&($.returnedStale=!0)),x?v.__staleWhileFetching:v.__returned=v}}get(t,n={}){const{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:o=this.noDeleteOnStaleGet,status:a}=n,O=T(this,St).get(t);if(O!==void 0){const l=T(this,me)[O],s=le(this,Ne,Je).call(this,l);return a&&T(this,qr).call(this,a,O),T(this,Cn).call(this,O)?(a&&(a.get="stale"),s?(a&&i&&l.__staleWhileFetching!==void 0&&(a.returnedStale=!0),i?l.__staleWhileFetching:void 0):(o||this.delete(t),a&&i&&(a.returnedStale=!0),i?l:void 0)):(a&&(a.get="hit"),s?l.__staleWhileFetching:(le(this,$a,Ks).call(this,O),r&&T(this,ma).call(this,O),l))}else a&&(a.get="miss")}delete(t){var i,r,o,a;let n=!1;if(T(this,Tt)!==0){const O=T(this,St).get(t);if(O!==void 0)if(n=!0,T(this,Tt)===1)this.clear();else{T(this,ga).call(this,O);const l=T(this,me)[O];if(le(this,Ne,Je).call(this,l)?l.__abortController.abort(new Error("deleted")):(T(this,Ui)||T(this,sn))&&(T(this,Ui)&&((i=T(this,_i))==null||i.call(this,l,t,"delete")),T(this,sn)&&((r=T(this,Ut))==null||r.push([l,t,"delete"]))),T(this,St).delete(t),T(this,He)[O]=void 0,T(this,me)[O]=void 0,O===T(this,Zt))fe(this,Zt,T(this,Yn)[O]);else if(O===T(this,Jt))fe(this,Jt,T(this,ln)[O]);else{const s=T(this,Yn)[O];T(this,ln)[s]=T(this,ln)[O];const u=T(this,ln)[O];T(this,Yn)[u]=T(this,Yn)[O]}Dd(this,Tt)._--,T(this,Wi).push(O)}}if(T(this,sn)&&((o=T(this,Ut))!=null&&o.length)){const O=T(this,Ut);let l;for(;l=O==null?void 0:O.shift();)(a=T(this,Ri))==null||a.call(this,...l)}return n}clear(){var t,n,i;for(const r of le(this,lr,xo).call(this,{allowStale:!0})){const o=T(this,me)[r];if(le(this,Ne,Je).call(this,o))o.__abortController.abort(new Error("deleted"));else{const a=T(this,He)[r];T(this,Ui)&&((t=T(this,_i))==null||t.call(this,o,a,"delete")),T(this,sn)&&((n=T(this,Ut))==null||n.push([o,a,"delete"]))}}if(T(this,St).clear(),T(this,me).fill(void 0),T(this,He).fill(void 0),T(this,Vn)&&T(this,Zi)&&(T(this,Vn).fill(0),T(this,Zi).fill(0)),T(this,qi)&&T(this,qi).fill(0),fe(this,Jt,0),fe(this,Zt,0),T(this,Wi).length=0,fe(this,zi,0),fe(this,Tt,0),T(this,sn)&&T(this,Ut)){const r=T(this,Ut);let o;for(;o=r==null?void 0:r.shift();)(i=T(this,Ri))==null||i.call(this,...o)}}};zOe=Symbol.toStringTag,Ti=new WeakMap,En=new WeakMap,_i=new WeakMap,Ri=new WeakMap,zO=new WeakMap,Tt=new WeakMap,zi=new WeakMap,St=new WeakMap,He=new WeakMap,me=new WeakMap,ln=new WeakMap,Yn=new WeakMap,Jt=new WeakMap,Zt=new WeakMap,Wi=new WeakMap,Ut=new WeakMap,qi=new WeakMap,Zi=new WeakMap,Vn=new WeakMap,Ui=new WeakMap,yo=new WeakMap,sn=new WeakMap,As=new WeakSet,NQ=function(){const t=new Gc(T(this,Ti)),n=new Gc(T(this,Ti));fe(this,Vn,t),fe(this,Zi,n),fe(this,Gs,(o,a,O=lO.now())=>{if(n[o]=a!==0?O:0,t[o]=a,a!==0&&this.ttlAutopurge){const l=setTimeout(()=>{T(this,Cn).call(this,o)&&this.delete(T(this,He)[o])},a+1);l.unref&&l.unref()}}),fe(this,ma,o=>{n[o]=t[o]!==0?lO.now():0}),fe(this,qr,(o,a)=>{if(t[a]){const O=t[a],l=n[a];if(!O||!l)return;o.ttl=O,o.start=l,o.now=i||r();const s=o.now-l;o.remainingTTL=O-s}});let i=0;const r=()=>{const o=lO.now();if(this.ttlResolution>0){i=o;const a=setTimeout(()=>i=0,this.ttlResolution);a.unref&&a.unref()}return o};this.getRemainingTTL=o=>{const a=T(this,St).get(o);if(a===void 0)return 0;const O=t[a],l=n[a];if(!O||!l)return 1/0;const s=(i||r())-l;return O-s},fe(this,Cn,o=>{const a=n[o],O=t[o];return!!O&&!!a&&(i||r())-a>O})},ma=new WeakMap,qr=new WeakMap,Gs=new WeakMap,Cn=new WeakMap,Td=new WeakSet,Mz=function(){const t=new Gc(T(this,Ti));fe(this,zi,0),fe(this,qi,t),fe(this,ga,n=>{fe(this,zi,T(this,zi)-t[n]),t[n]=0}),fe(this,Is,(n,i,r,o)=>{if(le(this,Ne,Je).call(this,i))return 0;if(!oo(r))if(o){if(typeof o!="function")throw new TypeError("sizeCalculation must be a function");if(r=o(i,n),!oo(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return r}),fe(this,WO,(n,i,r)=>{if(t[n]=i,T(this,En)){const o=T(this,En)-t[n];for(;T(this,zi)>o;)le(this,qO,Nd).call(this,!0)}fe(this,zi,T(this,zi)+t[n]),r&&(r.entrySize=i,r.totalCalculatedSize=T(this,zi))})},ga=new WeakMap,WO=new WeakMap,Is=new WeakMap,Or=new WeakSet,ko=function*({allowStale:t=this.allowStale}={}){if(T(this,Tt))for(let n=T(this,Zt);!(!le(this,Ds,LQ).call(this,n)||((t||!T(this,Cn).call(this,n))&&(yield n),n===T(this,Jt)));)n=T(this,Yn)[n]},lr=new WeakSet,xo=function*({allowStale:t=this.allowStale}={}){if(T(this,Tt))for(let n=T(this,Jt);!(!le(this,Ds,LQ).call(this,n)||((t||!T(this,Cn).call(this,n))&&(yield n),n===T(this,Zt)));)n=T(this,ln)[n]},Ds=new WeakSet,LQ=function(t){return t!==void 0&&T(this,St).get(T(this,He)[t])===t},qO=new WeakSet,Nd=function(t){var o,a;const n=T(this,Jt),i=T(this,He)[n],r=T(this,me)[n];return T(this,yo)&&le(this,Ne,Je).call(this,r)?r.__abortController.abort(new Error("evicted")):(T(this,Ui)||T(this,sn))&&(T(this,Ui)&&((o=T(this,_i))==null||o.call(this,r,i,"evict")),T(this,sn)&&((a=T(this,Ut))==null||a.push([r,i,"evict"]))),T(this,ga).call(this,n),t&&(T(this,He)[n]=void 0,T(this,me)[n]=void 0,T(this,Wi).push(n)),T(this,Tt)===1?(fe(this,Jt,fe(this,Zt,0)),T(this,Wi).length=0):fe(this,Jt,T(this,ln)[n]),T(this,St).delete(i),Dd(this,Tt)._--,n},ZO=new WeakSet,Ld=function(t,n,i,r){const o=n===void 0?void 0:T(this,me)[n];if(le(this,Ne,Je).call(this,o))return o;const a=new Ac,{signal:O}=i;O==null||O.addEventListener("abort",()=>a.abort(O.reason),{signal:a.signal});const l={signal:a.signal,options:i,context:r},s=(m,Q=!1)=>{const{aborted:$}=a.signal,b=i.ignoreFetchAbort&&m!==void 0;if(i.status&&($&&!Q?(i.status.fetchAborted=!0,i.status.fetchError=a.signal.reason,b&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),$&&!b&&!Q)return c(a.signal.reason);const S=h;return T(this,me)[n]===h&&(m===void 0?S.__staleWhileFetching?T(this,me)[n]=S.__staleWhileFetching:this.delete(t):(i.status&&(i.status.fetchUpdated=!0),this.set(t,m,l.options))),m},u=m=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=m),c(m)),c=m=>{const{aborted:Q}=a.signal,$=Q&&i.allowStaleOnFetchAbort,b=$||i.allowStaleOnFetchRejection,S=b||i.noDeleteOnFetchRejection,k=h;if(T(this,me)[n]===h&&(!S||k.__staleWhileFetching===void 0?this.delete(t):$||(T(this,me)[n]=k.__staleWhileFetching)),b)return i.status&&k.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),k.__staleWhileFetching;if(k.__returned===k)throw m},f=(m,Q)=>{var b;const $=(b=T(this,zO))==null?void 0:b.call(this,t,o,l);$&&$ instanceof Promise&&$.then(S=>m(S===void 0?void 0:S),Q),a.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(m(void 0),i.allowStaleOnFetchAbort&&(m=S=>s(S,!0)))})};i.status&&(i.status.fetchDispatched=!0);const h=new Promise(f).then(s,u),p=Object.assign(h,{__abortController:a,__staleWhileFetching:o,__returned:void 0});return n===void 0?(this.set(t,p,{...l.options,status:void 0}),n=T(this,St).get(t)):T(this,me)[n]=p,p},Ne=new WeakSet,Je=function(t){if(!T(this,yo))return!1;const n=t;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof Ac},Ns=new WeakSet,FQ=function(t,n){T(this,Yn)[n]=t,T(this,ln)[t]=n},$a=new WeakSet,Ks=function(t){t!==T(this,Zt)&&(t===T(this,Jt)?fe(this,Jt,T(this,ln)[t]):le(this,Ns,FQ).call(this,T(this,Yn)[t],T(this,ln)[t]),le(this,Ns,FQ).call(this,T(this,Zt),t),fe(this,Zt,t))};let eg=AQ;const M9=e=>{const t=g.inject("theme"),{editorExtensions:n,editorExtensionsAttrs:i,mermaidConfig:r}=pt,o=g.shallowRef(n.mermaid.instance),a=g.shallowRef(-1),O=new eg({max:1e3,ttl:6e5}),l=()=>{const u=o.value;!e.noMermaid&&u&&(u.initialize(r({startOnLoad:!1,theme:t.value==="dark"?"dark":"default"})),a.value=a.value+1)};return g.watch(()=>t.value,()=>{O.clear(),l()}),g.onMounted(()=>{var c,f,h;if(e.noMermaid||(c=o.value)!=null&&c.instance)return;const u=n.mermaid.js;/\.mjs/.test(u)?(un("link",{...(f=i.mermaid)==null?void 0:f.js,rel:"modulepreload",href:u,id:`${z}-mermaid-m`}),import(u).then(p=>{o.value=p.default,l()})):un("script",{...(h=i.mermaid)==null?void 0:h.js,src:u,id:`${z}-mermaid`,onload(){o.value=window.mermaid,l()}},"mermaid")}),{mermaidRef:o,reRenderRef:a,replaceMermaid:()=>{g.nextTick(()=>{if(!e.noMermaid&&o.value){const u=document.querySelectorAll(`div.${z}-mermaid`),c=document.createElement("div");c.style.width=document.body.offsetWidth+"px",c.style.height=document.body.offsetHeight+"px",c.style.position="fixed",c.style.zIndex="-10000",c.style.top="-10000";let f=u.length;f>0&&document.body.appendChild(c),u.forEach(async h=>{let p=O.get(h.innerText);if(!p){const Q=Md(),$=o.value.renderAsync||o.value.render;let b="";try{b=await $(Q,h.innerText,c)}catch{}p=await e.sanitizeMermaid(typeof b=="string"?b:b.svg),O.set(h.innerText,p)}const m=document.createElement("p");m.className=`${z}-mermaid`,m.setAttribute("data-processed",""),m.innerHTML=p,h.dataset.line!==void 0&&(m.dataset.line=h.dataset.line),h.replaceWith(m),--f===0&&c.remove()})}})}}},B9=e=>{const t=g.shallowRef(pt.editorExtensions.katex.instance);return g.onMounted(()=>{if(e.noKatex||t.value)return;const{editorExtensions:n}=pt;un("script",{src:n.katex.js,id:`${z}-katex`,onload(){t.value=window.katex}},"katex"),un("link",{rel:"stylesheet",href:n.katex.css,id:`${z}-katexCss`})}),t},H9=(e,t)=>{const n=e.renderer.rules.fence.bind(e.renderer.rules);e.renderer.rules.fence=(i,r,o,a,O)=>{const l=i[r],s=l.content.trim();if(l.info==="mermaid"){let u;return i[r].map&&i[r].level===0&&(u=i[r].map[0],i[r].attrSet("data-line",String(u))),`<div class="${z}-mermaid" ${u!==void 0?"data-line="+u:""} data-mermaid-theme=${t.themeRef.value}>${s}</div>`}return n(i,r,o,a,O)}},Ic=(e,t)=>{const n=e.attrs?e.attrs.slice():[];return t.forEach(i=>{const r=e.attrIndex(i[0]);r<0?n.push(i):(n[r]=n[r].slice(),n[r][1]+=` ${i[1]}`)}),n},Ov=(e,t)=>{let n=!0,i=!0;const r=e.posMax,o=t>0?e.src.charCodeAt(t-1):-1,a=t+1<=r?e.src.charCodeAt(t+1):-1;return(o===32||o===9||a>=48&&a<=57)&&(i=!1),(a===32||a===9)&&(n=!1),{can_open:n,can_close:i}},K9=(e,t)=>{let n,i,r,o;if(e.src[e.pos]!=="$")return!1;if(r=Ov(e,e.pos),!r.can_open)return t||(e.pending+="$"),e.pos+=1,!0;const a=e.pos+1;for(n=a;(n=e.src.indexOf("$",n))!==-1;){for(o=n-1;e.src[o]==="\\";)o-=1;if((n-o)%2==1)break;n+=1}return n===-1?(t||(e.pending+="$"),e.pos=a,!0):n-a===0?(t||(e.pending+="$$"),e.pos=a+1,!0):(r=Ov(e,n),r.can_close?(t||(i=e.push("math_inline","math",0),i.markup="$",i.content=e.src.slice(a,n)),e.pos=n+1,!0):(t||(e.pending+="$"),e.pos=a,!0))},J9=(e,t,n,i)=>{let r,o,a,O,l=!1,s=e.bMarks[t]+e.tShift[t],u=e.eMarks[t];if(s+2>u||e.src.slice(s,s+2)!=="$$")return!1;if(s+=2,r=e.src.slice(s,u),i)return!0;for(r.trim().slice(-2)==="$$"&&(r=r.trim().slice(0,-2),l=!0),a=t;!l&&(a++,!(a>=n||(s=e.bMarks[a]+e.tShift[a],u=e.eMarks[a],s<u&&e.tShift[a]<e.blkIndent)));)e.src.slice(s,u).trim().slice(-2)==="$$"&&(O=e.src.slice(0,u).lastIndexOf("$$"),o=e.src.slice(s,O),l=!0);e.line=a+1;const c=e.push("math_block","math",0);return c.block=!0,c.content=(r&&r.trim()?r+`
115
- `:"")+e.getLines(t+1,a,e.tShift[t],!0)+(o&&o.trim()?o:""),c.map=[t,e.line],c.markup="$$",!0},e8=(e,{katexRef:t})=>{const n=(r,o,a,O,l)=>{const s=r[o],u={attrs:Ic(s,[["class",`${z}-katex-inline`]])};if(t.value){const c=t.value.renderToString(s.content,{throwOnError:!1});return`<span ${l.renderAttrs(u)} data-processed>${c}</span>`}else return`<span ${l.renderAttrs(u)}>${s.content}</span>`},i=(r,o,a,O,l)=>{const s=r[o],u={attrs:Ic(s,[["class",`${z}-katex-block`]])};if(t.value){const c=t.value.renderToString(s.content,{throwOnError:!1,displayMode:!0});return`<p ${l.renderAttrs(u)} data-processed>${c}</p>`}else return`<p ${l.renderAttrs(u)}>${s.content}</p>`};e.inline.ruler.after("escape","math_inline",K9),e.block.ruler.after("blockquote","math_block",J9,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.math_inline=n,e.renderer.rules.math_block=i},t8=(e,t)=>{t=t||{};const n=3,i=t.marker||"!",r=i.charCodeAt(0),o=i.length;let a="",O="";const l=(u,c,f,h,p)=>{const m=u[c];return m.type==="admonition_open"?u[c].attrPush(["class",`${z}-admonition ${z}-admonition-${m.info}`]):m.type==="admonition_title_open"&&u[c].attrPush(["class",`${z}-admonition-title`]),p.renderToken(u,c,f)},s=u=>{const c=u.trim().split(" ",2);O="",a=c[0],c.length>1&&(O=u.substring(a.length+2)),(O===""||!O)&&(O=a)};e.block.ruler.before("code","admonition",(u,c,f,h)=>{let p,m,Q,$=!1,b=u.bMarks[c]+u.tShift[c],S=u.eMarks[c];if(r!==u.src.charCodeAt(b))return!1;for(p=b+1;p<=S&&i[(p-b)%o]===u.src[p];p++);const k=Math.floor((p-b)/o);if(k!==n)return!1;p-=(p-b)%o;const P=u.src.slice(b,p),R=u.src.slice(p,S);if(s(R),h)return!0;for(m=c;m++,!(m>=f||(b=u.bMarks[m]+u.tShift[m],S=u.eMarks[m],b<S&&u.sCount[m]<u.blkIndent));)if(r===u.src.charCodeAt(b)&&!(u.sCount[m]-u.blkIndent>=4)){for(p=b+1;p<=S&&i[(p-b)%o]===u.src[p];p++);if(!(Math.floor((p-b)/o)<k)&&(p-=(p-b)%o,p=u.skipSpaces(p),!(p<S))){$=!0;break}}const v=u.parentType,w=u.lineMax;return u.parentType="root",u.lineMax=m,Q=u.push("admonition_open","div",1),Q.markup=P,Q.block=!0,Q.info=a,Q.map=[c,m],Q=u.push("admonition_title_open","p",1),Q.markup=P+" "+a,Q.map=[c,m],Q=u.push("inline","",0),Q.content=O,Q.map=[c,u.line-1],Q.children=[],Q=u.push("admonition_title_close","p",-1),Q.markup=P+" "+a,u.md.block.tokenize(u,c+1,m),Q=u.push("admonition_close","div",-1),Q.markup=u.src.slice(b,p),Q.block=!0,u.parentType=v,u.lineMax=w,u.line=m+($?1:0),!0},{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.admonition_open=l,e.renderer.rules.admonition_title_open=l,e.renderer.rules.admonition_title_close=l,e.renderer.rules.admonition_close=l},n8=(e,t)=>{e.renderer.rules.heading_open=(n,i)=>{var O;const r=n[i],o=((O=n[i+1].children)==null?void 0:O.reduce((l,s)=>l+s.type==="text"&&s.content||"",""))||"",a=r.markup.length;return t.headsRef.value.push({text:o,level:a}),r.map&&r.level===0&&r.attrSet("id",t.mdHeadingId(o,a,t.headsRef.value.length)),e.renderer.renderToken(n,i,t)},e.renderer.rules.heading_close=(n,i,r,o,a)=>a.renderToken(n,i,r)},i8=(e,t)=>{const n=e.renderer.rules.fence,i=e.utils.unescapeAll,r=/\[(\w*)(?::([\w ]*))?\]/,o=u=>u.info?i(u.info).trim():"",a=u=>{const c=o(u),[f=null,h=""]=(r.exec(c)||[]).slice(1);return[f,h]},O=u=>{const c=o(u);return c?c.split(/(\s+)/g)[0]:""},l=u=>{const c=u.content.trim().split(`
115
+ `:"")+e.getLines(t+1,a,e.tShift[t],!0)+(o&&o.trim()?o:""),c.map=[t,e.line],c.markup="$$",!0},e8=(e,{katexRef:t})=>{const n=(r,o,a,O,l)=>{const s=r[o],u={attrs:Ic(s,[["class",`${z}-katex-inline`]])};if(t.value){const c=t.value.renderToString(s.content,{throwOnError:!1});return`<span ${l.renderAttrs(u)} data-processed>${c}</span>`}else return`<span ${l.renderAttrs(u)}>${s.content}</span>`},i=(r,o,a,O,l)=>{const s=r[o],u={attrs:Ic(s,[["class",`${z}-katex-block`]])};if(t.value){const c=t.value.renderToString(s.content,{throwOnError:!1,displayMode:!0});return`<p ${l.renderAttrs(u)} data-processed>${c}</p>`}else return`<p ${l.renderAttrs(u)}>${s.content}</p>`};e.inline.ruler.after("escape","math_inline",K9),e.block.ruler.after("blockquote","math_block",J9,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.math_inline=n,e.renderer.rules.math_block=i},t8=(e,t)=>{t=t||{};const n=3,i=t.marker||"!",r=i.charCodeAt(0),o=i.length;let a="",O="";const l=(u,c,f,h,p)=>{const m=u[c];return m.type==="admonition_open"?u[c].attrPush(["class",`${z}-admonition ${z}-admonition-${m.info}`]):m.type==="admonition_title_open"&&u[c].attrPush(["class",`${z}-admonition-title`]),p.renderToken(u,c,f)},s=u=>{const c=u.trim().split(" ",2);O="",a=c[0],c.length>1&&(O=u.substring(a.length+2)),(O===""||!O)&&(O=a)};e.block.ruler.before("code","admonition",(u,c,f,h)=>{let p,m,Q,$=!1,b=u.bMarks[c]+u.tShift[c],S=u.eMarks[c];if(r!==u.src.charCodeAt(b))return!1;for(p=b+1;p<=S&&i[(p-b)%o]===u.src[p];p++);const k=Math.floor((p-b)/o);if(k!==n)return!1;p-=(p-b)%o;const P=u.src.slice(b,p),R=u.src.slice(p,S);if(s(R),h)return!0;for(m=c;m++,!(m>=f||(b=u.bMarks[m]+u.tShift[m],S=u.eMarks[m],b<S&&u.sCount[m]<u.blkIndent));)if(r===u.src.charCodeAt(b)&&!(u.sCount[m]-u.blkIndent>=4)){for(p=b+1;p<=S&&i[(p-b)%o]===u.src[p];p++);if(!(Math.floor((p-b)/o)<k)&&(p-=(p-b)%o,p=u.skipSpaces(p),!(p<S))){$=!0;break}}const v=u.parentType,w=u.lineMax;return u.parentType="root",u.lineMax=m,Q=u.push("admonition_open","div",1),Q.markup=P,Q.block=!0,Q.info=a,Q.map=[c,m],Q=u.push("admonition_title_open","p",1),Q.markup=P+" "+a,Q.map=[c,m],Q=u.push("inline","",0),Q.content=O,Q.map=[c,u.line-1],Q.children=[],Q=u.push("admonition_title_close","p",-1),Q.markup=P+" "+a,u.md.block.tokenize(u,c+1,m),Q=u.push("admonition_close","div",-1),Q.markup=u.src.slice(b,p),Q.block=!0,u.parentType=v,u.lineMax=w,u.line=m+($?1:0),!0},{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.admonition_open=l,e.renderer.rules.admonition_title_open=l,e.renderer.rules.admonition_title_close=l,e.renderer.rules.admonition_close=l},n8=(e,t)=>{e.renderer.rules.heading_open=(n,i)=>{var O;const r=n[i],o=((O=n[i+1].children)==null?void 0:O.reduce((l,s)=>l+(["text","code_inline"].includes(s.type)&&s.content||""),""))||"",a=r.markup.length;return t.headsRef.value.push({text:o,level:a}),r.map&&r.level===0&&r.attrSet("id",t.mdHeadingId(o,a,t.headsRef.value.length)),e.renderer.renderToken(n,i,t)},e.renderer.rules.heading_close=(n,i,r,o,a)=>a.renderToken(n,i,r)},i8=(e,t)=>{const n=e.renderer.rules.fence,i=e.utils.unescapeAll,r=/\[(\w*)(?::([\w ]*))?\]/,o=u=>u.info?i(u.info).trim():"",a=u=>{const c=o(u),[f=null,h=""]=(r.exec(c)||[]).slice(1);return[f,h]},O=u=>{const c=o(u);return c?c.split(/(\s+)/g)[0]:""},l=u=>{const c=u.content.trim().split(`
116
116
  `).length<t.autoFoldThreshold,f=t.codeFoldable?"details":"div",h=t.codeFoldable?"summary":"div";return{open:c,tagContainer:f,tagHeader:h}},s=(u,c,f,h,p)=>{var V,E;if(u[c].hidden)return"";const[m]=a(u[c]);if(m===null){const{open:X,tagContainer:Z,tagHeader:W}=l(u[c]),Y=[["class",`${z}-code`]];X&&Y.push(["open",""]);const L={attrs:Ic(u[c],Y)},F=n(u,c,f,h,p);return`<${Z} ${p.renderAttrs(L)}>
117
117
  <${W} class="${z}-code-head">
118
118
  <div class="${z}-code-flag">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "md-editor-v3",
3
- "version": "4.15.1",
3
+ "version": "4.15.2",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "vue",