var $n=Object.defineProperty;var Bn=(u,e,t)=>e in u?$n(u,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):u[e]=t;var E=(u,e,t)=>Bn(u,typeof e!="symbol"?e+"":e,t);import*as be from"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/+esm";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(r){if(r.ep)return;r.ep=!0;const i=t(r);fetch(r.href,i)}})();const te=class te{};E(te,"localStorage",window.localStorage),E(te,"sessionStorage",window.sessionStorage),E(te,"createKey",function(e,t){return this.getMD5Hash([e,t].join("-"))}),E(te,"getItem",function(e,t){var n=this.createKey(e,t),r=JSON.parse(sessionStorage.getItem(n))||JSON.parse(localStorage.getItem(n));if(r){var i=r.value,o=Number(r.expire),a=new Date().getTime();if(o){if(o>a)return i;deleteItem(e,t)}else return i}}),E(te,"setItem",function(e,t,n,r){var i={namespace:e,key:t,value:n};r?(i.expire=r.getTime(),localStorage.setItem(this.createKey(e,t),JSON.stringify(i))):sessionStorage.setItem(this.createKey(e,t),JSON.stringify(i))}),E(te,"deleteItem",function(e,t){sessionStorage.removeItem(this.createKey(e,t)),localStorage.removeItem(this.createKey(e,t))}),E(te,"getInstance",function(e){return{getItem:function(t){return te.getItem(e,t)},setItem:function(t,n,r){te.setItem(e,t,n,r)},deleteItem:function(t){te.deleteItem(e,t)}}}),E(te,"getMD5Hash",function(e){var t=new Array(0,3614090360,3905402710,606105819,3250441966,4118548399,1200080426,2821735955,4249261313,1770035416,2336552879,4294925233,2304563134,1804603682,4254626195,2792965006,1236535329,4129170786,3225465664,643717713,3921069994,3593408605,38016083,3634488961,3889429448,568446438,3275163606,4107603335,1163531501,2850285829,4243563512,1735328473,2368359562,4294588738,2272392833,1839030562,4259657740,2763975236,1272893353,4139469664,3200236656,681279174,3936430074,3572445317,76029189,3654602809,3873151461,530742520,3299628645,4096336452,1126891415,2878612391,4237533241,1700485571,2399980690,4293915773,2240044497,1873313359,4264355552,2734768916,1309151649,4149444226,3174756917,718787259,3951481745),n=new Array(new Array(0,7,1),new Array(1,12,2),new Array(2,17,3),new Array(3,22,4),new Array(4,7,5),new Array(5,12,6),new Array(6,17,7),new Array(7,22,8),new Array(8,7,9),new Array(9,12,10),new Array(10,17,11),new Array(11,22,12),new Array(12,7,13),new Array(13,12,14),new Array(14,17,15),new Array(15,22,16)),r=new Array(new Array(1,5,17),new Array(6,9,18),new Array(11,14,19),new Array(0,20,20),new Array(5,5,21),new Array(10,9,22),new Array(15,14,23),new Array(4,20,24),new Array(9,5,25),new Array(14,9,26),new Array(3,14,27),new Array(8,20,28),new Array(13,5,29),new Array(2,9,30),new Array(7,14,31),new Array(12,20,32)),i=new Array(new Array(5,4,33),new Array(8,11,34),new Array(11,16,35),new Array(14,23,36),new Array(1,4,37),new Array(4,11,38),new Array(7,16,39),new Array(10,23,40),new Array(13,4,41),new Array(0,11,42),new Array(3,16,43),new Array(6,23,44),new Array(9,4,45),new Array(12,11,46),new Array(15,16,47),new Array(2,23,48)),o=new Array(new Array(0,6,49),new Array(7,10,50),new Array(14,15,51),new Array(5,21,52),new Array(12,6,53),new Array(3,10,54),new Array(10,15,55),new Array(1,21,56),new Array(8,6,57),new Array(15,10,58),new Array(6,15,59),new Array(13,21,60),new Array(4,6,61),new Array(11,10,62),new Array(2,15,63),new Array(9,21,64));function a(A,_,D){return A&_|~A&D}function p(A,_,D){return A&D|_&~D}function l(A,_,D){return A^_^D}function c(A,_,D){return _^(A|~D)}var w=new Array(new Array(a,n),new Array(p,r),new Array(l,i),new Array(c,o));function m(A){return String.fromCharCode(A&255)+String.fromCharCode(A>>>8&255)+String.fromCharCode(A>>>16&255)+String.fromCharCode(A>>>24&255)}function k(A){for(;A<0;)A+=4294967296;for(;A>4294967295;)A-=4294967296;return A}function I(A,_,D,T,P){var H,q,F,fe,de,x,z,$,se;H=T[0],q=T[1],F=T[2],fe=T[3],de=P[0],x=P[1],z=P[2],se=D(_[q],_[F],_[fe]),$=_[H]+se+A[de]+t[z],$=k($),$=$<>>32-x,$+=_[q],_[H]=k($)}function R(A){var _,D,T,P,H,q,F,fe,de,x,z,$,se;if(T=new Array(1732584193,4023233417,2562383102,271733878),H=A.length,q=H&63,F=q<56?56-q:120-q,F>0)for(A+="€",x=0;x>4&15),D+="0123456789abcdef".charAt(T&15);return D}return N(e)});let ye=te;function Et(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let _e=Et();function dn(u){_e=u}const He={exec:()=>null};function v(u,e=""){let t=typeof u=="string"?u:u.source;const n={replace:(r,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(V.caret,"$1"),t=t.replace(r,o),n},getRegex:()=>new RegExp(t,e)};return n}const V={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:u=>new RegExp(`^( {0,3}${u})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}#`),htmlBeginRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}<(?:[a-z].*>|!--)`,"i")},Un=/^(?:[ \t]*(?:\n|$))+/,Hn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Fn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,We=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Wn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Rt=/(?:[*+-]|\d{1,9}[.)])/,gn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,mn=v(gn).replace(/bull/g,Rt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).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/).replace(/\|table/g,"").getRegex(),Gn=v(gn).replace(/bull/g,Rt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).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/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Lt=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,qn=/^[^\n]+/,It=/(?!\s*\])(?:\\.|[^\[\]\\])+/,jn=v(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",It).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Yn=v(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Rt).getRegex(),st="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",Ct=/|$))/,Zn=v("^ {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|$))","i").replace("comment",Ct).replace("tag",st).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),bn=v(Lt).replace("hr",We).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",")|<(?:script|pre|style|textarea|!--)").replace("tag",st).getRegex(),Xn=v(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",bn).getRegex(),vt={blockquote:Xn,code:Hn,def:jn,fences:Fn,heading:Wn,hr:We,html:Zn,lheading:mn,list:Yn,newline:Un,paragraph:bn,table:He,text:qn},Jt=v("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",We).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",st).getRegex(),Vn={...vt,lheading:Gn,table:Jt,paragraph:v(Lt).replace("hr",We).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Jt).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",st).getRegex()},Kn={...vt,html:v(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ct).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:He,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:v(Lt).replace("hr",We).replace("heading",` *#{1,6} *[^ ]`).replace("lheading",mn).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Qn=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Jn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,wn=/^( {2,}|\\)\n(?!\s*$)/,er=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,yn=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,sr=v(yn,"u").replace(/punct/g,ot).getRegex(),or=v(yn,"u").replace(/punct/g,xn).getRegex(),Tn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ar=v(Tn,"gu").replace(/notPunctSpace/g,kn).replace(/punctSpace/g,Dt).replace(/punct/g,ot).getRegex(),lr=v(Tn,"gu").replace(/notPunctSpace/g,rr).replace(/punctSpace/g,nr).replace(/punct/g,xn).getRegex(),cr=v("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,kn).replace(/punctSpace/g,Dt).replace(/punct/g,ot).getRegex(),ur=v(/\\(punct)/,"gu").replace(/punct/g,ot).getRegex(),pr=v(/^<(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(),hr=v(Ct).replace("(?:-->|$)","-->").getRegex(),fr=v("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",hr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),nt=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,dr=v(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",nt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),An=v(/^!?\[(label)\]\[(ref)\]/).replace("label",nt).replace("ref",It).getRegex(),_n=v(/^!?\[(ref)\](?:\[\])?/).replace("ref",It).getRegex(),gr=v("reflink|nolink(?!\\()","g").replace("reflink",An).replace("nolink",_n).getRegex(),Ot={_backpedal:He,anyPunctuation:ur,autolink:pr,blockSkip:ir,br:wn,code:Jn,del:He,emStrongLDelim:sr,emStrongRDelimAst:ar,emStrongRDelimUnd:cr,escape:Qn,link:dr,nolink:_n,punctuation:tr,reflink:An,reflinkSearch:gr,tag:fr,text:er,url:He},mr={...Ot,link:v(/^!?\[(label)\]\((.*?)\)/).replace("label",nt).getRegex(),reflink:v(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",nt).getRegex()},At={...Ot,emStrongRDelimAst:lr,emStrongLDelim:or,url:v(/^((?: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~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},en=u=>wr[u];function he(u,e){if(e){if(V.escapeTest.test(u))return u.replace(V.escapeReplace,en)}else if(V.escapeTestNoEncode.test(u))return u.replace(V.escapeReplaceNoEncode,en);return u}function tn(u){try{u=encodeURI(u).replace(V.percentDecode,"%")}catch{return null}return u}function nn(u,e){var i;const t=u.replace(V.findPipe,(o,a,p)=>{let l=!1,c=a;for(;--c>=0&&p[c]==="\\";)l=!l;return l?"|":" |"}),n=t.split(V.splitPipe);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!((i=n.at(-1))!=null&&i.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length{const o=i.match(t.other.beginningSpace);if(o===null)return i;const[a]=o;return a.length>=r.length?i.slice(r.length):i}).join(` `)}class rt{constructor(e){E(this,"options");E(this,"rules");E(this,"lexer");this.options=e||_e}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 n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Pe(n,` `)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],r=xr(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){const r=Pe(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Pe(t[0],` `)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let n=Pe(t[0],` `).split(` `),r="",i="";const o=[];for(;n.length>0;){let a=!1;const p=[];let l;for(l=0;l1,i={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const o=this.rules.other.listItemRegex(n);let a=!1;for(;e;){let l=!1,c="",w="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let m=t[2].split(` `,1)[0].replace(this.rules.other.listReplaceTabs,_=>" ".repeat(3*_.length)),k=e.split(` `,1)[0],I=!m.trim(),R=0;if(this.options.pedantic?(R=2,w=m.trimStart()):I?R=t[1].length+1:(R=t[2].search(this.rules.other.nonSpaceChar),R=R>4?1:R,w=m.slice(R),R+=t[1].length),I&&this.rules.other.blankLine.test(k)&&(c+=k+` `,e=e.substring(k.length+1),l=!0),!l){const _=this.rules.other.nextBulletRegex(R),D=this.rules.other.hrRegex(R),T=this.rules.other.fencesBeginRegex(R),P=this.rules.other.headingBeginRegex(R),H=this.rules.other.htmlBeginRegex(R);for(;e;){const q=e.split(` `,1)[0];let F;if(k=q,this.options.pedantic?(k=k.replace(this.rules.other.listReplaceNesting," "),F=k):F=k.replace(this.rules.other.tabCharGlobal," "),T.test(k)||P.test(k)||H.test(k)||_.test(k)||D.test(k))break;if(F.search(this.rules.other.nonSpaceChar)>=R||!k.trim())w+=` `+F.slice(R);else{if(I||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(m)||P.test(m)||D.test(m))break;w+=` `+k}!I&&!k.trim()&&(I=!0),c+=q+` `,e=e.substring(q.length+1),m=F.slice(R)}}i.loose||(a?i.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(a=!0));let N=null,A;this.options.gfm&&(N=this.rules.other.listIsTask.exec(w),N&&(A=N[0]!=="[ ] ",w=w.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:c,task:!!N,checked:A,loose:!1,text:w,tokens:[]}),i.raw+=c}const p=i.items.at(-1);if(p)p.raw=p.raw.trimEnd(),p.text=p.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let l=0;lm.type==="space"),w=c.length>0&&c.some(m=>this.rules.other.anyLine.test(m.raw));i.loose=w}if(i.loose)for(let l=0;l({text:l,tokens:this.lexer.inline(l),header:!1,align:o.align[c]})));return o}}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 n=t[1].charAt(t[1].length-1)===` `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}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:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.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 n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const o=Pe(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{const o=kr(t[2],"()");if(o>-1){const p=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,p).trim(),t[3]=""}}let r=t[2],i="";if(this.options.pedantic){const o=this.rules.other.pedanticHrefTitle.exec(r);o&&(r=o[1],i=o[3])}else i=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),rn(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[r.toLowerCase()];if(!i){const o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return rn(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const o=[...r[0]].length-1;let a,p,l=o,c=0;const w=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(w.lastIndex=0,t=t.slice(-1*e.length+o);(r=w.exec(t))!=null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(p=[...a].length,r[3]||r[4]){l+=p;continue}else if((r[5]||r[6])&&o%3&&!((o+p)%3)){c+=p;continue}if(l-=p,l>0)continue;p=Math.min(p,p+l+c);const m=[...r[0]][0].length,k=e.slice(0,o+r.index+m+p);if(Math.min(o,p)%2){const R=k.slice(1,-1);return{type:"em",raw:k,text:R,tokens:this.lexer.inlineTokens(R)}}const I=k.slice(2,-2);return{type:"strong",raw:k,text:I,tokens:this.lexer.inlineTokens(I)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," ");const r=this.rules.other.nonSpaceChar.test(n),i=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&i&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}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 n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let o;do o=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(o!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}}class ne{constructor(e){E(this,"tokens");E(this,"options");E(this,"state");E(this,"tokenizer");E(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||_e,this.options.tokenizer=this.options.tokenizer||new rt,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 t={other:V,block:Qe.normal,inline:Me.normal};this.options.pedantic?(t.block=Qe.pedantic,t.inline=Me.pedantic):this.options.gfm&&(t.block=Qe.gfm,this.options.breaks?t.inline=Me.breaks:t.inline=Me.gfm),this.tokenizer.rules=t}static get rules(){return{block:Qe,inline:Me}}static lex(e,t){return new ne(t).lex(e)}static lexInline(e,t){return new ne(t).inlineTokens(e)}lex(e){e=e.replace(V.carriageReturn,` `),this.blockTokens(e,this.tokens);for(let t=0;t(a=l.call({lexer:this},e,t))?(e=e.substring(a.raw.length),t.push(a),!0):!1))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);const l=t.at(-1);a.raw.length===1&&l!==void 0?l.raw+=` `:t.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);const l=t.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=` `+a.raw,l.text+=` `+a.text,this.inlineQueue.at(-1).src=l.text):t.push(a);continue}if(a=this.tokenizer.fences(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.heading(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.hr(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.blockquote(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.list(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.html(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);const l=t.at(-1);(l==null?void 0:l.type)==="paragraph"||(l==null?void 0:l.type)==="text"?(l.raw+=` `+a.raw,l.text+=` `+a.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title});continue}if(a=this.tokenizer.table(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.lheading(e)){e=e.substring(a.raw.length),t.push(a);continue}let p=e;if((o=this.options.extensions)!=null&&o.startBlock){let l=1/0;const c=e.slice(1);let w;this.options.extensions.startBlock.forEach(m=>{w=m.call({lexer:this},c),typeof w=="number"&&w>=0&&(l=Math.min(l,w))}),l<1/0&&l>=0&&(p=e.substring(0,l+1))}if(this.state.top&&(a=this.tokenizer.paragraph(p))){const l=t.at(-1);n&&(l==null?void 0:l.type)==="paragraph"?(l.raw+=` `+a.raw,l.text+=` `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(a),n=p.length!==e.length,e=e.substring(a.raw.length);continue}if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);const l=t.at(-1);(l==null?void 0:l.type)==="text"?(l.raw+=` `+a.raw,l.text+=` `+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(a);continue}if(e){const l="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var a,p,l;let n=e,r=null;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)c.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i=!1,o="";for(;e;){i||(o=""),i=!1;let c;if((p=(a=this.options.extensions)==null?void 0:a.inline)!=null&&p.some(m=>(c=m.call({lexer:this},e,t))?(e=e.substring(c.raw.length),t.push(c),!0):!1))continue;if(c=this.tokenizer.escape(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.tag(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.link(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(c.raw.length);const m=t.at(-1);c.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=c.raw,m.text+=c.text):t.push(c);continue}if(c=this.tokenizer.emStrong(e,n,o)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.codespan(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.br(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.del(e)){e=e.substring(c.raw.length),t.push(c);continue}if(c=this.tokenizer.autolink(e)){e=e.substring(c.raw.length),t.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(e))){e=e.substring(c.raw.length),t.push(c);continue}let w=e;if((l=this.options.extensions)!=null&&l.startInline){let m=1/0;const k=e.slice(1);let I;this.options.extensions.startInline.forEach(R=>{I=R.call({lexer:this},k),typeof I=="number"&&I>=0&&(m=Math.min(m,I))}),m<1/0&&m>=0&&(w=e.substring(0,m+1))}if(c=this.tokenizer.inlineText(w)){e=e.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(o=c.raw.slice(-1)),i=!0;const m=t.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=c.raw,m.text+=c.text):t.push(c);continue}if(e){const m="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return t}}class it{constructor(e){E(this,"options");E(this,"parser");this.options=e||_e}space(e){return""}code({text:e,lang:t,escaped:n}){var o;const r=(o=(t||"").match(V.notSpaceStart))==null?void 0:o[0],i=e.replace(V.endingNewline,"")+` `;return r?'
'+(n?i:he(i,!0))+`
`:"
"+(n?i:he(i,!0))+`
`}blockquote({tokens:e}){return`
${this.parser.parse(e)}
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} `}hr(e){return`
`}list(e){const t=e.ordered,n=e.start;let r="";for(let a=0;a `+r+" `}listitem(e){var n;let t="";if(e.task){const r=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=r+" "+he(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • `}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    `}table(e){let t="",n="";for(let i=0;i${r}`),` `+t+` `+r+`
    `}tablerow({text:e}){return` ${e} `}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` `}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${he(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){const r=this.parser.parseInline(n),i=tn(e);if(i===null)return r;e=i;let o='
    ",o}image({href:e,title:t,text:n}){const r=tn(e);if(r===null)return he(n);e=r;let i=`${n}{const l=a[p].flat(1/0);n=n.concat(this.walkTokens(l,t))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const o=t.renderers[i.name];o?t.renderers[i.name]=function(...a){let p=i.renderer.apply(this,a);return p===!1&&(p=o.apply(this,a)),p}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=t[i.level];o?o.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){const i=this.defaults.renderer||new it(this.defaults);for(const o in n.renderer){if(!(o in i))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const a=o,p=n.renderer[a],l=i[a];i[a]=(...c)=>{let w=p.apply(i,c);return w===!1&&(w=l.apply(i,c)),w||""}}r.renderer=i}if(n.tokenizer){const i=this.defaults.tokenizer||new rt(this.defaults);for(const o in n.tokenizer){if(!(o in i))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const a=o,p=n.tokenizer[a],l=i[a];i[a]=(...c)=>{let w=p.apply(i,c);return w===!1&&(w=l.apply(i,c)),w}}r.tokenizer=i}if(n.hooks){const i=this.defaults.hooks||new Fe;for(const o in n.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const a=o,p=n.hooks[a],l=i[a];Fe.passThroughHooks.has(o)?i[a]=c=>{if(this.defaults.async)return Promise.resolve(p.call(i,c)).then(m=>l.call(i,m));const w=p.call(i,c);return l.call(i,w)}:i[a]=(...c)=>{let w=p.apply(i,c);return w===!1&&(w=l.apply(i,c)),w}}r.hooks=i}if(n.walkTokens){const i=this.defaults.walkTokens,o=n.walkTokens;r.walkTokens=function(a){let p=[];return p.push(o.call(this,a)),i&&(p=p.concat(i.call(this,a))),p}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ne.lex(e,t??this.defaults)}parser(e,t){return re.parse(e,t??this.defaults)}parseMarkdown(e){return(n,r)=>{const i={...r},o={...this.defaults,...i},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&i.async===!1)return a(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(typeof n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const p=o.hooks?o.hooks.provideLexer():e?ne.lex:ne.lexInline,l=o.hooks?o.hooks.provideParser():e?re.parse:re.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(n):n).then(c=>p(c,o)).then(c=>o.hooks?o.hooks.processAllTokens(c):c).then(c=>o.walkTokens?Promise.all(this.walkTokens(c,o.walkTokens)).then(()=>c):c).then(c=>l(c,o)).then(c=>o.hooks?o.hooks.postprocess(c):c).catch(a);try{o.hooks&&(n=o.hooks.preprocess(n));let c=p(n,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let w=l(c,o);return o.hooks&&(w=o.hooks.postprocess(w)),w}catch(c){return a(c)}}}onError(e,t){return n=>{if(n.message+=` Please report this to https://github.com/markedjs/marked.`,e){const r="

    An error occurred:

    "+he(n.message+"",!0)+"
    ";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}}const Ae=new yr;function O(u,e){return Ae.parse(u,e)}O.options=O.setOptions=function(u){return Ae.setOptions(u),O.defaults=Ae.defaults,dn(O.defaults),O};O.getDefaults=Et;O.defaults=_e;O.use=function(...u){return Ae.use(...u),O.defaults=Ae.defaults,dn(O.defaults),O};O.walkTokens=function(u,e){return Ae.walkTokens(u,e)};O.parseInline=Ae.parseInline;O.Parser=re;O.parser=re.parse;O.Renderer=it;O.TextRenderer=Mt;O.Lexer=ne;O.lexer=ne.lex;O.Tokenizer=rt;O.Hooks=Fe;O.parse=O;O.options;O.setOptions;O.use;O.walkTokens;O.parseInline;re.parse;ne.lex;/*! @license DOMPurify 3.2.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.5/LICENSE */const{entries:Sn,setPrototypeOf:sn,isFrozen:Tr,getPrototypeOf:Ar,getOwnPropertyDescriptor:_r}=Object;let{freeze:K,seal:ie,create:En}=Object,{apply:_t,construct:St}=typeof Reflect<"u"&&Reflect;K||(K=function(e){return e});ie||(ie=function(e){return e});_t||(_t=function(e,t,n){return e.apply(t,n)});St||(St=function(e,t){return new e(...t)});const Je=Q(Array.prototype.forEach),Sr=Q(Array.prototype.lastIndexOf),on=Q(Array.prototype.pop),Ne=Q(Array.prototype.push),Er=Q(Array.prototype.splice),tt=Q(String.prototype.toLowerCase),wt=Q(String.prototype.toString),an=Q(String.prototype.match),ze=Q(String.prototype.replace),Rr=Q(String.prototype.indexOf),Lr=Q(String.prototype.trim),le=Q(Object.prototype.hasOwnProperty),X=Q(RegExp.prototype.test),$e=Ir(TypeError);function Q(u){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r2&&arguments[2]!==void 0?arguments[2]:tt;sn&&sn(u,null);let n=e.length;for(;n--;){let r=e[n];if(typeof r=="string"){const i=t(r);i!==r&&(Tr(e)||(e[n]=i),r=i)}u[r]=!0}return u}function Cr(u){for(let e=0;e/gm),Pr=ie(/\$\{[\w\W]*/gm),Nr=ie(/^data-[\-\w.\u00B7-\uFFFF]+$/),zr=ie(/^aria-[\-\w]+$/),Rn=ie(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$r=ie(/^(?:\w+script|data):/i),Br=ie(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ln=ie(/^html$/i),Ur=ie(/^[a-z][.\w]*(-[.\w]+)+$/i);var hn=Object.freeze({__proto__:null,ARIA_ATTR:zr,ATTR_WHITESPACE:Br,CUSTOM_ELEMENT:Ur,DATA_ATTR:Nr,DOCTYPE_NAME:Ln,ERB_EXPR:Mr,IS_ALLOWED_URI:Rn,IS_SCRIPT_OR_DATA:$r,MUSTACHE_EXPR:Or,TMPLIT_EXPR:Pr});const Ue={element:1,text:3,progressingInstruction:7,comment:8,document:9},Hr=function(){return typeof window>"u"?null:window},Fr=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const i="dompurify"+(n?"#"+n:"");try{return e.createPolicy(i,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},fn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function In(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Hr();const e=g=>In(g);if(e.version="3.2.5",e.removed=[],!u||!u.document||u.document.nodeType!==Ue.document||!u.Element)return e.isSupported=!1,e;let{document:t}=u;const n=t,r=n.currentScript,{DocumentFragment:i,HTMLTemplateElement:o,Node:a,Element:p,NodeFilter:l,NamedNodeMap:c=u.NamedNodeMap||u.MozNamedAttrMap,HTMLFormElement:w,DOMParser:m,trustedTypes:k}=u,I=p.prototype,R=Be(I,"cloneNode"),N=Be(I,"remove"),A=Be(I,"nextSibling"),_=Be(I,"childNodes"),D=Be(I,"parentNode");if(typeof o=="function"){const g=t.createElement("template");g.content&&g.content.ownerDocument&&(t=g.content.ownerDocument)}let T,P="";const{implementation:H,createNodeIterator:q,createDocumentFragment:F,getElementsByTagName:fe}=t,{importNode:de}=n;let x=fn();e.isSupported=typeof Sn=="function"&&typeof D=="function"&&H&&H.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:z,ERB_EXPR:$,TMPLIT_EXPR:se,DATA_ATTR:at,ARIA_ATTR:lt,IS_SCRIPT_OR_DATA:Ge,ATTR_WHITESPACE:we,CUSTOM_ELEMENT:ct}=hn;let{IS_ALLOWED_URI:ke}=hn,f=null;const b=S({},[...ln,...kt,...xt,...yt,...cn]);let y=null;const L=S({},[...un,...Tt,...pn,...et]);let C=Object.seal(En(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),B=null,Y=null,W=!0,ee=!0,ce=!1,xe=!0,oe=!1,Ce=!0,ae=!1,ut=!1,pt=!1,Se=!1,qe=!1,je=!1,Pt=!0,Nt=!1;const Cn="user-content-";let ht=!0,ve=!1,Ee={},Re=null;const zt=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let $t=null;const Bt=S({},["audio","video","img","source","image","track"]);let ft=null;const Ut=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ye="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",ge="http://www.w3.org/1999/xhtml";let Le=ge,dt=!1,gt=null;const vn=S({},[Ye,Ze,ge],wt);let Xe=S({},["mi","mo","mn","ms","mtext"]),Ve=S({},["annotation-xml"]);const Dn=S({},["title","style","font","a","script"]);let De=null;const On=["application/xhtml+xml","text/html"],Mn="text/html";let U=null,Ie=null;const Pn=t.createElement("form"),Ht=function(s){return s instanceof RegExp||s instanceof Function},mt=function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ie&&Ie===s)){if((!s||typeof s!="object")&&(s={}),s=Te(s),De=On.indexOf(s.PARSER_MEDIA_TYPE)===-1?Mn:s.PARSER_MEDIA_TYPE,U=De==="application/xhtml+xml"?wt:tt,f=le(s,"ALLOWED_TAGS")?S({},s.ALLOWED_TAGS,U):b,y=le(s,"ALLOWED_ATTR")?S({},s.ALLOWED_ATTR,U):L,gt=le(s,"ALLOWED_NAMESPACES")?S({},s.ALLOWED_NAMESPACES,wt):vn,ft=le(s,"ADD_URI_SAFE_ATTR")?S(Te(Ut),s.ADD_URI_SAFE_ATTR,U):Ut,$t=le(s,"ADD_DATA_URI_TAGS")?S(Te(Bt),s.ADD_DATA_URI_TAGS,U):Bt,Re=le(s,"FORBID_CONTENTS")?S({},s.FORBID_CONTENTS,U):zt,B=le(s,"FORBID_TAGS")?S({},s.FORBID_TAGS,U):{},Y=le(s,"FORBID_ATTR")?S({},s.FORBID_ATTR,U):{},Ee=le(s,"USE_PROFILES")?s.USE_PROFILES:!1,W=s.ALLOW_ARIA_ATTR!==!1,ee=s.ALLOW_DATA_ATTR!==!1,ce=s.ALLOW_UNKNOWN_PROTOCOLS||!1,xe=s.ALLOW_SELF_CLOSE_IN_ATTR!==!1,oe=s.SAFE_FOR_TEMPLATES||!1,Ce=s.SAFE_FOR_XML!==!1,ae=s.WHOLE_DOCUMENT||!1,Se=s.RETURN_DOM||!1,qe=s.RETURN_DOM_FRAGMENT||!1,je=s.RETURN_TRUSTED_TYPE||!1,pt=s.FORCE_BODY||!1,Pt=s.SANITIZE_DOM!==!1,Nt=s.SANITIZE_NAMED_PROPS||!1,ht=s.KEEP_CONTENT!==!1,ve=s.IN_PLACE||!1,ke=s.ALLOWED_URI_REGEXP||Rn,Le=s.NAMESPACE||ge,Xe=s.MATHML_TEXT_INTEGRATION_POINTS||Xe,Ve=s.HTML_INTEGRATION_POINTS||Ve,C=s.CUSTOM_ELEMENT_HANDLING||{},s.CUSTOM_ELEMENT_HANDLING&&Ht(s.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(C.tagNameCheck=s.CUSTOM_ELEMENT_HANDLING.tagNameCheck),s.CUSTOM_ELEMENT_HANDLING&&Ht(s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(C.attributeNameCheck=s.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),s.CUSTOM_ELEMENT_HANDLING&&typeof s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(C.allowCustomizedBuiltInElements=s.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),oe&&(ee=!1),qe&&(Se=!0),Ee&&(f=S({},cn),y=[],Ee.html===!0&&(S(f,ln),S(y,un)),Ee.svg===!0&&(S(f,kt),S(y,Tt),S(y,et)),Ee.svgFilters===!0&&(S(f,xt),S(y,Tt),S(y,et)),Ee.mathMl===!0&&(S(f,yt),S(y,pn),S(y,et))),s.ADD_TAGS&&(f===b&&(f=Te(f)),S(f,s.ADD_TAGS,U)),s.ADD_ATTR&&(y===L&&(y=Te(y)),S(y,s.ADD_ATTR,U)),s.ADD_URI_SAFE_ATTR&&S(ft,s.ADD_URI_SAFE_ATTR,U),s.FORBID_CONTENTS&&(Re===zt&&(Re=Te(Re)),S(Re,s.FORBID_CONTENTS,U)),ht&&(f["#text"]=!0),ae&&S(f,["html","head","body"]),f.table&&(S(f,["tbody"]),delete B.tbody),s.TRUSTED_TYPES_POLICY){if(typeof s.TRUSTED_TYPES_POLICY.createHTML!="function")throw $e('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof s.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $e('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=s.TRUSTED_TYPES_POLICY,P=T.createHTML("")}else T===void 0&&(T=Fr(k,r)),T!==null&&typeof P=="string"&&(P=T.createHTML(""));K&&K(s),Ie=s}},Ft=S({},[...kt,...xt,...vr]),Wt=S({},[...yt,...Dr]),Nn=function(s){let h=D(s);(!h||!h.tagName)&&(h={namespaceURI:Le,tagName:"template"});const d=tt(s.tagName),M=tt(h.tagName);return gt[s.namespaceURI]?s.namespaceURI===Ze?h.namespaceURI===ge?d==="svg":h.namespaceURI===Ye?d==="svg"&&(M==="annotation-xml"||Xe[M]):!!Ft[d]:s.namespaceURI===Ye?h.namespaceURI===ge?d==="math":h.namespaceURI===Ze?d==="math"&&Ve[M]:!!Wt[d]:s.namespaceURI===ge?h.namespaceURI===Ze&&!Ve[M]||h.namespaceURI===Ye&&!Xe[M]?!1:!Wt[d]&&(Dn[d]||!Ft[d]):!!(De==="application/xhtml+xml"&>[s.namespaceURI]):!1},ue=function(s){Ne(e.removed,{element:s});try{D(s).removeChild(s)}catch{N(s)}},Ke=function(s,h){try{Ne(e.removed,{attribute:h.getAttributeNode(s),from:h})}catch{Ne(e.removed,{attribute:null,from:h})}if(h.removeAttribute(s),s==="is")if(Se||qe)try{ue(h)}catch{}else try{h.setAttribute(s,"")}catch{}},Gt=function(s){let h=null,d=null;if(pt)s=""+s;else{const G=an(s,/^[\r\n\t ]+/);d=G&&G[0]}De==="application/xhtml+xml"&&Le===ge&&(s=' '+s+"");const M=T?T.createHTML(s):s;if(Le===ge)try{h=new m().parseFromString(M,De)}catch{}if(!h||!h.documentElement){h=H.createDocument(Le,"template",null);try{h.documentElement.innerHTML=dt?P:M}catch{}}const j=h.body||h.documentElement;return s&&d&&j.insertBefore(t.createTextNode(d),j.childNodes[0]||null),Le===ge?fe.call(h,ae?"html":"body")[0]:ae?h.documentElement:j},qt=function(s){return q.call(s.ownerDocument||s,s,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},bt=function(s){return s instanceof w&&(typeof s.nodeName!="string"||typeof s.textContent!="string"||typeof s.removeChild!="function"||!(s.attributes instanceof c)||typeof s.removeAttribute!="function"||typeof s.setAttribute!="function"||typeof s.namespaceURI!="string"||typeof s.insertBefore!="function"||typeof s.hasChildNodes!="function")},jt=function(s){return typeof a=="function"&&s instanceof a};function me(g,s,h){Je(g,d=>{d.call(e,s,h,Ie)})}const Yt=function(s){let h=null;if(me(x.beforeSanitizeElements,s,null),bt(s))return ue(s),!0;const d=U(s.nodeName);if(me(x.uponSanitizeElement,s,{tagName:d,allowedTags:f}),s.hasChildNodes()&&!jt(s.firstElementChild)&&X(/<[/\w!]/g,s.innerHTML)&&X(/<[/\w!]/g,s.textContent)||s.nodeType===Ue.progressingInstruction||Ce&&s.nodeType===Ue.comment&&X(/<[/\w]/g,s.data))return ue(s),!0;if(!f[d]||B[d]){if(!B[d]&&Xt(d)&&(C.tagNameCheck instanceof RegExp&&X(C.tagNameCheck,d)||C.tagNameCheck instanceof Function&&C.tagNameCheck(d)))return!1;if(ht&&!Re[d]){const M=D(s)||s.parentNode,j=_(s)||s.childNodes;if(j&&M){const G=j.length;for(let J=G-1;J>=0;--J){const pe=R(j[J],!0);pe.__removalCount=(s.__removalCount||0)+1,M.insertBefore(pe,A(s))}}}return ue(s),!0}return s instanceof p&&!Nn(s)||(d==="noscript"||d==="noembed"||d==="noframes")&&X(/<\/no(script|embed|frames)/i,s.innerHTML)?(ue(s),!0):(oe&&s.nodeType===Ue.text&&(h=s.textContent,Je([z,$,se],M=>{h=ze(h,M," ")}),s.textContent!==h&&(Ne(e.removed,{element:s.cloneNode()}),s.textContent=h)),me(x.afterSanitizeElements,s,null),!1)},Zt=function(s,h,d){if(Pt&&(h==="id"||h==="name")&&(d in t||d in Pn))return!1;if(!(ee&&!Y[h]&&X(at,h))){if(!(W&&X(lt,h))){if(!y[h]||Y[h]){if(!(Xt(s)&&(C.tagNameCheck instanceof RegExp&&X(C.tagNameCheck,s)||C.tagNameCheck instanceof Function&&C.tagNameCheck(s))&&(C.attributeNameCheck instanceof RegExp&&X(C.attributeNameCheck,h)||C.attributeNameCheck instanceof Function&&C.attributeNameCheck(h))||h==="is"&&C.allowCustomizedBuiltInElements&&(C.tagNameCheck instanceof RegExp&&X(C.tagNameCheck,d)||C.tagNameCheck instanceof Function&&C.tagNameCheck(d))))return!1}else if(!ft[h]){if(!X(ke,ze(d,we,""))){if(!((h==="src"||h==="xlink:href"||h==="href")&&s!=="script"&&Rr(d,"data:")===0&&$t[s])){if(!(ce&&!X(Ge,ze(d,we,"")))){if(d)return!1}}}}}}return!0},Xt=function(s){return s!=="annotation-xml"&&an(s,ct)},Vt=function(s){me(x.beforeSanitizeAttributes,s,null);const{attributes:h}=s;if(!h||bt(s))return;const d={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:y,forceKeepAttr:void 0};let M=h.length;for(;M--;){const j=h[M],{name:G,namespaceURI:J,value:pe}=j,Oe=U(G);let Z=G==="value"?pe:Lr(pe);if(d.attrName=Oe,d.attrValue=Z,d.keepAttr=!0,d.forceKeepAttr=void 0,me(x.uponSanitizeAttribute,s,d),Z=d.attrValue,Nt&&(Oe==="id"||Oe==="name")&&(Ke(G,s),Z=Cn+Z),Ce&&X(/((--!?|])>)|<\/(style|title)/i,Z)){Ke(G,s);continue}if(d.forceKeepAttr||(Ke(G,s),!d.keepAttr))continue;if(!xe&&X(/\/>/i,Z)){Ke(G,s);continue}oe&&Je([z,$,se],Qt=>{Z=ze(Z,Qt," ")});const Kt=U(s.nodeName);if(Zt(Kt,Oe,Z)){if(T&&typeof k=="object"&&typeof k.getAttributeType=="function"&&!J)switch(k.getAttributeType(Kt,Oe)){case"TrustedHTML":{Z=T.createHTML(Z);break}case"TrustedScriptURL":{Z=T.createScriptURL(Z);break}}try{J?s.setAttributeNS(J,G,Z):s.setAttribute(G,Z),bt(s)?ue(s):on(e.removed)}catch{}}}me(x.afterSanitizeAttributes,s,null)},zn=function g(s){let h=null;const d=qt(s);for(me(x.beforeSanitizeShadowDOM,s,null);h=d.nextNode();)me(x.uponSanitizeShadowNode,h,null),Yt(h),Vt(h),h.content instanceof i&&g(h.content);me(x.afterSanitizeShadowDOM,s,null)};return e.sanitize=function(g){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},h=null,d=null,M=null,j=null;if(dt=!g,dt&&(g=""),typeof g!="string"&&!jt(g))if(typeof g.toString=="function"){if(g=g.toString(),typeof g!="string")throw $e("dirty is not a string, aborting")}else throw $e("toString is not a function");if(!e.isSupported)return g;if(ut||mt(s),e.removed=[],typeof g=="string"&&(ve=!1),ve){if(g.nodeName){const pe=U(g.nodeName);if(!f[pe]||B[pe])throw $e("root node is forbidden and cannot be sanitized in-place")}}else if(g instanceof a)h=Gt(""),d=h.ownerDocument.importNode(g,!0),d.nodeType===Ue.element&&d.nodeName==="BODY"||d.nodeName==="HTML"?h=d:h.appendChild(d);else{if(!Se&&!oe&&!ae&&g.indexOf("<")===-1)return T&&je?T.createHTML(g):g;if(h=Gt(g),!h)return Se?null:je?P:""}h&&pt&&ue(h.firstChild);const G=qt(ve?g:h);for(;M=G.nextNode();)Yt(M),Vt(M),M.content instanceof i&&zn(M.content);if(ve)return g;if(Se){if(qe)for(j=F.call(h.ownerDocument);h.firstChild;)j.appendChild(h.firstChild);else j=h;return(y.shadowroot||y.shadowrootmode)&&(j=de.call(n,j,!0)),j}let J=ae?h.outerHTML:h.innerHTML;return ae&&f["!doctype"]&&h.ownerDocument&&h.ownerDocument.doctype&&h.ownerDocument.doctype.name&&X(Ln,h.ownerDocument.doctype.name)&&(J=" `+J),oe&&Je([z,$,se],pe=>{J=ze(J,pe," ")}),T&&je?T.createHTML(J):J},e.setConfig=function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};mt(g),ut=!0},e.clearConfig=function(){Ie=null,ut=!1},e.isValidAttribute=function(g,s,h){Ie||mt({});const d=U(g),M=U(s);return Zt(d,M,h)},e.addHook=function(g,s){typeof s=="function"&&Ne(x[g],s)},e.removeHook=function(g,s){if(s!==void 0){const h=Sr(x[g],s);return h===-1?void 0:Er(x[g],h,1)[0]}return on(x[g])},e.removeHooks=function(g){x[g]=[]},e.removeAllHooks=function(){x=fn()},e}var Wr=In();const Gr=()=>{let u=!1,e=!1;const t="com.markdownlivepreview",n="last_state",r="scroll_bar_settings",i="theme_settings",o="Are you sure you want to reset? Your changes will be lost.",a=`# Markdown syntax guide ## Headers # This is a Heading h1 ## This is a Heading h2 ###### This is a Heading h6 ## Emphasis *This text will be italic* _This will also be italic_ **This text will be bold** __This will also be bold__ _You **can** combine them_ ## Lists ### Unordered * Item 1 * Item 2 * Item 2a * Item 2b * Item 3a * Item 3b ### Ordered 1. Item 1 2. Item 2 3. Item 3 1. Item 3a 2. Item 3b ## Images ![This is an alt text.](/image/Markdown-mark.svg "This is a sample image.") ## Links You may be using [Markdown Live Preview](https://markdownlivepreview.com/). ## Blockquotes > Markdown is a lightweight markup language with plain-text-formatting syntax, created in 2004 by John Gruber with Aaron Swartz. > >> Markdown is often used to format readme files, for writing messages in online discussion forums, and to create rich text using a plain text editor. ## Tables | Left columns | Right columns | | ------------- |:-------------:| | left foo | right foo | | left bar | right bar | | left baz | right baz | ## Blocks of code \`\`\` let message = 'Hello world'; alert(message); \`\`\` ## Inline code This web site is using \`markedjs/marked\`. `;self.MonacoEnvironment={getWorker(f,b){return new Proxy({},{get:()=>()=>{}})}};let p=()=>{let f=be.editor.create(document.querySelector("#editor"),{fontSize:14,language:"markdown",minimap:{enabled:!1},scrollBeyondLastLine:!1,automaticLayout:!0,scrollbar:{vertical:"visible",horizontal:"visible"},wordWrap:"on",hover:{enabled:!1},quickSuggestions:!1,suggestOnTriggerCharacters:!1,folding:!1});return f.onDidChangeModelContent(()=>{f.getValue()!=a&&(u=!0);let y=f.getValue();l(y),x(y)}),f.onDidScrollChange(b=>{if(!e)return;const y=b.scrollTop,L=b.scrollHeight,C=f.getLayoutInfo().height,B=L-C,Y=y/B;let W=document.querySelector("#preview"),ee=(W.scrollHeight-W.clientHeight)*Y;W.scrollTo(0,ee)}),f},l=f=>{let b={headerIds:!1,mangle:!1},y=O.parse(f,b),L=Wr.sanitize(y);document.querySelector("#output").innerHTML=L},c=()=>{let f=we.getValue()!=a;if(u||f){var b=window.confirm(o);if(!b)return}w(a),document.querySelectorAll(".column").forEach(y=>{y.scrollTo({top:0})})},w=f=>{we.setValue(f),we.revealPosition({lineNumber:1,column:1}),we.focus(),u=!1},m=f=>{let b=document.querySelector("#sync-scroll-checkbox");b.checked=f,e=f,b.addEventListener("change",y=>{let L=y.currentTarget.checked;e=L,se(L)})};const k="css/github-markdown-light.css?v=1.11.0",I="css/github-markdown-dark_dimmed.css?v=1.11.0";let R=f=>{const b=document.getElementById("gh-markdown-link");if(!b){const L=document.createElement("link");L.id="gh-markdown-link",L.rel="stylesheet",L.href=f?I:k,document.head.appendChild(L);return}const y=f?I:k;b.getAttribute("href")!==y&&b.setAttribute("href",y)},N=f=>{document.documentElement.setAttribute("data-theme",f?"dark":"light")},A=f=>{let b=document.querySelector("#theme-checkbox");b&&(b.checked=f,N(f),be&&be.editor&&typeof be.editor.setTheme=="function"&&be.editor.setTheme(f?"vs-dark":"vs"),R(f),b.addEventListener("change",y=>{let L=y.currentTarget.checked;N(L),at(L),R(L),be&&be.editor&&typeof be.editor.setTheme=="function"&&be.editor.setTheme(L?"vs-dark":"vs")}))},_=(f,b,y)=>{navigator.clipboard.writeText(f).then(()=>{b()},()=>{})},D=()=>{let f=document.querySelector("#copy-button a");f.innerHTML="Copied!",setTimeout(()=>{f.innerHTML="Copy"},1e3)},T=null,P=()=>T||(T=fetch(k).then(f=>{if(!f.ok)throw new Error(`Failed to load export CSS: ${f.status}`);return f.text()}).catch(f=>(console.error("Failed to load light markdown CSS",f),"")),T),H=()=>{const f=document.querySelector("#preview-wrapper");if(f){if(typeof window.html2pdf!="function"){window.alert("PDF export is not available yet. Please try again in a moment.");return}P().then(b=>{const y={margin:10,filename:"markdown-preview.pdf",image:{type:"jpeg",quality:.98},html2canvas:{scale:2,useCORS:!0,onclone:L=>{L.documentElement.setAttribute("data-theme","light");const C=L.getElementById("gh-markdown-link");if(C&&C.setAttribute("href",k),b){const W=L.createElement("style");W.id="export-light-css",W.textContent=`${b} #preview-wrapper, #output, body { background: #fff !important; color: #24292f !important; }`,L.head.appendChild(W)}const B=L.getElementById("preview-wrapper");B&&(B.style.background="#fff",B.style.color="#24292f",B.style.width="190mm",B.style.maxWidth="190mm");const Y=L.getElementById("output");Y&&(Y.style.background="#fff",Y.style.color="#24292f",Y.style.width="190mm",Y.style.maxWidth="190mm")}},jsPDF:{unit:"mm",format:"a4",orientation:"portrait"}};window.html2pdf().set(y).from(f).save().catch(L=>{console.error("Failed to export PDF",L)})})}},q=()=>{document.querySelector("#reset-button").addEventListener("click",f=>{f.preventDefault(),c()})},F=f=>{document.querySelector("#copy-button").addEventListener("click",b=>{b.preventDefault();let y=f.getValue();_(y,()=>{D()})})},fe=()=>{const f=document.querySelector("#export-button");f&&f.addEventListener("click",b=>{b.preventDefault(),H()})},de=()=>ye.getItem(t,n),x=f=>{let b=new Date(2099,1,1);ye.setItem(t,n,f,b)},z=()=>ye.getItem(t,r),$=()=>{let f=ye.getItem(t,i);if(f==null)try{const b=localStorage.getItem("com.markdownlivepreview_theme");if(b==="dark")return!0;if(b==="light")return!1}catch{}return f},se=f=>{let b=new Date(2099,1,1);ye.setItem(t,r,f,b)},at=f=>{let b=new Date(2099,1,1);ye.setItem(t,i,f,b);try{localStorage.setItem("com.markdownlivepreview_theme",f?"dark":"light")}catch{}},lt=()=>{let f=.5;const b=document.getElementById("split-divider"),y=document.getElementById("edit"),L=document.getElementById("preview"),C=document.getElementById("container");let B=!1;b.addEventListener("mouseenter",()=>{b.classList.add("hover")}),b.addEventListener("mouseleave",()=>{B||b.classList.remove("hover")}),b.addEventListener("mousedown",()=>{B=!0,b.classList.add("active"),document.body.style.cursor="col-resize"}),b.addEventListener("dblclick",()=>{const W=C.getBoundingClientRect().width,ee=b.offsetWidth,ce=(W-ee)/2;y.style.width=ce+"px",L.style.width=ce+"px"}),document.addEventListener("mousemove",Y=>{if(!B)return;document.body.style.userSelect="none";const W=C.getBoundingClientRect(),ee=W.width,ce=Y.clientX-W.left,xe=b.offsetWidth,oe=100,Ce=ee-oe-xe,ae=Math.max(oe,Math.min(ce,Ce));y.style.width=ae+"px",L.style.width=ee-ae-xe+"px",f=ae/(ee-xe)}),document.addEventListener("mouseup",()=>{B&&(B=!1,b.classList.remove("active"),b.classList.remove("hover"),document.body.style.cursor="default",document.body.style.userSelect="")}),window.addEventListener("resize",()=>{const W=C.getBoundingClientRect().width,ee=b.offsetWidth,ce=W-ee,xe=ce*f,oe=ce*(1-f);y.style.width=xe+"px",L.style.width=oe+"px"})},Ge=de(),we=p();w(Ge||a),q(),F(we),fe();let ct=z()||!1;m(ct);let ke=$();ke==="true"||ke===!0?ke=!0:ke=!1,A(ke),lt()};window.addEventListener("load",()=>{Gr()});