/i.test(Ja[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ja[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ja[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:Ja[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:Ja[0]}}link(qa){const Ja=this.rules.inline.link.exec(qa);if(Ja){const ed=Ja[2].trim();if(!this.options.pedantic&&/^$/.test(ed))return;const od=rtrim$1(ed.slice(0,-1),"\\");if((ed.length-od.length)%2===0)return}else{const od=findClosingBracket$1(Ja[2],"()");if(od>-1){const ld=(Ja[0].indexOf("!")===0?5:4)+Ja[1].length+od;Ja[2]=Ja[2].substring(0,od),Ja[0]=Ja[0].substring(0,ld).trim(),Ja[3]=""}}let td=Ja[2],rd="";if(this.options.pedantic){const od=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(td);od&&(td=od[1],rd=od[3])}else rd=Ja[3]?Ja[3].slice(1,-1):"";return td=td.trim(),/^$/.test(ed)?td=td.slice(1):td=td.slice(1,-1)),outputLink$1(Ja,{href:td&&td.replace(this.rules.inline.anyPunctuation,"$1"),title:rd&&rd.replace(this.rules.inline.anyPunctuation,"$1")},Ja[0],this.lexer)}}reflink(qa,Ja){let ed;if((ed=this.rules.inline.reflink.exec(qa))||(ed=this.rules.inline.nolink.exec(qa))){const td=(ed[2]||ed[1]).replace(/\s+/g," "),rd=Ja[td.toLowerCase()];if(!rd){const od=ed[0].charAt(0);return{type:"text",raw:od,text:od}}return outputLink$1(ed,rd,ed[0],this.lexer)}}emStrong(qa,Ja,ed=""){let td=this.rules.inline.emStrongLDelim.exec(qa);if(!td||td[3]&&ed.match(/[\p{L}\p{N}]/u))return;if(!(td[1]||td[2]||"")||!ed||this.rules.inline.punctuation.exec(ed)){const od=[...td[0]].length-1;let sd,ld,cd=od,ud=0;const gd=td[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(gd.lastIndex=0,Ja=Ja.slice(-1*qa.length+od);(td=gd.exec(Ja))!=null;){if(sd=td[1]||td[2]||td[3]||td[4]||td[5]||td[6],!sd)continue;if(ld=[...sd].length,td[3]||td[4]){cd+=ld;continue}else if((td[5]||td[6])&&od%3&&!((od+ld)%3)){ud+=ld;continue}if(cd-=ld,cd>0)continue;ld=Math.min(ld,ld+cd+ud);const _d=[...td[0]][0].length,yd=qa.slice(0,od+td.index+_d+ld);if(Math.min(od,ld)%2){const Td=yd.slice(1,-1);return{type:"em",raw:yd,text:Td,tokens:this.lexer.inlineTokens(Td)}}const Ed=yd.slice(2,-2);return{type:"strong",raw:yd,text:Ed,tokens:this.lexer.inlineTokens(Ed)}}}}codespan(qa){const Ja=this.rules.inline.code.exec(qa);if(Ja){let ed=Ja[2].replace(/\n/g," ");const td=/[^ ]/.test(ed),rd=/^ /.test(ed)&&/ $/.test(ed);return td&&rd&&(ed=ed.substring(1,ed.length-1)),ed=escape$1$2(ed,!0),{type:"codespan",raw:Ja[0],text:ed}}}br(qa){const Ja=this.rules.inline.br.exec(qa);if(Ja)return{type:"br",raw:Ja[0]}}del(qa){const Ja=this.rules.inline.del.exec(qa);if(Ja)return{type:"del",raw:Ja[0],text:Ja[2],tokens:this.lexer.inlineTokens(Ja[2])}}autolink(qa){const Ja=this.rules.inline.autolink.exec(qa);if(Ja){let ed,td;return Ja[2]==="@"?(ed=escape$1$2(Ja[1]),td="mailto:"+ed):(ed=escape$1$2(Ja[1]),td=ed),{type:"link",raw:Ja[0],text:ed,href:td,tokens:[{type:"text",raw:ed,text:ed}]}}}url(qa){var ed;let Ja;if(Ja=this.rules.inline.url.exec(qa)){let td,rd;if(Ja[2]==="@")td=escape$1$2(Ja[0]),rd="mailto:"+td;else{let od;do od=Ja[0],Ja[0]=((ed=this.rules.inline._backpedal.exec(Ja[0]))==null?void 0:ed[0])??"";while(od!==Ja[0]);td=escape$1$2(Ja[0]),Ja[1]==="www."?rd="http://"+Ja[0]:rd=Ja[0]}return{type:"link",raw:Ja[0],text:td,href:rd,tokens:[{type:"text",raw:td,text:td}]}}}inlineText(qa){const Ja=this.rules.inline.text.exec(qa);if(Ja){let ed;return this.lexer.state.inRawBlock?ed=Ja[0]:ed=escape$1$2(Ja[0]),{type:"text",raw:Ja[0],text:ed}}}};const newline$1=/^(?: *(?:\n|$))+/,blockCode$1=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences$1=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr$3=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading$1=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bullet$3=/(?:[*+-]|\d{1,9}[.)])/,lheading$1=edit$1(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,bullet$3).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(),_paragraph$1=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,blockText$1=/^[^\n]+/,_blockLabel$1=/(?!\s*\])(?:\\.|[^\[\]\\])+/,def$1=edit$1(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",_blockLabel$1).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),list$1=edit$1(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bullet$3).getRegex(),_tag$1="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",_comment$1=/|$))/,html$3=edit$1("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\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",_comment$1).replace("tag",_tag$1).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),paragraph$1=edit$1(_paragraph$1).replace("hr",hr$3).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",_tag$1).getRegex(),blockquote$1=edit$1(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",paragraph$1).getRegex(),blockNormal$1={blockquote:blockquote$1,code:blockCode$1,def:def$1,fences:fences$1,heading:heading$1,hr:hr$3,html:html$3,lheading:lheading$1,list:list$1,newline:newline$1,paragraph:paragraph$1,table:noopTest$1,text:blockText$1},gfmTable$1=edit$1("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",hr$3).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",_tag$1).getRegex(),blockGfm$1={...blockNormal$1,table:gfmTable$1,paragraph:edit$1(_paragraph$1).replace("hr",hr$3).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",gfmTable$1).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",_tag$1).getRegex()},blockPedantic$1={...blockNormal$1,html:edit$1(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)| \\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",_comment$1).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:noopTest$1,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:edit$1(_paragraph$1).replace("hr",hr$3).replace("heading",` *#{1,6} *[^
+]`).replace("lheading",lheading$1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},escape$5=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,inlineCode$1=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br$4=/^( {2,}|\\)\n(?!\s*$)/,inlineText$1=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,emStrongLDelim$1=edit$1(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,_punctuation$1).getRegex(),emStrongRDelimAst$1=edit$1("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,_punctuation$1).getRegex(),emStrongRDelimUnd$1=edit$1("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,_punctuation$1).getRegex(),anyPunctuation$1=edit$1(/\\([punct])/,"gu").replace(/punct/g,_punctuation$1).getRegex(),autolink$1=edit$1(/^<(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(),_inlineComment$1=edit$1(_comment$1).replace("(?:-->|$)","-->").getRegex(),tag$1=edit$1("^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",_inlineComment$1).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_inlineLabel$1=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,link$1=edit$1(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",_inlineLabel$1).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),reflink$1=edit$1(/^!?\[(label)\]\[(ref)\]/).replace("label",_inlineLabel$1).replace("ref",_blockLabel$1).getRegex(),nolink$1=edit$1(/^!?\[(ref)\](?:\[\])?/).replace("ref",_blockLabel$1).getRegex(),reflinkSearch$1=edit$1("reflink|nolink(?!\\()","g").replace("reflink",reflink$1).replace("nolink",nolink$1).getRegex(),inlineNormal$1={_backpedal:noopTest$1,anyPunctuation:anyPunctuation$1,autolink:autolink$1,blockSkip:blockSkip$1,br:br$4,code:inlineCode$1,del:noopTest$1,emStrongLDelim:emStrongLDelim$1,emStrongRDelimAst:emStrongRDelimAst$1,emStrongRDelimUnd:emStrongRDelimUnd$1,escape:escape$5,link:link$1,nolink:nolink$1,punctuation:punctuation$1,reflink:reflink$1,reflinkSearch:reflinkSearch$1,tag:tag$1,text:inlineText$1,url:noopTest$1},inlinePedantic$1={...inlineNormal$1,link:edit$1(/^!?\[(label)\]\((.*?)\)/).replace("label",_inlineLabel$1).getRegex(),reflink:edit$1(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_inlineLabel$1).getRegex()},inlineGfm$1={...inlineNormal$1,escape:edit$1(escape$5).replace("])","~|])").getRegex(),url:edit$1(/^((?: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]*?(?:(?=[\\ld+" ".repeat(cd.length));let td,rd,od;for(;qa;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(sd=>(td=sd.call({lexer:this},qa,Ja))?(qa=qa.substring(td.raw.length),Ja.push(td),!0):!1))){if(td=this.tokenizer.space(qa)){qa=qa.substring(td.raw.length),td.raw.length===1&&Ja.length>0?Ja[Ja.length-1].raw+=`
+`:Ja.push(td);continue}if(td=this.tokenizer.code(qa)){qa=qa.substring(td.raw.length),rd=Ja[Ja.length-1],rd&&(rd.type==="paragraph"||rd.type==="text")?(rd.raw+=`
+`+td.raw,rd.text+=`
+`+td.text,this.inlineQueue[this.inlineQueue.length-1].src=rd.text):Ja.push(td);continue}if(td=this.tokenizer.fences(qa)){qa=qa.substring(td.raw.length),Ja.push(td);continue}if(td=this.tokenizer.heading(qa)){qa=qa.substring(td.raw.length),Ja.push(td);continue}if(td=this.tokenizer.hr(qa)){qa=qa.substring(td.raw.length),Ja.push(td);continue}if(td=this.tokenizer.blockquote(qa)){qa=qa.substring(td.raw.length),Ja.push(td);continue}if(td=this.tokenizer.list(qa)){qa=qa.substring(td.raw.length),Ja.push(td);continue}if(td=this.tokenizer.html(qa)){qa=qa.substring(td.raw.length),Ja.push(td);continue}if(td=this.tokenizer.def(qa)){qa=qa.substring(td.raw.length),rd=Ja[Ja.length-1],rd&&(rd.type==="paragraph"||rd.type==="text")?(rd.raw+=`
+`+td.raw,rd.text+=`
+`+td.raw,this.inlineQueue[this.inlineQueue.length-1].src=rd.text):this.tokens.links[td.tag]||(this.tokens.links[td.tag]={href:td.href,title:td.title});continue}if(td=this.tokenizer.table(qa)){qa=qa.substring(td.raw.length),Ja.push(td);continue}if(td=this.tokenizer.lheading(qa)){qa=qa.substring(td.raw.length),Ja.push(td);continue}if(od=qa,this.options.extensions&&this.options.extensions.startBlock){let sd=1/0;const ld=qa.slice(1);let cd;this.options.extensions.startBlock.forEach(ud=>{cd=ud.call({lexer:this},ld),typeof cd=="number"&&cd>=0&&(sd=Math.min(sd,cd))}),sd<1/0&&sd>=0&&(od=qa.substring(0,sd+1))}if(this.state.top&&(td=this.tokenizer.paragraph(od))){rd=Ja[Ja.length-1],ed&&(rd==null?void 0:rd.type)==="paragraph"?(rd.raw+=`
+`+td.raw,rd.text+=`
+`+td.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=rd.text):Ja.push(td),ed=od.length!==qa.length,qa=qa.substring(td.raw.length);continue}if(td=this.tokenizer.text(qa)){qa=qa.substring(td.raw.length),rd=Ja[Ja.length-1],rd&&rd.type==="text"?(rd.raw+=`
+`+td.raw,rd.text+=`
+`+td.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=rd.text):Ja.push(td);continue}if(qa){const sd="Infinite loop on byte: "+qa.charCodeAt(0);if(this.options.silent){console.error(sd);break}else throw new Error(sd)}}return this.state.top=!0,Ja}inline(qa,Ja=[]){return this.inlineQueue.push({src:qa,tokens:Ja}),Ja}inlineTokens(qa,Ja=[]){let ed,td,rd,od=qa,sd,ld,cd;if(this.tokens.links){const ud=Object.keys(this.tokens.links);if(ud.length>0)for(;(sd=this.tokenizer.rules.inline.reflinkSearch.exec(od))!=null;)ud.includes(sd[0].slice(sd[0].lastIndexOf("[")+1,-1))&&(od=od.slice(0,sd.index)+"["+"a".repeat(sd[0].length-2)+"]"+od.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(sd=this.tokenizer.rules.inline.blockSkip.exec(od))!=null;)od=od.slice(0,sd.index)+"["+"a".repeat(sd[0].length-2)+"]"+od.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(sd=this.tokenizer.rules.inline.anyPunctuation.exec(od))!=null;)od=od.slice(0,sd.index)+"++"+od.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;qa;)if(ld||(cd=""),ld=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(ud=>(ed=ud.call({lexer:this},qa,Ja))?(qa=qa.substring(ed.raw.length),Ja.push(ed),!0):!1))){if(ed=this.tokenizer.escape(qa)){qa=qa.substring(ed.raw.length),Ja.push(ed);continue}if(ed=this.tokenizer.tag(qa)){qa=qa.substring(ed.raw.length),td=Ja[Ja.length-1],td&&ed.type==="text"&&td.type==="text"?(td.raw+=ed.raw,td.text+=ed.text):Ja.push(ed);continue}if(ed=this.tokenizer.link(qa)){qa=qa.substring(ed.raw.length),Ja.push(ed);continue}if(ed=this.tokenizer.reflink(qa,this.tokens.links)){qa=qa.substring(ed.raw.length),td=Ja[Ja.length-1],td&&ed.type==="text"&&td.type==="text"?(td.raw+=ed.raw,td.text+=ed.text):Ja.push(ed);continue}if(ed=this.tokenizer.emStrong(qa,od,cd)){qa=qa.substring(ed.raw.length),Ja.push(ed);continue}if(ed=this.tokenizer.codespan(qa)){qa=qa.substring(ed.raw.length),Ja.push(ed);continue}if(ed=this.tokenizer.br(qa)){qa=qa.substring(ed.raw.length),Ja.push(ed);continue}if(ed=this.tokenizer.del(qa)){qa=qa.substring(ed.raw.length),Ja.push(ed);continue}if(ed=this.tokenizer.autolink(qa)){qa=qa.substring(ed.raw.length),Ja.push(ed);continue}if(!this.state.inLink&&(ed=this.tokenizer.url(qa))){qa=qa.substring(ed.raw.length),Ja.push(ed);continue}if(rd=qa,this.options.extensions&&this.options.extensions.startInline){let ud=1/0;const gd=qa.slice(1);let _d;this.options.extensions.startInline.forEach(yd=>{_d=yd.call({lexer:this},gd),typeof _d=="number"&&_d>=0&&(ud=Math.min(ud,_d))}),ud<1/0&&ud>=0&&(rd=qa.substring(0,ud+1))}if(ed=this.tokenizer.inlineText(rd)){qa=qa.substring(ed.raw.length),ed.raw.slice(-1)!=="_"&&(cd=ed.raw.slice(-1)),ld=!0,td=Ja[Ja.length-1],td&&td.type==="text"?(td.raw+=ed.raw,td.text+=ed.text):Ja.push(ed);continue}if(qa){const ud="Infinite loop on byte: "+qa.charCodeAt(0);if(this.options.silent){console.error(ud);break}else throw new Error(ud)}}return Ja}},_Renderer$1=class{constructor(qa){t1(this,"options");t1(this,"parser");this.options=qa||_defaults$1}space(qa){return""}code({text:qa,lang:Ja,escaped:ed}){var od;const td=(od=(Ja||"").match(/^\S*/))==null?void 0:od[0],rd=qa.replace(/\n$/,"")+`
+`;return td?''+(ed?rd:escape$1$2(rd,!0))+`
+`:""+(ed?rd:escape$1$2(rd,!0))+`
+`}blockquote({tokens:qa}){return`
+${this.parser.parse(qa)}
+`}html({text:qa}){return qa}heading({tokens:qa,depth:Ja}){return`${this.parser.parseInline(qa)}
+`}hr(qa){return`
+`}list(qa){const Ja=qa.ordered,ed=qa.start;let td="";for(let sd=0;sd
+`+td+""+rd+`>
+`}listitem(qa){let Ja="";if(qa.task){const ed=this.checkbox({checked:!!qa.checked});qa.loose?qa.tokens.length>0&&qa.tokens[0].type==="paragraph"?(qa.tokens[0].text=ed+" "+qa.tokens[0].text,qa.tokens[0].tokens&&qa.tokens[0].tokens.length>0&&qa.tokens[0].tokens[0].type==="text"&&(qa.tokens[0].tokens[0].text=ed+" "+qa.tokens[0].tokens[0].text)):qa.tokens.unshift({type:"text",raw:ed+" ",text:ed+" "}):Ja+=ed+" "}return Ja+=this.parser.parse(qa.tokens,!!qa.loose),`${Ja}
+`}checkbox({checked:qa}){return" '}paragraph({tokens:qa}){return`${this.parser.parseInline(qa)}
+`}table(qa){let Ja="",ed="";for(let rd=0;rd${td}`),`
-`}tablerow({text:ie}){return`
-${ie}
-`}tablecell(ie){const ae=this.parser.parseInline(ie.tokens),oe=ie.header?"th":"td";return(ie.align?`<${oe} align="${ie.align}">`:`<${oe}>`)+ae+`${oe}>
-`}strong({tokens:ie}){return`${this.parser.parseInline(ie)} `}em({tokens:ie}){return`${this.parser.parseInline(ie)} `}codespan({text:ie}){return`${ie}
`}br(ie){return" "}del({tokens:ie}){return`${this.parser.parseInline(ie)}`}link({href:ie,title:ae,tokens:oe}){const ue=this.parser.parseInline(oe),de=cleanUrl$1(ie);if(de===null)return ue;ie=de;let pe='"+ue+" ",pe}image({href:ie,title:ae,text:oe}){const ue=cleanUrl$1(ie);if(ue===null)return oe;ie=ue;let de=` ",de}text(ie){return"tokens"in ie&&ie.tokens?this.parser.parseInline(ie.tokens):ie.text}},_TextRenderer$1=class{strong({text:ie}){return ie}em({text:ie}){return ie}codespan({text:ie}){return ie}del({text:ie}){return ie}html({text:ie}){return ie}text({text:ie}){return ie}link({text:ie}){return""+ie}image({text:ie}){return""+ie}br(){return""}},_Parser$1=class bg{constructor(ie){Hu(this,"options");Hu(this,"renderer");Hu(this,"textRenderer");this.options=ie||_defaults$1,this.options.renderer=this.options.renderer||new _Renderer$1,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new _TextRenderer$1}static parse(ie,ae){return new bg(ae).parse(ie)}static parseInline(ie,ae){return new bg(ae).parseInline(ie)}parse(ie,ae=!0){let oe="";for(let ue=0;ue{const Ne=_e[Ce].flat(1/0);oe=oe.concat(this.walkTokens(Ne,ae))}):_e.tokens&&(oe=oe.concat(this.walkTokens(_e.tokens,ae)))}}return oe}use(...ie){const ae=this.defaults.extensions||{renderers:{},childTokens:{}};return ie.forEach(oe=>{const ue={...oe};if(ue.async=this.defaults.async||ue.async||!1,oe.extensions&&(oe.extensions.forEach(de=>{if(!de.name)throw new Error("extension name required");if("renderer"in de){const pe=ae.renderers[de.name];pe?ae.renderers[de.name]=function(..._e){let Ce=de.renderer.apply(this,_e);return Ce===!1&&(Ce=pe.apply(this,_e)),Ce}:ae.renderers[de.name]=de.renderer}if("tokenizer"in de){if(!de.level||de.level!=="block"&&de.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const pe=ae[de.level];pe?pe.unshift(de.tokenizer):ae[de.level]=[de.tokenizer],de.start&&(de.level==="block"?ae.startBlock?ae.startBlock.push(de.start):ae.startBlock=[de.start]:de.level==="inline"&&(ae.startInline?ae.startInline.push(de.start):ae.startInline=[de.start]))}"childTokens"in de&&de.childTokens&&(ae.childTokens[de.name]=de.childTokens)}),ue.extensions=ae),oe.renderer){const de=this.defaults.renderer||new _Renderer$1(this.defaults);for(const pe in oe.renderer){if(!(pe in de))throw new Error(`renderer '${pe}' does not exist`);if(["options","parser"].includes(pe))continue;const _e=pe,Ce=oe.renderer[_e],Ne=de[_e];de[_e]=(...Oe)=>{let Ie=Ce.apply(de,Oe);return Ie===!1&&(Ie=Ne.apply(de,Oe)),Ie||""}}ue.renderer=de}if(oe.tokenizer){const de=this.defaults.tokenizer||new _Tokenizer$1(this.defaults);for(const pe in oe.tokenizer){if(!(pe in de))throw new Error(`tokenizer '${pe}' does not exist`);if(["options","rules","lexer"].includes(pe))continue;const _e=pe,Ce=oe.tokenizer[_e],Ne=de[_e];de[_e]=(...Oe)=>{let Ie=Ce.apply(de,Oe);return Ie===!1&&(Ie=Ne.apply(de,Oe)),Ie}}ue.tokenizer=de}if(oe.hooks){const de=this.defaults.hooks||new _Hooks$1;for(const pe in oe.hooks){if(!(pe in de))throw new Error(`hook '${pe}' does not exist`);if(["options","block"].includes(pe))continue;const _e=pe,Ce=oe.hooks[_e],Ne=de[_e];_Hooks$1.passThroughHooks.has(pe)?de[_e]=Oe=>{if(this.defaults.async)return Promise.resolve(Ce.call(de,Oe)).then(Fe=>Ne.call(de,Fe));const Ie=Ce.call(de,Oe);return Ne.call(de,Ie)}:de[_e]=(...Oe)=>{let Ie=Ce.apply(de,Oe);return Ie===!1&&(Ie=Ne.apply(de,Oe)),Ie}}ue.hooks=de}if(oe.walkTokens){const de=this.defaults.walkTokens,pe=oe.walkTokens;ue.walkTokens=function(_e){let Ce=[];return Ce.push(pe.call(this,_e)),de&&(Ce=Ce.concat(de.call(this,_e))),Ce}}this.defaults={...this.defaults,...ue}}),this}setOptions(ie){return this.defaults={...this.defaults,...ie},this}lexer(ie,ae){return _Lexer$1.lex(ie,ae??this.defaults)}parser(ie,ae){return _Parser$1.parse(ie,ae??this.defaults)}parseMarkdown(ie){return(oe,ue)=>{const de={...ue},pe={...this.defaults,...de},_e=this.onError(!!pe.silent,!!pe.async);if(this.defaults.async===!0&&de.async===!1)return _e(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 oe>"u"||oe===null)return _e(new Error("marked(): input parameter is undefined or null"));if(typeof oe!="string")return _e(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(oe)+", string expected"));pe.hooks&&(pe.hooks.options=pe,pe.hooks.block=ie);const Ce=pe.hooks?pe.hooks.provideLexer():ie?_Lexer$1.lex:_Lexer$1.lexInline,Ne=pe.hooks?pe.hooks.provideParser():ie?_Parser$1.parse:_Parser$1.parseInline;if(pe.async)return Promise.resolve(pe.hooks?pe.hooks.preprocess(oe):oe).then(Oe=>Ce(Oe,pe)).then(Oe=>pe.hooks?pe.hooks.processAllTokens(Oe):Oe).then(Oe=>pe.walkTokens?Promise.all(this.walkTokens(Oe,pe.walkTokens)).then(()=>Oe):Oe).then(Oe=>Ne(Oe,pe)).then(Oe=>pe.hooks?pe.hooks.postprocess(Oe):Oe).catch(_e);try{pe.hooks&&(oe=pe.hooks.preprocess(oe));let Oe=Ce(oe,pe);pe.hooks&&(Oe=pe.hooks.processAllTokens(Oe)),pe.walkTokens&&this.walkTokens(Oe,pe.walkTokens);let Ie=Ne(Oe,pe);return pe.hooks&&(Ie=pe.hooks.postprocess(Ie)),Ie}catch(Oe){return _e(Oe)}}}onError(ie,ae){return oe=>{if(oe.message+=`
-Please report this to https://github.com/markedjs/marked.`,ie){const ue="An error occurred:
"+escape$1$2(oe.message+"",!0)+" ";return ae?Promise.resolve(ue):ue}if(ae)return Promise.reject(oe);throw oe}}};const markedInstance$1=new Marked$1;function marked$1(re,ie){return markedInstance$1.parse(re,ie)}marked$1.options=marked$1.setOptions=function(re){return markedInstance$1.setOptions(re),marked$1.defaults=markedInstance$1.defaults,changeDefaults$1(marked$1.defaults),marked$1};marked$1.getDefaults=_getDefaults$1;marked$1.defaults=_defaults$1;marked$1.use=function(...re){return markedInstance$1.use(...re),marked$1.defaults=markedInstance$1.defaults,changeDefaults$1(marked$1.defaults),marked$1};marked$1.walkTokens=function(re,ie){return markedInstance$1.walkTokens(re,ie)};marked$1.parseInline=markedInstance$1.parseInline;marked$1.Parser=_Parser$1;marked$1.parser=_Parser$1.parse;marked$1.Renderer=_Renderer$1;marked$1.TextRenderer=_TextRenderer$1;marked$1.Lexer=_Lexer$1;marked$1.lexer=_Lexer$1.lex;marked$1.Tokenizer=_Tokenizer$1;marked$1.Hooks=_Hooks$1;marked$1.parse=marked$1;marked$1.options;marked$1.setOptions;marked$1.use;marked$1.walkTokens;marked$1.parseInline;_Parser$1.parse;_Lexer$1.lex;var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(re){return re&&re.__esModule&&Object.prototype.hasOwnProperty.call(re,"default")?re.default:re}function getAugmentedNamespace(re){if(re.__esModule)return re;var ie=re.default;if(typeof ie=="function"){var ae=function oe(){return this instanceof oe?Reflect.construct(ie,arguments,this.constructor):ie.apply(this,arguments)};ae.prototype=ie.prototype}else ae={};return Object.defineProperty(ae,"__esModule",{value:!0}),Object.keys(re).forEach(function(oe){var ue=Object.getOwnPropertyDescriptor(re,oe);Object.defineProperty(ae,oe,ue.get?ue:{enumerable:!0,get:function(){return re[oe]}})}),ae}var codemirror={exports:{}},hasRequiredCodemirror;function requireCodemirror(){return hasRequiredCodemirror||(hasRequiredCodemirror=1,function(re,ie){(function(ae,oe){re.exports=oe()})(commonjsGlobal,function(){var ae=navigator.userAgent,oe=navigator.platform,ue=/gecko\/\d/i.test(ae),de=/MSIE \d/.test(ae),pe=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ae),_e=/Edge\/(\d+)/.exec(ae),Ce=de||pe||_e,Ne=Ce&&(de?document.documentMode||6:+(_e||pe)[1]),Oe=!_e&&/WebKit\//.test(ae),Ie=Oe&&/Qt\/\d+\.\d+/.test(ae),Fe=!_e&&/Chrome\/(\d+)/.exec(ae),Ue=Fe&&+Fe[1],Ve=/Opera\//.test(ae),ze=/Apple Computer/.test(navigator.vendor),er=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ae),kt=/PhantomJS/.test(ae),Pt=ze&&(/Mobile\/\w+/.test(ae)||navigator.maxTouchPoints>2),Et=/Android/.test(ae),jt=Pt||Et||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ae),tr=Pt||/Mac/.test(oe),nr=/\bCrOS\b/.test(ae),lr=/win/i.test(oe),cr=Ve&&ae.match(/Version\/(\d*\.\d*)/);cr&&(cr=Number(cr[1])),cr&&cr>=15&&(Ve=!1,Oe=!0);var ir=tr&&(Ie||Ve&&(cr==null||cr<12.11)),ar=ue||Ce&&Ne>=9;function sr(rr){return new RegExp("(^|\\s)"+rr+"(?:$|\\s)\\s*")}var dr=function(rr,ur){var gr=rr.className,yr=sr(ur).exec(gr);if(yr){var Tr=gr.slice(yr.index+yr[0].length);rr.className=gr.slice(0,yr.index)+(Tr?yr[1]+Tr:"")}};function fr(rr){for(var ur=rr.childNodes.length;ur>0;--ur)rr.removeChild(rr.firstChild);return rr}function _r(rr,ur){return fr(rr).appendChild(ur)}function mr(rr,ur,gr,yr){var Tr=document.createElement(rr);if(gr&&(Tr.className=gr),yr&&(Tr.style.cssText=yr),typeof ur=="string")Tr.appendChild(document.createTextNode(ur));else if(ur)for(var Xr=0;Xr=ur)return In+(ur-Xr);In+=mi-Xr,In+=gr-In%gr,Xr=mi+1}}var Sn=function(){this.id=null,this.f=null,this.time=0,this.handler=Ar(this.onTimeout,this)};Sn.prototype.onTimeout=function(rr){rr.id=0,rr.time<=+new Date?rr.f():setTimeout(rr.handler,rr.time-+new Date)},Sn.prototype.set=function(rr,ur){this.f=ur;var gr=+new Date+rr;(!this.id||gr=ur)return yr+Math.min(In,ur-Tr);if(Tr+=Xr-yr,Tr+=gr-Tr%gr,yr=Xr+1,Tr>=ur)return yr}}var Hr=[""];function zr(rr){for(;Hr.length<=rr;)Hr.push(An(Hr)+" ");return Hr[rr]}function An(rr){return rr[rr.length-1]}function kn(rr,ur){for(var gr=[],yr=0;yr""&&(rr.toUpperCase()!=rr.toLowerCase()||ta.test(rr))}function to(rr,ur){return ur?ur.source.indexOf("\\w")>-1&&Mo(rr)?!0:ur.test(rr):Mo(rr)}function rs(rr){for(var ur in rr)if(rr.hasOwnProperty(ur)&&rr[ur])return!1;return!0}var gs=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function hi(rr){return rr.charCodeAt(0)>=768&&gs.test(rr)}function En(rr,ur,gr){for(;(gr<0?ur>0:urgr?-1:1;;){if(ur==gr)return ur;var Tr=(ur+gr)/2,Xr=yr<0?Math.ceil(Tr):Math.floor(Tr);if(Xr==ur)return rr(Xr)?ur:gr;rr(Xr)?gr=Xr:ur=Xr+yr}}function Wn(rr,ur,gr,yr){if(!rr)return yr(ur,gr,"ltr",0);for(var Tr=!1,Xr=0;Xrur||ur==gr&&In.to==ur)&&(yr(Math.max(In.from,ur),Math.min(In.to,gr),In.level==1?"rtl":"ltr",Xr),Tr=!0)}Tr||yr(ur,gr,"ltr")}var Kn=null;function Ra(rr,ur,gr){var yr;Kn=null;for(var Tr=0;Trur)return Tr;Xr.to==ur&&(Xr.from!=Xr.to&&gr=="before"?yr=Tr:Kn=Tr),Xr.from==ur&&(Xr.from!=Xr.to&&gr!="before"?yr=Tr:Kn=Tr)}return yr??Kn}var Ea=function(){var rr="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ur="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function gr(Aa){return Aa<=247?rr.charAt(Aa):1424<=Aa&&Aa<=1524?"R":1536<=Aa&&Aa<=1785?ur.charAt(Aa-1536):1774<=Aa&&Aa<=2220?"r":8192<=Aa&&Aa<=8203?"w":Aa==8204?"b":"L"}var yr=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Tr=/[stwN]/,Xr=/[LRr]/,In=/[Lb1n]/,mi=/[1n]/;function Vi(Aa,Co,Cs){this.level=Aa,this.from=Co,this.to=Cs}return function(Aa,Co){var Cs=Co=="ltr"?"L":"R";if(Aa.length==0||Co=="ltr"&&!yr.test(Aa))return!1;for(var ws=Aa.length,Is=[],sl=0;sl-1&&(yr[ur]=Tr.slice(0,Xr).concat(Tr.slice(Xr+1)))}}}function xs(rr,ur){var gr=da(rr,ur);if(gr.length)for(var yr=Array.prototype.slice.call(arguments,2),Tr=0;Tr0}function Ac(rr){rr.prototype.on=function(ur,gr){ra(this,ur,gr)},rr.prototype.off=function(ur,gr){Ka(this,ur,gr)}}function Ms(rr){rr.preventDefault?rr.preventDefault():rr.returnValue=!1}function zc(rr){rr.stopPropagation?rr.stopPropagation():rr.cancelBubble=!0}function Fc(rr){return rr.defaultPrevented!=null?rr.defaultPrevented:rr.returnValue==!1}function $u(rr){Ms(rr),zc(rr)}function xu(rr){return rr.target||rr.srcElement}function Su(rr){var ur=rr.which;return ur==null&&(rr.button&1?ur=1:rr.button&2?ur=3:rr.button&4&&(ur=2)),tr&&rr.ctrlKey&&ur==1&&(ur=3),ur}var Vl=function(){if(Ce&&Ne<9)return!1;var rr=mr("div");return"draggable"in rr||"dragDrop"in rr}(),Es;function $s(rr){if(Es==null){var ur=mr("span","");_r(rr,mr("span",[ur,document.createTextNode("x")])),rr.firstChild.offsetHeight!=0&&(Es=ur.offsetWidth<=1&&ur.offsetHeight>2&&!(Ce&&Ne<8))}var gr=Es?mr("span",""):mr("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return gr.setAttribute("cm-text",""),gr}var Xs;function Qs(rr){if(Xs!=null)return Xs;var ur=_r(rr,document.createTextNode("AخA")),gr=Sr(ur,0,1).getBoundingClientRect(),yr=Sr(ur,1,2).getBoundingClientRect();return fr(rr),!gr||gr.left==gr.right?!1:Xs=yr.right-gr.right<3}var Kr=`
-
-b`.split(/\n/).length!=3?function(rr){for(var ur=0,gr=[],yr=rr.length;ur<=yr;){var Tr=rr.indexOf(`
-`,ur);Tr==-1&&(Tr=rr.length);var Xr=rr.slice(ur,rr.charAt(Tr-1)=="\r"?Tr-1:Tr),In=Xr.indexOf("\r");In!=-1?(gr.push(Xr.slice(0,In)),ur+=In+1):(gr.push(Xr),ur=Tr+1)}return gr}:function(rr){return rr.split(/\r\n?|\n/)},Mi=window.getSelection?function(rr){try{return rr.selectionStart!=rr.selectionEnd}catch{return!1}}:function(rr){var ur;try{ur=rr.ownerDocument.selection.createRange()}catch{}return!ur||ur.parentElement()!=rr?!1:ur.compareEndPoints("StartToEnd",ur)!=0},Mn=function(){var rr=mr("div");return"oncopy"in rr?!0:(rr.setAttribute("oncopy","return;"),typeof rr.oncopy=="function")}(),oi=null;function na(rr){if(oi!=null)return oi;var ur=_r(rr,mr("span","x")),gr=ur.getBoundingClientRect(),yr=Sr(ur,0,1).getBoundingClientRect();return oi=Math.abs(gr.left-yr.left)>1}var aa={},Ta={};function qi(rr,ur){arguments.length>2&&(ur.dependencies=Array.prototype.slice.call(arguments,2)),aa[rr]=ur}function va(rr,ur){Ta[rr]=ur}function Ha(rr){if(typeof rr=="string"&&Ta.hasOwnProperty(rr))rr=Ta[rr];else if(rr&&typeof rr.name=="string"&&Ta.hasOwnProperty(rr.name)){var ur=Ta[rr.name];typeof ur=="string"&&(ur={name:ur}),rr=Rn(ur,rr),rr.name=ur.name}else{if(typeof rr=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(rr))return Ha("application/xml");if(typeof rr=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(rr))return Ha("application/json")}return typeof rr=="string"?{name:rr}:rr||{name:"null"}}function bo(rr,ur){ur=Ha(ur);var gr=aa[ur.name];if(!gr)return bo(rr,"text/plain");var yr=gr(rr,ur);if(hs.hasOwnProperty(ur.name)){var Tr=hs[ur.name];for(var Xr in Tr)Tr.hasOwnProperty(Xr)&&(yr.hasOwnProperty(Xr)&&(yr["_"+Xr]=yr[Xr]),yr[Xr]=Tr[Xr])}if(yr.name=ur.name,ur.helperType&&(yr.helperType=ur.helperType),ur.modeProps)for(var In in ur.modeProps)yr[In]=ur.modeProps[In];return yr}var hs={};function Vn(rr,ur){var gr=hs.hasOwnProperty(rr)?hs[rr]:hs[rr]={};Dr(ur,gr)}function Go(rr,ur){if(ur===!0)return ur;if(rr.copyState)return rr.copyState(ur);var gr={};for(var yr in ur){var Tr=ur[yr];Tr instanceof Array&&(Tr=Tr.concat([])),gr[yr]=Tr}return gr}function Wl(rr,ur){for(var gr;rr.innerMode&&(gr=rr.innerMode(ur),!(!gr||gr.mode==rr));)ur=gr.state,rr=gr.mode;return gr||{mode:rr,state:ur}}function Po(rr,ur,gr){return rr.startState?rr.startState(ur,gr):!0}var Ec=function(rr,ur,gr){this.pos=this.start=0,this.string=rr,this.tabSize=ur||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=gr};Ec.prototype.eol=function(){return this.pos>=this.string.length},Ec.prototype.sol=function(){return this.pos==this.lineStart},Ec.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ec.prototype.next=function(){if(this.posur},Ec.prototype.eatSpace=function(){for(var rr=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>rr},Ec.prototype.skipToEnd=function(){this.pos=this.string.length},Ec.prototype.skipTo=function(rr){var ur=this.string.indexOf(rr,this.pos);if(ur>-1)return this.pos=ur,!0},Ec.prototype.backUp=function(rr){this.pos-=rr},Ec.prototype.column=function(){return this.lastColumnPos0?null:(Xr&&ur!==!1&&(this.pos+=Xr[0].length),Xr)}},Ec.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ec.prototype.hideFirstChars=function(rr,ur){this.lineStart+=rr;try{return ur()}finally{this.lineStart-=rr}},Ec.prototype.lookAhead=function(rr){var ur=this.lineOracle;return ur&&ur.lookAhead(rr)},Ec.prototype.baseToken=function(){var rr=this.lineOracle;return rr&&rr.baseToken(this.pos)};function jl(rr,ur){if(ur-=rr.first,ur<0||ur>=rr.size)throw new Error("There is no line "+(ur+rr.first)+" in the document.");for(var gr=rr;!gr.lines;)for(var yr=0;;++yr){var Tr=gr.children[yr],Xr=Tr.chunkSize();if(ur=rr.first&&urgr?Ml(gr,jl(rr,gr).text.length):np(ur,jl(rr,ur.line).text.length)}function np(rr,ur){var gr=rr.ch;return gr==null||gr>ur?Ml(rr.line,ur):gr<0?Ml(rr.line,0):rr}function Ad(rr,ur){for(var gr=[],yr=0;yrthis.maxLookAhead&&(this.maxLookAhead=rr),ur},Lp.prototype.baseToken=function(rr){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=rr;)this.baseTokenPos+=2;var ur=this.baseTokens[this.baseTokenPos+1];return{type:ur&&ur.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-rr}},Lp.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Lp.fromSaved=function(rr,ur,gr){return ur instanceof Up?new Lp(rr,Go(rr.mode,ur.state),gr,ur.lookAhead):new Lp(rr,Go(rr.mode,ur),gr)},Lp.prototype.save=function(rr){var ur=rr!==!1?Go(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Up(ur,this.maxLookAhead):ur};function Bf(rr,ur,gr,yr){var Tr=[rr.state.modeGen],Xr={};Tf(rr,ur.text,rr.doc.mode,gr,function(Aa,Co){return Tr.push(Aa,Co)},Xr,yr);for(var In=gr.state,mi=function(Aa){gr.baseTokens=Tr;var Co=rr.state.overlays[Aa],Cs=1,ws=0;gr.state=!0,Tf(rr,ur.text,Co.mode,gr,function(Is,sl){for(var pc=Cs;wsIs&&Tr.splice(Cs,1,Is,Tr[Cs+1],_l),Cs+=2,ws=Math.min(Is,_l)}if(sl)if(Co.opaque)Tr.splice(pc,Cs-pc,Is,"overlay "+sl),Cs=pc+2;else for(;pcrr.options.maxHighlightLength&&Go(rr.doc.mode,yr.state),Xr=Bf(rr,ur,yr);Tr&&(yr.state=Tr),ur.stateAfter=yr.save(!Tr),ur.styles=Xr.styles,Xr.classes?ur.styleClasses=Xr.classes:ur.styleClasses&&(ur.styleClasses=null),gr===rr.doc.highlightFrontier&&(rr.doc.modeFrontier=Math.max(rr.doc.modeFrontier,++rr.doc.highlightFrontier))}return ur.styles}function Sf(rr,ur,gr){var yr=rr.doc,Tr=rr.display;if(!yr.mode.startState)return new Lp(yr,!0,ur);var Xr=Zf(rr,ur,gr),In=Xr>yr.first&&jl(yr,Xr-1).stateAfter,mi=In?Lp.fromSaved(yr,In,Xr):new Lp(yr,Po(yr.mode),Xr);return yr.iter(Xr,ur,function(Vi){Hp(rr,Vi.text,mi);var Aa=mi.line;Vi.stateAfter=Aa==ur-1||Aa%5==0||Aa>=Tr.viewFrom&&Aaur.start)return Xr}throw new Error("Mode "+rr.name+" failed to advance stream.")}var Du=function(rr,ur,gr){this.start=rr.start,this.end=rr.pos,this.string=rr.current(),this.type=ur||null,this.state=gr};function $f(rr,ur,gr,yr){var Tr=rr.doc,Xr=Tr.mode,In;ur=Lu(Tr,ur);var mi=jl(Tr,ur.line),Vi=Sf(rr,ur.line,gr),Aa=new Ec(mi.text,rr.options.tabSize,Vi),Co;for(yr&&(Co=[]);(yr||Aa.posrr.options.maxHighlightLength?(mi=!1,In&&Hp(rr,ur,yr,Co.pos),Co.pos=ur.length,Cs=null):Cs=Bp(Vf(gr,Co,yr.state,ws),Xr),ws){var Is=ws[0].name;Is&&(Cs="m-"+(Cs?Is+" "+Cs:Is))}if(!mi||Aa!=Cs){for(;ViIn;--mi){if(mi<=Xr.first)return Xr.first;var Vi=jl(Xr,mi-1),Aa=Vi.stateAfter;if(Aa&&(!gr||mi+(Aa instanceof Up?Aa.lookAhead:0)<=Xr.modeFrontier))return mi;var Co=Jr(Vi.text,null,rr.options.tabSize);(Tr==null||yr>Co)&&(Tr=mi-1,yr=Co)}return Tr}function Lf(rr,ur){if(rr.modeFrontier=Math.min(rr.modeFrontier,ur),!(rr.highlightFrontiergr;yr--){var Tr=jl(rr,yr).stateAfter;if(Tr&&(!(Tr instanceof Up)||yr+Tr.lookAhead=ur:Xr.to>ur);(yr||(yr=[])).push(new df(In,Xr.from,Vi?null:Xr.to))}}return yr}function Gh(rr,ur,gr){var yr;if(rr)for(var Tr=0;Tr=ur:Xr.to>ur);if(mi||Xr.from==ur&&In.type=="bookmark"&&(!gr||Xr.marker.insertLeft)){var Vi=Xr.from==null||(In.inclusiveLeft?Xr.from<=ur:Xr.from0&&mi)for(var bu=0;bu0)){var Co=[Vi,1],Cs=Gc(Aa.from,mi.from),ws=Gc(Aa.to,mi.to);(Cs<0||!In.inclusiveLeft&&!Cs)&&Co.push({from:Aa.from,to:mi.from}),(ws>0||!In.inclusiveRight&&!ws)&&Co.push({from:mi.to,to:Aa.to}),Tr.splice.apply(Tr,Co),Vi+=Co.length-3}}return Tr}function jd(rr){var ur=rr.markedSpans;if(ur){for(var gr=0;grur)&&(!yr||od(yr,Xr.marker)<0)&&(yr=Xr.marker)}return yr}function qm(rr,ur,gr,yr,Tr){var Xr=jl(rr,ur),In=rf&&Xr.markedSpans;if(In)for(var mi=0;mi=0&&Cs<=0||Co<=0&&Cs>=0)&&(Co<=0&&(Vi.marker.inclusiveRight&&Tr.inclusiveLeft?Gc(Aa.to,gr)>=0:Gc(Aa.to,gr)>0)||Co>=0&&(Vi.marker.inclusiveRight&&Tr.inclusiveLeft?Gc(Aa.from,yr)<=0:Gc(Aa.from,yr)<0)))return!0}}}function Xd(rr){for(var ur;ur=oh(rr);)rr=ur.find(-1,!0).line;return rr}function Am(rr){for(var ur;ur=wf(rr);)rr=ur.find(1,!0).line;return rr}function qf(rr){for(var ur,gr;ur=wf(rr);)rr=ur.find(1,!0).line,(gr||(gr=[])).push(rr);return gr}function Gf(rr,ur){var gr=jl(rr,ur),yr=Xd(gr);return gr==yr?ur:ei(yr)}function Dm(rr,ur){if(ur>rr.lastLine())return ur;var gr=jl(rr,ur),yr;if(!_p(rr,gr))return ur;for(;yr=wf(gr);)gr=yr.find(1,!0).line;return ei(gr)+1}function _p(rr,ur){var gr=rf&&ur.markedSpans;if(gr){for(var yr=void 0,Tr=0;Trur.maxLineLength&&(ur.maxLineLength=Tr,ur.maxLine=yr)})}var Fi=function(rr,ur,gr){this.text=rr,Fd(this,ur),this.height=gr?gr(this):1};Fi.prototype.lineNo=function(){return ei(this)},Ac(Fi);function Hi(rr,ur,gr,yr){rr.text=ur,rr.stateAfter&&(rr.stateAfter=null),rr.styles&&(rr.styles=null),rr.order!=null&&(rr.order=null),jd(rr),Fd(rr,gr);var Tr=yr?yr(rr):1;Tr!=rr.height&&Qc(rr,Tr)}function Bc(rr){rr.parent=null,jd(rr)}var sd={},kd={};function cp(rr,ur){if(!rr||/^\s*$/.test(rr))return null;var gr=ur.addModeClass?kd:sd;return gr[rr]||(gr[rr]=rr.replace(/\S+/g,"cm-$&"))}function xf(rr,ur){var gr=Er("span",null,null,Oe?"padding-right: .1px":null),yr={pre:Er("pre",[gr],"CodeMirror-line"),content:gr,col:0,pos:0,cm:rr,trailingSpace:!1,splitSpaces:rr.getOption("lineWrapping")};ur.measure={};for(var Tr=0;Tr<=(ur.rest?ur.rest.length:0);Tr++){var Xr=Tr?ur.rest[Tr-1]:ur.line,In=void 0;yr.pos=0,yr.addToken=Gm,Qs(rr.display.measure)&&(In=ro(Xr,rr.doc.direction))&&(yr.addToken=vp(yr.addToken,In)),yr.map=[];var mi=ur!=rr.display.externalMeasured&&ei(Xr);uh(Xr,yr,Uf(rr,Xr,mi)),Xr.styleClasses&&(Xr.styleClasses.bgClass&&(yr.bgClass=Vr(Xr.styleClasses.bgClass,yr.bgClass||"")),Xr.styleClasses.textClass&&(yr.textClass=Vr(Xr.styleClasses.textClass,yr.textClass||""))),yr.map.length==0&&yr.map.push(0,0,yr.content.appendChild($s(rr.display.measure))),Tr==0?(ur.measure.map=yr.map,ur.measure.cache={}):((ur.measure.maps||(ur.measure.maps=[])).push(yr.map),(ur.measure.caches||(ur.measure.caches=[])).push({}))}if(Oe){var Vi=yr.content.lastChild;(/\bcm-tab\b/.test(Vi.className)||Vi.querySelector&&Vi.querySelector(".cm-tab"))&&(yr.content.className="cm-tab-wrap-hack")}return xs(rr,"renderLine",rr,ur.line,yr.pre),yr.pre.className&&(yr.textClass=Vr(yr.pre.className,yr.textClass||"")),yr}function Wf(rr){var ur=mr("span","•","cm-invalidchar");return ur.title="\\u"+rr.charCodeAt(0).toString(16),ur.setAttribute("aria-label",ur.title),ur}function Gm(rr,ur,gr,yr,Tr,Xr,In){if(ur){var mi=rr.splitSpaces?sh(ur,rr.trailingSpace):ur,Vi=rr.cm.state.specialChars,Aa=!1,Co;if(!Vi.test(ur))rr.col+=ur.length,Co=document.createTextNode(mi),rr.map.push(rr.pos,rr.pos+ur.length,Co),Ce&&Ne<9&&(Aa=!0),rr.pos+=ur.length;else{Co=document.createDocumentFragment();for(var Cs=0;;){Vi.lastIndex=Cs;var ws=Vi.exec(ur),Is=ws?ws.index-Cs:ur.length-Cs;if(Is){var sl=document.createTextNode(mi.slice(Cs,Cs+Is));Ce&&Ne<9?Co.appendChild(mr("span",[sl])):Co.appendChild(sl),rr.map.push(rr.pos,rr.pos+Is,sl),rr.col+=Is,rr.pos+=Is}if(!ws)break;Cs+=Is+1;var pc=void 0;if(ws[0]==" "){var _l=rr.cm.options.tabSize,_c=_l-rr.col%_l;pc=Co.appendChild(mr("span",zr(_c),"cm-tab")),pc.setAttribute("role","presentation"),pc.setAttribute("cm-text"," "),rr.col+=_c}else ws[0]=="\r"||ws[0]==`
-`?(pc=Co.appendChild(mr("span",ws[0]=="\r"?"␍":"","cm-invalidchar")),pc.setAttribute("cm-text",ws[0]),rr.col+=1):(pc=rr.cm.options.specialCharPlaceholder(ws[0]),pc.setAttribute("cm-text",ws[0]),Ce&&Ne<9?Co.appendChild(mr("span",[pc])):Co.appendChild(pc),rr.col+=1);rr.map.push(rr.pos,rr.pos+1,pc),rr.pos++}}if(rr.trailingSpace=mi.charCodeAt(ur.length-1)==32,gr||yr||Tr||Aa||Xr||In){var yc=gr||"";yr&&(yc+=yr),Tr&&(yc+=Tr);var As=mr("span",[Co],yc,Xr);if(In)for(var bu in In)In.hasOwnProperty(bu)&&bu!="style"&&bu!="class"&&As.setAttribute(bu,In[bu]);return rr.content.appendChild(As)}rr.content.appendChild(Co)}}function sh(rr,ur){if(rr.length>1&&!/ /.test(rr))return rr;for(var gr=ur,yr="",Tr=0;TrAa&&Cs.from<=Aa));ws++);if(Cs.to>=Co)return rr(gr,yr,Tr,Xr,In,mi,Vi);rr(gr,yr.slice(0,Cs.to-Aa),Tr,Xr,null,mi,Vi),Xr=null,yr=yr.slice(Cs.to-Aa),Aa=Cs.to}}}function am(rr,ur,gr,yr){var Tr=!yr&&gr.widgetNode;Tr&&rr.map.push(rr.pos,rr.pos+ur,Tr),!yr&&rr.cm.display.input.needsContentAttribute&&(Tr||(Tr=rr.content.appendChild(document.createElement("span"))),Tr.setAttribute("cm-marker",gr.id)),Tr&&(rr.cm.display.input.setUneditable(Tr),rr.content.appendChild(Tr)),rr.pos+=ur,rr.trailingSpace=!1}function uh(rr,ur,gr){var yr=rr.markedSpans,Tr=rr.text,Xr=0;if(!yr){for(var In=1;InVi||vu.collapsed&&Hc.to==Vi&&Hc.from==Vi)){if(Hc.to!=null&&Hc.to!=Vi&&Is>Hc.to&&(Is=Hc.to,pc=""),vu.className&&(sl+=" "+vu.className),vu.css&&(ws=(ws?ws+";":"")+vu.css),vu.startStyle&&Hc.from==Vi&&(_l+=" "+vu.startStyle),vu.endStyle&&Hc.to==Is&&(bu||(bu=[])).push(vu.endStyle,Hc.to),vu.title&&((yc||(yc={})).title=vu.title),vu.attributes)for(var rd in vu.attributes)(yc||(yc={}))[rd]=vu.attributes[rd];vu.collapsed&&(!_c||od(_c.marker,vu)<0)&&(_c=Hc)}else Hc.from>Vi&&Is>Hc.from&&(Is=Hc.from)}if(bu)for(var rp=0;rp=mi)break;for(var dl=Math.min(mi,Is);;){if(Co){var cu=Vi+Co.length;if(!_c){var Wu=cu>dl?Co.slice(0,dl-Vi):Co;ur.addToken(ur,Wu,Cs?Cs+sl:sl,_l,Vi+Wu.length==Is?pc:"",ws,yc)}if(cu>=dl){Co=Co.slice(dl-Vi),Vi=dl;break}Vi=cu,_l=""}Co=Tr.slice(Xr,Xr=gr[Aa++]),Cs=cp(gr[Aa++],ur.cm.options)}}}function Fh(rr,ur,gr){this.line=ur,this.rest=qf(ur),this.size=this.rest?ei(An(this.rest))-gr+1:1,this.node=this.text=null,this.hidden=_p(rr,ur)}function Wm(rr,ur,gr){for(var yr=[],Tr,Xr=ur;Xr2&&Xr.push((Vi.bottom+Aa.top)/2-gr.top)}}Xr.push(gr.bottom-gr.top)}}function Xh(rr,ur,gr){if(rr.line==ur)return{map:rr.measure.map,cache:rr.measure.cache};if(rr.rest){for(var yr=0;yrgr)return{map:rr.measure.maps[Tr],cache:rr.measure.caches[Tr],before:!0}}}function Qh(rr,ur){ur=Xd(ur);var gr=ei(ur),yr=rr.display.externalMeasured=new Fh(rr.doc,ur,gr);yr.lineN=gr;var Tr=yr.built=xf(rr,yr);return yr.text=Tr.pre,_r(rr.display.lineMeasure,Tr.pre),yr}function kh(rr,ur,gr,yr){return of(rr,Pp(rr,ur),gr,yr)}function Oh(rr,ur){if(ur>=rr.display.viewFrom&&ur=gr.lineN&&urur)&&(Xr=Vi-mi,Tr=Xr-1,ur>=Vi&&(In="right")),Tr!=null){if(yr=rr[Aa+2],mi==Vi&&gr==(yr.insertLeft?"left":"right")&&(In=gr),gr=="left"&&Tr==0)for(;Aa&&rr[Aa-2]==rr[Aa-3]&&rr[Aa-1].insertLeft;)yr=rr[(Aa-=3)+2],In="left";if(gr=="right"&&Tr==Vi-mi)for(;Aa=0&&(gr=rr[Tr]).left==gr.right;Tr--);return gr}function hh(rr,ur,gr,yr){var Tr=Jh(ur.map,gr,yr),Xr=Tr.node,In=Tr.start,mi=Tr.end,Vi=Tr.collapse,Aa;if(Xr.nodeType==3){for(var Co=0;Co<4;Co++){for(;In&&hi(ur.line.text.charAt(Tr.coverStart+In));)--In;for(;Tr.coverStart+mi0&&(Vi=yr="right");var Cs;rr.options.lineWrapping&&(Cs=Xr.getClientRects()).length>1?Aa=Cs[yr=="right"?Cs.length-1:0]:Aa=Xr.getBoundingClientRect()}if(Ce&&Ne<9&&!In&&(!Aa||!Aa.left&&!Aa.right)){var ws=Xr.parentNode.getClientRects()[0];ws?Aa={left:ws.left,right:ws.left+cm(rr.display),top:ws.top,bottom:ws.bottom}:Aa=Uh}for(var Is=Aa.top-ur.rect.top,sl=Aa.bottom-ur.rect.top,pc=(Is+sl)/2,_l=ur.view.measure.heights,_c=0;_c<_l.length-1&&!(pc<_l[_c]);_c++);var yc=_c?_l[_c-1]:0,As=_l[_c],bu={left:(Vi=="right"?Aa.right:Aa.left)-ur.rect.left,right:(Vi=="left"?Aa.left:Aa.right)-ur.rect.left,top:yc,bottom:As};return!Aa.left&&!Aa.right&&(bu.bogus=!0),rr.options.singleCursorHeightPerLine||(bu.rtop=Is,bu.rbottom=sl),bu}function Kf(rr,ur){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!na(rr))return ur;var gr=screen.logicalXDPI/screen.deviceXDPI,yr=screen.logicalYDPI/screen.deviceYDPI;return{left:ur.left*gr,right:ur.right*gr,top:ur.top*yr,bottom:ur.bottom*yr}}function Zh(rr){if(rr.measure&&(rr.measure.cache={},rr.measure.heights=null,rr.rest))for(var ur=0;ur=yr.text.length?(Vi=yr.text.length,Aa="before"):Vi<=0&&(Vi=0,Aa="after"),!mi)return In(Aa=="before"?Vi-1:Vi,Aa=="before");function Co(sl,pc,_l){var _c=mi[pc],yc=_c.level==1;return In(_l?sl-1:sl,yc!=_l)}var Cs=Ra(mi,Vi,Aa),ws=Kn,Is=Co(Vi,Cs,Aa=="before");return ws!=null&&(Is.other=Co(Vi,ws,Aa!="before")),Is}function Cu(rr,ur){var gr=0;ur=Lu(rr.doc,ur),rr.options.lineWrapping||(gr=cm(rr.display)*ur.ch);var yr=jl(rr.doc,ur.line),Tr=Xp(yr)+sm(rr.display);return{left:gr,right:gr,top:Tr,bottom:Tr+yr.height}}function ku(rr,ur,gr,yr,Tr){var Xr=Ml(rr,ur,gr);return Xr.xRel=Tr,yr&&(Xr.outside=yr),Xr}function Ud(rr,ur,gr){var yr=rr.doc;if(gr+=rr.display.viewOffset,gr<0)return ku(yr.first,0,null,-1,-1);var Tr=ds(yr,gr),Xr=yr.first+yr.size-1;if(Tr>Xr)return ku(yr.first+yr.size-1,jl(yr,Xr).text.length,null,1,1);ur<0&&(ur=0);for(var In=jl(yr,Tr);;){var mi=l0(rr,In,Tr,ur,gr),Vi=zm(In,mi.ch+(mi.xRel>0||mi.outside>0?1:0));if(!Vi)return mi;var Aa=Vi.find(1);if(Aa.line==Tr)return Aa;In=jl(yr,Tr=Aa.line)}}function Op(rr,ur,gr,yr){yr-=Vh(ur);var Tr=ur.text.length,Xr=Ur(function(In){return of(rr,gr,In-1).bottom<=yr},Tr,0);return Tr=Ur(function(In){return of(rr,gr,In).top>yr},Xr,Tr),{begin:Xr,end:Tr}}function ip(rr,ur,gr,yr){gr||(gr=Pp(rr,ur));var Tr=bm(rr,ur,of(rr,gr,yr),"line").top;return Op(rr,ur,gr,Tr)}function _h(rr,ur,gr,yr){return rr.bottom<=gr?!1:rr.top>gr?!0:(yr?rr.left:rr.right)>ur}function l0(rr,ur,gr,yr,Tr){Tr-=Xp(ur);var Xr=Pp(rr,ur),In=Vh(ur),mi=0,Vi=ur.text.length,Aa=!0,Co=ro(ur,rr.doc.direction);if(Co){var Cs=(rr.options.lineWrapping?Yf:Df)(rr,ur,gr,Xr,Co,yr,Tr);Aa=Cs.level!=1,mi=Aa?Cs.from:Cs.to-1,Vi=Aa?Cs.to:Cs.from-1}var ws=null,Is=null,sl=Ur(function(wu){var Hc=of(rr,Xr,wu);return Hc.top+=In,Hc.bottom+=In,_h(Hc,yr,Tr,!1)?(Hc.top<=Tr&&Hc.left<=yr&&(ws=wu,Is=Hc),!0):!1},mi,Vi),pc,_l,_c=!1;if(Is){var yc=yr-Is.left=bu.bottom?1:0}return sl=En(ur.text,sl,1),ku(gr,sl,_l,_c,yr-pc)}function Df(rr,ur,gr,yr,Tr,Xr,In){var mi=Ur(function(Cs){var ws=Tr[Cs],Is=ws.level!=1;return _h(rc(rr,Ml(gr,Is?ws.to:ws.from,Is?"before":"after"),"line",ur,yr),Xr,In,!0)},0,Tr.length-1),Vi=Tr[mi];if(mi>0){var Aa=Vi.level!=1,Co=rc(rr,Ml(gr,Aa?Vi.from:Vi.to,Aa?"after":"before"),"line",ur,yr);_h(Co,Xr,In,!0)&&Co.top>In&&(Vi=Tr[mi-1])}return Vi}function Yf(rr,ur,gr,yr,Tr,Xr,In){var mi=Op(rr,ur,yr,In),Vi=mi.begin,Aa=mi.end;/\s/.test(ur.text.charAt(Aa-1))&&Aa--;for(var Co=null,Cs=null,ws=0;ws=Aa||Is.to<=Vi)){var sl=Is.level!=1,pc=of(rr,yr,sl?Math.min(Aa,Is.to)-1:Math.max(Vi,Is.from)).right,_l=pc_l)&&(Co=Is,Cs=_l)}}return Co||(Co=Tr[Tr.length-1]),Co.fromAa&&(Co={from:Co.from,to:Aa,level:Co.level}),Co}var $m;function kf(rr){if(rr.cachedTextHeight!=null)return rr.cachedTextHeight;if($m==null){$m=mr("pre",null,"CodeMirror-line-like");for(var ur=0;ur<49;++ur)$m.appendChild(document.createTextNode("x")),$m.appendChild(mr("br"));$m.appendChild(document.createTextNode("x"))}_r(rr.measure,$m);var gr=$m.offsetHeight/50;return gr>3&&(rr.cachedTextHeight=gr),fr(rr.measure),gr||1}function cm(rr){if(rr.cachedCharWidth!=null)return rr.cachedCharWidth;var ur=mr("span","xxxxxxxxxx"),gr=mr("pre",[ur],"CodeMirror-line-like");_r(rr.measure,gr);var yr=ur.getBoundingClientRect(),Tr=(yr.right-yr.left)/10;return Tr>2&&(rr.cachedCharWidth=Tr),Tr||10}function Ym(rr){for(var ur=rr.display,gr={},yr={},Tr=ur.gutters.clientLeft,Xr=ur.gutters.firstChild,In=0;Xr;Xr=Xr.nextSibling,++In){var mi=rr.display.gutterSpecs[In].className;gr[mi]=Xr.offsetLeft+Xr.clientLeft+Tr,yr[mi]=Xr.clientWidth}return{fixedPos:Vd(ur),gutterTotalWidth:ur.gutters.offsetWidth,gutterLeft:gr,gutterWidth:yr,wrapperWidth:ur.wrapper.clientWidth}}function Vd(rr){return rr.scroller.getBoundingClientRect().left-rr.sizer.getBoundingClientRect().left}function c0(rr){var ur=kf(rr.display),gr=rr.options.lineWrapping,yr=gr&&Math.max(5,rr.display.scroller.clientWidth/cm(rr.display)-3);return function(Tr){if(_p(rr.doc,Tr))return 0;var Xr=0;if(Tr.widgets)for(var In=0;In0&&(Aa=jl(rr.doc,Vi.line).text).length==Vi.ch){var Co=Jr(Aa,Aa.length,rr.options.tabSize)-Aa.length;Vi=Ml(Vi.line,Math.max(0,Math.round((Xr-Yh(rr.display).left)/cm(rr.display))-Co))}return Vi}function Xm(rr,ur){if(ur>=rr.display.viewTo||(ur-=rr.display.viewFrom,ur<0))return null;for(var gr=rr.display.view,yr=0;yrur)&&(Tr.updateLineNumbers=ur),rr.curOp.viewChanged=!0,ur>=Tr.viewTo)rf&&Gf(rr.doc,ur)Tr.viewFrom?Xf(rr):(Tr.viewFrom+=yr,Tr.viewTo+=yr);else if(ur<=Tr.viewFrom&&gr>=Tr.viewTo)Xf(rr);else if(ur<=Tr.viewFrom){var Xr=Qf(rr,gr,gr+yr,1);Xr?(Tr.view=Tr.view.slice(Xr.index),Tr.viewFrom=Xr.lineN,Tr.viewTo+=yr):Xf(rr)}else if(gr>=Tr.viewTo){var In=Qf(rr,ur,ur,-1);In?(Tr.view=Tr.view.slice(0,In.index),Tr.viewTo=In.lineN):Xf(rr)}else{var mi=Qf(rr,ur,ur,-1),Vi=Qf(rr,gr,gr+yr,1);mi&&Vi?(Tr.view=Tr.view.slice(0,mi.index).concat(Wm(rr,mi.lineN,Vi.lineN)).concat(Tr.view.slice(Vi.index)),Tr.viewTo+=yr):Xf(rr)}var Aa=Tr.externalMeasured;Aa&&(gr=Tr.lineN&&ur=yr.viewTo)){var Xr=yr.view[Xm(rr,ur)];if(Xr.node!=null){var In=Xr.changes||(Xr.changes=[]);vn(In,gr)==-1&&In.push(gr)}}}function Xf(rr){rr.display.viewFrom=rr.display.viewTo=rr.doc.first,rr.display.view=[],rr.display.viewOffset=0}function Qf(rr,ur,gr,yr){var Tr=Xm(rr,ur),Xr,In=rr.display.view;if(!rf||gr==rr.doc.first+rr.doc.size)return{index:Tr,lineN:gr};for(var mi=rr.display.viewFrom,Vi=0;Vi0){if(Tr==In.length-1)return null;Xr=mi+In[Tr].size-ur,Tr++}else Xr=mi-ur;ur+=Xr,gr+=Xr}for(;Gf(rr.doc,gr)!=gr;){if(Tr==(yr<0?0:In.length-1))return null;gr+=yr*In[Tr-(yr<0?1:0)].size,Tr+=yr}return{index:Tr,lineN:gr}}function Rh(rr,ur,gr){var yr=rr.display,Tr=yr.view;Tr.length==0||ur>=yr.viewTo||gr<=yr.viewFrom?(yr.view=Wm(rr,ur,gr),yr.viewFrom=ur):(yr.viewFrom>ur?yr.view=Wm(rr,ur,yr.viewFrom).concat(yr.view):yr.viewFromgr&&(yr.view=yr.view.slice(0,Xm(rr,gr)))),yr.viewTo=gr}function Ih(rr){for(var ur=rr.display.view,gr=0,yr=0;yr=rr.display.viewTo||Vi.to().line0?In:rr.defaultCharWidth())+"px"}if(yr.other){var mi=gr.appendChild(mr("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));mi.style.display="",mi.style.left=yr.other.left+"px",mi.style.top=yr.other.top+"px",mi.style.height=(yr.other.bottom-yr.other.top)*.85+"px"}}function um(rr,ur){return rr.top-ur.top||rr.left-ur.left}function Hh(rr,ur,gr){var yr=rr.display,Tr=rr.doc,Xr=document.createDocumentFragment(),In=Yh(rr.display),mi=In.left,Vi=Math.max(yr.sizerWidth,vm(rr)-yr.sizer.offsetLeft)-In.right,Aa=Tr.direction=="ltr";function Co(As,bu,wu,Hc){bu<0&&(bu=0),bu=Math.round(bu),Hc=Math.round(Hc),Xr.appendChild(mr("div",null,"CodeMirror-selected","position: absolute; left: "+As+`px;
- top: `+bu+"px; width: "+(wu??Vi-As)+`px;
- height: `+(Hc-bu)+"px"))}function Cs(As,bu,wu){var Hc=jl(Tr,As),vu=Hc.text.length,rd,rp;function xo(Wu,ld){return mc(rr,Ml(As,Wu),"div",Hc,ld)}function dl(Wu,ld,fp){var Ld=ip(rr,Hc,null,Wu),Wd=ld=="ltr"==(fp=="after")?"left":"right",Qd=fp=="after"?Ld.begin:Ld.end-(/\s/.test(Hc.text.charAt(Ld.end-1))?2:1);return xo(Qd,Wd)[Wd]}var cu=ro(Hc,Tr.direction);return Wn(cu,bu||0,wu??vu,function(Wu,ld,fp,Ld){var Wd=fp=="ltr",Qd=xo(Wu,Wd?"left":"right"),Jd=xo(ld-1,Wd?"right":"left"),Gu=bu==null&&Wu==0,gd=wu==null&&ld==vu,ef=Ld==0,jm=!cu||Ld==cu.length-1;if(Jd.top-Qd.top<=3){var tf=(Aa?Gu:gd)&&ef,x0=(Aa?gd:Gu)&&jm,Zm=tf?mi:(Wd?Qd:Jd).left,Mh=x0?Vi:(Wd?Jd:Qd).right;Co(Zm,Qd.top,Mh-Zm,Qd.bottom)}else{var Th,yf,T0,U0;Wd?(Th=Aa&&Gu&&ef?mi:Qd.left,yf=Aa?Vi:dl(Wu,fp,"before"),T0=Aa?mi:dl(ld,fp,"after"),U0=Aa&&gd&&jm?Vi:Jd.right):(Th=Aa?dl(Wu,fp,"before"):mi,yf=!Aa&&Gu&&ef?Vi:Qd.right,T0=!Aa&&gd&&jm?mi:Jd.left,U0=Aa?dl(ld,fp,"after"):Vi),Co(Th,Qd.top,yf-Th,Qd.bottom),Qd.bottom0?ur.blinker=setInterval(function(){rr.hasFocus()||Fo(rr),ur.cursorDiv.style.visibility=(gr=!gr)?"":"hidden"},rr.options.cursorBlinkRate):rr.options.cursorBlinkRate<0&&(ur.cursorDiv.style.visibility="hidden")}}function vs(rr){rr.hasFocus()||(rr.display.input.focus(),rr.state.focused||Vo(rr))}function Io(rr){rr.state.delayingBlurEvent=!0,setTimeout(function(){rr.state.delayingBlurEvent&&(rr.state.delayingBlurEvent=!1,rr.state.focused&&Fo(rr))},100)}function Vo(rr,ur){rr.state.delayingBlurEvent&&!rr.state.draggingText&&(rr.state.delayingBlurEvent=!1),rr.options.readOnly!="nocursor"&&(rr.state.focused||(xs(rr,"focus",rr,ur),rr.state.focused=!0,Rr(rr.display.wrapper,"CodeMirror-focused"),!rr.curOp&&rr.display.selForContextMenu!=rr.doc.sel&&(rr.display.input.reset(),Oe&&setTimeout(function(){return rr.display.input.reset(!0)},20)),rr.display.input.receivedFocus()),Ps(rr))}function Fo(rr,ur){rr.state.delayingBlurEvent||(rr.state.focused&&(xs(rr,"blur",rr,ur),rr.state.focused=!1,dr(rr.display.wrapper,"CodeMirror-focused")),clearInterval(rr.display.blinker),setTimeout(function(){rr.state.focused||(rr.display.shift=!1)},150))}function vo(rr){for(var ur=rr.display,gr=ur.lineDiv.offsetTop,yr=Math.max(0,ur.scroller.getBoundingClientRect().top),Tr=ur.lineDiv.getBoundingClientRect().top,Xr=0,In=0;In.005||Is<-.005)&&(Trrr.display.sizerWidth){var pc=Math.ceil(Co/cm(rr.display));pc>rr.display.maxLineLength&&(rr.display.maxLineLength=pc,rr.display.maxLine=mi.line,rr.display.maxLineChanged=!0)}}}Math.abs(Xr)>2&&(ur.scroller.scrollTop+=Xr)}function Ro(rr){if(rr.widgets)for(var ur=0;ur=In&&(Xr=ds(ur,Xp(jl(ur,Vi))-rr.wrapper.clientHeight),In=Vi)}return{from:Xr,to:Math.max(In,Xr+1)}}function To(rr,ur){if(!_s(rr,"scrollCursorIntoView")){var gr=rr.display,yr=gr.sizer.getBoundingClientRect(),Tr=null,Xr=gr.wrapper.ownerDocument;if(ur.top+yr.top<0?Tr=!0:ur.bottom+yr.top>(Xr.defaultView.innerHeight||Xr.documentElement.clientHeight)&&(Tr=!1),Tr!=null&&!kt){var In=mr("div","",null,`position: absolute;
- top: `+(ur.top-gr.viewOffset-sm(rr.display))+`px;
- height: `+(ur.bottom-ur.top+Pf(rr)+gr.barHeight)+`px;
- left: `+ur.left+"px; width: "+Math.max(2,ur.right-ur.left)+"px;");rr.display.lineSpace.appendChild(In),In.scrollIntoView(Tr),rr.display.lineSpace.removeChild(In)}}}function is(rr,ur,gr,yr){yr==null&&(yr=0);var Tr;!rr.options.lineWrapping&&ur==gr&&(gr=ur.sticky=="before"?Ml(ur.line,ur.ch+1,"before"):ur,ur=ur.ch?Ml(ur.line,ur.sticky=="before"?ur.ch-1:ur.ch,"after"):ur);for(var Xr=0;Xr<5;Xr++){var In=!1,mi=rc(rr,ur),Vi=!gr||gr==ur?mi:rc(rr,gr);Tr={left:Math.min(mi.left,Vi.left),top:Math.min(mi.top,Vi.top)-yr,right:Math.max(mi.left,Vi.left),bottom:Math.max(mi.bottom,Vi.bottom)+yr};var Aa=Zo(rr,Tr),Co=rr.doc.scrollTop,Cs=rr.doc.scrollLeft;if(Aa.scrollTop!=null&&(ps(rr,Aa.scrollTop),Math.abs(rr.doc.scrollTop-Co)>1&&(In=!0)),Aa.scrollLeft!=null&&(ks(rr,Aa.scrollLeft),Math.abs(rr.doc.scrollLeft-Cs)>1&&(In=!0)),!In)break}return Tr}function _o(rr,ur){var gr=Zo(rr,ur);gr.scrollTop!=null&&ps(rr,gr.scrollTop),gr.scrollLeft!=null&&ks(rr,gr.scrollLeft)}function Zo(rr,ur){var gr=rr.display,yr=kf(rr.display);ur.top<0&&(ur.top=0);var Tr=rr.curOp&&rr.curOp.scrollTop!=null?rr.curOp.scrollTop:gr.scroller.scrollTop,Xr=Km(rr),In={};ur.bottom-ur.top>Xr&&(ur.bottom=ur.top+Xr);var mi=rr.doc.height+Bm(gr),Vi=ur.topmi-yr;if(ur.topTr+Xr){var Co=Math.min(ur.top,(Aa?mi:ur.bottom)-Xr);Co!=Tr&&(In.scrollTop=Co)}var Cs=rr.options.fixedGutter?0:gr.gutters.offsetWidth,ws=rr.curOp&&rr.curOp.scrollLeft!=null?rr.curOp.scrollLeft:gr.scroller.scrollLeft-Cs,Is=vm(rr)-gr.gutters.offsetWidth,sl=ur.right-ur.left>Is;return sl&&(ur.right=ur.left+Is),ur.left<10?In.scrollLeft=0:ur.leftIs+ws-3&&(In.scrollLeft=ur.right+(sl?0:10)-Is),In}function Rs(rr,ur){ur!=null&&(Gs(rr),rr.curOp.scrollTop=(rr.curOp.scrollTop==null?rr.doc.scrollTop:rr.curOp.scrollTop)+ur)}function Ss(rr){Gs(rr);var ur=rr.getCursor();rr.curOp.scrollToPos={from:ur,to:ur,margin:rr.options.cursorScrollMargin}}function Us(rr,ur,gr){(ur!=null||gr!=null)&&Gs(rr),ur!=null&&(rr.curOp.scrollLeft=ur),gr!=null&&(rr.curOp.scrollTop=gr)}function tl(rr,ur){Gs(rr),rr.curOp.scrollToPos=ur}function Gs(rr){var ur=rr.curOp.scrollToPos;if(ur){rr.curOp.scrollToPos=null;var gr=Cu(rr,ur.from),yr=Cu(rr,ur.to);bl(rr,gr,yr,ur.margin)}}function bl(rr,ur,gr,yr){var Tr=Zo(rr,{left:Math.min(ur.left,gr.left),top:Math.min(ur.top,gr.top)-yr,right:Math.max(ur.right,gr.right),bottom:Math.max(ur.bottom,gr.bottom)+yr});Us(rr,Tr.scrollLeft,Tr.scrollTop)}function ps(rr,ur){Math.abs(rr.doc.scrollTop-ur)<2||(ue||Ou(rr,{top:ur}),fl(rr,ur,!0),ue&&Ou(rr),Hl(rr,100))}function fl(rr,ur,gr){ur=Math.max(0,Math.min(rr.display.scroller.scrollHeight-rr.display.scroller.clientHeight,ur)),!(rr.display.scroller.scrollTop==ur&&!gr)&&(rr.doc.scrollTop=ur,rr.display.scrollbars.setScrollTop(ur),rr.display.scroller.scrollTop!=ur&&(rr.display.scroller.scrollTop=ur))}function ks(rr,ur,gr,yr){ur=Math.max(0,Math.min(ur,rr.display.scroller.scrollWidth-rr.display.scroller.clientWidth)),!((gr?ur==rr.doc.scrollLeft:Math.abs(rr.doc.scrollLeft-ur)<2)&&!yr)&&(rr.doc.scrollLeft=ur,Ep(rr),rr.display.scroller.scrollLeft!=ur&&(rr.display.scroller.scrollLeft=ur),rr.display.scrollbars.setScrollLeft(ur))}function Os(rr){var ur=rr.display,gr=ur.gutters.offsetWidth,yr=Math.round(rr.doc.height+Bm(rr.display));return{clientHeight:ur.scroller.clientHeight,viewHeight:ur.wrapper.clientHeight,scrollWidth:ur.scroller.scrollWidth,clientWidth:ur.scroller.clientWidth,viewWidth:ur.wrapper.clientWidth,barLeft:rr.options.fixedGutter?gr:0,docHeight:yr,scrollHeight:yr+Pf(rr)+ur.barHeight,nativeBarWidth:ur.nativeBarWidth,gutterWidth:gr}}var Bs=function(rr,ur,gr){this.cm=gr;var yr=this.vert=mr("div",[mr("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Tr=this.horiz=mr("div",[mr("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");yr.tabIndex=Tr.tabIndex=-1,rr(yr),rr(Tr),ra(yr,"scroll",function(){yr.clientHeight&&ur(yr.scrollTop,"vertical")}),ra(Tr,"scroll",function(){Tr.clientWidth&&ur(Tr.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Ce&&Ne<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Bs.prototype.update=function(rr){var ur=rr.scrollWidth>rr.clientWidth+1,gr=rr.scrollHeight>rr.clientHeight+1,yr=rr.nativeBarWidth;if(gr){this.vert.style.display="block",this.vert.style.bottom=ur?yr+"px":"0";var Tr=rr.viewHeight-(ur?yr:0);this.vert.firstChild.style.height=Math.max(0,rr.scrollHeight-rr.clientHeight+Tr)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(ur){this.horiz.style.display="block",this.horiz.style.right=gr?yr+"px":"0",this.horiz.style.left=rr.barLeft+"px";var Xr=rr.viewWidth-rr.barLeft-(gr?yr:0);this.horiz.firstChild.style.width=Math.max(0,rr.scrollWidth-rr.clientWidth+Xr)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&rr.clientHeight>0&&(yr==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:gr?yr:0,bottom:ur?yr:0}},Bs.prototype.setScrollLeft=function(rr){this.horiz.scrollLeft!=rr&&(this.horiz.scrollLeft=rr),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Bs.prototype.setScrollTop=function(rr){this.vert.scrollTop!=rr&&(this.vert.scrollTop=rr),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Bs.prototype.zeroWidthHack=function(){var rr=tr&&!er?"12px":"18px";this.horiz.style.height=this.vert.style.width=rr,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Sn,this.disableVert=new Sn},Bs.prototype.enableZeroWidthBar=function(rr,ur,gr){rr.style.visibility="";function yr(){var Tr=rr.getBoundingClientRect(),Xr=gr=="vert"?document.elementFromPoint(Tr.right-1,(Tr.top+Tr.bottom)/2):document.elementFromPoint((Tr.right+Tr.left)/2,Tr.bottom-1);Xr!=rr?rr.style.visibility="hidden":ur.set(1e3,yr)}ur.set(1e3,yr)},Bs.prototype.clear=function(){var rr=this.horiz.parentNode;rr.removeChild(this.horiz),rr.removeChild(this.vert)};var Vs=function(){};Vs.prototype.update=function(){return{bottom:0,right:0}},Vs.prototype.setScrollLeft=function(){},Vs.prototype.setScrollTop=function(){},Vs.prototype.clear=function(){};function Pl(rr,ur){ur||(ur=Os(rr));var gr=rr.display.barWidth,yr=rr.display.barHeight;Zl(rr,ur);for(var Tr=0;Tr<4&&gr!=rr.display.barWidth||yr!=rr.display.barHeight;Tr++)gr!=rr.display.barWidth&&rr.options.lineWrapping&&vo(rr),Zl(rr,Os(rr)),gr=rr.display.barWidth,yr=rr.display.barHeight}function Zl(rr,ur){var gr=rr.display,yr=gr.scrollbars.update(ur);gr.sizer.style.paddingRight=(gr.barWidth=yr.right)+"px",gr.sizer.style.paddingBottom=(gr.barHeight=yr.bottom)+"px",gr.heightForcer.style.borderBottom=yr.bottom+"px solid transparent",yr.right&&yr.bottom?(gr.scrollbarFiller.style.display="block",gr.scrollbarFiller.style.height=yr.bottom+"px",gr.scrollbarFiller.style.width=yr.right+"px"):gr.scrollbarFiller.style.display="",yr.bottom&&rr.options.coverGutterNextToScrollbar&&rr.options.fixedGutter?(gr.gutterFiller.style.display="block",gr.gutterFiller.style.height=yr.bottom+"px",gr.gutterFiller.style.width=ur.gutterWidth+"px"):gr.gutterFiller.style.display=""}var wc={native:Bs,null:Vs};function Bl(rr){rr.display.scrollbars&&(rr.display.scrollbars.clear(),rr.display.scrollbars.addClass&&dr(rr.display.wrapper,rr.display.scrollbars.addClass)),rr.display.scrollbars=new wc[rr.options.scrollbarStyle](function(ur){rr.display.wrapper.insertBefore(ur,rr.display.scrollbarFiller),ra(ur,"mousedown",function(){rr.state.focused&&setTimeout(function(){return rr.display.input.focus()},0)}),ur.setAttribute("cm-not-content","true")},function(ur,gr){gr=="horizontal"?ks(rr,ur):ps(rr,ur)},rr),rr.display.scrollbars.addClass&&Rr(rr.display.wrapper,rr.display.scrollbars.addClass)}var fc=0;function Cc(rr){rr.curOp={cm:rr,viewChanged:!1,startHeight:rr.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++fc,markArrays:null},a0(rr.curOp)}function Rc(rr){var ur=rr.curOp;ur&&o0(ur,function(gr){for(var yr=0;yr