(self.webpackChunk=self.webpackChunk||[]).push([["easymde"],{"./node_modules/codemirror-spell-checker/src/js/spell-checker.js":function(ct,_e,ye){"use strict";var W=ye("./node_modules/typo-js/typo.js");function Q(B){if(B=B||{},typeof B.codeMirrorInstance!="function"||typeof B.codeMirrorInstance.defineMode!="function"){console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`");return}String.prototype.includes||(String.prototype.includes=function(){"use strict";return String.prototype.indexOf.apply(this,arguments)!==-1}),B.codeMirrorInstance.defineMode("spell-checker",function(R){if(!Q.aff_loading){Q.aff_loading=!0;var L=new XMLHttpRequest;L.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),L.onload=function(){L.readyState===4&&L.status===200&&(Q.aff_data=L.responseText,Q.num_loaded++,Q.num_loaded==2&&(Q.typo=new W("en_US",Q.aff_data,Q.dic_data,{platform:"any"})))},L.send(null)}if(!Q.dic_loading){Q.dic_loading=!0;var A=new XMLHttpRequest;A.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),A.onload=function(){A.readyState===4&&A.status===200&&(Q.dic_data=A.responseText,Q.num_loaded++,Q.num_loaded==2&&(Q.typo=new W("en_US",Q.aff_data,Q.dic_data,{platform:"any"})))},A.send(null)}var N='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',Y={token:function(G){var P=G.peek(),oe="";if(N.includes(P))return G.next(),null;for(;(P=G.peek())!=null&&!N.includes(P);)oe+=P,G.next();return Q.typo&&!Q.typo.check(oe)?"spell-error":null}},V=B.codeMirrorInstance.getMode(R,R.backdrop||"text/plain");return B.codeMirrorInstance.overlayMode(V,Y,!0)})}Q.num_loaded=0,Q.aff_loading=!1,Q.dic_loading=!1,Q.aff_data="",Q.dic_data="",Q.typo,ct.exports=Q},"./node_modules/codemirror/addon/display/autorefresh.js":function(ct,_e,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";W.defineOption("autoRefresh",!1,function(R,L){R.state.autoRefresh&&(B(R,R.state.autoRefresh),R.state.autoRefresh=null),L&&R.display.wrapper.offsetHeight==0&&Q(R,R.state.autoRefresh={delay:L.delay||250})});function Q(R,L){function A(){R.display.wrapper.offsetHeight?(B(R,L),R.display.lastWrapHeight!=R.display.wrapper.clientHeight&&R.refresh()):L.timeout=setTimeout(A,L.delay)}L.timeout=setTimeout(A,L.delay),L.hurry=function(){clearTimeout(L.timeout),L.timeout=setTimeout(A,50)},W.on(window,"mouseup",L.hurry),W.on(window,"keyup",L.hurry)}function B(R,L){clearTimeout(L.timeout),W.off(window,"mouseup",L.hurry),W.off(window,"keyup",L.hurry)}})},"./node_modules/codemirror/addon/display/fullscreen.js":function(ct,_e,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";W.defineOption("fullScreen",!1,function(R,L,A){A==W.Init&&(A=!1),!A!=!L&&(L?Q(R):B(R))});function Q(R){var L=R.getWrapperElement();R.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:L.style.width,height:L.style.height},L.style.width="",L.style.height="auto",L.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",R.refresh()}function B(R){var L=R.getWrapperElement();L.className=L.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var A=R.state.fullScreenRestore;L.style.width=A.width,L.style.height=A.height,window.scrollTo(A.scrollLeft,A.scrollTop),R.refresh()}})},"./node_modules/codemirror/addon/display/placeholder.js":function(ct,_e,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){W.defineOption("placeholder","",function(Y,V,G){var P=G&&G!=W.Init;if(V&&!P)Y.on("blur",L),Y.on("change",A),Y.on("swapDoc",A),W.on(Y.getInputField(),"compositionupdate",Y.state.placeholderCompose=function(){R(Y)}),A(Y);else if(!V&&P){Y.off("blur",L),Y.off("change",A),Y.off("swapDoc",A),W.off(Y.getInputField(),"compositionupdate",Y.state.placeholderCompose),Q(Y);var oe=Y.getWrapperElement();oe.className=oe.className.replace(" CodeMirror-empty","")}V&&!Y.hasFocus()&&L(Y)});function Q(Y){Y.state.placeholder&&(Y.state.placeholder.parentNode.removeChild(Y.state.placeholder),Y.state.placeholder=null)}function B(Y){Q(Y);var V=Y.state.placeholder=document.createElement("pre");V.style.cssText="height: 0; overflow: visible",V.style.direction=Y.getOption("direction"),V.className="CodeMirror-placeholder CodeMirror-line-like";var G=Y.getOption("placeholder");typeof G=="string"&&(G=document.createTextNode(G)),V.appendChild(G),Y.display.lineSpace.insertBefore(V,Y.display.lineSpace.firstChild)}function R(Y){setTimeout(function(){var V=!1;if(Y.lineCount()==1){var G=Y.getInputField();V=G.nodeName=="TEXTAREA"?!Y.getLine(0).length:!/[^\u200b]/.test(G.querySelector(".CodeMirror-line").textContent)}V?B(Y):Q(Y)},20)}function L(Y){N(Y)&&B(Y)}function A(Y){var V=Y.getWrapperElement(),G=N(Y);V.className=V.className.replace(" CodeMirror-empty","")+(G?" CodeMirror-empty":""),G?B(Y):Q(Y)}function N(Y){return Y.lineCount()===1&&Y.getLine(0)===""}})},"./node_modules/codemirror/addon/edit/continuelist.js":function(ct,_e,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";var Q=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,B=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,R=/[*+-]\s/;W.commands.newlineAndIndentContinueMarkdownList=function(A){if(A.getOption("disableInput"))return W.Pass;for(var N=A.listSelections(),Y=[],V=0;V<N.length;V++){var G=N[V].head,P=A.getStateAfter(G.line),oe=W.innerMode(A.getMode(),P);if(oe.mode.name!=="markdown"&&oe.mode.helperType!=="markdown"){A.execCommand("newlineAndIndent");return}else P=oe.state;var pe=P.list!==!1,Ee=P.quote!==0,me=A.getLine(G.line),be=Q.exec(me),H=/^\s*$/.test(me.slice(0,G.ch));if(!N[V].empty()||!pe&&!Ee||!be||H){A.execCommand("newlineAndIndent");return}if(B.test(me)){var U=Ee&&/>\s*$/.test(me),j=!/>\s*$/.test(me);(U||j)&&A.replaceRange("",{line:G.line,ch:0},{line:G.line,ch:G.ch+1}),Y[V]=`
`}else{var te=be[1],X=be[5],ue=!(R.test(be[2])||be[2].indexOf(">")>=0),ie=ue?parseInt(be[3],10)+1+be[4]:be[2].replace("x"," ");Y[V]=`
`+te+ie+X,ue&&L(A,G)}}A.replaceSelections(Y)};function L(A,N){var Y=N.line,V=0,G=0,P=Q.exec(A.getLine(Y)),oe=P[1];do{V+=1;var pe=Y+V,Ee=A.getLine(pe),me=Q.exec(Ee);if(me){var be=me[1],H=parseInt(P[3],10)+V-G,U=parseInt(me[3],10),j=U;if(oe===be&&!isNaN(U))H===U&&(j=U+1),H>U&&(j=H+1),A.replaceRange(Ee.replace(Q,be+j+me[4]+me[5]),{line:pe,ch:0},{line:pe,ch:Ee.length});else{if(oe.length>be.length||oe.length<be.length&&V===1)return;G+=1}}}while(me)}})},"./node_modules/codemirror/addon/mode/overlay.js":function(ct,_e,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";W.overlayMode=function(Q,B,R){return{startState:function(){return{base:W.startState(Q),overlay:W.startState(B),basePos:0,baseCur:null,overlayPos:0,overlayCur:null,streamSeen:null}},copyState:function(L){return{base:W.copyState(Q,L.base),overlay:W.copyState(B,L.overlay),basePos:L.basePos,baseCur:null,overlayPos:L.overlayPos,overlayCur:null}},token:function(L,A){return(L!=A.streamSeen||Math.min(A.basePos,A.overlayPos)<L.start)&&(A.streamSeen=L,A.basePos=A.overlayPos=L.start),L.start==A.basePos&&(A.baseCur=Q.token(L,A.base),A.basePos=L.pos),L.start==A.overlayPos&&(L.pos=L.start,A.overlayCur=B.token(L,A.overlay),A.overlayPos=L.pos),L.pos=Math.min(A.basePos,A.overlayPos),A.overlayCur==null?A.baseCur:A.baseCur!=null&&A.overlay.combineTokens||R&&A.overlay.combineTokens==null?A.baseCur+" "+A.overlayCur:A.overlayCur},indent:Q.indent&&function(L,A,N){return Q.indent(L.base,A,N)},electricChars:Q.electricChars,innerMode:function(L){return{state:L.base,mode:Q}},blankLine:function(L){var A,N;return Q.blankLine&&(A=Q.blankLine(L.base)),B.blankLine&&(N=B.blankLine(L.overlay)),N==null?A:R&&A!=null?A+" "+N:N}}}})},"./node_modules/codemirror/addon/search/searchcursor.js":function(ct,_e,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";var Q=W.Pos;function B(H){var U=H.flags;return U??(H.ignoreCase?"i":"")+(H.global?"g":"")+(H.multiline?"m":"")}function R(H,U){for(var j=B(H),te=j,X=0;X<U.length;X++)te.indexOf(U.charAt(X))==-1&&(te+=U.charAt(X));return j==te?H:new RegExp(H.source,te)}function L(H){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(H.source)}function A(H,U,j){U=R(U,"g");for(var te=j.line,X=j.ch,ue=H.lastLine();te<=ue;te++,X=0){U.lastIndex=X;var ie=H.getLine(te),ge=U.exec(ie);if(ge)return{from:Q(te,ge.index),to:Q(te,ge.index+ge[0].length),match:ge}}}function N(H,U,j){if(!L(U))return A(H,U,j);U=R(U,"gm");for(var te,X=1,ue=j.line,ie=H.lastLine();ue<=ie;){for(var ge=0;ge<X&&!(ue>ie);ge++){var Te=H.getLine(ue++);te=te==null?Te:te+`
`+Te}X=X*2,U.lastIndex=j.ch;var Z=U.exec(te);if(Z){var Ae=te.slice(0,Z.index).split(`
`),J=Z[0].split(`
`),Re=j.line+Ae.length-1,_=Ae[Ae.length-1].length;return{from:Q(Re,_),to:Q(Re+J.length-1,J.length==1?_+J[0].length:J[J.length-1].length),match:Z}}}}function Y(H,U,j){for(var te,X=0;X<=H.length;){U.lastIndex=X;var ue=U.exec(H);if(!ue)break;var ie=ue.index+ue[0].length;if(ie>H.length-j)break;(!te||ie>te.index+te[0].length)&&(te=ue),X=ue.index+1}return te}function V(H,U,j){U=R(U,"g");for(var te=j.line,X=j.ch,ue=H.firstLine();te>=ue;te--,X=-1){var ie=H.getLine(te),ge=Y(ie,U,X<0?0:ie.length-X);if(ge)return{from:Q(te,ge.index),to:Q(te,ge.index+ge[0].length),match:ge}}}function G(H,U,j){if(!L(U))return V(H,U,j);U=R(U,"gm");for(var te,X=1,ue=H.getLine(j.line).length-j.ch,ie=j.line,ge=H.firstLine();ie>=ge;){for(var Te=0;Te<X&&ie>=ge;Te++){var Z=H.getLine(ie--);te=te==null?Z:Z+`
`+te}X*=2;var Ae=Y(te,U,ue);if(Ae){var J=te.slice(0,Ae.index).split(`
`),Re=Ae[0].split(`
`),_=ie+J.length,le=J[J.length-1].length;return{from:Q(_,le),to:Q(_+Re.length-1,Re.length==1?le+Re[0].length:Re[Re.length-1].length),match:Ae}}}}var P,oe;String.prototype.normalize?(P=function(H){return H.normalize("NFD").toLowerCase()},oe=function(H){return H.normalize("NFD")}):(P=function(H){return H.toLowerCase()},oe=function(H){return H});function pe(H,U,j,te){if(H.length==U.length)return j;for(var X=0,ue=j+Math.max(0,H.length-U.length);;){if(X==ue)return X;var ie=X+ue>>1,ge=te(H.slice(0,ie)).length;if(ge==j)return ie;ge>j?ue=ie:X=ie+1}}function Ee(H,U,j,te){if(!U.length)return null;var X=te?P:oe,ue=X(U).split(/\r|\n\r?/);e:for(var ie=j.line,ge=j.ch,Te=H.lastLine()+1-ue.length;ie<=Te;ie++,ge=0){var Z=H.getLine(ie).slice(ge),Ae=X(Z);if(ue.length==1){var J=Ae.indexOf(ue[0]);if(J==-1)continue e;var j=pe(Z,Ae,J,X)+ge;return{from:Q(ie,pe(Z,Ae,J,X)+ge),to:Q(ie,pe(Z,Ae,J+ue[0].length,X)+ge)}}else{var Re=Ae.length-ue[0].length;if(Ae.slice(Re)!=ue[0])continue e;for(var _=1;_<ue.length-1;_++)if(X(H.getLine(ie+_))!=ue[_])continue e;var le=H.getLine(ie+ue.length-1),$=X(le),Ce=ue[ue.length-1];if($.slice(0,Ce.length)!=Ce)continue e;return{from:Q(ie,pe(Z,Ae,Re,X)+ge),to:Q(ie+ue.length-1,pe(le,$,Ce.length,X))}}}}function me(H,U,j,te){if(!U.length)return null;var X=te?P:oe,ue=X(U).split(/\r|\n\r?/);e:for(var ie=j.line,ge=j.ch,Te=H.firstLine()-1+ue.length;ie>=Te;ie--,ge=-1){var Z=H.getLine(ie);ge>-1&&(Z=Z.slice(0,ge));var Ae=X(Z);if(ue.length==1){var J=Ae.lastIndexOf(ue[0]);if(J==-1)continue e;return{from:Q(ie,pe(Z,Ae,J,X)),to:Q(ie,pe(Z,Ae,J+ue[0].length,X))}}else{var Re=ue[ue.length-1];if(Ae.slice(0,Re.length)!=Re)continue e;for(var _=1,j=ie-ue.length+1;_<ue.length-1;_++)if(X(H.getLine(j+_))!=ue[_])continue e;var le=H.getLine(ie+1-ue.length),$=X(le);if($.slice($.length-ue[0].length)!=ue[0])continue e;return{from:Q(ie+1-ue.length,pe(le,$,le.length-ue[0].length,X)),to:Q(ie,pe(Z,Ae,Re.length,X))}}}}function be(H,U,j,te){this.atOccurrence=!1,this.afterEmptyMatch=!1,this.doc=H,j=j?H.clipPos(j):Q(0,0),this.pos={from:j,to:j};var X;typeof te=="object"?X=te.caseFold:(X=te,te=null),typeof U=="string"?(X==null&&(X=!1),this.matches=function(ue,ie){return(ue?me:Ee)(H,U,ie,X)}):(U=R(U,"gm"),!te||te.multiline!==!1?this.matches=function(ue,ie){return(ue?G:N)(H,U,ie)}:this.matches=function(ue,ie){return(ue?V:A)(H,U,ie)})}be.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(H){var U=this.doc.clipPos(H?this.pos.from:this.pos.to);if(this.afterEmptyMatch&&this.atOccurrence&&(U=Q(U.line,U.ch),H?(U.ch--,U.ch<0&&(U.line--,U.ch=(this.doc.getLine(U.line)||"").length)):(U.ch++,U.ch>(this.doc.getLine(U.line)||"").length&&(U.ch=0,U.line++)),W.cmpPos(U,this.doc.clipPos(U))!=0))return this.atOccurrence=!1;var j=this.matches(H,U);if(this.afterEmptyMatch=j&&W.cmpPos(j.from,j.to)==0,j)return this.pos=j,this.atOccurrence=!0,this.pos.match||!0;var te=Q(H?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:te,to:te},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(H,U){if(this.atOccurrence){var j=W.splitLines(H);this.doc.replaceRange(j,this.pos.from,this.pos.to,U),this.pos.to=Q(this.pos.from.line+j.length-1,j[j.length-1].length+(j.length==1?this.pos.from.ch:0))}}},W.defineExtension("getSearchCursor",function(H,U,j){return new be(this.doc,H,U,j)}),W.defineDocExtension("getSearchCursor",function(H,U,j){return new be(this,H,U,j)}),W.defineExtension("selectMatches",function(H,U){for(var j=[],te=this.getSearchCursor(H,this.getCursor("from"),U);te.findNext()&&!(W.cmpPos(te.to(),this.getCursor("to"))>0);)j.push({anchor:te.from(),head:te.to()});j.length&&this.setSelections(j,0)})})},"./node_modules/codemirror/addon/selection/mark-selection.js":function(ct,_e,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";W.defineOption("styleSelectedText",!1,function(P,oe,pe){var Ee=pe&&pe!=W.Init;oe&&!Ee?(P.state.markedSelection=[],P.state.markedSelectionStyle=typeof oe=="string"?oe:"CodeMirror-selectedtext",V(P),P.on("cursorActivity",Q),P.on("change",B)):!oe&&Ee&&(P.off("cursorActivity",Q),P.off("change",B),Y(P),P.state.markedSelection=P.state.markedSelectionStyle=null)});function Q(P){P.state.markedSelection&&P.operation(function(){G(P)})}function B(P){P.state.markedSelection&&P.state.markedSelection.length&&P.operation(function(){Y(P)})}var R=8,L=W.Pos,A=W.cmpPos;function N(P,oe,pe,Ee){if(A(oe,pe)!=0)for(var me=P.state.markedSelection,be=P.state.markedSelectionStyle,H=oe.line;;){var U=H==oe.line?oe:L(H,0),j=H+R,te=j>=pe.line,X=te?pe:L(j,0),ue=P.markText(U,X,{className:be});if(Ee==null?me.push(ue):me.splice(Ee++,0,ue),te)break;H=j}}function Y(P){for(var oe=P.state.markedSelection,pe=0;pe<oe.length;++pe)oe[pe].clear();oe.length=0}function V(P){Y(P);for(var oe=P.listSelections(),pe=0;pe<oe.length;pe++)N(P,oe[pe].from(),oe[pe].to())}function G(P){if(!P.somethingSelected())return Y(P);if(P.listSelections().length>1)return V(P);var oe=P.getCursor("start"),pe=P.getCursor("end"),Ee=P.state.markedSelection;if(!Ee.length)return N(P,oe,pe);var me=Ee[0].find(),be=Ee[Ee.length-1].find();if(!me||!be||pe.line-oe.line<=R||A(oe,be.to)>=0||A(pe,me.from)<=0)return V(P);for(;A(oe,me.from)>0;)Ee.shift().clear(),me=Ee[0].find();for(A(oe,me.from)<0&&(me.to.line-oe.line<R?(Ee.shift().clear(),N(P,oe,me.to,0)):N(P,oe,me.from,0));A(pe,be.to)<0;)Ee.pop().clear(),be=Ee[Ee.length-1].find();A(pe,be.to)>0&&(pe.line-be.from.line<R?(Ee.pop().clear(),N(P,be.from,pe)):N(P,be.to,pe))}})},"./node_modules/codemirror/lib/codemirror.js":function(ct){(function(_e,ye){ct.exports=ye()})(this,function(){"use strict";var _e=navigator.userAgent,ye=navigator.platform,W=/gecko\/\d/i.test(_e),Q=/MSIE \d/.test(_e),B=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(_e),R=/Edge\/(\d+)/.exec(_e),L=Q||B||R,A=L&&(Q?document.documentMode||6:+(R||B)[1]),N=!R&&/WebKit\//.test(_e),Y=N&&/Qt\/\d+\.\d+/.test(_e),V=!R&&/Chrome\/(\d+)/.exec(_e),G=V&&+V[1],P=/Opera\//.test(_e),oe=/Apple Computer/.test(navigator.vendor),pe=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(_e),Ee=/PhantomJS/.test(_e),me=oe&&(/Mobile\/\w+/.test(_e)||navigator.maxTouchPoints>2),be=/Android/.test(_e),H=me||be||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(_e),U=me||/Mac/.test(ye),j=/\bCrOS\b/.test(_e),te=/win/i.test(ye),X=P&&_e.match(/Version\/(\d*\.\d*)/);X&&(X=Number(X[1])),X&&X>=15&&(P=!1,N=!0);var ue=U&&(Y||P&&(X==null||X<12.11)),ie=W||L&&A>=9;function ge(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Te=function(e,t){var i=e.className,r=ge(t).exec(i);if(r){var n=i.slice(r.index+r[0].length);e.className=i.slice(0,r.index)+(n?r[1]+n:"")}};function Z(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function Ae(e,t){return Z(e).appendChild(t)}function J(e,t,i,r){var n=document.createElement(e);if(i&&(n.className=i),r&&(n.style.cssText=r),typeof t=="string")n.appendChild(document.createTextNode(t));else if(t)for(var a=0;a<t.length;++a)n.appendChild(t[a]);return n}function Re(e,t,i,r){var n=J(e,t,i,r);return n.setAttribute("role","presentation"),n}var _;document.createRange?_=function(e,t,i,r){var n=document.createRange();return n.setEnd(r||e,i),n.setStart(e,t),n}:_=function(e,t,i){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd("character",i),r.moveStart("character",t),r};function le(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function $(e){var t=e.ownerDocument||e,i;try{i=e.activeElement}catch{i=t.body||null}for(;i&&i.shadowRoot&&i.shadowRoot.activeElement;)i=i.shadowRoot.activeElement;return i}function Ce(e,t){var i=e.className;ge(t).test(i)||(e.className+=(i?" ":"")+t)}function Je(e,t){for(var i=e.split(" "),r=0;r<i.length;r++)i[r]&&!ge(i[r]).test(t)&&(t+=" "+i[r]);return t}var at=function(e){e.select()};me?at=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:L&&(at=function(e){try{e.select()}catch{}});function kt(e){return e.display.wrapper.ownerDocument}function k(e){return h(e.display.wrapper)}function h(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function K(e){return kt(e).defaultView}function ne(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Le(e,t,i){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(i!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function Ge(e,t,i,r,n){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var a=r||0,o=n||0;;){var u=e.indexOf(" ",a);if(u<0||u>=t)return o+(t-a);o+=u-a,o+=i-o%i,a=u+1}}var Qe=function(){this.id=null,this.f=null,this.time=0,this.handler=ne(this.onTimeout,this)};Qe.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},Qe.prototype.set=function(e,t){this.f=t;var i=+new Date+e;(!this.id||i<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=i)};function je(e,t){for(var i=0;i<e.length;++i)if(e[i]==t)return i;return-1}var ot=50,lt={toString:function(){return"CodeMirror.Pass"}},Ie={scroll:!1},qe={origin:"*mouse"},wt={origin:"+move"};function jt(e,t,i){for(var r=0,n=0;;){var a=e.indexOf(" ",r);a==-1&&(a=e.length);var o=a-r;if(a==e.length||n+o>=t)return r+Math.min(o,t-n);if(n+=a-r,n+=i-n%i,r=a+1,n>=t)return r}}var De=[""];function Nt(e){for(;De.length<=e;)De.push(Oe(De)+" ");return De[e]}function Oe(e){return e[e.length-1]}function It(e,t){for(var i=[],r=0;r<e.length;r++)i[r]=t(e[r],r);return i}function xt(e,t,i){for(var r=0,n=i(t);r<e.length&&i(e[r])<=n;)r++;e.splice(r,0,t)}function Ot(){}function Pe(e,t){var i;return Object.create?i=Object.create(e):(Ot.prototype=e,i=new Ot),t&&Le(t,i),i}var zt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function xr(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||zt.test(e))}function I(e,t){return t?t.source.indexOf("\\w")>-1&&xr(e)?!0:t.test(e):xr(e)}function O(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var T=/[\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 c(e){return e.charCodeAt(0)>=768&&T.test(e)}function p(e,t,i){for(;(i<0?t>0:t<e.length)&&c(e.charAt(t));)t+=i;return t}function g(e,t,i){for(var r=t>i?-1:1;;){if(t==i)return t;var n=(t+i)/2,a=r<0?Math.ceil(n):Math.floor(n);if(a==t)return e(a)?t:i;e(a)?i=a:t=a+r}}function D(e,t,i,r){if(!e)return r(t,i,"ltr",0);for(var n=!1,a=0;a<e.length;++a){var o=e[a];(o.from<i&&o.to>t||t==i&&o.to==t)&&(r(Math.max(o.from,t),Math.min(o.to,i),o.level==1?"rtl":"ltr",a),n=!0)}n||r(t,i,"ltr")}var l=null;function d(e,t,i){var r;l=null;for(var n=0;n<e.length;++n){var a=e[n];if(a.from<t&&a.to>t)return n;a.to==t&&(a.from!=a.to&&i=="before"?r=n:l=n),a.from==t&&(a.from!=a.to&&i!="before"?r=n:l=n)}return r??l}var m=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function i(f){return f<=247?e.charAt(f):1424<=f&&f<=1524?"R":1536<=f&&f<=1785?t.charAt(f-1536):1774<=f&&f<=2220?"r":8192<=f&&f<=8203?"w":f==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,a=/[LRr]/,o=/[Lb1n]/,u=/[1n]/;function s(f,v,x){this.level=f,this.from=v,this.to=x}return function(f,v){var x=v=="ltr"?"L":"R";if(f.length==0||v=="ltr"&&!r.test(f))return!1;for(var M=f.length,E=[],z=0;z<M;++z)E.push(i(f.charCodeAt(z)));for(var q=0,ae=x;q<M;++q){var se=E[q];se=="m"?E[q]=ae:ae=se}for(var de=0,fe=x;de<M;++de){var ve=E[de];ve=="1"&&fe=="r"?E[de]="n":a.test(ve)&&(fe=ve,ve=="r"&&(E[de]="R"))}for(var Fe=1,Se=E[0];Fe<M-1;++Fe){var He=E[Fe];He=="+"&&Se=="1"&&E[Fe+1]=="1"?E[Fe]="1":He==","&&Se==E[Fe+1]&&(Se=="1"||Se=="n")&&(E[Fe]=Se),Se=He}for(var Ze=0;Ze<M;++Ze){var vt=E[Ze];if(vt==",")E[Ze]="N";else if(vt=="%"){var tt=void 0;for(tt=Ze+1;tt<M&&E[tt]=="%";++tt);for(var Rt=Ze&&E[Ze-1]=="!"||tt<M&&E[tt]=="1"?"1":"N",Tt=Ze;Tt<tt;++Tt)E[Tt]=Rt;Ze=tt-1}}for(var st=0,Bt=x;st<M;++st){var Dt=E[st];Bt=="L"&&Dt=="1"?E[st]="L":a.test(Dt)&&(Bt=Dt)}for(var ht=0;ht<M;++ht)if(n.test(E[ht])){var ft=void 0;for(ft=ht+1;ft<M&&n.test(E[ft]);++ft);for(var it=(ht?E[ht-1]:x)=="L",Mt=(ft<M?E[ft]:x)=="L",$r=it==Mt?it?"L":"R":x,mr=ht;mr<ft;++mr)E[mr]=$r;ht=ft-1}for(var Ct=[],er,mt=0;mt<M;)if(o.test(E[mt])){var la=mt;for(++mt;mt<M&&o.test(E[mt]);++mt);Ct.push(new s(0,la,mt))}else{var lr=mt,Tr=Ct.length,Br=v=="rtl"?1:0;for(++mt;mt<M&&E[mt]!="L";++mt);for(var Ft=lr;Ft<mt;)if(u.test(E[Ft])){lr<Ft&&(Ct.splice(Tr,0,new s(1,lr,Ft)),Tr+=Br);var Vr=Ft;for(++Ft;Ft<mt&&u.test(E[Ft]);++Ft);Ct.splice(Tr,0,new s(2,Vr,Ft)),Tr+=Br,lr=Ft}else++Ft;lr<mt&&Ct.splice(Tr,0,new s(1,lr,mt))}return v=="ltr"&&(Ct[0].level==1&&(er=f.match(/^\s+/))&&(Ct[0].from=er[0].length,Ct.unshift(new s(0,0,er[0].length))),Oe(Ct).level==1&&(er=f.match(/\s+$/))&&(Oe(Ct).to-=er[0].length,Ct.push(new s(0,M-er[0].length,M)))),v=="rtl"?Ct.reverse():Ct}}();function y(e,t){var i=e.order;return i==null&&(i=e.order=m(e.text,t)),i}var F=[],S=function(e,t,i){if(e.addEventListener)e.addEventListener(t,i,!1);else if(e.attachEvent)e.attachEvent("on"+t,i);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||F).concat(i)}};function b(e,t){return e._handlers&&e._handlers[t]||F}function w(e,t,i){if(e.removeEventListener)e.removeEventListener(t,i,!1);else if(e.detachEvent)e.detachEvent("on"+t,i);else{var r=e._handlers,n=r&&r[t];if(n){var a=je(n,i);a>-1&&(r[t]=n.slice(0,a).concat(n.slice(a+1)))}}}function C(e,t){var i=b(e,t);if(i.length)for(var r=Array.prototype.slice.call(arguments,2),n=0;n<i.length;++n)i[n].apply(null,r)}function ee(e,t,i){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),C(e,i||t.type,e,t),Ue(t)||t.codemirrorIgnore}function he(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var i=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)je(i,t[r])==-1&&i.push(t[r])}function ke(e,t){return b(e,t).length>0}function xe(e){e.prototype.on=function(t,i){S(this,t,i)},e.prototype.off=function(t,i){w(this,t,i)}}function ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function We(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ue(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Be(e){ce(e),We(e)}function ze(e){return e.target||e.srcElement}function $e(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),U&&e.ctrlKey&&t==1&&(t=3),t}var Ve=function(){if(L&&A<9)return!1;var e=J("div");return"draggable"in e||"dragDrop"in e}(),At;function yt(e){if(At==null){var t=J("span","\u200B");Ae(e,J("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(At=t.offsetWidth<=1&&t.offsetHeight>2&&!(L&&A<8))}var i=At?J("span","\u200B"):J("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}var Wt;function Mr(e){if(Wt!=null)return Wt;var t=Ae(e,document.createTextNode("A\u062EA")),i=_(t,0,1).getBoundingClientRect(),r=_(t,1,2).getBoundingClientRect();return Z(e),!i||i.left==i.right?!1:Wt=r.right-i.right<3}var Nr=`
b`.split(/\n/).length!=3?function(e){for(var t=0,i=[],r=e.length;t<=r;){var n=e.indexOf(`
`,t);n==-1&&(n=e.length);var a=e.slice(t,e.charAt(n-1)=="\r"?n-1:n),o=a.indexOf("\r");o!=-1?(i.push(a.slice(0,o)),t+=o+1):(i.push(a),t=n+1)}return i}:function(e){return e.split(/\r\n?|\n/)},Li=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},fn=function(){var e=J("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),yr=null;function cn(e){if(yr!=null)return yr;var t=Ae(e,J("span","x")),i=t.getBoundingClientRect(),r=_(t,0,1).getBoundingClientRect();return yr=Math.abs(i.left-r.left)>1}var ei={},rt={};function ur(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),ei[e]=t}function qt(e,t){rt[e]=t}function Ht(e){if(typeof e=="string"&&rt.hasOwnProperty(e))e=rt[e];else if(e&&typeof e.name=="string"&&rt.hasOwnProperty(e.name)){var t=rt[e.name];typeof t=="string"&&(t={name:t}),e=Pe(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ht("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ht("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Gt(e,t){t=Ht(t);var i=ei[t.name];if(!i)return Gt(e,"text/plain");var r=i(e,t);if(Ut.hasOwnProperty(t.name)){var n=Ut[t.name];for(var a in n)n.hasOwnProperty(a)&&(r.hasOwnProperty(a)&&(r["_"+a]=r[a]),r[a]=n[a])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var o in t.modeProps)r[o]=t.modeProps[o];return r}var Ut={};function Ti(e,t){var i=Ut.hasOwnProperty(e)?Ut[e]:Ut[e]={};Le(t,i)}function tr(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var i={};for(var r in t){var n=t[r];n instanceof Array&&(n=n.concat([])),i[r]=n}return i}function Ir(e,t){for(var i;e.innerMode&&(i=e.innerMode(t),!(!i||i.mode==e));)t=i.state,e=i.mode;return i||{mode:e,state:t}}function sa(e,t,i){return e.startState?e.startState(t,i):!0}var ut=function(e,t,i){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=i};ut.prototype.eol=function(){return this.pos>=this.string.length},ut.prototype.sol=function(){return this.pos==this.lineStart},ut.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ut.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ut.prototype.eat=function(e){var t=this.string.charAt(this.pos),i;if(typeof e=="string"?i=t==e:i=t&&(e.test?e.test(t):e(t)),i)return++this.pos,t},ut.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},ut.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},ut.prototype.skipToEnd=function(){this.pos=this.string.length},ut.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},ut.prototype.backUp=function(e){this.pos-=e},ut.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ge(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ge(this.string,this.lineStart,this.tabSize):0)},ut.prototype.indentation=function(){return Ge(this.string,null,this.tabSize)-(this.lineStart?Ge(this.string,this.lineStart,this.tabSize):0)},ut.prototype.match=function(e,t,i){if(typeof e=="string"){var r=function(o){return i?o.toLowerCase():o},n=this.string.substr(this.pos,e.length);if(r(n)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var a=this.string.slice(this.pos).match(e);return a&&a.index>0?null:(a&&t!==!1&&(this.pos+=a[0].length),a)}},ut.prototype.current=function(){return this.string.slice(this.start,this.pos)},ut.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},ut.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},ut.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function we(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var i=e;!i.lines;)for(var r=0;;++r){var n=i.children[r],a=n.chunkSize();if(t<a){i=n;break}t-=a}return i.lines[t]}function Dr(e,t,i){var r=[],n=t.line;return e.iter(t.line,i.line+1,function(a){var o=a.text;n==i.line&&(o=o.slice(0,i.ch)),n==t.line&&(o=o.slice(t.ch)),r.push(o),++n}),r}function hn(e,t,i){var r=[];return e.iter(t,i,function(n){r.push(n.text)}),r}function Qt(e,t){var i=t-e.height;if(i)for(var r=e;r;r=r.parent)r.height+=i}function Xe(e){if(e.parent==null)return null;for(var t=e.parent,i=je(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var n=0;r.children[n]!=t;++n)i+=r.children[n].chunkSize();return i+t.first}function br(e,t){var i=e.first;e:do{for(var r=0;r<e.children.length;++r){var n=e.children[r],a=n.height;if(t<a){e=n;continue e}t-=a,i+=n.chunkSize()}return i}while(!e.lines);for(var o=0;o<e.lines.length;++o){var u=e.lines[o],s=u.height;if(t<s)break;t-=s}return i+o}function ti(e,t){return t>=e.first&&t<e.first+e.size}function dn(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function re(e,t,i){if(i===void 0&&(i=null),!(this instanceof re))return new re(e,t,i);this.line=e,this.ch=t,this.sticky=i}function Me(e,t){return e.line-t.line||e.ch-t.ch}function pn(e,t){return e.sticky==t.sticky&&Me(e,t)==0}function gn(e){return re(e.line,e.ch)}function Bi(e,t){return Me(e,t)<0?t:e}function Mi(e,t){return Me(e,t)<0?e:t}function fa(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Ne(e,t){if(t.line<e.first)return re(e.first,0);var i=e.first+e.size-1;return t.line>i?re(i,we(e,i).text.length):fl(t,we(e,t.line).text.length)}function fl(e,t){var i=e.ch;return i==null||i>t?re(e.line,t):i<0?re(e.line,0):e}function ca(e,t){for(var i=[],r=0;r<t.length;r++)i[r]=Ne(e,t[r]);return i}var Ni=function(e,t){this.state=e,this.lookAhead=t},Jt=function(e,t,i,r){this.state=t,this.doc=e,this.line=i,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};Jt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Jt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Jt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Jt.fromSaved=function(e,t,i){return t instanceof Ni?new Jt(e,tr(e.mode,t.state),i,t.lookAhead):new Jt(e,tr(e.mode,t),i)},Jt.prototype.save=function(e){var t=e!==!1?tr(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ni(t,this.maxLookAhead):t};function ha(e,t,i,r){var n=[e.state.modeGen],a={};xa(e,t.text,e.doc.mode,i,function(f,v){return n.push(f,v)},a,r);for(var o=i.state,u=function(f){i.baseTokens=n;var v=e.state.overlays[f],x=1,M=0;i.state=!0,xa(e,t.text,v.mode,i,function(E,z){for(var q=x;M<E;){var ae=n[x];ae>E&&n.splice(x,1,E,n[x+1],ae),x+=2,M=Math.min(E,ae)}if(z)if(v.opaque)n.splice(q,x-q,E,"overlay "+z),x=q+2;else for(;q<x;q+=2){var se=n[q+1];n[q+1]=(se?se+" ":"")+"overlay "+z}},a),i.state=o,i.baseTokens=null,i.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)u(s);return{styles:n,classes:a.bgClass||a.textClass?a:null}}function da(e,t,i){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=ri(e,Xe(t)),n=t.text.length>e.options.maxHighlightLength&&tr(e.doc.mode,r.state),a=ha(e,t,r);n&&(r.state=n),t.stateAfter=r.save(!n),t.styles=a.styles,a.classes?t.styleClasses=a.classes:t.styleClasses&&(t.styleClasses=null),i===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function ri(e,t,i){var r=e.doc,n=e.display;if(!r.mode.startState)return new Jt(r,!0,t);var a=cl(e,t,i),o=a>r.first&&we(r,a-1).stateAfter,u=o?Jt.fromSaved(r,o,a):new Jt(r,sa(r.mode),a);return r.iter(a,t,function(s){vn(e,s.text,u);var f=u.line;s.stateAfter=f==t-1||f%5==0||f>=n.viewFrom&&f<n.viewTo?u.save():null,u.nextLine()}),i&&(r.modeFrontier=u.line),u}function vn(e,t,i,r){var n=e.doc.mode,a=new ut(t,e.options.tabSize,i);for(a.start=a.pos=r||0,t==""&&pa(n,i.state);!a.eol();)mn(n,a,i.state),a.start=a.pos}function pa(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var i=Ir(e,t);if(i.mode.blankLine)return i.mode.blankLine(i.state)}}function mn(e,t,i,r){for(var n=0;n<10;n++){r&&(r[0]=Ir(e,i).mode);var a=e.token(t,i);if(t.pos>t.start)return a}throw new Error("Mode "+e.name+" failed to advance stream.")}var ga=function(e,t,i){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=i};function va(e,t,i,r){var n=e.doc,a=n.mode,o;t=Ne(n,t);var u=we(n,t.line),s=ri(e,t.line,i),f=new ut(u.text,e.options.tabSize,s),v;for(r&&(v=[]);(r||f.pos<t.ch)&&!f.eol();)f.start=f.pos,o=mn(a,f,s.state),r&&v.push(new ga(f,o,tr(n.mode,s.state)));return r?v:new ga(f,o,s.state)}function ma(e,t){if(e)for(;;){var i=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i)break;e=e.slice(0,i.index)+e.slice(i.index+i[0].length);var r=i[1]?"bgClass":"textClass";t[r]==null?t[r]=i[2]:new RegExp("(?:^|\\s)"+i[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+i[2])}return e}function xa(e,t,i,r,n,a,o){var u=i.flattenSpans;u==null&&(u=e.options.flattenSpans);var s=0,f=null,v=new ut(t,e.options.tabSize,r),x,M=e.options.addModeClass&&[null];for(t==""&&ma(pa(i,r.state),a);!v.eol();){if(v.pos>e.options.maxHighlightLength?(u=!1,o&&vn(e,t,r,v.pos),v.pos=t.length,x=null):x=ma(mn(i,v,r.state,M),a),M){var E=M[0].name;E&&(x="m-"+(x?E+" "+x:E))}if(!u||f!=x){for(;s<v.start;)s=Math.min(v.start,s+5e3),n(s,f);f=x}v.start=v.pos}for(;s<v.pos;){var z=Math.min(v.pos,s+5e3);n(z,f),s=z}}function cl(e,t,i){for(var r,n,a=e.doc,o=i?-1:t-(e.doc.mode.innerMode?1e3:100),u=t;u>o;--u){if(u<=a.first)return a.first;var s=we(a,u-1),f=s.stateAfter;if(f&&(!i||u+(f instanceof Ni?f.lookAhead:0)<=a.modeFrontier))return u;var v=Ge(s.text,null,e.options.tabSize);(n==null||r>v)&&(n=u-1,r=v)}return n}function hl(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var i=e.first,r=t-1;r>i;r--){var n=we(e,r).stateAfter;if(n&&(!(n instanceof Ni)||r+n.lookAhead<t)){i=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,i)}}var ya=!1,rr=!1;function dl(){ya=!0}function pl(){rr=!0}function Ii(e,t,i){this.marker=e,this.from=t,this.to=i}function ii(e,t){if(e)for(var i=0;i<e.length;++i){var r=e[i];if(r.marker==t)return r}}function gl(e,t){for(var i,r=0;r<e.length;++r)e[r]!=t&&(i||(i=[])).push(e[r]);return i}function vl(e,t,i){var r=i&&window.WeakSet&&(i.markedSpans||(i.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function ml(e,t,i){var r;if(e)for(var n=0;n<e.length;++n){var a=e[n],o=a.marker,u=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);if(u||a.from==t&&o.type=="bookmark"&&(!i||!a.marker.insertLeft)){var s=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);(r||(r=[])).push(new Ii(o,a.from,s?null:a.to))}}return r}function xl(e,t,i){var r;if(e)for(var n=0;n<e.length;++n){var a=e[n],o=a.marker,u=a.to==null||(o.inclusiveRight?a.to>=t:a.to>t);if(u||a.from==t&&o.type=="bookmark"&&(!i||a.marker.insertLeft)){var s=a.from==null||(o.inclusiveLeft?a.from<=t:a.from<t);(r||(r=[])).push(new Ii(o,s?null:a.from-t,a.to==null?null:a.to-t))}}return r}function xn(e,t){if(t.full)return null;var i=ti(e,t.from.line)&&we(e,t.from.line).markedSpans,r=ti(e,t.to.line)&&we(e,t.to.line).markedSpans;if(!i&&!r)return null;var n=t.from.ch,a=t.to.ch,o=Me(t.from,t.to)==0,u=ml(i,n,o),s=xl(r,a,o),f=t.text.length==1,v=Oe(t.text).length+(f?n:0);if(u)for(var x=0;x<u.length;++x){var M=u[x];if(M.to==null){var E=ii(s,M.marker);E?f&&(M.to=E.to==null?null:E.to+v):M.to=n}}if(s)for(var z=0;z<s.length;++z){var q=s[z];if(q.to!=null&&(q.to+=v),q.from==null){var ae=ii(u,q.marker);ae||(q.from=v,f&&(u||(u=[])).push(q))}else q.from+=v,f&&(u||(u=[])).push(q)}u&&(u=Da(u)),s&&s!=u&&(s=Da(s));var se=[u];if(!f){var de=t.text.length-2,fe;if(de>0&&u)for(var ve=0;ve<u.length;++ve)u[ve].to==null&&(fe||(fe=[])).push(new Ii(u[ve].marker,null,null));for(var Fe=0;Fe<de;++Fe)se.push(fe);se.push(s)}return se}function Da(e){for(var t=0;t<e.length;++t){var i=e[t];i.from!=null&&i.from==i.to&&i.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function yl(e,t,i){var r=null;if(e.iter(t.line,i.line+1,function(E){if(E.markedSpans)for(var z=0;z<E.markedSpans.length;++z){var q=E.markedSpans[z].marker;q.readOnly&&(!r||je(r,q)==-1)&&(r||(r=[])).push(q)}}),!r)return null;for(var n=[{from:t,to:i}],a=0;a<r.length;++a)for(var o=r[a],u=o.find(0),s=0;s<n.length;++s){var f=n[s];if(!(Me(f.to,u.from)<0||Me(f.from,u.to)>0)){var v=[s,1],x=Me(f.from,u.from),M=Me(f.to,u.to);(x<0||!o.inclusiveLeft&&!x)&&v.push({from:f.from,to:u.from}),(M>0||!o.inclusiveRight&&!M)&&v.push({from:u.to,to:f.to}),n.splice.apply(n,v),s+=v.length-3}}return n}function ba(e){var t=e.markedSpans;if(t){for(var i=0;i<t.length;++i)t[i].marker.detachLine(e);e.markedSpans=null}}function Ca(e,t){if(t){for(var i=0;i<t.length;++i)t[i].marker.attachLine(e);e.markedSpans=t}}function Oi(e){return e.inclusiveLeft?-1:0}function Hi(e){return e.inclusiveRight?1:0}function yn(e,t){var i=e.lines.length-t.lines.length;if(i!=0)return i;var r=e.find(),n=t.find(),a=Me(r.from,n.from)||Oi(e)-Oi(t);if(a)return-a;var o=Me(r.to,n.to)||Hi(e)-Hi(t);return o||t.id-e.id}function ka(e,t){var i=rr&&e.markedSpans,r;if(i)for(var n=void 0,a=0;a<i.length;++a)n=i[a],n.marker.collapsed&&(t?n.from:n.to)==null&&(!r||yn(r,n.marker)<0)&&(r=n.marker);return r}function wa(e){return ka(e,!0)}function _i(e){return ka(e,!1)}function Dl(e,t){var i=rr&&e.markedSpans,r;if(i)for(var n=0;n<i.length;++n){var a=i[n];a.marker.collapsed&&(a.from==null||a.from<t)&&(a.to==null||a.to>t)&&(!r||yn(r,a.marker)<0)&&(r=a.marker)}return r}function Sa(e,t,i,r,n){var a=we(e,t),o=rr&&a.markedSpans;if(o)for(var u=0;u<o.length;++u){var s=o[u];if(s.marker.collapsed){var f=s.marker.find(0),v=Me(f.from,i)||Oi(s.marker)-Oi(n),x=Me(f.to,r)||Hi(s.marker)-Hi(n);if(!(v>=0&&x<=0||v<=0&&x>=0)&&(v<=0&&(s.marker.inclusiveRight&&n.inclusiveLeft?Me(f.to,i)>=0:Me(f.to,i)>0)||v>=0&&(s.marker.inclusiveRight&&n.inclusiveLeft?Me(f.from,r)<=0:Me(f.from,r)<0)))return!0}}}function Kt(e){for(var t;t=wa(e);)e=t.find(-1,!0).line;return e}function bl(e){for(var t;t=_i(e);)e=t.find(1,!0).line;return e}function Cl(e){for(var t,i;t=_i(e);)e=t.find(1,!0).line,(i||(i=[])).push(e);return i}function Dn(e,t){var i=we(e,t),r=Kt(i);return i==r?t:Xe(r)}function Fa(e,t){if(t>e.lastLine())return t;var i=we(e,t),r;if(!sr(e,i))return t;for(;r=_i(i);)i=r.find(1,!0).line;return Xe(i)+1}function sr(e,t){var i=rr&&t.markedSpans;if(i){for(var r=void 0,n=0;n<i.length;++n)if(r=i[n],!!r.marker.collapsed){if(r.from==null)return!0;if(!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&bn(e,t,r))return!0}}}function bn(e,t,i){if(i.to==null){var r=i.marker.find(1,!0);return bn(e,r.line,ii(r.line.markedSpans,i.marker))}if(i.marker.inclusiveRight&&i.to==t.text.length)return!0;for(var n=void 0,a=0;a<t.markedSpans.length;++a)if(n=t.markedSpans[a],n.marker.collapsed&&!n.marker.widgetNode&&n.from==i.to&&(n.to==null||n.to!=i.from)&&(n.marker.inclusiveLeft||i.marker.inclusiveRight)&&bn(e,t,n))return!0}function ir(e){e=Kt(e);for(var t=0,i=e.parent,r=0;r<i.lines.length;++r){var n=i.lines[r];if(n==e)break;t+=n.height}for(var a=i.parent;a;i=a,a=i.parent)for(var o=0;o<a.children.length;++o){var u=a.children[o];if(u==i)break;t+=u.height}return t}function Ri(e){if(e.height==0)return 0;for(var t=e.text.length,i,r=e;i=wa(r);){var n=i.find(0,!0);r=n.from.line,t+=n.from.ch-n.to.ch}for(r=e;i=_i(r);){var a=i.find(0,!0);t-=r.text.length-a.from.ch,r=a.to.line,t+=r.text.length-a.to.ch}return t}function Cn(e){var t=e.display,i=e.doc;t.maxLine=we(i,i.first),t.maxLineLength=Ri(t.maxLine),t.maxLineChanged=!0,i.iter(function(r){var n=Ri(r);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=r)})}var Or=function(e,t,i){this.text=e,Ca(this,t),this.height=i?i(this):1};Or.prototype.lineNo=function(){return Xe(this)},xe(Or);function kl(e,t,i,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),ba(e),Ca(e,i);var n=r?r(e):1;n!=e.height&&Qt(e,n)}function wl(e){e.parent=null,ba(e)}var Sl={},Fl={};function Aa(e,t){if(!e||/^\s*$/.test(e))return null;var i=t.addModeClass?Fl:Sl;return i[e]||(i[e]=e.replace(/\S+/g,"cm-$&"))}function Ea(e,t){var i=Re("span",null,null,N?"padding-right: .1px":null),r={pre:Re("pre",[i],"CodeMirror-line"),content:i,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var n=0;n<=(t.rest?t.rest.length:0);n++){var a=n?t.rest[n-1]:t.line,o=void 0;r.pos=0,r.addToken=El,Mr(e.display.measure)&&(o=y(a,e.doc.direction))&&(r.addToken=Tl(r.addToken,o)),r.map=[];var u=t!=e.display.externalMeasured&&Xe(a);Bl(a,r,da(e,a,u)),a.styleClasses&&(a.styleClasses.bgClass&&(r.bgClass=Je(a.styleClasses.bgClass,r.bgClass||"")),a.styleClasses.textClass&&(r.textClass=Je(a.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(yt(e.display.measure))),n==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(N){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return C(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=Je(r.pre.className,r.textClass||"")),r}function Al(e){var t=J("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function El(e,t,i,r,n,a,o){if(t){var u=e.splitSpaces?Ll(t,e.trailingSpace):t,s=e.cm.state.specialChars,f=!1,v;if(!s.test(t))e.col+=t.length,v=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,v),L&&A<9&&(f=!0),e.pos+=t.length;else{v=document.createDocumentFragment();for(var x=0;;){s.lastIndex=x;var M=s.exec(t),E=M?M.index-x:t.length-x;if(E){var z=document.createTextNode(u.slice(x,x+E));L&&A<9?v.appendChild(J("span",[z])):v.appendChild(z),e.map.push(e.pos,e.pos+E,z),e.col+=E,e.pos+=E}if(!M)break;x+=E+1;var q=void 0;if(M[0]==" "){var ae=e.cm.options.tabSize,se=ae-e.col%ae;q=v.appendChild(J("span",Nt(se),"cm-tab")),q.setAttribute("role","presentation"),q.setAttribute("cm-text"," "),e.col+=se}else M[0]=="\r"||M[0]==`
`?(q=v.appendChild(J("span",M[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),q.setAttribute("cm-text",M[0]),e.col+=1):(q=e.cm.options.specialCharPlaceholder(M[0]),q.setAttribute("cm-text",M[0]),L&&A<9?v.appendChild(J("span",[q])):v.appendChild(q),e.col+=1);e.map.push(e.pos,e.pos+1,q),e.pos++}}if(e.trailingSpace=u.charCodeAt(t.length-1)==32,i||r||n||f||a||o){var de=i||"";r&&(de+=r),n&&(de+=n);var fe=J("span",[v],de,a);if(o)for(var ve in o)o.hasOwnProperty(ve)&&ve!="style"&&ve!="class"&&fe.setAttribute(ve,o[ve]);return e.content.appendChild(fe)}e.content.appendChild(v)}}function Ll(e,t){if(e.length>1&&!/ /.test(e))return e;for(var i=t,r="",n=0;n<e.length;n++){var a=e.charAt(n);a==" "&&i&&(n==e.length-1||e.charCodeAt(n+1)==32)&&(a="\xA0"),r+=a,i=a==" "}return r}function Tl(e,t){return function(i,r,n,a,o,u,s){n=n?n+" cm-force-border":"cm-force-border";for(var f=i.pos,v=f+r.length;;){for(var x=void 0,M=0;M<t.length&&(x=t[M],!(x.to>f&&x.from<=f));M++);if(x.to>=v)return e(i,r,n,a,o,u,s);e(i,r.slice(0,x.to-f),n,a,null,u,s),a=null,r=r.slice(x.to-f),f=x.to}}}function La(e,t,i,r){var n=!r&&i.widgetNode;n&&e.map.push(e.pos,e.pos+t,n),!r&&e.cm.display.input.needsContentAttribute&&(n||(n=e.content.appendChild(document.createElement("span"))),n.setAttribute("cm-marker",i.id)),n&&(e.cm.display.input.setUneditable(n),e.content.appendChild(n)),e.pos+=t,e.trailingSpace=!1}function Bl(e,t,i){var r=e.markedSpans,n=e.text,a=0;if(!r){for(var o=1;o<i.length;o+=2)t.addToken(t,n.slice(a,a=i[o]),Aa(i[o+1],t.cm.options));return}for(var u=n.length,s=0,f=1,v="",x,M,E=0,z,q,ae,se,de;;){if(E==s){z=q=ae=M="",de=null,se=null,E=1/0;for(var fe=[],ve=void 0,Fe=0;Fe<r.length;++Fe){var Se=r[Fe],He=Se.marker;if(He.type=="bookmark"&&Se.from==s&&He.widgetNode)fe.push(He);else if(Se.from<=s&&(Se.to==null||Se.to>s||He.collapsed&&Se.to==s&&Se.from==s)){if(Se.to!=null&&Se.to!=s&&E>Se.to&&(E=Se.to,q=""),He.className&&(z+=" "+He.className),He.css&&(M=(M?M+";":"")+He.css),He.startStyle&&Se.from==s&&(ae+=" "+He.startStyle),He.endStyle&&Se.to==E&&(ve||(ve=[])).push(He.endStyle,Se.to),He.title&&((de||(de={})).title=He.title),He.attributes)for(var Ze in He.attributes)(de||(de={}))[Ze]=He.attributes[Ze];He.collapsed&&(!se||yn(se.marker,He)<0)&&(se=Se)}else Se.from>s&&E>Se.from&&(E=Se.from)}if(ve)for(var vt=0;vt<ve.length;vt+=2)ve[vt+1]==E&&(q+=" "+ve[vt]);if(!se||se.from==s)for(var tt=0;tt<fe.length;++tt)La(t,0,fe[tt]);if(se&&(se.from||0)==s){if(La(t,(se.to==null?u+1:se.to)-s,se.marker,se.from==null),se.to==null)return;se.to==s&&(se=!1)}}if(s>=u)break;for(var Rt=Math.min(u,E);;){if(v){var Tt=s+v.length;if(!se){var st=Tt>Rt?v.slice(0,Rt-s):v;t.addToken(t,st,x?x+z:z,ae,s+st.length==E?q:"",M,de)}if(Tt>=Rt){v=v.slice(Rt-s),s=Rt;break}s=Tt,ae=""}v=n.slice(a,a=i[f++]),x=Aa(i[f++],t.cm.options)}}}function Ta(e,t,i){this.line=t,this.rest=Cl(t),this.size=this.rest?Xe(Oe(this.rest))-i+1:1,this.node=this.text=null,this.hidden=sr(e,t)}function zi(e,t,i){for(var r=[],n,a=t;a<i;a=n){var o=new Ta(e.doc,we(e.doc,a),a);n=a+o.size,r.push(o)}return r}var Hr=null;function Ml(e){Hr?Hr.ops.push(e):e.ownsGroup=Hr={ops:[e],delayedCallbacks:[]}}function Nl(e){var t=e.delayedCallbacks,i=0;do{for(;i<t.length;i++)t[i].call(null);for(var r=0;r<e.ops.length;r++){var n=e.ops[r];if(n.cursorActivityHandlers)for(;n.cursorActivityCalled<n.cursorActivityHandlers.length;)n.cursorActivityHandlers[n.cursorActivityCalled++].call(null,n.cm)}}while(i<t.length)}function Il(e,t){var i=e.ownsGroup;if(i)try{Nl(i)}finally{Hr=null,t(i)}}var ni=null;function dt(e,t){var i=b(e,t);if(i.length){var r=Array.prototype.slice.call(arguments,2),n;Hr?n=Hr.delayedCallbacks:ni?n=ni:(n=ni=[],setTimeout(Ol,0));for(var a=function(u){n.push(function(){return i[u].apply(null,r)})},o=0;o<i.length;++o)a(o)}}function Ol(){var e=ni;ni=null;for(var t=0;t<e.length;++t)e[t]()}function Ba(e,t,i,r){for(var n=0;n<t.changes.length;n++){var a=t.changes[n];a=="text"?_l(e,t):a=="gutter"?Na(e,t,i,r):a=="class"?kn(e,t):a=="widget"&&Rl(e,t,r)}t.changes=null}function ai(e){return e.node==e.text&&(e.node=J("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),L&&A<8&&(e.node.style.zIndex=2)),e.node}function Hl(e,t){var i=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(i&&(i+=" CodeMirror-linebackground"),t.background)i?t.background.className=i:(t.background.parentNode.removeChild(t.background),t.background=null);else if(i){var r=ai(t);t.background=r.insertBefore(J("div",null,i),r.firstChild),e.display.input.setUneditable(t.background)}}function Ma(e,t){var i=e.display.externalMeasured;return i&&i.line==t.line?(e.display.externalMeasured=null,t.measure=i.measure,i.built):Ea(e,t)}function _l(e,t){var i=t.text.className,r=Ma(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,kn(e,t)):i&&(t.text.className=i)}function kn(e,t){Hl(e,t),t.line.wrapClass?ai(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var i=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=i||""}function Na(e,t,i,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var n=ai(t);t.gutterBackground=J("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),n.insertBefore(t.gutterBackground,t.text)}var a=t.line.gutterMarkers;if(e.options.lineNumbers||a){var o=ai(t),u=t.gutter=J("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(u.setAttribute("aria-hidden","true"),e.display.input.setUneditable(u),o.insertBefore(u,t.text),t.line.gutterClass&&(u.className+=" "+t.line.gutterClass),e.options.lineNumbers&&(!a||!a["CodeMirror-linenumbers"])&&(t.lineNumber=u.appendChild(J("div",dn(e.options,i),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),a)for(var s=0;s<e.display.gutterSpecs.length;++s){var f=e.display.gutterSpecs[s].className,v=a.hasOwnProperty(f)&&a[f];v&&u.appendChild(J("div",[v],"CodeMirror-gutter-elt","left: "+r.gutterLeft[f]+"px; width: "+r.gutterWidth[f]+"px"))}}}function Rl(e,t,i){t.alignable&&(t.alignable=null);for(var r=ge("CodeMirror-linewidget"),n=t.node.firstChild,a=void 0;n;n=a)a=n.nextSibling,r.test(n.className)&&t.node.removeChild(n);Ia(e,t,i)}function zl(e,t,i,r){var n=Ma(e,t);return t.text=t.node=n.pre,n.bgClass&&(t.bgClass=n.bgClass),n.textClass&&(t.textClass=n.textClass),kn(e,t),Na(e,t,i,r),Ia(e,t,r),t.node}function Ia(e,t,i){if(Oa(e,t.line,t,i,!0),t.rest)for(var r=0;r<t.rest.length;r++)Oa(e,t.rest[r],t,i,!1)}function Oa(e,t,i,r,n){if(t.widgets)for(var a=ai(i),o=0,u=t.widgets;o<u.length;++o){var s=u[o],f=J("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||f.setAttribute("cm-ignore-events","true"),Pl(s,f,i,r),e.display.input.setUneditable(f),n&&s.above?a.insertBefore(f,i.gutter||i.text):a.appendChild(f),dt(s,"redraw")}}function Pl(e,t,i,r){if(e.noHScroll){(i.alignable||(i.alignable=[])).push(t);var n=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(n-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=n+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function oi(e){if(e.height!=null)return e.height;var t=e.doc.cm;if(!t)return 0;if(!le(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),Ae(t.display.measure,J("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function nr(e,t){for(var i=ze(t);i!=e.wrapper;i=i.parentNode)if(!i||i.nodeType==1&&i.getAttribute("cm-ignore-events")=="true"||i.parentNode==e.sizer&&i!=e.mover)return!0}function Pi(e){return e.lineSpace.offsetTop}function wn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Ha(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=Ae(e.measure,J("pre","x","CodeMirror-line-like")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return!isNaN(r.left)&&!isNaN(r.right)&&(e.cachedPaddingH=r),r}function $t(e){return ot-e.display.nativeBarWidth}function Cr(e){return e.display.scroller.clientWidth-$t(e)-e.display.barWidth}function Sn(e){return e.display.scroller.clientHeight-$t(e)-e.display.barHeight}function Wl(e,t,i){var r=e.options.lineWrapping,n=r&&Cr(e);if(!t.measure.heights||r&&t.measure.width!=n){var a=t.measure.heights=[];if(r){t.measure.width=n;for(var o=t.text.firstChild.getClientRects(),u=0;u<o.length-1;u++){var s=o[u],f=o[u+1];Math.abs(s.bottom-f.bottom)>2&&a.push((s.bottom+f.top)/2-i.top)}}a.push(i.bottom-i.top)}}function _a(e,t,i){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};if(e.rest){for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var n=0;n<e.rest.length;n++)if(Xe(e.rest[n])>i)return{map:e.measure.maps[n],cache:e.measure.caches[n],before:!0}}}function Ul(e,t){t=Kt(t);var i=Xe(t),r=e.display.externalMeasured=new Ta(e.doc,t,i);r.lineN=i;var n=r.built=Ea(e,r);return r.text=n.pre,Ae(e.display.lineMeasure,n.pre),r}function Ra(e,t,i,r){return Vt(e,_r(e,t),i,r)}function Fn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Sr(e,t)];var i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size)return i}function _r(e,t){var i=Xe(t),r=Fn(e,i);r&&!r.text?r=null:r&&r.changes&&(Ba(e,r,i,Bn(e)),e.curOp.forceUpdate=!0),r||(r=Ul(e,t));var n=_a(r,t,i);return{line:t,view:r,rect:null,map:n.map,cache:n.cache,before:n.before,hasHeights:!1}}function Vt(e,t,i,r,n){t.before&&(i=-1);var a=i+(r||""),o;return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Wl(e,t.view,t.rect),t.hasHeights=!0),o=ql(e,t,i,r),o.bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:n?o.rtop:o.top,bottom:n?o.rbottom:o.bottom}}var za={left:0,right:0,top:0,bottom:0};function Pa(e,t,i){for(var r,n,a,o,u,s,f=0;f<e.length;f+=3)if(u=e[f],s=e[f+1],t<u?(n=0,a=1,o="left"):t<s?(n=t-u,a=n+1):(f==e.length-3||t==s&&e[f+3]>t)&&(a=s-u,n=a-1,t>=s&&(o="right")),n!=null){if(r=e[f+2],u==s&&i==(r.insertLeft?"left":"right")&&(o=i),i=="left"&&n==0)for(;f&&e[f-2]==e[f-3]&&e[f-1].insertLeft;)r=e[(f-=3)+2],o="left";if(i=="right"&&n==s-u)for(;f<e.length-3&&e[f+3]==e[f+4]&&!e[f+5].insertLeft;)r=e[(f+=3)+2],o="right";break}return{node:r,start:n,end:a,collapse:o,coverStart:u,coverEnd:s}}function jl(e,t){var i=za;if(t=="left")for(var r=0;r<e.length&&(i=e[r]).left==i.right;r++);else for(var n=e.length-1;n>=0&&(i=e[n]).left==i.right;n--);return i}function ql(e,t,i,r){var n=Pa(t.map,i,r),a=n.node,o=n.start,u=n.end,s=n.collapse,f;if(a.nodeType==3){for(var v=0;v<4;v++){for(;o&&c(t.line.text.charAt(n.coverStart+o));)--o;for(;n.coverStart+u<n.coverEnd&&c(t.line.text.charAt(n.coverStart+u));)++u;if(L&&A<9&&o==0&&u==n.coverEnd-n.coverStart?f=a.parentNode.getBoundingClientRect():f=jl(_(a,o,u).getClientRects(),r),f.left||f.right||o==0)break;u=o,o=o-1,s="right"}L&&A<11&&(f=Gl(e.display.measure,f))}else{o>0&&(s=r="right");var x;e.options.lineWrapping&&(x=a.getClientRects()).length>1?f=x[r=="right"?x.length-1:0]:f=a.getBoundingClientRect()}if(L&&A<9&&!o&&(!f||!f.left&&!f.right)){var M=a.parentNode.getClientRects()[0];M?f={left:M.left,right:M.left+zr(e.display),top:M.top,bottom:M.bottom}:f=za}for(var E=f.top-t.rect.top,z=f.bottom-t.rect.top,q=(E+z)/2,ae=t.view.measure.heights,se=0;se<ae.length-1&&!(q<ae[se]);se++);var de=se?ae[se-1]:0,fe=ae[se],ve={left:(s=="right"?f.right:f.left)-t.rect.left,right:(s=="left"?f.left:f.right)-t.rect.left,top:de,bottom:fe};return!f.left&&!f.right&&(ve.bogus=!0),e.options.singleCursorHeightPerLine||(ve.rtop=E,ve.rbottom=z),ve}function Gl(e,t){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!cn(e))return t;var i=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*i,right:t.right*i,top:t.top*r,bottom:t.bottom*r}}function Wa(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Ua(e){e.display.externalMeasure=null,Z(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Wa(e.display.view[t])}function li(e){Ua(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function ja(e){return V&&be?-(e.body.getBoundingClientRect().left-parseInt(getComputedStyle(e.body).marginLeft)):e.defaultView.pageXOffset||(e.documentElement||e.body).scrollLeft}function qa(e){return V&&be?-(e.body.getBoundingClientRect().top-parseInt(getComputedStyle(e.body).marginTop)):e.defaultView.pageYOffset||(e.documentElement||e.body).scrollTop}function An(e){var t=Kt(e),i=t.widgets,r=0;if(i)for(var n=0;n<i.length;++n)i[n].above&&(r+=oi(i[n]));return r}function Wi(e,t,i,r,n){if(!n){var a=An(t);i.top+=a,i.bottom+=a}if(r=="line")return i;r||(r="local");var o=ir(t);if(r=="local"?o+=Pi(e.display):o-=e.display.viewOffset,r=="page"||r=="window"){var u=e.display.lineSpace.getBoundingClientRect();o+=u.top+(r=="window"?0:qa(kt(e)));var s=u.left+(r=="window"?0:ja(kt(e)));i.left+=s,i.right+=s}return i.top+=o,i.bottom+=o,i}function Ga(e,t,i){if(i=="div")return t;var r=t.left,n=t.top;if(i=="page")r-=ja(kt(e)),n-=qa(kt(e));else if(i=="local"||!i){var a=e.display.sizer.getBoundingClientRect();r+=a.left,n+=a.top}var o=e.display.lineSpace.getBoundingClientRect();return{left:r-o.left,top:n-o.top}}function Ui(e,t,i,r,n){return r||(r=we(e.doc,t.line)),Wi(e,r,Ra(e,r,t.ch,n),i)}function Xt(e,t,i,r,n,a){r=r||we(e.doc,t.line),n||(n=_r(e,r));function o(z,q){var ae=Vt(e,n,z,q?"right":"left",a);return q?ae.left=ae.right:ae.right=ae.left,Wi(e,r,ae,i)}var u=y(r,e.doc.direction),s=t.ch,f=t.sticky;if(s>=r.text.length?(s=r.text.length,f="before"):s<=0&&(s=0,f="after"),!u)return o(f=="before"?s-1:s,f=="before");function v(z,q,ae){var se=u[q],de=se.level==1;return o(ae?z-1:z,de!=ae)}var x=d(u,s,f),M=l,E=v(s,x,f=="before");return M!=null&&(E.other=v(s,M,f!="before")),E}function Ka(e,t){var i=0;t=Ne(e.doc,t),e.options.lineWrapping||(i=zr(e.display)*t.ch);var r=we(e.doc,t.line),n=ir(r)+Pi(e.display);return{left:i,right:i,top:n,bottom:n+r.height}}function En(e,t,i,r,n){var a=re(e,t,i);return a.xRel=n,r&&(a.outside=r),a}function Ln(e,t,i){var r=e.doc;if(i+=e.display.viewOffset,i<0)return En(r.first,0,null,-1,-1);var n=br(r,i),a=r.first+r.size-1;if(n>a)return En(r.first+r.size-1,we(r,a).text.length,null,1,1);t<0&&(t=0);for(var o=we(r,n);;){var u=Kl(e,o,n,t,i),s=Dl(o,u.ch+(u.xRel>0||u.outside>0?1:0));if(!s)return u;var f=s.find(1);if(f.line==n)return f;o=we(r,n=f.line)}}function Xa(e,t,i,r){r-=An(t);var n=t.text.length,a=g(function(o){return Vt(e,i,o-1).bottom<=r},n,0);return n=g(function(o){return Vt(e,i,o).top>r},a,n),{begin:a,end:n}}function Ya(e,t,i,r){i||(i=_r(e,t));var n=Wi(e,t,Vt(e,i,r),"line").top;return Xa(e,t,i,n)}function Tn(e,t,i,r){return e.bottom<=i?!1:e.top>i?!0:(r?e.left:e.right)>t}function Kl(e,t,i,r,n){n-=ir(t);var a=_r(e,t),o=An(t),u=0,s=t.text.length,f=!0,v=y(t,e.doc.direction);if(v){var x=(e.options.lineWrapping?Yl:Xl)(e,t,i,a,v,r,n);f=x.level!=1,u=f?x.from:x.to-1,s=f?x.to:x.from-1}var M=null,E=null,z=g(function(Fe){var Se=Vt(e,a,Fe);return Se.top+=o,Se.bottom+=o,Tn(Se,r,n,!1)?(Se.top<=n&&Se.left<=r&&(M=Fe,E=Se),!0):!1},u,s),q,ae,se=!1;if(E){var de=r-E.left<E.right-r,fe=de==f;z=M+(fe?0:1),ae=fe?"after":"before",q=de?E.left:E.right}else{!f&&(z==s||z==u)&&z++,ae=z==0?"after":z==t.text.length?"before":Vt(e,a,z-(f?1:0)).bottom+o<=n==f?"after":"before";var ve=Xt(e,re(i,z,ae),"line",t,a);q=ve.left,se=n<ve.top?-1:n>=ve.bottom?1:0}return z=p(t.text,z,1),En(i,z,ae,se,r-q)}function Xl(e,t,i,r,n,a,o){var u=g(function(x){var M=n[x],E=M.level!=1;return Tn(Xt(e,re(i,E?M.to:M.from,E?"before":"after"),"line",t,r),a,o,!0)},0,n.length-1),s=n[u];if(u>0){var f=s.level!=1,v=Xt(e,re(i,f?s.from:s.to,f?"after":"before"),"line",t,r);Tn(v,a,o,!0)&&v.top>o&&(s=n[u-1])}return s}function Yl(e,t,i,r,n,a,o){var u=Xa(e,t,r,o),s=u.begin,f=u.end;/\s/.test(t.text.charAt(f-1))&&f--;for(var v=null,x=null,M=0;M<n.length;M++){var E=n[M];if(!(E.from>=f||E.to<=s)){var z=E.level!=1,q=Vt(e,r,z?Math.min(f,E.to)-1:Math.max(s,E.from)).right,ae=q<a?a-q+1e9:q-a;(!v||x>ae)&&(v=E,x=ae)}}return v||(v=n[n.length-1]),v.from<s&&(v={from:s,to:v.to,level:v.level}),v.to>f&&(v={from:v.from,to:f,level:v.level}),v}var kr;function Rr(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(kr==null){kr=J("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)kr.appendChild(document.createTextNode("x")),kr.appendChild(J("br"));kr.appendChild(document.createTextNode("x"))}Ae(e.measure,kr);var i=kr.offsetHeight/50;return i>3&&(e.cachedTextHeight=i),Z(e.measure),i||1}function zr(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=J("span","xxxxxxxxxx"),i=J("pre",[t],"CodeMirror-line-like");Ae(e.measure,i);var r=t.getBoundingClientRect(),n=(r.right-r.left)/10;return n>2&&(e.cachedCharWidth=n),n||10}function Bn(e){for(var t=e.display,i={},r={},n=t.gutters.clientLeft,a=t.gutters.firstChild,o=0;a;a=a.nextSibling,++o){var u=e.display.gutterSpecs[o].className;i[u]=a.offsetLeft+a.clientLeft+n,r[u]=a.clientWidth}return{fixedPos:Mn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:i,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function Mn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Za(e){var t=Rr(e.display),i=e.options.lineWrapping,r=i&&Math.max(5,e.display.scroller.clientWidth/zr(e.display)-3);return function(n){if(sr(e.doc,n))return 0;var a=0;if(n.widgets)for(var o=0;o<n.widgets.length;o++)n.widgets[o].height&&(a+=n.widgets[o].height);return i?a+(Math.ceil(n.text.length/r)||1)*t:a+t}}function Nn(e){var t=e.doc,i=Za(e);t.iter(function(r){var n=i(r);n!=r.height&&Qt(r,n)})}function wr(e,t,i,r){var n=e.display;if(!i&&ze(t).getAttribute("cm-not-content")=="true")return null;var a,o,u=n.lineSpace.getBoundingClientRect();try{a=t.clientX-u.left,o=t.clientY-u.top}catch{return null}var s=Ln(e,a,o),f;if(r&&s.xRel>0&&(f=we(e.doc,s.line).text).length==s.ch){var v=Ge(f,f.length,e.options.tabSize)-f.length;s=re(s.line,Math.max(0,Math.round((a-Ha(e.display).left)/zr(e.display))-v))}return s}function Sr(e,t){if(t>=e.display.viewTo||(t-=e.display.viewFrom,t<0))return null;for(var i=e.display.view,r=0;r<i.length;r++)if(t-=i[r].size,t<0)return r}function Et(e,t,i,r){t==null&&(t=e.doc.first),i==null&&(i=e.doc.first+e.doc.size),r||(r=0);var n=e.display;if(r&&i<n.viewTo&&(n.updateLineNumbers==null||n.updateLineNumbers>t)&&(n.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=n.viewTo)rr&&Dn(e.doc,t)<n.viewTo&&cr(e);else if(i<=n.viewFrom)rr&&Fa(e.doc,i+r)>n.viewFrom?cr(e):(n.viewFrom+=r,n.viewTo+=r);else if(t<=n.viewFrom&&i>=n.viewTo)cr(e);else if(t<=n.viewFrom){var a=ji(e,i,i+r,1);a?(n.view=n.view.slice(a.index),n.viewFrom=a.lineN,n.viewTo+=r):cr(e)}else if(i>=n.viewTo){var o=ji(e,t,t,-1);o?(n.view=n.view.slice(0,o.index),n.viewTo=o.lineN):cr(e)}else{var u=ji(e,t,t,-1),s=ji(e,i,i+r,1);u&&s?(n.view=n.view.slice(0,u.index).concat(zi(e,u.lineN,s.lineN)).concat(n.view.slice(s.index)),n.viewTo+=r):cr(e)}var f=n.externalMeasured;f&&(i<f.lineN?f.lineN+=r:t<f.lineN+f.size&&(n.externalMeasured=null))}function fr(e,t,i){e.curOp.viewChanged=!0;var r=e.display,n=e.display.externalMeasured;if(n&&t>=n.lineN&&t<n.lineN+n.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var a=r.view[Sr(e,t)];if(a.node!=null){var o=a.changes||(a.changes=[]);je(o,i)==-1&&o.push(i)}}}function cr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ji(e,t,i,r){var n=Sr(e,t),a,o=e.display.view;if(!rr||i==e.doc.first+e.doc.size)return{index:n,lineN:i};for(var u=e.display.viewFrom,s=0;s<n;s++)u+=o[s].size;if(u!=t){if(r>0){if(n==o.length-1)return null;a=u+o[n].size-t,n++}else a=u-t;t+=a,i+=a}for(;Dn(e.doc,i)!=i;){if(n==(r<0?0:o.length-1))return null;i+=r*o[n-(r<0?1:0)].size,n+=r}return{index:n,lineN:i}}function Zl(e,t,i){var r=e.display,n=r.view;n.length==0||t>=r.viewTo||i<=r.viewFrom?(r.view=zi(e,t,i),r.viewFrom=t):(r.viewFrom>t?r.view=zi(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(Sr(e,t))),r.viewFrom=t,r.viewTo<i?r.view=r.view.concat(zi(e,r.viewTo,i)):r.viewTo>i&&(r.view=r.view.slice(0,Sr(e,i)))),r.viewTo=i}function Qa(e){for(var t=e.display.view,i=0,r=0;r<t.length;r++){var n=t[r];!n.hidden&&(!n.node||n.changes)&&++i}return i}function ui(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Ja(e,t){t===void 0&&(t=!0);var i=e.doc,r={},n=r.cursors=document.createDocumentFragment(),a=r.selection=document.createDocumentFragment(),o=e.options.$customCursor;o&&(t=!0);for(var u=0;u<i.sel.ranges.length;u++)if(!(!t&&u==i.sel.primIndex)){var s=i.sel.ranges[u];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var f=s.empty();if(o){var v=o(e,s);v&&In(e,v,n)}else(f||e.options.showCursorWhenSelecting)&&In(e,s.head,n);f||Ql(e,s,a)}}return r}function In(e,t,i){var r=Xt(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),n=i.appendChild(J("div","\xA0","CodeMirror-cursor"));if(n.style.left=r.left+"px",n.style.top=r.top+"px",n.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var a=Ui(e,t,"div",null,null),o=a.right-a.left;n.style.width=(o>0?o:e.defaultCharWidth())+"px"}if(r.other){var u=i.appendChild(J("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));u.style.display="",u.style.left=r.other.left+"px",u.style.top=r.other.top+"px",u.style.height=(r.other.bottom-r.other.top)*.85+"px"}}function qi(e,t){return e.top-t.top||e.left-t.left}function Ql(e,t,i){var r=e.display,n=e.doc,a=document.createDocumentFragment(),o=Ha(e.display),u=o.left,s=Math.max(r.sizerWidth,Cr(e)-r.sizer.offsetLeft)-o.right,f=n.direction=="ltr";function v(fe,ve,Fe,Se){ve<0&&(ve=0),ve=Math.round(ve),Se=Math.round(Se),a.appendChild(J("div",null,"CodeMirror-selected","position: absolute; left: "+fe+`px;
top: `+ve+"px; width: "+(Fe??s-fe)+`px;
height: `+(Se-ve)+"px"))}function x(fe,ve,Fe){var Se=we(n,fe),He=Se.text.length,Ze,vt;function tt(st,Bt){return Ui(e,re(fe,st),"div",Se,Bt)}function Rt(st,Bt,Dt){var ht=Ya(e,Se,null,st),ft=Bt=="ltr"==(Dt=="after")?"left":"right",it=Dt=="after"?ht.begin:ht.end-(/\s/.test(Se.text.charAt(ht.end-1))?2:1);return tt(it,ft)[ft]}var Tt=y(Se,n.direction);return D(Tt,ve||0,Fe??He,function(st,Bt,Dt,ht){var ft=Dt=="ltr",it=tt(st,ft?"left":"right"),Mt=tt(Bt-1,ft?"right":"left"),$r=ve==null&&st==0,mr=Fe==null&&Bt==He,Ct=ht==0,er=!Tt||ht==Tt.length-1;if(Mt.top-it.top<=3){var mt=(f?$r:mr)&&Ct,la=(f?mr:$r)&&er,lr=mt?u:(ft?it:Mt).left,Tr=la?s:(ft?Mt:it).right;v(lr,it.top,Tr-lr,it.bottom)}else{var Br,Ft,Vr,ua;ft?(Br=f&&$r&&Ct?u:it.left,Ft=f?s:Rt(st,Dt,"before"),Vr=f?u:Rt(Bt,Dt,"after"),ua=f&&mr&&er?s:Mt.right):(Br=f?Rt(st,Dt,"before"):u,Ft=!f&&$r&&Ct?s:it.right,Vr=!f&&mr&&er?u:Mt.left,ua=f?Rt(Bt,Dt,"after"):s),v(Br,it.top,Ft-Br,it.bottom),it.bottom<Mt.top&&v(u,it.bottom,null,Mt.top),v(Vr,Mt.top,ua-Vr,Mt.bottom)}(!Ze||qi(it,Ze)<0)&&(Ze=it),qi(Mt,Ze)<0&&(Ze=Mt),(!vt||qi(it,vt)<0)&&(vt=it),qi(Mt,vt)<0&&(vt=Mt)}),{start:Ze,end:vt}}var M=t.from(),E=t.to();if(M.line==E.line)x(M.line,M.ch,E.ch);else{var z=we(n,M.line),q=we(n,E.line),ae=Kt(z)==Kt(q),se=x(M.line,M.ch,ae?z.text.length+1:null).end,de=x(E.line,ae?0:null,E.ch).start;ae&&(se.top<de.top-2?(v(se.right,se.top,null,se.bottom),v(u,de.top,de.left,de.bottom)):v(se.right,se.top,de.left-se.right,se.bottom)),se.bottom<de.top&&v(u,se.bottom,null,de.top)}i.appendChild(a)}function On(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var i=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Pr(e),t.cursorDiv.style.visibility=(i=!i)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function $a(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||_n(e))}function Hn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Pr(e))},100)}function _n(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(C(e,"focus",e,t),e.state.focused=!0,Ce(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),N&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),On(e))}function Pr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(C(e,"blur",e,t),e.state.focused=!1,Te(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Gi(e){for(var t=e.display,i=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),n=t.lineDiv.getBoundingClientRect().top,a=0,o=0;o<t.view.length;o++){var u=t.view[o],s=e.options.lineWrapping,f=void 0,v=0;if(!u.hidden){if(n+=u.line.height,L&&A<8){var x=u.node.offsetTop+u.node.offsetHeight;f=x-i,i=x}else{var M=u.node.getBoundingClientRect();f=M.bottom-M.top,!s&&u.text.firstChild&&(v=u.text.firstChild.getBoundingClientRect().right-M.left-1)}var E=u.line.height-f;if((E>.005||E<-.005)&&(n<r&&(a-=E),Qt(u.line,f),Va(u.line),u.rest))for(var z=0;z<u.rest.length;z++)Va(u.rest[z]);if(v>e.display.sizerWidth){var q=Math.ceil(v/zr(e.display));q>e.display.maxLineLength&&(e.display.maxLineLength=q,e.display.maxLine=u.line,e.display.maxLineChanged=!0)}}}Math.abs(a)>2&&(t.scroller.scrollTop+=a)}function Va(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var i=e.widgets[t],r=i.node.parentNode;r&&(i.height=r.offsetHeight)}}function Ki(e,t,i){var r=i&&i.top!=null?Math.max(0,i.top):e.scroller.scrollTop;r=Math.floor(r-Pi(e));var n=i&&i.bottom!=null?i.bottom:r+e.wrapper.clientHeight,a=br(t,r),o=br(t,n);if(i&&i.ensure){var u=i.ensure.from.line,s=i.ensure.to.line;u<a?(a=u,o=br(t,ir(we(t,u))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=o&&(a=br(t,ir(we(t,s))-e.wrapper.clientHeight),o=s)}return{from:a,to:Math.max(o,a+1)}}function Jl(e,t){if(!ee(e,"scrollCursorIntoView")){var i=e.display,r=i.sizer.getBoundingClientRect(),n=null,a=i.wrapper.ownerDocument;if(t.top+r.top<0?n=!0:t.bottom+r.top>(a.defaultView.innerHeight||a.documentElement.clientHeight)&&(n=!1),n!=null&&!Ee){var o=J("div","\u200B",null,`position: absolute;
top: `+(t.top-i.viewOffset-Pi(e.display))+`px;
height: `+(t.bottom-t.top+$t(e)+i.barHeight)+`px;
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(n),e.display.lineSpace.removeChild(o)}}}function $l(e,t,i,r){r==null&&(r=0);var n;!e.options.lineWrapping&&t==i&&(i=t.sticky=="before"?re(t.line,t.ch+1,"before"):t,t=t.ch?re(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var a=0;a<5;a++){var o=!1,u=Xt(e,t),s=!i||i==t?u:Xt(e,i);n={left:Math.min(u.left,s.left),top:Math.min(u.top,s.top)-r,right:Math.max(u.left,s.left),bottom:Math.max(u.bottom,s.bottom)+r};var f=Rn(e,n),v=e.doc.scrollTop,x=e.doc.scrollLeft;if(f.scrollTop!=null&&(fi(e,f.scrollTop),Math.abs(e.doc.scrollTop-v)>1&&(o=!0)),f.scrollLeft!=null&&(Fr(e,f.scrollLeft),Math.abs(e.doc.scrollLeft-x)>1&&(o=!0)),!o)break}return n}function Vl(e,t){var i=Rn(e,t);i.scrollTop!=null&&fi(e,i.scrollTop),i.scrollLeft!=null&&Fr(e,i.scrollLeft)}function Rn(e,t){var i=e.display,r=Rr(e.display);t.top<0&&(t.top=0);var n=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:i.scroller.scrollTop,a=Sn(e),o={};t.bottom-t.top>a&&(t.bottom=t.top+a);var u=e.doc.height+wn(i),s=t.top<r,f=t.bottom>u-r;if(t.top<n)o.scrollTop=s?0:t.top;else if(t.bottom>n+a){var v=Math.min(t.top,(f?u:t.bottom)-a);v!=n&&(o.scrollTop=v)}var x=e.options.fixedGutter?0:i.gutters.offsetWidth,M=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:i.scroller.scrollLeft-x,E=Cr(e)-i.gutters.offsetWidth,z=t.right-t.left>E;return z&&(t.right=t.left+E),t.left<10?o.scrollLeft=0:t.left<M?o.scrollLeft=Math.max(0,t.left+x-(z?0:10)):t.right>E+M-3&&(o.scrollLeft=t.right+(z?0:10)-E),o}function zn(e,t){t!=null&&(Xi(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Wr(e){Xi(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function si(e,t,i){(t!=null||i!=null)&&Xi(e),t!=null&&(e.curOp.scrollLeft=t),i!=null&&(e.curOp.scrollTop=i)}function eu(e,t){Xi(e),e.curOp.scrollToPos=t}function Xi(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var i=Ka(e,t.from),r=Ka(e,t.to);eo(e,i,r,t.margin)}}function eo(e,t,i,r){var n=Rn(e,{left:Math.min(t.left,i.left),top:Math.min(t.top,i.top)-r,right:Math.max(t.right,i.right),bottom:Math.max(t.bottom,i.bottom)+r});si(e,n.scrollLeft,n.scrollTop)}function fi(e,t){Math.abs(e.doc.scrollTop-t)<2||(W||Wn(e,{top:t}),to(e,t,!0),W&&Wn(e),di(e,100))}function to(e,t,i){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!i)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Fr(e,t,i,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((i?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,oo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function ci(e){var t=e.display,i=t.gutters.offsetWidth,r=Math.round(e.doc.height+wn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?i:0,docHeight:r,scrollHeight:r+$t(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:i}}var Ar=function(e,t,i){this.cm=i;var r=this.vert=J("div",[J("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),n=this.horiz=J("div",[J("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=n.tabIndex=-1,e(r),e(n),S(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),S(n,"scroll",function(){n.clientWidth&&t(n.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,L&&A<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ar.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,i=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(i){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var n=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+n)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=i?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var a=e.viewWidth-e.barLeft-(i?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+a)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:i?r:0,bottom:t?r:0}},Ar.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ar.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ar.prototype.zeroWidthHack=function(){var e=U&&!pe?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Qe,this.disableVert=new Qe},Ar.prototype.enableZeroWidthBar=function(e,t,i){e.style.visibility="";function r(){var n=e.getBoundingClientRect(),a=i=="vert"?document.elementFromPoint(n.right-1,(n.top+n.bottom)/2):document.elementFromPoint((n.right+n.left)/2,n.bottom-1);a!=e?e.style.visibility="hidden":t.set(1e3,r)}t.set(1e3,r)},Ar.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var hi=function(){};hi.prototype.update=function(){return{bottom:0,right:0}},hi.prototype.setScrollLeft=function(){},hi.prototype.setScrollTop=function(){},hi.prototype.clear=function(){};function Ur(e,t){t||(t=ci(e));var i=e.display.barWidth,r=e.display.barHeight;ro(e,t);for(var n=0;n<4&&i!=e.display.barWidth||r!=e.display.barHeight;n++)i!=e.display.barWidth&&e.options.lineWrapping&&Gi(e),ro(e,ci(e)),i=e.display.barWidth,r=e.display.barHeight}function ro(e,t){var i=e.display,r=i.scrollbars.update(t);i.sizer.style.paddingRight=(i.barWidth=r.right)+"px",i.sizer.style.paddingBottom=(i.barHeight=r.bottom)+"px",i.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(i.scrollbarFiller.style.display="block",i.scrollbarFiller.style.height=r.bottom+"px",i.scrollbarFiller.style.width=r.right+"px"):i.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(i.gutterFiller.style.display="block",i.gutterFiller.style.height=r.bottom+"px",i.gutterFiller.style.width=t.gutterWidth+"px"):i.gutterFiller.style.display=""}var io={native:Ar,null:hi};function no(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Te(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new io[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),S(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,i){i=="horizontal"?Fr(e,t):fi(e,t)},e),e.display.scrollbars.addClass&&Ce(e.display.wrapper,e.display.scrollbars.addClass)}var tu=0;function Er(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.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:++tu,markArrays:null},Ml(e.curOp)}function Lr(e){var t=e.curOp;t&&Il(t,function(i){for(var r=0;r<i.ops.length;r++)i.ops[r].cm.curOp=null;ru(i)})}function ru(e){for(var t=e.ops,i=0;i<t.length;i++)iu(t[i]);for(var r=0;r<t.length;r++)nu(t[r]);for(var n=0;n<t.length;n++)au(t[n]);for(var a=0;a<t.length;a++)ou(t[a]);for(var o=0;o<t.length;o++)lu(t[o])}function iu(e){var t=e.cm,i=t.display;su(t),e.updateMaxLine&&Cn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<i.viewFrom||e.scrollToPos.to.line>=i.viewTo)||i.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Yi(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function nu(e){e.updatedDisplay=e.mustUpdate&&Pn(e.cm,e.update)}function au(e){var t=e.cm,i=t.display;e.updatedDisplay&&Gi(t),e.barMeasure=ci(t),i.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Ra(t,i.maxLine,i.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(i.scroller.clientWidth,i.sizer.offsetLeft+e.adjustWidthTo+$t(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,i.sizer.offsetLeft+e.adjustWidthTo-Cr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=i.input.prepareSelection())}function ou(e){var t=e.cm;e.adjustWidthTo!=null&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Fr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var i=e.focus&&e.focus==$(k(t));e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,i),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ur(t,e.barMeasure),e.updatedDisplay&&jn(t,e.barMeasure),e.selectionChanged&&On(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),i&&$a(e.cm)}function lu(e){var t=e.cm,i=t.display,r=t.doc;if(e.updatedDisplay&&ao(t,e.update),i.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(i.wheelStartX=i.wheelStartY=null),e.scrollTop!=null&&to(t,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Fr(t,e.scrollLeft,!0,!0),e.scrollToPos){var n=$l(t,Ne(r,e.scrollToPos.from),Ne(r,e.scrollToPos.to),e.scrollToPos.margin);Jl(t,n)}var a=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(a)for(var u=0;u<a.length;++u)a[u].lines.length||C(a[u],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&C(o[s],"unhide");i.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&C(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function _t(e,t){if(e.curOp)return t();Er(e);try{return t()}finally{Lr(e)}}function pt(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Er(e);try{return t.apply(e,arguments)}finally{Lr(e)}}}function St(e){return function(){if(this.curOp)return e.apply(this,arguments);Er(this);try{return e.apply(this,arguments)}finally{Lr(this)}}}function gt(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Er(t);try{return e.apply(this,arguments)}finally{Lr(t)}}}function di(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,ne(uu,e))}function uu(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var i=+new Date+e.options.workTime,r=ri(e,t.highlightFrontier),n=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(a){if(r.line>=e.display.viewFrom){var o=a.styles,u=a.text.length>e.options.maxHighlightLength?tr(t.mode,r.state):null,s=ha(e,a,r,!0);u&&(r.state=u),a.styles=s.styles;var f=a.styleClasses,v=s.classes;v?a.styleClasses=v:f&&(a.styleClasses=null);for(var x=!o||o.length!=a.styles.length||f!=v&&(!f||!v||f.bgClass!=v.bgClass||f.textClass!=v.textClass),M=0;!x&&M<o.length;++M)x=o[M]!=a.styles[M];x&&n.push(r.line),a.stateAfter=r.save(),r.nextLine()}else a.text.length<=e.options.maxHighlightLength&&vn(e,a.text,r),a.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>i)return di(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),n.length&&_t(e,function(){for(var a=0;a<n.length;a++)fr(e,n[a],"text")})}}var Yi=function(e,t,i){var r=e.display;this.viewport=t,this.visible=Ki(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Cr(e),this.force=i,this.dims=Bn(e),this.events=[]};Yi.prototype.signal=function(e,t){ke(e,t)&&this.events.push(arguments)},Yi.prototype.finish=function(){for(var e=0;e<this.events.length;e++)C.apply(null,this.events[e])};function su(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=$t(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=$t(e)+"px",t.scrollbarsClipped=!0)}function fu(e){if(e.hasFocus())return null;var t=$(k(e));if(!t||!le(e.display.lineDiv,t))return null;var i={activeElt:t};if(window.getSelection){var r=K(e).getSelection();r.anchorNode&&r.extend&&le(e.display.lineDiv,r.anchorNode)&&(i.anchorNode=r.anchorNode,i.anchorOffset=r.anchorOffset,i.focusNode=r.focusNode,i.focusOffset=r.focusOffset)}return i}function cu(e){if(!(!e||!e.activeElt||e.activeElt==$(h(e.activeElt)))&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&le(document.body,e.anchorNode)&&le(document.body,e.focusNode))){var t=e.activeElt.ownerDocument,i=t.defaultView.getSelection(),r=t.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),i.removeAllRanges(),i.addRange(r),i.extend(e.focusNode,e.focusOffset)}}function Pn(e,t){var i=e.display,r=e.doc;if(t.editorIsHidden)return cr(e),!1;if(!t.force&&t.visible.from>=i.viewFrom&&t.visible.to<=i.viewTo&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&Qa(e)==0)return!1;lo(e)&&(cr(e),t.dims=Bn(e));var n=r.first+r.size,a=Math.max(t.visible.from-e.options.viewportMargin,r.first),o=Math.min(n,t.visible.to+e.options.viewportMargin);i.viewFrom<a&&a-i.viewFrom<20&&(a=Math.max(r.first,i.viewFrom)),i.viewTo>o&&i.viewTo-o<20&&(o=Math.min(n,i.viewTo)),rr&&(a=Dn(e.doc,a),o=Fa(e.doc,o));var u=a!=i.viewFrom||o!=i.viewTo||i.lastWrapHeight!=t.wrapperHeight||i.lastWrapWidth!=t.wrapperWidth;Zl(e,a,o),i.viewOffset=ir(we(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var s=Qa(e);if(!u&&s==0&&!t.force&&i.renderedView==i.view&&(i.updateLineNumbers==null||i.updateLineNumbers>=i.viewTo))return!1;var f=fu(e);return s>4&&(i.lineDiv.style.display="none"),hu(e,i.updateLineNumbers,t.dims),s>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,cu(f),Z(i.cursorDiv),Z(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,u&&(i.lastWrapHeight=t.wrapperHeight,i.lastWrapWidth=t.wrapperWidth,di(e,400)),i.updateLineNumbers=null,!0}function ao(e,t){for(var i=t.viewport,r=!0;;r=!1){if(!r||!e.options.lineWrapping||t.oldDisplayWidth==Cr(e)){if(i&&i.top!=null&&(i={top:Math.min(e.doc.height+wn(e.display)-Sn(e),i.top)}),t.visible=Ki(e.display,e.doc,i),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break}else r&&(t.visible=Ki(e.display,e.doc,i));if(!Pn(e,t))break;Gi(e);var n=ci(e);ui(e),Ur(e,n),jn(e,n),t.force=!1}t.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Wn(e,t){var i=new Yi(e,t);if(Pn(e,i)){Gi(e),ao(e,i);var r=ci(e);ui(e),Ur(e,r),jn(e,r),i.finish()}}function hu(e,t,i){var r=e.display,n=e.options.lineNumbers,a=r.lineDiv,o=a.firstChild;function u(z){var q=z.nextSibling;return N&&U&&e.display.currentWheelTarget==z?z.style.display="none":z.parentNode.removeChild(z),q}for(var s=r.view,f=r.viewFrom,v=0;v<s.length;v++){var x=s[v];if(!x.hidden)if(!x.node||x.node.parentNode!=a){var M=zl(e,x,f,i);a.insertBefore(M,o)}else{for(;o!=x.node;)o=u(o);var E=n&&t!=null&&t<=f&&x.lineNumber;x.changes&&(je(x.changes,"gutter")>-1&&(E=!1),Ba(e,x,f,i)),E&&(Z(x.lineNumber),x.lineNumber.appendChild(document.createTextNode(dn(e.options,f)))),o=x.node.nextSibling}f+=x.size}for(;o;)o=u(o)}function Un(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",dt(e,"gutterChanged",e)}function jn(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+$t(e)+"px"}function oo(e){var t=e.display,i=t.view;if(!(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))){for(var r=Mn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,n=t.gutters.offsetWidth,a=r+"px",o=0;o<i.length;o++)if(!i[o].hidden){e.options.fixedGutter&&(i[o].gutter&&(i[o].gutter.style.left=a),i[o].gutterBackground&&(i[o].gutterBackground.style.left=a));var u=i[o].alignable;if(u)for(var s=0;s<u.length;s++)u[s].style.left=a}e.options.fixedGutter&&(t.gutters.style.left=r+n+"px")}}function lo(e){if(!e.options.lineNumbers)return!1;var t=e.doc,i=dn(e.options,t.first+t.size-1),r=e.display;if(i.length!=r.lineNumChars){var n=r.measure.appendChild(J("div",[J("div",i)],"CodeMirror-linenumber CodeMirror-gutter-elt")),a=n.firstChild.offsetWidth,o=n.offsetWidth-a;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(a,r.lineGutter.offsetWidth-o)+1,r.lineNumWidth=r.lineNumInnerWidth+o,r.lineNumChars=r.lineNumInnerWidth?i.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",Un(e.display),!0}return!1}function qn(e,t){for(var i=[],r=!1,n=0;n<e.length;n++){var a=e[n],o=null;if(typeof a!="string"&&(o=a.style,a=a.className),a=="CodeMirror-linenumbers")if(t)r=!0;else continue;i.push({className:a,style:o})}return t&&!r&&i.push({className:"CodeMirror-linenumbers",style:null}),i}function uo(e){var t=e.gutters,i=e.gutterSpecs;Z(t),e.lineGutter=null;for(var r=0;r<i.length;++r){var n=i[r],a=n.className,o=n.style,u=t.appendChild(J("div",null,"CodeMirror-gutter "+a));o&&(u.style.cssText=o),a=="CodeMirror-linenumbers"&&(e.lineGutter=u,u.style.width=(e.lineNumWidth||1)+"px")}t.style.display=i.length?"":"none",Un(e)}function pi(e){uo(e.display),Et(e),oo(e)}function du(e,t,i,r){var n=this;this.input=i,n.scrollbarFiller=J("div",null,"CodeMirror-scrollbar-filler"),n.scrollbarFiller.setAttribute("cm-not-content","true"),n.gutterFiller=J("div",null,"CodeMirror-gutter-filler"),n.gutterFiller.setAttribute("cm-not-content","true"),n.lineDiv=Re("div",null,"CodeMirror-code"),n.selectionDiv=J("div",null,null,"position: relative; z-index: 1"),n.cursorDiv=J("div",null,"CodeMirror-cursors"),n.measure=J("div",null,"CodeMirror-measure"),n.lineMeasure=J("div",null,"CodeMirror-measure"),n.lineSpace=Re("div",[n.measure,n.lineMeasure,n.selectionDiv,n.cursorDiv,n.lineDiv],null,"position: relative; outline: none");var a=Re("div",[n.lineSpace],"CodeMirror-lines");n.mover=J("div",[a],null,"position: relative"),n.sizer=J("div",[n.mover],"CodeMirror-sizer"),n.sizerWidth=null,n.heightForcer=J("div",null,null,"position: absolute; height: "+ot+"px; width: 1px;"),n.gutters=J("div",null,"CodeMirror-gutters"),n.lineGutter=null,n.scroller=J("div",[n.sizer,n.heightForcer,n.gutters],"CodeMirror-scroll"),n.scroller.setAttribute("tabIndex","-1"),n.wrapper=J("div",[n.scrollbarFiller,n.gutterFiller,n.scroller],"CodeMirror"),V&&G>=105&&(n.wrapper.style.clipPath="inset(0px)"),n.wrapper.setAttribute("translate","no"),L&&A<8&&(n.gutters.style.zIndex=-1,n.scroller.style.paddingRight=0),!N&&!(W&&H)&&(n.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(n.wrapper):e(n.wrapper)),n.viewFrom=n.viewTo=t.first,n.reportedViewFrom=n.reportedViewTo=t.first,n.view=[],n.renderedView=null,n.externalMeasured=null,n.viewOffset=0,n.lastWrapHeight=n.lastWrapWidth=0,n.updateLineNumbers=null,n.nativeBarWidth=n.barHeight=n.barWidth=0,n.scrollbarsClipped=!1,n.lineNumWidth=n.lineNumInnerWidth=n.lineNumChars=null,n.alignWidgets=!1,n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.maxLine=null,n.maxLineLength=0,n.maxLineChanged=!1,n.wheelDX=n.wheelDY=n.wheelStartX=n.wheelStartY=null,n.shift=!1,n.selForContextMenu=null,n.activeTouch=null,n.gutterSpecs=qn(r.gutters,r.lineNumbers),uo(n),i.init(n)}var Zi=0,ar=null;L?ar=-.53:W?ar=15:V?ar=-.7:oe&&(ar=-1/3);function so(e){var t=e.wheelDeltaX,i=e.wheelDeltaY;return t==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),i==null&&e.detail&&e.axis==e.VERTICAL_AXIS?i=e.detail:i==null&&(i=e.wheelDelta),{x:t,y:i}}function pu(e){var t=so(e);return t.x*=ar,t.y*=ar,t}function fo(e,t){V&&G==102&&(e.display.chromeScrollHack==null?e.display.sizer.style.pointerEvents="none":clearTimeout(e.display.chromeScrollHack),e.display.chromeScrollHack=setTimeout(function(){e.display.chromeScrollHack=null,e.display.sizer.style.pointerEvents=""},100));var i=so(t),r=i.x,n=i.y,a=ar;t.deltaMode===0&&(r=t.deltaX,n=t.deltaY,a=1);var o=e.display,u=o.scroller,s=u.scrollWidth>u.clientWidth,f=u.scrollHeight>u.clientHeight;if(r&&s||n&&f){if(n&&U&&N){e:for(var v=t.target,x=o.view;v!=u;v=v.parentNode)for(var M=0;M<x.length;M++)if(x[M].node==v){e.display.currentWheelTarget=v;break e}}if(r&&!W&&!P&&a!=null){n&&f&&fi(e,Math.max(0,u.scrollTop+n*a)),Fr(e,Math.max(0,u.scrollLeft+r*a)),(!n||n&&f)&&ce(t),o.wheelStartX=null;return}if(n&&a!=null){var E=n*a,z=e.doc.scrollTop,q=z+o.wrapper.clientHeight;E<0?z=Math.max(0,z+E-50):q=Math.min(e.doc.height,q+E+50),Wn(e,{top:z,bottom:q})}Zi<20&&t.deltaMode!==0&&(o.wheelStartX==null?(o.wheelStartX=u.scrollLeft,o.wheelStartY=u.scrollTop,o.wheelDX=r,o.wheelDY=n,setTimeout(function(){if(o.wheelStartX!=null){var ae=u.scrollLeft-o.wheelStartX,se=u.scrollTop-o.wheelStartY,de=se&&o.wheelDY&&se/o.wheelDY||ae&&o.wheelDX&&ae/o.wheelDX;o.wheelStartX=o.wheelStartY=null,de&&(ar=(ar*Zi+de)/(Zi+1),++Zi)}},200)):(o.wheelDX+=r,o.wheelDY+=n))}}var Pt=function(e,t){this.ranges=e,this.primIndex=t};Pt.prototype.primary=function(){return this.ranges[this.primIndex]},Pt.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var i=this.ranges[t],r=e.ranges[t];if(!pn(i.anchor,r.anchor)||!pn(i.head,r.head))return!1}return!0},Pt.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Ke(gn(this.ranges[t].anchor),gn(this.ranges[t].head));return new Pt(e,this.primIndex)},Pt.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Pt.prototype.contains=function(e,t){t||(t=e);for(var i=0;i<this.ranges.length;i++){var r=this.ranges[i];if(Me(t,r.from())>=0&&Me(e,r.to())<=0)return i}return-1};var Ke=function(e,t){this.anchor=e,this.head=t};Ke.prototype.from=function(){return Mi(this.anchor,this.head)},Ke.prototype.to=function(){return Bi(this.anchor,this.head)},Ke.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Yt(e,t,i){var r=e&&e.options.selectionsMayTouch,n=t[i];t.sort(function(M,E){return Me(M.from(),E.from())}),i=je(t,n);for(var a=1;a<t.length;a++){var o=t[a],u=t[a-1],s=Me(u.to(),o.from());if(r&&!o.empty()?s>0:s>=0){var f=Mi(u.from(),o.from()),v=Bi(u.to(),o.to()),x=u.empty()?o.from()==o.head:u.from()==u.head;a<=i&&--i,t.splice(--a,2,new Ke(x?v:f,x?f:v))}}return new Pt(t,i)}function hr(e,t){return new Pt([new Ke(e,t||e)],0)}function dr(e){return e.text?re(e.from.line+e.text.length-1,Oe(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function co(e,t){if(Me(e,t.from)<0)return e;if(Me(e,t.to)<=0)return dr(t);var i=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=dr(t).ch-t.to.ch),re(i,r)}function Gn(e,t){for(var i=[],r=0;r<e.sel.ranges.length;r++){var n=e.sel.ranges[r];i.push(new Ke(co(n.anchor,t),co(n.head,t)))}return Yt(e.cm,i,e.sel.primIndex)}function ho(e,t,i){return e.line==t.line?re(i.line,e.ch-t.ch+i.ch):re(i.line+(e.line-t.line),e.ch)}function gu(e,t,i){for(var r=[],n=re(e.first,0),a=n,o=0;o<t.length;o++){var u=t[o],s=ho(u.from,n,a),f=ho(dr(u),n,a);if(n=u.to,a=f,i=="around"){var v=e.sel.ranges[o],x=Me(v.head,v.anchor)<0;r[o]=new Ke(x?f:s,x?s:f)}else r[o]=new Ke(s,s)}return new Pt(r,e.sel.primIndex)}function Kn(e){e.doc.mode=Gt(e.options,e.doc.modeOption),gi(e)}function gi(e){e.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,di(e,100),e.state.modeGen++,e.curOp&&Et(e)}function po(e,t){return t.from.ch==0&&t.to.ch==0&&Oe(t.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Xn(e,t,i,r){function n(de){return i?i[de]:null}function a(de,fe,ve){kl(de,fe,ve,r),dt(de,"change",de,t)}function o(de,fe){for(var ve=[],Fe=de;Fe<fe;++Fe)ve.push(new Or(f[Fe],n(Fe),r));return ve}var u=t.from,s=t.to,f=t.text,v=we(e,u.line),x=we(e,s.line),M=Oe(f),E=n(f.length-1),z=s.line-u.line;if(t.full)e.insert(0,o(0,f.length)),e.remove(f.length,e.size-f.length);else if(po(e,t)){var q=o(0,f.length-1);a(x,x.text,E),z&&e.remove(u.line,z),q.length&&e.insert(u.line,q)}else if(v==x)if(f.length==1)a(v,v.text.slice(0,u.ch)+M+v.text.slice(s.ch),E);else{var ae=o(1,f.length-1);ae.push(new Or(M+v.text.slice(s.ch),E,r)),a(v,v.text.slice(0,u.ch)+f[0],n(0)),e.insert(u.line+1,ae)}else if(f.length==1)a(v,v.text.slice(0,u.ch)+f[0]+x.text.slice(s.ch),n(0)),e.remove(u.line+1,z);else{a(v,v.text.slice(0,u.ch)+f[0],n(0)),a(x,M+x.text.slice(s.ch),E);var se=o(1,f.length-1);z>1&&e.remove(u.line+1,z-1),e.insert(u.line+1,se)}dt(e,"change",e,t)}function pr(e,t,i){function r(n,a,o){if(n.linked)for(var u=0;u<n.linked.length;++u){var s=n.linked[u];if(s.doc!=a){var f=o&&s.sharedHist;i&&!f||(t(s.doc,f),r(s.doc,n,f))}}}r(e,null,!0)}function go(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Nn(e),Kn(e),vo(e),e.options.direction=t.direction,e.options.lineWrapping||Cn(e),e.options.mode=t.modeOption,Et(e)}function vo(e){(e.doc.direction=="rtl"?Ce:Te)(e.display.lineDiv,"CodeMirror-rtl")}function vu(e){_t(e,function(){vo(e),Et(e)})}function Qi(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Yn(e,t){var i={from:gn(t.from),to:dr(t),text:Dr(e,t.from,t.to)};return yo(e,i,t.from.line,t.to.line+1),pr(e,function(r){return yo(r,i,t.from.line,t.to.line+1)},!0),i}function mo(e){for(;e.length;){var t=Oe(e);if(t.ranges)e.pop();else break}}function mu(e,t){if(t)return mo(e.done),Oe(e.done);if(e.done.length&&!Oe(e.done).ranges)return Oe(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Oe(e.done)}function xo(e,t,i,r){var n=e.history;n.undone.length=0;var a=+new Date,o,u;if((n.lastOp==r||n.lastOrigin==t.origin&&t.origin&&(t.origin.charAt(0)=="+"&&n.lastModTime>a-(e.cm?e.cm.options.historyEventDelay:500)||t.origin.charAt(0)=="*"))&&(o=mu(n,n.lastOp==r)))u=Oe(o.changes),Me(t.from,t.to)==0&&Me(t.from,u.to)==0?u.to=dr(t):o.changes.push(Yn(e,t));else{var s=Oe(n.done);for((!s||!s.ranges)&&Ji(e.sel,n.done),o={changes:[Yn(e,t)],generation:n.generation},n.done.push(o);n.done.length>n.undoDepth;)n.done.shift(),n.done[0].ranges||n.done.shift()}n.done.push(i),n.generation=++n.maxGeneration,n.lastModTime=n.lastSelTime=a,n.lastOp=n.lastSelOp=r,n.lastOrigin=n.lastSelOrigin=t.origin,u||C(e,"historyAdded")}function xu(e,t,i,r){var n=t.charAt(0);return n=="*"||n=="+"&&i.ranges.length==r.ranges.length&&i.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function yu(e,t,i,r){var n=e.history,a=r&&r.origin;i==n.lastSelOp||a&&n.lastSelOrigin==a&&(n.lastModTime==n.lastSelTime&&n.lastOrigin==a||xu(e,a,Oe(n.done),t))?n.done[n.done.length-1]=t:Ji(t,n.done),n.lastSelTime=+new Date,n.lastSelOrigin=a,n.lastSelOp=i,r&&r.clearRedo!==!1&&mo(n.undone)}function Ji(e,t){var i=Oe(t);i&&i.ranges&&i.equals(e)||t.push(e)}function yo(e,t,i,r){var n=t["spans_"+e.id],a=0;e.iter(Math.max(e.first,i),Math.min(e.first+e.size,r),function(o){o.markedSpans&&((n||(n=t["spans_"+e.id]={}))[a]=o.markedSpans),++a})}function Du(e){if(!e)return null;for(var t,i=0;i<e.length;++i)e[i].marker.explicitlyCleared?t||(t=e.slice(0,i)):t&&t.push(e[i]);return t?t.length?t:null:e}function bu(e,t){var i=t["spans_"+e.id];if(!i)return null;for(var r=[],n=0;n<t.text.length;++n)r.push(Du(i[n]));return r}function Do(e,t){var i=bu(e,t),r=xn(e,t);if(!i)return r;if(!r)return i;for(var n=0;n<i.length;++n){var a=i[n],o=r[n];if(a&&o)e:for(var u=0;u<o.length;++u){for(var s=o[u],f=0;f<a.length;++f)if(a[f].marker==s.marker)continue e;a.push(s)}else o&&(i[n]=o)}return i}function jr(e,t,i){for(var r=[],n=0;n<e.length;++n){var a=e[n];if(a.ranges){r.push(i?Pt.prototype.deepCopy.call(a):a);continue}var o=a.changes,u=[];r.push({changes:u});for(var s=0;s<o.length;++s){var f=o[s],v=void 0;if(u.push({from:f.from,to:f.to,text:f.text}),t)for(var x in f)(v=x.match(/^spans_(\d+)$/))&&je(t,Number(v[1]))>-1&&(Oe(u)[x]=f[x],delete f[x])}}return r}function Zn(e,t,i,r){if(r){var n=e.anchor;if(i){var a=Me(t,n)<0;a!=Me(i,n)<0?(n=t,t=i):a!=Me(t,i)<0&&(t=i)}return new Ke(n,t)}else return new Ke(i||t,t)}function $i(e,t,i,r,n){n==null&&(n=e.cm&&(e.cm.display.shift||e.extend)),bt(e,new Pt([Zn(e.sel.primary(),t,i,n)],0),r)}function bo(e,t,i){for(var r=[],n=e.cm&&(e.cm.display.shift||e.extend),a=0;a<e.sel.ranges.length;a++)r[a]=Zn(e.sel.ranges[a],t[a],null,n);var o=Yt(e.cm,r,e.sel.primIndex);bt(e,o,i)}function Qn(e,t,i,r){var n=e.sel.ranges.slice(0);n[t]=i,bt(e,Yt(e.cm,n,e.sel.primIndex),r)}function Co(e,t,i,r){bt(e,hr(t,i),r)}function Cu(e,t,i){var r={ranges:t.ranges,update:function(n){this.ranges=[];for(var a=0;a<n.length;a++)this.ranges[a]=new Ke(Ne(e,n[a].anchor),Ne(e,n[a].head))},origin:i&&i.origin};return C(e,"beforeSelectionChange",e,r),e.cm&&C(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Yt(e.cm,r.ranges,r.ranges.length-1):t}function ko(e,t,i){var r=e.history.done,n=Oe(r);n&&n.ranges?(r[r.length-1]=t,Vi(e,t,i)):bt(e,t,i)}function bt(e,t,i){Vi(e,t,i),yu(e,e.sel,e.cm?e.cm.curOp.id:NaN,i)}function Vi(e,t,i){(ke(e,"beforeSelectionChange")||e.cm&&ke(e.cm,"beforeSelectionChange"))&&(t=Cu(e,t,i));var r=i&&i.bias||(Me(t.primary().head,e.sel.primary().head)<0?-1:1);wo(e,Fo(e,t,r,!0)),!(i&&i.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Wr(e.cm)}function wo(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,he(e.cm)),dt(e,"cursorActivity",e))}function So(e){wo(e,Fo(e,e.sel,null,!1))}function Fo(e,t,i,r){for(var n,a=0;a<t.ranges.length;a++){var o=t.ranges[a],u=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[a],s=en(e,o.anchor,u&&u.anchor,i,r),f=o.head==o.anchor?s:en(e,o.head,u&&u.head,i,r);(n||s!=o.anchor||f!=o.head)&&(n||(n=t.ranges.slice(0,a)),n[a]=new Ke(s,f))}return n?Yt(e.cm,n,t.primIndex):t}function qr(e,t,i,r,n){var a=we(e,t.line);if(a.markedSpans)for(var o=0;o<a.markedSpans.length;++o){var u=a.markedSpans[o],s=u.marker,f="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,v="selectRight"in s?!s.selectRight:s.inclusiveRight;if((u.from==null||(f?u.from<=t.ch:u.from<t.ch))&&(u.to==null||(v?u.to>=t.ch:u.to>t.ch))){if(n&&(C(s,"beforeCursorEnter"),s.explicitlyCleared))if(a.markedSpans){--o;continue}else break;if(!s.atomic)continue;if(i){var x=s.find(r<0?1:-1),M=void 0;if((r<0?v:f)&&(x=Ao(e,x,-r,x&&x.line==t.line?a:null)),x&&x.line==t.line&&(M=Me(x,i))&&(r<0?M<0:M>0))return qr(e,x,t,r,n)}var E=s.find(r<0?-1:1);return(r<0?f:v)&&(E=Ao(e,E,r,E.line==t.line?a:null)),E?qr(e,E,t,r,n):null}}return t}function en(e,t,i,r,n){var a=r||1,o=qr(e,t,i,a,n)||!n&&qr(e,t,i,a,!0)||qr(e,t,i,-a,n)||!n&&qr(e,t,i,-a,!0);return o||(e.cantEdit=!0,re(e.first,0))}function Ao(e,t,i,r){return i<0&&t.ch==0?t.line>e.first?Ne(e,re(t.line-1)):null:i>0&&t.ch==(r||we(e,t.line)).text.length?t.line<e.first+e.size-1?re(t.line+1,0):null:new re(t.line,t.ch+i)}function Eo(e){e.setSelection(re(e.firstLine(),0),re(e.lastLine()),Ie)}function Lo(e,t,i){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return i&&(r.update=function(n,a,o,u){n&&(r.from=Ne(e,n)),a&&(r.to=Ne(e,a)),o&&(r.text=o),u!==void 0&&(r.origin=u)}),C(e,"beforeChange",e,r),e.cm&&C(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function Gr(e,t,i){if(e.cm){if(!e.cm.curOp)return pt(e.cm,Gr)(e,t,i);if(e.cm.state.suppressEdits)return}if(!((ke(e,"beforeChange")||e.cm&&ke(e.cm,"beforeChange"))&&(t=Lo(e,t,!0),!t))){var r=ya&&!i&&yl(e,t.from,t.to);if(r)for(var n=r.length-1;n>=0;--n)To(e,{from:r[n].from,to:r[n].to,text:n?[""]:t.text,origin:t.origin});else To(e,t)}}function To(e,t){if(!(t.text.length==1&&t.text[0]==""&&Me(t.from,t.to)==0)){var i=Gn(e,t);xo(e,t,i,e.cm?e.cm.curOp.id:NaN),vi(e,t,i,xn(e,t));var r=[];pr(e,function(n,a){!a&&je(r,n.history)==-1&&(Io(n.history,t),r.push(n.history)),vi(n,t,null,xn(n,t))})}}function tn(e,t,i){var r=e.cm&&e.cm.state.suppressEdits;if(!(r&&!i)){for(var n=e.history,a,o=e.sel,u=t=="undo"?n.done:n.undone,s=t=="undo"?n.undone:n.done,f=0;f<u.length&&(a=u[f],!(i?a.ranges&&!a.equals(e.sel):!a.ranges));f++);if(f!=u.length){for(n.lastOrigin=n.lastSelOrigin=null;;)if(a=u.pop(),a.ranges){if(Ji(a,s),i&&!a.equals(e.sel)){bt(e,a,{clearRedo:!1});return}o=a}else if(r){u.push(a);return}else break;var v=[];Ji(o,s),s.push({changes:v,generation:n.generation}),n.generation=a.generation||++n.maxGeneration;for(var x=ke(e,"beforeChange")||e.cm&&ke(e.cm,"beforeChange"),M=function(q){var ae=a.changes[q];if(ae.origin=t,x&&!Lo(e,ae,!1))return u.length=0,{};v.push(Yn(e,ae));var se=q?Gn(e,ae):Oe(u);vi(e,ae,se,Do(e,ae)),!q&&e.cm&&e.cm.scrollIntoView({from:ae.from,to:dr(ae)});var de=[];pr(e,function(fe,ve){!ve&&je(de,fe.history)==-1&&(Io(fe.history,ae),de.push(fe.history)),vi(fe,ae,null,Do(fe,ae))})},E=a.changes.length-1;E>=0;--E){var z=M(E);if(z)return z.v}}}}function Bo(e,t){if(t!=0&&(e.first+=t,e.sel=new Pt(It(e.sel.ranges,function(n){return new Ke(re(n.anchor.line+t,n.anchor.ch),re(n.head.line+t,n.head.ch))}),e.sel.primIndex),e.cm)){Et(e.cm,e.first,e.first-t,t);for(var i=e.cm.display,r=i.viewFrom;r<i.viewTo;r++)fr(e.cm,r,"gutter")}}function vi(e,t,i,r){if(e.cm&&!e.cm.curOp)return pt(e.cm,vi)(e,t,i,r);if(t.to.line<e.first){Bo(e,t.text.length-1-(t.to.line-t.from.line));return}if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var n=t.text.length-1-(e.first-t.from.line);Bo(e,n),t={from:re(e.first,0),to:re(t.to.line+n,t.to.ch),text:[Oe(t.text)],origin:t.origin}}var a=e.lastLine();t.to.line>a&&(t={from:t.from,to:re(a,we(e,a).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Dr(e,t.from,t.to),i||(i=Gn(e,t)),e.cm?ku(e.cm,t,r):Xn(e,t,r),Vi(e,i,Ie),e.cantEdit&&en(e,re(e.firstLine(),0))&&(e.cantEdit=!1)}}function ku(e,t,i){var r=e.doc,n=e.display,a=t.from,o=t.to,u=!1,s=a.line;e.options.lineWrapping||(s=Xe(Kt(we(r,a.line))),r.iter(s,o.line+1,function(E){if(E==n.maxLine)return u=!0,!0})),r.sel.contains(t.from,t.to)>-1&&he(e),Xn(r,t,i,Za(e)),e.options.lineWrapping||(r.iter(s,a.line+t.text.length,function(E){var z=Ri(E);z>n.maxLineLength&&(n.maxLine=E,n.maxLineLength=z,n.maxLineChanged=!0,u=!1)}),u&&(e.curOp.updateMaxLine=!0)),hl(r,a.line),di(e,400);var f=t.text.length-(o.line-a.line)-1;t.full?Et(e):a.line==o.line&&t.text.length==1&&!po(e.doc,t)?fr(e,a.line,"text"):Et(e,a.line,o.line+1,f);var v=ke(e,"changes"),x=ke(e,"change");if(x||v){var M={from:a,to:o,text:t.text,removed:t.removed,origin:t.origin};x&&dt(e,"change",e,M),v&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(M)}e.display.selForContextMenu=null}function Kr(e,t,i,r,n){var a;r||(r=i),Me(r,i)<0&&(a=[r,i],i=a[0],r=a[1]),typeof t=="string"&&(t=e.splitLines(t)),Gr(e,{from:i,to:r,text:t,origin:n})}function Mo(e,t,i,r){i<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function No(e,t,i,r){for(var n=0;n<e.length;++n){var a=e[n],o=!0;if(a.ranges){a.copied||(a=e[n]=a.deepCopy(),a.copied=!0);for(var u=0;u<a.ranges.length;u++)Mo(a.ranges[u].anchor,t,i,r),Mo(a.ranges[u].head,t,i,r);continue}for(var s=0;s<a.changes.length;++s){var f=a.changes[s];if(i<f.from.line)f.from=re(f.from.line+r,f.from.ch),f.to=re(f.to.line+r,f.to.ch);else if(t<=f.to.line){o=!1;break}}o||(e.splice(0,n+1),n=0)}}function Io(e,t){var i=t.from.line,r=t.to.line,n=t.text.length-(r-i)-1;No(e.done,i,r,n),No(e.undone,i,r,n)}function mi(e,t,i,r){var n=t,a=t;return typeof t=="number"?a=we(e,fa(e,t)):n=Xe(t),n==null?null:(r(a,n)&&e.cm&&fr(e.cm,n,i),a)}function xi(e){this.lines=e,this.parent=null;for(var t=0,i=0;i<e.length;++i)e[i].parent=this,t+=e[i].height;this.height=t}xi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var i=e,r=e+t;i<r;++i){var n=this.lines[i];this.height-=n.height,wl(n),dt(n,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,i){this.height+=i,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,i){for(var r=e+t;e<r;++e)if(i(this.lines[e]))return!0}};function yi(e){this.children=e;for(var t=0,i=0,r=0;r<e.length;++r){var n=e[r];t+=n.chunkSize(),i+=n.height,n.parent=this}this.size=t,this.height=i,this.parent=null}yi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var i=0;i<this.children.length;++i){var r=this.children[i],n=r.chunkSize();if(e<n){var a=Math.min(t,n-e),o=r.height;if(r.removeInner(e,a),this.height-=o-r.height,n==a&&(this.children.splice(i--,1),r.parent=null),(t-=a)==0)break;e=0}else e-=n}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof xi))){var u=[];this.collapse(u),this.children=[new xi(u)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,i){this.size+=t.length,this.height+=i;for(var r=0;r<this.children.length;++r){var n=this.children[r],a=n.chunkSize();if(e<=a){if(n.insertInner(e,t,i),n.lines&&n.lines.length>50){for(var o=n.lines.length%25+25,u=o;u<n.lines.length;){var s=new xi(n.lines.slice(u,u+=25));n.height-=s.height,this.children.splice(++r,0,s),s.parent=this}n.lines=n.lines.slice(0,o),this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),i=new yi(t);if(e.parent){e.size-=i.size,e.height-=i.height;var n=je(e.parent.children,e);e.parent.children.splice(n+1,0,i)}else{var r=new yi(e.children);r.parent=e,e.children=[r,i],e=r}i.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,i){for(var r=0;r<this.children.length;++r){var n=this.children[r],a=n.chunkSize();if(e<a){var o=Math.min(t,a-e);if(n.iterN(e,o,i))return!0;if((t-=o)==0)break;e=0}else e-=a}}};var Di=function(e,t,i){if(i)for(var r in i)i.hasOwnProperty(r)&&(this[r]=i[r]);this.doc=e,this.node=t};Di.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,i=this.line,r=Xe(i);if(!(r==null||!t)){for(var n=0;n<t.length;++n)t[n]==this&&t.splice(n--,1);t.length||(i.widgets=null);var a=oi(this);Qt(i,Math.max(0,i.height-a)),e&&(_t(e,function(){Oo(e,i,-a),fr(e,r,"widget")}),dt(e,"lineWidgetCleared",e,this,r))}},Di.prototype.changed=function(){var e=this,t=this.height,i=this.doc.cm,r=this.line;this.height=null;var n=oi(this)-t;n&&(sr(this.doc,r)||Qt(r,r.height+n),i&&_t(i,function(){i.curOp.forceUpdate=!0,Oo(i,r,n),dt(i,"lineWidgetChanged",i,e,Xe(r))}))},xe(Di);function Oo(e,t,i){ir(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&zn(e,i)}function wu(e,t,i,r){var n=new Di(e,i,r),a=e.cm;return a&&n.noHScroll&&(a.display.alignWidgets=!0),mi(e,t,"widget",function(o){var u=o.widgets||(o.widgets=[]);if(n.insertAt==null?u.push(n):u.splice(Math.min(u.length,Math.max(0,n.insertAt)),0,n),n.line=o,a&&!sr(e,o)){var s=ir(o)<e.scrollTop;Qt(o,o.height+oi(n)),s&&zn(a,n.height),a.curOp.forceUpdate=!0}return!0}),a&&dt(a,"lineWidgetAdded",a,n,typeof t=="number"?t:Xe(t)),n}var Ho=0,gr=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Ho};gr.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Er(e),ke(this,"clear")){var i=this.find();i&&dt(this,"clear",i.from,i.to)}for(var r=null,n=null,a=0;a<this.lines.length;++a){var o=this.lines[a],u=ii(o.markedSpans,this);e&&!this.collapsed?fr(e,Xe(o),"text"):e&&(u.to!=null&&(n=Xe(o)),u.from!=null&&(r=Xe(o))),o.markedSpans=gl(o.markedSpans,u),u.from==null&&this.collapsed&&!sr(this.doc,o)&&e&&Qt(o,Rr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var f=Kt(this.lines[s]),v=Ri(f);v>e.display.maxLineLength&&(e.display.maxLine=f,e.display.maxLineLength=v,e.display.maxLineChanged=!0)}r!=null&&e&&this.collapsed&&Et(e,r,n+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&So(e.doc)),e&&dt(e,"markerCleared",e,this,r,n),t&&Lr(e),this.parent&&this.parent.clear()}},gr.prototype.find=function(e,t){e==null&&this.type=="bookmark"&&(e=1);for(var i,r,n=0;n<this.lines.length;++n){var a=this.lines[n],o=ii(a.markedSpans,this);if(o.from!=null&&(i=re(t?a:Xe(a),o.from),e==-1))return i;if(o.to!=null&&(r=re(t?a:Xe(a),o.to),e==1))return r}return i&&{from:i,to:r}},gr.prototype.changed=function(){var e=this,t=this.find(-1,!0),i=this,r=this.doc.cm;!t||!r||_t(r,function(){var n=t.line,a=Xe(t.line),o=Fn(r,a);if(o&&(Wa(o),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!sr(i.doc,n)&&i.height!=null){var u=i.height;i.height=null;var s=oi(i)-u;s&&Qt(n,n.height+s)}dt(r,"markerChanged",r,e)})},gr.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(!t.maybeHiddenMarkers||je(t.maybeHiddenMarkers,this)==-1)&&(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},gr.prototype.detachLine=function(e){if(this.lines.splice(je(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},xe(gr);function Xr(e,t,i,r,n){if(r&&r.shared)return Su(e,t,i,r,n);if(e.cm&&!e.cm.curOp)return pt(e.cm,Xr)(e,t,i,r,n);var a=new gr(e,n),o=Me(t,i);if(r&&Le(r,a,!1),o>0||o==0&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=Re("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(Sa(e,t.line,t,i,a)||t.line!=i.line&&Sa(e,i.line,t,i,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");pl()}a.addToHistory&&xo(e,{from:t,to:i,origin:"markText"},e.sel,NaN);var u=t.line,s=e.cm,f;if(e.iter(u,i.line+1,function(x){s&&a.collapsed&&!s.options.lineWrapping&&Kt(x)==s.display.maxLine&&(f=!0),a.collapsed&&u!=t.line&&Qt(x,0),vl(x,new Ii(a,u==t.line?t.ch:null,u==i.line?i.ch:null),e.cm&&e.cm.curOp),++u}),a.collapsed&&e.iter(t.line,i.line+1,function(x){sr(e,x)&&Qt(x,0)}),a.clearOnEnter&&S(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(dl(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Ho,a.atomic=!0),s){if(f&&(s.curOp.updateMaxLine=!0),a.collapsed)Et(s,t.line,i.line+1);else if(a.className||a.startStyle||a.endStyle||a.css||a.attributes||a.title)for(var v=t.line;v<=i.line;v++)fr(s,v,"text");a.atomic&&So(s.doc),dt(s,"markerAdded",s,a)}return a}var bi=function(e,t){this.markers=e,this.primary=t;for(var i=0;i<e.length;++i)e[i].parent=this};bi.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();dt(this,"clear")}},bi.prototype.find=function(e,t){return this.primary.find(e,t)},xe(bi);function Su(e,t,i,r,n){r=Le(r),r.shared=!1;var a=[Xr(e,t,i,r,n)],o=a[0],u=r.widgetNode;return pr(e,function(s){u&&(r.widgetNode=u.cloneNode(!0)),a.push(Xr(s,Ne(s,t),Ne(s,i),r,n));for(var f=0;f<s.linked.length;++f)if(s.linked[f].isParent)return;o=Oe(a)}),new bi(a,o)}function _o(e){return e.findMarks(re(e.first,0),e.clipPos(re(e.lastLine())),function(t){return t.parent})}function Fu(e,t){for(var i=0;i<t.length;i++){var r=t[i],n=r.find(),a=e.clipPos(n.from),o=e.clipPos(n.to);if(Me(a,o)){var u=Xr(e,a,o,r.primary,r.primary.type);r.markers.push(u),u.parent=r}}}function Au(e){for(var t=function(r){var n=e[r],a=[n.primary.doc];pr(n.primary.doc,function(s){return a.push(s)});for(var o=0;o<n.markers.length;o++){var u=n.markers[o];je(a,u.doc)==-1&&(u.parent=null,n.markers.splice(o--,1))}},i=0;i<e.length;i++)t(i)}var Eu=0,Lt=function(e,t,i,r,n){if(!(this instanceof Lt))return new Lt(e,t,i,r,n);i==null&&(i=0),yi.call(this,[new xi([new Or("",null)])]),this.first=i,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=i;var a=re(i,0);this.sel=hr(a),this.history=new Qi(null),this.id=++Eu,this.modeOption=t,this.lineSep=r,this.direction=n=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Xn(this,{from:a,to:a,text:e}),bt(this,hr(a),Ie)};Lt.prototype=Pe(yi.prototype,{constructor:Lt,iter:function(e,t,i){i?this.iterN(e-this.first,t-e,i):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var i=0,r=0;r<t.length;++r)i+=t[r].height;this.insertInner(e-this.first,t,i)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=hn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:gt(function(e){var t=re(this.first,0),i=this.first+this.size-1;Gr(this,{from:t,to:re(i,we(this,i).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&si(this.cm,0,0),bt(this,hr(t),Ie)}),replaceRange:function(e,t,i,r){t=Ne(this,t),i=i?Ne(this,i):t,Kr(this,e,t,i,r)},getRange:function(e,t,i){var r=Dr(this,Ne(this,e),Ne(this,t));return i===!1?r:i===""?r.join(""):r.join(i||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(ti(this,e))return we(this,e)},getLineNumber:function(e){return Xe(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=we(this,e)),Kt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Ne(this,e)},getCursor:function(e){var t=this.sel.primary(),i;return e==null||e=="head"?i=t.head:e=="anchor"?i=t.anchor:e=="end"||e=="to"||e===!1?i=t.to():i=t.from(),i},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:gt(function(e,t,i){Co(this,Ne(this,typeof e=="number"?re(e,t||0):e),null,i)}),setSelection:gt(function(e,t,i){Co(this,Ne(this,e),Ne(this,t||e),i)}),extendSelection:gt(function(e,t,i){$i(this,Ne(this,e),t&&Ne(this,t),i)}),extendSelections:gt(function(e,t){bo(this,ca(this,e),t)}),extendSelectionsBy:gt(function(e,t){var i=It(this.sel.ranges,e);bo(this,ca(this,i),t)}),setSelections:gt(function(e,t,i){if(e.length){for(var r=[],n=0;n<e.length;n++)r[n]=new Ke(Ne(this,e[n].anchor),Ne(this,e[n].head||e[n].anchor));t==null&&(t=Math.min(e.length-1,this.sel.primIndex)),bt(this,Yt(this.cm,r,t),i)}}),addSelection:gt(function(e,t,i){var r=this.sel.ranges.slice(0);r.push(new Ke(Ne(this,e),Ne(this,t||e))),bt(this,Yt(this.cm,r,r.length-1),i)}),getSelection:function(e){for(var t=this.sel.ranges,i,r=0;r<t.length;r++){var n=Dr(this,t[r].from(),t[r].to());i=i?i.concat(n):n}return e===!1?i:i.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],i=this.sel.ranges,r=0;r<i.length;r++){var n=Dr(this,i[r].from(),i[r].to());e!==!1&&(n=n.join(e||this.lineSeparator())),t[r]=n}return t},replaceSelection:function(e,t,i){for(var r=[],n=0;n<this.sel.ranges.length;n++)r[n]=e;this.replaceSelections(r,t,i||"+input")},replaceSelections:gt(function(e,t,i){for(var r=[],n=this.sel,a=0;a<n.ranges.length;a++){var o=n.ranges[a];r[a]={from:o.from(),to:o.to(),text:this.splitLines(e[a]),origin:i}}for(var u=t&&t!="end"&&gu(this,r,t),s=r.length-1;s>=0;s--)Gr(this,r[s]);u?ko(this,u):this.cm&&Wr(this.cm)}),undo:gt(function(){tn(this,"undo")}),redo:gt(function(){tn(this,"redo")}),undoSelection:gt(function(){tn(this,"undo",!0)}),redoSelection:gt(function(){tn(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,i=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var n=0;n<e.undone.length;n++)e.undone[n].ranges||++i;return{undo:t,redo:i}},clearHistory:function(){var e=this;this.history=new Qi(this.history),pr(this,function(t){return t.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:jr(this.history.done),undone:jr(this.history.undone)}},setHistory:function(e){var t=this.history=new Qi(this.history);t.done=jr(e.done.slice(0),null,!0),t.undone=jr(e.undone.slice(0),null,!0)},setGutterMarker:gt(function(e,t,i){return mi(this,e,"gutter",function(r){var n=r.gutterMarkers||(r.gutterMarkers={});return n[t]=i,!i&&O(n)&&(r.gutterMarkers=null),!0})}),clearGutter:gt(function(e){var t=this;this.iter(function(i){i.gutterMarkers&&i.gutterMarkers[e]&&mi(t,i,"gutter",function(){return i.gutterMarkers[e]=null,O(i.gutterMarkers)&&(i.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if(typeof e=="number"){if(!ti(this,e)||(t=e,e=we(this,e),!e))return null}else if(t=Xe(e),t==null)return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:gt(function(e,t,i){return mi(this,e,t=="gutter"?"gutter":"class",function(r){var n=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass";if(!r[n])r[n]=i;else{if(ge(i).test(r[n]))return!1;r[n]+=" "+i}return!0})}),removeLineClass:gt(function(e,t,i){return mi(this,e,t=="gutter"?"gutter":"class",function(r){var n=t=="text"?"textClass":t=="background"?"bgClass":t=="gutter"?"gutterClass":"wrapClass",a=r[n];if(a)if(i==null)r[n]=null;else{var o=a.match(ge(i));if(!o)return!1;var u=o.index+o[0].length;r[n]=a.slice(0,o.index)+(!o.index||u==a.length?"":" ")+a.slice(u)||null}else return!1;return!0})}),addLineWidget:gt(function(e,t,i){return wu(this,e,t,i)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,i){return Xr(this,Ne(this,e),Ne(this,t),i,i&&i.type||"range")},setBookmark:function(e,t){var i={replacedWith:t&&(t.nodeType==null?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=Ne(this,e),Xr(this,e,e,i,"bookmark")},findMarksAt:function(e){e=Ne(this,e);var t=[],i=we(this,e.line).markedSpans;if(i)for(var r=0;r<i.length;++r){var n=i[r];(n.from==null||n.from<=e.ch)&&(n.to==null||n.to>=e.ch)&&t.push(n.marker.parent||n.marker)}return t},findMarks:function(e,t,i){e=Ne(this,e),t=Ne(this,t);var r=[],n=e.line;return this.iter(e.line,t.line+1,function(a){var o=a.markedSpans;if(o)for(var u=0;u<o.length;u++){var s=o[u];!(s.to!=null&&n==e.line&&e.ch>=s.to||s.from==null&&n!=e.line||s.from!=null&&n==t.line&&s.from>=t.ch)&&(!i||i(s.marker))&&r.push(s.marker.parent||s.marker)}++n}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var i=t.markedSpans;if(i)for(var r=0;r<i.length;++r)i[r].from!=null&&e.push(i[r].marker)}),e},posFromIndex:function(e){var t,i=this.first,r=this.lineSeparator().length;return this.iter(function(n){var a=n.text.length+r;if(a>e)return t=e,!0;e-=a,++i}),Ne(this,re(i,t))},indexFromPos:function(e){e=Ne(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var i=this.lineSeparator().length;return this.iter(this.first,e.line,function(r){t+=r.text.length+i}),t},copy:function(e){var t=new Lt(hn(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,i=this.first+this.size;e.from!=null&&e.from>t&&(t=e.from),e.to!=null&&e.to<i&&(i=e.to);var r=new Lt(hn(this,t,i),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],Fu(r,_o(this)),r},unlinkDoc:function(e){if(e instanceof et&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){var i=this.linked[t];if(i.doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Au(_o(this));break}}if(e.history==this.history){var r=[e.id];pr(e,function(n){return r.push(n.id)},!0),e.history=new Qi(null),e.history.done=jr(this.history.done,r),e.history.undone=jr(this.history.undone,r)}},iterLinkedDocs:function(e){pr(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Nr(e)},lineSeparator:function(){return this.lineSep||`
`},setDirection:gt(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&vu(this.cm))})}),Lt.prototype.eachLine=Lt.prototype.iter;var Ro=0;function Lu(e){var t=this;if(zo(t),!(ee(t,e)||nr(t.display,e))){ce(e),L&&(Ro=+new Date);var i=wr(t,e,!0),r=e.dataTransfer.files;if(!(!i||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var n=r.length,a=Array(n),o=0,u=function(){++o==n&&pt(t,function(){i=Ne(t.doc,i);var E={from:i,to:i,text:t.doc.splitLines(a.filter(function(z){return z!=null}).join(t.doc.lineSeparator())),origin:"paste"};Gr(t.doc,E),ko(t.doc,hr(Ne(t.doc,i),Ne(t.doc,dr(E))))})()},s=function(E,z){if(t.options.allowDropFileTypes&&je(t.options.allowDropFileTypes,E.type)==-1){u();return}var q=new FileReader;q.onerror=function(){return u()},q.onload=function(){var ae=q.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ae)){u();return}a[z]=ae,u()},q.readAsText(E)},f=0;f<r.length;f++)s(r[f],f);else{if(t.state.draggingText&&t.doc.sel.contains(i)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var v=e.dataTransfer.getData("Text");if(v){var x;if(t.state.draggingText&&!t.state.draggingText.copy&&(x=t.listSelections()),Vi(t.doc,hr(i,i)),x)for(var M=0;M<x.length;++M)Kr(t.doc,"",x[M].anchor,x[M].head,"drag");t.replaceSelection(v,"around","paste"),t.display.input.focus()}}catch{}}}}function Tu(e,t){if(L&&(!e.state.draggingText||+new Date-Ro<100)){Be(t);return}if(!(ee(e,t)||nr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!oe)){var i=J("img",null,null,"position: fixed; left: 0; top: 0;");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",P&&(i.width=i.height=1,e.display.wrapper.appendChild(i),i._top=i.offsetTop),t.dataTransfer.setDragImage(i,0,0),P&&i.parentNode.removeChild(i)}}function Bu(e,t){var i=wr(e,t);if(i){var r=document.createDocumentFragment();In(e,i,r),e.display.dragCursor||(e.display.dragCursor=J("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),Ae(e.display.dragCursor,r)}}function zo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Po(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),i=[],r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&i.push(n)}i.length&&i[0].operation(function(){for(var a=0;a<i.length;a++)e(i[a])})}}var Wo=!1;function Mu(){Wo||(Nu(),Wo=!0)}function Nu(){var e;S(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,Po(Iu)},100))}),S(window,"blur",function(){return Po(Pr)})}function Iu(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var vr={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ci=0;Ci<10;Ci++)vr[Ci+48]=vr[Ci+96]=String(Ci);for(var rn=65;rn<=90;rn++)vr[rn]=String.fromCharCode(rn);for(var ki=1;ki<=12;ki++)vr[ki+111]=vr[ki+63235]="F"+ki;var or={};or.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},or.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},or.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},or.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},or.default=U?or.macDefault:or.pcDefault;function Ou(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var i,r,n,a,o=0;o<t.length-1;o++){var u=t[o];if(/^(cmd|meta|m)$/i.test(u))a=!0;else if(/^a(lt)?$/i.test(u))i=!0;else if(/^(c|ctrl|control)$/i.test(u))r=!0;else if(/^s(hift)?$/i.test(u))n=!0;else throw new Error("Unrecognized modifier name: "+u)}return i&&(e="Alt-"+e),r&&(e="Ctrl-"+e),a&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Hu(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var r=e[i];if(/^(name|fallthrough|(de|at)tach)$/.test(i))continue;if(r=="..."){delete e[i];continue}for(var n=It(i.split(" "),Ou),a=0;a<n.length;a++){var o=void 0,u=void 0;a==n.length-1?(u=n.join(" "),o=r):(u=n.slice(0,a+1).join(" "),o="...");var s=t[u];if(!s)t[u]=o;else if(s!=o)throw new Error("Inconsistent bindings for "+u)}delete e[i]}for(var f in t)e[f]=t[f];return e}function Yr(e,t,i,r){t=nn(t);var n=t.call?t.call(e,r):t[e];if(n===!1)return"nothing";if(n==="...")return"multi";if(n!=null&&i(n))return"handled";if(t.fallthrough){if(Object.prototype.toString.call(t.fallthrough)!="[object Array]")return Yr(e,t.fallthrough,i,r);for(var a=0;a<t.fallthrough.length;a++){var o=Yr(e,t.fallthrough[a],i,r);if(o)return o}}}function Uo(e){var t=typeof e=="string"?e:vr[e.keyCode];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function jo(e,t,i){var r=e;return t.altKey&&r!="Alt"&&(e="Alt-"+e),(ue?t.metaKey:t.ctrlKey)&&r!="Ctrl"&&(e="Ctrl-"+e),(ue?t.ctrlKey:t.metaKey)&&r!="Mod"&&(e="Cmd-"+e),!i&&t.shiftKey&&r!="Shift"&&(e="Shift-"+e),e}function qo(e,t){if(P&&e.keyCode==34&&e.char)return!1;var i=vr[e.keyCode];return i==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(i=e.code),jo(i,e,t))}function nn(e){return typeof e=="string"?or[e]:e}function Zr(e,t){for(var i=e.doc.sel.ranges,r=[],n=0;n<i.length;n++){for(var a=t(i[n]);r.length&&Me(a.from,Oe(r).to)<=0;){var o=r.pop();if(Me(o.from,a.from)<0){a.from=o.from;break}}r.push(a)}_t(e,function(){for(var u=r.length-1;u>=0;u--)Kr(e.doc,"",r[u].from,r[u].to,"+delete");Wr(e)})}function Jn(e,t,i){var r=p(e.text,t+i,i);return r<0||r>e.text.length?null:r}function $n(e,t,i){var r=Jn(e,t.ch,i);return r==null?null:new re(t.line,r,i<0?"after":"before")}function Vn(e,t,i,r,n){if(e){t.doc.direction=="rtl"&&(n=-n);var a=y(i,t.doc.direction);if(a){var o=n<0?Oe(a):a[0],u=n<0==(o.level==1),s=u?"after":"before",f;if(o.level>0||t.doc.direction=="rtl"){var v=_r(t,i);f=n<0?i.text.length-1:0;var x=Vt(t,v,f).top;f=g(function(M){return Vt(t,v,M).top==x},n<0==(o.level==1)?o.from:o.to-1,f),s=="before"&&(f=Jn(i,f,1))}else f=n<0?o.to:o.from;return new re(r,f,s)}}return new re(r,n<0?i.text.length:0,n<0?"before":"after")}function _u(e,t,i,r){var n=y(t,e.doc.direction);if(!n)return $n(t,i,r);i.ch>=t.text.length?(i.ch=t.text.length,i.sticky="before"):i.ch<=0&&(i.ch=0,i.sticky="after");var a=d(n,i.ch,i.sticky),o=n[a];if(e.doc.direction=="ltr"&&o.level%2==0&&(r>0?o.to>i.ch:o.from<i.ch))return $n(t,i,r);var u=function(se,de){return Jn(t,se instanceof re?se.ch:se,de)},s,f=function(se){return e.options.lineWrapping?(s=s||_r(e,t),Ya(e,t,s,se)):{begin:0,end:t.text.length}},v=f(i.sticky=="before"?u(i,-1):i.ch);if(e.doc.direction=="rtl"||o.level==1){var x=o.level==1==r<0,M=u(i,x?1:-1);if(M!=null&&(x?M<=o.to&&M<=v.end:M>=o.from&&M>=v.begin)){var E=x?"before":"after";return new re(i.line,M,E)}}var z=function(se,de,fe){for(var ve=function(Ze,vt){return vt?new re(i.line,u(Ze,1),"before"):new re(i.line,Ze,"after")};se>=0&&se<n.length;se+=de){var Fe=n[se],Se=de>0==(Fe.level!=1),He=Se?fe.begin:u(fe.end,-1);if(Fe.from<=He&&He<Fe.to||(He=Se?Fe.from:u(Fe.to,-1),fe.begin<=He&&He<fe.end))return ve(He,Se)}},q=z(a+r,r,v);if(q)return q;var ae=r>0?v.end:u(v.begin,-1);return ae!=null&&!(r>0&&ae==t.text.length)&&(q=z(r>0?0:n.length-1,r,f(ae)),q)?q:null}var wi={selectAll:Eo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Ie)},killLine:function(e){return Zr(e,function(t){if(t.empty()){var i=we(e.doc,t.head.line).text.length;return t.head.ch==i&&t.head.line<e.lastLine()?{from:t.head,to:re(t.head.line+1,0)}:{from:t.head,to:re(t.head.line,i)}}else return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Zr(e,function(t){return{from:re(t.from().line,0),to:Ne(e.doc,re(t.to().line+1,0))}})},delLineLeft:function(e){return Zr(e,function(t){return{from:re(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(e){return Zr(e,function(t){var i=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:i},"div");return{from:r,to:t.from()}})},delWrappedLineRight:function(e){return Zr(e,function(t){var i=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div");return{from:t.from(),to:r}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(re(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(re(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Go(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Ko(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return Ru(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:i},"div")},wt)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:i},"div")},wt)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var i=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:i},"div");return r.ch<e.getLine(r.line).search(/\S/)?Ko(e,t.head):r},wt)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var t=[],i=e.listSelections(),r=e.options.tabSize,n=0;n<i.length;n++){var a=i[n].from(),o=Ge(e.getLine(a.line),a.ch,r);t.push(Nt(r-o%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return _t(e,function(){for(var t=e.listSelections(),i=[],r=0;r<t.length;r++)if(t[r].empty()){var n=t[r].head,a=we(e.doc,n.line).text;if(a){if(n.ch==a.length&&(n=new re(n.line,n.ch-1)),n.ch>0)n=new re(n.line,n.ch+1),e.replaceRange(a.charAt(n.ch-1)+a.charAt(n.ch-2),re(n.line,n.ch-2),n,"+transpose");else if(n.line>e.doc.first){var o=we(e.doc,n.line-1).text;o&&(n=new re(n.line,1),e.replaceRange(a.charAt(0)+e.doc.lineSeparator()+o.charAt(o.length-1),re(n.line-1,o.length-1),n,"+transpose"))}}i.push(new Ke(n,n))}e.setSelections(i)})},newlineAndIndent:function(e){return _t(e,function(){for(var t=e.listSelections(),i=t.length-1;i>=0;i--)e.replaceRange(e.doc.lineSeparator(),t[i].anchor,t[i].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Wr(e)})},openLine:function(e){return e.replaceSelection(`
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Go(e,t){var i=we(e.doc,t),r=Kt(i);return r!=i&&(t=Xe(r)),Vn(!0,e,r,t,1)}function Ru(e,t){var i=we(e.doc,t),r=bl(i);return r!=i&&(t=Xe(r)),Vn(!0,e,i,t,-1)}function Ko(e,t){var i=Go(e,t.line),r=we(e.doc,i.line),n=y(r,e.doc.direction);if(!n||n[0].level==0){var a=Math.max(i.ch,r.text.search(/\S/)),o=t.line==i.line&&t.ch<=a&&t.ch;return re(i.line,o?0:a,i.sticky)}return i}function an(e,t,i){if(typeof t=="string"&&(t=wi[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i&&(e.display.shift=!1),n=t(e)!=lt}finally{e.display.shift=r,e.state.suppressEdits=!1}return n}function zu(e,t,i){for(var r=0;r<e.state.keyMaps.length;r++){var n=Yr(t,e.state.keyMaps[r],i,e);if(n)return n}return e.options.extraKeys&&Yr(t,e.options.extraKeys,i,e)||Yr(t,e.options.keyMap,i,e)}var Pu=new Qe;function Si(e,t,i,r){var n=e.state.keySeq;if(n){if(Uo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:Pu.set(50,function(){e.state.keySeq==n&&(e.state.keySeq=null,e.display.input.reset())}),Xo(e,n+" "+t,i,r))return!0}return Xo(e,t,i,r)}function Xo(e,t,i,r){var n=zu(e,t,r);return n=="multi"&&(e.state.keySeq=t),n=="handled"&&dt(e,"keyHandled",e,t,i),(n=="handled"||n=="multi")&&(ce(i),On(e)),!!n}function Yo(e,t){var i=qo(t,!0);return i?t.shiftKey&&!e.state.keySeq?Si(e,"Shift-"+i,t,function(r){return an(e,r,!0)})||Si(e,i,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return an(e,r)}):Si(e,i,t,function(r){return an(e,r)}):!1}function Wu(e,t,i){return Si(e,"'"+i+"'",t,function(r){return an(e,r,!0)})}var ea=null;function Zo(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=$(k(t)),!ee(t,e))){L&&A<11&&e.keyCode==27&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=i==16||e.shiftKey;var r=Yo(t,e);P&&(ea=r?i:null,!r&&i==88&&!fn&&(U?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),W&&!U&&!r&&i==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),i==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&Uu(t)}}function Uu(e){var t=e.display.lineDiv;Ce(t,"CodeMirror-crosshair");function i(r){(r.keyCode==18||!r.altKey)&&(Te(t,"CodeMirror-crosshair"),w(document,"keyup",i),w(document,"mouseover",i))}S(document,"keyup",i),S(document,"mouseover",i)}function Qo(e){e.keyCode==16&&(this.doc.sel.shift=!1),ee(this,e)}function Jo(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(nr(t.display,e)||ee(t,e)||e.ctrlKey&&!e.altKey||U&&e.metaKey)){var i=e.keyCode,r=e.charCode;if(P&&i==ea){ea=null,ce(e);return}if(!(P&&(!e.which||e.which<10)&&Yo(t,e))){var n=String.fromCharCode(r??i);n!="\b"&&(Wu(t,e,n)||t.display.input.onKeyPress(e))}}}var ju=400,ta=function(e,t,i){this.time=e,this.pos=t,this.button=i};ta.prototype.compare=function(e,t,i){return this.time+ju>e&&Me(t,this.pos)==0&&i==this.button};var Fi,Ai;function qu(e,t){var i=+new Date;return Ai&&Ai.compare(i,e,t)?(Fi=Ai=null,"triple"):Fi&&Fi.compare(i,e,t)?(Ai=new ta(i,e,t),Fi=null,"double"):(Fi=new ta(i,e,t),Ai=null,"single")}function $o(e){var t=this,i=t.display;if(!(ee(t,e)||i.activeTouch&&i.input.supportsTouch())){if(i.input.ensurePolled(),i.shift=e.shiftKey,nr(i,e)){N||(i.scroller.draggable=!1,setTimeout(function(){return i.scroller.draggable=!0},100));return}if(!ra(t,e)){var r=wr(t,e),n=$e(e),a=r?qu(r,n):"single";K(t).focus(),n==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&Gu(t,n,r,a,e))&&(n==1?r?Xu(t,r,a,e):ze(e)==i.scroller&&ce(e):n==2?(r&&$i(t.doc,r),setTimeout(function(){return i.input.focus()},20)):n==3&&(ie?t.display.input.onContextMenu(e):Hn(t)))}}}function Gu(e,t,i,r,n){var a="Click";return r=="double"?a="Double"+a:r=="triple"&&(a="Triple"+a),a=(t==1?"Left":t==2?"Middle":"Right")+a,Si(e,jo(a,n),n,function(o){if(typeof o=="string"&&(o=wi[o]),!o)return!1;var u=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),u=o(e,i)!=lt}finally{e.state.suppressEdits=!1}return u})}function Ku(e,t,i){var r=e.getOption("configureMouse"),n=r?r(e,t,i):{};if(n.unit==null){var a=j?i.shiftKey&&i.metaKey:i.altKey;n.unit=a?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(n.extend==null||e.doc.extend)&&(n.extend=e.doc.extend||i.shiftKey),n.addNew==null&&(n.addNew=U?i.metaKey:i.ctrlKey),n.moveOnDrag==null&&(n.moveOnDrag=!(U?i.altKey:i.ctrlKey)),n}function Xu(e,t,i,r){L?setTimeout(ne($a,e),0):e.curOp.focus=$(k(e));var n=Ku(e,i,r),a=e.doc.sel,o;e.options.dragDrop&&Ve&&!e.isReadOnly()&&i=="single"&&(o=a.contains(t))>-1&&(Me((o=a.ranges[o]).from(),t)<0||t.xRel>0)&&(Me(o.to(),t)>0||t.xRel<0)?Yu(e,r,t,n):Zu(e,r,t,n)}function Yu(e,t,i,r){var n=e.display,a=!1,o=pt(e,function(f){N&&(n.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Hn(e)),w(n.wrapper.ownerDocument,"mouseup",o),w(n.wrapper.ownerDocument,"mousemove",u),w(n.scroller,"dragstart",s),w(n.scroller,"drop",o),a||(ce(f),r.addNew||$i(e.doc,i,null,null,r.extend),N&&!oe||L&&A==9?setTimeout(function(){n.wrapper.ownerDocument.body.focus({preventScroll:!0}),n.input.focus()},20):n.input.focus())}),u=function(f){a=a||Math.abs(t.clientX-f.clientX)+Math.abs(t.clientY-f.clientY)>=10},s=function(){return a=!0};N&&(n.scroller.draggable=!0),e.state.draggingText=o,o.copy=!r.moveOnDrag,S(n.wrapper.ownerDocument,"mouseup",o),S(n.wrapper.ownerDocument,"mousemove",u),S(n.scroller,"dragstart",s),S(n.scroller,"drop",o),e.state.delayingBlurEvent=!0,setTimeout(function(){return n.input.focus()},20),n.scroller.dragDrop&&n.scroller.dragDrop()}function Vo(e,t,i){if(i=="char")return new Ke(t,t);if(i=="word")return e.findWordAt(t);if(i=="line")return new Ke(re(t.line,0),Ne(e.doc,re(t.line+1,0)));var r=i(e,t);return new Ke(r.from,r.to)}function Zu(e,t,i,r){L&&Hn(e);var n=e.display,a=e.doc;ce(t);var o,u,s=a.sel,f=s.ranges;if(r.addNew&&!r.extend?(u=a.sel.contains(i),u>-1?o=f[u]:o=new Ke(i,i)):(o=a.sel.primary(),u=a.sel.primIndex),r.unit=="rectangle")r.addNew||(o=new Ke(i,i)),i=wr(e,t,!0,!0),u=-1;else{var v=Vo(e,i,r.unit);r.extend?o=Zn(o,v.anchor,v.head,r.extend):o=v}r.addNew?u==-1?(u=f.length,bt(a,Yt(e,f.concat([o]),u),{scroll:!1,origin:"*mouse"})):f.length>1&&f[u].empty()&&r.unit=="char"&&!r.extend?(bt(a,Yt(e,f.slice(0,u).concat(f.slice(u+1)),0),{scroll:!1,origin:"*mouse"}),s=a.sel):Qn(a,u,o,qe):(u=0,bt(a,new Pt([o],0),qe),s=a.sel);var x=i;function M(fe){if(Me(x,fe)!=0)if(x=fe,r.unit=="rectangle"){for(var ve=[],Fe=e.options.tabSize,Se=Ge(we(a,i.line).text,i.ch,Fe),He=Ge(we(a,fe.line).text,fe.ch,Fe),Ze=Math.min(Se,He),vt=Math.max(Se,He),tt=Math.min(i.line,fe.line),Rt=Math.min(e.lastLine(),Math.max(i.line,fe.line));tt<=Rt;tt++){var Tt=we(a,tt).text,st=jt(Tt,Ze,Fe);Ze==vt?ve.push(new Ke(re(tt,st),re(tt,st))):Tt.length>st&&ve.push(new Ke(re(tt,st),re(tt,jt(Tt,vt,Fe))))}ve.length||ve.push(new Ke(i,i)),bt(a,Yt(e,s.ranges.slice(0,u).concat(ve),u),{origin:"*mouse",scroll:!1}),e.scrollIntoView(fe)}else{var Bt=o,Dt=Vo(e,fe,r.unit),ht=Bt.anchor,ft;Me(Dt.anchor,ht)>0?(ft=Dt.head,ht=Mi(Bt.from(),Dt.anchor)):(ft=Dt.anchor,ht=Bi(Bt.to(),Dt.head));var it=s.ranges.slice(0);it[u]=Qu(e,new Ke(Ne(a,ht),ft)),bt(a,Yt(e,it,u),qe)}}var E=n.wrapper.getBoundingClientRect(),z=0;function q(fe){var ve=++z,Fe=wr(e,fe,!0,r.unit=="rectangle");if(Fe)if(Me(Fe,x)!=0){e.curOp.focus=$(k(e)),M(Fe);var Se=Ki(n,a);(Fe.line>=Se.to||Fe.line<Se.from)&&setTimeout(pt(e,function(){z==ve&&q(fe)}),150)}else{var He=fe.clientY<E.top?-20:fe.clientY>E.bottom?20:0;He&&setTimeout(pt(e,function(){z==ve&&(n.scroller.scrollTop+=He,q(fe))}),50)}}function ae(fe){e.state.selectingText=!1,z=1/0,fe&&(ce(fe),n.input.focus()),w(n.wrapper.ownerDocument,"mousemove",se),w(n.wrapper.ownerDocument,"mouseup",de),a.history.lastSelOrigin=null}var se=pt(e,function(fe){fe.buttons===0||!$e(fe)?ae(fe):q(fe)}),de=pt(e,ae);e.state.selectingText=de,S(n.wrapper.ownerDocument,"mousemove",se),S(n.wrapper.ownerDocument,"mouseup",de)}function Qu(e,t){var i=t.anchor,r=t.head,n=we(e.doc,i.line);if(Me(i,r)==0&&i.sticky==r.sticky)return t;var a=y(n);if(!a)return t;var o=d(a,i.ch,i.sticky),u=a[o];if(u.from!=i.ch&&u.to!=i.ch)return t;var s=o+(u.from==i.ch==(u.level!=1)?0:1);if(s==0||s==a.length)return t;var f;if(r.line!=i.line)f=(r.line-i.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var v=d(a,r.ch,r.sticky),x=v-o||(r.ch-i.ch)*(u.level==1?-1:1);v==s-1||v==s?f=x<0:f=x>0}var M=a[s+(f?-1:0)],E=f==(M.level==1),z=E?M.from:M.to,q=E?"after":"before";return i.ch==z&&i.sticky==q?t:new Ke(new re(i.line,z,q),r)}function el(e,t,i,r){var n,a;if(t.touches)n=t.touches[0].clientX,a=t.touches[0].clientY;else try{n=t.clientX,a=t.clientY}catch{return!1}if(n>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ce(t);var o=e.display,u=o.lineDiv.getBoundingClientRect();if(a>u.bottom||!ke(e,i))return Ue(t);a-=u.top-o.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var f=o.gutters.childNodes[s];if(f&&f.getBoundingClientRect().right>=n){var v=br(e.doc,a),x=e.display.gutterSpecs[s];return C(e,i,e,v,x.className,t),Ue(t)}}}function ra(e,t){return el(e,t,"gutterClick",!0)}function tl(e,t){nr(e.display,t)||Ju(e,t)||ee(e,t,"contextmenu")||ie||e.display.input.onContextMenu(t)}function Ju(e,t){return ke(e,"gutterContextMenu")?el(e,t,"gutterContextMenu",!1):!1}function rl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),li(e)}var Qr={toString:function(){return"CodeMirror.Init"}},il={},on={};function $u(e){var t=e.optionHandlers;function i(r,n,a,o){e.defaults[r]=n,a&&(t[r]=o?function(u,s,f){f!=Qr&&a(u,s,f)}:a)}e.defineOption=i,e.Init=Qr,i("value","",function(r,n){return r.setValue(n)},!0),i("mode",null,function(r,n){r.doc.modeOption=n,Kn(r)},!0),i("indentUnit",2,Kn,!0),i("indentWithTabs",!1),i("smartIndent",!0),i("tabSize",4,function(r){gi(r),li(r),Et(r)},!0),i("lineSeparator",null,function(r,n){if(r.doc.lineSep=n,!!n){var a=[],o=r.doc.first;r.doc.iter(function(s){for(var f=0;;){var v=s.text.indexOf(n,f);if(v==-1)break;f=v+n.length,a.push(re(o,v))}o++});for(var u=a.length-1;u>=0;u--)Kr(r.doc,n,a[u],re(a[u].line,a[u].ch+n.length))}}),i("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(r,n,a){r.state.specialChars=new RegExp(n.source+(n.test(" ")?"":"| "),"g"),a!=Qr&&r.refresh()}),i("specialCharPlaceholder",Al,function(r){return r.refresh()},!0),i("electricChars",!0),i("inputStyle",H?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),i("spellcheck",!1,function(r,n){return r.getInputField().spellcheck=n},!0),i("autocorrect",!1,function(r,n){return r.getInputField().autocorrect=n},!0),i("autocapitalize",!1,function(r,n){return r.getInputField().autocapitalize=n},!0),i("rtlMoveVisually",!te),i("wholeLineUpdateBefore",!0),i("theme","default",function(r){rl(r),pi(r)},!0),i("keyMap","default",function(r,n,a){var o=nn(n),u=a!=Qr&&nn(a);u&&u.detach&&u.detach(r,o),o.attach&&o.attach(r,u||null)}),i("extraKeys",null),i("configureMouse",null),i("lineWrapping",!1,es,!0),i("gutters",[],function(r,n){r.display.gutterSpecs=qn(n,r.options.lineNumbers),pi(r)},!0),i("fixedGutter",!0,function(r,n){r.display.gutters.style.left=n?Mn(r.display)+"px":"0",r.refresh()},!0),i("coverGutterNextToScrollbar",!1,function(r){return Ur(r)},!0),i("scrollbarStyle","native",function(r){no(r),Ur(r),r.display.scrollbars.setScrollTop(r.doc.scrollTop),r.display.scrollbars.setScrollLeft(r.doc.scrollLeft)},!0),i("lineNumbers",!1,function(r,n){r.display.gutterSpecs=qn(r.options.gutters,n),pi(r)},!0),i("firstLineNumber",1,pi,!0),i("lineNumberFormatter",function(r){return r},pi,!0),i("showCursorWhenSelecting",!1,ui,!0),i("resetSelectionOnContextMenu",!0),i("lineWiseCopyCut",!0),i("pasteLinesPerSelection",!0),i("selectionsMayTouch",!1),i("readOnly",!1,function(r,n){n=="nocursor"&&(Pr(r),r.display.input.blur()),r.display.input.readOnlyChanged(n)}),i("screenReaderLabel",null,function(r,n){n=n===""?null:n,r.display.input.screenReaderLabelChanged(n)}),i("disableInput",!1,function(r,n){n||r.display.input.reset()},!0),i("dragDrop",!0,Vu),i("allowDropFileTypes",null),i("cursorBlinkRate",530),i("cursorScrollMargin",0),i("cursorHeight",1,ui,!0),i("singleCursorHeightPerLine",!0,ui,!0),i("workTime",100),i("workDelay",100),i("flattenSpans",!0,gi,!0),i("addModeClass",!1,gi,!0),i("pollInterval",100),i("undoDepth",200,function(r,n){return r.doc.history.undoDepth=n}),i("historyEventDelay",1250),i("viewportMargin",10,function(r){return r.refresh()},!0),i("maxHighlightLength",1e4,gi,!0),i("moveInputWithCursor",!0,function(r,n){n||r.display.input.resetPosition()}),i("tabindex",null,function(r,n){return r.display.input.getField().tabIndex=n||""}),i("autofocus",null),i("direction","ltr",function(r,n){return r.doc.setDirection(n)},!0),i("phrases",null)}function Vu(e,t,i){var r=i&&i!=Qr;if(!t!=!r){var n=e.display.dragFunctions,a=t?S:w;a(e.display.scroller,"dragstart",n.start),a(e.display.scroller,"dragenter",n.enter),a(e.display.scroller,"dragover",n.over),a(e.display.scroller,"dragleave",n.leave),a(e.display.scroller,"drop",n.drop)}}function es(e){e.options.lineWrapping?(Ce(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Te(e.display.wrapper,"CodeMirror-wrap"),Cn(e)),Nn(e),Et(e),li(e),setTimeout(function(){return Ur(e)},100)}function et(e,t){var i=this;if(!(this instanceof et))return new et(e,t);this.options=t=t?Le(t):{},Le(il,t,!1);var r=t.value;typeof r=="string"?r=new Lt(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var n=new et.inputStyles[t.inputStyle](this),a=this.display=new du(e,r,n,t);a.wrapper.CodeMirror=this,rl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),no(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Qe,keySeq:null,specialChars:null},t.autofocus&&!H&&a.input.focus(),L&&A<11&&setTimeout(function(){return i.display.input.reset(!0)},20),ts(this),Mu(),Er(this),this.curOp.forceUpdate=!0,go(this,r),t.autofocus&&!H||this.hasFocus()?setTimeout(function(){i.hasFocus()&&!i.state.focused&&_n(i)},20):Pr(this);for(var o in on)on.hasOwnProperty(o)&&on[o](this,t[o],Qr);lo(this),t.finishInit&&t.finishInit(this);for(var u=0;u<ia.length;++u)ia[u](this);Lr(this),N&&t.lineWrapping&&getComputedStyle(a.lineDiv).textRendering=="optimizelegibility"&&(a.lineDiv.style.textRendering="auto")}et.defaults=il,et.optionHandlers=on;function ts(e){var t=e.display;S(t.scroller,"mousedown",pt(e,$o)),L&&A<11?S(t.scroller,"dblclick",pt(e,function(s){if(!ee(e,s)){var f=wr(e,s);if(!(!f||ra(e,s)||nr(e.display,s))){ce(s);var v=e.findWordAt(f);$i(e.doc,v.anchor,v.head)}}})):S(t.scroller,"dblclick",function(s){return ee(e,s)||ce(s)}),S(t.scroller,"contextmenu",function(s){return tl(e,s)}),S(t.input.getField(),"contextmenu",function(s){t.scroller.contains(s.target)||tl(e,s)});var i,r={end:0};function n(){t.activeTouch&&(i=setTimeout(function(){return t.activeTouch=null},1e3),r=t.activeTouch,r.end=+new Date)}function a(s){if(s.touches.length!=1)return!1;var f=s.touches[0];return f.radiusX<=1&&f.radiusY<=1}function o(s,f){if(f.left==null)return!0;var v=f.left-s.left,x=f.top-s.top;return v*v+x*x>20*20}S(t.scroller,"touchstart",function(s){if(!ee(e,s)&&!a(s)&&!ra(e,s)){t.input.ensurePolled(),clearTimeout(i);var f=+new Date;t.activeTouch={start:f,moved:!1,prev:f-r.end<=300?r:null},s.touches.length==1&&(t.activeTouch.left=s.touches[0].pageX,t.activeTouch.top=s.touches[0].pageY)}}),S(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),S(t.scroller,"touchend",function(s){var f=t.activeTouch;if(f&&!nr(t,s)&&f.left!=null&&!f.moved&&new Date-f.start<300){var v=e.coordsChar(t.activeTouch,"page"),x;!f.prev||o(f,f.prev)?x=new Ke(v,v):!f.prev.prev||o(f,f.prev.prev)?x=e.findWordAt(v):x=new Ke(re(v.line,0),Ne(e.doc,re(v.line+1,0))),e.setSelection(x.anchor,x.head),e.focus(),ce(s)}n()}),S(t.scroller,"touchcancel",n),S(t.scroller,"scroll",function(){t.scroller.clientHeight&&(fi(e,t.scroller.scrollTop),Fr(e,t.scroller.scrollLeft,!0),C(e,"scroll",e))}),S(t.scroller,"mousewheel",function(s){return fo(e,s)}),S(t.scroller,"DOMMouseScroll",function(s){return fo(e,s)}),S(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(s){ee(e,s)||Be(s)},over:function(s){ee(e,s)||(Bu(e,s),Be(s))},start:function(s){return Tu(e,s)},drop:pt(e,Lu),leave:function(s){ee(e,s)||zo(e)}};var u=t.input.getField();S(u,"keyup",function(s){return Qo.call(e,s)}),S(u,"keydown",pt(e,Zo)),S(u,"keypress",pt(e,Jo)),S(u,"focus",function(s){return _n(e,s)}),S(u,"blur",function(s){return Pr(e,s)})}var ia=[];et.defineInitHook=function(e){return ia.push(e)};function Ei(e,t,i,r){var n=e.doc,a;i==null&&(i="add"),i=="smart"&&(n.mode.indent?a=ri(e,t).state:i="prev");var o=e.options.tabSize,u=we(n,t),s=Ge(u.text,null,o);u.stateAfter&&(u.stateAfter=null);var f=u.text.match(/^\s*/)[0],v;if(!r&&!/\S/.test(u.text))v=0,i="not";else if(i=="smart"&&(v=n.mode.indent(a,u.text.slice(f.length),u.text),v==lt||v>150)){if(!r)return;i="prev"}i=="prev"?t>n.first?v=Ge(we(n,t-1).text,null,o):v=0:i=="add"?v=s+e.options.indentUnit:i=="subtract"?v=s-e.options.indentUnit:typeof i=="number"&&(v=s+i),v=Math.max(0,v);var x="",M=0;if(e.options.indentWithTabs)for(var E=Math.floor(v/o);E;--E)M+=o,x+=" ";if(M<v&&(x+=Nt(v-M)),x!=f)return Kr(n,x,re(t,0),re(t,f.length),"+input"),u.stateAfter=null,!0;for(var z=0;z<n.sel.ranges.length;z++){var q=n.sel.ranges[z];if(q.head.line==t&&q.head.ch<f.length){var ae=re(t,f.length);Qn(n,z,new Ke(ae,ae));break}}}var Zt=null;function ln(e){Zt=e}function na(e,t,i,r,n){var a=e.doc;e.display.shift=!1,r||(r=a.sel);var o=+new Date-200,u=n=="paste"||e.state.pasteIncoming>o,s=Nr(t),f=null;if(u&&r.ranges.length>1)if(Zt&&Zt.text.join(`
`)==t){if(r.ranges.length%Zt.text.length==0){f=[];for(var v=0;v<Zt.text.length;v++)f.push(a.splitLines(Zt.text[v]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(f=It(s,function(se){return[se]}));for(var x=e.curOp.updateInput,M=r.ranges.length-1;M>=0;M--){var E=r.ranges[M],z=E.from(),q=E.to();E.empty()&&(i&&i>0?z=re(z.line,z.ch-i):e.state.overwrite&&!u?q=re(q.line,Math.min(we(a,q.line).text.length,q.ch+Oe(s).length)):u&&Zt&&Zt.lineWise&&Zt.text.join(`
`)==s.join(`
`)&&(z=q=re(z.line,0)));var ae={from:z,to:q,text:f?f[M%f.length]:s,origin:n||(u?"paste":e.state.cutIncoming>o?"cut":"+input")};Gr(e.doc,ae),dt(e,"inputRead",e,ae)}t&&!u&&al(e,t),Wr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=x),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function nl(e,t){var i=e.clipboardData&&e.clipboardData.getData("Text");if(i)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&_t(t,function(){return na(t,i,0,null,"paste")}),!0}function al(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var i=e.doc.sel,r=i.ranges.length-1;r>=0;r--){var n=i.ranges[r];if(!(n.head.ch>100||r&&i.ranges[r-1].head.line==n.head.line)){var a=e.getModeAt(n.head),o=!1;if(a.electricChars){for(var u=0;u<a.electricChars.length;u++)if(t.indexOf(a.electricChars.charAt(u))>-1){o=Ei(e,n.head.line,"smart");break}}else a.electricInput&&a.electricInput.test(we(e.doc,n.head.line).text.slice(0,n.head.ch))&&(o=Ei(e,n.head.line,"smart"));o&&dt(e,"electricInput",e,n.head.line)}}}function ol(e){for(var t=[],i=[],r=0;r<e.doc.sel.ranges.length;r++){var n=e.doc.sel.ranges[r].head.line,a={anchor:re(n,0),head:re(n+1,0)};i.push(a),t.push(e.getRange(a.anchor,a.head))}return{text:t,ranges:i}}function aa(e,t,i,r){e.setAttribute("autocorrect",i?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function ll(){var e=J("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=J("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return N?e.style.width="1000px":e.setAttribute("wrap","off"),me&&(e.style.border="1px solid black"),t}function rs(e){var t=e.optionHandlers,i=e.helpers={};e.prototype={constructor:e,focus:function(){K(this).focus(),this.display.input.focus()},setOption:function(r,n){var a=this.options,o=a[r];a[r]==n&&r!="mode"||(a[r]=n,t.hasOwnProperty(r)&&pt(this,t[r])(this,n,o),C(this,"optionChange",this,r))},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,n){this.state.keyMaps[n?"push":"unshift"](nn(r))},removeKeyMap:function(r){for(var n=this.state.keyMaps,a=0;a<n.length;++a)if(n[a]==r||n[a].name==r)return n.splice(a,1),!0},addOverlay:St(function(r,n){var a=r.token?r:e.getMode(this.options,r);if(a.startState)throw new Error("Overlays may not be stateful.");xt(this.state.overlays,{mode:a,modeSpec:r,opaque:n&&n.opaque,priority:n&&n.priority||0},function(o){return o.priority}),this.state.modeGen++,Et(this)}),removeOverlay:St(function(r){for(var n=this.state.overlays,a=0;a<n.length;++a){var o=n[a].modeSpec;if(o==r||typeof r=="string"&&o.name==r){n.splice(a,1),this.state.modeGen++,Et(this);return}}}),indentLine:St(function(r,n,a){typeof n!="string"&&typeof n!="number"&&(n==null?n=this.options.smartIndent?"smart":"prev":n=n?"add":"subtract"),ti(this.doc,r)&&Ei(this,r,n,a)}),indentSelection:St(function(r){for(var n=this.doc.sel.ranges,a=-1,o=0;o<n.length;o++){var u=n[o];if(u.empty())u.head.line>a&&(Ei(this,u.head.line,r,!0),a=u.head.line,o==this.doc.sel.primIndex&&Wr(this));else{var s=u.from(),f=u.to(),v=Math.max(a,s.line);a=Math.min(this.lastLine(),f.line-(f.ch?0:1))+1;for(var x=v;x<a;++x)Ei(this,x,r);var M=this.doc.sel.ranges;s.ch==0&&n.length==M.length&&M[o].from().ch>0&&Qn(this.doc,o,new Ke(s,M[o].to()),Ie)}}}),getTokenAt:function(r,n){return va(this,r,n)},getLineTokens:function(r,n){return va(this,re(r),n,!0)},getTokenTypeAt:function(r){r=Ne(this.doc,r);var n=da(this,we(this.doc,r.line)),a=0,o=(n.length-1)/2,u=r.ch,s;if(u==0)s=n[2];else for(;;){var f=a+o>>1;if((f?n[f*2-1]:0)>=u)o=f;else if(n[f*2+1]<u)a=f+1;else{s=n[f*2+2];break}}var v=s?s.indexOf("overlay "):-1;return v<0?s:v==0?null:s.slice(0,v-1)},getModeAt:function(r){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(r).state).mode:n},getHelper:function(r,n){return this.getHelpers(r,n)[0]},getHelpers:function(r,n){var a=[];if(!i.hasOwnProperty(n))return a;var o=i[n],u=this.getModeAt(r);if(typeof u[n]=="string")o[u[n]]&&a.push(o[u[n]]);else if(u[n])for(var s=0;s<u[n].length;s++){var f=o[u[n][s]];f&&a.push(f)}else u.helperType&&o[u.helperType]?a.push(o[u.helperType]):o[u.name]&&a.push(o[u.name]);for(var v=0;v<o._global.length;v++){var x=o._global[v];x.pred(u,this)&&je(a,x.val)==-1&&a.push(x.val)}return a},getStateAfter:function(r,n){var a=this.doc;return r=fa(a,r??a.first+a.size-1),ri(this,r+1,n).state},cursorCoords:function(r,n){var a,o=this.doc.sel.primary();return r==null?a=o.head:typeof r=="object"?a=Ne(this.doc,r):a=r?o.from():o.to(),Xt(this,a,n||"page")},charCoords:function(r,n){return Ui(this,Ne(this.doc,r),n||"page")},coordsChar:function(r,n){return r=Ga(this,r,n||"page"),Ln(this,r.left,r.top)},lineAtHeight:function(r,n){return r=Ga(this,{top:r,left:0},n||"page").top,br(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,n,a){var o=!1,u;if(typeof r=="number"){var s=this.doc.first+this.doc.size-1;r<this.doc.first?r=this.doc.first:r>s&&(r=s,o=!0),u=we(this.doc,r)}else u=r;return Wi(this,u,{top:0,left:0},n||"page",a||o).top+(o?this.doc.height-ir(u):0)},defaultTextHeight:function(){return Rr(this.display)},defaultCharWidth:function(){return zr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(r,n,a,o,u){var s=this.display;r=Xt(this,Ne(this.doc,r));var f=r.bottom,v=r.left;if(n.style.position="absolute",n.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(n),s.sizer.appendChild(n),o=="over")f=r.top;else if(o=="above"||o=="near"){var x=Math.max(s.wrapper.clientHeight,this.doc.height),M=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(o=="above"||r.bottom+n.offsetHeight>x)&&r.top>n.offsetHeight?f=r.top-n.offsetHeight:r.bottom+n.offsetHeight<=x&&(f=r.bottom),v+n.offsetWidth>M&&(v=M-n.offsetWidth)}n.style.top=f+"px",n.style.left=n.style.right="",u=="right"?(v=s.sizer.clientWidth-n.offsetWidth,n.style.right="0px"):(u=="left"?v=0:u=="middle"&&(v=(s.sizer.clientWidth-n.offsetWidth)/2),n.style.left=v+"px"),a&&Vl(this,{left:v,top:f,right:v+n.offsetWidth,bottom:f+n.offsetHeight})},triggerOnKeyDown:St(Zo),triggerOnKeyPress:St(Jo),triggerOnKeyUp:Qo,triggerOnMouseDown:St($o),execCommand:function(r){if(wi.hasOwnProperty(r))return wi[r].call(null,this)},triggerElectric:St(function(r){al(this,r)}),findPosH:function(r,n,a,o){var u=1;n<0&&(u=-1,n=-n);for(var s=Ne(this.doc,r),f=0;f<n&&(s=oa(this.doc,s,u,a,o),!s.hitSide);++f);return s},moveH:St(function(r,n){var a=this;this.extendSelectionsBy(function(o){return a.display.shift||a.doc.extend||o.empty()?oa(a.doc,o.head,r,n,a.options.rtlMoveVisually):r<0?o.from():o.to()},wt)}),deleteH:St(function(r,n){var a=this.doc.sel,o=this.doc;a.somethingSelected()?o.replaceSelection("",null,"+delete"):Zr(this,function(u){var s=oa(o,u.head,r,n,!1);return r<0?{from:s,to:u.head}:{from:u.head,to:s}})}),findPosV:function(r,n,a,o){var u=1,s=o;n<0&&(u=-1,n=-n);for(var f=Ne(this.doc,r),v=0;v<n;++v){var x=Xt(this,f,"div");if(s==null?s=x.left:x.left=s,f=ul(this,x,u,a),f.hitSide)break}return f},moveV:St(function(r,n){var a=this,o=this.doc,u=[],s=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(v){if(s)return r<0?v.from():v.to();var x=Xt(a,v.head,"div");v.goalColumn!=null&&(x.left=v.goalColumn),u.push(x.left);var M=ul(a,x,r,n);return n=="page"&&v==o.sel.primary()&&zn(a,Ui(a,M,"div").top-x.top),M},wt),u.length)for(var f=0;f<o.sel.ranges.length;f++)o.sel.ranges[f].goalColumn=u[f]}),findWordAt:function(r){var n=this.doc,a=we(n,r.line).text,o=r.ch,u=r.ch;if(a){var s=this.getHelper(r,"wordChars");(r.sticky=="before"||u==a.length)&&o?--o:++u;for(var f=a.charAt(o),v=I(f,s)?function(x){return I(x,s)}:/\s/.test(f)?function(x){return/\s/.test(x)}:function(x){return!/\s/.test(x)&&!I(x)};o>0&&v(a.charAt(o-1));)--o;for(;u<a.length&&v(a.charAt(u));)++u}return new Ke(re(r.line,o),re(r.line,u))},toggleOverwrite:function(r){r!=null&&r==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ce(this.display.cursorDiv,"CodeMirror-overwrite"):Te(this.display.cursorDiv,"CodeMirror-overwrite"),C(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==$(k(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:St(function(r,n){si(this,r,n)}),getScrollInfo:function(){var r=this.display.scroller;return{left:r.scrollLeft,top:r.scrollTop,height:r.scrollHeight-$t(this)-this.display.barHeight,width:r.scrollWidth-$t(this)-this.display.barWidth,clientHeight:Sn(this),clientWidth:Cr(this)}},scrollIntoView:St(function(r,n){r==null?(r={from:this.doc.sel.primary().head,to:null},n==null&&(n=this.options.cursorScrollMargin)):typeof r=="number"?r={from:re(r,0),to:null}:r.from==null&&(r={from:r,to:null}),r.to||(r.to=r.from),r.margin=n||0,r.from.line!=null?eu(this,r):eo(this,r.from,r.to,r.margin)}),setSize:St(function(r,n){var a=this,o=function(s){return typeof s=="number"||/^\d+$/.test(String(s))?s+"px":s};r!=null&&(this.display.wrapper.style.width=o(r)),n!=null&&(this.display.wrapper.style.height=o(n)),this.options.lineWrapping&&Ua(this);var u=this.display.viewFrom;this.doc.iter(u,this.display.viewTo,function(s){if(s.widgets){for(var f=0;f<s.widgets.length;f++)if(s.widgets[f].noHScroll){fr(a,u,"widget");break}}++u}),this.curOp.forceUpdate=!0,C(this,"refresh",this)}),operation:function(r){return _t(this,r)},startOperation:function(){return Er(this)},endOperation:function(){return Lr(this)},refresh:St(function(){var r=this.display.cachedTextHeight;Et(this),this.curOp.forceUpdate=!0,li(this),si(this,this.doc.scrollLeft,this.doc.scrollTop),Un(this.display),(r==null||Math.abs(r-Rr(this.display))>.5||this.options.lineWrapping)&&Nn(this),C(this,"refresh",this)}),swapDoc:St(function(r){var n=this.doc;return n.cm=null,this.state.selectingText&&this.state.selectingText(),go(this,r),li(this),this.display.input.reset(),si(this,r.scrollLeft,r.scrollTop),this.curOp.forceScroll=!0,dt(this,"swapDoc",this,n),n}),phrase:function(r){var n=this.options.phrases;return n&&Object.prototype.hasOwnProperty.call(n,r)?n[r]:r},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},xe(e),e.registerHelper=function(r,n,a){i.hasOwnProperty(r)||(i[r]=e[r]={_global:[]}),i[r][n]=a},e.registerGlobalHelper=function(r,n,a,o){e.registerHelper(r,n,o),i[r]._global.push({pred:a,val:o})}}function oa(e,t,i,r,n){var a=t,o=i,u=we(e,t.line),s=n&&e.direction=="rtl"?-i:i;function f(){var de=t.line+s;return de<e.first||de>=e.first+e.size?!1:(t=new re(de,t.ch,t.sticky),u=we(e,de))}function v(de){var fe;if(r=="codepoint"){var ve=u.text.charCodeAt(t.ch+(i>0?0:-1));if(isNaN(ve))fe=null;else{var Fe=i>0?ve>=55296&&ve<56320:ve>=56320&&ve<57343;fe=new re(t.line,Math.max(0,Math.min(u.text.length,t.ch+i*(Fe?2:1))),-i)}}else n?fe=_u(e.cm,u,t,i):fe=$n(u,t,i);if(fe==null)if(!de&&f())t=Vn(n,e.cm,u,t.line,s);else return!1;else t=fe;return!0}if(r=="char"||r=="codepoint")v();else if(r=="column")v(!0);else if(r=="word"||r=="group")for(var x=null,M=r=="group",E=e.cm&&e.cm.getHelper(t,"wordChars"),z=!0;!(i<0&&!v(!z));z=!1){var q=u.text.charAt(t.ch)||`
`,ae=I(q,E)?"w":M&&q==`
`?"n":!M||/\s/.test(q)?null:"p";if(M&&!z&&!ae&&(ae="s"),x&&x!=ae){i<0&&(i=1,v(),t.sticky="after");break}if(ae&&(x=ae),i>0&&!v(!z))break}var se=en(e,t,a,o,!0);return pn(a,se)&&(se.hitSide=!0),se}function ul(e,t,i,r){var n=e.doc,a=t.left,o;if(r=="page"){var u=Math.min(e.display.wrapper.clientHeight,K(e).innerHeight||n(e).documentElement.clientHeight),s=Math.max(u-.5*Rr(e.display),3);o=(i>0?t.bottom:t.top)+i*s}else r=="line"&&(o=i>0?t.bottom+3:t.top-3);for(var f;f=Ln(e,a,o),!!f.outside;){if(i<0?o<=0:o>=n.height){f.hitSide=!0;break}o+=i*5}return f}var Ye=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Qe,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Ye.prototype.init=function(e){var t=this,i=this,r=i.cm,n=i.div=e.lineDiv;n.contentEditable=!0,aa(n,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function a(u){for(var s=u.target;s;s=s.parentNode){if(s==n)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}S(n,"paste",function(u){!a(u)||ee(r,u)||nl(u,r)||A<=11&&setTimeout(pt(r,function(){return t.updateFromDOM()}),20)}),S(n,"compositionstart",function(u){t.composing={data:u.data,done:!1}}),S(n,"compositionupdate",function(u){t.composing||(t.composing={data:u.data,done:!1})}),S(n,"compositionend",function(u){t.composing&&(u.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),S(n,"touchstart",function(){return i.forceCompositionEnd()}),S(n,"input",function(){t.composing||t.readFromDOMSoon()});function o(u){if(!(!a(u)||ee(r,u))){if(r.somethingSelected())ln({lineWise:!1,text:r.getSelections()}),u.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=ol(r);ln({lineWise:!0,text:s.text}),u.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,Ie),r.replaceSelection("",null,"cut")})}else return;if(u.clipboardData){u.clipboardData.clearData();var f=Zt.text.join(`
`);if(u.clipboardData.setData("Text",f),u.clipboardData.getData("Text")==f){u.preventDefault();return}}var v=ll(),x=v.firstChild;aa(x),r.display.lineSpace.insertBefore(v,r.display.lineSpace.firstChild),x.value=Zt.text.join(`
`);var M=$(h(n));at(x),setTimeout(function(){r.display.lineSpace.removeChild(v),M.focus(),M==n&&i.showPrimarySelection()},50)}}S(n,"copy",o),S(n,"cut",o)},Ye.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ye.prototype.prepareSelection=function(){var e=Ja(this.cm,!1);return e.focus=$(h(this.div))==this.div,e},Ye.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ye.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ye.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),r=i.from(),n=i.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||n.line<t.display.viewFrom){e.removeAllRanges();return}var a=un(t,e.anchorNode,e.anchorOffset),o=un(t,e.focusNode,e.focusOffset);if(!(a&&!a.bad&&o&&!o.bad&&Me(Mi(a,o),r)==0&&Me(Bi(a,o),n)==0)){var u=t.display.view,s=r.line>=t.display.viewFrom&&sl(t,r)||{node:u[0].measure.map[2],offset:0},f=n.line<t.display.viewTo&&sl(t,n);if(!f){var v=u[u.length-1].measure,x=v.maps?v.maps[v.maps.length-1]:v.map;f={node:x[x.length-1],offset:x[x.length-2]-x[x.length-3]}}if(!s||!f){e.removeAllRanges();return}var M=e.rangeCount&&e.getRangeAt(0),E;try{E=_(s.node,s.offset,f.offset,f.node)}catch{}E&&(!W&&t.state.focused?(e.collapse(s.node,s.offset),E.collapsed||(e.removeAllRanges(),e.addRange(E))):(e.removeAllRanges(),e.addRange(E)),M&&e.anchorNode==null?e.addRange(M):W&&this.startGracePeriod()),this.rememberSelection()}},Ye.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},Ye.prototype.showMultipleSelections=function(e){Ae(this.cm.display.cursorDiv,e.cursors),Ae(this.cm.display.selectionDiv,e.selection)},Ye.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ye.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return le(this.div,t)},Ye.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||$(h(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ye.prototype.blur=function(){this.div.blur()},Ye.prototype.getField=function(){return this.div},Ye.prototype.supportsTouch=function(){return!0},Ye.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):_t(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function i(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,i))}this.polling.set(this.cm.options.pollInterval,i)},Ye.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ye.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(be&&V&&this.cm.display.gutterSpecs.length&&is(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var i=un(t,e.anchorNode,e.anchorOffset),r=un(t,e.focusNode,e.focusOffset);i&&r&&_t(t,function(){bt(t.doc,hr(i,r),Ie),(i.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},Ye.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,i=e.doc.sel.primary(),r=i.from(),n=i.to();if(r.ch==0&&r.line>e.firstLine()&&(r=re(r.line-1,we(e.doc,r.line-1).length)),n.ch==we(e.doc,n.line).text.length&&n.line<e.lastLine()&&(n=re(n.line+1,0)),r.line<t.viewFrom||n.line>t.viewTo-1)return!1;var a,o,u;r.line==t.viewFrom||(a=Sr(e,r.line))==0?(o=Xe(t.view[0].line),u=t.view[0].node):(o=Xe(t.view[a].line),u=t.view[a-1].node.nextSibling);var s=Sr(e,n.line),f,v;if(s==t.view.length-1?(f=t.viewTo-1,v=t.lineDiv.lastChild):(f=Xe(t.view[s+1].line)-1,v=t.view[s+1].node.previousSibling),!u)return!1;for(var x=e.doc.splitLines(ns(e,u,v,o,f)),M=Dr(e.doc,re(o,0),re(f,we(e.doc,f).text.length));x.length>1&&M.length>1;)if(Oe(x)==Oe(M))x.pop(),M.pop(),f--;else if(x[0]==M[0])x.shift(),M.shift(),o++;else break;for(var E=0,z=0,q=x[0],ae=M[0],se=Math.min(q.length,ae.length);E<se&&q.charCodeAt(E)==ae.charCodeAt(E);)++E;for(var de=Oe(x),fe=Oe(M),ve=Math.min(de.length-(x.length==1?E:0),fe.length-(M.length==1?E:0));z<ve&&de.charCodeAt(de.length-z-1)==fe.charCodeAt(fe.length-z-1);)++z;if(x.length==1&&M.length==1&&o==r.line)for(;E&&E>r.ch&&de.charCodeAt(de.length-z-1)==fe.charCodeAt(fe.length-z-1);)E--,z++;x[x.length-1]=de.slice(0,de.length-z).replace(/^\u200b+/,""),x[0]=x[0].slice(E).replace(/\u200b+$/,"");var Fe=re(o,E),Se=re(f,M.length?Oe(M).length-z:0);if(x.length>1||x[0]||Me(Fe,Se))return Kr(e.doc,x,Fe,Se,"+input"),!0},Ye.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ye.prototype.reset=function(){this.forceCompositionEnd()},Ye.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ye.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},Ye.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&_t(this.cm,function(){return Et(e.cm)})},Ye.prototype.setUneditable=function(e){e.contentEditable="false"},Ye.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||pt(this.cm,na)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},Ye.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},Ye.prototype.onContextMenu=function(){},Ye.prototype.resetPosition=function(){},Ye.prototype.needsContentAttribute=!0;function sl(e,t){var i=Fn(e,t.line);if(!i||i.hidden)return null;var r=we(e.doc,t.line),n=_a(i,r,t.line),a=y(r,e.doc.direction),o="left";if(a){var u=d(a,t.ch);o=u%2?"right":"left"}var s=Pa(n.map,t.ch,o);return s.offset=s.collapse=="right"?s.end:s.start,s}function is(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Jr(e,t){return t&&(e.bad=!0),e}function ns(e,t,i,r,n){var a="",o=!1,u=e.doc.lineSeparator(),s=!1;function f(E){return function(z){return z.id==E}}function v(){o&&(a+=u,s&&(a+=u),o=s=!1)}function x(E){E&&(v(),a+=E)}function M(E){if(E.nodeType==1){var z=E.getAttribute("cm-text");if(z){x(z);return}var q=E.getAttribute("cm-marker"),ae;if(q){var se=e.findMarks(re(r,0),re(n+1,0),f(+q));se.length&&(ae=se[0].find(0))&&x(Dr(e.doc,ae.from,ae.to).join(u));return}if(E.getAttribute("contenteditable")=="false")return;var de=/^(pre|div|p|li|table|br)$/i.test(E.nodeName);if(!/^br$/i.test(E.nodeName)&&E.textContent.length==0)return;de&&v();for(var fe=0;fe<E.childNodes.length;fe++)M(E.childNodes[fe]);/^(pre|p)$/i.test(E.nodeName)&&(s=!0),de&&(o=!0)}else E.nodeType==3&&x(E.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;M(t),t!=i;)t=t.nextSibling,s=!1;return a}function un(e,t,i){var r;if(t==e.display.lineDiv){if(r=e.display.lineDiv.childNodes[i],!r)return Jr(e.clipPos(re(e.display.viewTo-1)),!0);t=null,i=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var n=0;n<e.display.view.length;n++){var a=e.display.view[n];if(a.node==r)return as(a,t,i)}}function as(e,t,i){var r=e.text.firstChild,n=!1;if(!t||!le(r,t))return Jr(re(Xe(e.line),0),!0);if(t==r&&(n=!0,t=r.childNodes[i],i=0,!t)){var a=e.rest?Oe(e.rest):e.line;return Jr(re(Xe(a),a.text.length),n)}var o=t.nodeType==3?t:null,u=t;for(!o&&t.childNodes.length==1&&t.firstChild.nodeType==3&&(o=t.firstChild,i&&(i=o.nodeValue.length));u.parentNode!=r;)u=u.parentNode;var s=e.measure,f=s.maps;function v(ae,se,de){for(var fe=-1;fe<(f?f.length:0);fe++)for(var ve=fe<0?s.map:f[fe],Fe=0;Fe<ve.length;Fe+=3){var Se=ve[Fe+2];if(Se==ae||Se==se){var He=Xe(fe<0?e.line:e.rest[fe]),Ze=ve[Fe]+de;return(de<0||Se!=ae)&&(Ze=ve[Fe+(de?1:0)]),re(He,Ze)}}}var x=v(o,u,i);if(x)return Jr(x,n);for(var M=u.nextSibling,E=o?o.nodeValue.length-i:0;M;M=M.nextSibling){if(x=v(M,M.firstChild,0),x)return Jr(re(x.line,x.ch-E),n);E+=M.textContent.length}for(var z=u.previousSibling,q=i;z;z=z.previousSibling){if(x=v(z,z.firstChild,-1),x)return Jr(re(x.line,x.ch+q),n);q+=z.textContent.length}}var nt=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Qe,this.hasSelection=!1,this.composing=null,this.resetting=!1};nt.prototype.init=function(e){var t=this,i=this,r=this.cm;this.createField(e);var n=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),me&&(n.style.width="0px"),S(n,"input",function(){L&&A>=9&&t.hasSelection&&(t.hasSelection=null),i.poll()}),S(n,"paste",function(o){ee(r,o)||nl(o,r)||(r.state.pasteIncoming=+new Date,i.fastPoll())});function a(o){if(!ee(r,o)){if(r.somethingSelected())ln({lineWise:!1,text:r.getSelections()});else if(r.options.lineWiseCopyCut){var u=ol(r);ln({lineWise:!0,text:u.text}),o.type=="cut"?r.setSelections(u.ranges,null,Ie):(i.prevInput="",n.value=u.text.join(`
`),at(n))}else return;o.type=="cut"&&(r.state.cutIncoming=+new Date)}}S(n,"cut",a),S(n,"copy",a),S(e.scroller,"paste",function(o){if(!(nr(e,o)||ee(r,o))){if(!n.dispatchEvent){r.state.pasteIncoming=+new Date,i.focus();return}var u=new Event("paste");u.clipboardData=o.clipboardData,n.dispatchEvent(u)}}),S(e.lineSpace,"selectstart",function(o){nr(e,o)||ce(o)}),S(n,"compositionstart",function(){var o=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:o,range:r.markText(o,r.getCursor("to"),{className:"CodeMirror-composing"})}}),S(n,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},nt.prototype.createField=function(e){this.wrapper=ll(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;aa(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},nt.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},nt.prototype.prepareSelection=function(){var e=this.cm,t=e.display,i=e.doc,r=Ja(e);if(e.options.moveInputWithCursor){var n=Xt(e,i.sel.primary().head,"div"),a=t.wrapper.getBoundingClientRect(),o=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,n.top+o.top-a.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,n.left+o.left-a.left))}return r},nt.prototype.showSelection=function(e){var t=this.cm,i=t.display;Ae(i.cursorDiv,e.cursors),Ae(i.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},nt.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var i=t.getSelection();this.textarea.value=i,t.state.focused&&at(this.textarea),L&&A>=9&&(this.hasSelection=i)}else e||(this.prevInput=this.textarea.value="",L&&A>=9&&(this.hasSelection=null));this.resetting=!1}},nt.prototype.getField=function(){return this.textarea},nt.prototype.supportsTouch=function(){return!1},nt.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!H||$(h(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},nt.prototype.blur=function(){this.textarea.blur()},nt.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},nt.prototype.receivedFocus=function(){this.slowPoll()},nt.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},nt.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function i(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,i)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,i)},nt.prototype.poll=function(){var e=this,t=this.cm,i=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||Li(i)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var n=i.value;if(n==r&&!t.somethingSelected())return!1;if(L&&A>=9&&this.hasSelection===n||U&&/[\uf700-\uf7ff]/.test(n))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var a=n.charCodeAt(0);if(a==8203&&!r&&(r="\u200B"),a==8666)return this.reset(),this.cm.execCommand("undo")}for(var o=0,u=Math.min(r.length,n.length);o<u&&r.charCodeAt(o)==n.charCodeAt(o);)++o;return _t(t,function(){na(t,n.slice(o),r.length-o,null,e.composing?"*compose":null),n.length>1e3||n.indexOf(`
`)>-1?i.value=e.prevInput="":e.prevInput=n,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},nt.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},nt.prototype.onKeyPress=function(){L&&A>=9&&(this.hasSelection=null),this.fastPoll()},nt.prototype.onContextMenu=function(e){var t=this,i=t.cm,r=i.display,n=t.textarea;t.contextMenuPending&&t.contextMenuPending();var a=wr(i,e),o=r.scroller.scrollTop;if(!a||P)return;var u=i.options.resetSelectionOnContextMenu;u&&i.doc.sel.contains(a)==-1&&pt(i,bt)(i.doc,hr(a),Ie);var s=n.style.cssText,f=t.wrapper.style.cssText,v=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",n.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(e.clientY-v.top-5)+"px; left: "+(e.clientX-v.left-5)+`px;
z-index: 1000; background: `+(L?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var x;N&&(x=n.ownerDocument.defaultView.scrollY),r.input.focus(),N&&n.ownerDocument.defaultView.scrollTo(null,x),r.input.reset(),i.somethingSelected()||(n.value=t.prevInput=" "),t.contextMenuPending=E,r.selForContextMenu=i.doc.sel,clearTimeout(r.detectingSelectAll);function M(){if(n.selectionStart!=null){var q=i.somethingSelected(),ae="\u200B"+(q?n.value:"");n.value="\u21DA",n.value=ae,t.prevInput=q?"":"\u200B",n.selectionStart=1,n.selectionEnd=ae.length,r.selForContextMenu=i.doc.sel}}function E(){if(t.contextMenuPending==E&&(t.contextMenuPending=!1,t.wrapper.style.cssText=f,n.style.cssText=s,L&&A<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=o),n.selectionStart!=null)){(!L||L&&A<9)&&M();var q=0,ae=function(){r.selForContextMenu==i.doc.sel&&n.selectionStart==0&&n.selectionEnd>0&&t.prevInput=="\u200B"?pt(i,Eo)(i):q++<10?r.detectingSelectAll=setTimeout(ae,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(ae,200)}}if(L&&A>=9&&M(),ie){Be(e);var z=function(){w(window,"mouseup",z),setTimeout(E,20)};S(window,"mouseup",z)}else setTimeout(E,50)},nt.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},nt.prototype.setUneditable=function(){},nt.prototype.needsContentAttribute=!1;function os(e,t){if(t=t?Le(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var i=$(h(e));t.autofocus=i==e||e.getAttribute("autofocus")!=null&&i==document.body}function r(){e.value=u.getValue()}var n;if(e.form&&(S(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var a=e.form;n=a.submit;try{var o=a.submit=function(){r(),a.submit=n,a.submit(),a.submit=o}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(w(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=n))}},e.style.display="none";var u=et(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return u}function ls(e){e.off=w,e.on=S,e.wheelEventPixels=pu,e.Doc=Lt,e.splitLines=Nr,e.countColumn=Ge,e.findColumn=jt,e.isWordChar=xr,e.Pass=lt,e.signal=C,e.Line=Or,e.changeEnd=dr,e.scrollbarModel=io,e.Pos=re,e.cmpPos=Me,e.modes=ei,e.mimeModes=rt,e.resolveMode=Ht,e.getMode=Gt,e.modeExtensions=Ut,e.extendMode=Ti,e.copyState=tr,e.startState=sa,e.innerMode=Ir,e.commands=wi,e.keyMap=or,e.keyName=qo,e.isModifierKey=Uo,e.lookupKey=Yr,e.normalizeKeyMap=Hu,e.StringStream=ut,e.SharedTextMarker=bi,e.TextMarker=gr,e.LineWidget=Di,e.e_preventDefault=ce,e.e_stopPropagation=We,e.e_stop=Be,e.addClass=Ce,e.contains=le,e.rmClass=Te,e.keyNames=vr}$u(et),rs(et);var us="iter insert remove copy getEditor constructor".split(" ");for(var sn in Lt.prototype)Lt.prototype.hasOwnProperty(sn)&&je(us,sn)<0&&(et.prototype[sn]=function(e){return function(){return e.apply(this.doc,arguments)}}(Lt.prototype[sn]));return xe(Lt),et.inputStyles={textarea:nt,contenteditable:Ye},et.defineMode=function(e){!et.defaults.mode&&e!="null"&&(et.defaults.mode=e),ur.apply(this,arguments)},et.defineMIME=qt,et.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),et.defineMIME("text/plain","null"),et.defineExtension=function(e,t){et.prototype[e]=t},et.defineDocExtension=function(e,t){Lt.prototype[e]=t},et.fromTextArea=os,ls(et),et.version="5.65.16",et})},"./node_modules/codemirror/mode/gfm/gfm.js":function(ct,_e,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"),ye("./node_modules/codemirror/mode/markdown/markdown.js"),ye("./node_modules/codemirror/addon/mode/overlay.js"))})(function(W){"use strict";var Q=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;W.defineMode("gfm",function(B,R){var L=0;function A(G){return G.code=!1,null}var N={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(G){return{code:G.code,codeBlock:G.codeBlock,ateSpace:G.ateSpace}},token:function(G,P){if(P.combineTokens=null,P.codeBlock)return G.match(/^```+/)?(P.codeBlock=!1,null):(G.skipToEnd(),null);if(G.sol()&&(P.code=!1),G.sol()&&G.match(/^```+/))return G.skipToEnd(),P.codeBlock=!0,null;if(G.peek()==="`"){G.next();var oe=G.pos;G.eatWhile("`");var pe=1+G.pos-oe;return P.code?pe===L&&(P.code=!1):(L=pe,P.code=!0),null}else if(P.code)return G.next(),null;if(G.eatSpace())return P.ateSpace=!0,null;if((G.sol()||P.ateSpace)&&(P.ateSpace=!1,R.gitHubSpice!==!1)){if(G.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return P.combineTokens=!0,"link";if(G.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return P.combineTokens=!0,"link"}return G.match(Q)&&G.string.slice(G.start-2,G.start)!="]("&&(G.start==0||/\W/.test(G.string.charAt(G.start-1)))?(P.combineTokens=!0,"link"):(G.next(),null)},blankLine:A},Y={taskLists:!0,strikethrough:!0,emoji:!0};for(var V in R)Y[V]=R[V];return Y.name="markdown",W.overlayMode(W.getMode(B,Y),N)},"markdown"),W.defineMIME("text/x-gfm","gfm")})},"./node_modules/codemirror/mode/markdown/markdown.js":function(ct,_e,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"),ye("./node_modules/codemirror/mode/xml/xml.js"),ye("./node_modules/codemirror/mode/meta.js"))})(function(W){"use strict";W.defineMode("markdown",function(Q,B){var R=W.getMode(Q,"text/html"),L=R.name=="null";function A(k){if(W.findModeByName){var h=W.findModeByName(k);h&&(k=h.mime||h.mimes[0])}var K=W.getMode(Q,k);return K.name=="null"?null:K}B.highlightFormatting===void 0&&(B.highlightFormatting=!1),B.maxBlockquoteDepth===void 0&&(B.maxBlockquoteDepth=0),B.taskLists===void 0&&(B.taskLists=!1),B.strikethrough===void 0&&(B.strikethrough=!1),B.emoji===void 0&&(B.emoji=!1),B.fencedCodeBlockHighlighting===void 0&&(B.fencedCodeBlockHighlighting=!0),B.fencedCodeBlockDefaultMode===void 0&&(B.fencedCodeBlockDefaultMode="text/plain"),B.xml===void 0&&(B.xml=!0),B.tokenTypeOverrides===void 0&&(B.tokenTypeOverrides={});var N={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var Y in N)N.hasOwnProperty(Y)&&B.tokenTypeOverrides[Y]&&(N[Y]=B.tokenTypeOverrides[Y]);var V=/^([*\-_])(?:\s*\1){2,}\s*$/,G=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,P=/^\[(x| )\](?=\s)/i,oe=B.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,pe=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ee=/^[^#!\[\]*_\\<>` "'(~:]+/,me=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,be=/^\s*\[[^\]]+?\]:.*$/,H=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,U=" ";function j(k,h,K){return h.f=h.inline=K,K(k,h)}function te(k,h,K){return h.f=h.block=K,K(k,h)}function X(k){return!k||!/\S/.test(k.string)}function ue(k){if(k.linkTitle=!1,k.linkHref=!1,k.linkText=!1,k.em=!1,k.strong=!1,k.strikethrough=!1,k.quote=0,k.indentedCode=!1,k.f==ge){var h=L;if(!h){var K=W.innerMode(R,k.htmlState);h=K.mode.name=="xml"&&K.state.tagStart===null&&!K.state.context&&K.state.tokenize.isInText}h&&(k.f=J,k.block=ie,k.htmlState=null)}return k.trailingSpace=0,k.trailingSpaceNewLine=!1,k.prevLine=k.thisLine,k.thisLine={stream:null},null}function ie(k,h){var K=k.column()===h.indentation,ne=X(h.prevLine.stream),Le=h.indentedCode,Ge=h.prevLine.hr,Qe=h.list!==!1,je=(h.listStack[h.listStack.length-1]||0)+3;h.indentedCode=!1;var ot=h.indentation;if(h.indentationDiff===null&&(h.indentationDiff=h.indentation,Qe)){for(h.list=null;ot<h.listStack[h.listStack.length-1];)h.listStack.pop(),h.listStack.length?h.indentation=h.listStack[h.listStack.length-1]:h.list=!1;h.list!==!1&&(h.indentationDiff=ot-h.listStack[h.listStack.length-1])}var lt=!ne&&!Ge&&!h.prevLine.header&&(!Qe||!Le)&&!h.prevLine.fencedCodeEnd,Ie=(h.list===!1||Ge||ne)&&h.indentation<=je&&k.match(V),qe=null;if(h.indentationDiff>=4&&(Le||h.prevLine.fencedCodeEnd||h.prevLine.header||ne))return k.skipToEnd(),h.indentedCode=!0,N.code;if(k.eatSpace())return null;if(K&&h.indentation<=je&&(qe=k.match(oe))&&qe[1].length<=6)return h.quote=0,h.header=qe[1].length,h.thisLine.header=!0,B.highlightFormatting&&(h.formatting="header"),h.f=h.inline,Z(h);if(h.indentation<=je&&k.eat(">"))return h.quote=K?1:h.quote+1,B.highlightFormatting&&(h.formatting="quote"),k.eatSpace(),Z(h);if(!Ie&&!h.setext&&K&&h.indentation<=je&&(qe=k.match(G))){var wt=qe[1]?"ol":"ul";return h.indentation=ot+k.current().length,h.list=!0,h.quote=0,h.listStack.push(h.indentation),h.em=!1,h.strong=!1,h.code=!1,h.strikethrough=!1,B.taskLists&&k.match(P,!1)&&(h.taskList=!0),h.f=h.inline,B.highlightFormatting&&(h.formatting=["list","list-"+wt]),Z(h)}else{if(K&&h.indentation<=je&&(qe=k.match(me,!0)))return h.quote=0,h.fencedEndRE=new RegExp(qe[1]+"+ *$"),h.localMode=B.fencedCodeBlockHighlighting&&A(qe[2]||B.fencedCodeBlockDefaultMode),h.localMode&&(h.localState=W.startState(h.localMode)),h.f=h.block=Te,B.highlightFormatting&&(h.formatting="code-block"),h.code=-1,Z(h);if(h.setext||(!lt||!Qe)&&!h.quote&&h.list===!1&&!h.code&&!Ie&&!be.test(k.string)&&(qe=k.lookAhead(1))&&(qe=qe.match(pe)))return h.setext?(h.header=h.setext,h.setext=0,k.skipToEnd(),B.highlightFormatting&&(h.formatting="header")):(h.header=qe[0].charAt(0)=="="?1:2,h.setext=h.header),h.thisLine.header=!0,h.f=h.inline,Z(h);if(Ie)return k.skipToEnd(),h.hr=!0,h.thisLine.hr=!0,N.hr;if(k.peek()==="[")return j(k,h,Ce)}return j(k,h,h.inline)}function ge(k,h){var K=R.token(k,h.htmlState);if(!L){var ne=W.innerMode(R,h.htmlState);(ne.mode.name=="xml"&&ne.state.tagStart===null&&!ne.state.context&&ne.state.tokenize.isInText||h.md_inside&&k.current().indexOf(">")>-1)&&(h.f=J,h.block=ie,h.htmlState=null)}return K}function Te(k,h){var K=h.listStack[h.listStack.length-1]||0,ne=h.indentation<K,Le=K+3;if(h.fencedEndRE&&h.indentation<=Le&&(ne||k.match(h.fencedEndRE))){B.highlightFormatting&&(h.formatting="code-block");var Ge;return ne||(Ge=Z(h)),h.localMode=h.localState=null,h.block=ie,h.f=J,h.fencedEndRE=null,h.code=0,h.thisLine.fencedCodeEnd=!0,ne?te(k,h,h.block):Ge}else return h.localMode?h.localMode.token(k,h.localState):(k.skipToEnd(),N.code)}function Z(k){var h=[];if(k.formatting){h.push(N.formatting),typeof k.formatting=="string"&&(k.formatting=[k.formatting]);for(var K=0;K<k.formatting.length;K++)h.push(N.formatting+"-"+k.formatting[K]),k.formatting[K]==="header"&&h.push(N.formatting+"-"+k.formatting[K]+"-"+k.header),k.formatting[K]==="quote"&&(!B.maxBlockquoteDepth||B.maxBlockquoteDepth>=k.quote?h.push(N.formatting+"-"+k.formatting[K]+"-"+k.quote):h.push("error"))}if(k.taskOpen)return h.push("meta"),h.length?h.join(" "):null;if(k.taskClosed)return h.push("property"),h.length?h.join(" "):null;if(k.linkHref?h.push(N.linkHref,"url"):(k.strong&&h.push(N.strong),k.em&&h.push(N.em),k.strikethrough&&h.push(N.strikethrough),k.emoji&&h.push(N.emoji),k.linkText&&h.push(N.linkText),k.code&&h.push(N.code),k.image&&h.push(N.image),k.imageAltText&&h.push(N.imageAltText,"link"),k.imageMarker&&h.push(N.imageMarker)),k.header&&h.push(N.header,N.header+"-"+k.header),k.quote&&(h.push(N.quote),!B.maxBlockquoteDepth||B.maxBlockquoteDepth>=k.quote?h.push(N.quote+"-"+k.quote):h.push(N.quote+"-"+B.maxBlockquoteDepth)),k.list!==!1){var ne=(k.listStack.length-1)%3;ne?ne===1?h.push(N.list2):h.push(N.list3):h.push(N.list1)}return k.trailingSpaceNewLine?h.push("trailing-space-new-line"):k.trailingSpace&&h.push("trailing-space-"+(k.trailingSpace%2?"a":"b")),h.length?h.join(" "):null}function Ae(k,h){if(k.match(Ee,!0))return Z(h)}function J(k,h){var K=h.text(k,h);if(typeof K<"u")return K;if(h.list)return h.list=null,Z(h);if(h.taskList){var ne=k.match(P,!0)[1]===" ";return ne?h.taskOpen=!0:h.taskClosed=!0,B.highlightFormatting&&(h.formatting="task"),h.taskList=!1,Z(h)}if(h.taskOpen=!1,h.taskClosed=!1,h.header&&k.match(/^#+$/,!0))return B.highlightFormatting&&(h.formatting="header"),Z(h);var Le=k.next();if(h.linkTitle){h.linkTitle=!1;var Ge=Le;Le==="("&&(Ge=")"),Ge=(Ge+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Qe="^\\s*(?:[^"+Ge+"\\\\]+|\\\\\\\\|\\\\.)"+Ge;if(k.match(new RegExp(Qe),!0))return N.linkHref}if(Le==="`"){var je=h.formatting;B.highlightFormatting&&(h.formatting="code"),k.eatWhile("`");var ot=k.current().length;if(h.code==0&&(!h.quote||ot==1))return h.code=ot,Z(h);if(ot==h.code){var lt=Z(h);return h.code=0,lt}else return h.formatting=je,Z(h)}else if(h.code)return Z(h);if(Le==="\\"&&(k.next(),B.highlightFormatting)){var Ie=Z(h),qe=N.formatting+"-escape";return Ie?Ie+" "+qe:qe}if(Le==="!"&&k.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return h.imageMarker=!0,h.image=!0,B.highlightFormatting&&(h.formatting="image"),Z(h);if(Le==="["&&h.imageMarker&&k.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return h.imageMarker=!1,h.imageAltText=!0,B.highlightFormatting&&(h.formatting="image"),Z(h);if(Le==="]"&&h.imageAltText){B.highlightFormatting&&(h.formatting="image");var Ie=Z(h);return h.imageAltText=!1,h.image=!1,h.inline=h.f=_,Ie}if(Le==="["&&!h.image)return h.linkText&&k.match(/^.*?\]/)||(h.linkText=!0,B.highlightFormatting&&(h.formatting="link")),Z(h);if(Le==="]"&&h.linkText){B.highlightFormatting&&(h.formatting="link");var Ie=Z(h);return h.linkText=!1,h.inline=h.f=k.match(/\(.*?\)| ?\[.*?\]/,!1)?_:J,Ie}if(Le==="<"&&k.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){h.f=h.inline=Re,B.highlightFormatting&&(h.formatting="link");var Ie=Z(h);return Ie?Ie+=" ":Ie="",Ie+N.linkInline}if(Le==="<"&&k.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){h.f=h.inline=Re,B.highlightFormatting&&(h.formatting="link");var Ie=Z(h);return Ie?Ie+=" ":Ie="",Ie+N.linkEmail}if(B.xml&&Le==="<"&&k.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var wt=k.string.indexOf(">",k.pos);if(wt!=-1){var jt=k.string.substring(k.start,wt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(jt)&&(h.md_inside=!0)}return k.backUp(1),h.htmlState=W.startState(R),te(k,h,ge)}if(B.xml&&Le==="<"&&k.match(/^\/\w*?>/))return h.md_inside=!1,"tag";if(Le==="*"||Le==="_"){for(var De=1,Nt=k.pos==1?" ":k.string.charAt(k.pos-2);De<3&&k.eat(Le);)De++;var Oe=k.peek()||" ",It=!/\s/.test(Oe)&&(!H.test(Oe)||/\s/.test(Nt)||H.test(Nt)),xt=!/\s/.test(Nt)&&(!H.test(Nt)||/\s/.test(Oe)||H.test(Oe)),Ot=null,Pe=null;if(De%2&&(!h.em&&It&&(Le==="*"||!xt||H.test(Nt))?Ot=!0:h.em==Le&&xt&&(Le==="*"||!It||H.test(Oe))&&(Ot=!1)),De>1&&(!h.strong&&It&&(Le==="*"||!xt||H.test(Nt))?Pe=!0:h.strong==Le&&xt&&(Le==="*"||!It||H.test(Oe))&&(Pe=!1)),Pe!=null||Ot!=null){B.highlightFormatting&&(h.formatting=Ot==null?"strong":Pe==null?"em":"strong em"),Ot===!0&&(h.em=Le),Pe===!0&&(h.strong=Le);var lt=Z(h);return Ot===!1&&(h.em=!1),Pe===!1&&(h.strong=!1),lt}}else if(Le===" "&&(k.eat("*")||k.eat("_"))){if(k.peek()===" ")return Z(h);k.backUp(1)}if(B.strikethrough){if(Le==="~"&&k.eatWhile(Le)){if(h.strikethrough){B.highlightFormatting&&(h.formatting="strikethrough");var lt=Z(h);return h.strikethrough=!1,lt}else if(k.match(/^[^\s]/,!1))return h.strikethrough=!0,B.highlightFormatting&&(h.formatting="strikethrough"),Z(h)}else if(Le===" "&&k.match("~~",!0)){if(k.peek()===" ")return Z(h);k.backUp(2)}}if(B.emoji&&Le===":"&&k.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){h.emoji=!0,B.highlightFormatting&&(h.formatting="emoji");var zt=Z(h);return h.emoji=!1,zt}return Le===" "&&(k.match(/^ +$/,!1)?h.trailingSpace++:h.trailingSpace&&(h.trailingSpaceNewLine=!0)),Z(h)}function Re(k,h){var K=k.next();if(K===">"){h.f=h.inline=J,B.highlightFormatting&&(h.formatting="link");var ne=Z(h);return ne?ne+=" ":ne="",ne+N.linkInline}return k.match(/^[^>]+/,!0),N.linkInline}function _(k,h){if(k.eatSpace())return null;var K=k.next();return K==="("||K==="["?(h.f=h.inline=$(K==="("?")":"]"),B.highlightFormatting&&(h.formatting="link-string"),h.linkHref=!0,Z(h)):"error"}var le={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function $(k){return function(h,K){var ne=h.next();if(ne===k){K.f=K.inline=J,B.highlightFormatting&&(K.formatting="link-string");var Le=Z(K);return K.linkHref=!1,Le}return h.match(le[k]),K.linkHref=!0,Z(K)}}function Ce(k,h){return k.match(/^([^\]\\]|\\.)*\]:/,!1)?(h.f=Je,k.next(),B.highlightFormatting&&(h.formatting="link"),h.linkText=!0,Z(h)):j(k,h,J)}function Je(k,h){if(k.match("]:",!0)){h.f=h.inline=at,B.highlightFormatting&&(h.formatting="link");var K=Z(h);return h.linkText=!1,K}return k.match(/^([^\]\\]|\\.)+/,!0),N.linkText}function at(k,h){return k.eatSpace()?null:(k.match(/^[^\s]+/,!0),k.peek()===void 0?h.linkTitle=!0:k.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),h.f=h.inline=J,N.linkHref+" url")}var kt={startState:function(){return{f:ie,prevLine:{stream:null},thisLine:{stream:null},block:ie,htmlState:null,indentation:0,inline:J,text:Ae,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(k){return{f:k.f,prevLine:k.prevLine,thisLine:k.thisLine,block:k.block,htmlState:k.htmlState&&W.copyState(R,k.htmlState),indentation:k.indentation,localMode:k.localMode,localState:k.localMode?W.copyState(k.localMode,k.localState):null,inline:k.inline,text:k.text,formatting:!1,linkText:k.linkText,linkTitle:k.linkTitle,linkHref:k.linkHref,code:k.code,em:k.em,strong:k.strong,strikethrough:k.strikethrough,emoji:k.emoji,header:k.header,setext:k.setext,hr:k.hr,taskList:k.taskList,list:k.list,listStack:k.listStack.slice(0),quote:k.quote,indentedCode:k.indentedCode,trailingSpace:k.trailingSpace,trailingSpaceNewLine:k.trailingSpaceNewLine,md_inside:k.md_inside,fencedEndRE:k.fencedEndRE}},token:function(k,h){if(h.formatting=!1,k!=h.thisLine.stream){if(h.header=0,h.hr=!1,k.match(/^\s*$/,!0))return ue(h),null;if(h.prevLine=h.thisLine,h.thisLine={stream:k},h.taskList=!1,h.trailingSpace=0,h.trailingSpaceNewLine=!1,!h.localState&&(h.f=h.block,h.f!=ge)){var K=k.match(/^\s*/,!0)[0].replace(/\t/g,U).length;if(h.indentation=K,h.indentationDiff=null,K>0)return null}}return h.f(k,h)},innerMode:function(k){return k.block==ge?{state:k.htmlState,mode:R}:k.localState?{state:k.localState,mode:k.localMode}:{state:k,mode:kt}},indent:function(k,h,K){return k.block==ge&&R.indent?R.indent(k.htmlState,h,K):k.localState&&k.localMode.indent?k.localMode.indent(k.localState,h,K):W.Pass},blankLine:ue,getType:Z,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return kt},"xml"),W.defineMIME("text/markdown","markdown"),W.defineMIME("text/x-markdown","markdown")})},"./node_modules/codemirror/mode/meta.js":function(ct,_e,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";W.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy","cbl"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded JavaScript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"],alias:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Q=0;Q<W.modeInfo.length;Q++){var B=W.modeInfo[Q];B.mimes&&(B.mime=B.mimes[0])}W.findModeByMIME=function(R){R=R.toLowerCase();for(var L=0;L<W.modeInfo.length;L++){var A=W.modeInfo[L];if(A.mime==R)return A;if(A.mimes){for(var N=0;N<A.mimes.length;N++)if(A.mimes[N]==R)return A}}if(/\+xml$/.test(R))return W.findModeByMIME("application/xml");if(/\+json$/.test(R))return W.findModeByMIME("application/json")},W.findModeByExtension=function(R){R=R.toLowerCase();for(var L=0;L<W.modeInfo.length;L++){var A=W.modeInfo[L];if(A.ext){for(var N=0;N<A.ext.length;N++)if(A.ext[N]==R)return A}}},W.findModeByFileName=function(R){for(var L=0;L<W.modeInfo.length;L++){var A=W.modeInfo[L];if(A.file&&A.file.test(R))return A}var N=R.lastIndexOf("."),Y=N>-1&&R.substring(N+1,R.length);if(Y)return W.findModeByExtension(Y)},W.findModeByName=function(R){R=R.toLowerCase();for(var L=0;L<W.modeInfo.length;L++){var A=W.modeInfo[L];if(A.name.toLowerCase()==R)return A;if(A.alias){for(var N=0;N<A.alias.length;N++)if(A.alias[N].toLowerCase()==R)return A}}}})},"./node_modules/codemirror/mode/xml/xml.js":function(ct,_e,ye){(function(W){W(ye("./node_modules/codemirror/lib/codemirror.js"))})(function(W){"use strict";var Q={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},B={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};W.defineMode("xml",function(R,L){var A=R.indentUnit,N={},Y=L.htmlMode?Q:B;for(var V in Y)N[V]=Y[V];for(var V in L)N[V]=L[V];var G,P;function oe(_,le){function $(at){return le.tokenize=at,at(_,le)}var Ce=_.next();if(Ce=="<")return _.eat("!")?_.eat("[")?_.match("CDATA[")?$(me("atom","]]>")):null:_.match("--")?$(me("comment","-->")):_.match("DOCTYPE",!0,!0)?(_.eatWhile(/[\w\._\-]/),$(be(1))):null:_.eat("?")?(_.eatWhile(/[\w\._\-]/),le.tokenize=me("meta","?>"),"meta"):(G=_.eat("/")?"closeTag":"openTag",le.tokenize=pe,"tag bracket");if(Ce=="&"){var Je;return _.eat("#")?_.eat("x")?Je=_.eatWhile(/[a-fA-F\d]/)&&_.eat(";"):Je=_.eatWhile(/[\d]/)&&_.eat(";"):Je=_.eatWhile(/[\w\.\-:]/)&&_.eat(";"),Je?"atom":"error"}else return _.eatWhile(/[^&<]/),null}oe.isInText=!0;function pe(_,le){var $=_.next();if($==">"||$=="/"&&_.eat(">"))return le.tokenize=oe,G=$==">"?"endTag":"selfcloseTag","tag bracket";if($=="=")return G="equals",null;if($=="<"){le.tokenize=oe,le.state=X,le.tagName=le.tagStart=null;var Ce=le.tokenize(_,le);return Ce?Ce+" tag error":"tag error"}else return/[\'\"]/.test($)?(le.tokenize=Ee($),le.stringStartCol=_.column(),le.tokenize(_,le)):(_.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ee(_){var le=function($,Ce){for(;!$.eol();)if($.next()==_){Ce.tokenize=pe;break}return"string"};return le.isInAttribute=!0,le}function me(_,le){return function($,Ce){for(;!$.eol();){if($.match(le)){Ce.tokenize=oe;break}$.next()}return _}}function be(_){return function(le,$){for(var Ce;(Ce=le.next())!=null;){if(Ce=="<")return $.tokenize=be(_+1),$.tokenize(le,$);if(Ce==">")if(_==1){$.tokenize=oe;break}else return $.tokenize=be(_-1),$.tokenize(le,$)}return"meta"}}function H(_){return _&&_.toLowerCase()}function U(_,le,$){this.prev=_.context,this.tagName=le||"",this.indent=_.indented,this.startOfLine=$,(N.doNotIndent.hasOwnProperty(le)||_.context&&_.context.noIndent)&&(this.noIndent=!0)}function j(_){_.context&&(_.context=_.context.prev)}function te(_,le){for(var $;;){if(!_.context||($=_.context.tagName,!N.contextGrabbers.hasOwnProperty(H($))||!N.contextGrabbers[H($)].hasOwnProperty(H(le))))return;j(_)}}function X(_,le,$){return _=="openTag"?($.tagStart=le.column(),ue):_=="closeTag"?ie:X}function ue(_,le,$){return _=="word"?($.tagName=le.current(),P="tag",Z):N.allowMissingTagName&&_=="endTag"?(P="tag bracket",Z(_,le,$)):(P="error",ue)}function ie(_,le,$){if(_=="word"){var Ce=le.current();return $.context&&$.context.tagName!=Ce&&N.implicitlyClosed.hasOwnProperty(H($.context.tagName))&&j($),$.context&&$.context.tagName==Ce||N.matchClosing===!1?(P="tag",ge):(P="tag error",Te)}else return N.allowMissingTagName&&_=="endTag"?(P="tag bracket",ge(_,le,$)):(P="error",Te)}function ge(_,le,$){return _!="endTag"?(P="error",ge):(j($),X)}function Te(_,le,$){return P="error",ge(_,le,$)}function Z(_,le,$){if(_=="word")return P="attribute",Ae;if(_=="endTag"||_=="selfcloseTag"){var Ce=$.tagName,Je=$.tagStart;return $.tagName=$.tagStart=null,_=="selfcloseTag"||N.autoSelfClosers.hasOwnProperty(H(Ce))?te($,Ce):(te($,Ce),$.context=new U($,Ce,Je==$.indented)),X}return P="error",Z}function Ae(_,le,$){return _=="equals"?J:(N.allowMissing||(P="error"),Z(_,le,$))}function J(_,le,$){return _=="string"?Re:_=="word"&&N.allowUnquoted?(P="string",Z):(P="error",Z(_,le,$))}function Re(_,le,$){return _=="string"?Re:Z(_,le,$)}return{startState:function(_){var le={tokenize:oe,state:X,indented:_||0,tagName:null,tagStart:null,context:null};return _!=null&&(le.baseIndent=_),le},token:function(_,le){if(!le.tagName&&_.sol()&&(le.indented=_.indentation()),_.eatSpace())return null;G=null;var $=le.tokenize(_,le);return($||G)&&$!="comment"&&(P=null,le.state=le.state(G||$,_,le),P&&($=P=="error"?$+" error":P)),$},indent:function(_,le,$){var Ce=_.context;if(_.tokenize.isInAttribute)return _.tagStart==_.indented?_.stringStartCol+1:_.indented+A;if(Ce&&Ce.noIndent)return W.Pass;if(_.tokenize!=pe&&_.tokenize!=oe)return $?$.match(/^(\s*)/)[0].length:0;if(_.tagName)return N.multilineTagIndentPastTag!==!1?_.tagStart+_.tagName.length+2:_.tagStart+A*(N.multilineTagIndentFactor||1);if(N.alignCDATA&&/<!\[CDATA\[/.test(le))return 0;var Je=le&&/^<(\/)?([\w_:\.-]*)/.exec(le);if(Je&&Je[1])for(;Ce;)if(Ce.tagName==Je[2]){Ce=Ce.prev;break}else if(N.implicitlyClosed.hasOwnProperty(H(Ce.tagName)))Ce=Ce.prev;else break;else if(Je)for(;Ce;){var at=N.contextGrabbers[H(Ce.tagName)];if(at&&at.hasOwnProperty(H(Je[2])))Ce=Ce.prev;else break}for(;Ce&&Ce.prev&&!Ce.startOfLine;)Ce=Ce.prev;return Ce?Ce.indent+A:_.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:N.htmlMode?"html":"xml",helperType:N.htmlMode?"html":"xml",skipAttribute:function(_){_.state==J&&(_.state=Z)},xmlCurrentTag:function(_){return _.tagName?{name:_.tagName,close:_.type=="closeTag"}:null},xmlCurrentContext:function(_){for(var le=[],$=_.context;$;$=$.prev)le.push($.tagName);return le.reverse()}}}),W.defineMIME("text/xml","xml"),W.defineMIME("application/xml","xml"),W.mimeModes.hasOwnProperty("text/html")||W.defineMIME("text/html",{name:"xml",htmlMode:!0})})},"./node_modules/easymde/src/js/codemirror/tablist.js":function(ct,_e,ye){var W=ye("./node_modules/codemirror/lib/codemirror.js");W.commands.tabAndIndentMarkdownList=function(Q){var B=Q.listSelections(),R=B[0].head,L=Q.getStateAfter(R.line),A=L.list!==!1;if(A){Q.execCommand("indentMore");return}if(Q.options.indentWithTabs)Q.execCommand("insertTab");else{var N=Array(Q.options.tabSize+1).join(" ");Q.replaceSelection(N)}},W.commands.shiftTabAndUnindentMarkdownList=function(Q){var B=Q.listSelections(),R=B[0].head,L=Q.getStateAfter(R.line),A=L.list!==!1;if(A){Q.execCommand("indentLess");return}if(Q.options.indentWithTabs)Q.execCommand("insertTab");else{var N=Array(Q.options.tabSize+1).join(" ");Q.replaceSelection(N)}}},"./node_modules/easymde/src/js/easymde.js":function(ct,_e,ye){"use strict";var W=ye("./node_modules/codemirror/lib/codemirror.js");ye("./node_modules/codemirror/addon/edit/continuelist.js"),ye("./node_modules/easymde/src/js/codemirror/tablist.js"),ye("./node_modules/codemirror/addon/display/fullscreen.js"),ye("./node_modules/codemirror/mode/markdown/markdown.js"),ye("./node_modules/codemirror/addon/mode/overlay.js"),ye("./node_modules/codemirror/addon/display/placeholder.js"),ye("./node_modules/codemirror/addon/display/autorefresh.js"),ye("./node_modules/codemirror/addon/selection/mark-selection.js"),ye("./node_modules/codemirror/addon/search/searchcursor.js"),ye("./node_modules/codemirror/mode/gfm/gfm.js"),ye("./node_modules/codemirror/mode/xml/xml.js");var Q=ye("./node_modules/codemirror-spell-checker/src/js/spell-checker.js"),B=ye("./node_modules/marked/lib/marked.cjs").xI,R=/Mac/.test(navigator.platform),L=new RegExp(/(<a.*?https?:\/\/.*?[^a]>)+?/g),A={toggleBold:te,toggleItalic:X,drawLink:kt,toggleHeadingSmaller:Te,toggleHeadingBigger:Z,drawImage:k,toggleBlockquote:ge,toggleOrderedList:Je,toggleUnorderedList:Ce,toggleCodeBlock:ie,togglePreview:lt,toggleStrikethrough:ue,toggleHeading1:Ae,toggleHeading2:J,toggleHeading3:Re,toggleHeading4:_,toggleHeading5:le,toggleHeading6:$,cleanBlock:at,drawTable:Le,drawHorizontalRule:Ge,undo:Qe,redo:je,toggleSideBySide:ot,toggleFullScreen:j},N={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",toggleHeading1:"Ctrl+Alt+1",toggleHeading2:"Ctrl+Alt+2",toggleHeading3:"Ctrl+Alt+3",toggleHeading4:"Ctrl+Alt+4",toggleHeading5:"Ctrl+Alt+5",toggleHeading6:"Ctrl+Alt+6",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},Y=function(l){for(var d in A)if(A[d]===l)return d;return null},V=function(){var l=!1;return function(d){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(d)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(d.substr(0,4)))&&(l=!0)}(navigator.userAgent||navigator.vendor||window.opera),l};function G(l){for(var d;(d=L.exec(l))!==null;){var m=d[0];if(m.indexOf("target=")===-1){var y=m.replace(/>$/,' target="_blank">');l=l.replace(m,y)}}return l}function P(l){for(var d=new DOMParser,m=d.parseFromString(l,"text/html"),y=m.getElementsByTagName("li"),F=0;F<y.length;F++)for(var S=y[F],b=0;b<S.children.length;b++){var w=S.children[b];w instanceof HTMLInputElement&&w.type==="checkbox"&&(S.style.marginLeft="-1.5em",S.style.listStyleType="none")}return m.documentElement.innerHTML}function oe(l){return R?l=l.replace("Ctrl","Cmd"):l=l.replace("Cmd","Ctrl"),l}function pe(l,d,m,y){var F=Ee(l,!1,d,m,"button",y);F.classList.add("easymde-dropdown"),F.onclick=function(){F.focus()};var S=document.createElement("div");S.className="easymde-dropdown-content";for(var b=0;b<l.children.length;b++){var w=l.children[b],C;typeof w=="string"&&w in zt?C=Ee(zt[w],!0,d,m,"button",y):C=Ee(w,!0,d,m,"button",y),C.addEventListener("click",function(ee){ee.stopPropagation()},!1),S.appendChild(C)}return F.appendChild(S),F}function Ee(l,d,m,y,F,S){l=l||{};var b=document.createElement(F);if(l.attributes)for(var w in l.attributes)Object.prototype.hasOwnProperty.call(l.attributes,w)&&b.setAttribute(w,l.attributes[w]);var C=S.options.toolbarButtonClassPrefix?S.options.toolbarButtonClassPrefix+"-":"";b.className=C+l.name,b.setAttribute("type",F),m=m??!0,l.text&&(b.innerText=l.text),l.name&&l.name in y&&(A[l.name]=l.action),l.title&&m&&(b.title=be(l.title,l.action,y),R&&(b.title=b.title.replace("Ctrl","\u2318"),b.title=b.title.replace("Alt","\u2325"))),l.title&&b.setAttribute("aria-label",l.title),l.noDisable&&b.classList.add("no-disable"),l.noMobile&&b.classList.add("no-mobile");var ee=[];typeof l.className<"u"&&(ee=l.className.split(" "));for(var he=[],ke=0;ke<ee.length;ke++){var xe=ee[ke];xe.match(/^fa([srlb]|(-[\w-]*)|$)/)?he.push(xe):b.classList.add(xe)}if(b.tabIndex=-1,he.length>0){for(var ce=document.createElement("i"),We=0;We<he.length;We++){var Ue=he[We];ce.classList.add(Ue)}b.appendChild(ce)}return typeof l.icon<"u"&&(b.innerHTML=l.icon),l.action&&d&&(typeof l.action=="function"?b.onclick=function(Be){Be.preventDefault(),l.action(S)}:typeof l.action=="string"&&(b.onclick=function(Be){Be.preventDefault(),window.open(l.action,"_blank")})),b}function me(){var l=document.createElement("i");return l.className="separator",l.innerHTML="|",l}function be(l,d,m){var y,F=l;return d&&(y=Y(d),m[y]&&(F+=" ("+oe(m[y])+")")),F}function H(l,d){d=d||l.getCursor("start");var m=l.getTokenAt(d);if(!m.type)return{};for(var y=m.type.split(" "),F={},S,b,w=0;w<y.length;w++)S=y[w],S==="strong"?F.bold=!0:S==="variable-2"?(b=l.getLine(d.line),/^\s*\d+\.\s/.test(b)?F["ordered-list"]=!0:F["unordered-list"]=!0):S==="atom"?F.quote=!0:S==="em"?F.italic=!0:S==="quote"?F.quote=!0:S==="strikethrough"?F.strikethrough=!0:S==="comment"?F.code=!0:S==="link"&&!F.image?F.link=!0:S==="image"?F.image=!0:S.match(/^header(-[1-6])?$/)&&(F[S.replace("header","heading")]=!0);return F}var U="";function j(l){var d=l.codemirror;d.setOption("fullScreen",!d.getOption("fullScreen")),d.getOption("fullScreen")?(U=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=U;var m=d.getWrapperElement(),y=m.nextSibling;if(y.classList.contains("editor-preview-active-side"))if(l.options.sideBySideFullscreen===!1){var F=m.parentNode;d.getOption("fullScreen")?F.classList.remove("sided--no-fullscreen"):F.classList.add("sided--no-fullscreen")}else ot(l);if(l.options.onToggleFullScreen&&l.options.onToggleFullScreen(d.getOption("fullScreen")||!1),typeof l.options.maxHeight<"u"&&(d.getOption("fullScreen")?(d.getScrollerElement().style.removeProperty("height"),y.style.removeProperty("height")):(d.getScrollerElement().style.height=l.options.maxHeight,l.setPreviewMaxHeight())),l.toolbar_div.classList.toggle("fullscreen"),l.toolbarElements&&l.toolbarElements.fullscreen){var S=l.toolbarElements.fullscreen;S.classList.toggle("active")}}function te(l){De(l,"bold",l.options.blockStyles.bold)}function X(l){De(l,"italic",l.options.blockStyles.italic)}function ue(l){De(l,"strikethrough","~~")}function ie(l){var d=l.options.blockStyles.code;function m(rt){if(typeof rt!="object")throw"fencing_line() takes a 'line' object (not a line number, or line text). Got: "+typeof rt+": "+rt;return rt.styles&&rt.styles[2]&&rt.styles[2].indexOf("formatting-code-block")!==-1}function y(rt){return rt.state.base.base||rt.state.base}function F(rt,ur,qt,Ht,Gt){qt=qt||rt.getLineHandle(ur),Ht=Ht||rt.getTokenAt({line:ur,ch:1}),Gt=Gt||!!qt.text&&rt.getTokenAt({line:ur,ch:qt.text.length-1});var Ut=Ht.type?Ht.type.split(" "):[];return Gt&&y(Gt).indentedCode?"indented":Ut.indexOf("comment")===-1?!1:y(Ht).fencedChars||y(Gt).fencedChars||m(qt)?"fenced":"single"}function S(rt,ur,qt,Ht){var Gt=ur.line+1,Ut=qt.line+1,Ti=ur.line!==qt.line,tr=Ht+`
`,Ir=`
`+Ht;Ti&&Ut++,Ti&&qt.ch===0&&(Ir=Ht+`
`,Ut--),Ie(rt,!1,[tr,Ir]),rt.setSelection({line:Gt,ch:0},{line:Ut,ch:0})}var b=l.codemirror,w=b.getCursor("start"),C=b.getCursor("end"),ee=b.getTokenAt({line:w.line,ch:w.ch||1}),he=b.getLineHandle(w.line),ke=F(b,w.line,he,ee),xe,ce,We;if(ke==="single"){var Ue=he.text.slice(0,w.ch).replace("`",""),Be=he.text.slice(w.ch).replace("`","");b.replaceRange(Ue+Be,{line:w.line,ch:0},{line:w.line,ch:99999999999999}),w.ch--,w!==C&&C.ch--,b.setSelection(w,C),b.focus()}else if(ke==="fenced")if(w.line!==C.line||w.ch!==C.ch){for(xe=w.line;xe>=0&&(he=b.getLineHandle(xe),!m(he));xe--);var ze=b.getTokenAt({line:xe,ch:1}),$e=y(ze).fencedChars,Ve,At,yt,Wt;m(b.getLineHandle(w.line))?(Ve="",At=w.line):m(b.getLineHandle(w.line-1))?(Ve="",At=w.line-1):(Ve=$e+`
`,At=w.line),m(b.getLineHandle(C.line))?(yt="",Wt=C.line,C.ch===0&&(Wt+=1)):C.ch!==0&&m(b.getLineHandle(C.line+1))?(yt="",Wt=C.line+1):(yt=$e+`
`,Wt=C.line+1),C.ch===0&&(Wt-=1),b.operation(function(){b.replaceRange(yt,{line:Wt,ch:0},{line:Wt+(yt?0:1),ch:0}),b.replaceRange(Ve,{line:At,ch:0},{line:At+(Ve?0:1),ch:0})}),b.setSelection({line:At+(Ve?1:0),ch:0},{line:Wt+(Ve?1:-1),ch:0}),b.focus()}else{var Mr=w.line;if(m(b.getLineHandle(w.line))&&(F(b,w.line+1)==="fenced"?(xe=w.line,Mr=w.line+1):(ce=w.line,Mr=w.line-1)),xe===void 0)for(xe=Mr;xe>=0&&(he=b.getLineHandle(xe),!m(he));xe--);if(ce===void 0)for(We=b.lineCount(),ce=Mr;ce<We&&(he=b.getLineHandle(ce),!m(he));ce++);b.operation(function(){b.replaceRange("",{line:xe,ch:0},{line:xe+1,ch:0}),b.replaceRange("",{line:ce-1,ch:0},{line:ce,ch:0})}),b.focus()}else if(ke==="indented"){if(w.line!==C.line||w.ch!==C.ch)xe=w.line,ce=C.line,C.ch===0&&ce--;else{for(xe=w.line;xe>=0;xe--)if(he=b.getLineHandle(xe),!he.text.match(/^\s*$/)&&F(b,xe,he)!=="indented"){xe+=1;break}for(We=b.lineCount(),ce=w.line;ce<We;ce++)if(he=b.getLineHandle(ce),!he.text.match(/^\s*$/)&&F(b,ce,he)!=="indented"){ce-=1;break}}var Nr=b.getLineHandle(ce+1),Li=Nr&&b.getTokenAt({line:ce+1,ch:Nr.text.length-1}),fn=Li&&y(Li).indentedCode;fn&&b.replaceRange(`
`,{line:ce+1,ch:0});for(var yr=xe;yr<=ce;yr++)b.indentLine(yr,"subtract");b.focus()}else{var cn=w.line===C.line&&w.ch===C.ch&&w.ch===0,ei=w.line!==C.line;cn||ei?S(b,w,C,d):Ie(b,!1,["`","`"])}}function ge(l){wt(l.codemirror,"quote")}function Te(l){qe(l.codemirror,"smaller")}function Z(l){qe(l.codemirror,"bigger")}function Ae(l){qe(l.codemirror,void 0,1)}function J(l){qe(l.codemirror,void 0,2)}function Re(l){qe(l.codemirror,void 0,3)}function _(l){qe(l.codemirror,void 0,4)}function le(l){qe(l.codemirror,void 0,5)}function $(l){qe(l.codemirror,void 0,6)}function Ce(l){var d=l.codemirror,m="*";["-","+","*"].includes(l.options.unorderedListStyle)&&(m=l.options.unorderedListStyle),wt(d,"unordered-list",m)}function Je(l){wt(l.codemirror,"ordered-list")}function at(l){Nt(l.codemirror)}function kt(l){var d=l.options,m="https://";if(d.promptURLs){var y=prompt(d.promptTexts.link,m);if(!y)return!1;m=h(y)}jt(l,"link",d.insertTexts.link,m)}function k(l){var d=l.options,m="https://";if(d.promptURLs){var y=prompt(d.promptTexts.image,m);if(!y)return!1;m=h(y)}jt(l,"image",d.insertTexts.image,m)}function h(l){return encodeURI(l).replace(/([\\()])/g,"\\$1")}function K(l){l.openBrowseFileWindow()}function ne(l,d){var m=l.codemirror,y=H(m),F=l.options,S=d.substr(d.lastIndexOf("/")+1),b=S.substring(S.lastIndexOf(".")+1).replace(/\?.*$/,"").toLowerCase();if(["png","jpg","jpeg","gif","svg","apng","avif","webp"].includes(b))Ie(m,y.image,F.insertTexts.uploadedImage,d);else{var w=F.insertTexts.link;w[0]="["+S,Ie(m,y.link,w,d)}l.updateStatusBar("upload-image",l.options.imageTexts.sbOnUploaded.replace("#image_name#",S)),setTimeout(function(){l.updateStatusBar("upload-image",l.options.imageTexts.sbInit)},1e3)}function Le(l){var d=l.codemirror,m=H(d),y=l.options;Ie(d,m.table,y.insertTexts.table)}function Ge(l){var d=l.codemirror,m=H(d),y=l.options;Ie(d,m.image,y.insertTexts.horizontalRule)}function Qe(l){var d=l.codemirror;d.undo(),d.focus()}function je(l){var d=l.codemirror;d.redo(),d.focus()}function ot(l){var d=l.codemirror,m=d.getWrapperElement(),y=m.nextSibling,F=l.toolbarElements&&l.toolbarElements["side-by-side"],S=!1,b=m.parentNode;y.classList.contains("editor-preview-active-side")?(l.options.sideBySideFullscreen===!1&&b.classList.remove("sided--no-fullscreen"),y.classList.remove("editor-preview-active-side"),F&&F.classList.remove("active"),m.classList.remove("CodeMirror-sided")):(setTimeout(function(){d.getOption("fullScreen")||(l.options.sideBySideFullscreen===!1?b.classList.add("sided--no-fullscreen"):j(l)),y.classList.add("editor-preview-active-side")},1),F&&F.classList.add("active"),m.classList.add("CodeMirror-sided"),S=!0);var w=m.lastChild;if(w.classList.contains("editor-preview-active")){w.classList.remove("editor-preview-active");var C=l.toolbarElements.preview,ee=l.toolbar_div;C.classList.remove("active"),ee.classList.remove("disabled-for-preview")}var he=function(){var xe=l.options.previewRender(l.value(),y);xe!=null&&(y.innerHTML=xe)};if(d.sideBySideRenderingFunction||(d.sideBySideRenderingFunction=he),S){var ke=l.options.previewRender(l.value(),y);ke!=null&&(y.innerHTML=ke),d.on("update",d.sideBySideRenderingFunction)}else d.off("update",d.sideBySideRenderingFunction);d.refresh()}function lt(l){var d=l.codemirror,m=d.getWrapperElement(),y=l.toolbar_div,F=l.options.toolbar?l.toolbarElements.preview:!1,S=m.lastChild,b=d.getWrapperElement().nextSibling;if(b.classList.contains("editor-preview-active-side")&&ot(l),!S||!S.classList.contains("editor-preview-full")){if(S=document.createElement("div"),S.className="editor-preview-full",l.options.previewClass)if(Array.isArray(l.options.previewClass))for(var w=0;w<l.options.previewClass.length;w++)S.classList.add(l.options.previewClass[w]);else typeof l.options.previewClass=="string"&&S.classList.add(l.options.previewClass);m.appendChild(S)}S.classList.contains("editor-preview-active")?(S.classList.remove("editor-preview-active"),F&&(F.classList.remove("active"),y.classList.remove("disabled-for-preview"))):(setTimeout(function(){S.classList.add("editor-preview-active")},1),F&&(F.classList.add("active"),y.classList.add("disabled-for-preview")));var C=l.options.previewRender(l.value(),S);C!==null&&(S.innerHTML=C)}function Ie(l,d,m,y){if(!l.getWrapperElement().lastChild.classList.contains("editor-preview-active")){var F,S=m[0],b=m[1],w={},C={};Object.assign(w,l.getCursor("start")),Object.assign(C,l.getCursor("end")),y&&(S=S.replace("#url#",y),b=b.replace("#url#",y)),d?(F=l.getLine(w.line),S=F.slice(0,w.ch),b=F.slice(w.ch),l.replaceRange(S+b,{line:w.line,ch:0})):(F=l.getSelection(),l.replaceSelection(S+F+b),w.ch+=S.length,w!==C&&(C.ch+=S.length)),l.setSelection(w,C),l.focus()}}function qe(l,d,m){if(!l.getWrapperElement().lastChild.classList.contains("editor-preview-active")){for(var y=l.getCursor("start"),F=l.getCursor("end"),S=y.line;S<=F.line;S++)(function(b){var w=l.getLine(b),C=w.search(/[^#]/);d!==void 0?C<=0?d=="bigger"?w="###### "+w:w="# "+w:C==6&&d=="smaller"?w=w.substr(7):C==1&&d=="bigger"?w=w.substr(2):d=="bigger"?w=w.substr(1):w="#"+w:C<=0?w="#".repeat(m)+" "+w:C==m?w=w.substr(C+1):w="#".repeat(m)+" "+w.substr(C+1),l.replaceRange(w,{line:b,ch:0},{line:b,ch:99999999999999})})(S);l.focus()}}function wt(l,d,m){if(!l.getWrapperElement().lastChild.classList.contains("editor-preview-active")){for(var y=/^(\s*)(\*|-|\+|\d*\.)(\s+)/,F=/^\s*/,S=H(l),b=l.getCursor("start"),w=l.getCursor("end"),C={quote:/^(\s*)>\s+/,"unordered-list":y,"ordered-list":y},ee=function(We,Ue){var Be={quote:">","unordered-list":m,"ordered-list":"%%i."};return Be[We].replace("%%i",Ue)},he=function(We,Ue){var Be={quote:">","unordered-list":"\\"+m,"ordered-list":"\\d+."},ze=new RegExp(Be[We]);return Ue&&ze.test(Ue)},ke=function(We,Ue,Be){var ze=y.exec(Ue),$e=ee(We,xe);return ze!==null?(he(We,ze[2])&&($e=""),Ue=ze[1]+$e+ze[3]+Ue.replace(F,"").replace(C[We],"$1")):Be==!1&&(Ue=$e+" "+Ue),Ue},xe=1,ce=b.line;ce<=w.line;ce++)(function(We){var Ue=l.getLine(We);S[d]?Ue=Ue.replace(C[d],"$1"):(d=="unordered-list"&&(Ue=ke("ordered-list",Ue,!0)),Ue=ke(d,Ue,!1),xe+=1),l.replaceRange(Ue,{line:We,ch:0},{line:We,ch:99999999999999})})(ce);l.focus()}}function jt(l,d,m,y){if(!(!l.codemirror||l.isPreviewActive())){var F=l.codemirror,S=H(F),b=S[d];if(!b){Ie(F,b,m,y);return}var w=F.getCursor("start"),C=F.getCursor("end"),ee=F.getLine(w.line),he=ee.slice(0,w.ch),ke=ee.slice(w.ch);d=="link"?he=he.replace(/(.*)[^!]\[/,"$1"):d=="image"&&(he=he.replace(/(.*)!\[$/,"$1")),ke=ke.replace(/]\(.*?\)/,""),F.replaceRange(he+ke,{line:w.line,ch:0},{line:w.line,ch:99999999999999}),w.ch-=m[0].length,w!==C&&(C.ch-=m[0].length),F.setSelection(w,C),F.focus()}}function De(l,d,m,y){if(!(!l.codemirror||l.isPreviewActive())){y=typeof y>"u"?m:y;var F=l.codemirror,S=H(F),b,w=m,C=y,ee=F.getCursor("start"),he=F.getCursor("end");S[d]?(b=F.getLine(ee.line),w=b.slice(0,ee.ch),C=b.slice(ee.ch),d=="bold"?(w=w.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),C=C.replace(/(\*\*|__)/,"")):d=="italic"?(w=w.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),C=C.replace(/(\*|_)/,"")):d=="strikethrough"&&(w=w.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),C=C.replace(/(\*\*|~~)/,"")),F.replaceRange(w+C,{line:ee.line,ch:0},{line:ee.line,ch:99999999999999}),d=="bold"||d=="strikethrough"?(ee.ch-=2,ee!==he&&(he.ch-=2)):d=="italic"&&(ee.ch-=1,ee!==he&&(he.ch-=1))):(b=F.getSelection(),d=="bold"?(b=b.split("**").join(""),b=b.split("__").join("")):d=="italic"?(b=b.split("*").join(""),b=b.split("_").join("")):d=="strikethrough"&&(b=b.split("~~").join("")),F.replaceSelection(w+b+C),ee.ch+=m.length,he.ch=ee.ch+b.length),F.setSelection(ee,he),F.focus()}}function Nt(l){if(!l.getWrapperElement().lastChild.classList.contains("editor-preview-active"))for(var d=l.getCursor("start"),m=l.getCursor("end"),y,F=d.line;F<=m.line;F++)y=l.getLine(F),y=y.replace(/^[ ]*([# ]+|\*|-|[> ]+|[0-9]+(.|\)))[ ]*/,""),l.replaceRange(y,{line:F,ch:0},{line:F,ch:99999999999999})}function Oe(l,d){if(Math.abs(l)<1024)return""+l+d[0];var m=0;do l/=1024,++m;while(Math.abs(l)>=1024&&m<d.length);return""+l.toFixed(1)+d[m]}function It(l,d){for(var m in d)Object.prototype.hasOwnProperty.call(d,m)&&(d[m]instanceof Array?l[m]=d[m].concat(l[m]instanceof Array?l[m]:[]):d[m]!==null&&typeof d[m]=="object"&&d[m].constructor===Object?l[m]=It(l[m]||{},d[m]):l[m]=d[m]);return l}function xt(l){for(var d=1;d<arguments.length;d++)l=It(l,arguments[d]);return l}function Ot(l){var d=/[a-zA-Z0-9_\u00A0-\u02AF\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g,m=l.match(d),y=0;if(m===null)return y;for(var F=0;F<m.length;F++)m[F].charCodeAt(0)>=19968?y+=m[F].length:y+=1;return y}var Pe={bold:"fa fa-bold",italic:"fa fa-italic",strikethrough:"fa fa-strikethrough",heading:"fa fa-header fa-heading","heading-smaller":"fa fa-header fa-heading header-smaller","heading-bigger":"fa fa-header fa-heading header-bigger","heading-1":"fa fa-header fa-heading header-1","heading-2":"fa fa-header fa-heading header-2","heading-3":"fa fa-header fa-heading header-3",code:"fa fa-code",quote:"fa fa-quote-left","ordered-list":"fa fa-list-ol","unordered-list":"fa fa-list-ul","clean-block":"fa fa-eraser",link:"fa fa-link",image:"fa fa-image","upload-image":"fa fa-image",table:"fa fa-table","horizontal-rule":"fa fa-minus",preview:"fa fa-eye","side-by-side":"fa fa-columns",fullscreen:"fa fa-arrows-alt",guide:"fa fa-question-circle",undo:"fa fa-undo",redo:"fa fa-repeat fa-redo"},zt={bold:{name:"bold",action:te,className:Pe.bold,title:"Bold",default:!0},italic:{name:"italic",action:X,className:Pe.italic,title:"Italic",default:!0},strikethrough:{name:"strikethrough",action:ue,className:Pe.strikethrough,title:"Strikethrough"},heading:{name:"heading",action:Te,className:Pe.heading,title:"Heading",default:!0},"heading-smaller":{name:"heading-smaller",action:Te,className:Pe["heading-smaller"],title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:Z,className:Pe["heading-bigger"],title:"Bigger Heading"},"heading-1":{name:"heading-1",action:Ae,className:Pe["heading-1"],title:"Big Heading"},"heading-2":{name:"heading-2",action:J,className:Pe["heading-2"],title:"Medium Heading"},"heading-3":{name:"heading-3",action:Re,className:Pe["heading-3"],title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:ie,className:Pe.code,title:"Code"},quote:{name:"quote",action:ge,className:Pe.quote,title:"Quote",default:!0},"unordered-list":{name:"unordered-list",action:Ce,className:Pe["unordered-list"],title:"Generic List",default:!0},"ordered-list":{name:"ordered-list",action:Je,className:Pe["ordered-list"],title:"Numbered List",default:!0},"clean-block":{name:"clean-block",action:at,className:Pe["clean-block"],title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:kt,className:Pe.link,title:"Create Link",default:!0},image:{name:"image",action:k,className:Pe.image,title:"Insert Image",default:!0},"upload-image":{name:"upload-image",action:K,className:Pe["upload-image"],title:"Import an image"},table:{name:"table",action:Le,className:Pe.table,title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:Ge,className:Pe["horizontal-rule"],title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:lt,className:Pe.preview,noDisable:!0,title:"Toggle Preview",default:!0},"side-by-side":{name:"side-by-side",action:ot,className:Pe["side-by-side"],noDisable:!0,noMobile:!0,title:"Toggle Side by Side",default:!0},fullscreen:{name:"fullscreen",action:j,className:Pe.fullscreen,noDisable:!0,noMobile:!0,title:"Toggle Fullscreen",default:!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://www.markdownguide.org/basic-syntax/",className:Pe.guide,noDisable:!0,title:"Markdown Guide",default:!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:Qe,className:Pe.undo,noDisable:!0,title:"Undo"},redo:{name:"redo",action:je,className:Pe.redo,noDisable:!0,title:"Redo"}},xr={link:["[","](#url#)"],image:["![","](#url#)"],uploadedImage:["![](#url#)",""],table:["",`
| Column 1 | Column 2 | Column 3 |
| -------- | -------- | -------- |
| Text | Text | Text |
`],horizontalRule:["",`
-----
`]},I={link:"URL for the link:",image:"URL of the image:"},O={locale:"en-US",format:{hour:"2-digit",minute:"2-digit"}},T={bold:"**",code:"```",italic:"*"},c={sbInit:"Attach files by drag and dropping or pasting from clipboard.",sbOnDragEnter:"Drop image to upload it.",sbOnDrop:"Uploading image #images_names#...",sbProgress:"Uploading #file_name#: #progress#%",sbOnUploaded:"Uploaded #image_name#",sizeUnits:" B, KB, MB"},p={noFileGiven:"You must select a file.",typeNotAllowed:"This image type is not allowed.",fileTooLarge:`Image #image_name# is too big (#image_size#).
Maximum file size is #image_max_size#.`,importError:"Something went wrong when uploading the image #image_name#."};function g(l){l=l||{},l.parent=this;var d=!0;if(l.autoDownloadFontAwesome===!1&&(d=!1),l.autoDownloadFontAwesome!==!0)for(var m=document.styleSheets,y=0;y<m.length;y++)m[y].href&&m[y].href.indexOf("//maxcdn.bootstrapcdn.com/font-awesome/")>-1&&(d=!1);if(d){var F=document.createElement("link");F.rel="stylesheet",F.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(F)}if(l.element)this.element=l.element;else if(l.element===null){console.log("EasyMDE: Error. No element was found.");return}if(l.toolbar===void 0){l.toolbar=[];for(var S in zt)Object.prototype.hasOwnProperty.call(zt,S)&&(S.indexOf("separator-")!=-1&&l.toolbar.push("|"),(zt[S].default===!0||l.showIcons&&l.showIcons.constructor===Array&&l.showIcons.indexOf(S)!=-1)&&l.toolbar.push(S))}if(Object.prototype.hasOwnProperty.call(l,"previewClass")||(l.previewClass="editor-preview"),Object.prototype.hasOwnProperty.call(l,"status")||(l.status=["autosave","lines","words","cursor"],l.uploadImage&&l.status.unshift("upload-image")),l.previewRender||(l.previewRender=function(w){return this.parent.markdown(w)}),l.parsingConfig=xt({highlightFormatting:!0},l.parsingConfig||{}),l.insertTexts=xt({},xr,l.insertTexts||{}),l.promptTexts=xt({},I,l.promptTexts||{}),l.blockStyles=xt({},T,l.blockStyles||{}),l.autosave!=null&&(l.autosave.timeFormat=xt({},O,l.autosave.timeFormat||{})),l.iconClassMap=xt({},Pe,l.iconClassMap||{}),l.shortcuts=xt({},N,l.shortcuts||{}),l.maxHeight=l.maxHeight||void 0,l.direction=l.direction||"ltr",typeof l.maxHeight<"u"?l.minHeight=l.maxHeight:l.minHeight=l.minHeight||"300px",l.errorCallback=l.errorCallback||function(w){alert(w)},l.uploadImage=l.uploadImage||!1,l.imageMaxSize=l.imageMaxSize||2097152,l.imageAccept=l.imageAccept||"image/png, image/jpeg, image/gif, image/avif",l.imageTexts=xt({},c,l.imageTexts||{}),l.errorMessages=xt({},p,l.errorMessages||{}),l.imagePathAbsolute=l.imagePathAbsolute||!1,l.imageCSRFName=l.imageCSRFName||"csrfmiddlewaretoken",l.imageCSRFHeader=l.imageCSRFHeader||!1,l.autosave!=null&&l.autosave.unique_id!=null&&l.autosave.unique_id!=""&&(l.autosave.uniqueId=l.autosave.unique_id),l.overlayMode&&l.overlayMode.combine===void 0&&(l.overlayMode.combine=!0),this.options=l,this.render(),l.initialValue&&(!this.options.autosave||this.options.autosave.foundSavedValue!==!0)&&this.value(l.initialValue),l.uploadImage){var b=this;this.codemirror.on("dragenter",function(w,C){b.updateStatusBar("upload-image",b.options.imageTexts.sbOnDragEnter),C.stopPropagation(),C.preventDefault()}),this.codemirror.on("dragend",function(w,C){b.updateStatusBar("upload-image",b.options.imageTexts.sbInit),C.stopPropagation(),C.preventDefault()}),this.codemirror.on("dragleave",function(w,C){b.updateStatusBar("upload-image",b.options.imageTexts.sbInit),C.stopPropagation(),C.preventDefault()}),this.codemirror.on("dragover",function(w,C){b.updateStatusBar("upload-image",b.options.imageTexts.sbOnDragEnter),C.stopPropagation(),C.preventDefault()}),this.codemirror.on("drop",function(w,C){C.stopPropagation(),C.preventDefault(),l.imageUploadFunction?b.uploadImagesUsingCustomFunction(l.imageUploadFunction,C.dataTransfer.files):b.uploadImages(C.dataTransfer.files)}),this.codemirror.on("paste",function(w,C){l.imageUploadFunction?b.uploadImagesUsingCustomFunction(l.imageUploadFunction,C.clipboardData.files):b.uploadImages(C.clipboardData.files)})}}g.prototype.uploadImages=function(l,d,m){if(l.length!==0){for(var y=[],F=0;F<l.length;F++)y.push(l[F].name),this.uploadImage(l[F],d,m);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",y.join(", ")))}},g.prototype.uploadImagesUsingCustomFunction=function(l,d){if(d.length!==0){for(var m=[],y=0;y<d.length;y++)m.push(d[y].name),this.uploadImageUsingCustomFunction(l,d[y]);this.updateStatusBar("upload-image",this.options.imageTexts.sbOnDrop.replace("#images_names#",m.join(", ")))}},g.prototype.updateStatusBar=function(l,d){if(this.gui.statusbar){var m=this.gui.statusbar.getElementsByClassName(l);m.length===1?this.gui.statusbar.getElementsByClassName(l)[0].textContent=d:m.length===0?console.log("EasyMDE: status bar item "+l+" was not found."):console.log("EasyMDE: Several status bar items named "+l+" was found.")}},g.prototype.markdown=function(l){if(B){var d;if(this.options&&this.options.renderingConfig&&this.options.renderingConfig.markedOptions?d=this.options.renderingConfig.markedOptions:d={},this.options&&this.options.renderingConfig&&this.options.renderingConfig.singleLineBreaks===!1?d.breaks=!1:d.breaks=!0,this.options&&this.options.renderingConfig&&this.options.renderingConfig.codeSyntaxHighlighting===!0){var m=this.options.renderingConfig.hljs||window.hljs;m&&(d.highlight=function(F,S){return S&&m.getLanguage(S)?m.highlight(S,F).value:m.highlightAuto(F).value})}B.setOptions(d);var y=B.parse(l);return this.options.renderingConfig&&typeof this.options.renderingConfig.sanitizerFunction=="function"&&(y=this.options.renderingConfig.sanitizerFunction.call(this,y)),y=G(y),y=P(y),y}},g.prototype.render=function(l){if(l||(l=this.element||document.getElementsByTagName("textarea")[0]),this._rendered&&this._rendered===l)return;this.element=l;var d=this.options,m=this,y={};for(var F in d.shortcuts)d.shortcuts[F]!==null&&A[F]!==null&&function(Be){y[oe(d.shortcuts[Be])]=function(){var ze=A[Be];typeof ze=="function"?ze(m):typeof ze=="string"&&window.open(ze,"_blank")}}(F);y.Enter="newlineAndIndentContinueMarkdownList",y.Tab="tabAndIndentMarkdownList",y["Shift-Tab"]="shiftTabAndUnindentMarkdownList",y.Esc=function(Be){Be.getOption("fullScreen")&&j(m)},this.documentOnKeyDown=function(Be){Be=Be||window.event,Be.keyCode==27&&m.codemirror.getOption("fullScreen")&&j(m)},document.addEventListener("keydown",this.documentOnKeyDown,!1);var S,b;d.overlayMode?(W.defineMode("overlay-mode",function(Be){return W.overlayMode(W.getMode(Be,d.spellChecker!==!1?"spell-checker":"gfm"),d.overlayMode.mode,d.overlayMode.combine)}),S="overlay-mode",b=d.parsingConfig,b.gitHubSpice=!1):(S=d.parsingConfig,S.name="gfm",S.gitHubSpice=!1),d.spellChecker!==!1&&(S="spell-checker",b=d.parsingConfig,b.name="gfm",b.gitHubSpice=!1,typeof d.spellChecker=="function"?d.spellChecker({codeMirrorInstance:W}):Q({codeMirrorInstance:W}));function w(Be,ze,$e){return{addNew:!1}}if(this.codemirror=W.fromTextArea(l,{mode:S,backdrop:b,theme:d.theme!=null?d.theme:"easymde",tabSize:d.tabSize!=null?d.tabSize:2,indentUnit:d.tabSize!=null?d.tabSize:2,indentWithTabs:d.indentWithTabs!==!1,lineNumbers:d.lineNumbers===!0,autofocus:d.autofocus===!0,extraKeys:y,direction:d.direction,lineWrapping:d.lineWrapping!==!1,allowDropFileTypes:["text/plain"],placeholder:d.placeholder||l.getAttribute("placeholder")||"",styleSelectedText:d.styleSelectedText!=null?d.styleSelectedText:!V(),scrollbarStyle:d.scrollbarStyle!=null?d.scrollbarStyle:"native",configureMouse:w,inputStyle:d.inputStyle!=null?d.inputStyle:V()?"contenteditable":"textarea",spellcheck:d.nativeSpellcheck!=null?d.nativeSpellcheck:!0,autoRefresh:d.autoRefresh!=null?d.autoRefresh:!1}),this.codemirror.getScrollerElement().style.minHeight=d.minHeight,typeof d.maxHeight<"u"&&(this.codemirror.getScrollerElement().style.height=d.maxHeight),d.forceSync===!0){var C=this.codemirror;C.on("change",function(){C.save()})}this.gui={};var ee=document.createElement("div");ee.classList.add("EasyMDEContainer"),ee.setAttribute("role","application");var he=this.codemirror.getWrapperElement();he.parentNode.insertBefore(ee,he),ee.appendChild(he),d.toolbar!==!1&&(this.gui.toolbar=this.createToolbar()),d.status!==!1&&(this.gui.statusbar=this.createStatusbar()),d.autosave!=null&&d.autosave.enabled===!0&&(this.autosave(),this.codemirror.on("change",function(){clearTimeout(m._autosave_timeout),m._autosave_timeout=setTimeout(function(){m.autosave()},m.options.autosave.submit_delay||m.options.autosave.delay||1e3)}));function ke(Be,ze){var $e,Ve=window.getComputedStyle(document.querySelector(".CodeMirror-sizer")).width.replace("px","");return Be<Ve?$e=ze+"px":$e=ze/Be*100+"%",$e}var xe=this;function ce(Be,ze){Be.setAttribute("data-img-src",ze.url),Be.setAttribute("style","--bg-image:url("+ze.url+");--width:"+ze.naturalWidth+"px;--height:"+ke(ze.naturalWidth,ze.naturalHeight)),xe.codemirror.setSize()}function We(){d.previewImagesInEditor&&ee.querySelectorAll(".cm-image-marker").forEach(function(Be){var ze=Be.parentElement;if(ze.innerText.match(/^!\[.*?\]\(.*\)/g)&&!ze.hasAttribute("data-img-src")){var $e=ze.innerText.match("\\((.*)\\)");if(window.EMDEimagesCache||(window.EMDEimagesCache={}),$e&&$e.length>=2){var Ve=$e[1];if(d.imagesPreviewHandler){var At=d.imagesPreviewHandler($e[1]);typeof At=="string"&&(Ve=At)}if(window.EMDEimagesCache[Ve])ce(ze,window.EMDEimagesCache[Ve]);else{var yt=document.createElement("img");yt.onload=function(){window.EMDEimagesCache[Ve]={naturalWidth:yt.naturalWidth,naturalHeight:yt.naturalHeight,url:Ve},ce(ze,window.EMDEimagesCache[Ve])},yt.src=Ve}}}})}this.codemirror.on("update",function(){We()}),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element,(d.autofocus===!0||l.autofocus)&&this.codemirror.focus();var Ue=this.codemirror;setTimeout(function(){Ue.refresh()}.bind(Ue),0)},g.prototype.cleanup=function(){document.removeEventListener("keydown",this.documentOnKeyDown)};function D(){if(typeof localStorage=="object")try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch{return!1}else return!1;return!0}g.prototype.autosave=function(){if(D()){var l=this;if(this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to use the autosave feature");return}this.options.autosave.binded!==!0&&(l.element.form!=null&&l.element.form!=null&&l.element.form.addEventListener("submit",function(){clearTimeout(l.autosaveTimeoutId),l.autosaveTimeoutId=void 0,localStorage.removeItem("smde_"+l.options.autosave.uniqueId)}),this.options.autosave.binded=!0),this.options.autosave.loaded!==!0&&(typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)=="string"&&localStorage.getItem("smde_"+this.options.autosave.uniqueId)!=""&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0);var d=l.value();d!==""?localStorage.setItem("smde_"+this.options.autosave.uniqueId,d):localStorage.removeItem("smde_"+this.options.autosave.uniqueId);var m=document.getElementById("autosaved");if(m!=null&&m!=null&&m!=""){var y=new Date,F=new Intl.DateTimeFormat([this.options.autosave.timeFormat.locale,"en-US"],this.options.autosave.timeFormat.format).format(y),S=this.options.autosave.text==null?"Autosaved: ":this.options.autosave.text;m.innerHTML=S+F}}else console.log("EasyMDE: localStorage not available, cannot autosave")},g.prototype.clearAutosavedValue=function(){if(D()){if(this.options.autosave==null||this.options.autosave.uniqueId==null||this.options.autosave.uniqueId==""){console.log("EasyMDE: You must set a uniqueId to clear the autosave value");return}localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("EasyMDE: localStorage not available, cannot autosave")},g.prototype.openBrowseFileWindow=function(l,d){var m=this,y=this.gui.toolbar.getElementsByClassName("imageInput")[0];y.click();function F(S){m.options.imageUploadFunction?m.uploadImagesUsingCustomFunction(m.options.imageUploadFunction,S.target.files):m.uploadImages(S.target.files,l,d),y.removeEventListener("change",F)}y.addEventListener("change",F)},g.prototype.uploadImage=function(l,d,m){var y=this;d=d||function(ee){ne(y,ee)};function F(C){y.updateStatusBar("upload-image",C),setTimeout(function(){y.updateStatusBar("upload-image",y.options.imageTexts.sbInit)},1e4),m&&typeof m=="function"&&m(C),y.options.errorCallback(C)}function S(C){var ee=y.options.imageTexts.sizeUnits.split(",");return C.replace("#image_name#",l.name).replace("#image_size#",Oe(l.size,ee)).replace("#image_max_size#",Oe(y.options.imageMaxSize,ee))}if(l.size>this.options.imageMaxSize){F(S(this.options.errorMessages.fileTooLarge));return}var b=new FormData;b.append("image",l),y.options.imageCSRFToken&&!y.options.imageCSRFHeader&&b.append(y.options.imageCSRFName,y.options.imageCSRFToken);var w=new XMLHttpRequest;w.upload.onprogress=function(C){if(C.lengthComputable){var ee=""+Math.round(C.loaded*100/C.total);y.updateStatusBar("upload-image",y.options.imageTexts.sbProgress.replace("#file_name#",l.name).replace("#progress#",ee))}},w.open("POST",this.options.imageUploadEndpoint),y.options.imageCSRFToken&&y.options.imageCSRFHeader&&w.setRequestHeader(y.options.imageCSRFName,y.options.imageCSRFToken),w.onload=function(){try{var C=JSON.parse(this.responseText)}catch{console.error("EasyMDE: The server did not return a valid json."),F(S(y.options.errorMessages.importError));return}this.status===200&&C&&!C.error&&C.data&&C.data.filePath?d((y.options.imagePathAbsolute?"":window.location.origin+"/")+C.data.filePath):C.error&&C.error in y.options.errorMessages?F(S(y.options.errorMessages[C.error])):C.error?F(S(C.error)):(console.error("EasyMDE: Received an unexpected response after uploading the image."+this.status+" ("+this.statusText+")"),F(S(y.options.errorMessages.importError)))},w.onerror=function(C){console.error("EasyMDE: An unexpected error occurred when trying to upload the image."+C.target.status+" ("+C.target.statusText+")"),F(y.options.errorMessages.importError)},w.send(b)},g.prototype.uploadImageUsingCustomFunction=function(l,d){var m=this;function y(b){ne(m,b)}function F(b){var w=S(b);m.updateStatusBar("upload-image",w),setTimeout(function(){m.updateStatusBar("upload-image",m.options.imageTexts.sbInit)},1e4),m.options.errorCallback(w)}function S(b){var w=m.options.imageTexts.sizeUnits.split(",");return b.replace("#image_name#",d.name).replace("#image_size#",Oe(d.size,w)).replace("#image_max_size#",Oe(m.options.imageMaxSize,w))}l.apply(this,[d,y,F])},g.prototype.setPreviewMaxHeight=function(){var l=this.codemirror,d=l.getWrapperElement(),m=d.nextSibling,y=parseInt(window.getComputedStyle(d).paddingTop),F=parseInt(window.getComputedStyle(d).borderTopWidth),S=parseInt(this.options.maxHeight),b=S+y*2+F*2,w=b.toString()+"px";m.style.height=w},g.prototype.createSideBySide=function(){var l=this.codemirror,d=l.getWrapperElement(),m=d.nextSibling;if(!m||!m.classList.contains("editor-preview-side")){if(m=document.createElement("div"),m.className="editor-preview-side",this.options.previewClass)if(Array.isArray(this.options.previewClass))for(var y=0;y<this.options.previewClass.length;y++)m.classList.add(this.options.previewClass[y]);else typeof this.options.previewClass=="string"&&m.classList.add(this.options.previewClass);d.parentNode.insertBefore(m,d.nextSibling)}if(typeof this.options.maxHeight<"u"&&this.setPreviewMaxHeight(),this.options.syncSideBySidePreviewScroll===!1)return m;var F=!1,S=!1;return l.on("scroll",function(b){if(F){F=!1;return}S=!0;var w=b.getScrollInfo().height-b.getScrollInfo().clientHeight,C=parseFloat(b.getScrollInfo().top)/w,ee=(m.scrollHeight-m.clientHeight)*C;m.scrollTop=ee}),m.onscroll=function(){if(S){S=!1;return}F=!0;var b=m.scrollHeight-m.clientHeight,w=parseFloat(m.scrollTop)/b,C=(l.getScrollInfo().height-l.getScrollInfo().clientHeight)*w;l.scrollTo(0,C)},m},g.prototype.createToolbar=function(l){if(l=l||this.options.toolbar,!(!l||l.length===0)){var d;for(d=0;d<l.length;d++)zt[l[d]]!=null&&(l[d]=zt[l[d]]);var m=document.createElement("div");m.className="editor-toolbar",m.setAttribute("role","toolbar");var y=this,F={};for(y.toolbar=l,d=0;d<l.length;d++)if(!(l[d].name=="guide"&&y.options.toolbarGuideIcon===!1)&&!(y.options.hideIcons&&y.options.hideIcons.indexOf(l[d].name)!=-1)&&!((l[d].name=="fullscreen"||l[d].name=="side-by-side")&&V())){if(l[d]==="|"){for(var S=!1,b=d+1;b<l.length;b++)l[b]!=="|"&&(!y.options.hideIcons||y.options.hideIcons.indexOf(l[b].name)==-1)&&(S=!0);if(!S)continue}(function(ee){var he;if(ee==="|"?he=me():ee.children?he=pe(ee,y.options.toolbarTips,y.options.shortcuts,y):he=Ee(ee,!0,y.options.toolbarTips,y.options.shortcuts,"button",y),F[ee.name||ee]=he,m.appendChild(he),ee.name==="upload-image"){var ke=document.createElement("input");ke.className="imageInput",ke.type="file",ke.multiple=!0,ke.name="image",ke.accept=y.options.imageAccept,ke.style.display="none",ke.style.opacity=0,m.appendChild(ke)}})(l[d])}y.toolbar_div=m,y.toolbarElements=F;var w=this.codemirror;w.on("cursorActivity",function(){var ee=H(w);for(var he in F)(function(ke){var xe=F[ke];ee[ke]?xe.classList.add("active"):ke!="fullscreen"&&ke!="side-by-side"&&xe.classList.remove("active")})(he)});var C=w.getWrapperElement();return C.parentNode.insertBefore(m,C),m}},g.prototype.createStatusbar=function(l){l=l||this.options.status;var d=this.options,m=this.codemirror;if(!(!l||l.length===0)){var y=[],F,S,b,w;for(F=0;F<l.length;F++)if(S=void 0,b=void 0,w=void 0,typeof l[F]=="object")y.push({className:l[F].className,defaultValue:l[F].defaultValue,onUpdate:l[F].onUpdate,onActivity:l[F].onActivity});else{var C=l[F];C==="words"?(w=function(ce){ce.innerHTML=Ot(m.getValue())},S=function(ce){ce.innerHTML=Ot(m.getValue())}):C==="lines"?(w=function(ce){ce.innerHTML=m.lineCount()},S=function(ce){ce.innerHTML=m.lineCount()}):C==="cursor"?(w=function(ce){ce.innerHTML="1:1"},b=function(ce){var We=m.getCursor(),Ue=We.line+1,Be=We.ch+1;ce.innerHTML=Ue+":"+Be}):C==="autosave"?w=function(ce){d.autosave!=null&&d.autosave.enabled===!0&&ce.setAttribute("id","autosaved")}:C==="upload-image"&&(w=function(ce){ce.innerHTML=d.imageTexts.sbInit}),y.push({className:C,defaultValue:w,onUpdate:S,onActivity:b})}var ee=document.createElement("div");for(ee.className="editor-statusbar",F=0;F<y.length;F++){var he=y[F],ke=document.createElement("span");ke.className=he.className,typeof he.defaultValue=="function"&&he.defaultValue(ke),typeof he.onUpdate=="function"&&this.codemirror.on("update",function(ce,We){return function(){We.onUpdate(ce)}}(ke,he)),typeof he.onActivity=="function"&&this.codemirror.on("cursorActivity",function(ce,We){return function(){We.onActivity(ce)}}(ke,he)),ee.appendChild(ke)}var xe=this.codemirror.getWrapperElement();return xe.parentNode.insertBefore(ee,xe.nextSibling),ee}},g.prototype.value=function(l){var d=this.codemirror;if(l===void 0)return d.getValue();if(d.getDoc().setValue(l),this.isPreviewActive()){var m=d.getWrapperElement(),y=m.lastChild,F=this.options.previewRender(l,y);F!==null&&(y.innerHTML=F)}return this},g.toggleBold=te,g.toggleItalic=X,g.toggleStrikethrough=ue,g.toggleBlockquote=ge,g.toggleHeadingSmaller=Te,g.toggleHeadingBigger=Z,g.toggleHeading1=Ae,g.toggleHeading2=J,g.toggleHeading3=Re,g.toggleHeading4=_,g.toggleHeading5=le,g.toggleHeading6=$,g.toggleCodeBlock=ie,g.toggleUnorderedList=Ce,g.toggleOrderedList=Je,g.cleanBlock=at,g.drawLink=kt,g.drawImage=k,g.drawUploadedImage=K,g.drawTable=Le,g.drawHorizontalRule=Ge,g.undo=Qe,g.redo=je,g.togglePreview=lt,g.toggleSideBySide=ot,g.toggleFullScreen=j,g.prototype.toggleBold=function(){te(this)},g.prototype.toggleItalic=function(){X(this)},g.prototype.toggleStrikethrough=function(){ue(this)},g.prototype.toggleBlockquote=function(){ge(this)},g.prototype.toggleHeadingSmaller=function(){Te(this)},g.prototype.toggleHeadingBigger=function(){Z(this)},g.prototype.toggleHeading1=function(){Ae(this)},g.prototype.toggleHeading2=function(){J(this)},g.prototype.toggleHeading3=function(){Re(this)},g.prototype.toggleHeading4=function(){_(this)},g.prototype.toggleHeading5=function(){le(this)},g.prototype.toggleHeading6=function(){$(this)},g.prototype.toggleCodeBlock=function(){ie(this)},g.prototype.toggleUnorderedList=function(){Ce(this)},g.prototype.toggleOrderedList=function(){Je(this)},g.prototype.cleanBlock=function(){at(this)},g.prototype.drawLink=function(){kt(this)},g.prototype.drawImage=function(){k(this)},g.prototype.drawUploadedImage=function(){K(this)},g.prototype.drawTable=function(){Le(this)},g.prototype.drawHorizontalRule=function(){Ge(this)},g.prototype.undo=function(){Qe(this)},g.prototype.redo=function(){je(this)},g.prototype.togglePreview=function(){lt(this)},g.prototype.toggleSideBySide=function(){ot(this)},g.prototype.toggleFullScreen=function(){j(this)},g.prototype.isPreviewActive=function(){var l=this.codemirror,d=l.getWrapperElement(),m=d.lastChild;return m.classList.contains("editor-preview-active")},g.prototype.isSideBySideActive=function(){var l=this.codemirror,d=l.getWrapperElement(),m=d.nextSibling;return m.classList.contains("editor-preview-active-side")},g.prototype.isFullscreenActive=function(){var l=this.codemirror;return l.getOption("fullScreen")},g.prototype.getState=function(){var l=this.codemirror;return H(l)},g.prototype.toTextArea=function(){var l=this.codemirror,d=l.getWrapperElement(),m=d.parentNode;m&&(this.gui.toolbar&&m.removeChild(this.gui.toolbar),this.gui.statusbar&&m.removeChild(this.gui.statusbar),this.gui.sideBySide&&m.removeChild(this.gui.sideBySide)),m.parentNode.insertBefore(d,m),m.remove(),l.toTextArea(),this.autosaveTimeoutId&&(clearTimeout(this.autosaveTimeoutId),this.autosaveTimeoutId=void 0,this.clearAutosavedValue())},ct.exports=g},"./node_modules/typo-js/typo.js":function(ct,_e,ye){var W="/",Q;(function(){"use strict";Q=function(B,R,L,A){A=A||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=A.flags||{},this.memoized={},this.loaded=!1;var N=this,Y,V,G,P,oe;B&&(N.dictionary=B,R&&L?be():typeof window<"u"&&"chrome"in window&&"extension"in window.chrome&&"getURL"in window.chrome.extension?(A.dictionaryPath?Y=A.dictionaryPath:Y="typo/dictionaries",R||pe(chrome.extension.getURL(Y+"/"+B+"/"+B+".aff"),Ee),L||pe(chrome.extension.getURL(Y+"/"+B+"/"+B+".dic"),me)):(A.dictionaryPath?Y=A.dictionaryPath:Y=W+"/dictionaries",R||pe(Y+"/"+B+"/"+B+".aff",Ee),L||pe(Y+"/"+B+"/"+B+".dic",me)));function pe(H,U){var j=N._readFile(H,null,A.asyncLoad);A.asyncLoad?j.then(function(te){U(te)}):U(j)}function Ee(H){R=H,L&&be()}function me(H){L=H,R&&be()}function be(){for(N.rules=N._parseAFF(R),N.compoundRuleCodes={},V=0,P=N.compoundRules.length;V<P;V++){var H=N.compoundRules[V];for(G=0,oe=H.length;G<oe;G++)N.compoundRuleCodes[H[G]]=[]}"ONLYINCOMPOUND"in N.flags&&(N.compoundRuleCodes[N.flags.ONLYINCOMPOUND]=[]),N.dictionaryTable=N._parseDIC(L);for(V in N.compoundRuleCodes)N.compoundRuleCodes[V].length===0&&delete N.compoundRuleCodes[V];for(V=0,P=N.compoundRules.length;V<P;V++){var U=N.compoundRules[V],j="";for(G=0,oe=U.length;G<oe;G++){var te=U[G];te in N.compoundRuleCodes?j+="("+N.compoundRuleCodes[te].join("|")+")":j+=te}N.compoundRules[V]=new RegExp(j,"i")}N.loaded=!0,A.asyncLoad&&A.loadedCallback&&A.loadedCallback(N)}return this},Q.prototype={load:function(B){for(var R in B)B.hasOwnProperty(R)&&(this[R]=B[R]);return this},_readFile:function(B,R,L){if(R=R||"utf8",typeof XMLHttpRequest<"u"){var A,N=new XMLHttpRequest;return N.open("GET",B,L),L&&(A=new Promise(function(V,G){N.onload=function(){N.status===200?V(N.responseText):G(N.statusText)},N.onerror=function(){G(N.statusText)}})),N.overrideMimeType&&N.overrideMimeType("text/plain; charset="+R),N.send(null),L?A:N.responseText}else{var Y=ye("?b2fd");try{if(Y.existsSync(B))return Y.readFileSync(B,R);console.log("Path "+B+" does not exist.")}catch(V){return console.log(V),""}}},_parseAFF:function(B){var R={},L,A,N,Y,V,G,P,oe,pe=B.split(/\r?\n/);for(V=0,P=pe.length;V<P;V++)if(L=this._removeAffixComments(pe[V]),L=L.trim(),!!L){var Ee=L.split(/\s+/),me=Ee[0];if(me=="PFX"||me=="SFX"){var be=Ee[1],H=Ee[2];N=parseInt(Ee[3],10);var U=[];for(G=V+1,oe=V+1+N;G<oe;G++){A=pe[G],Y=A.split(/\s+/);var j=Y[2],te=Y[3].split("/"),X=te[0];X==="0"&&(X="");var ue=this.parseRuleCodes(te[1]),ie=Y[4],ge={};ge.add=X,ue.length>0&&(ge.continuationClasses=ue),ie!=="."&&(me==="SFX"?ge.match=new RegExp(ie+"$"):ge.match=new RegExp("^"+ie)),j!="0"&&(me==="SFX"?ge.remove=new RegExp(j+"$"):ge.remove=j),U.push(ge)}R[be]={type:me,combineable:H=="Y",entries:U},V+=N}else if(me==="COMPOUNDRULE"){for(N=parseInt(Ee[1],10),G=V+1,oe=V+1+N;G<oe;G++)L=pe[G],Y=L.split(/\s+/),this.compoundRules.push(Y[1]);V+=N}else me==="REP"?(Y=L.split(/\s+/),Y.length===3&&this.replacementTable.push([Y[1],Y[2]])):this.flags[me]=Ee[1]}return R},_removeAffixComments:function(B){return B.match(/^\s*#/,"")?"":B},_parseDIC:function(B){B=this._removeDicComments(B);var R=B.split(/\r?\n/),L={};function A(J,Re){L.hasOwnProperty(J)||(L[J]=null),Re.length>0&&(L[J]===null&&(L[J]=[]),L[J].push(Re))}for(var N=1,Y=R.length;N<Y;N++){var V=R[N];if(V){var G=V.split("/",2),P=G[0];if(G.length>1){var oe=this.parseRuleCodes(G[1]);(!("NEEDAFFIX"in this.flags)||oe.indexOf(this.flags.NEEDAFFIX)==-1)&&A(P,oe);for(var pe=0,Ee=oe.length;pe<Ee;pe++){var me=oe[pe],be=this.rules[me];if(be)for(var H=this._applyRule(P,be),U=0,j=H.length;U<j;U++){var te=H[U];if(A(te,[]),be.combineable)for(var X=pe+1;X<Ee;X++){var ue=oe[X],ie=this.rules[ue];if(ie&&ie.combineable&&be.type!=ie.type)for(var ge=this._applyRule(te,ie),Te=0,Z=ge.length;Te<Z;Te++){var Ae=ge[Te];A(Ae,[])}}}me in this.compoundRuleCodes&&this.compoundRuleCodes[me].push(P)}}else A(P.trim(),[])}}return L},_removeDicComments:function(B){return B=B.replace(/^\t.*$/mg,""),B},parseRuleCodes:function(B){if(B)if("FLAG"in this.flags)if(this.flags.FLAG==="long"){for(var R=[],L=0,A=B.length;L<A;L+=2)R.push(B.substr(L,2));return R}else return this.flags.FLAG==="num"?B.split(","):this.flags.FLAG==="UTF-8"?Array.from(B):B.split("");else return B.split("");else return[]},_applyRule:function(B,R){for(var L=R.entries,A=[],N=0,Y=L.length;N<Y;N++){var V=L[N];if(!V.match||B.match(V.match)){var G=B;if(V.remove&&(G=G.replace(V.remove,"")),R.type==="SFX"?G=G+V.add:G=V.add+G,A.push(G),"continuationClasses"in V)for(var P=0,oe=V.continuationClasses.length;P<oe;P++){var pe=this.rules[V.continuationClasses[P]];pe&&(A=A.concat(this._applyRule(G,pe)))}}}return A},check:function(B){if(!this.loaded)throw"Dictionary not loaded.";if(!B)return!1;var R=B.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.checkExact(R))return!0;if(R.toUpperCase()===R){var L=R[0]+R.substring(1).toLowerCase();if(this.hasFlag(L,"KEEPCASE"))return!1;if(this.checkExact(L)||this.checkExact(R.toLowerCase()))return!0}var A=R[0].toLowerCase()+R.substring(1);if(A!==R){if(this.hasFlag(A,"KEEPCASE"))return!1;if(this.checkExact(A))return!0}return!1},checkExact:function(B){if(!this.loaded)throw"Dictionary not loaded.";var R=this.dictionaryTable[B],L,A;if(typeof R>"u"){if("COMPOUNDMIN"in this.flags&&B.length>=this.flags.COMPOUNDMIN){for(L=0,A=this.compoundRules.length;L<A;L++)if(B.match(this.compoundRules[L]))return!0}}else{if(R===null)return!0;if(typeof R=="object"){for(L=0,A=R.length;L<A;L++)if(!this.hasFlag(B,"ONLYINCOMPOUND",R[L]))return!0}}return!1},hasFlag:function(B,R,L){if(!this.loaded)throw"Dictionary not loaded.";return!!(R in this.flags&&(typeof L>"u"&&(L=Array.prototype.concat.apply([],this.dictionaryTable[B])),L&&L.indexOf(this.flags[R])!==-1))},alphabet:"",suggest:function(B,R){if(!this.loaded)throw"Dictionary not loaded.";if(R=R||5,this.memoized.hasOwnProperty(B)){var L=this.memoized[B].limit;if(R<=L||this.memoized[B].suggestions.length<L)return this.memoized[B].suggestions.slice(0,R)}if(this.check(B))return[];for(var A=0,N=this.replacementTable.length;A<N;A++){var Y=this.replacementTable[A];if(B.indexOf(Y[0])!==-1){var V=B.replace(Y[0],Y[1]);if(this.check(V))return[V]}}if(!this.alphabet){this.alphabet="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ","TRY"in this.flags&&(this.alphabet+=this.flags.TRY),"WORDCHARS"in this.flags&&(this.alphabet+=this.flags.WORDCHARS);var G=this.alphabet.split("");G.sort();for(var P={},A=0;A<G.length;A++)P[G[A]]=!0;this.alphabet="";for(var A in P)this.alphabet+=A}var oe=this;function pe(me,be){var H={},U,j,te,X,ue,ie,ge=oe.alphabet.length;if(typeof me=="string"){var Te=me;me={},me[Te]=!0}for(var Te in me)for(U=0,X=Te.length+1;U<X;U++){var Z=[Te.substring(0,U),Te.substring(U)];if(Z[1]&&(ie=Z[0]+Z[1].substring(1),(!be||oe.check(ie))&&(ie in H?H[ie]+=1:H[ie]=1)),Z[1].length>1&&Z[1][1]!==Z[1][0]&&(ie=Z[0]+Z[1][1]+Z[1][0]+Z[1].substring(2),(!be||oe.check(ie))&&(ie in H?H[ie]+=1:H[ie]=1)),Z[1]){var Ae=Z[1].substring(0,1).toUpperCase()===Z[1].substring(0,1)?"uppercase":"lowercase";for(j=0;j<ge;j++){var J=oe.alphabet[j];Ae==="uppercase"&&(J=J.toUpperCase()),J!=Z[1].substring(0,1)&&(ie=Z[0]+J+Z[1].substring(1),(!be||oe.check(ie))&&(ie in H?H[ie]+=1:H[ie]=1))}}if(Z[1])for(j=0;j<ge;j++){var Ae=Z[0].substring(-1).toUpperCase()===Z[0].substring(-1)&&Z[1].substring(0,1).toUpperCase()===Z[1].substring(0,1)?"uppercase":"lowercase",J=oe.alphabet[j];Ae==="uppercase"&&(J=J.toUpperCase()),ie=Z[0]+J+Z[1],(!be||oe.check(ie))&&(ie in H?H[ie]+=1:H[ie]=1)}}return H}function Ee(me){var be=pe(me),H=pe(be,!0),U=H;for(var j in be)oe.check(j)&&(j in U?U[j]+=be[j]:U[j]=be[j]);var te,X,ue=[];for(te in U)U.hasOwnProperty(te)&&ue.push([te,U[te]]);function ie(Ae,J){var Re=Ae[1],_=J[1];return Re<_?-1:Re>_?1:J[0].localeCompare(Ae[0])}ue.sort(ie).reverse();var ge=[],Te="lowercase";me.toUpperCase()===me?Te="uppercase":me.substr(0,1).toUpperCase()+me.substr(1).toLowerCase()===me&&(Te="capitalized");var Z=R;for(te=0;te<Math.min(Z,ue.length);te++)Te==="uppercase"?ue[te][0]=ue[te][0].toUpperCase():Te==="capitalized"&&(ue[te][0]=ue[te][0].substr(0,1).toUpperCase()+ue[te][0].substr(1)),!oe.hasFlag(ue[te][0],"NOSUGGEST")&&ge.indexOf(ue[te][0])==-1?ge.push(ue[te][0]):Z++;return ge}return this.memoized[B]={suggestions:Ee(B),limit:R},this.memoized[B].suggestions}}})(),ct.exports=Q},"?b2fd":function(){},"./node_modules/marked/lib/marked.cjs":function(ct,_e){"use strict";var ye;function W(I,O){for(var T=0;T<O.length;T++){var c=O[T];c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(I,Y(c.key),c)}}function Q(I,O,T){return O&&W(I.prototype,O),T&&W(I,T),Object.defineProperty(I,"prototype",{writable:!1}),I}function B(){return B=Object.assign?Object.assign.bind():function(I){for(var O=1;O<arguments.length;O++){var T=arguments[O];for(var c in T)Object.prototype.hasOwnProperty.call(T,c)&&(I[c]=T[c])}return I},B.apply(this,arguments)}function R(I,O){if(I){if(typeof I=="string")return L(I,O);var T=Object.prototype.toString.call(I).slice(8,-1);if(T==="Object"&&I.constructor&&(T=I.constructor.name),T==="Map"||T==="Set")return Array.from(I);if(T==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(T))return L(I,O)}}function L(I,O){(O==null||O>I.length)&&(O=I.length);for(var T=0,c=new Array(O);T<O;T++)c[T]=I[T];return c}function A(I,O){var T=typeof Symbol<"u"&&I[Symbol.iterator]||I["@@iterator"];if(T)return(T=T.call(I)).next.bind(T);if(Array.isArray(I)||(T=R(I))||O&&I&&typeof I.length=="number"){T&&(I=T);var c=0;return function(){return c>=I.length?{done:!0}:{done:!1,value:I[c++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N(I,O){if(typeof I!="object"||I===null)return I;var T=I[Symbol.toPrimitive];if(T!==void 0){var c=T.call(I,O||"default");if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(O==="string"?String:Number)(I)}function Y(I){var O=N(I,"string");return typeof O=="symbol"?O:String(O)}function V(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,hooks:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}_e.NT=V();function G(I){_e.NT=I}var P=/[&<>"']/,oe=new RegExp(P.source,"g"),pe=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Ee=new RegExp(pe.source,"g"),me={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},be=function(O){return me[O]};function H(I,O){if(O){if(P.test(I))return I.replace(oe,be)}else if(pe.test(I))return I.replace(Ee,be);return I}var U=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function j(I){return I.replace(U,function(O,T){return T=T.toLowerCase(),T==="colon"?":":T.charAt(0)==="#"?T.charAt(1)==="x"?String.fromCharCode(parseInt(T.substring(2),16)):String.fromCharCode(+T.substring(1)):""})}var te=/(^|[^\[])\^/g;function X(I,O){I=typeof I=="string"?I:I.source,O=O||"";var T={replace:function(p,g){return g=g.source||g,g=g.replace(te,"$1"),I=I.replace(p,g),T},getRegex:function(){return new RegExp(I,O)}};return T}var ue=/[^\w:]/g,ie=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ge(I,O,T){if(I){var c;try{c=decodeURIComponent(j(T)).replace(ue,"").toLowerCase()}catch{return null}if(c.indexOf("javascript:")===0||c.indexOf("vbscript:")===0||c.indexOf("data:")===0)return null}O&&!ie.test(T)&&(T=Re(O,T));try{T=encodeURI(T).replace(/%25/g,"%")}catch{return null}return T}var Te={},Z=/^[^:]+:\/*[^/]*$/,Ae=/^([^:]+:)[\s\S]*$/,J=/^([^:]+:\/*[^/]*)[\s\S]*$/;function Re(I,O){Te[" "+I]||(Z.test(I)?Te[" "+I]=I+"/":Te[" "+I]=$(I,"/",!0)),I=Te[" "+I];var T=I.indexOf(":")===-1;return O.substring(0,2)==="//"?T?O:I.replace(Ae,"$1")+O:O.charAt(0)==="/"?T?O:I.replace(J,"$1")+O:I+O}var _={exec:function(){}};function le(I,O){var T=I.replace(/\|/g,function(g,D,l){for(var d=!1,m=D;--m>=0&&l[m]==="\\";)d=!d;return d?"|":" |"}),c=T.split(/ \|/),p=0;if(c[0].trim()||c.shift(),c.length>0&&!c[c.length-1].trim()&&c.pop(),c.length>O)c.splice(O);else for(;c.length<O;)c.push("");for(;p<c.length;p++)c[p]=c[p].trim().replace(/\\\|/g,"|");return c}function $(I,O,T){var c=I.length;if(c===0)return"";for(var p=0;p<c;){var g=I.charAt(c-p-1);if(g===O&&!T)p++;else if(g!==O&&T)p++;else break}return I.slice(0,c-p)}function Ce(I,O){if(I.indexOf(O[1])===-1)return-1;for(var T=I.length,c=0,p=0;p<T;p++)if(I[p]==="\\")p++;else if(I[p]===O[0])c++;else if(I[p]===O[1]&&(c--,c<0))return p;return-1}function Je(I){I&&I.sanitize&&!I.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function at(I,O){if(O<1)return"";for(var T="";O>1;)O&1&&(T+=I),O>>=1,I+=I;return T+I}function kt(I,O,T,c){var p=O.href,g=O.title?H(O.title):null,D=I[1].replace(/\\([\[\]])/g,"$1");if(I[0].charAt(0)!=="!"){c.state.inLink=!0;var l={type:"link",raw:T,href:p,title:g,text:D,tokens:c.inlineTokens(D)};return c.state.inLink=!1,l}return{type:"image",raw:T,href:p,title:g,text:H(D)}}function k(I,O){var T=I.match(/^(\s+)(?:```)/);if(T===null)return O;var c=T[1];return O.split(`
`).map(function(p){var g=p.match(/^\s+/);if(g===null)return p;var D=g[0];return D.length>=c.length?p.slice(c.length):p}).join(`
`)}var h=function(){function I(T){this.options=T||_e.NT}var O=I.prototype;return O.space=function(c){var p=this.rules.block.newline.exec(c);if(p&&p[0].length>0)return{type:"space",raw:p[0]}},O.code=function(c){var p=this.rules.block.code.exec(c);if(p){var g=p[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:p[0],codeBlockStyle:"indented",text:this.options.pedantic?g:$(g,`
`)}}},O.fences=function(c){var p=this.rules.block.fences.exec(c);if(p){var g=p[0],D=k(g,p[3]||"");return{type:"code",raw:g,lang:p[2]?p[2].trim().replace(this.rules.inline._escapes,"$1"):p[2],text:D}}},O.heading=function(c){var p=this.rules.block.heading.exec(c);if(p){var g=p[2].trim();if(/#$/.test(g)){var D=$(g,"#");(this.options.pedantic||!D||/ $/.test(D))&&(g=D.trim())}return{type:"heading",raw:p[0],depth:p[1].length,text:g,tokens:this.lexer.inline(g)}}},O.hr=function(c){var p=this.rules.block.hr.exec(c);if(p)return{type:"hr",raw:p[0]}},O.blockquote=function(c){var p=this.rules.block.blockquote.exec(c);if(p){var g=p[0].replace(/^ *>[ \t]?/gm,""),D=this.lexer.state.top;this.lexer.state.top=!0;var l=this.lexer.blockTokens(g);return this.lexer.state.top=D,{type:"blockquote",raw:p[0],tokens:l,text:g}}},O.list=function(c){var p=this.rules.block.list.exec(c);if(p){var g,D,l,d,m,y,F,S,b,w,C,ee,he=p[1].trim(),ke=he.length>1,xe={type:"list",raw:"",ordered:ke,start:ke?+he.slice(0,-1):"",loose:!1,items:[]};he=ke?"\\d{1,9}\\"+he.slice(-1):"\\"+he,this.options.pedantic&&(he=ke?he:"[*+-]");for(var ce=new RegExp("^( {0,3}"+he+")((?:[ ][^\\n]*)?(?:\\n|$))");c&&(ee=!1,!(!(p=ce.exec(c))||this.rules.block.hr.test(c)));){if(g=p[0],c=c.substring(g.length),S=p[2].split(`
`,1)[0].replace(/^\t+/,function(yt){return" ".repeat(3*yt.length)}),b=c.split(`
`,1)[0],this.options.pedantic?(d=2,C=S.trimLeft()):(d=p[2].search(/[^ ]/),d=d>4?1:d,C=S.slice(d),d+=p[1].length),y=!1,!S&&/^ *$/.test(b)&&(g+=b+`
`,c=c.substring(b.length+1),ee=!0),!ee)for(var We=new RegExp("^ {0,"+Math.min(3,d-1)+"}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))"),Ue=new RegExp("^ {0,"+Math.min(3,d-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),Be=new RegExp("^ {0,"+Math.min(3,d-1)+"}(?:```|~~~)"),ze=new RegExp("^ {0,"+Math.min(3,d-1)+"}#");c&&(w=c.split(`
`,1)[0],b=w,this.options.pedantic&&(b=b.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(Be.test(b)||ze.test(b)||We.test(b)||Ue.test(c)));){if(b.search(/[^ ]/)>=d||!b.trim())C+=`
`+b.slice(d);else{if(y||S.search(/[^ ]/)>=4||Be.test(S)||ze.test(S)||Ue.test(S))break;C+=`
`+b}!y&&!b.trim()&&(y=!0),g+=w+`
`,c=c.substring(w.length+1),S=b.slice(d)}xe.loose||(F?xe.loose=!0:/\n *\n *$/.test(g)&&(F=!0)),this.options.gfm&&(D=/^\[[ xX]\] /.exec(C),D&&(l=D[0]!=="[ ] ",C=C.replace(/^\[[ xX]\] +/,""))),xe.items.push({type:"list_item",raw:g,task:!!D,checked:l,loose:!1,text:C}),xe.raw+=g}xe.items[xe.items.length-1].raw=g.trimRight(),xe.items[xe.items.length-1].text=C.trimRight(),xe.raw=xe.raw.trimRight();var $e=xe.items.length;for(m=0;m<$e;m++)if(this.lexer.state.top=!1,xe.items[m].tokens=this.lexer.blockTokens(xe.items[m].text,[]),!xe.loose){var Ve=xe.items[m].tokens.filter(function(yt){return yt.type==="space"}),At=Ve.length>0&&Ve.some(function(yt){return/\n.*\n/.test(yt.raw)});xe.loose=At}if(xe.loose)for(m=0;m<$e;m++)xe.items[m].loose=!0;return xe}},O.html=function(c){var p=this.rules.block.html.exec(c);if(p){var g={type:"html",raw:p[0],pre:!this.options.sanitizer&&(p[1]==="pre"||p[1]==="script"||p[1]==="style"),text:p[0]};if(this.options.sanitize){var D=this.options.sanitizer?this.options.sanitizer(p[0]):H(p[0]);g.type="paragraph",g.text=D,g.tokens=this.lexer.inline(D)}return g}},O.def=function(c){var p=this.rules.block.def.exec(c);if(p){var g=p[1].toLowerCase().replace(/\s+/g," "),D=p[2]?p[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",l=p[3]?p[3].substring(1,p[3].length-1).replace(this.rules.inline._escapes,"$1"):p[3];return{type:"def",tag:g,raw:p[0],href:D,title:l}}},O.table=function(c){var p=this.rules.block.table.exec(c);if(p){var g={type:"table",header:le(p[1]).map(function(F){return{text:F}}),align:p[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:p[3]&&p[3].trim()?p[3].replace(/\n[ \t]*$/,"").split(`
`):[]};if(g.header.length===g.align.length){g.raw=p[0];var D=g.align.length,l,d,m,y;for(l=0;l<D;l++)/^ *-+: *$/.test(g.align[l])?g.align[l]="right":/^ *:-+: *$/.test(g.align[l])?g.align[l]="center":/^ *:-+ *$/.test(g.align[l])?g.align[l]="left":g.align[l]=null;for(D=g.rows.length,l=0;l<D;l++)g.rows[l]=le(g.rows[l],g.header.length).map(function(F){return{text:F}});for(D=g.header.length,d=0;d<D;d++)g.header[d].tokens=this.lexer.inline(g.header[d].text);for(D=g.rows.length,d=0;d<D;d++)for(y=g.rows[d],m=0;m<y.length;m++)y[m].tokens=this.lexer.inline(y[m].text);return g}}},O.lheading=function(c){var p=this.rules.block.lheading.exec(c);if(p)return{type:"heading",raw:p[0],depth:p[2].charAt(0)==="="?1:2,text:p[1],tokens:this.lexer.inline(p[1])}},O.paragraph=function(c){var p=this.rules.block.paragraph.exec(c);if(p){var g=p[1].charAt(p[1].length-1)===`
`?p[1].slice(0,-1):p[1];return{type:"paragraph",raw:p[0],text:g,tokens:this.lexer.inline(g)}}},O.text=function(c){var p=this.rules.block.text.exec(c);if(p)return{type:"text",raw:p[0],text:p[0],tokens:this.lexer.inline(p[0])}},O.escape=function(c){var p=this.rules.inline.escape.exec(c);if(p)return{type:"escape",raw:p[0],text:H(p[1])}},O.tag=function(c){var p=this.rules.inline.tag.exec(c);if(p)return!this.lexer.state.inLink&&/^<a /i.test(p[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(p[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(p[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(p[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:p[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(p[0]):H(p[0]):p[0]}},O.link=function(c){var p=this.rules.inline.link.exec(c);if(p){var g=p[2].trim();if(!this.options.pedantic&&/^</.test(g)){if(!/>$/.test(g))return;var D=$(g.slice(0,-1),"\\");if((g.length-D.length)%2===0)return}else{var l=Ce(p[2],"()");if(l>-1){var d=p[0].indexOf("!")===0?5:4,m=d+p[1].length+l;p[2]=p[2].substring(0,l),p[0]=p[0].substring(0,m).trim(),p[3]=""}}var y=p[2],F="";if(this.options.pedantic){var S=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(y);S&&(y=S[1],F=S[3])}else F=p[3]?p[3].slice(1,-1):"";return y=y.trim(),/^</.test(y)&&(this.options.pedantic&&!/>$/.test(g)?y=y.slice(1):y=y.slice(1,-1)),kt(p,{href:y&&y.replace(this.rules.inline._escapes,"$1"),title:F&&F.replace(this.rules.inline._escapes,"$1")},p[0],this.lexer)}},O.reflink=function(c,p){var g;if((g=this.rules.inline.reflink.exec(c))||(g=this.rules.inline.nolink.exec(c))){var D=(g[2]||g[1]).replace(/\s+/g," ");if(D=p[D.toLowerCase()],!D){var l=g[0].charAt(0);return{type:"text",raw:l,text:l}}return kt(g,D,g[0],this.lexer)}},O.emStrong=function(c,p,g){g===void 0&&(g="");var D=this.rules.inline.emStrong.lDelim.exec(c);if(D&&!(D[3]&&g.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var l=D[1]||D[2]||"";if(!l||l&&(g===""||this.rules.inline.punctuation.exec(g))){var d=D[0].length-1,m,y,F=d,S=0,b=D[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(b.lastIndex=0,p=p.slice(-1*c.length+d);(D=b.exec(p))!=null;)if(m=D[1]||D[2]||D[3]||D[4]||D[5]||D[6],!!m){if(y=m.length,D[3]||D[4]){F+=y;continue}else if((D[5]||D[6])&&d%3&&!((d+y)%3)){S+=y;continue}if(F-=y,!(F>0)){y=Math.min(y,y+F+S);var w=c.slice(0,d+D.index+(D[0].length-m.length)+y);if(Math.min(d,y)%2){var C=w.slice(1,-1);return{type:"em",raw:w,text:C,tokens:this.lexer.inlineTokens(C)}}var ee=w.slice(2,-2);return{type:"strong",raw:w,text:ee,tokens:this.lexer.inlineTokens(ee)}}}}}},O.codespan=function(c){var p=this.rules.inline.code.exec(c);if(p){var g=p[2].replace(/\n/g," "),D=/[^ ]/.test(g),l=/^ /.test(g)&&/ $/.test(g);return D&&l&&(g=g.substring(1,g.length-1)),g=H(g,!0),{type:"codespan",raw:p[0],text:g}}},O.br=function(c){var p=this.rules.inline.br.exec(c);if(p)return{type:"br",raw:p[0]}},O.del=function(c){var p=this.rules.inline.del.exec(c);if(p)return{type:"del",raw:p[0],text:p[2],tokens:this.lexer.inlineTokens(p[2])}},O.autolink=function(c,p){var g=this.rules.inline.autolink.exec(c);if(g){var D,l;return g[2]==="@"?(D=H(this.options.mangle?p(g[1]):g[1]),l="mailto:"+D):(D=H(g[1]),l=D),{type:"link",raw:g[0],text:D,href:l,tokens:[{type:"text",raw:D,text:D}]}}},O.url=function(c,p){var g;if(g=this.rules.inline.url.exec(c)){var D,l;if(g[2]==="@")D=H(this.options.mangle?p(g[0]):g[0]),l="mailto:"+D;else{var d;do d=g[0],g[0]=this.rules.inline._backpedal.exec(g[0])[0];while(d!==g[0]);D=H(g[0]),g[1]==="www."?l="http://"+g[0]:l=g[0]}return{type:"link",raw:g[0],text:D,href:l,tokens:[{type:"text",raw:D,text:D}]}}},O.inlineText=function(c,p){var g=this.rules.inline.text.exec(c);if(g){var D;return this.lexer.state.inRawBlock?D=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(g[0]):H(g[0]):g[0]:D=H(this.options.smartypants?p(g[0]):g[0]),{type:"text",raw:g[0],text:D}}},I}(),K={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:_,lheading:/^((?:.|\n(?!\n))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};K._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,K._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,K.def=X(K.def).replace("label",K._label).replace("title",K._title).getRegex(),K.bullet=/(?:[*+-]|\d{1,9}[.)])/,K.listItemStart=X(/^( *)(bull) */).replace("bull",K.bullet).getRegex(),K.list=X(K.list).replace(/bull/g,K.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+K.def.source+")").getRegex(),K._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",K._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,K.html=X(K.html,"i").replace("comment",K._comment).replace("tag",K._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),K.paragraph=X(K._paragraph).replace("hr",K.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",K._tag).getRegex(),K.blockquote=X(K.blockquote).replace("paragraph",K.paragraph).getRegex(),K.normal=B({},K),K.gfm=B({},K.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),K.gfm.table=X(K.gfm.table).replace("hr",K.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",K._tag).getRegex(),K.gfm.paragraph=X(K._paragraph).replace("hr",K.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",K.gfm.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",K._tag).getRegex(),K.pedantic=B({},K.normal,{html:X(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",K._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:X(K.normal._paragraph).replace("hr",K.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",K.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var ne={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:_,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^(?:[^_*\\]|\\.)*?\_\_(?:[^_*\\]|\\.)*?\*(?:[^_*\\]|\\.)*?(?=\_\_)|(?:[^*\\]|\\.)+(?=[^*])|[punct_](\*+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|(?:[^punct*_\s\\]|\\.)(\*+)(?=[^punct*_\s])/,rDelimUnd:/^(?:[^_*\\]|\\.)*?\*\*(?:[^_*\\]|\\.)*?\_(?:[^_*\\]|\\.)*?(?=\*\*)|(?:[^_\\]|\\.)+(?=[^_])|[punct*](\_+)(?=[\s]|$)|(?:[^punct*_\s\\]|\\.)(\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:_,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};ne._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ne.punctuation=X(ne.punctuation).replace(/punctuation/g,ne._punctuation).getRegex(),ne.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,ne.escapedEmSt=/(?:^|[^\\])(?:\\\\)*\\[*_]/g,ne._comment=X(K._comment).replace("(?:-->|$)","-->").getRegex(),ne.emStrong.lDelim=X(ne.emStrong.lDelim).replace(/punct/g,ne._punctuation).getRegex(),ne.emStrong.rDelimAst=X(ne.emStrong.rDelimAst,"g").replace(/punct/g,ne._punctuation).getRegex(),ne.emStrong.rDelimUnd=X(ne.emStrong.rDelimUnd,"g").replace(/punct/g,ne._punctuation).getRegex(),ne._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ne._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ne._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])?)+(?![-_])/,ne.autolink=X(ne.autolink).replace("scheme",ne._scheme).replace("email",ne._email).getRegex(),ne._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ne.tag=X(ne.tag).replace("comment",ne._comment).replace("attribute",ne._attribute).getRegex(),ne._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ne._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,ne._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ne.link=X(ne.link).replace("label",ne._label).replace("href",ne._href).replace("title",ne._title).getRegex(),ne.reflink=X(ne.reflink).replace("label",ne._label).replace("ref",K._label).getRegex(),ne.nolink=X(ne.nolink).replace("ref",K._label).getRegex(),ne.reflinkSearch=X(ne.reflinkSearch,"g").replace("reflink",ne.reflink).replace("nolink",ne.nolink).getRegex(),ne.normal=B({},ne),ne.pedantic=B({},ne.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:X(/^!?\[(label)\]\((.*?)\)/).replace("label",ne._label).getRegex(),reflink:X(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ne._label).getRegex()}),ne.gfm=B({},ne.normal,{escape:X(ne.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),ne.gfm.url=X(ne.gfm.url,"i").replace("email",ne.gfm._extended_email).getRegex(),ne.breaks=B({},ne.gfm,{br:X(ne.br).replace("{2,}","*").getRegex(),text:X(ne.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function Le(I){return I.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function Ge(I){var O="",T,c,p=I.length;for(T=0;T<p;T++)c=I.charCodeAt(T),Math.random()>.5&&(c="x"+c.toString(16)),O+="&#"+c+";";return O}var Qe=function(){function I(T){this.tokens=[],this.tokens.links=Object.create(null),this.options=T||_e.NT,this.options.tokenizer=this.options.tokenizer||new h,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var c={block:K.normal,inline:ne.normal};this.options.pedantic?(c.block=K.pedantic,c.inline=ne.pedantic):this.options.gfm&&(c.block=K.gfm,this.options.breaks?c.inline=ne.breaks:c.inline=ne.gfm),this.tokenizer.rules=c}I.lex=function(c,p){var g=new I(p);return g.lex(c)},I.lexInline=function(c,p){var g=new I(p);return g.inlineTokens(c)};var O=I.prototype;return O.lex=function(c){c=c.replace(/\r\n|\r/g,`
`),this.blockTokens(c,this.tokens);for(var p;p=this.inlineQueue.shift();)this.inlineTokens(p.src,p.tokens);return this.tokens},O.blockTokens=function(c,p){var g=this;p===void 0&&(p=[]),this.options.pedantic?c=c.replace(/\t/g," ").replace(/^ +$/gm,""):c=c.replace(/^( *)(\t+)/gm,function(F,S,b){return S+" ".repeat(b.length)});for(var D,l,d,m;c;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(F){return(D=F.call({lexer:g},c,p))?(c=c.substring(D.raw.length),p.push(D),!0):!1}))){if(D=this.tokenizer.space(c)){c=c.substring(D.raw.length),D.raw.length===1&&p.length>0?p[p.length-1].raw+=`
`:p.push(D);continue}if(D=this.tokenizer.code(c)){c=c.substring(D.raw.length),l=p[p.length-1],l&&(l.type==="paragraph"||l.type==="text")?(l.raw+=`
`+D.raw,l.text+=`
`+D.text,this.inlineQueue[this.inlineQueue.length-1].src=l.text):p.push(D);continue}if(D=this.tokenizer.fences(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.heading(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.hr(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.blockquote(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.list(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.html(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.def(c)){c=c.substring(D.raw.length),l=p[p.length-1],l&&(l.type==="paragraph"||l.type==="text")?(l.raw+=`
`+D.raw,l.text+=`
`+D.raw,this.inlineQueue[this.inlineQueue.length-1].src=l.text):this.tokens.links[D.tag]||(this.tokens.links[D.tag]={href:D.href,title:D.title});continue}if(D=this.tokenizer.table(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.lheading(c)){c=c.substring(D.raw.length),p.push(D);continue}if(d=c,this.options.extensions&&this.options.extensions.startBlock&&function(){var F=1/0,S=c.slice(1),b=void 0;g.options.extensions.startBlock.forEach(function(w){b=w.call({lexer:this},S),typeof b=="number"&&b>=0&&(F=Math.min(F,b))}),F<1/0&&F>=0&&(d=c.substring(0,F+1))}(),this.state.top&&(D=this.tokenizer.paragraph(d))){l=p[p.length-1],m&&l.type==="paragraph"?(l.raw+=`
`+D.raw,l.text+=`
`+D.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=l.text):p.push(D),m=d.length!==c.length,c=c.substring(D.raw.length);continue}if(D=this.tokenizer.text(c)){c=c.substring(D.raw.length),l=p[p.length-1],l&&l.type==="text"?(l.raw+=`
`+D.raw,l.text+=`
`+D.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=l.text):p.push(D);continue}if(c){var y="Infinite loop on byte: "+c.charCodeAt(0);if(this.options.silent){console.error(y);break}else throw new Error(y)}}return this.state.top=!0,p},O.inline=function(c,p){return p===void 0&&(p=[]),this.inlineQueue.push({src:c,tokens:p}),p},O.inlineTokens=function(c,p){var g=this;p===void 0&&(p=[]);var D,l,d,m=c,y,F,S;if(this.tokens.links){var b=Object.keys(this.tokens.links);if(b.length>0)for(;(y=this.tokenizer.rules.inline.reflinkSearch.exec(m))!=null;)b.includes(y[0].slice(y[0].lastIndexOf("[")+1,-1))&&(m=m.slice(0,y.index)+"["+at("a",y[0].length-2)+"]"+m.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(y=this.tokenizer.rules.inline.blockSkip.exec(m))!=null;)m=m.slice(0,y.index)+"["+at("a",y[0].length-2)+"]"+m.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(y=this.tokenizer.rules.inline.escapedEmSt.exec(m))!=null;)m=m.slice(0,y.index+y[0].length-2)+"++"+m.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex),this.tokenizer.rules.inline.escapedEmSt.lastIndex--;for(;c;)if(F||(S=""),F=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(C){return(D=C.call({lexer:g},c,p))?(c=c.substring(D.raw.length),p.push(D),!0):!1}))){if(D=this.tokenizer.escape(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.tag(c)){c=c.substring(D.raw.length),l=p[p.length-1],l&&D.type==="text"&&l.type==="text"?(l.raw+=D.raw,l.text+=D.text):p.push(D);continue}if(D=this.tokenizer.link(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.reflink(c,this.tokens.links)){c=c.substring(D.raw.length),l=p[p.length-1],l&&D.type==="text"&&l.type==="text"?(l.raw+=D.raw,l.text+=D.text):p.push(D);continue}if(D=this.tokenizer.emStrong(c,m,S)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.codespan(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.br(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.del(c)){c=c.substring(D.raw.length),p.push(D);continue}if(D=this.tokenizer.autolink(c,Ge)){c=c.substring(D.raw.length),p.push(D);continue}if(!this.state.inLink&&(D=this.tokenizer.url(c,Ge))){c=c.substring(D.raw.length),p.push(D);continue}if(d=c,this.options.extensions&&this.options.extensions.startInline&&function(){var C=1/0,ee=c.slice(1),he=void 0;g.options.extensions.startInline.forEach(function(ke){he=ke.call({lexer:this},ee),typeof he=="number"&&he>=0&&(C=Math.min(C,he))}),C<1/0&&C>=0&&(d=c.substring(0,C+1))}(),D=this.tokenizer.inlineText(d,Le)){c=c.substring(D.raw.length),D.raw.slice(-1)!=="_"&&(S=D.raw.slice(-1)),F=!0,l=p[p.length-1],l&&l.type==="text"?(l.raw+=D.raw,l.text+=D.text):p.push(D);continue}if(c){var w="Infinite loop on byte: "+c.charCodeAt(0);if(this.options.silent){console.error(w);break}else throw new Error(w)}}return p},Q(I,null,[{key:"rules",get:function(){return{block:K,inline:ne}}}]),I}(),je=function(){function I(T){this.options=T||_e.NT}var O=I.prototype;return O.code=function(c,p,g){var D=(p||"").match(/\S*/)[0];if(this.options.highlight){var l=this.options.highlight(c,D);l!=null&&l!==c&&(g=!0,c=l)}return c=c.replace(/\n$/,"")+`
`,D?'<pre><code class="'+this.options.langPrefix+H(D)+'">'+(g?c:H(c,!0))+`</code></pre>
`:"<pre><code>"+(g?c:H(c,!0))+`</code></pre>
`},O.blockquote=function(c){return`<blockquote>
`+c+`</blockquote>
`},O.html=function(c){return c},O.heading=function(c,p,g,D){if(this.options.headerIds){var l=this.options.headerPrefix+D.slug(g);return"<h"+p+' id="'+l+'">'+c+"</h"+p+`>
`}return"<h"+p+">"+c+"</h"+p+`>
`},O.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},O.list=function(c,p,g){var D=p?"ol":"ul",l=p&&g!==1?' start="'+g+'"':"";return"<"+D+l+`>
`+c+"</"+D+`>
`},O.listitem=function(c){return"<li>"+c+`</li>
`},O.checkbox=function(c){return"<input "+(c?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},O.paragraph=function(c){return"<p>"+c+`</p>
`},O.table=function(c,p){return p&&(p="<tbody>"+p+"</tbody>"),`<table>
<thead>
`+c+`</thead>
`+p+`</table>
`},O.tablerow=function(c){return`<tr>
`+c+`</tr>
`},O.tablecell=function(c,p){var g=p.header?"th":"td",D=p.align?"<"+g+' align="'+p.align+'">':"<"+g+">";return D+c+("</"+g+`>
`)},O.strong=function(c){return"<strong>"+c+"</strong>"},O.em=function(c){return"<em>"+c+"</em>"},O.codespan=function(c){return"<code>"+c+"</code>"},O.br=function(){return this.options.xhtml?"<br/>":"<br>"},O.del=function(c){return"<del>"+c+"</del>"},O.link=function(c,p,g){if(c=ge(this.options.sanitize,this.options.baseUrl,c),c===null)return g;var D='<a href="'+c+'"';return p&&(D+=' title="'+p+'"'),D+=">"+g+"</a>",D},O.image=function(c,p,g){if(c=ge(this.options.sanitize,this.options.baseUrl,c),c===null)return g;var D='<img src="'+c+'" alt="'+g+'"';return p&&(D+=' title="'+p+'"'),D+=this.options.xhtml?"/>":">",D},O.text=function(c){return c},I}(),ot=function(){function I(){}var O=I.prototype;return O.strong=function(c){return c},O.em=function(c){return c},O.codespan=function(c){return c},O.del=function(c){return c},O.html=function(c){return c},O.text=function(c){return c},O.link=function(c,p,g){return""+g},O.image=function(c,p,g){return""+g},O.br=function(){return""},I}(),lt=function(){function I(){this.seen={}}var O=I.prototype;return O.serialize=function(c){return c.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},O.getNextSafeSlug=function(c,p){var g=c,D=0;if(this.seen.hasOwnProperty(g)){D=this.seen[c];do D++,g=c+"-"+D;while(this.seen.hasOwnProperty(g))}return p||(this.seen[c]=D,this.seen[g]=0),g},O.slug=function(c,p){p===void 0&&(p={});var g=this.serialize(c);return this.getNextSafeSlug(g,p.dryrun)},I}(),Ie=function(){function I(T){this.options=T||_e.NT,this.options.renderer=this.options.renderer||new je,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ot,this.slugger=new lt}I.parse=function(c,p){var g=new I(p);return g.parse(c)},I.parseInline=function(c,p){var g=new I(p);return g.parseInline(c)};var O=I.prototype;return O.parse=function(c,p){p===void 0&&(p=!0);var g="",D,l,d,m,y,F,S,b,w,C,ee,he,ke,xe,ce,We,Ue,Be,ze,$e=c.length;for(D=0;D<$e;D++){if(C=c[D],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[C.type]&&(ze=this.options.extensions.renderers[C.type].call({parser:this},C),ze!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(C.type))){g+=ze||"";continue}switch(C.type){case"space":continue;case"hr":{g+=this.renderer.hr();continue}case"heading":{g+=this.renderer.heading(this.parseInline(C.tokens),C.depth,j(this.parseInline(C.tokens,this.textRenderer)),this.slugger);continue}case"code":{g+=this.renderer.code(C.text,C.lang,C.escaped);continue}case"table":{for(b="",S="",m=C.header.length,l=0;l<m;l++)S+=this.renderer.tablecell(this.parseInline(C.header[l].tokens),{header:!0,align:C.align[l]});for(b+=this.renderer.tablerow(S),w="",m=C.rows.length,l=0;l<m;l++){for(F=C.rows[l],S="",y=F.length,d=0;d<y;d++)S+=this.renderer.tablecell(this.parseInline(F[d].tokens),{header:!1,align:C.align[d]});w+=this.renderer.tablerow(S)}g+=this.renderer.table(b,w);continue}case"blockquote":{w=this.parse(C.tokens),g+=this.renderer.blockquote(w);continue}case"list":{for(ee=C.ordered,he=C.start,ke=C.loose,m=C.items.length,w="",l=0;l<m;l++)ce=C.items[l],We=ce.checked,Ue=ce.task,xe="",ce.task&&(Be=this.renderer.checkbox(We),ke?ce.tokens.length>0&&ce.tokens[0].type==="paragraph"?(ce.tokens[0].text=Be+" "+ce.tokens[0].text,ce.tokens[0].tokens&&ce.tokens[0].tokens.length>0&&ce.tokens[0].tokens[0].type==="text"&&(ce.tokens[0].tokens[0].text=Be+" "+ce.tokens[0].tokens[0].text)):ce.tokens.unshift({type:"text",text:Be}):xe+=Be),xe+=this.parse(ce.tokens,ke),w+=this.renderer.listitem(xe,Ue,We);g+=this.renderer.list(w,ee,he);continue}case"html":{g+=this.renderer.html(C.text);continue}case"paragraph":{g+=this.renderer.paragraph(this.parseInline(C.tokens));continue}case"text":{for(w=C.tokens?this.parseInline(C.tokens):C.text;D+1<$e&&c[D+1].type==="text";)C=c[++D],w+=`
`+(C.tokens?this.parseInline(C.tokens):C.text);g+=p?this.renderer.paragraph(w):w;continue}default:{var Ve='Token with "'+C.type+'" type was not found.';if(this.options.silent){console.error(Ve);return}else throw new Error(Ve)}}}return g},O.parseInline=function(c,p){p=p||this.renderer;var g="",D,l,d,m=c.length;for(D=0;D<m;D++){if(l=c[D],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[l.type]&&(d=this.options.extensions.renderers[l.type].call({parser:this},l),d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type))){g+=d||"";continue}switch(l.type){case"escape":{g+=p.text(l.text);break}case"html":{g+=p.html(l.text);break}case"link":{g+=p.link(l.href,l.title,this.parseInline(l.tokens,p));break}case"image":{g+=p.image(l.href,l.title,l.text);break}case"strong":{g+=p.strong(this.parseInline(l.tokens,p));break}case"em":{g+=p.em(this.parseInline(l.tokens,p));break}case"codespan":{g+=p.codespan(l.text);break}case"br":{g+=p.br();break}case"del":{g+=p.del(this.parseInline(l.tokens,p));break}case"text":{g+=p.text(l.text);break}default:{var y='Token with "'+l.type+'" type was not found.';if(this.options.silent){console.error(y);return}else throw new Error(y)}}}return g},I}(),qe=function(){function I(T){this.options=T||_e.NT}var O=I.prototype;return O.preprocess=function(c){return c},O.postprocess=function(c){return c},I}();qe.passThroughHooks=new Set(["preprocess","postprocess"]);function wt(I,O,T){return function(c){if(c.message+=`
Please report this to https://github.com/markedjs/marked.`,I){var p="<p>An error occurred:</p><pre>"+H(c.message+"",!0)+"</pre>";if(O)return Promise.resolve(p);if(T){T(null,p);return}return p}if(O)return Promise.reject(c);if(T){T(c);return}throw c}}function jt(I,O){return function(T,c,p){typeof c=="function"&&(p=c,c=null);var g=B({},c);c=B({},De.defaults,g);var D=wt(c.silent,c.async,p);if(typeof T>"u"||T===null)return D(new Error("marked(): input parameter is undefined or null"));if(typeof T!="string")return D(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(T)+", string expected"));if(Je(c),c.hooks&&(c.hooks.options=c),p){var l=c.highlight,d;try{c.hooks&&(T=c.hooks.preprocess(T)),d=I(T,c)}catch(b){return D(b)}var m=function(w){var C;if(!w)try{c.walkTokens&&De.walkTokens(d,c.walkTokens),C=O(d,c),c.hooks&&(C=c.hooks.postprocess(C))}catch(ee){w=ee}return c.highlight=l,w?D(w):p(null,C)};if(!l||l.length<3||(delete c.highlight,!d.length))return m();var y=0;De.walkTokens(d,function(b){b.type==="code"&&(y++,setTimeout(function(){l(b.text,b.lang,function(w,C){if(w)return m(w);C!=null&&C!==b.text&&(b.text=C,b.escaped=!0),y--,y===0&&m()})},0))}),y===0&&m();return}if(c.async)return Promise.resolve(c.hooks?c.hooks.preprocess(T):T).then(function(b){return I(b,c)}).then(function(b){return c.walkTokens?Promise.all(De.walkTokens(b,c.walkTokens)).then(function(){return b}):b}).then(function(b){return O(b,c)}).then(function(b){return c.hooks?c.hooks.postprocess(b):b}).catch(D);try{c.hooks&&(T=c.hooks.preprocess(T));var F=I(T,c);c.walkTokens&&De.walkTokens(F,c.walkTokens);var S=O(F,c);return c.hooks&&(S=c.hooks.postprocess(S)),S}catch(b){return D(b)}}}function De(I,O,T){return jt(Qe.lex,Ie.parse)(I,O,T)}De.options=De.setOptions=function(I){return De.defaults=B({},De.defaults,I),G(De.defaults),De},De.getDefaults=V,De.defaults=_e.NT,De.use=function(){for(var I=De.defaults.extensions||{renderers:{},childTokens:{}},O=arguments.length,T=new Array(O),c=0;c<O;c++)T[c]=arguments[c];T.forEach(function(p){var g=B({},p);if(g.async=De.defaults.async||g.async||!1,p.extensions&&(p.extensions.forEach(function(l){if(!l.name)throw new Error("extension name required");if(l.renderer){var d=I.renderers[l.name];d?I.renderers[l.name]=function(){for(var m=arguments.length,y=new Array(m),F=0;F<m;F++)y[F]=arguments[F];var S=l.renderer.apply(this,y);return S===!1&&(S=d.apply(this,y)),S}:I.renderers[l.name]=l.renderer}if(l.tokenizer){if(!l.level||l.level!=="block"&&l.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");I[l.level]?I[l.level].unshift(l.tokenizer):I[l.level]=[l.tokenizer],l.start&&(l.level==="block"?I.startBlock?I.startBlock.push(l.start):I.startBlock=[l.start]:l.level==="inline"&&(I.startInline?I.startInline.push(l.start):I.startInline=[l.start]))}l.childTokens&&(I.childTokens[l.name]=l.childTokens)}),g.extensions=I),p.renderer&&function(){var l=De.defaults.renderer||new je,d=function(F){var S=l[F];l[F]=function(){for(var b=arguments.length,w=new Array(b),C=0;C<b;C++)w[C]=arguments[C];var ee=p.renderer[F].apply(l,w);return ee===!1&&(ee=S.apply(l,w)),ee}};for(var m in p.renderer)d(m);g.renderer=l}(),p.tokenizer&&function(){var l=De.defaults.tokenizer||new h,d=function(F){var S=l[F];l[F]=function(){for(var b=arguments.length,w=new Array(b),C=0;C<b;C++)w[C]=arguments[C];var ee=p.tokenizer[F].apply(l,w);return ee===!1&&(ee=S.apply(l,w)),ee}};for(var m in p.tokenizer)d(m);g.tokenizer=l}(),p.hooks&&function(){var l=De.defaults.hooks||new qe,d=function(F){var S=l[F];qe.passThroughHooks.has(F)?l[F]=function(b){if(De.defaults.async)return Promise.resolve(p.hooks[F].call(l,b)).then(function(C){return S.call(l,C)});var w=p.hooks[F].call(l,b);return S.call(l,w)}:l[F]=function(){for(var b=arguments.length,w=new Array(b),C=0;C<b;C++)w[C]=arguments[C];var ee=p.hooks[F].apply(l,w);return ee===!1&&(ee=S.apply(l,w)),ee}};for(var m in p.hooks)d(m);g.hooks=l}(),p.walkTokens){var D=De.defaults.walkTokens;g.walkTokens=function(l){var d=[];return d.push(p.walkTokens.call(this,l)),D&&(d=d.concat(D.call(this,l))),d}}De.setOptions(g)})},De.walkTokens=function(I,O){for(var T=[],c=function(){var l=g.value;switch(T=T.concat(O.call(De,l)),l.type){case"table":{for(var d=A(l.header),m;!(m=d()).done;){var y=m.value;T=T.concat(De.walkTokens(y.tokens,O))}for(var F=A(l.rows),S;!(S=F()).done;)for(var b=S.value,w=A(b),C;!(C=w()).done;){var ee=C.value;T=T.concat(De.walkTokens(ee.tokens,O))}break}case"list":{T=T.concat(De.walkTokens(l.items,O));break}default:De.defaults.extensions&&De.defaults.extensions.childTokens&&De.defaults.extensions.childTokens[l.type]?De.defaults.extensions.childTokens[l.type].forEach(function(he){T=T.concat(De.walkTokens(l[he],O))}):l.tokens&&(T=T.concat(De.walkTokens(l.tokens,O)))}},p=A(I),g;!(g=p()).done;)c();return T},De.parseInline=jt(Qe.lexInline,Ie.parseInline),De.Parser=Ie,De.parser=Ie.parse,De.Renderer=je,De.TextRenderer=ot,De.Lexer=Qe,De.lexer=Qe.lex,De.Tokenizer=h,De.Slugger=lt,De.Hooks=qe,De.parse=De;var Nt=De.options,Oe=De.setOptions,It=De.use,xt=De.walkTokens,Ot=De.parseInline,Pe=De,zt=Ie.parse,xr=Qe.lex;ye=qe,ye=Qe,ye=Ie,ye=je,ye=lt,ye=ot,ye=h,ye=V,ye=xr,_e.xI=De,ye=Nt,ye=Pe,ye=Ot,ye=zt,ye=Oe,ye=It,ye=xt}}]);