function smartypants(e){return e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function mangle(e){let t="",n,r;var i=e.length;for(n=0;nt+" ".repeat(n.length));let n,e,i,s;for(;r;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(e=>!!(n=e.call({lexer:this},r,t))&&(r=r.substring(n.raw.length),t.push(n),!0))))if(n=this.tokenizer.space(r))r=r.substring(n.raw.length),1===n.raw.length&&0!!(n=e.call({lexer:this},r,t))&&(r=r.substring(n.raw.length),t.push(n),!0))))if(n=this.tokenizer.escape(r))r=r.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(r))r=r.substring(n.raw.length),(e=t[t.length-1])&&"text"===n.type&&"text"===e.type?(e.raw+=n.raw,e.text+=n.text):t.push(n);else if(n=this.tokenizer.link(r))r=r.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(r,this.tokens.links))r=r.substring(n.raw.length),(e=t[t.length-1])&&"text"===n.type&&"text"===e.type?(e.raw+=n.raw,e.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(r,s,o))r=r.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(r))r=r.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(r))r=r.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(r))r=r.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(r,mangle))r=r.substring(n.raw.length),t.push(n);else if(!this.state.inLink&&(n=this.tokenizer.url(r,mangle)))r=r.substring(n.raw.length),t.push(n);else{if(i=r,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const h=r.slice(1);let n;this.options.extensions.startInline.forEach(function(e){"number"==typeof(n=e.call({lexer:this},h))&&0<=n&&(t=Math.min(t,n))}),t<1/0&&0<=t&&(i=r.substring(0,t+1))}if(n=this.tokenizer.inlineText(i,smartypants))r=r.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(o=n.raw.slice(-1)),a=!0,(e=t[t.length-1])&&"text"===e.type?(e.raw+=n.raw,e.text+=n.text):t.push(n);else if(r){var p="Infinite loop on byte: "+r.charCodeAt(0);if(this.options.silent){console.error(p);break}throw new Error(p)}}return t}}class Parser{constructor(e){this.options=e||defaults,this.options.renderer=this.options.renderer||new Renderer,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new TextRenderer,this.slugger=new Slugger}static parse(e,t){return new Parser(t).parse(e)}static parseInline(e,t){return new Parser(t).parseInline(e)}parse(e,t=!0){let n="",r,i,s,l,a,o,c,p,h,u,g,k,d,f,m,x,b,w,_;var y=e.length;for(r=0;r'+(n?e:escape(e,!0))+"\n":"
"+(n?e:escape(e,!0))+"
\n"}blockquote(e){return`
${e}
`}html(e){return e}heading(e,t,n,r){return this.options.headerIds?`${e} `:`${e} `}hr(){return this.options.xhtml?"
\n":"
\n"}list(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"}listitem(e){return`
  • ${e}
  • `}checkbox(e){return" "}paragraph(e){return`

    ${e}

    `}table(e,t){return"\n\n"+e+"\n"+(t=t&&`${t}`)+"
    \n"}tablerow(e){return` ${e} `}tablecell(e,t){var n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+` `}strong(e){return`${e}`}em(e){return`${e}`}codespan(e){return`${e}`}br(){return this.options.xhtml?"
    ":"
    "}del(e){return`${e}`}link(e,t,n){if(null===(e=cleanUrl(this.options.sanitize,this.options.baseUrl,e)))return n;let r='"}image(e,t,n){if(null===(e=cleanUrl(this.options.sanitize,this.options.baseUrl,e)))return n;let r=`${n}":">"}video(e,t,n){return null===(e=cleanUrl(this.options.sanitize,this.options.baseUrl,e))?n:``}audio(e,t,n){return null===(e=cleanUrl(this.options.sanitize,this.options.baseUrl,e))?n:``}text(e){return e}}class Slugger{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,r=0;if(this.seen.hasOwnProperty(n))for(r=this.seen[e];r++,n=e+"-"+r,this.seen.hasOwnProperty(n););return t||(this.seen[e]=r,this.seen[n]=0),n}slug(e,t={}){e=this.serialize(e);return this.getNextSafeSlug(e,t.dryrun)}}class TextRenderer{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}video(e,t,n){return""+n}audio(e,t,n){return""+n}br(){return""}}function outputLink(e,t,n,r){var i=t.href,s=t.title?escape(t.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");return console.log("outputLink() link=",t,"====================="),"!"!==e[0].charAt(0)?(r.state.inLink=!0,t={type:"link",raw:n,href:i,title:s,text:l,tokens:r.inlineTokens(l)},r.state.inLink=!1,console.log("outputLink(): cap=",e[0],"return a link"),t):e[0].startsWith("!v")?(console.log("outputLink(): cap=",e[0],"return a video"),{type:"video",raw:n,href:i,title:s,text:escape(l)}):e[0].startsWith("!a")?(console.log("outputLink(): cap=",e[0],"return a audio"),{type:"audio",raw:n,href:i,title:s,text:escape(l)}):(console.log("outputLink(): cap=",e[0],"return a image"),{type:"image",raw:n,href:i,title:s,text:escape(l)})}function indentCodeCompensation(e,t){e=e.match(/^(\s+)(?:```)/);if(null===e)return t;const n=e[1];return t.split("\n").map(e=>{var t=e.match(/^\s+/);return null!==t&&([t]=t,t.length>=n.length)?e.slice(n.length):e}).join("\n")}class Tokenizer{constructor(e){this.options=e||defaults}space(e){e=this.rules.block.newline.exec(e);if(e&&0[ \t]?/gm,""),n=this.lexer.state.top,this.lexer.state.top=!0,r=this.lexer.blockTokens(t),this.lexer.state.top=n,{type:"blockquote",raw:e[0],tokens:r,text:t}}list(g){let k=this.rules.block.list.exec(g);if(k){let e,t,n,r,i,s,l,a,o,c,p,h,u=k[1].trim();for(var d=1" ".repeat(3*e.length)),o=g.split("\n",1)[0],this.options.pedantic?(r=2,p=a.trimLeft()):(r=4<(r=k[2].search(/[^ ]/))?1:r,p=a.slice(r),r+=k[1].length),s=!1,!a&&/^ *$/.test(o)&&(e+=o+"\n",g=g.substring(o.length+1),h=!0),!h)for(var x=new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),b=new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),w=new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),_=new RegExp(`^ {0,${Math.min(3,r-1)}}#`);g&&(c=g.split("\n",1)[0],o=c,this.options.pedantic&&(o=o.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!w.test(o))&&!_.test(o)&&!x.test(o)&&!b.test(g);){if(o.search(/[^ ]/)>=r||!o.trim())p+="\n"+o.slice(r);else{if(s)break;if(4<=a.search(/[^ ]/))break;if(w.test(a))break;if(_.test(a))break;if(b.test(a))break;p+="\n"+o}s||o.trim()||(s=!0),e+=c+"\n",g=g.substring(c.length+1),a=o.slice(r)}f.loose||(l?f.loose=!0:/\n *\n *$/.test(e)&&(l=!0)),this.options.gfm&&(t=/^\[[ xX]\] /.exec(p))&&(n="[ ] "!==t[0],p=p.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:e,task:!!t,checked:n,loose:!1,text:p}),f.raw+=e}f.items[f.items.length-1].raw=e.trimRight(),f.items[f.items.length-1].text=p.trimRight(),f.raw=f.raw.trimRight();var y,$=f.items.length;for(i=0;i<$;i++)this.lexer.state.top=!1,f.items[i].tokens=this.lexer.blockTokens(f.items[i].text,[]),f.loose||(y=0<(y=f.items[i].tokens.filter(e=>"space"===e.type)).length&&y.some(e=>/\n.*\n/.test(e.raw)),f.loose=y);if(f.loose)for(i=0;i<$;i++)f.items[i].loose=!0;return f}}html(e){var t,e=this.rules.block.html.exec(e);if(e)return t={type:"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:e[0]},this.options.sanitize&&(e=this.options.sanitizer?this.options.sanitizer(e[0]):escape(e[0]),t.type="paragraph",t.text=e,t.tokens=this.lexer.inline(e)),t}def(e){var t,n,r,e=this.rules.block.def.exec(e);if(e)return t=e[1].toLowerCase().replace(/\s+/g," "),n=e[2]?e[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",r=e[3]&&e[3].substring(1,e[3].length-1).replace(this.rules.inline._escapes,"$1"),{type:"def",tag:t,raw:e[0],href:n,title:r}}table(s){s=this.rules.block.table.exec(s);if(s){var l={type:"table",header:splitCells(s[1]).map(e=>({text:e})),align:s[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:s[3]&&s[3].trim()?s[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(l.header.length===l.align.length){l.raw=s[0];let e=l.align.length,t,n,r,i;for(t=0;t({text:e}));for(e=l.header.length,n=0;n/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):escape(e[0]):e[0]}}link(n){n=this.rules.inline.link.exec(n);if(n){var r=n[2].trim();if(!this.options.pedantic&&/^$/.test(r))return;var i=rtrim(r.slice(0,-1),"\\");if((r.length-i.length)%2==0)return}else{var s,i=findClosingBracket(n[2],"()");-1$/.test(r)?e.slice(1):e.slice(1,-1):e)&&e.replace(this.rules.inline._escapes,"$1"),title:t&&t.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if(r=(r=this.rules.inline.reflink.exec(t))||this.rules.inline.nolink.exec(t)){let e=(r[2]||r[1]).replace(/\s+/g," ");return(e=n[e.toLowerCase()])?outputLink(r,e,r[0],this.lexer):{type:"text",raw:t=r[0].charAt(0),text:t}}}emStrong(i,s,e=""){let l=this.rules.inline.emStrong.lDelim.exec(i);if(l&&(!l[3]||!e.match(/[\p{L}\p{N}]/u))){var t=l[1]||l[2]||"";if(!t||""===e||this.rules.inline.punctuation.exec(e)){var a=l[0].length-1;let e,t,n=a,r=0;var o,c,p="*"===l[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(p.lastIndex=0,s=s.slice(-1*i.length+a);null!=(l=p.exec(s));)if(e=l[1]||l[2]||l[3]||l[4]||l[5]||l[6])if(t=e.length,l[3]||l[4])n+=t;else if((l[5]||l[6])&&a%3&&!((a+t)%3))r+=t;else if(!(0<(n-=t)))return t=Math.min(t,t+n+r),o=i.slice(0,a+l.index+(l[0].length-e.length)+t),Math.min(a,t)%2?(c=o.slice(1,-1),{type:"em",raw:o,text:c,tokens:this.lexer.inlineTokens(c)}):(c=o.slice(2,-2),{type:"strong",raw:o,text:c,tokens:this.lexer.inlineTokens(c)})}}}codespan(t){t=this.rules.inline.code.exec(t);if(t){let e=t[2].replace(/\n/g," ");var n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return e=escape(e=n&&r?e.substring(1,e.length-1):e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){e=this.rules.inline.br.exec(e);if(e)return{type:"br",raw:e[0]}}del(e){e=this.rules.inline.del.exec(e);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(n,r){n=this.rules.inline.autolink.exec(n);if(n){let e,t;return t="@"===n[2]?"mailto:"+(e=escape(this.options.mangle?r(n[1]):n[1])):e=escape(n[1]),{type:"link",raw:n[0],text:e,href:t,tokens:[{type:"text",raw:e,text:e}]}}}url(e,n){var r,i;if(r=this.rules.inline.url.exec(e)){let e,t;if("@"===r[2])e=escape(this.options.mangle?n(r[0]):r[0]),t="mailto:"+e;else{for(;i=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])[0],i!==r[0];);e=escape(r[0]),t="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:e,href:t,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(t,n){t=this.rules.inline.text.exec(t);if(t){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):escape(t[0]):t[0]:escape(this.options.smartypants?n(t[0]):t[0]),{type:"text",raw:t[0],text:e}}}}function getDefaults(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let defaults=getDefaults();function changeDefaults(e){defaults=e}const escapeTest=/[&<>"']/,escapeReplace=new RegExp(escapeTest.source,"g"),escapeTestNoEncode=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode=new RegExp(escapeTestNoEncode.source,"g"),escapeReplacements={"&":"&","<":"<",">":">",'"':""","'":"'"},getEscapeReplacement=e=>escapeReplacements[e];function escape(e,t){if(t){if(escapeTest.test(e))return e.replace(escapeReplace,getEscapeReplacement)}else if(escapeTestNoEncode.test(e))return e.replace(escapeReplaceNoEncode,getEscapeReplacement);return e}const unescapeTest=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function unescape(e){return e.replace(unescapeTest,(e,t)=>"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")}const caret=/(^|[^\[])\^/g;function edit(n,e){n="string"==typeof n?n:n.source,e=e||"";const r={replace:(e,t)=>(t=(t=t.source||t).replace(caret,"$1"),n=n.replace(e,t),r),getRegex:()=>new RegExp(n,e)};return r}const nonWordAndColonTest=/[^\w:]/g,originIndependentUrl=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function cleanUrl(e,t,n){if(e){let e;try{e=decodeURIComponent(unescape(n)).replace(nonWordAndColonTest,"").toLowerCase()}catch(e){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!originIndependentUrl.test(n)&&(n=resolveUrl(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(e){return null}return n}const baseUrls={},justDomain=/^[^:]+:\/*[^/]*$/,protocol=/^([^:]+:)[\s\S]*$/,domain=/^([^:]+:\/*[^/]*)[\s\S]*$/;function resolveUrl(e,t){baseUrls[" "+e]||(justDomain.test(e)?baseUrls[" "+e]=e+"/":baseUrls[" "+e]=rtrim(e,"/",!0));var n=-1===(e=baseUrls[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(protocol,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(domain,"$1")+t:e+t}const noopTest={exec:function(){}};function merge(e){let t=1,n,r;for(;t{let r=!1,i=t;for(;0<=--i&&"\\"===n[i];)r=!r;return r?"|":" |"}).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),0t)n.splice(t);else for(;n.length>=1,e+=e;return n+e}function marked(e,i,s){if(null==e)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");if("function"==typeof i&&(s=i,i=null),checkSanitizeDeprecation(i=merge({},marked.defaults,i||{})),s){const l=i.highlight;let n;try{n=Lexer.lex(e,i)}catch(e){return s(e)}const a=function(t){let e;if(!t)try{i.walkTokens&&marked.walkTokens(n,i.walkTokens),e=Parser.parse(n,i)}catch(e){t=e}return i.highlight=l,t?s(t):s(null,e)};if(!l||l.length<3)return a();if(delete i.highlight,!n.length)return a();let r=0;marked.walkTokens(n,function(n){"code"===n.type&&(r++,setTimeout(()=>{l(n.text,n.lang,function(e,t){if(e)return a(e);null!=t&&t!==n.text&&(n.text=t,n.escaped=!0),0===--r&&a()})},0))}),void(0===r&&a())}else try{const n=Lexer.lex(e,i);if(i.walkTokens){if(i.async)return Promise.all(marked.walkTokens(n,i.walkTokens)).then(()=>Parser.parse(n,i)).catch(t);marked.walkTokens(n,i.walkTokens)}return Parser.parse(n,i)}catch(e){t(e)}function t(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",i.silent)return"

    An error occurred:

    "+escape(e.message+"",!0)+"
    ";throw e}}marked.options=marked.setOptions=function(e){return merge(marked.defaults,e),changeDefaults(marked.defaults),marked},marked.getDefaults=getDefaults,marked.defaults=defaults,marked.use=function(...e){const t=marked.defaults.extensions||{renderers:{},childTokens:{}};e.forEach(n=>{var e=merge({},n);if(e.async=marked.defaults.async||e.async,n.extensions&&(n.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if(n.renderer){const r=t.renderers[n.name];r?t.renderers[n.name]=function(...e){let t=n.renderer.apply(this,e);return t=!1===t?r.apply(this,e):t}:t.renderers[n.name]=n.renderer}if(n.tokenizer){if(!n.level||"block"!==n.level&&"inline"!==n.level)throw new Error("extension level must be 'block' or 'inline'");t[n.level]?t[n.level].unshift(n.tokenizer):t[n.level]=[n.tokenizer],n.start&&("block"===n.level?t.startBlock?t.startBlock.push(n.start):t.startBlock=[n.start]:"inline"===n.level&&(t.startInline?t.startInline.push(n.start):t.startInline=[n.start]))}n.childTokens&&(t.childTokens[n.name]=n.childTokens)}),e.extensions=t),n.renderer){const r=marked.defaults.renderer||new Renderer;for(const i in n.renderer){const s=r[i];r[i]=(...e)=>{let t=n.renderer[i].apply(r,e);return t=!1===t?s.apply(r,e):t}}e.renderer=r}if(n.tokenizer){const l=marked.defaults.tokenizer||new Tokenizer;for(const a in n.tokenizer){const o=l[a];l[a]=(...e)=>{let t=n.tokenizer[a].apply(l,e);return t=!1===t?o.apply(l,e):t}}e.tokenizer=l}if(n.walkTokens){const c=marked.defaults.walkTokens;e.walkTokens=function(e){let t=[];return t.push(n.walkTokens.call(this,e)),t=c?t.concat(c.call(this,e)):t}}marked.setOptions(e)})},marked.walkTokens=function(e,t){let n=[];for(const r of e)switch(n=n.concat(t.call(marked,r)),r.type){case"table":for(const i of r.header)n=n.concat(marked.walkTokens(i.tokens,t));for(const s of r.rows)for(const l of s)n=n.concat(marked.walkTokens(l.tokens,t));break;case"list":n=n.concat(marked.walkTokens(r.items,t));break;default:marked.defaults.extensions&&marked.defaults.extensions.childTokens&&marked.defaults.extensions.childTokens[r.type]?marked.defaults.extensions.childTokens[r.type].forEach(function(e){n=n.concat(marked.walkTokens(r[e],t))}):r.tokens&&(n=n.concat(marked.walkTokens(r.tokens,t)))}return n},marked.parseInline=function(e,t){if(null==e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");checkSanitizeDeprecation(t=merge({},marked.defaults,t||{}));try{var n=Lexer.lexInline(e,t);return t.walkTokens&&marked.walkTokens(n,t.walkTokens),Parser.parseInline(n,t)}catch(e){if(e.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"

    An error occurred:

    "+escape(e.message+"",!0)+"
    ";throw e}},marked.Parser=Parser,marked.parser=Parser.parse,marked.Renderer=Renderer,marked.TextRenderer=TextRenderer,marked.Lexer=Lexer,marked.lexer=Lexer.lex,marked.Tokenizer=Tokenizer,marked.Slugger=Slugger;const options=(marked.parse=marked).options,setOptions=marked.setOptions,use=marked.use,walkTokens=marked.walkTokens,parseInline=marked.parseInline,parse=marked,parser=Parser.parse,lexer=Lexer.lex,block={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:noopTest,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/},inline=(block.def=edit(block.def).replace("label",block._label).replace("title",block._title).getRegex(),block.bullet=/(?:[*+-]|\d{1,9}[.)])/,block.listItemStart=edit(/^( *)(bull) */).replace("bull",block.bullet).getRegex(),block.list=edit(block.list).replace(/bull/g,block.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+block.def.source+")").getRegex(),block._tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",block._comment=/|$)/,block.html=edit(block.html,"i").replace("comment",block._comment).replace("tag",block._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),block.paragraph=edit(block._paragraph).replace("hr",block.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",block._tag).getRegex(),block.blockquote=edit(block.blockquote).replace("paragraph",block.paragraph).getRegex(),block.normal=merge({},block),block.gfm=merge({},block.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),block.gfm.table=edit(block.gfm.table).replace("hr",block.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",block._tag).getRegex(),block.gfm.paragraph=edit(block._paragraph).replace("hr",block.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",block.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",block._tag).getRegex(),block.pedantic=merge({},block.normal,{html:edit("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",block._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:noopTest,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:edit(block.normal._paragraph).replace("hr",block.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",block.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()}),{escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:noopTest,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^(?:![va]?)?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:noopTest,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"});inline.punctuation=edit(inline.punctuation).replace(/punctuation/g,inline._punctuation).getRegex(),inline.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,inline.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,inline._comment=edit(block._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),inline.emStrong.lDelim=edit(inline.emStrong.lDelim).replace(/punct/g,inline._punctuation).getRegex(),inline.emStrong.rDelimAst=edit(inline.emStrong.rDelimAst,"g").replace(/punct/g,inline._punctuation).getRegex(),inline.emStrong.rDelimUnd=edit(inline.emStrong.rDelimUnd,"g").replace(/punct/g,inline._punctuation).getRegex(),inline._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,inline._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,inline._email=/[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])?)+(?![-_])/,inline.autolink=edit(inline.autolink).replace("scheme",inline._scheme).replace("email",inline._email).getRegex(),inline._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,inline.tag=edit(inline.tag).replace("comment",inline._comment).replace("attribute",inline._attribute).getRegex(),inline._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,inline._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,inline._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,inline.link=edit(inline.link).replace("label",inline._label).replace("href",inline._href).replace("title",inline._title).getRegex(),inline.reflink=edit(inline.reflink).replace("label",inline._label).replace("ref",block._label).getRegex(),inline.nolink=edit(inline.nolink).replace("ref",block._label).getRegex(),inline.reflinkSearch=edit(inline.reflinkSearch,"g").replace("reflink",inline.reflink).replace("nolink",inline.nolink).getRegex(),inline.normal=merge({},inline),inline.pedantic=merge({},inline.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:edit(/^(?:![va]?)?\[(label)\]\((.*?)\)/).replace("label",inline._label).getRegex(),reflink:edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",inline._label).getRegex()}),inline.gfm=merge({},inline.normal,{escape:edit(inline.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\