ruru
Version:
Grafast-flavoured GraphiQL distribution
2 lines • 2.73 MB
JavaScript
/*! For license information please see 2370.js.LICENSE.txt */
export const __webpack_esm_id__=2370;export const __webpack_esm_ids__=[2370,5555,9740];export const __webpack_esm_modules__={38179(e,t,i){i.r(t)},29231(e,t,i){i.r(t)},22053(e,t,i){i.r(t)},35782(e,t,i){i.r(t),i.d(t,{DataTransfers:()=>n});const n={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:i(58409).Mimes.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}},14032(e,t,i){i.r(t),i.d(t,{DomEmitter:()=>o});var n=i(22573);class o{get event(){return this.emitter.event}constructor(e,t,i){const o=e=>this.emitter.fire(e);this.emitter=new n.Emitter({onWillAddFirstListener:()=>e.addEventListener(t,o,i),onDidRemoveLastListener:()=>e.removeEventListener(t,o,i)})}dispose(){this.emitter.dispose()}}},53430(e,t,i){i.r(t),i.d(t,{DEFAULT_FONT_FAMILY:()=>o});var n=i(69958);const o=n.isWindows?'"Segoe WPC", "Segoe UI", sans-serif':n.isMacintosh?"-apple-system, BlinkMacSystemFont, sans-serif":'system-ui, "Ubuntu", "Droid Sans", sans-serif'},57420(e,t,i){i.r(t),i.d(t,{createElement:()=>r,renderFormattedText:()=>s,renderText:()=>o});var n=i(79284);function o(e,t={}){const i=r(t);return i.textContent=e,i}function s(e,t={}){const i=r(t);return l(i,function(e,t){const i={type:1,children:[]};let n=0,o=i;const s=[],r=new a(e);for(;!r.eos();){let e=r.next();const i="\\"===e&&0!==c(r.peek(),t);if(i&&(e=r.next()),!i&&d(e,t)&&e===r.peek()){r.advance(),2===o.type&&(o=s.pop());const i=c(e,t);if(o.type===i||5===o.type&&6===i)o=s.pop();else{const e={type:i,children:[]};5===i&&(e.index=n,n++),o.children.push(e),s.push(o),o=e}}else if("\n"===e)2===o.type&&(o=s.pop()),o.children.push({type:8});else if(2!==o.type){const t={type:2,content:e};o.children.push(t),s.push(o),o=t}else o.content+=e}return 2===o.type&&(o=s.pop()),s.length,i}(e,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),i}function r(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}class a{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function l(e,t,i,o){let s;if(2===t.type)s=document.createTextNode(t.content||"");else if(3===t.type)s=document.createElement("b");else if(4===t.type)s=document.createElement("i");else if(7===t.type&&o)s=document.createElement("code");else if(5===t.type&&i){const e=document.createElement("a");i.disposables.add(n.addStandardDisposableListener(e,"click",e=>{i.callback(String(t.index),e)})),s=e}else 8===t.type?s=document.createElement("br"):1===t.type&&(s=e);s&&e!==s&&e.appendChild(s),s&&Array.isArray(t.children)&&t.children.forEach(e=>{l(s,e,i,o)})}function d(e,t){return 0!==c(e,t)}function c(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}},68163(e,t,i){i.d(t,{allowedMarkdownAttr:()=>A,fillInIncompleteTokens:()=>q,renderMarkdown:()=>N,renderMarkdownAsPlaintext:()=>F,renderStringAsPlaintext:()=>O}),i.r(t);var n=i(79284),o=i(20931),s=i(14032),r=i(57420),a=i(44503),l=i(65698),d=i(819),c=i(73226),h=i(22573),u=i(21643),g=i(82279),p=i(69383),m=i(55003),f=i(32293);let _={};!function(){function e(e,t){t(_)}var t,i;e.amd=!0,t=this,i=function(e){function t(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function i(t){e.defaults=t}e.defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};const n=/[&<>"']/,o=new RegExp(n.source,"g"),s=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,r=new RegExp(s.source,"g"),a={"&":"&","<":"<",">":">",'"':""","'":"'"},l=e=>a[e];function d(e,t){if(t){if(n.test(e))return e.replace(o,l)}else if(s.test(e))return e.replace(r,l);return e}const c=/(^|[^\[])\^/g;function h(e,t){let i="string"==typeof e?e:e.source;t=t||"";const n={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(c,"$1"),i=i.replace(e,o),n},getRegex:()=>new RegExp(i,t)};return n}function u(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const g={exec:()=>null};function p(e,t){const i=e.replace(/\|/g,(e,t,i)=>{let n=!1,o=t;for(;--o>=0&&"\\"===i[o];)n=!n;return n?"|":" |"}).split(/ \|/);let n=0;if(i[0].trim()||i.shift(),i.length>0&&!i[i.length-1].trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(/\\\|/g,"|");return i}function m(e,t,i){const n=e.length;if(0===n)return"";let o=0;for(;o<n;){const s=e.charAt(n-o-1);if(s!==t||i){if(s===t||!i)break;o++}else o++}return e.slice(0,n-o)}function f(e,t,i,n){const o=t.href,s=t.title?d(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){n.state.inLink=!0;const e={type:"link",raw:i,href:o,title:s,text:r,tokens:n.inlineTokens(r)};return n.state.inLink=!1,e}return{type:"image",raw:i,href:o,title:s,text:d(r)}}class _{options;rules;lexer;constructor(t){this.options=t||e.defaults}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:m(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],i=function(e,t){const i=e.match(/^(\s+)(?:```)/);if(null===i)return t;const n=i[1];return t.split("\n").map(e=>{const t=e.match(/^\s+/);if(null===t)return e;const[i]=t;return i.length>=n.length?e.slice(n.length):e}).join("\n")}(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=m(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:m(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=m(t[0],"\n").split("\n"),i="",n="";const o=[];for(;e.length>0;){let t=!1;const s=[];let r;for(r=0;r<e.length;r++)if(/^ {0,3}>/.test(e[r]))s.push(e[r]),t=!0;else{if(t)break;s.push(e[r])}e=e.slice(r);const a=s.join("\n"),l=a.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");i=i?`${i}\n${a}`:a,n=n?`${n}\n${l}`:l;const d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,o,!0),this.lexer.state.top=d,0===e.length)break;const c=o[o.length-1];if("code"===c?.type)break;if("blockquote"===c?.type){const t=c,s=t.raw+"\n"+e.join("\n"),r=this.blockquote(s);o[o.length-1]=r,i=i.substring(0,i.length-t.raw.length)+r.raw,n=n.substring(0,n.length-t.text.length)+r.text;break}if("list"===c?.type){const t=c,s=t.raw+"\n"+e.join("\n"),r=this.list(s);o[o.length-1]=r,i=i.substring(0,i.length-c.raw.length)+r.raw,n=n.substring(0,n.length-t.raw.length)+r.raw,e=s.substring(o[o.length-1].raw.length).split("\n");continue}}return{type:"blockquote",raw:i,tokens:o,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i=t[1].trim();const n=i.length>1,o={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");const s=new RegExp(`^( {0,3}${i})((?:[\t ][^\\n]*)?(?:\\n|$))`);let r=!1;for(;e;){let i=!1,n="",a="";if(!(t=s.exec(e)))break;if(this.rules.block.hr.test(e))break;n=t[0],e=e.substring(n.length);let l=t[2].split("\n",1)[0].replace(/^\t+/,e=>" ".repeat(3*e.length)),d=e.split("\n",1)[0],c=!l.trim(),h=0;if(this.options.pedantic?(h=2,a=l.trimStart()):c?h=t[1].length+1:(h=t[2].search(/[^ ]/),h=h>4?1:h,a=l.slice(h),h+=t[1].length),c&&/^ *$/.test(d)&&(n+=d+"\n",e=e.substring(d.length+1),i=!0),!i){const t=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),i=new RegExp(`^ {0,${Math.min(3,h-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),o=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:\`\`\`|~~~)`),s=new RegExp(`^ {0,${Math.min(3,h-1)}}#`);for(;e;){const r=e.split("\n",1)[0];if(d=r,this.options.pedantic&&(d=d.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),o.test(d))break;if(s.test(d))break;if(t.test(d))break;if(i.test(e))break;if(d.search(/[^ ]/)>=h||!d.trim())a+="\n"+d.slice(h);else{if(c)break;if(l.search(/[^ ]/)>=4)break;if(o.test(l))break;if(s.test(l))break;if(i.test(l))break;a+="\n"+d}c||d.trim()||(c=!0),n+=r+"\n",e=e.substring(r.length+1),l=d.slice(h)}}o.loose||(r?o.loose=!0:/\n *\n *$/.test(n)&&(r=!0));let u,g=null;this.options.gfm&&(g=/^\[[ xX]\] /.exec(a),g&&(u="[ ] "!==g[0],a=a.replace(/^\[[ xX]\] +/,""))),o.items.push({type:"list_item",raw:n,task:!!g,checked:u,loose:!1,text:a,tokens:[]}),o.raw+=n}o.items[o.items.length-1].raw=o.items[o.items.length-1].raw.trimEnd(),o.items[o.items.length-1].text=o.items[o.items.length-1].text.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e<o.items.length;e++)if(this.lexer.state.top=!1,o.items[e].tokens=this.lexer.blockTokens(o.items[e].text,[]),!o.loose){const t=o.items[e].tokens.filter(e=>"space"===e.type),i=t.length>0&&t.some(e=>/\n.*\n/.test(e.raw));o.loose=i}if(o.loose)for(let e=0;e<o.items.length;e++)o.items[e].loose=!0;return o}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(/\s+/g," "),i=t[2]?t[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:i,title:n}}}table(e){const t=this.rules.block.table.exec(e);if(!t)return;if(!/[:|]/.test(t[2]))return;const i=p(t[1]),n=t[2].replace(/^\||\| *$/g,"").split("|"),o=t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[],s={type:"table",raw:t[0],header:[],align:[],rows:[]};if(i.length===n.length){for(const e of n)/^ *-+: *$/.test(e)?s.align.push("right"):/^ *:-+: *$/.test(e)?s.align.push("center"):/^ *:-+ *$/.test(e)?s.align.push("left"):s.align.push(null);for(let e=0;e<i.length;e++)s.header.push({text:i[e],tokens:this.lexer.inline(i[e]),header:!0,align:s.align[e]});for(const e of o)s.rows.push(p(e,s.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:s.align[t]})));return s}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:d(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^</.test(e)){if(!/>$/.test(e))return;const t=m(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=function(e,t){if(-1===e.indexOf(t[1]))return-1;let i=0;for(let n=0;n<e.length;n++)if("\\"===e[n])n++;else if(e[n]===t[0])i++;else if(e[n]===t[1]&&(i--,i<0))return n;return-1}(t[2],"()");if(e>-1){const i=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,i).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);e&&(i=e[1],n=e[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),/^</.test(i)&&(i=this.options.pedantic&&!/>$/.test(e)?i.slice(1):i.slice(1,-1)),f(t,{href:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i,title:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n},t[0],this.lexer)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){const e=t[(i[2]||i[1]).replace(/\s+/g," ").toLowerCase()];if(!e){const e=i[0].charAt(0);return{type:"text",raw:e,text:e}}return f(i,e,i[0],this.lexer)}}emStrong(e,t,i=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(n&&(!n[3]||!i.match(/[\p{L}\p{N}]/u))&&(!n[1]&&!n[2]||!i||this.rules.inline.punctuation.exec(i))){const i=[...n[0]].length-1;let o,s,r=i,a=0;const l="*"===n[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+i);null!=(n=l.exec(t));){if(o=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!o)continue;if(s=[...o].length,n[3]||n[4]){r+=s;continue}if((n[5]||n[6])&&i%3&&!((i+s)%3)){a+=s;continue}if(r-=s,r>0)continue;s=Math.min(s,s+r+a);const t=[...n[0]][0].length,l=e.slice(0,i+n.index+t+s);if(Math.min(i,s)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const d=l.slice(2,-2);return{type:"strong",raw:l,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const i=/[^ ]/.test(e),n=/^ /.test(e)&&/ $/.test(e);return i&&n&&(e=e.substring(1,e.length-1)),e=d(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,i;return"@"===t[2]?(e=d(t[1]),i="mailto:"+e):(e=d(t[1]),i=e),{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,i;if("@"===t[2])e=d(t[0]),i="mailto:"+e;else{let n;do{n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??""}while(n!==t[0]);e=d(t[0]),i="www."===t[1]?"http://"+t[0]:t[0]}return{type:"link",raw:t[0],text:e,href:i,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){let e;return e=this.lexer.state.inRawBlock?t[0]:d(t[0]),{type:"text",raw:t[0],text:e}}}}const v=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,b=/(?:[*+-]|\d{1,9}[.)])/,C=h(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,b).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),S=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,y=/(?!\s*\])(?:\\.|[^\[\]\\])+/,w=h(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",y).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),x=h(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,b).getRegex(),L="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|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",E=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,D=h("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",E).replace("tag",L).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),I=h(S).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",L).getRegex(),k={blockquote:h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",I).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:w,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:v,html:D,lheading:C,list:x,newline:/^(?: *(?:\n|$))+/,paragraph:I,table:g,text:/^[^\n]+/},N=h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",L).getRegex(),M={...k,table:N,paragraph:h(S).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",N).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",L).getRegex()},R={...k,html:h("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",E).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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:g,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:h(S).replace("hr",v).replace("heading"," *#{1,6} *[^\n]").replace("lheading",C).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},T=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,P=/^( {2,}|\\)\n(?!\s*$)/,A="\\p{P}\\p{S}",O=h(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,A).getRegex(),F=h(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,A).getRegex(),W=h("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,A).getRegex(),H=h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,A).getRegex(),V=h(/\\([punct])/,"gu").replace(/punct/g,A).getRegex(),z=h(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("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])?)+(?![-_])/).getRegex(),B=h(E).replace("(?:--\x3e|$)","--\x3e").getRegex(),K=h("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",B).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),U=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,$=h(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",U).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),j=h(/^!?\[(label)\]\[(ref)\]/).replace("label",U).replace("ref",y).getRegex(),q=h(/^!?\[(ref)\](?:\[\])?/).replace("ref",y).getRegex(),G={_backpedal:g,anyPunctuation:V,autolink:z,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:P,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:g,emStrongLDelim:F,emStrongRDelimAst:W,emStrongRDelimUnd:H,escape:T,link:$,nolink:q,punctuation:O,reflink:j,reflinkSearch:h("reflink|nolink(?!\\()","g").replace("reflink",j).replace("nolink",q).getRegex(),tag:K,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:g},Z={...G,link:h(/^!?\[(label)\]\((.*?)\)/).replace("label",U).getRegex(),reflink:h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",U).getRegex()},Q={...G,escape:h(T).replace("])","~|])").getRegex(),url:h(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Y={...Q,br:h(P).replace("{2,}","*").getRegex(),text:h(Q.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},X={normal:k,gfm:M,pedantic:R},J={normal:G,gfm:Q,breaks:Y,pedantic:Z};class ee{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||e.defaults,this.options.tokenizer=this.options.tokenizer||new _,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const i={block:X.normal,inline:J.normal};this.options.pedantic?(i.block=X.pedantic,i.inline=J.pedantic):this.options.gfm&&(i.block=X.gfm,this.options.breaks?i.inline=J.breaks:i.inline=J.gfm),this.tokenizer.rules=i}static get rules(){return{block:X,inline:J}}static lex(e,t){return new ee(t).lex(e)}static lexInline(e,t){return new ee(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,"\n"),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){const t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],i=!1){let n,o,s;for(e=this.options.pedantic?e.replace(/\t/g," ").replace(/^ +$/gm,""):e.replace(/^( *)(\t+)/gm,(e,t,i)=>t+" ".repeat(i.length));e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(i=>!!(n=i.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),o=t[t.length-1],!o||"paragraph"!==o.type&&"text"!==o.type?t.push(n):(o.raw+="\n"+n.raw,o.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),o=t[t.length-1],!o||"paragraph"!==o.type&&"text"!==o.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(o.raw+="\n"+n.raw,o.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(s=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const i=e.slice(1);let n;this.options.extensions.startBlock.forEach(e=>{n=e.call({lexer:this},i),"number"==typeof n&&n>=0&&(t=Math.min(t,n))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(s)))o=t[t.length-1],i&&"paragraph"===o?.type?(o.raw+="\n"+n.raw,o.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):t.push(n),i=s.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),o=t[t.length-1],o&&"text"===o.type?(o.raw+="\n"+n.raw,o.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let i,n,o,s,r,a,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(l));)e.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,s.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;e;)if(r||(a=""),r=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(n=>!!(i=n.call({lexer:this},e,t))&&(e=e.substring(i.raw.length),t.push(i),!0))))if(i=this.tokenizer.escape(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.tag(e))e=e.substring(i.raw.length),n=t[t.length-1],n&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.link(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(i.raw.length),n=t[t.length-1],n&&"text"===i.type&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(i=this.tokenizer.emStrong(e,l,a))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.codespan(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.br(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.del(e))e=e.substring(i.raw.length),t.push(i);else if(i=this.tokenizer.autolink(e))e=e.substring(i.raw.length),t.push(i);else if(this.state.inLink||!(i=this.tokenizer.url(e))){if(o=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const i=e.slice(1);let n;this.options.extensions.startInline.forEach(e=>{n=e.call({lexer:this},i),"number"==typeof n&&n>=0&&(t=Math.min(t,n))}),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(i=this.tokenizer.inlineText(o))e=e.substring(i.raw.length),"_"!==i.raw.slice(-1)&&(a=i.raw.slice(-1)),r=!0,n=t[t.length-1],n&&"text"===n.type?(n.raw+=i.raw,n.text+=i.text):t.push(i);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(i.raw.length),t.push(i);return t}}class te{options;parser;constructor(t){this.options=t||e.defaults}space(e){return""}code({text:e,lang:t,escaped:i}){const n=(t||"").match(/^\S*/)?.[0],o=e.replace(/\n$/,"")+"\n";return n?'<pre><code class="language-'+d(n)+'">'+(i?o:d(o,!0))+"</code></pre>\n":"<pre><code>"+(i?o:d(o,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){const t=e.ordered,i=e.start;let n="";for(let t=0;t<e.items.length;t++){const i=e.items[t];n+=this.listitem(i)}const o=t?"ol":"ul";return"<"+o+(t&&1!==i?' start="'+i+'"':"")+">\n"+n+"</"+o+">\n"}listitem(e){let t="";if(e.task){const i=this.checkbox({checked:!!e.checked});e.loose?e.tokens.length>0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=i+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" "}):t+=i+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",i="";for(let t=0;t<e.header.length;t++)i+=this.tablecell(e.header[t]);t+=this.tablerow({text:i});let n="";for(let t=0;t<e.rows.length;t++){const o=e.rows[t];i="";for(let e=0;e<o.length;e++)i+=this.tablecell(o[e]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+n+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),i=e.header?"th":"td";return(e.align?`<${i} align="${e.align}">`:`<${i}>`)+t+`</${i}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${e}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:i}){const n=this.parser.parseInline(i),o=u(e);if(null===o)return n;let s='<a href="'+(e=o)+'"';return t&&(s+=' title="'+t+'"'),s+=">"+n+"</a>",s}image({href:e,title:t,text:i}){const n=u(e);if(null===n)return i;let o=`<img src="${e=n}" alt="${i}"`;return t&&(o+=` title="${t}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):e.text}}class ie{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}}class ne{options;renderer;textRenderer;constructor(t){this.options=t||e.defaults,this.options.renderer=this.options.renderer||new te,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ie}static parse(e,t){return new ne(t).parse(e)}static parseInline(e,t){return new ne(t).parseInline(e)}parse(e,t=!0){let i="";for(let n=0;n<e.length;n++){const o=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const e=o,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){i+=t||"";continue}}const s=o;switch(s.type){case"space":i+=this.renderer.space(s);continue;case"hr":i+=this.renderer.hr(s);continue;case"heading":i+=this.renderer.heading(s);continue;case"code":i+=this.renderer.code(s);continue;case"table":i+=this.renderer.table(s);continue;case"blockquote":i+=this.renderer.blockquote(s);continue;case"list":i+=this.renderer.list(s);continue;case"html":i+=this.renderer.html(s);continue;case"paragraph":i+=this.renderer.paragraph(s);continue;case"text":{let o=s,r=this.renderer.text(o);for(;n+1<e.length&&"text"===e[n+1].type;)o=e[++n],r+="\n"+this.renderer.text(o);i+=t?this.renderer.paragraph({type:"paragraph",raw:r,text:r,tokens:[{type:"text",raw:r,text:r}]}):r;continue}default:{const e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return i}parseInline(e,t){t=t||this.renderer;let i="";for(let n=0;n<e.length;n++){const o=e[n];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]){const e=this.options.extensions.renderers[o.type].call({parser:this},o);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=e||"";continue}}const s=o;switch(s.type){case"escape":case"text":i+=t.text(s);break;case"html":i+=t.html(s);break;case"link":i+=t.link(s);break;case"image":i+=t.image(s);break;case"strong":i+=t.strong(s);break;case"em":i+=t.em(s);break;case"codespan":i+=t.codespan(s);break;case"br":i+=t.br(s);break;case"del":i+=t.del(s);break;default:{const e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return i}}class oe{options;constructor(t){this.options=t||e.defaults}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}}class se{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(ee.lex,ne.parse);parseInline=this.parseMarkdown(ee.lexInline,ne.parseInline);Parser=ne;Renderer=te;TextRenderer=ie;Lexer=ee;Tokenizer=_;Hooks=oe;constructor(...e){this.use(...e)}walkTokens(e,t){let i=[];for(const n of e)switch(i=i.concat(t.call(this,n)),n.type){case"table":{const e=n;for(const n of e.header)i=i.concat(this.walkTokens(n.tokens,t));for(const n of e.rows)for(const e of n)i=i.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=n;i=i.concat(this.walkTokens(e.items,t));break}default:{const e=n;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(n=>{const o=e[n].flat(1/0);i=i.concat(this.walkTokens(o,t))}):e.tokens&&(i=i.concat(this.walkTokens(e.tokens,t)))}}return i}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{const i={...e};if(i.async=this.defaults.async||i.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const i=t.renderers[e.name];t.renderers[e.name]=i?function(...t){let n=e.renderer.apply(this,t);return!1===n&&(n=i.apply(this,t)),n}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const i=t[e.level];i?i.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),i.extensions=t),e.renderer){const t=this.defaults.renderer||new te(this.defaults);for(const i in e.renderer){if(!(i in t))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;const n=i,o=e.renderer[n],s=t[n];t[n]=(...e)=>{let i=o.apply(t,e);return!1===i&&(i=s.apply(t,e)),i||""}}i.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new _(this.defaults);for(const i in e.tokenizer){if(!(i in t))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;const n=i,o=e.tokenizer[n],s=t[n];t[n]=(...e)=>{let i=o.apply(t,e);return!1===i&&(i=s.apply(t,e)),i}}i.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new oe;for(const i in e.hooks){if(!(i in t))throw new Error(`hook '${i}' does not exist`);if("options"===i)continue;const n=i,o=e.hooks[n],s=t[n];oe.passThroughHooks.has(i)?t[n]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then(e=>s.call(t,e));const i=o.call(t,e);return s.call(t,i)}:t[n]=(...e)=>{let i=o.apply(t,e);return!1===i&&(i=s.apply(t,e)),i}}i.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,n=e.walkTokens;i.walkTokens=function(e){let i=[];return i.push(n.call(this,e)),t&&(i=i.concat(t.call(this,e))),i}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ee.lex(e,t??this.defaults)}parser(e,t){return ne.parse(e,t??this.defaults)}parseMarkdown(e,t){return(i,n)=>{const o={...n},s={...this.defaults,...o},r=this.onError(!!s.silent,!!s.async);if(!0===this.defaults.async&&!1===o.async)return r(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==i)return r(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof i)return r(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(i)+", string expected"));if(s.hooks&&(s.hooks.options=s),s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(i):i).then(t=>e(t,s)).then(e=>s.hooks?s.hooks.processAllTokens(e):e).then(e=>s.walkTokens?Promise.all(this.walkTokens(e,s.walkTokens)).then(()=>e):e).then(e=>t(e,s)).then(e=>s.hooks?s.hooks.postprocess(e):e).catch(r);try{s.hooks&&(i=s.hooks.preprocess(i));let n=e(i,s);s.hooks&&(n=s.hooks.processAllTokens(n)),s.walkTokens&&this.walkTokens(n,s.walkTokens);let o=t(n,s);return s.hooks&&(o=s.hooks.postprocess(o)),o}catch(e){return r(e)}}}onError(e,t){return i=>{if(i.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+d(i.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(i);throw i}}}const re=new se;function ae(e,t){return re.parse(e,t)}ae.options=ae.setOptions=function(e){return re.setOptions(e),ae.defaults=re.defaults,i(ae.defaults),ae},ae.getDefaults=t,ae.defaults=e.defaults,ae.use=function(...e){return re.use(...e),ae.defaults=re.defaults,i(ae.defaults),ae},ae.walkTokens=function(e,t){return re.walkTokens(e,t)},ae.parseInline=re.parseInline,ae.Parser=ne,ae.parser=ne.parse,ae.Renderer=te,ae.TextRenderer=ie,ae.Lexer=ee,ae.lexer=ee.lex,ae.Tokenizer=_,ae.Hooks=oe,ae.parse=ae;const le=ae.options,de=ae.setOptions,ce=ae.use,he=ae.walkTokens,ue=ae.parseInline,ge=ae,pe=ne.parse,me=ee.lex;e.Hooks=oe,e.Lexer=ee,e.Marked=se,e.Parser=ne,e.Renderer=te,e.TextRenderer=ie,e.Tokenizer=_,e.getDefaults=t,e.lexer=me,e.marked=ae,e.options=le,e.parse=ge,e.parseInline=ue,e.parser=pe,e.setOptions=de,e.use=ce,e.walkTokens=he},e.amd?e(0,i):"object"==typeof exports?i(exports):i((t="undefined"!=typeof globalThis?globalThis:t||self).marked={})}(),_.Hooks||exports.Hooks,_.Lexer||exports.Lexer,_.Marked||exports.Marked,_.Parser||exports.Parser;var v=_.Renderer||exports.Renderer,b=(_.TextRenderer||exports.TextRenderer,_.Tokenizer||exports.Tokenizer,_.defaults||exports.defaults),C=(_.getDefaults||exports.getDefaults,_.lexer||exports.lexer),S=(_.marked||exports.marked,_.options||exports.options,_.parse||exports.parse),y=(_.parseInline||exports.parseInline,_.parser||exports.parser),w=(_.setOptions||exports.setOptions,_.use||exports.use,_.walkTokens||exports.walkTokens,i(36115)),x=i(54835),L=i(32477),E=i(1268),D=i(60891),I=i(5839);const k=Object.freeze({image:({href:e,title:t,text:i})=>{let n=[],o=[];return e&&(({href:e,dimensions:n}=(0,u.parseHrefAndDimensions)(e)),o.push(`src="${(0,u.escapeDoubleQuotes)(e)}"`)),i&&o.push(`alt="${(0,u.escapeDoubleQuotes)(i)}"`),t&&o.push(`title="${(0,u.escapeDoubleQuotes)(t)}"`),n.length&&(o=o.concat(n)),"<img "+o.join(" ")+">"},paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>`},link({href:e,title:t,tokens:i}){let n=this.parser.parseInline(i);return"string"!=typeof e?"":(e===n&&(n=(0,u.removeMarkdownEscapes)(n)),t="string"==typeof t?(0,u.escapeDoubleQuotes)((0,u.removeMarkdownEscapes)(t)):"",`<a href="${e=(e=(0,u.removeMarkdownEscapes)(e)).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}" title="${t||e}" draggable="false">${n}</a>`)}});function N(e,t={},i={}){const o=new f.DisposableStore;let u=!1;const m=(0,r.createElement)(t),_=function(t){let i;try{i=(0,w.parse)(decodeURIComponent(t))}catch(e){}return i?(i=(0,L.cloneAndChange)(i,t=>e.uris&&e.uris[t]?I.URI.revive(e.uris[t]):void 0),encodeURIComponent(JSON.stringify(i))):t},E=function(t,i){const n=e.uris&&e.uris[t];let o=I.URI.revive(n);return i?t.startsWith(x.Schemas.data+":")?t:(o||(o=I.URI.parse(t)),x.FileAccess.uriToBrowserUri(o).toString(!0)):o?I.URI.parse(t).toString()===o.toString()?t:(o.query&&(o=o.with({query:_(o.query)})),o.toString()):t},N=new v;N.image=k.image,N.link=k.link,N.paragraph=k.paragraph;const T=[],A=[];if(t.codeBlockRendererSync?N.code=({text:e,lang:i})=>{const n=p.defaultGenerator.nextId(),o=t.codeBlockRendererSync(M(i),e);return A.push([n,o]),`<div class="code" data-code="${n}">${(0,D.escape)(e)}</div>`}:t.codeBlockRenderer&&(N.code=({text:e,lang:i})=>{const n=p.defaultGenerator.nextId(),o=t.codeBlockRenderer(M(i),e);return T.push(o.then(e=>[n,e])),`<div class="code" data-code="${n}">${(0,D.escape)(e)}</div>`}),t.actionHandler){const i=function(i){let n=i.target;if("A"===n.tagName||(n=n.parentElement,n&&"A"===n.tagName))try{let o=n.dataset.href;o&&(e.baseUri&&(o=R(I.URI.from(e.baseUri),o)),t.actionHandler.callback(o,i))}catch(e){(0,c.onUnexpectedError)(e)}finally{i.preventDefault()}},o=t.actionHandler.disposables.add(new s.DomEmitter(m,"click")),r=t.actionHandler.disposables.add(new s.DomEmitter(m,"auxclick"));t.actionHandler.disposables.add(h.Event.any(o.event,r.event)(e=>{const t=new l.StandardMouseEvent(n.getWindow(m),e);(t.leftButton||t.middleButton)&&i(t)})),t.actionHandler.disposables.add(n.addDisposableListener(m,"keydown",e=>{const t=new a.StandardKeyboardEvent(e);(t.equals(10)||t.equals(3))&&i(t)}))}e.supportHtml||(N.html=({text:i})=>t.sanitizerOptions?.replaceWithPlaintext?(0,D.escape)(i):(e.isTrusted?i.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?i:""),i.renderer=N;let O,F=e.value??"";if(F.length>1e5&&(F=`${F.substr(0,1e5)}…`),e.supportThemeIcons&&(F=(0,g.markdownEscapeEscapedIcons)(F)),t.fillInIncompleteTokens){const e={...b,...i},t=q(C(F,e));O=y(t,e)}else O=S(F,{...i,async:!1});e.supportThemeIcons&&(O=(0,d.renderLabelWithIcons)(O).map(e=>"string"==typeof e?e:e.outerHTML).join(""));const W=(new DOMParser).parseFromString(P({isTrusted:e.isTrusted,...t.sanitizerOptions},O),"text/html");if(W.body.querySelectorAll("img, audio, video, source").forEach(i=>{const o=i.getAttribute("src");if(o){let s=o;try{e.baseUri&&(s=R(I.URI.from(e.baseUri),s))}catch(e){}if(i.setAttribute("src",E(s,!0)),t.remoteImageIsAllowed){const e=I.URI.parse(s);e.scheme===x.Schemas.file||e.scheme===x.Schemas.data||t.remoteImageIsAllowed(e)||i.replaceWith(n.$("",void 0,i.outerHTML))}}}),W.body.querySelectorAll("a").forEach(t=>{const i=t.getAttribute("href");if(t.setAttribute("href",""),!i||/^data:|javascript:/i.test(i)||/^command:/i.test(i)&&!e.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(i))t.replaceWith(...t.childNodes);else{let n=E(i,!1);e.baseUri&&(n=R(I.URI.from(e.baseUri),i)),t.dataset.href=n}}),m.innerHTML=P({isTrusted:e.isTrusted,...t.sanitizerOptions},W.body.innerHTML),T.length>0)Promise.all(T).then(e=>{if(u)return;const i=new Map(e),o=m.querySelectorAll("div[data-code]");for(const e of o){const t=i.get(e.dataset.code??"");t&&n.reset(e,t)}t.asyncRenderCallback?.()});else if(A.length>0){const e=new Map(A),t=m.querySelectorAll("div[data-code]");for(const i of t){const t=e.get(i.dataset.code??"");t&&n.reset(i,t)}}if(t.asyncRenderCallback)for(const e of m.getElementsByTagName("img")){const i=o.add(n.addDisposableListener(e,"load",()=>{i.dispose(),t.asyncRenderCallback()}))}return{element:m,dispose:()=>{u=!0,o.dispose()}}}function M(e){if(!e)return"";const t=e.split(/[\s+|:|,|\{|\?]/,1);return t.length?t[0]:e}function R(e,t){return/^\w[\w\d+.-]*:/.test(t)?t:e.path.endsWith("/")?(0,E.resolvePath)(e,t).toString():(0,E.resolvePath)((0,E.dirname)(e),t).toString()}const T=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];function P(e,t){const{config:i,allowedSchemes:s}=function(e){const t=[x.Schemas.http,x.Schemas.https,x.Schemas.mailto,x.Schemas.data,x.Schemas.file,x.Schemas.vscodeFileResource,x.Schemas.vscodeRemote,x.Schemas.vscodeRemoteResource];return e.isTrusted&&t.push(x.Schemas.command),{config:{ALLOWED_TAGS:e.allowedTags??[...n.basicMarkupHtmlTags],ALLOWED_ATTR:A,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:t}}(e),r=new f.DisposableStore;r.add(se("uponSanitizeAttribute",(e,t)=>{if("style"!==t.attrName&&"class"!==t.attrName){if("INPUT"===e.tagName&&"checkbox"===e.attributes.getNamedItem("type")?.value){if("type"===t.attrName&&"checkbox"===t.attrValue||"disabled"===t.attrName||"checked"===t.attrName)return void(t.keepAttr=!0);t.keepAttr=!1}}else{if("SPAN"===e.tagName){if("style"===t.attrName)return void(t.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(border-radius:[0-9]+px;)?$/.test(t.attrValue));if("class"===t.attrName)return void(t.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(t.attrValue))}t.keepAttr=!1}})),r.add(se("uponSanitizeElement",(t,i)=>{if("input"===i.tagName&&("checkbox"===t.attributes.getNamedItem("type")?.value?t.setAttribute("disabled",""):e.replaceWithPlaintext||t.remove()),e.replaceWithPlaintext&&!i.allowedTags[i.tagName]&&"body"!==i.tagName&&t.parentElement){let e,n;if("#comment"===i.tagName)e=`\x3c!--${t.textContent}--\x3e`;else{const o=T.includes(i.tagName),s=t.attributes.length?" "+Array.from(t.attributes).map(e=>`${e.name}="${e.value}"`).join(" "):"";e=`<${i.tagName}${s}>`,o||(n=`</${i.tagName}>`)}const o=document.createDocumentFragment(),s=t.parentElement.ownerDocument.createTextNode(e);o.appendChild(s);const r=n?t.parentElement.ownerDocument.createTextNode(n):void 0;for(;t.firstChild;)o.appendChild(t.firstChild);r&&o.appendChild(r),t.nodeType===Node.COMMENT_NODE?t.parentElement.insertBefore(o,t):t.parentElement.replaceChild(o,t)}})),r.add(n.hookDomPurifyHrefAndSrcSanitizer(s));try{return o.sanitize(t,{...i,RETURN_TRUSTED_TYPE:!0})}finally{r.dispose()}}const A=["align","autoplay","alt","checked","class","colspan","controls","data-code","data-href","disabled","draggable","height","href","loop","muted","playsinline","poster","rowspan","src","style","target","title","type","width","start"];function O(e){return"string"==typeof e?e:F(e)}function F(e,t){let i=e.value??"";return i.length>1e5&&(i=`${i.substr(0,1e5)}…`),P({isTrusted:!1},S(i,{async:!1,renderer:t?z.value:V.value}).replace(/&(#\d+|[a-zA-Z]+);/g,e=>W.get(e)??e)).toString()}const W=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]);function H(){const e=new v;return e.code=({text:e})=>e,e.blockquote=({text:e})=>e+"\n",e.html=e=>"",e.heading=function({tokens:e}){return this.parser.parseInline(e)+"\n"},e.hr=()=>"",e.list=function({items:e}){return e.map(e=>this.listitem(e)).join("\n")+"\n"},e.listitem=({text:e})=>e+"\n",e.paragraph=function({tokens:e}){return this.parser.parseInline(e)+"\n"},e.table=function({header:e,rows:t}){return e.map(e=>this.tablecell(e)).join(" ")+"\n"+t.map(e=>e.map(e=>this.tablecell(e)).join(" ")).join("\n")+"\n"},e.tablerow=({text:e})=>e,e.tablecell=function({tokens:e}){return this.parser.parseInline(e)},e.strong=({text:e})=>e,e.em=({text:e})=>e,e.codespan=({text:e})=>e,e.br=e=>"\n",e.del=({text:e})=>e,e.image=e=>"",e.text=({text:e})=>e,e.link=({text:e})=>e,e}const V=new m.Lazy(e=>H()),z=new m.Lazy(()=>{const e=H();return e.code=({text:e})=>`\n\`\`\`\n${e}\n\`\`\`\n`,e});function B(e){let t="";return e.forEach(e=>{t+=e.raw}),t}function K(e){if(e.tokens)for(let t=e.tokens.length-1;t>=0;t--){const i=e.tokens[t];if("text"===i.type){const n=i.raw.split("\n"),o=n[n.length-1];if(o.includes("`"))return Z(e);if(o.includes("**"))return te(e);if(o.match(/\*\w/))return Q(e);if(o.match(/(^|\s)__\w/))return ie(e);if(o.match(/(^|\s)_\w/))return Y(e);if(U(o)||$(o)&&e.tokens.slice(0,t).some(e=>"text"===e.type&&e.raw.match(/\[[^\]]*$/))){const i=e.tokens.slice(t+1);return"link"===i[0]?.type&&"text"===i[1]?.type&&i[1].raw.match(/^ *"[^"]*$/)||o.match(/^[^"]* +"[^"]*$/)?J(e):X(e)}if(o.match(/(^|\s)\[\w*/))return ee(e)}}}function U(e){return!!e.match(/(^|\s)\[.*\]\(\w*/)}function $(e){return!!e.match(/^[^\[]*\]\([^\)]*$/)}function j(e){const t=e.items[e.items.length-1],i=t.tokens?t.tokens[t.tokens.length-1]:void 0;let n;if("text"!==i?.type||"inRawBlock"in t||(n=K(i)),!n||"paragraph"!==n.type)return;const o=B(e.items.slice(0,-1)),s=t.raw.match(/^(\s*(-|\d+\.|\*) +)/)?.[0];if(!s)return;const r=s+B(t.tokens.slice(0,-1))+n.raw,a=C(o+r)[0];return"list"===a.type?a:void 0}function q(e){for(let t=0;t<3;t++){const t=G(e);if(!t)break;e=t}return e}function G(e){let t,i;for(t=0;t<e.length;t++){const n=e[t];if("paragraph"===n.type&&n.raw.match(/(\n|^)\|/)){i=oe(e.slice(t));break}if(t===e.length-1&&"list"===n.type){const e=j(n);if(e){i=[e];break}}if(t===e.length-1&&"paragraph"===n.type){const e=K(n);if(e){i=[e];break}}}if(i){const n=[...e.slice(0,t),...i];return n.links=e.links,n}return null}function Z(e){return ne(e,"`")}function Q(e){return ne(e,"*")}function Y(e){return ne(e,"_")}function X(e){return ne(e,")")}function J(e){return ne(e,'")')}function ee(e){return ne(e,"](https://microsoft.com)")}function te(e){return ne(e,"**")}function ie(e){return ne(e,"__")}function