diff --git a/CodeMirror-3.14/addon/lint/lint.css b/CodeMirror-3.14/addon/lint/lint.css deleted file mode 100644 index 977e420..0000000 --- a/CodeMirror-3.14/addon/lint/lint.css +++ /dev/null @@ -1,72 +0,0 @@ -/* The lint marker gutter */ -.CodeMirror-lint-markers { - width: 12px; margin-left: 2px; -} - -.CodeMirror-lint-tooltip { - background-color: infobackground; - border: 1px solid black; - border-radius: 4px 4px 4px 4px; - color: infotext; - font-family: monospace; - font-size: 10pt; - overflow: hidden; - padding: 2px 5px; - position: fixed; - white-space: pre; - z-index: 100; - max-width: 600px; - opacity: 0; - transition: opacity .4s; - -moz-transition: opacity .4s; - -webkit-transition: opacity .4s; - -o-transition: opacity .4s; - -ms-transition: opacity .4s; -} - -.CodeMirror-lint-mark-error, .CodeMirror-lint-mark-warning { - background-position: left bottom; - background-repeat: repeat-x; -} - -.CodeMirror-lint-mark-error { - background-image: - url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==") - ; -} - -.CodeMirror-lint-mark-warning { - background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII="); -} - -.CodeMirror-lint-marker-error, .CodeMirror-lint-marker-warning { - background-position: center center; - background-repeat: no-repeat; - cursor: help; - display: inline-block; - height: 16px; - width: 16px; - vertical-align: middle; - position: relative; -} - -.CodeMirror-lint-message-error, .CodeMirror-lint-message-warning { - padding-left: 18px; - background-position: top left; - background-repeat: no-repeat; -} - -.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error { - background-image: url("../../../images/error.png"); -} - -.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning { - background-image: url("../../../images/warning.png"); -} - -.CodeMirror-lint-marker-multiple { - background-image: url("../../../images/multiple.png"); - background-repeat: no-repeat; - background-position: right bottom; - width: 100%; height: 100%; -} \ No newline at end of file diff --git a/CodeMirror-3.14/lib/codemirror-compressed.js b/CodeMirror-3.14/lib/codemirror-compressed.js deleted file mode 100644 index 4dff58a..0000000 --- a/CodeMirror-3.14/lib/codemirror-compressed.js +++ /dev/null @@ -1,7 +0,0 @@ -window.CodeMirror=function(){"use strict";function w(a,c){if(!(this instanceof w))return new w(a,c);this.options=c=c||{};for(var d in Wc)!c.hasOwnProperty(d)&&Wc.hasOwnProperty(d)&&(c[d]=Wc[d]);I(c);var e="string"==typeof c.value?0:c.value.first,f=this.display=x(a,e);f.wrapper.CodeMirror=this,F(this),c.autofocus&&!o&&Kb(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,draggingText:!1,highlight:new Re},D(this),c.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap");var g=c.value;"string"==typeof g&&(g=new be(c.value,c.mode)),Cb(this,fe)(this,g),b&&setTimeout(_e(Jb,this,!0),20),Mb(this);var h;try{h=document.activeElement==f.input}catch(i){}h||c.autofocus&&!o?setTimeout(_e(hc,this),20):ic(this),Cb(this,function(){for(var a in Vc)Vc.propertyIsEnumerable(a)&&Vc[a](this,c[a],Yc);for(var b=0;bb.maxLineLength&&(b.maxLineLength=d,b.maxLine=a)})}function I(a){for(var b=!1,c=0;cb.scroller.clientWidth+1,g=e>b.scroller.clientHeight+1;g?(b.scrollbarV.style.display="block",b.scrollbarV.style.bottom=f?nf(b.measure)+"px":"0",b.scrollbarV.firstChild.style.height=e-b.scroller.clientHeight+b.scrollbarV.clientHeight+"px"):b.scrollbarV.style.display="",f?(b.scrollbarH.style.display="block",b.scrollbarH.style.right=g?nf(b.measure)+"px":"0",b.scrollbarH.firstChild.style.width=b.scroller.scrollWidth-b.scroller.clientWidth+b.scrollbarH.clientWidth+"px"):b.scrollbarH.style.display="",f&&g?(b.scrollbarFiller.style.display="block",b.scrollbarFiller.style.height=b.scrollbarFiller.style.width=nf(b.measure)+"px"):b.scrollbarFiller.style.display="",f&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(b.gutterFiller.style.display="block",b.gutterFiller.style.height=nf(b.measure)+"px",b.gutterFiller.style.width=b.gutters.offsetWidth+"px"):b.gutterFiller.style.display="",k&&0===nf(b.measure)&&(b.scrollbarV.style.minWidth=b.scrollbarH.style.minHeight=l?"18px":"12px")}function K(a,b,c){var d=a.scroller.scrollTop,e=a.wrapper.clientHeight;"number"==typeof c?d=c:c&&(d=c.top,e=c.bottom-c.top),d=Math.floor(d-db(a));var f=Math.ceil(d+e);return{from:le(b,d),to:le(b,f)}}function L(a){var b=a.display;if(b.alignWidgets||b.gutters.firstChild&&a.options.fixedGutter){for(var c=O(b)-b.scroller.scrollLeft+a.doc.scrollLeft,d=b.gutters.offsetWidth,e=c+"px",f=b.lineDiv.firstChild;f;f=f.nextSibling)if(f.alignable)for(var g=0,h=f.alignable;g=a.display.showingFrom&&g.to<=a.display.showingTo));)b=[];return f&&(Le(a,"update",a),(a.display.showingFrom!=d||a.display.showingTo!=e)&&Le(a,"viewportChange",a,a.display.showingFrom,a.display.showingTo)),f}function Q(a,b,d){var e=a.display,f=a.doc;if(!e.wrapper.clientWidth)return e.showingFrom=e.showingTo=f.first,e.viewOffset=0,void 0;if(!(0==b.length&&d.from>e.showingFrom&&d.tol&&e.showingTo-l<20&&(l=Math.min(j,e.showingTo)),v)for(k=ke(Ad(f,ge(f,k)));j>l&&Bd(f,ge(f,l));)++l;var m=[{from:Math.max(e.showingFrom,f.first),to:Math.min(e.showingTo,j)}];if(m=m[0].from>=m[0].to?[]:S(m,b),v)for(var i=0;in.from)){m.splice(i--,1);break}n.to=p}for(var q=0,i=0;il&&(n.to=l),n.from>=n.to?m.splice(i--,1):q+=n.to-n.from}if(q==l-k&&k==e.showingFrom&&l==e.showingTo)return R(a),void 0;m.sort(function(a,b){return a.from-b.from});try{var r=document.activeElement}catch(s){}.7*(l-k)>q&&(e.lineDiv.style.display="none"),U(a,k,l,m,h),e.lineDiv.style.display="",r&&document.activeElement!=r&&r.offsetHeight&&r.focus();var t=k!=e.showingFrom||l!=e.showingTo||e.lastSizeC!=e.wrapper.clientHeight;t&&(e.lastSizeC=e.wrapper.clientHeight,_(a,400)),e.showingFrom=k,e.showingTo=l;for(var x,u=e.lineDiv.offsetTop,w=e.lineDiv.firstChild;w;w=w.nextSibling)if(w.lineObj){if(c){var y=w.offsetTop+w.offsetHeight;x=y-u,u=y}else{var z=jf(w);x=z.bottom-z.top}var A=w.lineObj.height-x;if(2>x&&(x=xb(e)),A>.001||-.001>A){je(w.lineObj,x);var B=w.lineObj.widgets;if(B)for(var i=0;ic;++c){for(var e=b[c],f=[],g=e.diff||0,h=0,i=a.length;i>h;++h){var j=a[h];e.to<=j.from&&e.diff?f.push({from:j.from+g,to:j.to+g}):e.to<=j.from||e.from>=j.to?f.push(j):(e.from>j.from&&f.push({from:j.from,to:e.from}),e.ton){for(;k.lineObj!=b;)k=l(k);i&&n>=f&&k.lineNumber&&hf(k.lineNumber,N(a.options,n)),k=k.nextSibling}else{if(b.widgets)for(var s,q=0,r=k;r&&20>q;++q,r=r.nextSibling)if(r.lineObj==b&&/div/i.test(r.nodeName)){s=r;break}var t=V(a,b,n,g,s);if(t!=s)j.insertBefore(t,k);else{for(;k!=s;)k=l(k);k=k.nextSibling}t.lineObj=b}++n});k;)k=l(k)}function V(a,b,d,e,f){var j,g=Sd(a,b),h=b.gutterMarkers,i=a.display;if(!(a.options.lineNumbers||h||b.bgClass||b.wrapClass||b.widgets))return g;if(f){f.alignable=null;for(var o,k=!0,l=0,m=null,n=f.firstChild;n;n=o)if(o=n.nextSibling,/\bCodeMirror-linewidget\b/.test(n.className)){for(var p=0;pb&&(b=0),e.appendChild(ef("div",null,"CodeMirror-selected","position: absolute; left: "+a+"px; top: "+b+"px; width: "+(null==c?f-a:c)+"px; height: "+(d-b)+"px"))}function i(b,d,e){function m(c,d){return rb(a,wc(b,c),"div",i,d)}var k,l,i=ge(c,b),j=i.text.length;return uf(ne(i),d||0,null==e?j:e,function(a,b,c){var n,o,p,i=m(a,"left");if(a==b)n=i,o=p=i.left;else{if(n=m(b-1,"right"),"rtl"==c){var q=i;i=n,n=q}o=i.left,p=n.right}null==d&&0==a&&(o=g),n.top-i.top>3&&(h(o,i.top,null,i.bottom),o=g,i.bottoml.bottom||n.bottom==l.bottom&&n.right>l.right)&&(l=n),g+1>o&&(o=g),h(o,n.top,p-o,n.bottom)}),{start:k,end:l}}var b=a.display,c=a.doc,d=a.doc.sel,e=document.createDocumentFragment(),f=b.lineSpace.offsetWidth,g=fb(a.display);if(d.from.line==d.to.line)i(d.from.line,d.from.ch,d.to.ch);else{var j=ge(c,d.from.line),k=ge(c,d.to.line),l=Ad(c,j)==Ad(c,k),m=i(d.from.line,d.from.ch,l?j.text.length:null).end,n=i(d.to.line,l?0:null,d.to.ch).start;l&&(m.top=a.display.showingTo)){var f,c=+new Date+a.options.workTime,d=cd(b.mode,cb(a,b.frontier)),e=[];b.iter(b.frontier,Math.min(b.first+b.size,a.display.showingTo+500),function(g){if(b.frontier>=a.display.showingFrom){var h=g.styles;g.styles=Nd(a,g,d);for(var i=!h||h.length!=g.styles.length,j=0;!i&&jc?(_(a,a.options.workDelay),!0):void 0}),e.length&&Cb(a,function(){for(var a=0;ah;--g){if(g<=f.first)return f.first;var i=ge(f,g-1);if(i.stateAfter&&(!c||g<=f.frontier))return g;var j=Se(i.text,null,a.options.tabSize);(null==e||d>j)&&(e=g-1,d=j)}return e}function cb(a,b,c){var d=a.doc,e=a.display;if(!d.mode.startState)return!0;var f=bb(a,b,c),g=f>d.first&&ge(d,f-1).stateAfter;return g=g?cd(d.mode,g):dd(d.mode),d.iter(f,b,function(c){Pd(a,c,g);var h=f==b-1||0==f%5||f>=e.showingFrom&&ff&&0==g&&(f=1)}return e=g>c?"left":c>g?"right":e,"left"==e&&h.leftSide?h=h.leftSide:"right"==e&&h.rightSide&&(h=h.rightSide),{left:c>g?h.right:h.left,right:g>c?h.left:h.right,top:h.top,bottom:h.bottom}}function hb(a,b){for(var c=a.display.measureLineCache,d=0;ds&&(c=s),0>b&&(b=0);for(var d=q.length-2;d>=0;d-=2){var e=q[d],f=q[d+1];if(!(e>c||b>f)&&(b>=e&&f>=c||e>=b&&c>=f||Math.min(c,f)-Math.max(b,e)>=c-b>>1)){q[d]=Math.min(b,e),q[d+1]=Math.max(c,f);break}}return 0>d&&(d=q.length,q.push(b,c)),{left:a.left-p.left,right:a.right-p.left,top:d,bottom:null}}function u(a){a.bottom=q[a.top+1],a.top=q[a.top]}var f=a.display,g=$e(e.text.length),h=Sd(a,e,g);if(b&&!c&&!a.options.lineWrapping&&h.childNodes.length>100){for(var i=document.createDocumentFragment(),j=10,k=h.childNodes.length,l=0,m=Math.ceil(k/j);m>l;++l){for(var n=ef("div",null,null,"display: inline-block"),o=0;j>o&&k;++o)n.appendChild(h.firstChild),--k;i.appendChild(n)}h.appendChild(i)}gf(f.measure,h);var p=jf(f.lineDiv),q=[],r=$e(e.text.length),s=h.offsetHeight;d&&f.measure.first!=h&&gf(f.measure,h);for(var v,l=0;l1&&(x=r[l]=t(y[0]),x.rightSide=t(y[y.length-1]))}x||(x=r[l]=t(jf(w))),v.measureRight&&(x.right=jf(v.measureRight).left),v.leftSide&&(x.leftSide=t(jf(v.leftSide)))}for(var v,l=0;lc.from?f(a-1):f(a,d)}d=d||ge(a.doc,b.line),e||(e=jb(a,d));var h=ne(d),i=b.ch;if(!h)return f(i);var j=Df(h,i),k=g(i,j);return null!=Cf&&(k.other=g(i,Cf)),k}function tb(a,b,c,d){var e=new wc(a,b);return e.xRel=d,c&&(e.outside=!0),e}function ub(a,b,c){var d=a.doc;if(c+=a.display.viewOffset,0>c)return tb(d.first,0,!0,-1);var e=le(d,c),f=d.first+d.size-1;if(e>f)return tb(d.first+d.size-1,ge(d,f).text.length,!0,1);for(0>b&&(b=0);;){var g=ge(d,e),h=vb(a,g,e,b,c),i=zd(g),j=i&&i.find();if(!i||!(h.ch>j.from.ch||h.ch==j.from.ch&&h.xRel>0))return h;e=j.to.line}}function vb(a,b,c,d,e){function j(d){var e=sb(a,wc(c,d),"line",b,i);return g=!0,f>e.bottom?e.left-h:fq)return tb(c,n,r,1);for(;;){if(k?n==m||n==Ff(b,m,1):1>=n-m){for(var s=o>d||q-d>=d-o?m:n,t=d-(s==m?o:q);df.test(b.text.charAt(s));)++s;var u=tb(c,s,s==m?p:r,0>t?-1:t?1:0);return u}var v=Math.ceil(l/2),w=m+v;if(k){w=m;for(var x=0;v>x;++x)w=Ff(b,w,1)}var y=j(w);y>d?(n=w,q=y,(r=g)&&(q+=1e3),l=v):(m=w,o=y,p=g,l-=v)}}function xb(a){if(null!=a.cachedTextHeight)return a.cachedTextHeight;if(null==wb){wb=ef("pre");for(var b=0;49>b;++b)wb.appendChild(document.createTextNode("x")),wb.appendChild(ef("br"));wb.appendChild(document.createTextNode("x"))}gf(a.measure,wb);var c=wb.offsetHeight/50;return c>3&&(a.cachedTextHeight=c),ff(a.measure),c||1}function yb(a){if(null!=a.cachedCharWidth)return a.cachedCharWidth;var b=ef("span","x"),c=ef("pre",[b]);gf(a.measure,c);var d=b.offsetWidth;return d>2&&(a.cachedCharWidth=d),d||10}function Ab(a){a.curOp={changes:[],updateInput:null,userSelChange:null,textChanged:null,selectionChanged:!1,cursorActivity:!1,updateMaxLine:!1,updateScrollPos:!1,id:++zb},Ke++||(Je=[])}function Bb(a){var b=a.curOp,c=a.doc,d=a.display;if(a.curOp=null,b.updateMaxLine&&H(a),d.maxLineChanged&&!a.options.lineWrapping&&d.maxLine){var e=lb(a,d.maxLine);d.sizer.style.minWidth=Math.max(0,e+3+Pe)+"px",d.maxLineChanged=!1;var f=Math.max(0,d.sizer.offsetLeft+d.sizer.offsetWidth-d.scroller.clientWidth);fj&&e.charCodeAt(j)==h.charCodeAt(j);)++j;var l=g.from,m=g.to;j1e3||h.indexOf("\n")>-1?c.value=a.display.prevInput="":a.display.prevInput=h,i&&Bb(a),a.state.pasteIncoming=!1,!0}function Jb(a,c){var e,f,g=a.doc;if(xc(g.sel.from,g.sel.to))c&&(a.display.prevInput=a.display.input.value="",b&&!d&&(a.display.inputHasSelection=null));else{a.display.prevInput="",e=sf&&(g.sel.to.line-g.sel.from.line>100||(f=a.getSelection()).length>1e3);var h=e?"-":f||a.getSelection();a.display.input.value=h,a.state.focused&&We(a.display.input),b&&!d&&(a.display.inputHasSelection=h)}a.display.inaccurateSelection=e}function Kb(a){"nocursor"==a.options.readOnly||o&&document.activeElement==a.display.input||a.display.input.focus()}function Lb(a){return a.options.readOnly||a.doc.cantEdit}function Mb(a){function d(){a.state.focused&&setTimeout(_e(Kb,a),0)}function f(){null==e&&(e=setTimeout(function(){e=null,c.cachedCharWidth=c.cachedTextHeight=mf=null,mb(a),Eb(a,_e(Fb,a))},100))}function g(){for(var a=c.wrapper.parentNode;a&&a!=document.body;a=a.parentNode);a?setTimeout(g,5e3):He(window,"resize",f)}function h(b){Me(a,b)||a.options.onDragEvent&&a.options.onDragEvent(a,ze(b))||De(b)}function i(){c.inaccurateSelection&&(c.prevInput="",c.inaccurateSelection=!1,c.input.value=a.getSelection(),We(c.input))}var c=a.display;Ge(c.scroller,"mousedown",Cb(a,Rb)),b?Ge(c.scroller,"dblclick",Cb(a,function(b){if(!Me(a,b)){var c=Ob(a,b);if(c&&!Sb(a,b)&&!Nb(a.display,b)){Ae(b);var d=Tc(ge(a.doc,c.line).text,c);Ec(a.doc,d.from,d.to)}}})):Ge(c.scroller,"dblclick",function(b){Me(a,b)||Ae(b)}),Ge(c.lineSpace,"selectstart",function(a){Nb(c,a)||Ae(a)}),t||Ge(c.scroller,"contextmenu",function(b){kc(a,b)}),Ge(c.scroller,"scroll",function(){c.scroller.clientHeight&&(Wb(a,c.scroller.scrollTop),Xb(a,c.scroller.scrollLeft,!0),Ie(a,"scroll",a))}),Ge(c.scrollbarV,"scroll",function(){c.scroller.clientHeight&&Wb(a,c.scrollbarV.scrollTop)}),Ge(c.scrollbarH,"scroll",function(){c.scroller.clientHeight&&Xb(a,c.scrollbarH.scrollLeft)}),Ge(c.scroller,"mousewheel",function(b){$b(a,b)}),Ge(c.scroller,"DOMMouseScroll",function(b){$b(a,b)}),Ge(c.scrollbarH,"mousedown",d),Ge(c.scrollbarV,"mousedown",d),Ge(c.wrapper,"scroll",function(){c.wrapper.scrollTop=c.wrapper.scrollLeft=0});var e;Ge(window,"resize",f),setTimeout(g,5e3),Ge(c.input,"keyup",Cb(a,function(b){Me(a,b)||a.options.onKeyEvent&&a.options.onKeyEvent(a,ze(b))||16==b.keyCode&&(a.doc.sel.shift=!1)})),Ge(c.input,"input",_e(Hb,a)),Ge(c.input,"keydown",Cb(a,fc)),Ge(c.input,"keypress",Cb(a,gc)),Ge(c.input,"focus",_e(hc,a)),Ge(c.input,"blur",_e(ic,a)),a.options.dragDrop&&(Ge(c.scroller,"dragstart",function(b){Vb(a,b)}),Ge(c.scroller,"dragenter",h),Ge(c.scroller,"dragover",h),Ge(c.scroller,"drop",Cb(a,Ub))),Ge(c.scroller,"paste",function(b){Nb(c,b)||(Kb(a),Hb(a))}),Ge(c.input,"paste",function(){a.state.pasteIncoming=!0,Hb(a)}),Ge(c.input,"cut",i),Ge(c.input,"copy",i),j&&Ge(c.sizer,"mouseup",function(){document.activeElement==c.input&&c.input.blur(),Kb(a)})}function Nb(a,b){for(var c=Ee(b);c!=a.wrapper;c=c.parentNode)if(!c||c.ignoreEvents||c.parentNode==a.sizer&&c!=a.mover)return!0}function Ob(a,b,c){var d=a.display;if(!c){var e=Ee(b);if(e==d.scrollbarH||e==d.scrollbarH.firstChild||e==d.scrollbarV||e==d.scrollbarV.firstChild||e==d.scrollbarFiller||e==d.gutterFiller)return null}var f,g,h=jf(d.lineSpace);try{f=b.clientX,g=b.clientY}catch(b){return null}return ub(a,f-h.left,g-h.top)}function Rb(a){function q(a){if(!xc(p,a)){if(p=a,"single"==j)return Ec(c.doc,Bc(f,h),a),void 0;if(n=Bc(f,n),o=Bc(f,o),"double"==j){var b=Tc(ge(f,a.line).text,a);yc(a,n)?Ec(c.doc,b.from,o):Ec(c.doc,n,b.to)}else"triple"==j&&(yc(a,n)?Ec(c.doc,o,Bc(f,wc(a.line,0))):Ec(c.doc,n,Bc(f,wc(a.line+1,0))))}}function u(a){var b=++s,e=Ob(c,a,!0);if(e)if(xc(e,l)){var h=a.clientYr.bottom?20:0;h&&setTimeout(Cb(c,function(){s==b&&(d.scroller.scrollTop+=h,u(a))}),50)}else{c.state.focused||hc(c),l=e,q(e);var g=K(d,f);(e.line>=g.to||e.linei-400&&xc(Qb.pos,h))j="triple",Ae(a),setTimeout(_e(Kb,c),20),Uc(c,h.line);else if(Pb&&Pb.time>i-400&&xc(Pb.pos,h)){j="double",Qb={time:i,pos:h},Ae(a);var k=Tc(ge(f,h.line).text,h);Ec(c.doc,k.from,k.to)}else Pb={time:i,pos:h};var l=h;if(c.options.dragDrop&&kf&&!Lb(c)&&!xc(g.from,g.to)&&!yc(h,g.from)&&!yc(g.to,h)&&"single"==j){var m=Cb(c,function(b){e&&(d.scroller.draggable=!1),c.state.draggingText=!1,He(document,"mouseup",m),He(d.scroller,"drop",m),Math.abs(a.clientX-b.clientX)+Math.abs(a.clientY-b.clientY)<10&&(Ae(b),Ec(c.doc,h),Kb(c)) -});return e&&(d.scroller.draggable=!0),c.state.draggingText=m,d.scroller.dragDrop&&d.scroller.dragDrop(),Ge(document,"mouseup",m),Ge(d.scroller,"drop",m),void 0}Ae(a),"single"==j&&Ec(c.doc,Bc(f,h));var n=g.from,o=g.to,p=h,r=jf(d.wrapper),s=0,w=Cb(c,function(a){b||Fe(a)?u(a):v(a)}),x=Cb(c,v);Ge(document,"mousemove",w),Ge(document,"mouseup",x)}}}function Sb(a,b){var c=a.display;try{var d=b.clientX,e=b.clientY}catch(b){return!1}if(d>=Math.floor(jf(c.gutters).right))return!1;if(Ae(b),!Oe(a,"gutterClick"))return!0;var f=jf(c.lineDiv);if(e>f.bottom)return!0;e-=f.top-c.viewOffset;for(var g=0;g=d){var i=le(a.doc,e),j=a.options.gutters[g];Le(a,"gutterClick",a,i,j,b);break}}return!0}function Ub(a){var c=this;if(!(Me(c,a)||Nb(c.display,a)||c.options.onDragEvent&&c.options.onDragEvent(c,ze(a)))){Ae(a),b&&(Tb=+new Date);var d=Ob(c,a,!0),e=a.dataTransfer.files;if(d&&!Lb(c))if(e&&e.length&&window.FileReader&&window.File)for(var f=e.length,g=Array(f),h=0,i=function(a,b){var e=new FileReader;e.onload=function(){g[b]=e.result,++h==f&&(d=Bc(c.doc,d),pc(c.doc,{from:d,to:d,text:qf(g.join("\n")),origin:"paste"},"around"))},e.readAsText(a)},j=0;f>j;++j)i(e[j],j);else{if(c.state.draggingText&&!yc(d,c.doc.sel.from)&&!yc(c.doc.sel.to,d))return c.state.draggingText(a),setTimeout(_e(Kb,c),20),void 0;try{var g=a.dataTransfer.getData("Text");if(g){var k=c.doc.sel.from,l=c.doc.sel.to;Gc(c.doc,d,d),c.state.draggingText&&vc(c.doc,"",k,l,"paste"),c.replaceSelection(g,null,"paste"),Kb(c),hc(c)}}catch(a){}}}}function Vb(a,c){if(b&&(!a.state.draggingText||+new Date-Tb<100))return De(c),void 0;if(!Me(a,c)&&!Nb(a.display,c)){var d=a.getSelection();if(c.dataTransfer.setData("Text",d),c.dataTransfer.setDragImage&&!i){var e=ef("img",null,null,"position: fixed; left: 0; top: 0;");h&&(e.width=e.height=1,a.display.wrapper.appendChild(e),e._top=e.offsetTop),c.dataTransfer.setDragImage(e,0,0),h&&e.parentNode.removeChild(e)}}}function Wb(b,c){Math.abs(b.doc.scrollTop-c)<2||(b.doc.scrollTop=c,a||P(b,[],c),b.display.scroller.scrollTop!=c&&(b.display.scroller.scrollTop=c),b.display.scrollbarV.scrollTop!=c&&(b.display.scrollbarV.scrollTop=c),a&&P(b,[]),_(b,100))}function Xb(a,b,c){(c?b==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-b)<2)||(b=Math.min(b,a.display.scroller.scrollWidth-a.display.scroller.clientWidth),a.doc.scrollLeft=b,L(a),a.display.scroller.scrollLeft!=b&&(a.display.scroller.scrollLeft=b),a.display.scrollbarH.scrollLeft!=b&&(a.display.scrollbarH.scrollLeft=b))}function $b(b,c){var d=c.wheelDeltaX,f=c.wheelDeltaY;null==d&&c.detail&&c.axis==c.HORIZONTAL_AXIS&&(d=c.detail),null==f&&c.detail&&c.axis==c.VERTICAL_AXIS?f=c.detail:null==f&&(f=c.wheelDelta);var g=b.display,i=g.scroller;if(d&&i.scrollWidth>i.clientWidth||f&&i.scrollHeight>i.clientHeight){if(f&&p&&e)for(var j=c.target;j!=i;j=j.parentNode)if(j.lineObj){b.display.currentWheelTarget=j;break}if(d&&!a&&!h&&null!=Zb)return f&&Wb(b,Math.max(0,Math.min(i.scrollTop+f*Zb,i.scrollHeight-i.clientHeight))),Xb(b,Math.max(0,Math.min(i.scrollLeft+d*Zb,i.scrollWidth-i.clientWidth))),Ae(c),g.wheelStartX=null,void 0;if(f&&null!=Zb){var k=f*Zb,l=b.doc.scrollTop,m=l+g.wrapper.clientHeight;0>k?l=Math.max(0,l+k-50):m=Math.min(b.doc.height,m+k+50),P(b,[],{top:l,bottom:m})}20>Yb&&(null==g.wheelStartX?(g.wheelStartX=i.scrollLeft,g.wheelStartY=i.scrollTop,g.wheelDX=d,g.wheelDY=f,setTimeout(function(){if(null!=g.wheelStartX){var a=i.scrollLeft-g.wheelStartX,b=i.scrollTop-g.wheelStartY,c=b&&g.wheelDY&&b/g.wheelDY||a&&g.wheelDX&&a/g.wheelDX;g.wheelStartX=g.wheelStartY=null,c&&(Zb=(Zb*Yb+c)/(Yb+1),++Yb)}},200)):(g.wheelDX+=d,g.wheelDY+=f))}}function _b(a,b,c){if("string"==typeof b&&(b=ed[b],!b))return!1;a.display.pollingFast&&Ib(a)&&(a.display.pollingFast=!1);var d=a.doc,e=d.sel.shift,f=!1;try{Lb(a)&&(a.state.suppressEdits=!0),c&&(d.sel.shift=!1),f=b(a)!=Qe}finally{d.sel.shift=e,a.state.suppressEdits=!1}return f}function ac(a){var b=a.state.keyMaps.slice(0);return a.options.extraKeys&&b.push(a.options.extraKeys),b.push(a.options.keyMap),b}function cc(a,b){var c=gd(a.options.keyMap),e=c.auto;clearTimeout(bc),e&&!id(b)&&(bc=setTimeout(function(){gd(a.options.keyMap)==c&&(a.options.keyMap=e.call?e.call(null,a):e,C(a))},50));var f=jd(b,!0),g=!1;if(!f)return!1;var h=ac(a);return g=b.shiftKey?hd("Shift-"+f,h,function(b){return _b(a,b,!0)})||hd(f,h,function(b){return("string"==typeof b?/^go[A-Z]/.test(b):b.motion)?_b(a,b):void 0}):hd(f,h,function(b){return _b(a,b)}),g&&(Ae(b),$(a),d&&(b.oldKeyCode=b.keyCode,b.keyCode=0),Le(a,"keyHandled",a,f,b)),g}function dc(a,b,c){var d=hd("'"+c+"'",ac(a),function(b){return _b(a,b,!0)});return d&&(Ae(b),$(a),Le(a,"keyHandled",a,"'"+c+"'",b)),d}function fc(a){var c=this;if(c.state.focused||hc(c),b&&27==a.keyCode&&(a.returnValue=!1),!(Me(c,a)||c.options.onKeyEvent&&c.options.onKeyEvent(c,ze(a)))){var d=a.keyCode;c.doc.sel.shift=16==d||a.shiftKey;var e=cc(c,a);h&&(ec=e?d:null,!e&&88==d&&!sf&&(p?a.metaKey:a.ctrlKey)&&c.replaceSelection(""))}}function gc(a){var c=this;if(!(Me(c,a)||c.options.onKeyEvent&&c.options.onKeyEvent(c,ze(a)))){var e=a.keyCode,f=a.charCode;if(h&&e==ec)return ec=null,Ae(a),void 0;if(!(h&&(!a.which||a.which<10)||j)||!cc(c,a)){var g=String.fromCharCode(null==f?e:f);this.options.electricChars&&this.doc.mode.electricChars&&this.options.smartIndent&&!Lb(this)&&this.doc.mode.electricChars.indexOf(g)>-1&&setTimeout(Cb(c,function(){Pc(c,c.doc.sel.to.line,"smart")}),75),dc(c,a,g)||(b&&!d&&(c.display.inputHasSelection=null),Hb(c))}}}function hc(a){"nocursor"!=a.options.readOnly&&(a.state.focused||(Ie(a,"focus",a),a.state.focused=!0,-1==a.display.wrapper.className.search(/\bCodeMirror-focused\b/)&&(a.display.wrapper.className+=" CodeMirror-focused"),Jb(a,!0)),Gb(a),$(a))}function ic(a){a.state.focused&&(Ie(a,"blur",a),a.state.focused=!1,a.display.wrapper.className=a.display.wrapper.className.replace(" CodeMirror-focused","")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.doc.sel.shift=!1)},150)}function kc(a,c){function k(){if(null!=e.input.selectionStart){var a=e.input.value=" "+(xc(f.from,f.to)?"":e.input.value);e.prevInput=" ",e.input.selectionStart=1,e.input.selectionEnd=a.length}}function l(){if(e.inputDiv.style.position="relative",e.input.style.cssText=j,d&&(e.scrollbarV.scrollTop=e.scroller.scrollTop=i),Gb(a),null!=e.input.selectionStart){(!b||d)&&k(),clearTimeout(jc);var c=0,f=function(){" "==e.prevInput&&0==e.input.selectionStart?Cb(a,ed.selectAll)(a):c++<10?jc=setTimeout(f,500):Jb(a)};jc=setTimeout(f,200)}}var e=a.display,f=a.doc.sel;if(!Nb(e,c)){var g=Ob(a,c),i=e.scroller.scrollTop;if(g&&!h){(xc(f.from,f.to)||yc(g,f.from)||!yc(g,f.to))&&Cb(a,Gc)(a.doc,g,g);var j=e.input.style.cssText;if(e.inputDiv.style.position="absolute",e.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(c.clientY-5)+"px; left: "+(c.clientX-5)+"px; z-index: 1000; background: white; outline: none;"+"border-width: 0; outline: none; overflow: hidden; opacity: .05; -ms-opacity: .05; filter: alpha(opacity=5);",Kb(a),Jb(a,!0),xc(f.from,f.to)&&(e.input.value=e.prevInput=" "),b&&!d&&k(),t){De(c);var m=function(){He(window,"mouseup",m),setTimeout(l,20)};Ge(window,"mouseup",m)}else setTimeout(l,50)}}}function mc(a,b,c){if(!yc(b.from,c))return Bc(a,c);var d=b.text.length-1-(b.to.line-b.from.line);if(c.line>b.to.line+d){var e=c.line-d,f=a.first+a.size-1;return e>f?wc(f,ge(a,f).text.length):Cc(c,ge(a,e).text.length)}if(c.line==b.to.line+d)return Cc(c,Ve(b.text).length+(1==b.text.length?b.from.ch:0)+ge(a,b.to.line).text.length-b.to.ch);var g=c.line-b.from.line;return Cc(c,b.text[g].length+(g?0:b.from.ch))}function nc(a,b,c){if(c&&"object"==typeof c)return{anchor:mc(a,b,c.anchor),head:mc(a,b,c.head)};if("start"==c)return{anchor:b.from,head:b.from};var d=lc(b);if("around"==c)return{anchor:b.from,head:d};if("end"==c)return{anchor:d,head:d};var e=function(a){if(yc(a,b.from))return a;if(!yc(b.to,a))return d;var c=a.line+b.text.length-(b.to.line-b.from.line)-1,e=a.ch;return a.line==b.to.line&&(e+=d.ch-b.to.ch),wc(c,e)};return{anchor:e(a.sel.anchor),head:e(a.sel.head)}}function oc(a,b,c){var d={canceled:!1,from:b.from,to:b.to,text:b.text,origin:b.origin,cancel:function(){this.canceled=!0}};return c&&(d.update=function(b,c,d,e){b&&(this.from=Bc(a,b)),c&&(this.to=Bc(a,c)),d&&(this.text=d),void 0!==e&&(this.origin=e)}),Ie(a,"beforeChange",a,d),a.cm&&Ie(a.cm,"beforeChange",a.cm,d),d.canceled?null:{from:d.from,to:d.to,text:d.text,origin:d.origin}}function pc(a,b,c,d){if(a.cm){if(!a.cm.curOp)return Cb(a.cm,pc)(a,b,c,d);if(a.cm.state.suppressEdits)return}if(!(Oe(a,"beforeChange")||a.cm&&Oe(a.cm,"beforeChange"))||(b=oc(a,b,!0))){var e=u&&!d&&wd(a,b.from,b.to);if(e){for(var f=e.length-1;f>=1;--f)qc(a,{from:e[f].from,to:e[f].to,text:[""]});e.length&&qc(a,{from:e[0].from,to:e[0].to,text:b.text},c)}else qc(a,b,c)}}function qc(a,b,c){var d=nc(a,b,c);re(a,b,d,a.cm?a.cm.curOp.id:0/0),tc(a,b,d,ud(a,b));var e=[];ee(a,function(a,c){c||-1!=Xe(e,a.history)||(xe(a.history,b),e.push(a.history)),tc(a,b,null,ud(a,b))})}function rc(a,b){if(!a.cm||!a.cm.state.suppressEdits){var c=a.history,d=("undo"==b?c.done:c.undone).pop();if(d){var e={changes:[],anchorBefore:d.anchorAfter,headBefore:d.headAfter,anchorAfter:d.anchorBefore,headAfter:d.headBefore,generation:c.generation};("undo"==b?c.undone:c.done).push(e),c.generation=d.generation||++c.maxGeneration;for(var f=Oe(a,"beforeChange")||a.cm&&Oe(a.cm,"beforeChange"),g=d.changes.length-1;g>=0;--g){var h=d.changes[g];if(h.origin=b,f&&!oc(a,h,!1))return("undo"==b?c.done:c.undone).length=0,void 0;e.changes.push(qe(a,h));var i=g?nc(a,h,null):{anchor:d.anchorBefore,head:d.headBefore};tc(a,h,i,vd(a,h));var j=[];ee(a,function(a,b){b||-1!=Xe(j,a.history)||(xe(a.history,h),j.push(a.history)),tc(a,h,null,vd(a,h))})}}}}function sc(a,b){function c(a){return wc(a.line+b,a.ch)}a.first+=b,a.cm&&Fb(a.cm,a.first,a.first,b),a.sel.head=c(a.sel.head),a.sel.anchor=c(a.sel.anchor),a.sel.from=c(a.sel.from),a.sel.to=c(a.sel.to)}function tc(a,b,c,d){if(a.cm&&!a.cm.curOp)return Cb(a.cm,tc)(a,b,c,d);if(b.to.linea.lastLine())){if(b.from.linef&&(b={from:b.from,to:wc(f,ge(a,f).text.length),text:[b.text[0]],origin:b.origin}),b.removed=he(a,b.from,b.to),c||(c=nc(a,b,null)),a.cm?uc(a.cm,b,d,c):Zd(a,b,d,c)}}function uc(a,b,c,d){var e=a.doc,f=a.display,g=b.from,h=b.to,i=!1,j=g.line;a.options.lineWrapping||(j=ke(Ad(e,ge(e,g.line))),e.iter(j,h.line+1,function(a){return a==f.maxLine?(i=!0,!0):void 0})),yc(e.sel.head,b.from)||yc(b.to,e.sel.head)||(a.curOp.cursorActivity=!0),Zd(e,b,c,d,A(a)),a.options.lineWrapping||(e.iter(j,g.line+b.text.length,function(a){var b=G(e,a);b>f.maxLineLength&&(f.maxLine=a,f.maxLineLength=b,f.maxLineChanged=!0,i=!1)}),i&&(a.curOp.updateMaxLine=!0)),e.frontier=Math.min(e.frontier,g.line),_(a,400);var k=b.text.length-(h.line-g.line)-1;if(Fb(a,g.line,h.line+1,k),Oe(a,"change")){var l={from:g,to:h,text:b.text,removed:b.removed,origin:b.origin};if(a.curOp.textChanged){for(var m=a.curOp.textChanged;m.next;m=m.next);m.next=l}else a.curOp.textChanged=l}}function vc(a,b,c,d,e){if(d||(d=c),yc(d,c)){var f=d;d=c,c=f}"string"==typeof b&&(b=qf(b)),pc(a,{from:c,to:d,text:b,origin:e},null)}function wc(a,b){return this instanceof wc?(this.line=a,this.ch=b,void 0):new wc(a,b)}function xc(a,b){return a.line==b.line&&a.ch==b.ch}function yc(a,b){return a.linec?wc(c,ge(a,c).text.length):Cc(b,ge(a,b.line).text.length)}function Cc(a,b){var c=a.ch;return null==c||c>b?wc(a.line,b):0>c?wc(a.line,0):a}function Dc(a,b){return b>=a.first&&b=f.ch:j.to>f.ch))){if(d&&(Ie(k,"beforeCursorEnter"),k.explicitlyCleared)){if(h.markedSpans){--i;continue}break}if(!k.atomic)continue;var l=k.find()[0>g?"from":"to"];if(xc(l,f)&&(l.ch+=g,l.ch<0?l=l.line>a.first?Bc(a,wc(l.line-1)):null:l.ch>h.text.length&&(l=l.line(window.innerHeight||document.documentElement.clientHeight)&&(e=!1),null!=e&&!m){var f="none"==c.cursor.style.display;f&&(c.cursor.style.display="",c.cursor.style.left=b.left+"px",c.cursor.style.top=b.top-c.viewOffset+"px"),c.cursor.scrollIntoView(e),f&&(c.cursor.style.display="none")}}}function Kc(a,b,c){for(null==c&&(c=0);;){var d=!1,e=sb(a,b),f=Mc(a,e.left,e.top-c,e.left,e.bottom+c),g=a.doc.scrollTop,h=a.doc.scrollLeft;if(null!=f.scrollTop&&(Wb(a,f.scrollTop),Math.abs(a.doc.scrollTop-g)>1&&(d=!0)),null!=f.scrollLeft&&(Xb(a,f.scrollLeft),Math.abs(a.doc.scrollLeft-h)>1&&(d=!0)),!d)return e}}function Lc(a,b,c,d,e){var f=Mc(a,b,c,d,e);null!=f.scrollTop&&Wb(a,f.scrollTop),null!=f.scrollLeft&&Xb(a,f.scrollLeft)}function Mc(a,b,c,d,e){var f=a.display,g=xb(a.display);0>c&&(c=0);var h=f.scroller.clientHeight-Pe,i=f.scroller.scrollTop,j={},k=a.doc.height+eb(f),l=g>c,m=e>k-g;if(i>c)j.scrollTop=l?0:c;else if(e>i+h){var n=Math.min(c,(m?k:e)-h);n!=i&&(j.scrollTop=n)}var o=f.scroller.clientWidth-Pe,p=f.scroller.scrollLeft;b+=f.gutters.offsetWidth,d+=f.gutters.offsetWidth;var q=f.gutters.offsetWidth,r=q+10>b;return p+q>b||r?(r&&(b=0),j.scrollLeft=Math.max(0,b-10-q)):d>o+p-3&&(j.scrollLeft=d+10-o),j}function Nc(a,b,c){a.curOp.updateScrollPos={scrollLeft:null==b?a.doc.scrollLeft:b,scrollTop:null==c?a.doc.scrollTop:c}}function Oc(a,b,c){var d=a.curOp.updateScrollPos||(a.curOp.updateScrollPos={scrollLeft:a.doc.scrollLeft,scrollTop:a.doc.scrollTop}),e=a.display.scroller;d.scrollTop=Math.max(0,Math.min(e.scrollHeight-e.clientHeight,d.scrollTop+c)),d.scrollLeft=Math.max(0,Math.min(e.scrollWidth-e.clientWidth,d.scrollLeft+b))}function Pc(a,b,c,d){var e=a.doc;if(null==c&&(c="add"),"smart"==c)if(a.doc.mode.indent)var f=cb(a,b);else c="prev";var k,g=a.options.tabSize,h=ge(e,b),i=Se(h.text,null,g),j=h.text.match(/^\s*/)[0];if("smart"==c&&(k=a.doc.mode.indent(f,h.text.slice(j.length),h.text),k==Qe)){if(!d)return;c="prev"}"prev"==c?k=b>e.first?Se(ge(e,b-1).text,null,g):0:"add"==c?k=i+a.options.indentUnit:"subtract"==c?k=i-a.options.indentUnit:"number"==typeof c&&(k=i+c),k=Math.max(0,k);var l="",m=0;if(a.options.indentWithTabs)for(var n=Math.floor(k/g);n;--n)m+=g,l+=" ";k>m&&(l+=Ue(k-m)),l!=j&&vc(a.doc,l,wc(b,0),wc(b,j.length),"+input"),h.stateAfter=null}function Qc(a,b,c){var d=b,e=b,f=a.doc;return"number"==typeof b?e=ge(f,Ac(f,b)):d=ke(b),null==d?null:c(e,d)?(Fb(a,d,d+1),e):null}function Rc(a,b,c,d,e){function k(){var b=f+c;return b=a.first+a.size?j=!1:(f=b,i=ge(a,b))}function l(a){var b=(e?Ff:Gf)(i,g,c,!0);if(null==b){if(a||!k())return j=!1;g=e?(0>c?yf:xf)(i):0>c?i.text.length:0}else g=b;return!0}var f=b.line,g=b.ch,h=c,i=ge(a,f),j=!0;if("char"==d)l();else if("column"==d)l(!0);else if("word"==d||"group"==d)for(var m=null,n="group"==d,o=!0;!(0>c)||l(!o);o=!1){var p=i.text.charAt(g)||"\n",q=bf(p)?"w":n?/\s/.test(p)?null:"p":null;if(m&&m!=q){0>c&&(c=1,l());break}if(q&&(m=q),c>0&&!l(!o))break}var r=Ic(a,wc(f,g),h,!0);return j||(r.hitSide=!0),r}function Sc(a,b,c,d){var g,e=a.doc,f=b.left;if("page"==d){var h=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);g=b.top+c*(h-(0>c?1.5:.5)*xb(a.display))}else"line"==d&&(g=c>0?b.bottom+3:b.top-3);for(;;){var i=ub(a,f,g);if(!i.outside)break;if(0>c?0>=g:g>=e.height){i.hitSide=!0;break}g+=5*c}return i}function Tc(a,b){var c=b.ch,d=b.ch;if(a){(b.xRel<0||d==a.length)&&c?--c:++d;for(var e=a.charAt(c),f=bf(e)?bf:/\s/.test(e)?function(a){return/\s/.test(a)}:function(a){return!/\s/.test(a)&&!bf(a)};c>0&&f(a.charAt(c-1));)--c;for(;dg;++g){var i=d(f[g]);if(i)return i}return!1}for(var e=0;e=b:f.to>b);(e||(e=[])).push({from:f.from,to:i?null:f.to,marker:g})}}return e}function td(a,b,c){if(a)for(var e,d=0;d=b:f.to>b);if(h||"bookmark"==g.type&&f.from==b&&(!c||f.marker.insertLeft)){var i=null==f.from||(g.inclusiveLeft?f.from<=b:f.from0&&h)for(var l=0;ll;++l)o.push(q);o.push(i)}return o}function vd(a,b){var c=te(a,b),d=ud(a,b);if(!c)return d;if(!d)return c;for(var e=0;eb)&&(!d||d.widtha.options.maxHighlightLength?(f=!1,i.pos=Math.min(b.length,i.start+5e4),j=null):j=c.token(i,d),f&&h==j||(gh;){var e=d[g];e>a&&d.splice(g,1,a,d[g+1],e),g+=2,h=Math.min(a,e)}if(b)if(f.opaque)d.splice(c,g-c,a,b),g=c+2;else for(;g>c;c+=2){var i=d[c+1];d[c+1]=i?i+" "+b:b}})}return d}function Od(a,b){return b.styles&&b.styles[0]==a.state.modeGen||(b.styles=Nd(a,b,b.stateAfter=cb(a,ke(b)))),b.styles}function Pd(a,b,c){var d=a.doc.mode,e=new kd(b.text,a.options.tabSize);for(""==b.text&&d.blankLine&&d.blankLine(c);!e.eol()&&e.pos<=a.options.maxHighlightLength;)d.token(e,c),e.start=e.pos}function Rd(a){return a?Qd[a]||(Qd[a]="cm-"+a.replace(/ +/g," cm-")):null}function Sd(a,c,d){for(var f,g=c,h=!0;f=yd(g);)g=ge(a.doc,f.find().from.line);var i={pre:ef("pre"),col:0,pos:0,display:!d,measure:null,measuredSomething:!1,cm:a};g.textClass&&(i.pre.className=g.textClass);do{g.text&&(h=!1),i.measure=g==c&&d,i.pos=0,i.addToken=i.measure?Vd:Ud,(b||e)&&a.getOption("lineWrapping")&&(i.addToken=Wd(i.addToken));var j=Yd(g,i,Od(a,g));d&&g==c&&!i.measuredSomething&&(d[0]=i.pre.appendChild(pf(a.display.measure)),i.measuredSomething=!0),j&&(g=ge(a.doc,j.to.line))}while(j);!d||i.measuredSomething||d[0]||(d[0]=i.pre.appendChild(h?ef("span","\xa0"):pf(a.display.measure))),i.pre.firstChild||Bd(a.doc,c)||i.pre.appendChild(document.createTextNode("\xa0"));var k;if(d&&b&&(k=ne(g))){var l=k.length-1;k[l].from==k[l].to&&--l;var m=k[l],n=k[l-1];if(m.from+1==m.to&&n&&m.level="\ud800"&&"\udbff">i&&hi)?(null!=s.to&&l>s.to&&(l=s.to,n=""),t.className&&(m+=" "+t.className),t.startStyle&&s.from==i&&(o+=" "+t.startStyle),t.endStyle&&s.to==l&&(n+=" "+t.endStyle),t.collapsed&&(!p||p.marker.sizei&&l>s.from&&(l=s.from),"bookmark"==t.type&&s.from==i&&t.replacedWith&&(q=t)}if(p&&(p.from||0)==i&&(Xd(b,(null==p.to?h:p.to)-i,p.marker,null==p.from),null==p.to))return p.marker.find();q&&!p&&Xd(b,0,q)}if(i>=h)break;for(var u=Math.min(h,l);;){if(j){var v=i+j.length;if(!p){var w=v>u?j.slice(0,u-i):j;b.addToken(b,w,k?k+m:m,o,i+w.length==l?n:"")}if(v>=u){j=j.slice(u-i),i=u;break}i=v,o=""}j=e.slice(f,f=c[g++]),k=Rd(c[g++])}}else for(var g=1;gp;++p)r.push(Jd(j[p],f(p),e));g(l,l.text,n),o&&a.remove(h.line,o),r.length&&a.insert(h.line,r)}else if(k==l)if(1==j.length)g(k,k.text.slice(0,h.ch)+m+k.text.slice(i.ch),n);else{for(var r=[],p=1,q=j.length-1;q>p;++p)r.push(Jd(j[p],f(p),e));r.push(Jd(m+k.text.slice(i.ch),n,e)),g(k,k.text.slice(0,h.ch)+j[0],f(0)),a.insert(h.line+1,r)}else if(1==j.length)g(k,k.text.slice(0,h.ch)+j[0]+l.text.slice(i.ch),f(0)),a.remove(h.line+1,o);else{g(k,k.text.slice(0,h.ch)+j[0],f(0)),g(l,m+l.text.slice(i.ch),n);for(var p=1,q=j.length-1,r=[];q>p;++p)r.push(Jd(j[p],f(p),e));o>1&&a.remove(h.line+1,o-1),a.insert(h.line+1,r)}Le(a,"change",a,b),Gc(a,d.anchor,d.head,null,!0)}function $d(a){this.lines=a,this.parent=null;for(var b=0,c=a.length,d=0;c>b;++b)a[b].parent=this,d+=a[b].height;this.height=d}function _d(a){this.children=a;for(var b=0,c=0,d=0,e=a.length;e>d;++d){var f=a[d];b+=f.chunkSize(),c+=f.height,f.parent=this}this.size=b,this.height=c,this.parent=null}function ee(a,b,c){function d(a,e,f){if(a.linked)for(var g=0;gb){a=d;break}b-=e}return a.lines[b]}function he(a,b,c){var d=[],e=b.line;return a.iter(b.line,c.line+1,function(a){var f=a.text;e==c.line&&(f=f.slice(0,c.ch)),e==b.line&&(f=f.slice(b.ch)),d.push(f),++e}),d}function ie(a,b,c){var d=[];return a.iter(b,c,function(a){d.push(a.text)}),d}function je(a,b){for(var c=b-a.height,d=a;d;d=d.parent)d.height+=c}function ke(a){if(null==a.parent)return null;for(var b=a.parent,c=Xe(b.lines,a),d=b.parent;d;b=d,d=d.parent)for(var e=0;d.children[e]!=b;++e)c+=d.children[e].chunkSize();return c+b.first}function le(a,b){var c=a.first;a:do{for(var d=0,e=a.children.length;e>d;++d){var f=a.children[d],g=f.height; -if(g>b){a=f;continue a}b-=g,c+=f.chunkSize()}return c}while(!a.lines);for(var d=0,e=a.lines.length;e>d;++d){var h=a.lines[d],i=h.height;if(i>b)break;b-=i}return c+d}function me(a,b){b=Ad(a.doc,b);for(var c=0,d=b.parent,e=0;ef-a.cm.options.historyEventDelay||"*"==b.origin.charAt(0)))){var h=Ve(g.changes);xc(b.from,b.to)&&xc(b.from,h.to)?h.to=lc(b):g.changes.push(qe(a,b)),g.anchorAfter=c.anchor,g.headAfter=c.head}else for(g={changes:[qe(a,b)],generation:e.generation,anchorBefore:a.sel.anchor,headBefore:a.sel.head,anchorAfter:c.anchor,headAfter:c.head},e.done.push(g),e.generation=++e.maxGeneration;e.done.length>e.undoDepth;)e.done.shift();e.lastTime=f,e.lastOp=d,e.lastOrigin=b.origin}function se(a){if(!a)return null;for(var c,b=0;b-1&&(Ve(g)[k]=i[k],delete i[k])}}return d}function ve(a,b,c,d){c0}function Re(){this.id=null}function Se(a,b,c,d,e){null==b&&(b=a.search(/[^\s\u00a0]/),-1==b&&(b=a.length));for(var f=d||0,g=e||0;b>f;++f)" "==a.charAt(f)?g+=c-g%c:++g;return g}function Ue(a){for(;Te.length<=a;)Te.push(Ve(Te)+" ");return Te[a]}function Ve(a){return a[a.length-1]}function We(a){if(n)a.selectionStart=0,a.selectionEnd=a.value.length;else try{a.select()}catch(b){}}function Xe(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;d>c;++c)if(a[c]==b)return c;return-1}function Ye(a,b){function c(){}c.prototype=a;var d=new c;return b&&Ze(b,d),d}function Ze(a,b){b||(b={});for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function $e(a){for(var b=[],c=0;a>c;++c)b.push(void 0);return b}function _e(a){var b=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,b)}}function bf(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||af.test(a))}function cf(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}function ef(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),"string"==typeof b)hf(e,b);else if(b)for(var f=0;f0;--b)a.removeChild(a.firstChild);return a}function gf(a,b){return ff(a).appendChild(b)}function hf(a,b){d?(a.innerHTML="",a.appendChild(document.createTextNode(b))):a.textContent=b}function jf(a){return a.getBoundingClientRect()}function lf(){return!1}function nf(a){if(null!=mf)return mf;var b=ef("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");return gf(a,b),b.offsetWidth&&(mf=b.offsetHeight-b.clientHeight),mf||0}function pf(a){if(null==of){var b=ef("span","\u200b");gf(a,ef("span",[b,document.createTextNode("x")])),0!=a.firstChild.offsetHeight&&(of=b.offsetWidth<=1&&b.offsetHeight>2&&!c)}return of?ef("span","\u200b"):ef("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px")}function uf(a,b,c,d){if(!a)return d(b,c,"ltr");for(var e=0;eb||b==c&&f.to==b)&&d(Math.max(f.from,b),Math.min(f.to,c),1==f.level?"rtl":"ltr")}}function vf(a){return a.level%2?a.to:a.from}function wf(a){return a.level%2?a.from:a.to}function xf(a){var b=ne(a);return b?vf(b[0]):0}function yf(a){var b=ne(a);return b?wf(Ve(b)):a.text.length}function zf(a,b){var c=ge(a.doc,b),d=Ad(a.doc,c);d!=c&&(b=ke(d));var e=ne(d),f=e?e[0].level%2?yf(d):xf(d):0;return wc(b,f)}function Af(a,b){for(var c,d;c=zd(d=ge(a.doc,b));)b=c.find().to.line;var e=ne(d),f=e?e[0].level%2?xf(d):yf(d):d.text.length;return wc(b,f)}function Bf(a,b,c){var d=a[0].level;return b==d?!0:c==d?!1:c>b}function Df(a,b){for(var d,c=0;cb)return Cf=null,c;if(e.from==b||e.to==b){if(null!=d)return Bf(a,e.level,a[d].level)?(Cf=d,c):(Cf=c,d);d=c}}return Cf=null,d}function Ef(a,b,c,d){if(!d)return b+c;do b+=c;while(b>0&&df.test(a.text.charAt(b)));return b}function Ff(a,b,c,d){var e=ne(a);if(!e)return Gf(a,b,c,d);for(var f=Df(e,b),g=e[f],h=Ef(a,b,g.level%2?-c:c,d);;){if(h>g.from&&h0==g.level%2?g.to:g.from);if(g=e[f+=c],!g)return null;h=c>0==g.level%2?Ef(a,g.to,-1,d):Ef(a,g.from,1,d)}}function Gf(a,b,c,d){var e=b+c;if(d)for(;e>0&&df.test(a.text.charAt(e));)e+=c;return 0>e||e>a.text.length?null:e}var a=/gecko\/\d/i.test(navigator.userAgent),b=/MSIE \d/.test(navigator.userAgent),c=b&&(null==document.documentMode||document.documentMode<8),d=b&&(null==document.documentMode||document.documentMode<9),e=/WebKit\//.test(navigator.userAgent),f=e&&/Qt\/\d+\.\d+/.test(navigator.userAgent),g=/Chrome\//.test(navigator.userAgent),h=/Opera\//.test(navigator.userAgent),i=/Apple Computer/.test(navigator.vendor),j=/KHTML\//.test(navigator.userAgent),k=/Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent),l=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),m=/PhantomJS/.test(navigator.userAgent),n=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),o=n||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),p=n||/Mac/.test(navigator.platform),q=/windows/i.test(navigator.platform),r=h&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);r&&(r=Number(r[1]));var wb,Pb,Qb,s=p&&(f||h&&(null==r||12.11>r)),t=a||b&&!d,u=!1,v=!1,zb=0,Tb=0,Yb=0,Zb=null;b?Zb=-.53:a?Zb=15:g?Zb=-.7:i&&(Zb=-1/3);var bc,jc,ec=null,lc=w.changeEnd=function(a){return a.text?wc(a.from.line+a.text.length-1,Ve(a.text).length+(1==a.text.length?a.from.ch:0)):a.to};w.Pos=wc,w.prototype={constructor:w,focus:function(){window.focus(),Kb(this),hc(this),Hb(this)},setOption:function(a,b){var c=this.options,d=c[a];(c[a]!=b||"mode"==a)&&(c[a]=b,Vc.hasOwnProperty(a)&&Cb(this,Vc[a])(this,b,d))},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},addKeyMap:function(a,b){this.state.keyMaps[b?"push":"unshift"](a)},removeKeyMap:function(a){for(var b=this.state.keyMaps,c=0;c=d;++d)Pc(this,d,a)}),getTokenAt:function(a,b){var c=this.doc;a=Bc(c,a);for(var d=cb(this,a.line,b),e=this.doc.mode,f=ge(c,a.line),g=new kd(f.text,this.options.tabSize);g.pos>1;if((f?b[2*f-1]:0)>=e)d=f;else{if(!(b[2*f+1]d&&(a=d,c=!0);var e=ge(this.doc,a);return pb(this,ge(this.doc,a),{top:0,left:0},b||"page").top+(c?e.height:0)},defaultTextHeight:function(){return xb(this.display)},defaultCharWidth:function(){return yb(this.display)},setGutterMarker:Cb(null,function(a,b,c){return Qc(this,a,function(a){var d=a.gutterMarkers||(a.gutterMarkers={});return d[b]=c,!c&&cf(d)&&(a.gutterMarkers=null),!0})}),clearGutter:Cb(null,function(a){var b=this,c=b.doc,d=c.first;c.iter(function(c){c.gutterMarkers&&c.gutterMarkers[a]&&(c.gutterMarkers[a]=null,Fb(b,d,d+1),cf(c.gutterMarkers)&&(c.gutterMarkers=null)),++d})}),addLineClass:Cb(null,function(a,b,c){return Qc(this,a,function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"wrapClass";if(a[d]){if(new RegExp("(?:^|\\s)"+c+"(?:$|\\s)").test(a[d]))return!1;a[d]+=" "+c}else a[d]=c;return!0})}),removeLineClass:Cb(null,function(a,b,c){return Qc(this,a,function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"wrapClass",e=a[d];if(!e)return!1;if(null==c)a[d]=null;else{var f=e.match(new RegExp("(?:^|\\s+)"+c+"(?:$|\\s+)"));if(!f)return!1;var g=f.index+f[0].length;a[d]=e.slice(0,f.index)+(f.index&&g!=e.length?" ":"")+e.slice(g)||null}return!0})}),addLineWidget:Cb(null,function(a,b,c){return Id(this,a,b,c)}),removeLineWidget:function(a){a.clear()},lineInfo:function(a){if("number"==typeof a){if(!Dc(this.doc,a))return null;var b=a;if(a=ge(this.doc,a),!a)return null}else{var b=ke(a);if(null==b)return null}return{line:b,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},getViewport:function(){return{from:this.display.showingFrom,to:this.display.showingTo}},addWidget:function(a,b,c,d,e){var f=this.display;a=sb(this,Bc(this.doc,a));var g=a.bottom,h=a.left;if(b.style.position="absolute",f.sizer.appendChild(b),"over"==d)g=a.top;else if("above"==d||"near"==d){var i=Math.max(f.wrapper.clientHeight,this.doc.height),j=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);("above"==d||a.bottom+b.offsetHeight>i)&&a.top>b.offsetHeight?g=a.top-b.offsetHeight:a.bottom+b.offsetHeight<=i&&(g=a.bottom),h+b.offsetWidth>j&&(h=j-b.offsetWidth)}b.style.top=g+"px",b.style.left=b.style.right="","right"==e?(h=f.sizer.clientWidth-b.offsetWidth,b.style.right="0px"):("left"==e?h=0:"middle"==e&&(h=(f.sizer.clientWidth-b.offsetWidth)/2),b.style.left=h+"px"),c&&Lc(this,h,g,h+b.offsetWidth,g+b.offsetHeight)},triggerOnKeyDown:Cb(null,fc),execCommand:function(a){return ed[a](this)},findPosH:function(a,b,c,d){var e=1;0>b&&(e=-1,b=-b);for(var f=0,g=Bc(this.doc,a);b>f&&(g=Rc(this.doc,g,e,c,d),!g.hitSide);++f);return g},moveH:Cb(null,function(a,b){var d,c=this.doc.sel;d=c.shift||c.extend||xc(c.from,c.to)?Rc(this.doc,c.head,a,b,this.options.rtlMoveVisually):0>a?c.from:c.to,Ec(this.doc,d,d,a)}),deleteH:Cb(null,function(a,b){var c=this.doc.sel;xc(c.from,c.to)?vc(this.doc,"",c.from,Rc(this.doc,c.head,a,b,!1),"+delete"):vc(this.doc,"",c.from,c.to,"+delete"),this.curOp.userSelChange=!0}),findPosV:function(a,b,c,d){var e=1,f=d;0>b&&(e=-1,b=-b);for(var g=0,h=Bc(this.doc,a);b>g;++g){var i=sb(this,h,"div");if(null==f?f=i.left:i.left=f,h=Sc(this,i,e,c),h.hitSide)break}return h},moveV:Cb(null,function(a,b){var c=this.doc.sel,d=sb(this,c.head,"div");null!=c.goalColumn&&(d.left=c.goalColumn);var e=Sc(this,d,a,b);"page"==b&&Oc(this,0,rb(this,e,"div").top-d.top),Ec(this.doc,e,e,a),c.goalColumn=d.left}),toggleOverwrite:function(a){(null==a||a!=this.state.overwrite)&&((this.state.overwrite=!this.state.overwrite)?this.display.cursor.className+=" CodeMirror-overwrite":this.display.cursor.className=this.display.cursor.className.replace(" CodeMirror-overwrite",""))},hasFocus:function(){return this.state.focused},scrollTo:Cb(null,function(a,b){Nc(this,a,b)}),getScrollInfo:function(){var a=this.display.scroller,b=Pe;return{left:a.scrollLeft,top:a.scrollTop,height:a.scrollHeight-b,width:a.scrollWidth-b,clientHeight:a.clientHeight-b,clientWidth:a.clientWidth-b}},scrollIntoView:Cb(null,function(a,b){"number"==typeof a&&(a=wc(a,0)),b||(b=0);var c=a;a&&null==a.line||(this.curOp.scrollToPos=a?Bc(this.doc,a):this.doc.sel.head,this.curOp.scrollToPosMargin=b,c=sb(this,this.curOp.scrollToPos));var d=Mc(this,c.left,c.top-b,c.right,c.bottom+b);Nc(this,d.scrollLeft,d.scrollTop)}),setSize:function(a,b){function c(a){return"number"==typeof a||/^\d+$/.test(String(a))?a+"px":a}null!=a&&(this.display.wrapper.style.width=c(a)),null!=b&&(this.display.wrapper.style.height=c(b)),this.refresh()},on:function(a,b){Ge(this,a,b)},off:function(a,b){He(this,a,b)},operation:function(a){return Eb(this,a)},refresh:Cb(null,function(){mb(this),Nc(this,this.doc.scrollLeft,this.doc.scrollTop),Fb(this)}),swapDoc:Cb(null,function(a){var b=this.doc;return b.cm=null,fe(this,a),mb(this),Jb(this,!0),Nc(this,a.scrollLeft,a.scrollTop),b}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}};var Vc=w.optionHandlers={},Wc=w.defaults={},Yc=w.Init={toString:function(){return"CodeMirror.Init"}};Xc("value","",function(a,b){a.setValue(b)},!0),Xc("mode",null,function(a,b){a.doc.modeOption=b,y(a)},!0),Xc("indentUnit",2,y,!0),Xc("indentWithTabs",!1),Xc("smartIndent",!0),Xc("tabSize",4,function(a){y(a),mb(a),Fb(a)},!0),Xc("electricChars",!0),Xc("rtlMoveVisually",!q),Xc("theme","default",function(a){D(a),E(a)},!0),Xc("keyMap","default",C),Xc("extraKeys",null),Xc("onKeyEvent",null),Xc("onDragEvent",null),Xc("lineWrapping",!1,z,!0),Xc("gutters",[],function(a){I(a.options),E(a)},!0),Xc("fixedGutter",!0,function(a,b){a.display.gutters.style.left=b?O(a.display)+"px":"0",a.refresh()},!0),Xc("coverGutterNextToScrollbar",!1,J,!0),Xc("lineNumbers",!1,function(a){I(a.options),E(a)},!0),Xc("firstLineNumber",1,E,!0),Xc("lineNumberFormatter",function(a){return a},E,!0),Xc("showCursorWhenSelecting",!1,X,!0),Xc("readOnly",!1,function(a,b){"nocursor"==b?(ic(a),a.display.input.blur()):b||Jb(a,!0)}),Xc("dragDrop",!0),Xc("cursorBlinkRate",530),Xc("cursorScrollMargin",0),Xc("cursorHeight",1),Xc("workTime",100),Xc("workDelay",100),Xc("flattenSpans",!0),Xc("pollInterval",100),Xc("undoDepth",40,function(a,b){a.doc.history.undoDepth=b}),Xc("historyEventDelay",500),Xc("viewportMargin",10,function(a){a.refresh()},!0),Xc("maxHighlightLength",1e4,function(a){y(a),a.refresh()},!0),Xc("moveInputWithCursor",!0,function(a,b){b||(a.display.inputDiv.style.top=a.display.inputDiv.style.left=0)}),Xc("tabindex",null,function(a,b){a.display.input.tabIndex=b||""}),Xc("autofocus",null);var Zc=w.modes={},$c=w.mimeModes={};w.defineMode=function(a,b){if(w.defaults.mode||"null"==a||(w.defaults.mode=a),arguments.length>2){b.dependencies=[];for(var c=2;c0&&b.ch=this.string.length},sol:function(){return 0==this.pos},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.posb},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){var b=this.string.indexOf(a,this.pos);return b>-1?(this.pos=b,!0):void 0},backUp:function(a){this.pos-=a},column:function(){return this.lastColumnPos0?null:(f&&b!==!1&&(this.pos+=f[0].length),f)}var d=function(a){return c?a.toLowerCase():a},e=this.string.substr(this.pos,a.length);return d(e)==d(a)?(b!==!1&&(this.pos+=a.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)}},w.StringStream=kd,w.TextMarker=ld,ld.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,b=a&&!a.curOp;b&&Ab(a);for(var c=null,d=null,e=0;ea.display.maxLineLength&&(a.display.maxLine=h,a.display.maxLineLength=i,a.display.maxLineChanged=!0)}null!=c&&a&&Fb(a,c,d+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Hc(a)),b&&Bb(a),Le(this,"clear")}},ld.prototype.find=function(){for(var a,b,c=0;c=b.display.showingFrom&&a.from.linec;++c){var e=this.lines[c];this.height-=e.height,Ld(e),Le(e,"delete")}this.lines.splice(a,b)},collapse:function(a){a.splice.apply(a,[a.length,0].concat(this.lines))},insertInner:function(a,b,c){this.height+=c,this.lines=this.lines.slice(0,a).concat(b).concat(this.lines.slice(a));for(var d=0,e=b.length;e>d;++d)b[d].parent=this},iterN:function(a,b,c){for(var d=a+b;d>a;++a)if(c(this.lines[a]))return!0}},_d.prototype={chunkSize:function(){return this.size},removeInner:function(a,b){this.size-=b;for(var c=0;ca){var f=Math.min(b,e-a),g=d.height;if(d.removeInner(a,f),this.height-=g-d.height,e==f&&(this.children.splice(c--,1),d.parent=null),0==(b-=f))break;a=0}else a-=e}if(this.size-b<25){var h=[];this.collapse(h),this.children=[new $d(h)],this.children[0].parent=this}},collapse:function(a){for(var b=0,c=this.children.length;c>b;++b)this.children[b].collapse(a)},insertInner:function(a,b,c){this.size+=b.length,this.height+=c;for(var d=0,e=this.children.length;e>d;++d){var f=this.children[d],g=f.chunkSize();if(g>=a){if(f.insertInner(a,b,c),f.lines&&f.lines.length>50){for(;f.lines.length>50;){var h=f.lines.splice(f.lines.length-25,25),i=new $d(h);f.height-=i.height,this.children.splice(d+1,0,i),i.parent=this}this.maybeSpill()}break}a-=g}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var b=a.children.splice(a.children.length-5,5),c=new _d(b);if(a.parent){a.size-=c.size,a.height-=c.height;var e=Xe(a.parent.children,a);a.parent.children.splice(e+1,0,c)}else{var d=new _d(a.children);d.parent=a,a.children=[d,c],a=d}c.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,b,c){for(var d=0,e=this.children.length;e>d;++d){var f=this.children[d],g=f.chunkSize();if(g>a){var h=Math.min(b,g-a);if(f.iterN(a,h,c))return!0;if(0==(b-=h))break;a=0}else a-=g}}};var ae=0,be=w.Doc=function(a,b,c){if(!(this instanceof be))return new be(a,b,c);null==c&&(c=0),_d.call(this,[new $d([Jd("",null)])]),this.first=c,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.history=oe(),this.cleanGeneration=1,this.frontier=c;var d=wc(c,0);this.sel={from:d,to:d,head:d,anchor:d,shift:!1,extend:!1,goalColumn:null},this.id=++ae,this.modeOption=b,"string"==typeof a&&(a=qf(a)),Zd(this,{from:d,to:d,text:a},null,{head:d,anchor:d}) -};be.prototype=Ye(_d.prototype,{constructor:be,iter:function(a,b,c){c?this.iterN(a-this.first,b-a,c):this.iterN(this.first,this.first+this.size,a)},insert:function(a,b){for(var c=0,d=0,e=b.length;e>d;++d)c+=b[d].height;this.insertInner(a-this.first,b,c)},remove:function(a,b){this.removeInner(a-this.first,b)},getValue:function(a){var b=ie(this,this.first,this.first+this.size);return a===!1?b:b.join(a||"\n")},setValue:function(a){var b=wc(this.first,0),c=this.first+this.size-1;pc(this,{from:b,to:wc(c,ge(this,c).text.length),text:qf(a),origin:"setValue"},{head:b,anchor:b},!0)},replaceRange:function(a,b,c,d){b=Bc(this,b),c=c?Bc(this,c):b,vc(this,a,b,c,d)},getRange:function(a,b,c){var d=he(this,Bc(this,a),Bc(this,b));return c===!1?d:d.join(c||"\n")},getLine:function(a){var b=this.getLineHandle(a);return b&&b.text},setLine:function(a,b){Dc(this,a)&&vc(this,b,wc(a,0),Bc(this,wc(a)))},removeLine:function(a){a?vc(this,"",Bc(this,wc(a-1)),Bc(this,wc(a))):vc(this,"",wc(0,0),Bc(this,wc(1,0)))},getLineHandle:function(a){return Dc(this,a)?ge(this,a):void 0},getLineNumber:function(a){return ke(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return Bc(this,a)},getCursor:function(a){var c,b=this.sel;return c=null==a||"head"==a?b.head:"anchor"==a?b.anchor:"end"==a||a===!1?b.to:b.from,zc(c)},somethingSelected:function(){return!xc(this.sel.head,this.sel.anchor)},setCursor:Db(function(a,b,c){var d=Bc(this,"number"==typeof a?wc(a,b||0):a);c?Ec(this,d):Gc(this,d,d)}),setSelection:Db(function(a,b){Gc(this,Bc(this,a),Bc(this,b||a))}),extendSelection:Db(function(a,b){Ec(this,Bc(this,a),b&&Bc(this,b))}),getSelection:function(a){return this.getRange(this.sel.from,this.sel.to,a)},replaceSelection:function(a,b,c){pc(this,{from:this.sel.from,to:this.sel.to,text:qf(a),origin:c},b||"around")},undo:Db(function(){rc(this,"undo")}),redo:Db(function(){rc(this,"redo")}),setExtending:function(a){this.sel.extend=a},historySize:function(){var a=this.history;return{undo:a.done.length,redo:a.undone.length}},clearHistory:function(){this.history=oe(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration()},changeGeneration:function(){return this.history.lastOp=this.history.lastOrigin=null,this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:ue(this.history.done),undone:ue(this.history.undone)}},setHistory:function(a){var b=this.history=oe(this.history.maxGeneration);b.done=a.done.slice(0),b.undone=a.undone.slice(0)},markText:function(a,b,c){return md(this,Bc(this,a),Bc(this,b),c,"range")},setBookmark:function(a,b){var c={replacedWith:b&&(null==b.nodeType?b.widget:b),insertLeft:b&&b.insertLeft};return a=Bc(this,a),md(this,a,a,c,"bookmark")},findMarksAt:function(a){a=Bc(this,a);var b=[],c=ge(this,a.line).markedSpans;if(c)for(var d=0;d=a.ch)&&b.push(e.marker.parent||e.marker)}return b},getAllMarks:function(){var a=[];return this.iter(function(b){var c=b.markedSpans;if(c)for(var d=0;da?(b=a,!0):(a-=e,++c,void 0)}),Bc(this,wc(c,b))},indexFromPos:function(a){a=Bc(this,a);var b=a.ch;return a.lineb&&(b=a.from),null!=a.to&&a.to1&&45==a.charCodeAt(b-1)&&/\w/.test(a.charAt(b-2))&&/[^\-?\.]/.test(a.charAt(b))?!0:/[~!#%&*)=+}\]|\"\.>,:;][({[<]|-[^\-?\.\u2010-\u201f\u2026]|\?[\w~`@#$%\^&*(_=+{[|><]|\u2026[\w~`@#$%\^&*(_=+{[><]/.test(a.slice(b-1,b+1))});var mf,of,qf=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length;d>=b;){var e=a.indexOf("\n",b);-1==e&&(e=a.length);var f=a.slice(b,"\r"==a.charAt(e-1)?e-1:e),g=f.indexOf("\r");-1!=g?(c.push(f.slice(0,g)),b+=g+1):(c.push(f),b=e+1)}return c}:function(a){return a.split(/\r\n?|\n/)};w.splitLines=qf;var rf=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return b&&b.parentElement()==a?0!=b.compareEndPoints("StartToEnd",b):!1},sf=function(){var a=ef("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),"function"==typeof a.oncopy)}(),tf={3:"Enter",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:";",91:"Mod",92:"Mod",93:"Mod",109:"-",107:"=",127:"Delete",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63276:"PageUp",63277:"PageDown",63275:"End",63273:"Home",63234:"Left",63232:"Up",63235:"Right",63233:"Down",63302:"Insert",63272:"Delete"};w.keyNames=tf,function(){for(var a=0;10>a;a++)tf[a+48]=String(a);for(var a=65;90>=a;a++)tf[a]=String.fromCharCode(a);for(var a=1;12>=a;a++)tf[a+111]=tf[a+63235]="F"+a}();var Cf,Hf=function(){function c(c){return 255>=c?a.charAt(c):c>=1424&&1524>=c?"R":c>=1536&&1791>=c?b.charAt(c-1536):c>=1792&&2220>=c?"r":"L"}var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL",b="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr",d=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,f=/[LRr]/,g=/[Lb1n]/,h=/[1n]/,i="L";return function(a){if(!d.test(a))return!1;for(var l,b=a.length,j=[],k=0;b>k;++k)j.push(l=c(a.charCodeAt(k)));for(var k=0,m=i;b>k;++k){var l=j[k];"m"==l?j[k]=m:m=l}for(var k=0,n=i;b>k;++k){var l=j[k];"1"==l&&"r"==n?j[k]="n":f.test(l)&&(n=l,"r"==l&&(j[k]="R"))}for(var k=1,m=j[0];b-1>k;++k){var l=j[k];"+"==l&&"1"==m&&"1"==j[k+1]?j[k]="1":","!=l||m!=j[k+1]||"1"!=m&&"n"!=m||(j[k]=m),m=l}for(var k=0;b>k;++k){var l=j[k];if(","==l)j[k]="N";else if("%"==l){for(var o=k+1;b>o&&"%"==j[o];++o);for(var p=k&&"!"==j[k-1]||b-1>o&&"1"==j[o]?"1":"N",q=k;o>q;++q)j[q]=p;k=o-1}}for(var k=0,n=i;b>k;++k){var l=j[k];"L"==n&&"1"==l?j[k]="L":f.test(l)&&(n=l)}for(var k=0;b>k;++k)if(e.test(j[k])){for(var o=k+1;b>o&&e.test(j[o]);++o);for(var r="L"==(k?j[k-1]:i),s="L"==(b-1>o?j[o]:i),p=r||s?"L":"R",q=k;o>q;++q)j[q]=p;k=o-1}for(var u,t=[],k=0;b>k;)if(g.test(j[k])){var v=k;for(++k;b>k&&g.test(j[k]);++k);t.push({from:v,to:k,level:0})}else{var w=k,x=t.length;for(++k;b>k&&"L"!=j[k];++k);for(var q=w;k>q;)if(h.test(j[q])){q>w&&t.splice(x,0,{from:w,to:q,level:1});var y=q;for(++q;k>q&&h.test(j[q]);++q);t.splice(x,0,{from:y,to:q,level:2}),w=q}else++q;k>w&&t.splice(x,0,{from:w,to:k,level:1})}return 1==t[0].level&&(u=a.match(/^\s+/))&&(t[0].from=u[0].length,t.unshift({from:0,to:u[0].length,level:0})),1==Ve(t).level&&(u=a.match(/\s+$/))&&(Ve(t).to-=u[0].length,t.push({from:b-u[0].length,to:b,level:0})),t[0].level!=Ve(t).level&&t.push({from:b,to:b,level:t[0].level}),t}}();return w.version="3.14.1",w}(),CodeMirror.defineMode("clike",function(a,b){function n(a,b){var c=a.next();if(j[c]){var d=j[c](a,b);if(d!==!1)return d}if('"'==c||"'"==c)return b.tokenize=o(c),b.tokenize(a,b);if(/[\[\]{}\(\),;\:\.]/.test(c))return m=c,null;if(/\d/.test(c))return a.eatWhile(/[\w\.]/),"number";if("/"==c){if(a.eat("*"))return b.tokenize=p,p(a,b);if(a.eat("/"))return a.skipToEnd(),"comment"}if(l.test(c))return a.eatWhile(l),"operator";a.eatWhile(/[\w\$_]/);var e=a.current();return f.propertyIsEnumerable(e)?(h.propertyIsEnumerable(e)&&(m="newstatement"),"keyword"):g.propertyIsEnumerable(e)?(h.propertyIsEnumerable(e)&&(m="newstatement"),"builtin"):i.propertyIsEnumerable(e)?"atom":"variable"}function o(a){return function(b,c){for(var e,d=!1,f=!1;null!=(e=b.next());){if(e==a&&!d){f=!0;break}d=!d&&"\\"==e}return(f||!d&&!k)&&(c.tokenize=null),"string"}}function p(a,b){for(var d,c=!1;d=a.next();){if("/"==d&&c){b.tokenize=null;break}c="*"==d}return"comment"}function q(a,b,c,d,e){this.indented=a,this.column=b,this.type=c,this.align=d,this.prev=e}function r(a,b,c){var d=a.indented;return a.context&&"statement"==a.context.type&&(d=a.context.indented),a.context=new q(d,b,c,null,a.context)}function s(a){var b=a.context.type;return(")"==b||"]"==b||"}"==b)&&(a.indented=a.context.indented),a.context=a.context.prev}var m,c=a.indentUnit,d=b.statementIndentUnit||c,e=b.dontAlignCalls,f=b.keywords||{},g=b.builtin||{},h=b.blockKeywords||{},i=b.atoms||{},j=b.hooks||{},k=b.multiLineStrings,l=/[+\-*&%=<>!?|\/]/;return{startState:function(a){return{tokenize:null,context:new q((a||0)-c,0,"top",!1),indented:0,startOfLine:!0}},token:function(a,b){var c=b.context;if(a.sol()&&(null==c.align&&(c.align=!1),b.indented=a.indentation(),b.startOfLine=!0),a.eatSpace())return null;m=null;var d=(b.tokenize||n)(a,b);if("comment"==d||"meta"==d)return d;if(null==c.align&&(c.align=!0),";"!=m&&":"!=m&&","!=m||"statement"!=c.type)if("{"==m)r(b,a.column(),"}");else if("["==m)r(b,a.column(),"]");else if("("==m)r(b,a.column(),")");else if("}"==m){for(;"statement"==c.type;)c=s(b);for("}"==c.type&&(c=s(b));"statement"==c.type;)c=s(b)}else m==c.type?s(b):(("}"==c.type||"top"==c.type)&&";"!=m||"statement"==c.type&&"newstatement"==m)&&r(b,a.column(),"statement");else s(b);return b.startOfLine=!1,d},indent:function(a,b){if(a.tokenize!=n&&null!=a.tokenize)return CodeMirror.Pass;var f=a.context,g=b&&b.charAt(0);"statement"==f.type&&"}"==g&&(f=f.prev);var h=g==f.type;return"statement"==f.type?f.indented+("{"==g?0:d):!f.align||e&&")"==f.type?")"!=f.type||h?f.indented+(h?0:c):f.indented+d:f.column+(h?0:1)},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}}),function(){function a(a){for(var b={},c=a.split(" "),d=0;d <- <: <% >: # @ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),blockKeywords:a("catch class do else finally for forSome if match switch try while"),atoms:a("true false null"),hooks:{"@":function(a){return a.eatWhile(/[\w\$_]/),"meta"}}}),e(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:a("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4 sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadowconst attribute uniform varying break continue discard return for while do if else struct in out inout"),blockKeywords:a("for while do if else struct"),builtin:a("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smootstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:a("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragColor gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),hooks:{"#":c}})}(),CodeMirror.defineMode("coffeescript",function(a){function c(a){return new RegExp("^(("+a.join(")|(")+"))\\b")}function s(a,c){if(a.sol()){var l=c.scopes[0].offset;if(a.eatSpace()){var m=a.indentation();return m>l?"indent":l>m?"dedent":null}l>0&&w(a,c)}if(a.eatSpace())return null;var q=a.peek();if(a.match("####"))return a.skipToEnd(),"comment";if(a.match("###"))return c.tokenize=u,c.tokenize(a,c);if("#"===q)return a.skipToEnd(),"comment";if(a.match(/^-?[0-9\.]/,!1)){var s=!1;if(a.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(s=!0),a.match(/^-?\d+\.\d*/)&&(s=!0),a.match(/^-?\.\d+/)&&(s=!0),s)return"."==a.peek()&&a.backUp(1),"number";var v=!1;if(a.match(/^-?0x[0-9a-f]+/i)&&(v=!0),a.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(v=!0),a.match(/^-?0(?![\dx])/i)&&(v=!0),v)return"number"}if(a.match(o))return c.tokenize=t(a.current(),"string"),c.tokenize(a,c);if(a.match(p)){if("/"!=a.current()||a.match(/^.*\//,!1))return c.tokenize=t(a.current(),"string-2"),c.tokenize(a,c);a.backUp(1)}return a.match(h)||a.match(g)?"punctuation":a.match(f)||a.match(d)||a.match(k)?"operator":a.match(e)?"punctuation":a.match(r)?"atom":a.match(n)?"keyword":a.match(i)?"variable":a.match(j)?"property":(a.next(),b)}function t(c,d){var e=1==c.length;return function(f,g){for(;!f.eol();)if(f.eatWhile(/[^'"\/\\]/),f.eat("\\")){if(f.next(),e&&f.eol())return d}else{if(f.match(c))return g.tokenize=s,d;f.eat(/['"\/]/)}return e&&(a.mode.singleLineStringErrors?d=b:g.tokenize=s),d}}function u(a,b){for(;!a.eol();){if(a.eatWhile(/[^#]/),a.match("###")){b.tokenize=s;break}a.eatWhile("#")}return"comment"}function v(b,c,d){d=d||"coffee";var e=0;if("coffee"===d){for(var f=0;f"!==e&&"=>"!==e||c.lambda||"coffee"!=c.scopes[0].type||""!==a.peek())&&"indent"!==d||v(a,c);var f="[({".indexOf(e);return-1!==f&&v(a,c,"])}".slice(f,f+1)),l.exec(e)&&v(a,c),"then"==e&&w(a,c),"dedent"===d&&w(a,c)?b:(f="])}".indexOf(e),-1!==f&&w(a,c)?b:(c.dedent>0&&a.eol()&&"coffee"==c.scopes[0].type&&(c.scopes.length>1&&c.scopes.shift(),c.dedent-=1),d))}var b="error",d=new RegExp("^[\\+\\-\\*/%&|\\^~<>!?]"),e=new RegExp("^[\\(\\)\\[\\]\\{\\},:`=;\\.]"),f=new RegExp("^((->)|(=>)|(\\+\\+)|(\\+\\=)|(\\-\\-)|(\\-\\=)|(\\*\\*)|(\\*\\=)|(\\/\\/)|(\\/\\=)|(==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//))"),g=new RegExp("^((\\.\\.)|(\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),h=new RegExp("^((\\.\\.\\.)|(//=)|(>>=)|(<<=)|(\\*\\*=))"),i=new RegExp("^[_A-Za-z$][_A-Za-z$0-9]*"),j=new RegExp("^(@|this.)[_A-Za-z$][_A-Za-z$0-9]*"),k=c(["and","or","not","is","isnt","in","instanceof","typeof"]),l=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],m=["break","by","continue","debugger","delete","do","in","of","new","return","then","this","throw","when","until"],n=c(l.concat(m));l=c(l);var o=new RegExp("^('{3}|\"{3}|['\"])"),p=new RegExp("^(/{3}|/)"),q=["Infinity","NaN","undefined","null","true","false","on","off","yes","no"],r=c(q),y={startState:function(a){return{tokenize:s,scopes:[{offset:a||0,type:"coffee"}],lastToken:null,lambda:!1,dedent:0}},token:function(a,b){var c=x(a,b);return b.lastToken={style:c,content:a.current()},a.eol()&&a.lambda&&(b.lambda=!1),c},indent:function(a){return a.tokenize!=s?0:a.scopes[0].offset},lineComment:"#",fold:"indent"};return y}),CodeMirror.defineMIME("text/x-coffeescript","coffeescript"),CodeMirror.defineMode("css",function(a){return CodeMirror.getMode(a,"text/css")}),CodeMirror.defineMode("css-base",function(a,b){"use strict";function l(a,b){return k=b,a}function m(a,b){var c=a.next();if(d[c]){var e=d[c](a,b);if(e!==!1)return e}if("@"==c)return a.eatWhile(/[\w\\\-]/),l("def",a.current());if("="==c)l(null,"compare");else{if(("~"==c||"|"==c)&&a.eat("="))return l(null,"compare");if('"'==c||"'"==c)return b.tokenize=n(c),b.tokenize(a,b);if("#"==c)return a.eatWhile(/[\w\\\-]/),l("atom","hash");if("!"==c)return a.match(/^\s*\w*/),l("keyword","important");if(/\d/.test(c))return a.eatWhile(/[\w.%]/),l("number","unit");if("-"!==c)return/[,+>*\/]/.test(c)?l(null,"select-op"):"."==c&&a.match(/^-?[_a-z][_a-z0-9-]*/i)?l("qualifier","qualifier"):":"==c?l("operator",c):/[;{}\[\]\(\)]/.test(c)?l(null,c):"u"==c&&a.match("rl(")?(a.backUp(1),b.tokenize=o,l("property","variable")):(a.eatWhile(/[\w\\\-]/),l("property","variable"));if(/\d/.test(a.peek()))return a.eatWhile(/[\w.%]/),l("number","unit");if(a.match(/^[^-]+-/))return l("meta","meta")}}function n(a,b){return function(c,d){for(var f,e=!1;null!=(f=c.next())&&(f!=a||e);)e=!e&&"\\"==f;return e||(b&&c.backUp(1),d.tokenize=m),l("string","string")}}function o(a,b){return a.next(),b.tokenize=a.match(/\s*[\"\']/,!1)?m:n(")",!0),l(null,"(")}var c=a.indentUnit,d=b.hooks||{},e=b.atMediaTypes||{},f=b.atMediaFeatures||{},g=b.propertyKeywords||{},h=b.colorKeywords||{},i=b.valueKeywords||{},j=!!b.allowNested,k=null;return{startState:function(a){return{tokenize:m,baseIndent:a||0,stack:[],lastToken:null}},token:function(a,b){if(b.tokenize=b.tokenize||m,b.tokenize==m&&a.eatSpace())return null;var c=b.tokenize(a,b);c&&"string"!=typeof c&&(c=l(c[0],c[1]));var d=b.stack[b.stack.length-1];if("variable"==c)return"variable-definition"==k&&b.stack.push("propertyValue"),b.lastToken="variable-2";if("property"==c){var n=a.current().toLowerCase();"propertyValue"==d?c=i.hasOwnProperty(n)?"string-2":h.hasOwnProperty(n)?"keyword":"variable-2":"rule"==d?g.hasOwnProperty(n)||(c+=" error"):"block"==d?c=g.hasOwnProperty(n)?"property":h.hasOwnProperty(n)?"keyword":i.hasOwnProperty(n)?"string-2":"tag":d&&"@media{"!=d?"@media"==d?c=e[a.current()]?"attribute":/^(only|not)$/.test(n)?"keyword":"and"==n?"error":f.hasOwnProperty(n)?"error":"attribute error":"@mediaType"==d?c=e.hasOwnProperty(n)?"attribute":"and"==n?"operator":/^(only|not)$/.test(n)?"error":"error":"@mediaType("==d?g.hasOwnProperty(n)||(e.hasOwnProperty(n)?c="error":"and"==n?c="operator":/^(only|not)$/.test(n)?c="error":c+=" error"):c="@import"==d?"tag":"error":c="tag"}else"atom"==c?d&&"@media{"!=d&&"block"!=d?"propertyValue"==d?/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(a.current())||(c+=" error"):c="error":c="builtin":"@media"==d&&"{"==k&&(c="error");if("{"==k)if("@media"==d||"@mediaType"==d)b.stack.pop(),b.stack[b.stack.length-1]="@media{";else{var o=j?"block":"rule";b.stack.push(o)}else if("}"==k){var p=b.stack[b.stack.length-1];"interpolation"==p&&(c="operator"),b.stack.pop(),"propertyValue"==d&&b.stack.pop()}else"interpolation"==k?b.stack.push("interpolation"):"@media"==k?b.stack.push("@media"):"@import"==k?b.stack.push("@import"):"@media"==d&&/\b(keyword|attribute)\b/.test(c)?b.stack.push("@mediaType"):"@mediaType"==d&&","==a.current()?b.stack.pop():"@mediaType"==d&&"("==k?b.stack.push("@mediaType("):"@mediaType("==d&&")"==k?b.stack.pop():":"==k&&"property"==b.lastToken?b.stack.push("propertyValue"):"propertyValue"==d&&";"==k?b.stack.pop():"@import"==d&&";"==k&&b.stack.pop();return b.lastToken=c},indent:function(a,b){var d=a.stack.length;return/^\}/.test(b)&&(d-="propertyValue"==a.stack[a.stack.length-1]?2:1),a.baseIndent+d*c},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}}),function(){function a(a){for(var b={},c=0;c=2&&">"==d){b.tokenize=null;break}c="-"==d?c+1:0}return["comment","comment"]}return a.eat("!")?(b.tokenize=c,c(a,b)):void 0},"/":function(a,b){return a.eat("*")?(b.tokenize=g,g(a,b)):!1}},name:"css-base"}),CodeMirror.defineMIME("text/x-scss",{atMediaTypes:b,atMediaFeatures:c,propertyKeywords:d,colorKeywords:e,valueKeywords:f,allowNested:!0,hooks:{$:function(a){return a.match(/^[\w-]+/),":"==a.peek()?["variable","variable-definition"]:["variable","variable"]},"/":function(a,b){return a.eat("/")?(a.skipToEnd(),["comment","comment"]):a.eat("*")?(b.tokenize=g,g(a,b)):["operator","operator"]},"#":function(a){return a.eat("{")?["operator","interpolation"]:(a.eatWhile(/[\w\\\-]/),["atom","hash"])}},name:"css-base"})}(),CodeMirror.defineMode("htmlmixed",function(a,b){function i(a,b){var f=b.htmlState.tagName,g=c.token(a,b.htmlState);if("script"==f&&/\btag\b/.test(g)&&">"==a.current()){var h=a.string.slice(Math.max(0,a.pos-100),a.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);h=h?h[1]:"",h&&/[\"\']/.test(h.charAt(0))&&(h=h.slice(1,h.length-1));for(var i=0;i"==a.current()&&(b.token=l,b.localMode=d,b.localState=d.startState(c.indent(b.htmlState,"")));return g}function j(a,b,c){var f,d=a.current(),e=d.search(b);return e>-1?a.backUp(d.length-e):(f=d.match(/<\/?$/))&&(a.backUp(d.length),a.match(b,!1)||a.match(d[0])),c}function k(a,b){return a.match(/^<\/\s*script\s*>/i,!1)?(b.token=i,b.localState=b.localMode=null,i(a,b)):j(a,/<\/\s*script\s*>/,b.localMode.token(a,b.localState))}function l(a,b){return a.match(/^<\/\s*style\s*>/i,!1)?(b.token=i,b.localState=b.localMode=null,i(a,b)):j(a,/<\/\s*style\s*>/,d.token(a,b.localState))}var c=CodeMirror.getMode(a,{name:"xml",htmlMode:!0}),d=CodeMirror.getMode(a,"css"),e=[],f=b&&b.scriptTypes;if(e.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:CodeMirror.getMode(a,"javascript")}),f)for(var g=0;g=0;a--)u.cc.push(arguments[a])}function w(){return v.apply(null,arguments),!0}function x(a){function b(b){for(var c=b;c;c=c.next)if(c.name==a)return!0;return!1}var c=u.state;if(c.context){if(u.marked="def",b(c.localVars))return;c.localVars={name:a,next:c.localVars}}else{if(b(c.globalVars))return;c.globalVars={name:a,next:c.globalVars}}}function z(){u.state.context={prev:u.state.context,vars:u.state.localVars},u.state.localVars=y}function A(){u.state.localVars=u.state.context.vars,u.state.context=u.state.context.prev}function B(a,b){var c=function(){var c=u.state,d=c.indented;"stat"==c.lexical.type&&(d=c.lexical.indented),c.lexical=new r(d,u.stream.column(),a,null,c.lexical,b)};return c.lex=!0,c}function C(){var a=u.state;a.lexical.prev&&(")"==a.lexical.type&&(a.indented=a.lexical.indented),a.lexical=a.lexical.prev)}function D(a){return function(b){return b==a?w():";"==a?v():w(arguments.callee)}}function E(a){return"var"==a?w(B("vardef"),U,D(";"),C):"keyword a"==a?w(B("form"),F,E,C):"keyword b"==a?w(B("form"),E,C):"{"==a?w(B("}"),R,C):";"==a?w():"if"==a?w(B("form"),F,E,C,W(u.state.indented)):"function"==a?w(_):"for"==a?w(B("form"),D("("),B(")"),X,D(")"),C,E,C):"variable"==a?w(B("stat"),M):"switch"==a?w(B("form"),F,B("}","switch"),D("{"),R,C,C):"case"==a?w(F,D(":")):"default"==a?w(D(":")):"catch"==a?w(B("form"),z,D("("),ab,D(")"),E,C,A):v(B("stat"),F,D(";"),C)}function F(a){return H(a,!1)}function G(a){return H(a,!0)}function H(a,b){var c=b?L:K;return q.hasOwnProperty(a)?w(c):"function"==a?w(_):"keyword c"==a?w(b?J:I):"("==a?w(B(")"),I,D(")"),C,c):"operator"==a?w(b?G:F):"["==a?w(B("]"),Q(G,"]"),C,c):"{"==a?w(B("}"),Q(O,"}"),C,c):w()}function I(a){return a.match(/[;\}\)\],]/)?v():v(F)}function J(a){return a.match(/[;\}\)\],]/)?v():v(G)}function K(a,b){return","==a?w(F):L(a,b,K)}function L(a,b,c){return c||(c=L),"operator"==a?/\+\+|--/.test(b)?w(c):"?"==b?w(F,D(":"),F):w(F):";"!=a?"("==a?w(B(")","call"),Q(G,")"),C,c):"."==a?w(N,c):"["==a?w(B("]"),F,D("]"),C,c):void 0:void 0}function M(a){return":"==a?w(C,E):v(K,D(";"),C)}function N(a){return"variable"==a?(u.marked="property",w()):void 0}function O(a,b){if("variable"==a){if(u.marked="property","get"==b||"set"==b)return w(P)}else("number"==a||"string"==a)&&(u.marked=a+" property");return q.hasOwnProperty(a)?w(D(":"),G):void 0}function P(a){return":"==a?w(F):"variable"!=a?w(D(":"),F):(u.marked="property",w(_))}function Q(a,b){function c(d){if(","==d){var e=u.state.lexical;return"call"==e.info&&(e.pos=(e.pos||0)+1),w(a,c)}return d==b?w():w(D(b))}return function(d){return d==b?w():v(a,c)}}function R(a){return"}"==a?w():v(E,R)}function S(a){return":"==a?w(T):v()}function T(a){return"variable"==a?(u.marked="variable-3",w()):v()}function U(a,b){return"variable"==a?(x(b),f?w(S,V):w(V)):v()}function V(a,b){return"="==b?w(G,V):","==a?w(U):void 0}function W(a){return function(b,c){return"keyword b"==b&&"else"==c?(u.state.lexical=new r(a,0,"form",null,u.state.lexical),w(E,C)):v()}}function X(a){return"var"==a?w(U,D(";"),Z):";"==a?w(Z):"variable"==a?w(Y):v(F,D(";"),Z)}function Y(a,b){return"in"==b?w(F):w(K,Z)}function Z(a,b){return";"==a?w($):"in"==b?w(F):v(F,D(";"),$)}function $(a){")"!=a&&w(F)}function _(a,b){return"variable"==a?(x(b),w(_)):"("==a?w(B(")"),z,Q(ab,")"),C,E,A):void 0}function ab(a,b){return"variable"==a?(x(b),f?w(S):w()):void 0}var k,l,c=a.indentUnit,d=b.statementIndent,e=b.json,f=b.typescript,g=function(){function a(a){return{type:a,style:"keyword"}}var b=a("keyword a"),c=a("keyword b"),d=a("keyword c"),e=a("operator"),g={type:"atom",style:"atom"},h={"if":a("if"),"while":b,"with":b,"else":c,"do":c,"try":c,"finally":c,"return":d,"break":d,"continue":d,"new":d,"delete":d,"throw":d,"var":a("var"),"const":a("var"),let:a("var"),"function":a("function"),"catch":a("catch"),"for":a("for"),"switch":a("switch"),"case":a("case"),"default":a("default"),"in":e,"typeof":e,"instanceof":e,"true":g,"false":g,"null":g,undefined:g,NaN:g,Infinity:g,"this":a("this")};if(f){var i={type:"variable",style:"variable-3"},j={"interface":a("interface"),"class":a("class"),"extends":a("extends"),constructor:a("constructor"),"public":a("public"),"private":a("private"),"protected":a("protected"),"static":a("static"),"super":a("super"),string:i,number:i,bool:i,any:i};for(var k in j)h[k]=j[k]}return h}(),h=/[+\-*&%=<>!?|~^]/,q={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0},u={state:null,column:null,marked:null,cc:null},y={name:"this",next:{name:"arguments"}};return C.lex=!0,{startState:function(a){return{tokenize:n,lastType:null,cc:[],lexical:new r((a||0)-c,0,"block",!1),localVars:b.localVars,globalVars:b.globalVars,context:b.localVars&&{vars:b.localVars},indented:0}},token:function(a,b){if(a.sol()&&(b.lexical.hasOwnProperty("align")||(b.lexical.align=!1),b.indented=a.indentation()),b.tokenize!=p&&a.eatSpace())return null;var c=b.tokenize(a,b);return"comment"==k?c:(b.lastType="operator"!=k||"++"!=l&&"--"!=l?k:"incdec",t(b,c,k,l,a))},indent:function(a,e){if(a.tokenize==p)return CodeMirror.Pass;if(a.tokenize!=n)return 0;var f=e&&e.charAt(0),g=a.lexical;"stat"==g.type&&"}"==f&&(g=g.prev),d&&")"==g.type&&"stat"==g.prev.type&&(g=g.prev);var h=g.type,i=f==h;return"vardef"==h?g.indented+("operator"==a.lastType||","==a.lastType?4:0):"form"==h&&"{"==f?g.indented:"form"==h?g.indented+c:"stat"==h?g.indented+("operator"==a.lastType||","==a.lastType?d||c:0):"switch"!=g.info||i||0==b.doubleIndentSwitch?g.align?g.column+(i?0:1):g.indented+(i?0:c):g.indented+(/^(?:case|default)\b/.test(e)?c:2*c)},electricChars:":{}",blockCommentStart:e?null:"/*",blockCommentEnd:e?null:"*/",lineComment:e?null:"//",fold:"brace",helperType:e?"json":"javascript",jsonMode:e}}),CodeMirror.defineMIME("text/javascript","javascript"),CodeMirror.defineMIME("text/ecmascript","javascript"),CodeMirror.defineMIME("application/javascript","javascript"),CodeMirror.defineMIME("application/ecmascript","javascript"),CodeMirror.defineMIME("application/json",{name:"javascript",json:!0}),CodeMirror.defineMIME("application/x-json",{name:"javascript",json:!0}),CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:!0}),CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:!0}),CodeMirror.defineMode("less",function(a){function d(a,b){return c=b,a}function f(a,b){var f=a.next();if("@"==f)return a.eatWhile(/[\w\-]/),d("meta",a.current());if("/"==f&&a.eat("*"))return b.tokenize=h,h(a,b);if("<"==f&&a.eat("!"))return b.tokenize=i,i(a,b);if("="==f)d(null,"compare");else{if("|"==f&&a.eat("="))return d(null,"compare");if('"'==f||"'"==f)return b.tokenize=j(f),b.tokenize(a,b);if("/"==f){if(a.eat("/"))return b.tokenize=g,g(a,b);if("string"==c||"("==c)return d("string","string");if(void 0!=b.stack[b.stack.length-1])return d(null,f);if(a.eatWhile(/[\a-zA-Z0-9\-_.\s]/),/\/|\)|#/.test(a.peek()||a.eatSpace()&&")"==a.peek())||a.eol())return d("string","string")}else{if("!"==f)return a.match(/^\s*\w*/),d("keyword","important");if(/\d/.test(f))return a.eatWhile(/[\w.%]/),d("number","unit");if(/[,+<>*\/]/.test(f))return"="==a.peek()||"a"==c?d("string","string"):d(null,"select-op");if(!/[;{}:\[\]()~\|]/.test(f)){if("."==f)return"("==c||"string"==c?d("string","string"):(a.eatWhile(/[\a-zA-Z0-9\-_]/)," "==a.peek()&&a.eatSpace(),")"==a.peek()?d("number","unit"):d("tag","tag"));if("#"==f)return a.eatWhile(/[A-Za-z0-9]/),4==a.current().length||7==a.current().length?null!=a.current().match(/[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/,!1)?a.current().substring(1)!=a.current().match(/[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/,!1)?d("atom","tag"):(a.eatSpace(),/[\/<>.(){!$%^&*_\-\\?=+\|#'~`]/.test(a.peek())?d("atom","tag"):"}"==a.peek()?d("number","unit"):/[a-zA-Z\\]/.test(a.peek())?d("atom","tag"):a.eol()?d("atom","tag"):d("number","unit")):(a.eatWhile(/[\w\\\-]/),d("atom","tag")):(a.eatWhile(/[\w\\\-]/),d("atom","tag"));if("&"==f)return a.eatWhile(/[\w\-]/),d(null,f);if(a.eatWhile(/[\w\\\-_%.{]/),"string"==c)return d("string","string");if(null!=a.current().match(/(^http$|^https$)/))return a.eatWhile(/[\w\\\-_%.{:\/]/),d("string","string");if("<"==a.peek()||">"==a.peek())return d("tag","tag");if(/\(/.test(a.peek()))return d(null,f);if("/"==a.peek()&&void 0!=b.stack[b.stack.length-1])return d("string","string");if(a.current().match(/\-\d|\-.\d/))return d("number","unit");if(/\/|[\s\)]/.test(a.peek()||a.eol()||a.eatSpace()&&"/"==a.peek())&&-1!==a.current().indexOf("."))return"{"==a.current().substring(a.current().length-1,a.current().length)?(a.backUp(1),d("tag","tag")):(a.eatSpace(),/[{<>.a-zA-Z\/]/.test(a.peek())||a.eol()?d("tag","tag"):d("string","string"));if(a.eol()||"["==a.peek()||"#"==a.peek()||"tag"==c)return"{"==a.current().substring(a.current().length-1,a.current().length)&&a.backUp(1),d("tag","tag");if("compare"==c||"a"==c||"("==c)return d("string","string");if("|"==c||"-"==a.current()||"["==c)return d(null,f);if(":"==a.peek()){a.next();var k=":"==a.peek()?!0:!1;if(k)a.backUp(1);else{var l=a.pos,m=a.current().length;a.eatWhile(/[a-z\\\-]/);var n=a.pos;if(null!=a.current().substring(m-1).match(e))return a.backUp(n-(l-1)),d("tag","tag");a.backUp(n-(l-1))}return k?d("tag","tag"):d("variable","variable")}return d("variable","variable")}if(":"==f)return a.eatWhile(/[a-z\\\-]/),e.test(a.current())?d("tag","tag"):":"==a.peek()?(a.next(),a.eatWhile(/[a-z\\\-]/),a.current().match(/\:\:\-(o|ms|moz|webkit)\-/)?d("string","string"):e.test(a.current().substring(1))?d("tag","tag"):d(null,f)):d(null,f);if("~"!=f)return d(null,f);if("r"==c)return d("string","string")}}}function g(a,b){return a.skipToEnd(),b.tokenize=f,d("comment","comment")}function h(a,b){for(var e,c=!1;null!=(e=a.next());){if(c&&"/"==e){b.tokenize=f;break}c="*"==e}return d("comment","comment")}function i(a,b){for(var e,c=0;null!=(e=a.next());){if(c>=2&&">"==e){b.tokenize=f;break}c="-"==e?c+1:0}return d("comment","comment")}function j(a){return function(b,c){for(var g,e=!1;null!=(g=b.next())&&(g!=a||e);)e=!e&&"\\"==g;return e||(c.tokenize=f),d("string","string")}}var c,b=a.indentUnit,e=/(^\:root$|^\:nth\-child$|^\:nth\-last\-child$|^\:nth\-of\-type$|^\:nth\-last\-of\-type$|^\:first\-child$|^\:last\-child$|^\:first\-of\-type$|^\:last\-of\-type$|^\:only\-child$|^\:only\-of\-type$|^\:empty$|^\:link|^\:visited$|^\:active$|^\:hover$|^\:focus$|^\:target$|^\:lang$|^\:enabled^\:disabled$|^\:checked$|^\:first\-line$|^\:first\-letter$|^\:before$|^\:after$|^\:not$|^\:required$|^\:invalid$)/;return{startState:function(a){return{tokenize:f,baseIndent:a||0,stack:[]}},token:function(a,b){if(a.eatSpace())return null;var d=b.tokenize(a,b),e=b.stack[b.stack.length-1];return"hash"==c&&"rule"==e?d="atom":"variable"==d&&("rule"==e?d=null:e&&"@media{"!=e||(d="when"==a.current()?"variable":/[\s,|\s\)|\s]/.test(a.peek())?"tag":c)),"rule"==e&&/^[\{\};]$/.test(c)&&b.stack.pop(),"{"==c?"@media"==e?b.stack[b.stack.length-1]="@media{":b.stack.push("{"):"}"==c?b.stack.pop():"@media"==c?b.stack.push("@media"):"{"==e&&"comment"!=c&&b.stack.push("rule"),d},indent:function(a,c){var d=a.stack.length;return/^\}/.test(c)&&(d-="rule"==a.stack[a.stack.length-1]?2:1),a.baseIndent+d*b},electricChars:"}"}}),CodeMirror.defineMIME("text/x-less","less"),CodeMirror.mimeModes.hasOwnProperty("text/css")||CodeMirror.defineMIME("text/css","less"),CodeMirror.defineMode("markdown",function(a,b){function C(a,b,c){return b.f=b.inline=c,c(a,b)}function D(a,b,c){return b.f=b.block=c,c(a,b)}function E(a){return a.linkTitle=!1,a.em=!1,a.strong=!1,a.quote=0,c||a.f!=G||(a.f=K,a.block=F),a.thisLineHasContent=!1,null}function F(a,c){var d=c.list!==!1;if(c.list!==!1&&c.indentationDiff>=0?(c.indentationDiff<4&&(c.indentation-=c.indentationDiff),c.list=null):c.list!==!1&&c.indentation>0?(c.list=null,c.listDepth=Math.floor(c.indentation/4)):c.list!==!1&&(c.list=!1,c.listDepth=0),c.indentationDiff>=4)return c.indentation-=4,a.skipToEnd(),i;if(a.eatSpace())return null;if("#"===a.peek()||c.prevLineHasContent&&a.match(A))c.header=!0;else if(a.eat(">"))for(c.indentation++,c.quote=1,a.eatSpace();a.eat(">");)a.eatSpace(),c.quote++;else{if("["===a.peek())return C(a,c,M);if(a.match(w,!0))return o;if(c.prevLineHasContent&&!d||!a.match(x,!0)&&!a.match(y,!0)){if(b.fencedCodeBlocks&&a.match(/^```([\w+#]*)/,!0))return c.localMode=f(RegExp.$1),c.localMode&&(c.localState=c.localMode.startState()),D(a,c,H),i}else c.indentation+=4,c.list=!0,c.listDepth++,b.taskLists&&a.match(z,!1)&&(c.taskList=!0)}return C(a,c,c.inline)}function G(a,b){var e=d.token(a,b.htmlState);return c&&"tag"===e&&"openTag"!==b.htmlState.type&&!b.htmlState.context&&(b.f=K,b.block=F),b.md_inside&&-1!=a.current().indexOf(">")&&(b.f=K,b.block=F,b.htmlState.context=void 0),e}function H(a,b){return a.sol()&&a.match(/^```/,!0)?(b.localMode=b.localState=null,b.f=K,b.block=F,i):b.localMode?b.localMode.token(a,b.localState):(a.skipToEnd(),i)}function I(a){var b=[];if(a.taskOpen)return"meta";if(a.taskClosed)return"property";if(a.strong&&b.push(v),a.em&&b.push(u),a.linkText&&b.push(s),a.code&&b.push(i),a.header&&b.push(h),a.quote&&b.push(a.quote%2?j:k),a.list!==!1){var c=(a.listDepth-1)%3;c?1===c?b.push(m):b.push(n):b.push(l)}return b.length?b.join(" "):null}function J(a,b){return a.match(B,!0)?I(b):void 0}function K(a,c){var d=c.text(a,c);if("undefined"!=typeof d)return d;if(c.list)return c.list=null,I(c);if(c.taskList){var e="x"!==a.match(z,!0)[1];return e?c.taskOpen=!0:c.taskClosed=!0,c.taskList=!1,I(c)}c.taskOpen=!1,c.taskClosed=!1;var f=a.next();if("\\"===f)return a.next(),I(c);if(c.linkTitle){c.linkTitle=!1;var h=f;"("===f&&(h=")"),h=(h+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");var i="^\\s*(?:[^"+h+"\\\\]+|\\\\\\\\|\\\\.)"+h;if(a.match(new RegExp(i),!0))return t}if("`"===f){var j=I(c),k=a.pos;a.eatWhile("`");var l=1+a.pos-k;return c.code?l===g?(c.code=!1,j):I(c):(g=l,c.code=!0,I(c))}if(c.code)return I(c);if("!"===f&&a.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return a.match(/\[[^\]]*\]/),c.inline=c.f=L,p;if("["===f&&a.match(/.*\](\(| ?\[)/,!1))return c.linkText=!0,I(c);if("]"===f&&c.linkText){var m=I(c);return c.linkText=!1,c.inline=c.f=L,m}if("<"===f&&a.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return C(a,c,Q(q,">"));if("<"===f&&a.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return C(a,c,Q(r,">"));if("<"===f&&a.match(/^\w/,!1)){if(-1!=a.string.indexOf(">")){var n=a.string.substring(1,a.string.indexOf(">"));/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(n)&&(c.md_inside=!0)}return a.backUp(1),D(a,c,G)}if("<"===f&&a.match(/^\/\w*?>/))return c.md_inside=!1,"tag";var o=!1;if(!b.underscoresBreakWords&&"_"===f&&"_"!==a.peek()&&a.match(/(\w)/,!1)){var s=a.pos-2;if(s>=0){var u=a.string.charAt(s);"_"!==u&&u.match(/(\w)/,!1)&&(o=!0)}}var j=I(c);if("*"===f||"_"===f&&!o){if(c.strong===f&&a.eat(f))return c.strong=!1,j;if(!c.strong&&a.eat(f))return c.strong=f,I(c);if(c.em===f)return c.em=!1,j;if(!c.em)return c.em=f,I(c)}else if(" "===f&&(a.eat("*")||a.eat("_"))){if(" "===a.peek())return I(c);a.backUp(1)}return I(c)}function L(a,b){if(a.eatSpace())return null;var c=a.next();return"("===c||"["===c?C(a,b,Q(t,"("===c?")":"]")):"error"}function M(a,b){return a.match(/^[^\]]*\]:/,!0)?(b.f=N,s):C(a,b,K)}function N(a,b){return a.eatSpace()?null:(a.match(/^[^\s]+/,!0),void 0===a.peek()?b.linkTitle=!0:a.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),b.f=b.inline=K,t)}function P(a){return O[a]||(a=(a+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),O[a]=new RegExp("^(?:[^\\\\]|\\\\.)*?("+a+")")),O[a]}function Q(a,b,c){return c=c||K,function(d,e){return d.match(P(b)),e.inline=e.f=c,a}}var c=CodeMirror.modes.hasOwnProperty("xml"),d=CodeMirror.getMode(a,c?{name:"xml",htmlMode:!0}:"text/plain"),e={html:"htmlmixed",js:"javascript",json:"application/json",c:"text/x-csrc","c++":"text/x-c++src",java:"text/x-java",csharp:"text/x-csharp","c#":"text/x-csharp",scala:"text/x-scala"},f=function(){var b,f,c={},d={},g=[];for(var h in CodeMirror.modes)CodeMirror.modes.propertyIsEnumerable(h)&&g.push(h);for(b=0;b` "'(]+/,O=[];return{startState:function(){return{f:F,prevLineHasContent:!1,thisLineHasContent:!1,block:F,htmlState:CodeMirror.startState(d),indentation:0,inline:K,text:J,linkText:!1,linkTitle:!1,em:!1,strong:!1,header:!1,taskList:!1,list:!1,listDepth:0,quote:0}},copyState:function(a){return{f:a.f,prevLineHasContent:a.prevLineHasContent,thisLineHasContent:a.thisLineHasContent,block:a.block,htmlState:CodeMirror.copyState(d,a.htmlState),indentation:a.indentation,localMode:a.localMode,localState:a.localMode?CodeMirror.copyState(a.localMode,a.localState):null,inline:a.inline,text:a.text,linkTitle:a.linkTitle,em:a.em,strong:a.strong,header:a.header,taskList:a.taskList,list:a.list,listDepth:a.listDepth,quote:a.quote,md_inside:a.md_inside}},token:function(a,b){if(a.sol()){if(a.match(/^\s*$/,!0))return b.prevLineHasContent=!1,E(b);b.prevLineHasContent=b.thisLineHasContent,b.thisLineHasContent=!0,b.header=!1,b.taskList=!1,b.code=!1,b.f=b.block;var c=a.match(/^\s*/,!0)[0].replace(/\t/g," ").length,d=4*Math.floor((c-b.indentation)/4);d>4&&(d=4);var e=b.indentation+d;if(b.indentationDiff=e-b.indentation,b.indentation=e,c>0)return null}return b.f(a,b)},blankLine:E,getType:I}},"xml"),CodeMirror.defineMIME("text/x-markdown","markdown"),function(){function a(a){for(var b={},c=a.split(" "),d=0;d",!1);)a.next();return"comment"},"/":function(a){if(a.eat("/")){for(;!a.eol()&&!a.match("?>",!1);)a.next();return"comment"}return!1}}};CodeMirror.defineMode("php",function(a,b){function f(a,b){var c=b.curMode==e;if(a.sol()&&'"'!=b.pending&&(b.pending=null),c)return c&&null==b.php.tokenize&&a.match("?>")?(b.curMode=d,b.curState=b.html,"meta"):e.token(a,b.curState);if(a.match(/^<\?\w*/))return b.curMode=e,b.curState=b.php,"meta";if('"'==b.pending){for(;!a.eol()&&'"'!=a.next(););var f="string"}else if(b.pending&&a.pos/.test(g)?'"':{end:a.pos,style:f},a.backUp(g.length-h)),f}var d=CodeMirror.getMode(a,"text/html"),e=CodeMirror.getMode(a,c); -return{startState:function(){var a=CodeMirror.startState(d),c=CodeMirror.startState(e);return{html:a,php:c,curMode:b.startOpen?e:d,curState:b.startOpen?c:a,pending:null}},copyState:function(a){var h,b=a.html,c=CodeMirror.copyState(d,b),f=a.php,g=CodeMirror.copyState(e,f);return h=a.curMode==d?c:g,{html:c,php:g,curMode:a.curMode,curState:h,pending:a.pending}},token:f,indent:function(a,b){return a.curMode!=e&&/^\s*<\//.test(b)||a.curMode==e&&/^\?>/.test(b)?d.indent(a.html,b):a.curMode.indent(a.curState,b)},electricChars:"/{}:",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(a){return{state:a.curState,mode:a.curMode}}}},"htmlmixed","clike"),CodeMirror.defineMIME("application/x-httpd-php","php"),CodeMirror.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),CodeMirror.defineMIME("text/x-php",c)}(),CodeMirror.defineMode("python",function(a,b){function d(a){return new RegExp("^(("+a.join(")|(")+"))\\b")}function t(a,b){if(a.sol()){var d=b.scopes[0].offset;if(a.eatSpace()){var l=a.indentation();return l>d?s="indent":d>l&&(s="dedent"),null}d>0&&w(a,b)}if(a.eatSpace())return null;var m=a.peek();if("#"===m)return a.skipToEnd(),"comment";if(a.match(/^[0-9\.]/,!1)){var n=!1;if(a.match(/^\d*\.\d+(e[\+\-]?\d+)?/i)&&(n=!0),a.match(/^\d+\.\d*/)&&(n=!0),a.match(/^\.\d+/)&&(n=!0),n)return a.eat(/J/i),"number";var o=!1;if(a.match(/^0x[0-9a-f]+/i)&&(o=!0),a.match(/^0b[01]+/i)&&(o=!0),a.match(/^0o[0-7]+/i)&&(o=!0),a.match(/^[1-9]\d*(e[\+\-]?\d+)?/)&&(a.eat(/J/i),o=!0),a.match(/^0(?![\dx])/i)&&(o=!0),o)return a.eat(/L/i),"number"}return a.match(p)?(b.tokenize=u(a.current()),b.tokenize(a,b)):a.match(i)||a.match(h)?null:a.match(g)||a.match(e)||a.match(k)?"operator":a.match(f)?null:a.match(q)?"keyword":a.match(r)?"builtin":a.match(j)?"variable":(a.next(),c)}function u(a){function f(f,g){for(;!f.eol();)if(f.eatWhile(/[^'"\\]/),f.eat("\\")){if(f.next(),d&&f.eol())return e}else{if(f.match(a))return g.tokenize=t,e;f.eat(/['"]/)}if(d){if(b.singleLineStringErrors)return c;g.tokenize=t}return e}for(;"rub".indexOf(a.charAt(0).toLowerCase())>=0;)a=a.substr(1);var d=1==a.length,e="string";return f.isString=!0,f}function v(b,c,d){d=d||"py";var e=0;if("py"===d){if("py"!==c.scopes[0].type)return c.scopes[0].offset=b.indentation(),void 0;for(var f=0;f0&&a.eol()&&"py"==b.scopes[0].type&&(b.scopes.length>1&&b.scopes.shift(),b.dedent-=1),d))}var c="error",e=b.singleOperators||new RegExp("^[\\+\\-\\*/%&|\\^~<>!]"),f=b.singleDelimiters||new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),g=b.doubleOperators||new RegExp("^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"),h=b.doubleDelimiters||new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),i=b.tripleDelimiters||new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"),j=b.identifiers||new RegExp("^[_A-Za-z][_A-Za-z0-9]*"),k=d(["and","or","not","is","in"]),l=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield"],m=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"],n={builtins:["apply","basestring","buffer","cmp","coerce","execfile","file","intern","long","raw_input","reduce","reload","unichr","unicode","xrange","False","True","None"],keywords:["exec","print"]},o={builtins:["ascii","bytes","exec","print"],keywords:["nonlocal","False","True","None"]};if(b.version&&3===parseInt(b.version,10)){l=l.concat(o.keywords),m=m.concat(o.builtins);var p=new RegExp("^(([rb]|(br))?('{3}|\"{3}|['\"]))","i")}else{l=l.concat(n.keywords),m=m.concat(n.builtins);var p=new RegExp("^(([rub]|(ur)|(br))?('{3}|\"{3}|['\"]))","i")}var q=d(l),r=d(m),s=null,y={startState:function(a){return{tokenize:t,scopes:[{offset:a||0,type:"py"}],lastToken:null,lambda:!1,dedent:0}},token:function(a,b){var c=x(a,b);return b.lastToken=c,a.eol()&&a.lambda&&(b.lambda=!1),c},indent:function(a){return a.tokenize!=t?a.tokenize.isString?CodeMirror.Pass:0:a.scopes[0].offset},lineComment:"#",fold:"indent"};return y}),CodeMirror.defineMIME("text/x-python","python"),CodeMirror.defineMode("ruby",function(a){function b(a){for(var b={},c=0,d=a.length;d>c;++c)b[a[c]]=!0;return b}function h(a,b,c){return c.tokenize.push(a),a(b,c)}function i(a,b){if(g=null,a.sol()&&a.match("=begin")&&a.eol())return b.tokenize.push(n),"comment";if(a.eatSpace())return null;var d,c=a.next();if("`"==c||"'"==c||'"'==c)return h(l(c,"string",'"'==c||"`"==c),a,b);if("/"!=c||a.eol()||" "==a.peek()){if("%"==c){var e="string",i=!1;a.eat("s")?e="atom":a.eat(/[WQ]/)?(e="string",i=!0):a.eat(/[r]/)?(e="string-2",i=!0):a.eat(/[wxq]/)&&(e="string");var j=a.eat(/[^\w\s]/);return j?(f.propertyIsEnumerable(j)&&(j=f[j]),h(l(j,e,i,!0),a,b)):"operator"}if("#"==c)return a.skipToEnd(),"comment";if("<"==c&&(d=a.match(/^<-?[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return h(m(d[1]),a,b);if("0"==c)return a.eat("x")?a.eatWhile(/[\da-fA-F]/):a.eat("b")?a.eatWhile(/[01]/):a.eatWhile(/[0-7]/),"number";if(/\d/.test(c))return a.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),"number";if("?"==c){for(;a.match(/^\\[CM]-/););return a.eat("\\")?a.eatWhile(/\w/):a.next(),"string"}return":"==c?a.eat("'")?h(l("'","atom",!1),a,b):a.eat('"')?h(l('"',"atom",!0),a,b):a.eat(/[\<\>]/)?(a.eat(/[\<\>]/),"atom"):a.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":a.eat(/[a-zA-Z$@_]/)?(a.eatWhile(/[\w]/),a.eat(/[\?\!\=]/),"atom"):"operator":"@"==c&&a.match(/^@?[a-zA-Z_]/)?(a.eat("@"),a.eatWhile(/[\w]/),"variable-2"):"$"==c?(a.eat(/[a-zA-Z_]/)?a.eatWhile(/[\w]/):a.eat(/\d/)?a.eat(/\d/):a.next(),"variable-3"):/[a-zA-Z_]/.test(c)?(a.eatWhile(/[\w]/),a.eat(/[\?\!]/),a.eat(":")?"atom":"ident"):"|"!=c||!b.varList&&"{"!=b.lastTok&&"do"!=b.lastTok?/[\(\)\[\]{}\\;]/.test(c)?(g=c,null):"-"==c&&a.eat(">")?"arrow":/[=+\-\/*:\.^%<>~|]/.test(c)?(a.eatWhile(/[=+\-\/*:\.^%<>~|]/),"operator"):null:(g="|",null)}return h(l(c,"string-2",!0),a,b)}function j(){var a=1;return function(b,c){if("}"==b.peek()){if(a--,0==a)return c.tokenize.pop(),c.tokenize[c.tokenize.length-1](b,c)}else"{"==b.peek()&&a++;return i(b,c)}}function k(){var a=!1;return function(b,c){return a?(c.tokenize.pop(),c.tokenize[c.tokenize.length-1](b,c)):(a=!0,i(b,c))}}function l(a,b,c,d){return function(e,f){var h,g=!1;for("read-quoted-paused"===f.context.type&&(f.context=f.context.prev,e.eat("}"));null!=(h=e.next());){if(h==a&&(d||!g)){f.tokenize.pop();break}if(c&&"#"==h&&!g){if(e.eat("{")){"}"==a&&(f.context={prev:f.context,type:"read-quoted-paused"}),f.tokenize.push(j());break}if(/[@\$]/.test(e.peek())){f.tokenize.push(k());break}}g=!g&&"\\"==h}return b}}function m(a){return function(b,c){return b.match(a)?c.tokenize.pop():b.skipToEnd(),"string"}}function n(a,b){return a.sol()&&a.match("=end")&&a.eol()&&b.tokenize.pop(),a.skipToEnd(),"comment"}var g,c=b(["alias","and","BEGIN","begin","break","case","class","def","defined?","do","else","elsif","END","end","ensure","false","for","if","in","module","next","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield","nil","raise","throw","catch","fail","loop","callcc","caller","lambda","proc","public","protected","private","require","load","require_relative","extend","autoload","__END__","__FILE__","__LINE__","__dir__"]),d=b(["def","class","case","for","while","do","module","then","catch","loop","proc","begin"]),e=b(["end","until"]),f={"[":"]","{":"}","(":")"};return{startState:function(){return{tokenize:[i],indented:0,context:{type:"top",indented:-a.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(a,b){a.sol()&&(b.indented=a.indentation());var h,f=b.tokenize[b.tokenize.length-1](a,b);if("ident"==f){var i=a.current();f=c.propertyIsEnumerable(a.current())?"keyword":/^[A-Z]/.test(i)?"tag":"def"==b.lastTok||"class"==b.lastTok||b.varList?"def":"variable",d.propertyIsEnumerable(i)?h="indent":e.propertyIsEnumerable(i)?h="dedent":"if"!=i&&"unless"!=i||a.column()!=a.indentation()||(h="indent")}return(g||f&&"comment"!=f)&&(b.lastTok=i||g||f),"|"==g&&(b.varList=!b.varList),"indent"==h||/[\(\[\{]/.test(g)?b.context={prev:b.context,type:g||f,indented:b.indented}:("dedent"==h||/[\)\]\}]/.test(g))&&b.context.prev&&(b.context=b.context.prev),a.eol()&&(b.continuedLine="\\"==g||"operator"==f),f},indent:function(b,c){if(b.tokenize[b.tokenize.length-1]!=i)return 0;var d=c&&c.charAt(0),e=b.context,g=e.type==f[d]||"keyword"==e.type&&/^(?:end|until|else|elsif|when|rescue)\b/.test(c);return e.indented+(g?0:a.indentUnit)+(b.continuedLine?a.indentUnit:0)},electricChars:"}de",lineComment:"#"}}),CodeMirror.defineMIME("text/x-ruby","ruby"),CodeMirror.defineMode("xml",function(a,b){function i(a,b){function c(c){return b.tokenize=c,c(a,b)}var d=a.next();if("<"==d){if(a.eat("!"))return a.eat("[")?a.match("CDATA[")?c(l("atom","]]>")):null:a.match("--")?c(l("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),c(m(1))):null;if(a.eat("?"))return a.eatWhile(/[\w\._\-]/),b.tokenize=l("meta","?>"),"meta";var e=a.eat("/");g="";for(var f;f=a.eat(/[^\s\u00a0=<>\"\'\/?]/);)g+=f;return g?(h=e?"closeTag":"openTag",b.tokenize=j,"tag"):"error"}if("&"==d){var i;return i=a.eat("#")?a.eat("x")?a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):a.eatWhile(/[\d]/)&&a.eat(";"):a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),i?"atom":"error"}return a.eatWhile(/[^&<]/),null}function j(a,b){var c=a.next();return">"==c||"/"==c&&a.eat(">")?(b.tokenize=i,h=">"==c?"endTag":"selfcloseTag","tag"):"="==c?(h="equals",null):"<"==c?"error":/[\'\"]/.test(c)?(b.tokenize=k(c),b.tokenize(a,b)):(a.eatWhile(/[^\s\u00a0=<>\"\']/),"word")}function k(a){return function(b,c){for(;!b.eol();)if(b.next()==a){c.tokenize=j;break}return"string"}}function l(a,b){return function(c,d){for(;!c.eol();){if(c.match(b)){d.tokenize=i;break}c.next()}return a}}function m(a){return function(b,c){for(var d;null!=(d=b.next());){if("<"==d)return c.tokenize=m(a+1),c.tokenize(b,c);if(">"==d){if(1==a){c.tokenize=i;break}return c.tokenize=m(a-1),c.tokenize(b,c)}}return"meta"}}function q(){for(var a=arguments.length-1;a>=0;a--)n.cc.push(arguments[a])}function r(){return q.apply(null,arguments),!0}function s(a,b){var c=e.doNotIndent.hasOwnProperty(a)||n.context&&n.context.noIndent;n.context={prev:n.context,tagName:a,indent:n.indented,startOfLine:b,noIndent:c}}function t(){n.context&&(n.context=n.context.prev)}function u(a){if("openTag"==a)return n.tagName=g,n.tagStart=o.column(),r(y,v(n.startOfLine));if("closeTag"==a){var b=!1;return n.context?n.context.tagName!=g&&(e.implicitlyClosed.hasOwnProperty(n.context.tagName.toLowerCase())&&t(),b=!n.context||n.context.tagName!=g):b=!0,b&&(p="error"),r(w(b))}return r()}function v(a){return function(b){var c=n.tagName;return n.tagName=n.tagStart=null,"selfcloseTag"==b||"endTag"==b&&e.autoSelfClosers.hasOwnProperty(c.toLowerCase())?(x(c.toLowerCase()),r()):"endTag"==b?(x(c.toLowerCase()),s(c,a),r()):r()}}function w(a){return function(b){return a&&(p="error"),"endTag"==b?(t(),r()):(p="error",r(arguments.callee))}}function x(a){for(var b;;){if(!n.context)return;if(b=n.context.tagName.toLowerCase(),!e.contextGrabbers.hasOwnProperty(b)||!e.contextGrabbers[b].hasOwnProperty(a))return;t()}}function y(a){return"word"==a?(p="attribute",r(z,y)):"endTag"==a||"selfcloseTag"==a?q():(p="error",r(y))}function z(a){return"equals"==a?r(A,y):(e.allowMissing?"word"==a&&(p="attribute"):p="error","endTag"==a||"selfcloseTag"==a?q():r())}function A(a){return"string"==a?r(B):"word"==a&&e.allowUnquoted?(p="string",r()):(p="error","endTag"==a||"selfCloseTag"==a?q():r())}function B(a){return"string"==a?r(B):q()}var g,h,n,o,p,c=a.indentUnit,d=b.multilineTagIndentFactor||1,e=b.htmlMode?{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},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}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1},f=b.alignCDATA;return{startState:function(){return{tokenize:i,cc:[],indented:0,startOfLine:!0,tagName:null,tagStart:null,context:null}},token:function(a,b){if(!b.tagName&&a.sol()&&(b.startOfLine=!0,b.indented=a.indentation()),a.eatSpace())return null;p=h=g=null;var c=b.tokenize(a,b);if(b.type=h,(c||h)&&"comment"!=c)for(n=b,o=a;;){var d=b.cc.pop()||u;if(d(h||c))break}return b.startOfLine=!1,p||c},indent:function(a,b,e){var g=a.context;if(a.tokenize!=j&&a.tokenize!=i||g&&g.noIndent)return e?e.match(/^(\s*)/)[0].length:0;if(a.tagName)return a.tagStart+c*d;if(f&&/",configuration:b.htmlMode?"html":"xml",helperType:b.htmlMode?"html":"xml"}}),CodeMirror.defineMIME("text/xml","xml"),CodeMirror.defineMIME("application/xml","xml"),CodeMirror.mimeModes.hasOwnProperty("text/html")||CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:!0}),CodeMirror.registerHelper("fold","brace",function(a,b){function g(e){for(var g=b.ch,h=0;;){var i=d.lastIndexOf(e,g-1);if(-1!=i){if(1==h&&i=n;++n)for(var o=a.getLine(n),p=n==c?e:0;;){var q=o.indexOf(h,p),r=o.indexOf(i,p);if(0>q&&(q=o.length),0>r&&(r=o.length),p=Math.min(q,r),p==o.length)break;if(a.getTokenAt(CodeMirror.Pos(n,p+1)).type==f)if(p==q)++j;else if(!--j){l=n,m=p;break a}++p}if(null!=l&&(c!=l||m!=e))return{from:CodeMirror.Pos(c,e),to:CodeMirror.Pos(l,m)}}}),CodeMirror.braceRangeFinder=CodeMirror.fold.brace,CodeMirror.registerHelper("fold","import",function(a,b){function c(b){if(ba.lastLine())return null;var c=a.getTokenAt(CodeMirror.Pos(b,1));if(/\S/.test(c.string)||(c=a.getTokenAt(CodeMirror.Pos(b,c.end+1))),"keyword"!=c.type||"import"!=c.string)return null;for(var d=b,e=Math.min(a.lastLine(),b+10);e>=d;++d){var f=a.getLine(d),g=f.indexOf(";");if(-1!=g)return{startCh:c.end,end:CodeMirror.Pos(d,g)}}}var e,b=b.line,d=c(b);if(!d||c(b-1)||(e=c(b-2))&&e.end.line==b-1)return null;for(var f=d.end;;){var g=c(f.line+1);if(null==g)break;f=g.end}return{from:a.clipPos(CodeMirror.Pos(b,d.startCh+1)),to:f}}),CodeMirror.importRangeFinder=CodeMirror.fold["import"],CodeMirror.registerHelper("fold","include",function(a,b){function c(b){if(ba.lastLine())return null;var c=a.getTokenAt(CodeMirror.Pos(b,1));return/\S/.test(c.string)||(c=a.getTokenAt(CodeMirror.Pos(b,c.end+1))),"meta"==c.type&&"#include"==c.string.slice(0,8)?c.start+8:void 0}var b=b.line,d=c(b);if(null==d||null!=c(b-1))return null;for(var e=b;;){var f=c(e+1);if(null==f)break;++e}return{from:CodeMirror.Pos(b,d+1),to:a.clipPos(CodeMirror.Pos(e))}}),CodeMirror.includeRangeFinder=CodeMirror.fold.include,function(){function c(c,e){var f=c.getCursor(),g=c.getTokenAt(f),h=CodeMirror.innerMode(c.getMode(),g.state),i=h.state;if("xml"!=h.mode.name)return CodeMirror.Pass;var j=c.getOption("autoCloseTags"),k="html"==h.mode.configuration,l="object"==typeof j&&j.dontCloseTags||k&&a,m="object"==typeof j&&j.indentTags||k&&b;if(">"==e&&i.tagName){var n=i.tagName;g.end>f.ch&&(n=n.slice(0,n.length-g.end+f.ch));var o=n.toLowerCase();if("tag"==g.type&&"closeTag"==i.type||g.string.indexOf("/")==g.string.length-1||l&&d(l,o)>-1)return CodeMirror.Pass;var p=m&&d(m,o)>-1,q=p?CodeMirror.Pos(f.line+1,0):CodeMirror.Pos(f.line,f.ch+1);return c.replaceSelection(">"+(p?"\n\n":"")+"",{head:q,anchor:q}),p&&(c.indentLine(f.line+1),c.indentLine(f.line+2)),void 0}if("/"==e&&"<"==g.string){var n=i.context&&i.context.tagName;return n&&c.replaceSelection("/"+n+">","end"),void 0}return CodeMirror.Pass}function d(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;d>c;++c)if(a[c]==b)return c;return-1}CodeMirror.defineOption("autoCloseTags",!1,function(a,b,d){if(!b||d!=CodeMirror.Init&&d)!b&&d!=CodeMirror.Init&&d&&a.removeKeyMap("autoCloseTags");else{var e={name:"autoCloseTags"};("object"!=typeof b||b.whenClosing)&&(e["'/'"]=function(a){return c(a,"/")}),("object"!=typeof b||b.whenOpening)&&(e["'>'"]=function(a){return c(a,">")}),a.addKeyMap(e)}});var a=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],b=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"]}(),function(){function j(a){for(var b in i)i.hasOwnProperty(b)&&(a.attrs[b]=i[b])}function l(a,b){var c={schemaInfo:h};if(b)for(var d in b)c[d]=b[d];return CodeMirror.hint.xml(a,c)}var a="ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" "),b=["_blank","_self","_top","_parent"],c=["ascii","utf-8","utf-16","latin1","latin1"],d=["get","post","put","delete"],e=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],f=["all","screen","print","embossed","braille","handheld","print","projection","screen","tty","tv","speech","3d-glasses","resolution [>][<][=] [X]","device-aspect-ratio: X/Y","orientation:portrait","orientation:landscape","device-height: [X]","device-width: [X]"],g={attrs:{}},h={a:{attrs:{href:null,ping:null,type:null,media:f,target:b,hreflang:a}},abbr:g,acronym:g,address:g,applet:g,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:f,hreflang:a,type:null,shape:["default","rect","circle","poly"]}},article:g,aside:g,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:g,base:{attrs:{href:null,target:b}},basefont:g,bdi:g,bdo:g,big:g,blockquote:{attrs:{cite:null}},body:g,br:g,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:e,formmethod:d,formnovalidate:["","novalidate"],formtarget:b,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:g,center:g,cite:g,code:g,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["","disabled"],checked:["","checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["","disabled"],multiple:["","multiple"]}},datalist:{attrs:{data:null}},dd:g,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:g,dir:g,div:g,dl:g,dt:g,em:g,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:g,figure:g,font:g,footer:g,form:{attrs:{action:null,name:null,"accept-charset":c,autocomplete:["on","off"],enctype:e,method:d,novalidate:["","novalidate"],target:b}},frame:g,frameset:g,h1:g,h2:g,h3:g,h4:g,h5:g,h6:g,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:g,hgroup:g,hr:g,html:{attrs:{manifest:null},children:["head","body"]},i:g,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["","seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["","autofocus"],checked:["","checked"],disabled:["","disabled"],formenctype:e,formmethod:d,formnovalidate:["","novalidate"],formtarget:b,multiple:["","multiple"],readonly:["","readonly"],required:["","required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:g,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{"for":null,form:null}},legend:g,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:a,media:f,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:g,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:c,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:g,noframes:g,noscript:g,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["","typemustmatch"]}},ol:{attrs:{reversed:["","reversed"],start:null,type:["1","a","A","i","I"]}},optgroup:{attrs:{disabled:["","disabled"],label:null}},option:{attrs:{disabled:["","disabled"],label:null,selected:["","selected"],value:null}},output:{attrs:{"for":null,form:null,name:null}},p:g,param:{attrs:{name:null,value:null}},pre:g,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:g,rt:g,ruby:g,s:g,samp:g,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:c}},section:g,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:g,source:{attrs:{src:null,type:null,media:null}},span:g,strike:g,strong:g,style:{attrs:{type:["text/css"],media:f,scoped:null}},sub:g,summary:g,sup:g,table:g,tbody:g,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["","autofocus"],disabled:["","disabled"],readonly:["","readonly"],required:["","required"],wrap:["soft","hard"]}},tfoot:g,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:g,time:{attrs:{datetime:null}},title:g,tr:g,track:{attrs:{src:null,label:null,"default":null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:a}},tt:g,u:g,ul:g,"var":g,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["","autoplay"],mediagroup:["movie"],muted:["","muted"],controls:["","controls"]}},wbr:g},i={accesskey:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"],"class":null,contenteditable:["true","false"],contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["en","es"],spellcheck:["true","false"],style:null,tabindex:["1","2","3","4","5","6","7","8","9"],title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"]};j(g);for(var k in h)h.hasOwnProperty(k)&&h[k]!=g&&j(h[k]);CodeMirror.htmlSchema=h,CodeMirror.htmlHint=l,CodeMirror.registerHelper("hint","html",l)}(),function(){function b(a,b){for(var c=0,d=a.length;d>c;++c)b(a[c])}function c(a,b){if(!Array.prototype.indexOf){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1}return-1!=a.indexOf(b)}function d(b,c,d,e){var f=b.getCursor(),g=d(b,f),h=g;for(g.state=CodeMirror.innerMode(b.getMode(),g.state).state,/^[\w$_]*$/.test(g.string)||(g=h={start:f.ch,end:f.ch,string:"",state:g.state,type:"."==g.string?"property":null});"property"==h.type;){if(h=d(b,a(f.line,h.start)),"."!=h.string)return;if(h=d(b,a(f.line,h.start)),")"==h.string){var i=1;do switch(h=d(b,a(f.line,h.start)),h.string){case")":i++;break;case"(":i--}while(i>0);if(h=d(b,a(f.line,h.start)),0!==h.type.indexOf("variable"))return;h.type="function"}if(!j)var j=[];j.push(h)}return{list:m(g,j,c,e),from:a(f.line,g.start),to:a(f.line,g.end)}}function e(a,b){return d(a,k,function(a,b){return a.getTokenAt(b)},b)}function f(a,b){var c=a.getTokenAt(b);return b.ch==c.start+1&&"."==c.string.charAt(0)?(c.end=c.start,c.string=".",c.type="property"):/^\.[\w$_]*$/.test(c.string)&&(c.type="property",c.start++,c.string=c.string.replace(/\./,"")),c}function g(a,b){return d(a,l,f,b)}function m(a,d,e,f){function l(a){0!=a.indexOf(k)||c(g,a)||g.push(a)}function m(a){"string"==typeof a?b(h,l):a instanceof Array?b(i,l):a instanceof Function&&b(j,l);for(var c in a)l(c)}var g=[],k=a.string;if(d){var o,n=d.pop();for(0===n.type.indexOf("variable")?(f&&f.additionalContext&&(o=f.additionalContext[n.string]),o=o||window[n.string]):"string"==n.type?o="":"atom"==n.type?o=1:"function"==n.type&&(null==window.jQuery||"$"!=n.string&&"jQuery"!=n.string||"function"!=typeof window.jQuery?null!=window._&&"_"==n.string&&"function"==typeof window._&&(o=window._()):o=window.jQuery());null!=o&&d.length;)o=o[d.pop().string];null!=o&&m(o)}else{for(var p=a.state.localVars;p;p=p.next)l(p.name);for(var p=a.state.globalVars;p;p=p.next)l(p.name);m(window),b(e,l)}return g}var a=CodeMirror.Pos;CodeMirror.javascriptHint=e,CodeMirror.registerHelper("hint","javascript",e),CodeMirror.coffeescriptHint=g,CodeMirror.registerHelper("hint","coffeescript",g);var h="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),i="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),j="prototype apply call bind".split(" "),k="break case catch continue debugger default delete do else false finally for function if in instanceof new null return switch throw true try typeof var void while with".split(" "),l="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ")}(),function(){function d(a,b){JSHINT(a,b);var c=JSHINT.data().errors,d=[];return c&&h(c,d),d}function e(a){return f(a,b,"warning",!0),f(a,c,"error"),g(a)?null:a}function f(a,b,c,d){var e,f,g,h,i;e=a.description;for(var j=0;j0){var j=d.character;h.forEach(function(a){j>a&&(j-=1)}),d.character=j}}var k=d.character-1,l=k+1;d.evidence&&(g=d.evidence.substring(k).search(/.\b/),g>-1&&(l+=g)),d.description=d.reason,d.start=d.character,d.end=l,d=e(d),d&&b.push({message:d.description,severity:d.severity,from:CodeMirror.Pos(d.line-1,k),to:CodeMirror.Pos(d.line-1,l)})}}}var a=["Dangerous comment"],b=[["Expected '{'","Statement body should be inside '{ }' braces."]],c=["Missing semicolon","Extra comma","Missing property name","Unmatched "," and instead saw"," is not defined","Unclosed string","Stopping, unable to continue"];CodeMirror.registerHelper("lint","javascript",d),CodeMirror.javascriptValidator=CodeMirror.lint.javascript}(),function(){"use strict";function c(a,b){function d(a){return c.parentNode?(c.style.top=Math.max(0,a.clientY-c.offsetHeight-5)+"px",c.style.left=a.clientX+5+"px",void 0):CodeMirror.off(document,"mousemove",d)}var c=document.createElement("div");return c.className="CodeMirror-lint-tooltip",c.appendChild(b.cloneNode(!0)),document.body.appendChild(c),CodeMirror.on(document,"mousemove",d),d(a),null!=c.style.opacity&&(c.style.opacity=1),c}function d(a){a.parentNode&&a.parentNode.removeChild(a)}function e(a){a.parentNode&&(null==a.style.opacity&&d(a),a.style.opacity=0,setTimeout(function(){d(a)},600))}function f(a,b,d){function g(){CodeMirror.off(d,"mouseout",g),f&&(e(f),f=null)}var f=c(a,b),h=setInterval(function(){if(f)for(var a=d;;a=a.parentNode){if(a==document.body)return;if(!a){g();break}}return f?void 0:clearInterval(h)},400);CodeMirror.on(d,"mouseout",g)}function g(a,b,c){this.marked=[],this.options=b,this.timeout=null,this.hasGutter=c,this.onMouseOver=function(b){s(a,b)}}function h(a,b){if(b instanceof Function)return{getAnnotations:b};if(b&&b!==!0||(b={}),b.getAnnotations||(b.getAnnotations=a.getHelper(CodeMirror.Pos(0,0),"lint")),!b.getAnnotations)throw new Error("Required option 'getAnnotations' missing (lint addon)");return b}function i(b){var c=b.state.lint;c.hasGutter&&b.clearGutter(a);for(var d=0;d1,e.options.tooltips))}}f.onUpdateLinting&&f.onUpdateLinting(d,g,c)}function p(a){var b=a.state.lint;clearTimeout(b.timeout),b.timeout=setTimeout(function(){n(a)},b.options.delay||500)}function q(a,b){var c=b.target||b.srcElement;f(b,m(a),c)}function s(a,b){if(/\bCodeMirror-lint-mark-/.test((b.target||b.srcElement).className))for(var c=0;cf&&a.addOverlay(b.overlay=g(e.slice(f,h),c,b.style)),void 0}if(a.getCursor("head").line==a.getCursor("anchor").line){var i=a.getSelection().replace(/^\s+|\s+$/g,"");i.length>=b.minChars&&a.addOverlay(b.overlay=g(i,!1,b.style))}})}function f(a,b){return!(a.start&&b.test(a.string.charAt(a.start-1))||a.pos!=a.string.length&&b.test(a.string.charAt(a.pos)))}function g(a,b,c){return{token:function(d){return!d.match(a)||b&&!f(d,b)?(d.next(),d.skipTo(a.charAt(0))||d.skipToEnd(),void 0):c}}}var a=2,b="matchhighlight";CodeMirror.defineOption("highlightSelectionMatches",!1,function(a,b,f){if(f&&f!=CodeMirror.Init){var g=a.state.matchHighlighter.overlay;g&&a.removeOverlay(g),clearTimeout(a.state.matchHighlighter.timeout),a.state.matchHighlighter=null,a.off("cursorActivity",d)}b&&(a.state.matchHighlighter=new c(b),e(a),a.on("cursorActivity",d))})}(),function(){function b(b,c,d,e){if(this.atOccurrence=!1,this.doc=b,null==e&&"string"==typeof c&&(e=!1),d=d?b.clipPos(d):a(0,0),this.pos={from:d,to:d},"string"!=typeof c)c.global||(c=new RegExp(c.source,c.ignoreCase?"ig":"g")),this.matches=function(d,e){if(d){c.lastIndex=0;for(var h,i,f=b.getLine(e.line).slice(0,e.ch),g=0;;){c.lastIndex=g;var j=c.exec(f);if(!j)break;if(h=j,i=h.index,g=h.index+(h[0].length||1),g==f.length)break}var k=h&&h[0].length||0;k||(0==i&&0==f.length?h=void 0:i!=b.getLine(e.line).length&&k++)}else{c.lastIndex=e.ch;var f=b.getLine(e.line),h=c.exec(f),k=h&&h[0].length||0,i=h&&h.index;i+k==f.length||k||(k=1)}return h&&k?{from:a(e.line,i),to:a(e.line,i+k),match:h}:void 0};else{e&&(c=c.toLowerCase());var f=e?function(a){return a.toLowerCase()}:function(a){return a},g=c.split("\n");this.matches=1==g.length?c.length?function(d,e){var i,g=f(b.getLine(e.line)),h=c.length;return(d?e.ch>=h&&-1!=(i=g.lastIndexOf(c,e.ch-h)):-1!=(i=g.indexOf(c,e.ch)))?{from:a(e.line,i),to:a(e.line,i+h)}:void 0}:function(){}:function(c,d){var e=d.line,h=c?g.length-1:0,i=g[h],j=f(b.getLine(e)),k=c?j.indexOf(i)+i.length:j.lastIndexOf(i);if(!(c?k>=d.ch||k!=i.length:k<=d.ch||k!=j.length-i.length))for(;;){if(c?!e:e==b.lineCount()-1)return;if(j=f(b.getLine(e+=c?-1:1)),i=g[c?--h:++h],!(h>0&&h0&&(t.right-t.left>r&&(h.style.width=r-5+"px",u-=t.right-t.left-r),h.style.left=(o=n.left-u)+"px"),v>0){var w=t.bottom-t.top;t.top-(n.bottom-n.top)-w>0?(v=w+(n.bottom-n.top),q=!1):w>s&&(h.style.height=s-5+"px",v-=w-s),h.style.top=(p=n.bottom-v)+"px"}if((g.container||document.body).appendChild(h),f.addKeyMap(this.keyMap=c(g,{moveFocus:function(a){e.changeActive(e.selectedHint+a)},setFocus:function(a){e.changeActive(a)},menuSize:function(){return e.screenAmount()},length:i.length,close:function(){a.close()},pick:function(){e.pick()}})),g.closeOnUnfocus!==!1){var x;f.on("blur",this.onBlur=function(){x=setTimeout(function(){a.close()},100)}),f.on("focus",this.onFocus=function(){clearTimeout(x)})}var y=f.getScrollInfo();return f.on("scroll",this.onScroll=function(){var b=f.getScrollInfo(),c=f.getWrapperElement().getBoundingClientRect(),d=p+y.top-b.top,e=d-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return q||(e+=h.offsetHeight),e<=c.top||e>=c.bottom?a.close():(h.style.top=d+"px",h.style.left=o+y.left-b.left+"px",void 0)}),CodeMirror.on(h,"dblclick",function(a){var b=a.target||a.srcElement;null!=b.hintId&&(e.changeActive(b.hintId),e.pick())}),CodeMirror.on(h,"click",function(a){var b=a.target||a.srcElement;null!=b.hintId&&e.changeActive(b.hintId)}),CodeMirror.on(h,"mousedown",function(){setTimeout(function(){f.focus()},20)}),CodeMirror.signal(d,"select",i[0],h.firstChild),!0}CodeMirror.showHint=function(b,c,d){if(!b.somethingSelected()&&(null==c&&(c=b.getHelper(b.getCursor(),"hint")),null!=c)){b.state.completionActive&&b.state.completionActive.close();var e=b.state.completionActive=new a(b,c,d||{});return CodeMirror.signal(b,"startCompletion",b),e.options.async?(c(b,function(a){e.showHints(a)},e.options),void 0):e.showHints(c(b,e.options))}},a.prototype={close:function(){this.active()&&(this.widget&&this.widget.close(),this.onClose&&this.onClose(),this.cm.state.completionActive=null,CodeMirror.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(a,c){var d=a.list[c];d.hint?d.hint(this.cm,a,d):this.cm.replaceRange(b(d),a.from,a.to),this.close()},showHints:function(a){return a&&a.list.length&&this.active()?(0!=this.options.completeSingle&&1==a.list.length?this.pick(a,0):this.showWidget(a),void 0):this.close()},showWidget:function(a){function i(){e||(e=!0,c.close(),c.cm.off("cursorActivity",m),CodeMirror.signal(a,"close"))}function j(){return e?!0:c.widget?void 0:(i(),!0)}function k(){j()||(c.options.async?c.getHints(c.cm,l,c.options):l(c.getHints(c.cm,c.options)))}function l(a){if(!j()){if(!a||!a.list.length)return i();c.widget.close(),c.widget=new d(c,a)}}function m(){clearTimeout(b);var a=c.cm.getCursor(),d=c.cm.getLine(a.line);a.line!=g.line||d.length-a.ch!=h-g.ch||a.ch,]/,g=this.cm.getCursor(),h=this.cm.getLine(g.line).length;this.cm.on("cursorActivity",m),this.onClose=i}},d.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var a=this.completion.cm;this.completion.options.closeOnUnfocus!==!1&&(a.off("blur",this.onBlur),a.off("focus",this.onFocus)),a.off("scroll",this.onScroll)}},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(a){if(a=Math.max(0,Math.min(a,this.data.list.length-1)),this.selectedHint!=a){var b=this.hints.childNodes[this.selectedHint];b.className=b.className.replace(" CodeMirror-hint-active",""),b=this.hints.childNodes[this.selectedHint=a],b.className+=" CodeMirror-hint-active",b.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=b.offsetTop+b.offsetHeight-this.hints.clientHeight+3),CodeMirror.signal(this.data,"select",this.data.list[this.selectedHint],b)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}}}(),CodeMirror.defineOption("showTrailingSpace",!1,function(a,b,c){c==CodeMirror.Init&&(c=!1),c&&!b?a.removeOverlay("trailingspace"):!c&&b&&a.addOverlay({token:function(a){for(var b=a.string.length,c=b;c&&/\s/.test(a.string.charAt(c-1));--c);return c>a.pos?(a.pos=c,null):(a.pos=b,"trailingspace")},name:"trailingspace"})}),function(){"use strict";function b(a,b){return a.line-b.line||a.ch-b.ch}function f(a,b,c,d){this.line=b,this.ch=c,this.cm=a,this.text=a.getLine(b),this.min=d?d.from:a.firstLine(),this.max=d?d.to-1:a.lastLine()}function g(b,c){var d=b.cm.getTokenTypeAt(a(b.line,c));return d&&/\btag\b/.test(d)}function h(a){return a.line>=a.max?void 0:(a.ch=0,a.text=a.cm.getLine(++a.line),!0)}function i(a){return a.line<=a.min?void 0:(a.text=a.cm.getLine(--a.line),a.ch=a.text.length,!0)}function j(a){for(;;){var b=a.text.indexOf(">",a.ch);if(-1==b){if(h(a))continue;return}{if(g(a,b+1)){var c=a.text.lastIndexOf("/",b),d=c>-1&&!/\S/.test(a.text.slice(c+1,b));return a.ch=b+1,d?"selfClose":"regular"}a.ch=b+1}}}function k(a){for(;;){var b=a.ch?a.text.lastIndexOf("<",a.ch-1):-1;if(-1==b){if(i(a))continue;return}if(g(a,b+1)){e.lastIndex=b,a.ch=b;var c=e.exec(a.text);if(c&&c.index==b)return c}else a.ch=b}}function l(a){for(;;){e.lastIndex=a.ch;var b=e.exec(a.text);if(!b){if(h(a))continue;return}{if(g(a,b.index+1))return a.ch=b.index+b[0].length,b;a.ch=b.index+1}}}function m(a){for(;;){var b=a.ch?a.text.lastIndexOf(">",a.ch-1):-1;if(-1==b){if(i(a))continue;return}{if(g(a,b+1)){var c=a.text.lastIndexOf("/",b),d=c>-1&&!/\S/.test(a.text.slice(c+1,b));return a.ch=b+1,d?"selfClose":"regular"}a.ch=b}}}function n(b,c){for(var d=[];;){var f,e=l(b),g=b.line,h=b.ch-(e?e[0].length:0);if(!e||!(f=j(b)))return;if("selfClose"!=f)if(e[1]){for(var i=d.length-1;i>=0;--i)if(d[i]==e[2]){d.length=i;break}if(0>i&&(!c||c==e[2]))return{tag:e[2],from:a(g,h),to:a(b.line,b.ch)}}else d.push(e[2])}}function o(b,c){for(var d=[];;){var e=m(b);if(!e)return;if("selfClose"!=e){var f=b.line,g=b.ch,h=k(b);if(!h)return;if(h[1])d.push(h[2]);else{for(var i=d.length-1;i>=0;--i)if(d[i]==h[2]){d.length=i;break}if(0>i&&(!c||c==h[2]))return{tag:h[2],from:a(b.line,b.ch),to:a(f,g)}}}else k(b)}}var a=CodeMirror.Pos,c="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",d=c+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",e=new RegExp("<(/?)(["+c+"]["+d+"]*)","g");CodeMirror.registerHelper("fold","xml",function(b,c){for(var d=new f(b,c.line,0);;){var g,e=l(d);if(!e||d.line!=c.line||!(g=j(d)))return;if(!e[1]&&"selfClose"!=g){var c=a(d.line,d.ch),h=n(d,e[2]);return h&&{from:c,to:h.from}}}}),CodeMirror.tagRangeFinder=CodeMirror.fold.xml,CodeMirror.findMatchingTag=function(c,d,e){var h=new f(c,d.line,d.ch,e);if(g(h,h.ch)){var i=j(h),l=i&&a(h.line,h.ch),m=i&&k(h);if(i&&"selfClose"!=i&&m&&!(b(h,d)>0)){var p={from:a(h.line,h.ch),to:l,tag:m[2]};return m[1]?{open:o(h,m[2]),close:p,at:"close"}:(h=new f(c,l.line,l.ch,e),{open:p,close:n(h,m[2]),at:"open"})}}},CodeMirror.findEnclosingTag=function(a,b,c){for(var d=new f(a,b.line,b.ch,c);;){var e=o(d);if(!e)break;var g=new f(a,b.line,b.ch,c),h=n(g,e.tag);if(h)return{open:e,close:h}}}}(); \ No newline at end of file diff --git a/CodeMirror-3.14/LICENSE b/CodeMirror-3.15/LICENSE similarity index 100% rename from CodeMirror-3.14/LICENSE rename to CodeMirror-3.15/LICENSE diff --git a/CodeMirror-3.14/addon/hint/show-hint.css b/CodeMirror-3.15/addon/hint/show-hint.css similarity index 100% rename from CodeMirror-3.14/addon/hint/show-hint.css rename to CodeMirror-3.15/addon/hint/show-hint.css diff --git a/CodeMirror-3.15/addon/lint/lint.css b/CodeMirror-3.15/addon/lint/lint.css new file mode 100644 index 0000000..eb15381 --- /dev/null +++ b/CodeMirror-3.15/addon/lint/lint.css @@ -0,0 +1,96 @@ +/* The lint marker gutter */ +.CodeMirror-lint-markers { + width: 16px; +} + +.CodeMirror-lint-tooltip { + background-color: infobackground; + border: 1px solid black; + border-radius: 4px 4px 4px 4px; + color: infotext; + font-family: monospace; + font-size: 10pt; + overflow: hidden; + padding: 2px 5px; + position: fixed; + white-space: pre; + z-index: 100; + max-width: 600px; + opacity: 0; + transition: opacity .4s; + -moz-transition: opacity .4s; + -webkit-transition: opacity .4s; + -o-transition: opacity .4s; + -ms-transition: opacity .4s; +} + +.CodeMirror-lint-mark-error, .CodeMirror-lint-mark-warning { + background-position: left bottom; + background-repeat: repeat-x; +} + +.CodeMirror-lint-mark-error { + background-image: + url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==") + ; +} + +.CodeMirror-lint-mark-warning { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII="); +} + +.CodeMirror-lint-marker-error, .CodeMirror-lint-marker-warning { + background-position: center center; + background-repeat: no-repeat; + cursor: pointer; + display: inline-block; + height: 16px; + width: 16px; + vertical-align: middle; + position: relative; +} + +.CodeMirror-lint-message-error, .CodeMirror-lint-message-warning { + padding-left: 18px; + background-position: top left; + background-repeat: no-repeat; +} + +.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error { + background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAAPVvcvWHiPVucvRuc+ttcfV6f91KVN5LU99PV/FZY/JhaM4oN84pONE4Rd1ATfJLWutVYPRgbdxpcsgWKMgZKs4lNfE/UvE/U+artcpdSc5uXveimslHPuBhW/eJhfV5efaCgO2CgP+/v+PExP///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACUALAAAAAAQABAAAAZ+wJJwSCwaScgkySgkjTQZTkYzWhadnE5oE+pwqkSshwQqkzxfa4kkQXxEpA9J9EFI1KQGQQBAigYCBA14ExEWF0gXihETeA0QD3AkD5QQg0NsDnAJmwkOd5gYFSQKpXAFDBhqaxgLBwQBBAapq00YEg0UDRKqTGtKSL7Cw8JBADs="); +} + +.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning { + background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAAP7bc//egf/ij/7ijv/jl/7kl//mnv7lnv/uwf7CTP7DTf7DT/7IW//Na/7Na//NbP7QdP/dmbltAIJNAF03AMSAJMSCLKqASa2DS6uBSquCSrGHTq6ETbCHT7WKUrKIUcCVXL+UXMOYX8GWXsSZYMiib6+ETbOIUcOXX86uhd3Muf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACsALAAAAAAQABAAAAZowJVwSCwaj0ihikRSJYcoBEL0XKlGkcjImQQhJBREKFnyICoThKeE/AAW6AXgdPyUAgrLJBEo0YsbAQyDhAEdRRwDDw8OaA4NDQImRBgFEJdglxAEGEQZKQcHBqOkKRpFF6mqq1WtrUEAOw=="); +} + +.CodeMirror-lint-marker-multiple { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJEAQvB2JVdrAAAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAAAD1JREFUCNdtjkESADAEAzemf69f66HMqGlOIhYiFRFRtSQBWAY7mzx+EDTL6sSgb1jTk7Q87rxyqe37fXsAa78gLyZnRgEAAAAASUVORK5CYII="); + background-repeat: no-repeat; + background-position: right bottom; + width: 100%; height: 100%; +} + +/* Styles for the overview ruler +.annotationOverview { + cursor: pointer; + border-radius: 2px; + left: 2px; + width: 8px; +} +.annotationOverview.error { + background-color: lightcoral; + border: 1px solid darkred; +} +.annotationOverview.warning { + background-color: Gold; + border: 1px solid black; +} + +.annotationHTML.overlay { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJEAQvB2JVdrAAAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAAAD1JREFUCNdtjkESADAEAzemf69f66HMqGlOIhYiFRFRtSQBWAY7mzx+EDTL6sSgb1jTk7Q87rxyqe37fXsAa78gLyZnRgEAAAAASUVORK5CYII="); + background-position: right bottom; + position: relative; + top: -16px; +} +*/ \ No newline at end of file diff --git a/CodeMirror-3.15/lib/codemirror-compressed.js b/CodeMirror-3.15/lib/codemirror-compressed.js new file mode 100644 index 0000000..9b0fc6b --- /dev/null +++ b/CodeMirror-3.15/lib/codemirror-compressed.js @@ -0,0 +1,8 @@ +window.CodeMirror=function(){"use strict";function w(a,c){if(!(this instanceof w))return new w(a,c);this.options=c=c||{};for(var d in Xc)!c.hasOwnProperty(d)&&Xc.hasOwnProperty(d)&&(c[d]=Xc[d]);I(c);var e="string"==typeof c.value?0:c.value.first,f=this.display=x(a,e);f.wrapper.CodeMirror=this,F(this),c.autofocus&&!o&&Lb(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,draggingText:!1,highlight:new Te},D(this),c.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap");var g=c.value;"string"==typeof g&&(g=new ce(c.value,c.mode)),Db(this,ge)(this,g),b&&setTimeout(bf(Kb,this,!0),20),Nb(this);var h;try{h=document.activeElement==f.input}catch(i){}h||c.autofocus&&!o?setTimeout(bf(ic,this),20):jc(this),Db(this,function(){for(var a in Wc)Wc.propertyIsEnumerable(a)&&Wc[a](this,c[a],Zc);for(var b=0;bb.maxLineLength&&(b.maxLineLength=d,b.maxLine=a)})}function I(a){for(var b=!1,c=0;cb.scroller.clientWidth+1,g=e>b.scroller.clientHeight+1;g?(b.scrollbarV.style.display="block",b.scrollbarV.style.bottom=f?pf(b.measure)+"px":"0",b.scrollbarV.firstChild.style.height=e-b.scroller.clientHeight+b.scrollbarV.clientHeight+"px"):(b.scrollbarV.style.display="",b.scrollbarV.firstChild.style.height="0"),f?(b.scrollbarH.style.display="block",b.scrollbarH.style.right=g?pf(b.measure)+"px":"0",b.scrollbarH.firstChild.style.width=b.scroller.scrollWidth-b.scroller.clientWidth+b.scrollbarH.clientWidth+"px"):(b.scrollbarH.style.display="",b.scrollbarH.firstChild.style.width="0"),f&&g?(b.scrollbarFiller.style.display="block",b.scrollbarFiller.style.height=b.scrollbarFiller.style.width=pf(b.measure)+"px"):b.scrollbarFiller.style.display="",f&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(b.gutterFiller.style.display="block",b.gutterFiller.style.height=pf(b.measure)+"px",b.gutterFiller.style.width=b.gutters.offsetWidth+"px"):b.gutterFiller.style.display="",k&&0===pf(b.measure)&&(b.scrollbarV.style.minWidth=b.scrollbarH.style.minHeight=l?"18px":"12px")}function K(a,b,c){var d=a.scroller.scrollTop,e=a.wrapper.clientHeight;"number"==typeof c?d=c:c&&(d=c.top,e=c.bottom-c.top),d=Math.floor(d-eb(a));var f=Math.ceil(d+e);return{from:me(b,d),to:me(b,f)}}function L(a){var b=a.display;if(b.alignWidgets||b.gutters.firstChild&&a.options.fixedGutter){for(var c=O(b)-b.scroller.scrollLeft+a.doc.scrollLeft,d=b.gutters.offsetWidth,e=c+"px",f=b.lineDiv.firstChild;f;f=f.nextSibling)if(f.alignable)for(var g=0,h=f.alignable;g=a.display.showingFrom&&h.to<=a.display.showingTo));)b=[];return g&&(Me(a,"update",a),(a.display.showingFrom!=e||a.display.showingTo!=f)&&Me(a,"viewportChange",a,a.display.showingFrom,a.display.showingTo)),g}function Q(a,b,c,d){var e=a.display,f=a.doc;if(!e.wrapper.clientWidth)return e.showingFrom=e.showingTo=f.first,e.viewOffset=0,void 0;if(!(!d&&0==b.length&&c.from>e.showingFrom&&c.tol&&e.showingTo-l<20&&(l=Math.min(j,e.showingTo)),v)for(k=le(Bd(f,he(f,k)));j>l&&Cd(f,he(f,l));)++l;var m=[{from:Math.max(e.showingFrom,f.first),to:Math.min(e.showingTo,j)}];if(m=m[0].from>=m[0].to?[]:T(m,b),v)for(var i=0;in.from)){m.splice(i--,1);break}n.to=p}for(var q=0,i=0;il&&(n.to=l),n.from>=n.to?m.splice(i--,1):q+=n.to-n.from}if(!d&&q==l-k&&k==e.showingFrom&&l==e.showingTo)return S(a),void 0;m.sort(function(a,b){return a.from-b.from});try{var r=document.activeElement}catch(s){}.7*(l-k)>q&&(e.lineDiv.style.display="none"),V(a,k,l,m,h),e.lineDiv.style.display="",r&&document.activeElement!=r&&r.offsetHeight&&r.focus();var t=k!=e.showingFrom||l!=e.showingTo||e.lastSizeC!=e.wrapper.clientHeight;return t&&(e.lastSizeC=e.wrapper.clientHeight,ab(a,400)),e.showingFrom=k,e.showingTo=l,R(a),S(a),!0}}function R(a){for(var f,b=a.display,d=b.lineDiv.offsetTop,e=b.lineDiv.firstChild;e;e=e.nextSibling)if(e.lineObj){if(c){var g=e.offsetTop+e.offsetHeight;f=g-d,d=g}else{var h=lf(e);f=h.bottom-h.top}var i=e.lineObj.height-f;if(2>f&&(f=yb(b)),i>.001||-.001>i){ke(e.lineObj,f);var j=e.lineObj.widgets;if(j)for(var k=0;kc;++c){for(var e=b[c],f=[],g=e.diff||0,h=0,i=a.length;i>h;++h){var j=a[h];e.to<=j.from&&e.diff?f.push({from:j.from+g,to:j.to+g}):e.to<=j.from||e.from>=j.to?f.push(j):(e.from>j.from&&f.push({from:j.from,to:e.from}),e.ton){for(;k.lineObj!=b;)k=l(k);i&&n>=f&&k.lineNumber&&kf(k.lineNumber,N(a.options,n)),k=k.nextSibling}else{if(b.widgets)for(var s,q=0,r=k;r&&20>q;++q,r=r.nextSibling)if(r.lineObj==b&&/div/i.test(r.nodeName)){s=r;break}var t=W(a,b,n,g,s);if(t!=s)j.insertBefore(t,k);else{for(;k!=s;)k=l(k);k=k.nextSibling}t.lineObj=b}++n});k;)k=l(k)}function W(a,b,d,e,f){var j,g=Td(a,b),h=b.gutterMarkers,i=a.display;if(!(a.options.lineNumbers||h||b.bgClass||b.wrapClass||b.widgets))return g;if(f){f.alignable=null;for(var o,k=!0,l=0,m=null,n=f.firstChild;n;n=o)if(o=n.nextSibling,/\bCodeMirror-linewidget\b/.test(n.className)){for(var p=0;pb&&(b=0),e.appendChild(gf("div",null,"CodeMirror-selected","position: absolute; left: "+a+"px; top: "+b+"px; width: "+(null==c?f-a:c)+"px; height: "+(d-b)+"px"))}function i(b,d,e){function m(c,d){return sb(a,xc(b,c),"div",i,d)}var k,l,i=he(c,b),j=i.text.length;return wf(oe(i),d||0,null==e?j:e,function(a,b,c){var n,o,p,i=m(a,"left");if(a==b)n=i,o=p=i.left;else{if(n=m(b-1,"right"),"rtl"==c){var q=i;i=n,n=q}o=i.left,p=n.right}null==d&&0==a&&(o=g),n.top-i.top>3&&(h(o,i.top,null,i.bottom),o=g,i.bottoml.bottom||n.bottom==l.bottom&&n.right>l.right)&&(l=n),g+1>o&&(o=g),h(o,n.top,p-o,n.bottom)}),{start:k,end:l}}var b=a.display,c=a.doc,d=a.doc.sel,e=document.createDocumentFragment(),f=b.lineSpace.offsetWidth,g=gb(a.display);if(d.from.line==d.to.line)i(d.from.line,d.from.ch,d.to.ch);else{var j=he(c,d.from.line),k=he(c,d.to.line),l=Bd(c,j)==Bd(c,k),m=i(d.from.line,d.from.ch,l?j.text.length:null).end,n=i(d.to.line,l?0:null,d.to.ch).start;l&&(m.top=a.display.showingTo)){var f,c=+new Date+a.options.workTime,d=dd(b.mode,db(a,b.frontier)),e=[];b.iter(b.frontier,Math.min(b.first+b.size,a.display.showingTo+500),function(g){if(b.frontier>=a.display.showingFrom){var h=g.styles;g.styles=Od(a,g,d);for(var i=!h||h.length!=g.styles.length,j=0;!i&&jc?(ab(a,a.options.workDelay),!0):void 0}),e.length&&Db(a,function(){for(var a=0;ai;--h){if(h<=f.first)return f.first;var j=he(f,h-1);if(j.stateAfter&&(!c||h<=f.frontier))return h;var k=Ue(j.text,null,a.options.tabSize);(null==e||d>k)&&(e=h-1,d=k)}return e}function db(a,b,c){var d=a.doc,e=a.display;if(!d.mode.startState)return!0;var f=cb(a,b,c),g=f>d.first&&he(d,f-1).stateAfter;return g=g?dd(d.mode,g):ed(d.mode),d.iter(f,b,function(c){Qd(a,c,g);var h=f==b-1||0==f%5||f>=e.showingFrom&&ff&&0==g&&(f=1)}return e=g>c?"left":c>g?"right":e,"left"==e&&h.leftSide?h=h.leftSide:"right"==e&&h.rightSide&&(h=h.rightSide),{left:c>g?h.right:h.left,right:g>c?h.left:h.right,top:h.top,bottom:h.bottom}}function ib(a,b){for(var c=a.display.measureLineCache,d=0;ds&&(c=s),0>b&&(b=0);for(var d=q.length-2;d>=0;d-=2){var e=q[d],f=q[d+1];if(!(e>c||b>f)&&(b>=e&&f>=c||e>=b&&c>=f||Math.min(c,f)-Math.max(b,e)>=c-b>>1)){q[d]=Math.min(b,e),q[d+1]=Math.max(c,f);break}}return 0>d&&(d=q.length,q.push(b,c)),{left:a.left-p.left,right:a.right-p.left,top:d,bottom:null}}function u(a){a.bottom=q[a.top+1],a.top=q[a.top]}var f=a.display,g=af(e.text.length),h=Td(a,e,g,!0);if(b&&!c&&!a.options.lineWrapping&&h.childNodes.length>100){for(var i=document.createDocumentFragment(),j=10,k=h.childNodes.length,l=0,m=Math.ceil(k/j);m>l;++l){for(var n=gf("div",null,null,"display: inline-block"),o=0;j>o&&k;++o)n.appendChild(h.firstChild),--k;i.appendChild(n)}h.appendChild(i)}jf(f.measure,h);var p=lf(f.lineDiv),q=[],r=af(e.text.length),s=h.offsetHeight;d&&f.measure.first!=h&&jf(f.measure,h);for(var v,l=0;l1&&(x=r[l]=t(y[0]),x.rightSide=t(y[y.length-1]))}x||(x=r[l]=t(lf(w))),v.measureRight&&(x.right=lf(v.measureRight).left),v.leftSide&&(x.leftSide=t(lf(v.leftSide)))}hf(a.display.measure);for(var v,l=0;lc.from?f(a-1):f(a,d)}d=d||he(a.doc,b.line),e||(e=kb(a,d));var h=oe(d),i=b.ch;if(!h)return f(i);var j=Ff(h,i),k=g(i,j);return null!=Ef&&(k.other=g(i,Ef)),k}function ub(a,b,c,d){var e=new xc(a,b);return e.xRel=d,c&&(e.outside=!0),e}function vb(a,b,c){var d=a.doc;if(c+=a.display.viewOffset,0>c)return ub(d.first,0,!0,-1);var e=me(d,c),f=d.first+d.size-1;if(e>f)return ub(d.first+d.size-1,he(d,f).text.length,!0,1);for(0>b&&(b=0);;){var g=he(d,e),h=wb(a,g,e,b,c),i=Ad(g),j=i&&i.find();if(!i||!(h.ch>j.from.ch||h.ch==j.from.ch&&h.xRel>0))return h;e=j.to.line}}function wb(a,b,c,d,e){function j(d){var e=tb(a,xc(c,d),"line",b,i);return g=!0,f>e.bottom?e.left-h:fq)return ub(c,n,r,1);for(;;){if(k?n==m||n==Hf(b,m,1):1>=n-m){for(var s=o>d||q-d>=d-o?m:n,t=d-(s==m?o:q);ff.test(b.text.charAt(s));)++s;var u=ub(c,s,s==m?p:r,0>t?-1:t?1:0);return u}var v=Math.ceil(l/2),w=m+v;if(k){w=m;for(var x=0;v>x;++x)w=Hf(b,w,1)}var y=j(w);y>d?(n=w,q=y,(r=g)&&(q+=1e3),l=v):(m=w,o=y,p=g,l-=v)}}function yb(a){if(null!=a.cachedTextHeight)return a.cachedTextHeight;if(null==xb){xb=gf("pre");for(var b=0;49>b;++b)xb.appendChild(document.createTextNode("x")),xb.appendChild(gf("br"));xb.appendChild(document.createTextNode("x"))}jf(a.measure,xb);var c=xb.offsetHeight/50;return c>3&&(a.cachedTextHeight=c),hf(a.measure),c||1}function zb(a){if(null!=a.cachedCharWidth)return a.cachedCharWidth;var b=gf("span","x"),c=gf("pre",[b]);jf(a.measure,c);var d=b.offsetWidth;return d>2&&(a.cachedCharWidth=d),d||10}function Bb(a){a.curOp={changes:[],forceUpdate:!1,updateInput:null,userSelChange:null,textChanged:null,selectionChanged:!1,cursorActivity:!1,updateMaxLine:!1,updateScrollPos:!1,id:++Ab},Le++||(Ke=[])}function Cb(a){var b=a.curOp,c=a.doc,d=a.display;if(a.curOp=null,b.updateMaxLine&&H(a),d.maxLineChanged&&!a.options.lineWrapping&&d.maxLine){var e=mb(a,d.maxLine);d.sizer.style.minWidth=Math.max(0,e+3+Re)+"px",d.maxLineChanged=!1;var f=Math.max(0,d.sizer.offsetLeft+d.sizer.offsetWidth-d.scroller.clientWidth);fj&&e.charCodeAt(j)==h.charCodeAt(j);)++j;var l=g.from,m=g.to;j1e3||h.indexOf("\n")>-1?c.value=a.display.prevInput="":a.display.prevInput=h,i&&Cb(a),a.state.pasteIncoming=!1,!0}function Kb(a,c){var e,f,g=a.doc;if(yc(g.sel.from,g.sel.to))c&&(a.display.prevInput=a.display.input.value="",b&&!d&&(a.display.inputHasSelection=null));else{a.display.prevInput="",e=uf&&(g.sel.to.line-g.sel.from.line>100||(f=a.getSelection()).length>1e3);var h=e?"-":f||a.getSelection();a.display.input.value=h,a.state.focused&&Ye(a.display.input),b&&!d&&(a.display.inputHasSelection=h)}a.display.inaccurateSelection=e}function Lb(a){"nocursor"==a.options.readOnly||o&&document.activeElement==a.display.input||a.display.input.focus()}function Mb(a){return a.options.readOnly||a.doc.cantEdit}function Nb(a){function d(){a.state.focused&&setTimeout(bf(Lb,a),0)}function g(){null==f&&(f=setTimeout(function(){f=null,c.cachedCharWidth=c.cachedTextHeight=of=null,nb(a),Fb(a,bf(Gb,a))},100))}function h(){for(var a=c.wrapper.parentNode;a&&a!=document.body;a=a.parentNode);a?setTimeout(h,5e3):Ie(window,"resize",g)}function i(b){Ne(a,b)||a.options.onDragEvent&&a.options.onDragEvent(a,Ae(b))||Ee(b)}function k(){c.inaccurateSelection&&(c.prevInput="",c.inaccurateSelection=!1,c.input.value=a.getSelection(),Ye(c.input))}var c=a.display;He(c.scroller,"mousedown",Db(a,Sb)),b?He(c.scroller,"dblclick",Db(a,function(b){if(!Ne(a,b)){var c=Pb(a,b);if(c&&!Tb(a,b)&&!Ob(a.display,b)){Be(b);var d=Uc(he(a.doc,c.line).text,c);Fc(a.doc,d.from,d.to)}}})):He(c.scroller,"dblclick",function(b){Ne(a,b)||Be(b)}),He(c.lineSpace,"selectstart",function(a){Ob(c,a)||Be(a)}),t||He(c.scroller,"contextmenu",function(b){lc(a,b)}),He(c.scroller,"scroll",function(){c.scroller.clientHeight&&(Xb(a,c.scroller.scrollTop),Yb(a,c.scroller.scrollLeft,!0),Je(a,"scroll",a))}),He(c.scrollbarV,"scroll",function(){c.scroller.clientHeight&&Xb(a,c.scrollbarV.scrollTop)}),He(c.scrollbarH,"scroll",function(){c.scroller.clientHeight&&Yb(a,c.scrollbarH.scrollLeft)}),He(c.scroller,"mousewheel",function(b){_b(a,b)}),He(c.scroller,"DOMMouseScroll",function(b){_b(a,b)}),He(c.scrollbarH,"mousedown",d),He(c.scrollbarV,"mousedown",d),He(c.wrapper,"scroll",function(){c.wrapper.scrollTop=c.wrapper.scrollLeft=0});var f;He(window,"resize",g),setTimeout(h,5e3),He(c.input,"keyup",Db(a,function(b){Ne(a,b)||a.options.onKeyEvent&&a.options.onKeyEvent(a,Ae(b))||16==b.keyCode&&(a.doc.sel.shift=!1)})),He(c.input,"input",bf(Ib,a)),He(c.input,"keydown",Db(a,gc)),He(c.input,"keypress",Db(a,hc)),He(c.input,"focus",bf(ic,a)),He(c.input,"blur",bf(jc,a)),a.options.dragDrop&&(He(c.scroller,"dragstart",function(b){Wb(a,b)}),He(c.scroller,"dragenter",i),He(c.scroller,"dragover",i),He(c.scroller,"drop",Db(a,Vb))),He(c.scroller,"paste",function(b){Ob(c,b)||(Lb(a),Ib(a))}),He(c.input,"paste",function(){if(e&&!a.state.fakedLastChar){var b=c.input.selectionStart,d=c.input.selectionEnd;c.input.value+="$",c.input.selectionStart=b,c.input.selectionEnd=d,a.state.fakedLastChar=!0}a.state.pasteIncoming=!0,Ib(a)}),He(c.input,"cut",k),He(c.input,"copy",k),j&&He(c.sizer,"mouseup",function(){document.activeElement==c.input&&c.input.blur(),Lb(a)})}function Ob(a,b){for(var c=Fe(b);c!=a.wrapper;c=c.parentNode)if(!c||c.ignoreEvents||c.parentNode==a.sizer&&c!=a.mover)return!0}function Pb(a,b,c){var d=a.display;if(!c){var e=Fe(b);if(e==d.scrollbarH||e==d.scrollbarH.firstChild||e==d.scrollbarV||e==d.scrollbarV.firstChild||e==d.scrollbarFiller||e==d.gutterFiller)return null}var f,g,h=lf(d.lineSpace);try{f=b.clientX,g=b.clientY}catch(b){return null}return vb(a,f-h.left,g-h.top)}function Sb(a){function q(a){if(!yc(p,a)){if(p=a,"single"==j)return Fc(c.doc,Cc(f,h),a),void 0;if(n=Cc(f,n),o=Cc(f,o),"double"==j){var b=Uc(he(f,a.line).text,a);zc(a,n)?Fc(c.doc,b.from,o):Fc(c.doc,n,b.to)}else"triple"==j&&(zc(a,n)?Fc(c.doc,o,Cc(f,xc(a.line,0))):Fc(c.doc,n,Cc(f,xc(a.line+1,0))))}}function u(a){var b=++s,e=Pb(c,a,!0);if(e)if(yc(e,l)){var h=a.clientYr.bottom?20:0;h&&setTimeout(Db(c,function(){s==b&&(d.scroller.scrollTop+=h,u(a))}),50)}else{c.state.focused||ic(c),l=e,q(e);var g=K(d,f);(e.line>=g.to||e.linei-400&&yc(Rb.pos,h))j="triple",Be(a),setTimeout(bf(Lb,c),20),Vc(c,h.line);else if(Qb&&Qb.time>i-400&&yc(Qb.pos,h)){j="double",Rb={time:i,pos:h},Be(a);var k=Uc(he(f,h.line).text,h);Fc(c.doc,k.from,k.to)}else Qb={time:i,pos:h};var l=h;if(c.options.dragDrop&&mf&&!Mb(c)&&!yc(g.from,g.to)&&!zc(h,g.from)&&!zc(g.to,h)&&"single"==j){var m=Db(c,function(b){e&&(d.scroller.draggable=!1),c.state.draggingText=!1,Ie(document,"mouseup",m),Ie(d.scroller,"drop",m),Math.abs(a.clientX-b.clientX)+Math.abs(a.clientY-b.clientY)<10&&(Be(b),Fc(c.doc,h),Lb(c))});return e&&(d.scroller.draggable=!0),c.state.draggingText=m,d.scroller.dragDrop&&d.scroller.dragDrop(),He(document,"mouseup",m),He(d.scroller,"drop",m),void 0}Be(a),"single"==j&&Fc(c.doc,Cc(f,h));var n=g.from,o=g.to,p=h,r=lf(d.wrapper),s=0,w=Db(c,function(a){b||Ge(a)?u(a):v(a)}),x=Db(c,v);He(document,"mousemove",w),He(document,"mouseup",x)}}}function Tb(a,b){var c=a.display;try{var d=b.clientX,e=b.clientY}catch(b){return!1}if(d>=Math.floor(lf(c.gutters).right))return!1;if(Be(b),!Pe(a,"gutterClick"))return!0;var f=lf(c.lineDiv);if(e>f.bottom)return!0;e-=f.top-c.viewOffset;for(var g=0;g=d){var i=me(a.doc,e),j=a.options.gutters[g];Me(a,"gutterClick",a,i,j,b);break}}return!0}function Vb(a){var c=this;if(!(Ne(c,a)||Ob(c.display,a)||c.options.onDragEvent&&c.options.onDragEvent(c,Ae(a)))){Be(a),b&&(Ub=+new Date);var d=Pb(c,a,!0),e=a.dataTransfer.files;if(d&&!Mb(c))if(e&&e.length&&window.FileReader&&window.File)for(var f=e.length,g=Array(f),h=0,i=function(a,b){var e=new FileReader;e.onload=function(){g[b]=e.result,++h==f&&(d=Cc(c.doc,d),qc(c.doc,{from:d,to:d,text:sf(g.join("\n")),origin:"paste"},"around"))},e.readAsText(a)},j=0;f>j;++j)i(e[j],j);else{if(c.state.draggingText&&!zc(d,c.doc.sel.from)&&!zc(c.doc.sel.to,d))return c.state.draggingText(a),setTimeout(bf(Lb,c),20),void 0;try{var g=a.dataTransfer.getData("Text");if(g){var k=c.doc.sel.from,l=c.doc.sel.to;Hc(c.doc,d,d),c.state.draggingText&&wc(c.doc,"",k,l,"paste"),c.replaceSelection(g,null,"paste"),Lb(c),ic(c)}}catch(a){}}}}function Wb(a,c){if(b&&(!a.state.draggingText||+new Date-Ub<100))return Ee(c),void 0;if(!Ne(a,c)&&!Ob(a.display,c)){var d=a.getSelection();if(c.dataTransfer.setData("Text",d),c.dataTransfer.setDragImage&&!i){var e=gf("img",null,null,"position: fixed; left: 0; top: 0;");h&&(e.width=e.height=1,a.display.wrapper.appendChild(e),e._top=e.offsetTop),c.dataTransfer.setDragImage(e,0,0),h&&e.parentNode.removeChild(e)}}}function Xb(b,c){Math.abs(b.doc.scrollTop-c)<2||(b.doc.scrollTop=c,a||P(b,[],c),b.display.scroller.scrollTop!=c&&(b.display.scroller.scrollTop=c),b.display.scrollbarV.scrollTop!=c&&(b.display.scrollbarV.scrollTop=c),a&&P(b,[]),ab(b,100))}function Yb(a,b,c){(c?b==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-b)<2)||(b=Math.min(b,a.display.scroller.scrollWidth-a.display.scroller.clientWidth),a.doc.scrollLeft=b,L(a),a.display.scroller.scrollLeft!=b&&(a.display.scroller.scrollLeft=b),a.display.scrollbarH.scrollLeft!=b&&(a.display.scrollbarH.scrollLeft=b))}function _b(b,c){var d=c.wheelDeltaX,f=c.wheelDeltaY;null==d&&c.detail&&c.axis==c.HORIZONTAL_AXIS&&(d=c.detail),null==f&&c.detail&&c.axis==c.VERTICAL_AXIS?f=c.detail:null==f&&(f=c.wheelDelta);var g=b.display,i=g.scroller;if(d&&i.scrollWidth>i.clientWidth||f&&i.scrollHeight>i.clientHeight){if(f&&p&&e)for(var j=c.target;j!=i;j=j.parentNode)if(j.lineObj){b.display.currentWheelTarget=j;break}if(d&&!a&&!h&&null!=$b)return f&&Xb(b,Math.max(0,Math.min(i.scrollTop+f*$b,i.scrollHeight-i.clientHeight))),Yb(b,Math.max(0,Math.min(i.scrollLeft+d*$b,i.scrollWidth-i.clientWidth))),Be(c),g.wheelStartX=null,void 0;if(f&&null!=$b){var k=f*$b,l=b.doc.scrollTop,m=l+g.wrapper.clientHeight;0>k?l=Math.max(0,l+k-50):m=Math.min(b.doc.height,m+k+50),P(b,[],{top:l,bottom:m})}20>Zb&&(null==g.wheelStartX?(g.wheelStartX=i.scrollLeft,g.wheelStartY=i.scrollTop,g.wheelDX=d,g.wheelDY=f,setTimeout(function(){if(null!=g.wheelStartX){var a=i.scrollLeft-g.wheelStartX,b=i.scrollTop-g.wheelStartY,c=b&&g.wheelDY&&b/g.wheelDY||a&&g.wheelDX&&a/g.wheelDX;g.wheelStartX=g.wheelStartY=null,c&&($b=($b*Zb+c)/(Zb+1),++Zb)}},200)):(g.wheelDX+=d,g.wheelDY+=f))}}function ac(a,b,c){if("string"==typeof b&&(b=fd[b],!b))return!1;a.display.pollingFast&&Jb(a)&&(a.display.pollingFast=!1);var d=a.doc,e=d.sel.shift,f=!1;try{Mb(a)&&(a.state.suppressEdits=!0),c&&(d.sel.shift=!1),f=b(a)!=Se}finally{d.sel.shift=e,a.state.suppressEdits=!1}return f}function bc(a){var b=a.state.keyMaps.slice(0);return a.options.extraKeys&&b.push(a.options.extraKeys),b.push(a.options.keyMap),b}function dc(a,b){var c=hd(a.options.keyMap),e=c.auto;clearTimeout(cc),e&&!jd(b)&&(cc=setTimeout(function(){hd(a.options.keyMap)==c&&(a.options.keyMap=e.call?e.call(null,a):e,C(a))},50));var f=kd(b,!0),g=!1;if(!f)return!1;var h=bc(a);return g=b.shiftKey?id("Shift-"+f,h,function(b){return ac(a,b,!0)})||id(f,h,function(b){return("string"==typeof b?/^go[A-Z]/.test(b):b.motion)?ac(a,b):void 0}):id(f,h,function(b){return ac(a,b)}),g&&(Be(b),_(a),d&&(b.oldKeyCode=b.keyCode,b.keyCode=0),Me(a,"keyHandled",a,f,b)),g}function ec(a,b,c){var d=id("'"+c+"'",bc(a),function(b){return ac(a,b,!0)});return d&&(Be(b),_(a),Me(a,"keyHandled",a,"'"+c+"'",b)),d}function gc(a){var c=this;if(c.state.focused||ic(c),b&&27==a.keyCode&&(a.returnValue=!1),!(Ne(c,a)||c.options.onKeyEvent&&c.options.onKeyEvent(c,Ae(a)))){var d=a.keyCode;c.doc.sel.shift=16==d||a.shiftKey;var e=dc(c,a);h&&(fc=e?d:null,!e&&88==d&&!uf&&(p?a.metaKey:a.ctrlKey)&&c.replaceSelection(""))}}function hc(a){var c=this;if(!(Ne(c,a)||c.options.onKeyEvent&&c.options.onKeyEvent(c,Ae(a)))){var e=a.keyCode,f=a.charCode;if(h&&e==fc)return fc=null,Be(a),void 0;if(!(h&&(!a.which||a.which<10)||j)||!dc(c,a)){var g=String.fromCharCode(null==f?e:f);this.options.electricChars&&this.doc.mode.electricChars&&this.options.smartIndent&&!Mb(this)&&this.doc.mode.electricChars.indexOf(g)>-1&&setTimeout(Db(c,function(){Qc(c,c.doc.sel.to.line,"smart")}),75),ec(c,a,g)||(b&&!d&&(c.display.inputHasSelection=null),Ib(c))}}}function ic(a){"nocursor"!=a.options.readOnly&&(a.state.focused||(Je(a,"focus",a),a.state.focused=!0,-1==a.display.wrapper.className.search(/\bCodeMirror-focused\b/)&&(a.display.wrapper.className+=" CodeMirror-focused"),a.curOp||(Kb(a,!0),e&&setTimeout(bf(Kb,a,!0),0))),Hb(a),_(a))}function jc(a){a.state.focused&&(Je(a,"blur",a),a.state.focused=!1,a.display.wrapper.className=a.display.wrapper.className.replace(" CodeMirror-focused","")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.doc.sel.shift=!1)},150)}function lc(a,c){function k(){if(null!=e.input.selectionStart){var a=e.input.value=" "+(yc(f.from,f.to)?"":e.input.value);e.prevInput=" ",e.input.selectionStart=1,e.input.selectionEnd=a.length}}function l(){if(e.inputDiv.style.position="relative",e.input.style.cssText=j,d&&(e.scrollbarV.scrollTop=e.scroller.scrollTop=i),Hb(a),null!=e.input.selectionStart){(!b||d)&&k(),clearTimeout(kc);var c=0,f=function(){" "==e.prevInput&&0==e.input.selectionStart?Db(a,fd.selectAll)(a):c++<10?kc=setTimeout(f,500):Kb(a)};kc=setTimeout(f,200)}}if(!Ne(a,c,"contextmenu")){var e=a.display,f=a.doc.sel;if(!Ob(e,c)){var g=Pb(a,c),i=e.scroller.scrollTop;if(g&&!h){(yc(f.from,f.to)||zc(g,f.from)||!zc(g,f.to))&&Db(a,Hc)(a.doc,g,g);var j=e.input.style.cssText;if(e.inputDiv.style.position="absolute",e.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(c.clientY-5)+"px; left: "+(c.clientX-5)+"px; z-index: 1000; background: white; outline: none;"+"border-width: 0; outline: none; overflow: hidden; opacity: .05; -ms-opacity: .05; filter: alpha(opacity=5);",Lb(a),Kb(a,!0),yc(f.from,f.to)&&(e.input.value=e.prevInput=" "),b&&!d&&k(),t){Ee(c);var m=function(){Ie(window,"mouseup",m),setTimeout(l,20)};He(window,"mouseup",m)}else setTimeout(l,50)}}}}function nc(a,b,c){if(!zc(b.from,c))return Cc(a,c);var d=b.text.length-1-(b.to.line-b.from.line);if(c.line>b.to.line+d){var e=c.line-d,f=a.first+a.size-1;return e>f?xc(f,he(a,f).text.length):Dc(c,he(a,e).text.length)}if(c.line==b.to.line+d)return Dc(c,Xe(b.text).length+(1==b.text.length?b.from.ch:0)+he(a,b.to.line).text.length-b.to.ch);var g=c.line-b.from.line;return Dc(c,b.text[g].length+(g?0:b.from.ch))}function oc(a,b,c){if(c&&"object"==typeof c)return{anchor:nc(a,b,c.anchor),head:nc(a,b,c.head)};if("start"==c)return{anchor:b.from,head:b.from};var d=mc(b);if("around"==c)return{anchor:b.from,head:d};if("end"==c)return{anchor:d,head:d};var e=function(a){if(zc(a,b.from))return a;if(!zc(b.to,a))return d;var c=a.line+b.text.length-(b.to.line-b.from.line)-1,e=a.ch;return a.line==b.to.line&&(e+=d.ch-b.to.ch),xc(c,e)};return{anchor:e(a.sel.anchor),head:e(a.sel.head)}}function pc(a,b,c){var d={canceled:!1,from:b.from,to:b.to,text:b.text,origin:b.origin,cancel:function(){this.canceled=!0}};return c&&(d.update=function(b,c,d,e){b&&(this.from=Cc(a,b)),c&&(this.to=Cc(a,c)),d&&(this.text=d),void 0!==e&&(this.origin=e)}),Je(a,"beforeChange",a,d),a.cm&&Je(a.cm,"beforeChange",a.cm,d),d.canceled?null:{from:d.from,to:d.to,text:d.text,origin:d.origin}}function qc(a,b,c,d){if(a.cm){if(!a.cm.curOp)return Db(a.cm,qc)(a,b,c,d);if(a.cm.state.suppressEdits)return}if(!(Pe(a,"beforeChange")||a.cm&&Pe(a.cm,"beforeChange"))||(b=pc(a,b,!0))){var e=u&&!d&&xd(a,b.from,b.to);if(e){for(var f=e.length-1;f>=1;--f)rc(a,{from:e[f].from,to:e[f].to,text:[""]});e.length&&rc(a,{from:e[0].from,to:e[0].to,text:b.text},c)}else rc(a,b,c)}}function rc(a,b,c){var d=oc(a,b,c);se(a,b,d,a.cm?a.cm.curOp.id:0/0),uc(a,b,d,vd(a,b));var e=[];fe(a,function(a,c){c||-1!=Ze(e,a.history)||(ye(a.history,b),e.push(a.history)),uc(a,b,null,vd(a,b))})}function sc(a,b){if(!a.cm||!a.cm.state.suppressEdits){var c=a.history,d=("undo"==b?c.done:c.undone).pop();if(d){var e={changes:[],anchorBefore:d.anchorAfter,headBefore:d.headAfter,anchorAfter:d.anchorBefore,headAfter:d.headBefore,generation:c.generation};("undo"==b?c.undone:c.done).push(e),c.generation=d.generation||++c.maxGeneration;for(var f=Pe(a,"beforeChange")||a.cm&&Pe(a.cm,"beforeChange"),g=d.changes.length-1;g>=0;--g){var h=d.changes[g];if(h.origin=b,f&&!pc(a,h,!1))return("undo"==b?c.done:c.undone).length=0,void 0;e.changes.push(re(a,h));var i=g?oc(a,h,null):{anchor:d.anchorBefore,head:d.headBefore};uc(a,h,i,wd(a,h));var j=[];fe(a,function(a,b){b||-1!=Ze(j,a.history)||(ye(a.history,h),j.push(a.history)),uc(a,h,null,wd(a,h))})}}}}function tc(a,b){function c(a){return xc(a.line+b,a.ch)}a.first+=b,a.cm&&Gb(a.cm,a.first,a.first,b),a.sel.head=c(a.sel.head),a.sel.anchor=c(a.sel.anchor),a.sel.from=c(a.sel.from),a.sel.to=c(a.sel.to)}function uc(a,b,c,d){if(a.cm&&!a.cm.curOp)return Db(a.cm,uc)(a,b,c,d);if(b.to.linea.lastLine())){if(b.from.linef&&(b={from:b.from,to:xc(f,he(a,f).text.length),text:[b.text[0]],origin:b.origin}),b.removed=ie(a,b.from,b.to),c||(c=oc(a,b,null)),a.cm?vc(a.cm,b,d,c):$d(a,b,d,c)}}function vc(a,b,c,d){var e=a.doc,f=a.display,g=b.from,h=b.to,i=!1,j=g.line;a.options.lineWrapping||(j=le(Bd(e,he(e,g.line))),e.iter(j,h.line+1,function(a){return a==f.maxLine?(i=!0,!0):void 0})),zc(e.sel.head,b.from)||zc(b.to,e.sel.head)||(a.curOp.cursorActivity=!0),$d(e,b,c,d,A(a)),a.options.lineWrapping||(e.iter(j,g.line+b.text.length,function(a){var b=G(e,a);b>f.maxLineLength&&(f.maxLine=a,f.maxLineLength=b,f.maxLineChanged=!0,i=!1)}),i&&(a.curOp.updateMaxLine=!0)),e.frontier=Math.min(e.frontier,g.line),ab(a,400);var k=b.text.length-(h.line-g.line)-1;if(Gb(a,g.line,h.line+1,k),Pe(a,"change")){var l={from:g,to:h,text:b.text,removed:b.removed,origin:b.origin};if(a.curOp.textChanged){for(var m=a.curOp.textChanged;m.next;m=m.next);m.next=l}else a.curOp.textChanged=l}}function wc(a,b,c,d,e){if(d||(d=c),zc(d,c)){var f=d;d=c,c=f}"string"==typeof b&&(b=sf(b)),qc(a,{from:c,to:d,text:b,origin:e},null)}function xc(a,b){return this instanceof xc?(this.line=a,this.ch=b,void 0):new xc(a,b)}function yc(a,b){return a.line==b.line&&a.ch==b.ch}function zc(a,b){return a.linec?xc(c,he(a,c).text.length):Dc(b,he(a,b.line).text.length)}function Dc(a,b){var c=a.ch;return null==c||c>b?xc(a.line,b):0>c?xc(a.line,0):a}function Ec(a,b){return b>=a.first&&b=f.ch:j.to>f.ch))){if(d&&(Je(k,"beforeCursorEnter"),k.explicitlyCleared)){if(h.markedSpans){--i;continue}break}if(!k.atomic)continue;var l=k.find()[0>g?"from":"to"];if(yc(l,f)&&(l.ch+=g,l.ch<0?l=l.line>a.first?Cc(a,xc(l.line-1)):null:l.ch>h.text.length&&(l=l.line(window.innerHeight||document.documentElement.clientHeight)&&(e=!1),null!=e&&!m){var f="none"==c.cursor.style.display;f&&(c.cursor.style.display="",c.cursor.style.left=b.left+"px",c.cursor.style.top=b.top-c.viewOffset+"px"),c.cursor.scrollIntoView(e),f&&(c.cursor.style.display="none")}}}function Lc(a,b,c){for(null==c&&(c=0);;){var d=!1,e=tb(a,b),f=Nc(a,e.left,e.top-c,e.left,e.bottom+c),g=a.doc.scrollTop,h=a.doc.scrollLeft;if(null!=f.scrollTop&&(Xb(a,f.scrollTop),Math.abs(a.doc.scrollTop-g)>1&&(d=!0)),null!=f.scrollLeft&&(Yb(a,f.scrollLeft),Math.abs(a.doc.scrollLeft-h)>1&&(d=!0)),!d)return e}}function Mc(a,b,c,d,e){var f=Nc(a,b,c,d,e);null!=f.scrollTop&&Xb(a,f.scrollTop),null!=f.scrollLeft&&Yb(a,f.scrollLeft)}function Nc(a,b,c,d,e){var f=a.display,g=yb(a.display);0>c&&(c=0);var h=f.scroller.clientHeight-Re,i=f.scroller.scrollTop,j={},k=a.doc.height+fb(f),l=g>c,m=e>k-g;if(i>c)j.scrollTop=l?0:c;else if(e>i+h){var n=Math.min(c,(m?k:e)-h);n!=i&&(j.scrollTop=n)}var o=f.scroller.clientWidth-Re,p=f.scroller.scrollLeft;b+=f.gutters.offsetWidth,d+=f.gutters.offsetWidth;var q=f.gutters.offsetWidth,r=q+10>b;return p+q>b||r?(r&&(b=0),j.scrollLeft=Math.max(0,b-10-q)):d>o+p-3&&(j.scrollLeft=d+10-o),j}function Oc(a,b,c){a.curOp.updateScrollPos={scrollLeft:null==b?a.doc.scrollLeft:b,scrollTop:null==c?a.doc.scrollTop:c}}function Pc(a,b,c){var d=a.curOp.updateScrollPos||(a.curOp.updateScrollPos={scrollLeft:a.doc.scrollLeft,scrollTop:a.doc.scrollTop}),e=a.display.scroller;d.scrollTop=Math.max(0,Math.min(e.scrollHeight-e.clientHeight,d.scrollTop+c)),d.scrollLeft=Math.max(0,Math.min(e.scrollWidth-e.clientWidth,d.scrollLeft+b))}function Qc(a,b,c,d){var e=a.doc;if(null==c&&(c="add"),"smart"==c)if(a.doc.mode.indent)var f=db(a,b);else c="prev";var k,g=a.options.tabSize,h=he(e,b),i=Ue(h.text,null,g),j=h.text.match(/^\s*/)[0];if("smart"==c&&(k=a.doc.mode.indent(f,h.text.slice(j.length),h.text),k==Se)){if(!d)return;c="prev"}"prev"==c?k=b>e.first?Ue(he(e,b-1).text,null,g):0:"add"==c?k=i+a.options.indentUnit:"subtract"==c?k=i-a.options.indentUnit:"number"==typeof c&&(k=i+c),k=Math.max(0,k);var l="",m=0;if(a.options.indentWithTabs)for(var n=Math.floor(k/g);n;--n)m+=g,l+=" ";k>m&&(l+=We(k-m)),l!=j&&wc(a.doc,l,xc(b,0),xc(b,j.length),"+input"),h.stateAfter=null}function Rc(a,b,c){var d=b,e=b,f=a.doc;return"number"==typeof b?e=he(f,Bc(f,b)):d=le(b),null==d?null:c(e,d)?(Gb(a,d,d+1),e):null}function Sc(a,b,c,d,e){function k(){var b=f+c;return b=a.first+a.size?j=!1:(f=b,i=he(a,b))}function l(a){var b=(e?Hf:If)(i,g,c,!0);if(null==b){if(a||!k())return j=!1;g=e?(0>c?Af:zf)(i):0>c?i.text.length:0}else g=b;return!0}var f=b.line,g=b.ch,h=c,i=he(a,f),j=!0;if("char"==d)l();else if("column"==d)l(!0);else if("word"==d||"group"==d)for(var m=null,n="group"==d,o=!0;!(0>c)||l(!o);o=!1){var p=i.text.charAt(g)||"\n",q=df(p)?"w":n?/\s/.test(p)?null:"p":null;if(m&&m!=q){0>c&&(c=1,l());break}if(q&&(m=q),c>0&&!l(!o))break}var r=Jc(a,xc(f,g),h,!0);return j||(r.hitSide=!0),r}function Tc(a,b,c,d){var g,e=a.doc,f=b.left;if("page"==d){var h=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);g=b.top+c*(h-(0>c?1.5:.5)*yb(a.display))}else"line"==d&&(g=c>0?b.bottom+3:b.top-3);for(;;){var i=vb(a,f,g);if(!i.outside)break;if(0>c?0>=g:g>=e.height){i.hitSide=!0;break}g+=5*c}return i}function Uc(a,b){var c=b.ch,d=b.ch;if(a){(b.xRel<0||d==a.length)&&c?--c:++d;for(var e=a.charAt(c),f=df(e)?df:/\s/.test(e)?function(a){return/\s/.test(a)}:function(a){return!/\s/.test(a)&&!df(a)};c>0&&f(a.charAt(c-1));)--c;for(;dg;++g){var i=d(f[g]);if(i)return i}return!1}for(var e=0;e=b:f.to>b);(e||(e=[])).push({from:f.from,to:i?null:f.to,marker:g})}}return e}function ud(a,b,c){if(a)for(var e,d=0;d=b:f.to>b);if(h||"bookmark"==g.type&&f.from==b&&(!c||f.marker.insertLeft)){var i=null==f.from||(g.inclusiveLeft?f.from<=b:f.from0&&h)for(var l=0;ll;++l)o.push(q);o.push(i)}return o}function wd(a,b){var c=ue(a,b),d=vd(a,b);if(!c)return d;if(!d)return c;for(var e=0;eb)&&(!d||d.widtha.options.maxHighlightLength?(f=!1,i.pos=Math.min(b.length,i.start+5e4),j=null):j=c.token(i,d),f&&h==j||(gh;){var e=d[g];e>a&&d.splice(g,1,a,d[g+1],e),g+=2,h=Math.min(a,e)}if(b)if(f.opaque)d.splice(c,g-c,a,b),g=c+2;else for(;g>c;c+=2){var i=d[c+1];d[c+1]=i?i+" "+b:b}})}return d}function Pd(a,b){return b.styles&&b.styles[0]==a.state.modeGen||(b.styles=Od(a,b,b.stateAfter=db(a,le(b)))),b.styles}function Qd(a,b,c){var d=a.doc.mode,e=new ld(b.text,a.options.tabSize);for(""==b.text&&d.blankLine&&d.blankLine(c);!e.eol()&&e.pos<=a.options.maxHighlightLength;)d.token(e,c),e.start=e.pos}function Sd(a){return a?Rd[a]||(Rd[a]="cm-"+a.replace(/ +/g," cm-")):null}function Td(a,c,d,f){for(var g,h=c,i=!0;g=zd(h);)h=he(a.doc,g.find().from.line);var j={pre:gf("pre"),col:0,pos:0,measure:null,measuredSomething:!1,cm:a,copyWidgets:f};h.textClass&&(j.pre.className=h.textClass);do{h.text&&(i=!1),j.measure=h==c&&d,j.pos=0,j.addToken=j.measure?Wd:Vd,(b||e)&&a.getOption("lineWrapping")&&(j.addToken=Xd(j.addToken));var k=Zd(h,j,Pd(a,h));d&&h==c&&!j.measuredSomething&&(d[0]=j.pre.appendChild(rf(a.display.measure)),j.measuredSomething=!0),k&&(h=he(a.doc,k.to.line))}while(k);!d||j.measuredSomething||d[0]||(d[0]=j.pre.appendChild(i?gf("span","\xa0"):rf(a.display.measure))),j.pre.firstChild||Cd(a.doc,c)||j.pre.appendChild(document.createTextNode("\xa0"));var l;if(d&&b&&(l=oe(h))){var m=l.length-1;l[m].from==l[m].to&&--m;var n=l[m],o=l[m-1];if(n.from+1==n.to&&o&&n.level="\ud800"&&"\udbff">i&&hi)?(null!=t.to&&l>t.to&&(l=t.to,n=""),u.className&&(m+=" "+u.className),u.startStyle&&t.from==i&&(o+=" "+u.startStyle),u.endStyle&&t.to==l&&(n+=" "+u.endStyle),u.title&&!p&&(p=u.title),u.collapsed&&(!q||q.marker.sizei&&l>t.from&&(l=t.from),"bookmark"==u.type&&t.from==i&&u.replacedWith&&r.push(u)}if(q&&(q.from||0)==i&&(Yd(b,(null==q.to?h:q.to)-i,q.marker,null==q.from),null==q.to))return q.marker.find();if(!q&&r.length)for(var s=0;s=h)break;for(var v=Math.min(h,l);;){if(j){var w=i+j.length;if(!q){var x=w>v?j.slice(0,v-i):j;b.addToken(b,x,k?k+m:m,o,i+x.length==l?n:"",p)}if(w>=v){j=j.slice(v-i),i=v;break}i=w,o=""}j=e.slice(f,f=c[g++]),k=Sd(c[g++])}}else for(var g=1;gp;++p)r.push(new Kd(j[p],f(p),e));g(l,l.text,n),o&&a.remove(h.line,o),r.length&&a.insert(h.line,r)}else if(k==l)if(1==j.length)g(k,k.text.slice(0,h.ch)+m+k.text.slice(i.ch),n);else{for(var r=[],p=1,q=j.length-1;q>p;++p)r.push(new Kd(j[p],f(p),e));r.push(new Kd(m+k.text.slice(i.ch),n,e)),g(k,k.text.slice(0,h.ch)+j[0],f(0)),a.insert(h.line+1,r)}else if(1==j.length)g(k,k.text.slice(0,h.ch)+j[0]+l.text.slice(i.ch),f(0)),a.remove(h.line+1,o);else{g(k,k.text.slice(0,h.ch)+j[0],f(0)),g(l,m+l.text.slice(i.ch),n);for(var p=1,q=j.length-1,r=[];q>p;++p)r.push(new Kd(j[p],f(p),e));o>1&&a.remove(h.line+1,o-1),a.insert(h.line+1,r)}Me(a,"change",a,b),Hc(a,d.anchor,d.head,null,!0)}function _d(a){this.lines=a,this.parent=null;for(var b=0,c=a.length,d=0;c>b;++b)a[b].parent=this,d+=a[b].height;this.height=d}function ae(a){this.children=a;for(var b=0,c=0,d=0,e=a.length;e>d;++d){var f=a[d];b+=f.chunkSize(),c+=f.height,f.parent=this}this.size=b,this.height=c,this.parent=null}function fe(a,b,c){function d(a,e,f){if(a.linked)for(var g=0;gb){a=d;break}b-=e}return a.lines[b]}function ie(a,b,c){var d=[],e=b.line;return a.iter(b.line,c.line+1,function(a){var f=a.text;e==c.line&&(f=f.slice(0,c.ch)),e==b.line&&(f=f.slice(b.ch)),d.push(f),++e}),d}function je(a,b,c){var d=[];return a.iter(b,c,function(a){d.push(a.text)}),d}function ke(a,b){for(var c=b-a.height,d=a;d;d=d.parent)d.height+=c}function le(a){if(null==a.parent)return null;for(var b=a.parent,c=Ze(b.lines,a),d=b.parent;d;b=d,d=d.parent)for(var e=0;d.children[e]!=b;++e)c+=d.children[e].chunkSize();return c+b.first}function me(a,b){var c=a.first;a:do{for(var d=0,e=a.children.length;e>d;++d){var f=a.children[d],g=f.height;if(g>b){a=f;continue a}b-=g,c+=f.chunkSize()}return c}while(!a.lines);for(var d=0,e=a.lines.length;e>d;++d){var h=a.lines[d],i=h.height;if(i>b)break;b-=i}return c+d}function ne(a,b){b=Bd(a.doc,b);for(var c=0,d=b.parent,e=0;ef-a.cm.options.historyEventDelay||"*"==b.origin.charAt(0)))){var h=Xe(g.changes);yc(b.from,b.to)&&yc(b.from,h.to)?h.to=mc(b):g.changes.push(re(a,b)),g.anchorAfter=c.anchor,g.headAfter=c.head}else for(g={changes:[re(a,b)],generation:e.generation,anchorBefore:a.sel.anchor,headBefore:a.sel.head,anchorAfter:c.anchor,headAfter:c.head},e.done.push(g),e.generation=++e.maxGeneration;e.done.length>e.undoDepth;)e.done.shift();e.lastTime=f,e.lastOp=d,e.lastOrigin=b.origin}function te(a){if(!a)return null;for(var c,b=0;b-1&&(Xe(g)[k]=i[k],delete i[k])}}return d}function we(a,b,c,d){c0}function Qe(a){a.prototype.on=function(a,b){He(this,a,b)},a.prototype.off=function(a,b){Ie(this,a,b)}}function Te(){this.id=null}function Ue(a,b,c,d,e){null==b&&(b=a.search(/[^\s\u00a0]/),-1==b&&(b=a.length));for(var f=d||0,g=e||0;b>f;++f)" "==a.charAt(f)?g+=c-g%c:++g;return g}function We(a){for(;Ve.length<=a;)Ve.push(Xe(Ve)+" ");return Ve[a]}function Xe(a){return a[a.length-1]}function Ye(a){if(n)a.selectionStart=0,a.selectionEnd=a.value.length;else try{a.select()}catch(b){}}function Ze(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;d>c;++c)if(a[c]==b)return c;return-1}function $e(a,b){function c(){}c.prototype=a;var d=new c;return b&&_e(b,d),d}function _e(a,b){b||(b={});for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function af(a){for(var b=[],c=0;a>c;++c)b.push(void 0);return b}function bf(a){var b=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,b)}}function df(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||cf.test(a))}function ef(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}function gf(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),"string"==typeof b)kf(e,b);else if(b)for(var f=0;f0;--b)a.removeChild(a.firstChild);return a}function jf(a,b){return hf(a).appendChild(b)}function kf(a,b){d?(a.innerHTML="",a.appendChild(document.createTextNode(b))):a.textContent=b}function lf(a){return a.getBoundingClientRect()}function nf(){return!1}function pf(a){if(null!=of)return of;var b=gf("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");return jf(a,b),b.offsetWidth&&(of=b.offsetHeight-b.clientHeight),of||0}function rf(a){if(null==qf){var b=gf("span","\u200b");jf(a,gf("span",[b,document.createTextNode("x")])),0!=a.firstChild.offsetHeight&&(qf=b.offsetWidth<=1&&b.offsetHeight>2&&!c)}return qf?gf("span","\u200b"):gf("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px")}function wf(a,b,c,d){if(!a)return d(b,c,"ltr");for(var e=!1,f=0;fb||b==c&&g.to==b)&&(d(Math.max(g.from,b),Math.min(g.to,c),1==g.level?"rtl":"ltr"),e=!0)}e||d(b,c,"ltr")}function xf(a){return a.level%2?a.to:a.from}function yf(a){return a.level%2?a.from:a.to}function zf(a){var b=oe(a);return b?xf(b[0]):0}function Af(a){var b=oe(a);return b?yf(Xe(b)):a.text.length}function Bf(a,b){var c=he(a.doc,b),d=Bd(a.doc,c);d!=c&&(b=le(d));var e=oe(d),f=e?e[0].level%2?Af(d):zf(d):0;return xc(b,f)}function Cf(a,b){for(var c,d;c=Ad(d=he(a.doc,b));)b=c.find().to.line;var e=oe(d),f=e?e[0].level%2?zf(d):Af(d):d.text.length;return xc(b,f)}function Df(a,b,c){var d=a[0].level;return b==d?!0:c==d?!1:c>b}function Ff(a,b){for(var d,c=0;cb)return Ef=null,c;if(e.from==b||e.to==b){if(null!=d)return Df(a,e.level,a[d].level)?(Ef=d,c):(Ef=c,d);d=c}}return Ef=null,d}function Gf(a,b,c,d){if(!d)return b+c;do b+=c;while(b>0&&ff.test(a.text.charAt(b)));return b}function Hf(a,b,c,d){var e=oe(a);if(!e)return If(a,b,c,d);for(var f=Ff(e,b),g=e[f],h=Gf(a,b,g.level%2?-c:c,d);;){if(h>g.from&&h0==g.level%2?g.to:g.from);if(g=e[f+=c],!g)return null;h=c>0==g.level%2?Gf(a,g.to,-1,d):Gf(a,g.from,1,d)}}function If(a,b,c,d){var e=b+c;if(d)for(;e>0&&ff.test(a.text.charAt(e));)e+=c;return 0>e||e>a.text.length?null:e}var a=/gecko\/\d/i.test(navigator.userAgent),b=/MSIE \d/.test(navigator.userAgent),c=b&&(null==document.documentMode||document.documentMode<8),d=b&&(null==document.documentMode||document.documentMode<9),e=/WebKit\//.test(navigator.userAgent),f=e&&/Qt\/\d+\.\d+/.test(navigator.userAgent),g=/Chrome\//.test(navigator.userAgent),h=/Opera\//.test(navigator.userAgent),i=/Apple Computer/.test(navigator.vendor),j=/KHTML\//.test(navigator.userAgent),k=/Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent),l=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),m=/PhantomJS/.test(navigator.userAgent),n=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),o=n||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),p=n||/Mac/.test(navigator.platform),q=/windows/i.test(navigator.platform),r=h&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);r&&(r=Number(r[1])),r&&r>=15&&(h=!1,e=!0);var xb,Qb,Rb,s=p&&(f||h&&(null==r||12.11>r)),t=a||b&&!d,u=!1,v=!1,Ab=0,Ub=0,Zb=0,$b=null;b?$b=-.53:a?$b=15:g?$b=-.7:i&&($b=-1/3);var cc,kc,fc=null,mc=w.changeEnd=function(a){return a.text?xc(a.from.line+a.text.length-1,Xe(a.text).length+(1==a.text.length?a.from.ch:0)):a.to};w.Pos=xc,w.prototype={constructor:w,focus:function(){window.focus(),Lb(this),ic(this),Ib(this)},setOption:function(a,b){var c=this.options,d=c[a];(c[a]!=b||"mode"==a)&&(c[a]=b,Wc.hasOwnProperty(a)&&Db(this,Wc[a])(this,b,d))},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},addKeyMap:function(a,b){this.state.keyMaps[b?"push":"unshift"](a)},removeKeyMap:function(a){for(var b=this.state.keyMaps,c=0;c=d;++d)Qc(this,d,a)}),getTokenAt:function(a,b){var c=this.doc;a=Cc(c,a);for(var d=db(this,a.line,b),e=this.doc.mode,f=he(c,a.line),g=new ld(f.text,this.options.tabSize);g.pos>1;if((f?b[2*f-1]:0)>=e)d=f;else{if(!(b[2*f+1]d&&(a=d,c=!0);var e=he(this.doc,a);return qb(this,he(this.doc,a),{top:0,left:0},b||"page").top+(c?e.height:0)},defaultTextHeight:function(){return yb(this.display)},defaultCharWidth:function(){return zb(this.display)},setGutterMarker:Db(null,function(a,b,c){return Rc(this,a,function(a){var d=a.gutterMarkers||(a.gutterMarkers={});return d[b]=c,!c&&ef(d)&&(a.gutterMarkers=null),!0})}),clearGutter:Db(null,function(a){var b=this,c=b.doc,d=c.first;c.iter(function(c){c.gutterMarkers&&c.gutterMarkers[a]&&(c.gutterMarkers[a]=null,Gb(b,d,d+1),ef(c.gutterMarkers)&&(c.gutterMarkers=null)),++d})}),addLineClass:Db(null,function(a,b,c){return Rc(this,a,function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"wrapClass";if(a[d]){if(new RegExp("(?:^|\\s)"+c+"(?:$|\\s)").test(a[d]))return!1;a[d]+=" "+c}else a[d]=c;return!0})}),removeLineClass:Db(null,function(a,b,c){return Rc(this,a,function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"wrapClass",e=a[d];if(!e)return!1;if(null==c)a[d]=null;else{var f=e.match(new RegExp("(?:^|\\s+)"+c+"(?:$|\\s+)"));if(!f)return!1;var g=f.index+f[0].length;a[d]=e.slice(0,f.index)+(f.index&&g!=e.length?" ":"")+e.slice(g)||null}return!0})}),addLineWidget:Db(null,function(a,b,c){return Jd(this,a,b,c)}),removeLineWidget:function(a){a.clear()},lineInfo:function(a){if("number"==typeof a){if(!Ec(this.doc,a))return null;var b=a;if(a=he(this.doc,a),!a)return null}else{var b=le(a);if(null==b)return null}return{line:b,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},getViewport:function(){return{from:this.display.showingFrom,to:this.display.showingTo}},addWidget:function(a,b,c,d,e){var f=this.display;a=tb(this,Cc(this.doc,a));var g=a.bottom,h=a.left;if(b.style.position="absolute",f.sizer.appendChild(b),"over"==d)g=a.top;else if("above"==d||"near"==d){var i=Math.max(f.wrapper.clientHeight,this.doc.height),j=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);("above"==d||a.bottom+b.offsetHeight>i)&&a.top>b.offsetHeight?g=a.top-b.offsetHeight:a.bottom+b.offsetHeight<=i&&(g=a.bottom),h+b.offsetWidth>j&&(h=j-b.offsetWidth)}b.style.top=g+"px",b.style.left=b.style.right="","right"==e?(h=f.sizer.clientWidth-b.offsetWidth,b.style.right="0px"):("left"==e?h=0:"middle"==e&&(h=(f.sizer.clientWidth-b.offsetWidth)/2),b.style.left=h+"px"),c&&Mc(this,h,g,h+b.offsetWidth,g+b.offsetHeight)},triggerOnKeyDown:Db(null,gc),execCommand:function(a){return fd[a](this)},findPosH:function(a,b,c,d){var e=1;0>b&&(e=-1,b=-b);for(var f=0,g=Cc(this.doc,a);b>f&&(g=Sc(this.doc,g,e,c,d),!g.hitSide);++f);return g},moveH:Db(null,function(a,b){var d,c=this.doc.sel;d=c.shift||c.extend||yc(c.from,c.to)?Sc(this.doc,c.head,a,b,this.options.rtlMoveVisually):0>a?c.from:c.to,Fc(this.doc,d,d,a)}),deleteH:Db(null,function(a,b){var c=this.doc.sel;yc(c.from,c.to)?wc(this.doc,"",c.from,Sc(this.doc,c.head,a,b,!1),"+delete"):wc(this.doc,"",c.from,c.to,"+delete"),this.curOp.userSelChange=!0}),findPosV:function(a,b,c,d){var e=1,f=d;0>b&&(e=-1,b=-b);for(var g=0,h=Cc(this.doc,a);b>g;++g){var i=tb(this,h,"div");if(null==f?f=i.left:i.left=f,h=Tc(this,i,e,c),h.hitSide)break}return h},moveV:Db(null,function(a,b){var c=this.doc.sel,d=tb(this,c.head,"div");null!=c.goalColumn&&(d.left=c.goalColumn);var e=Tc(this,d,a,b);"page"==b&&Pc(this,0,sb(this,e,"div").top-d.top),Fc(this.doc,e,e,a),c.goalColumn=d.left}),toggleOverwrite:function(a){(null==a||a!=this.state.overwrite)&&((this.state.overwrite=!this.state.overwrite)?this.display.cursor.className+=" CodeMirror-overwrite":this.display.cursor.className=this.display.cursor.className.replace(" CodeMirror-overwrite",""))},hasFocus:function(){return this.state.focused},scrollTo:Db(null,function(a,b){Oc(this,a,b)}),getScrollInfo:function(){var a=this.display.scroller,b=Re;return{left:a.scrollLeft,top:a.scrollTop,height:a.scrollHeight-b,width:a.scrollWidth-b,clientHeight:a.clientHeight-b,clientWidth:a.clientWidth-b}},scrollIntoView:Db(null,function(a,b){"number"==typeof a&&(a=xc(a,0)),b||(b=0);var c=a;a&&null==a.line||(this.curOp.scrollToPos=a?Cc(this.doc,a):this.doc.sel.head,this.curOp.scrollToPosMargin=b,c=tb(this,this.curOp.scrollToPos));var d=Nc(this,c.left,c.top-b,c.right,c.bottom+b);Oc(this,d.scrollLeft,d.scrollTop)}),setSize:Db(null,function(a,b){function c(a){return"number"==typeof a||/^\d+$/.test(String(a))?a+"px":a}null!=a&&(this.display.wrapper.style.width=c(a)),null!=b&&(this.display.wrapper.style.height=c(b)),this.options.lineWrapping&&(this.display.measureLineCache.length=this.display.measureLineCachePos=0),this.curOp.forceUpdate=!0}),operation:function(a){return Fb(this,a)},refresh:Db(null,function(){nb(this),Oc(this,this.doc.scrollLeft,this.doc.scrollTop),Gb(this)}),swapDoc:Db(null,function(a){var b=this.doc;return b.cm=null,ge(this,a),nb(this),Kb(this,!0),Oc(this,a.scrollLeft,a.scrollTop),b}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Qe(w);var Wc=w.optionHandlers={},Xc=w.defaults={},Zc=w.Init={toString:function(){return"CodeMirror.Init"}};Yc("value","",function(a,b){a.setValue(b)},!0),Yc("mode",null,function(a,b){a.doc.modeOption=b,y(a)},!0),Yc("indentUnit",2,y,!0),Yc("indentWithTabs",!1),Yc("smartIndent",!0),Yc("tabSize",4,function(a){y(a),nb(a),Gb(a)},!0),Yc("electricChars",!0),Yc("rtlMoveVisually",!q),Yc("theme","default",function(a){D(a),E(a)},!0),Yc("keyMap","default",C),Yc("extraKeys",null),Yc("onKeyEvent",null),Yc("onDragEvent",null),Yc("lineWrapping",!1,z,!0),Yc("gutters",[],function(a){I(a.options),E(a)},!0),Yc("fixedGutter",!0,function(a,b){a.display.gutters.style.left=b?O(a.display)+"px":"0",a.refresh()},!0),Yc("coverGutterNextToScrollbar",!1,J,!0),Yc("lineNumbers",!1,function(a){I(a.options),E(a)},!0),Yc("firstLineNumber",1,E,!0),Yc("lineNumberFormatter",function(a){return a},E,!0),Yc("showCursorWhenSelecting",!1,Y,!0),Yc("readOnly",!1,function(a,b){"nocursor"==b?(jc(a),a.display.input.blur()):b||Kb(a,!0)}),Yc("dragDrop",!0),Yc("cursorBlinkRate",530),Yc("cursorScrollMargin",0),Yc("cursorHeight",1),Yc("workTime",100),Yc("workDelay",100),Yc("flattenSpans",!0),Yc("pollInterval",100),Yc("undoDepth",40,function(a,b){a.doc.history.undoDepth=b}),Yc("historyEventDelay",500),Yc("viewportMargin",10,function(a){a.refresh()},!0),Yc("maxHighlightLength",1e4,function(a){y(a),a.refresh()},!0),Yc("moveInputWithCursor",!0,function(a,b){b||(a.display.inputDiv.style.top=a.display.inputDiv.style.left=0)}),Yc("tabindex",null,function(a,b){a.display.input.tabIndex=b||""}),Yc("autofocus",null);var $c=w.modes={},_c=w.mimeModes={};w.defineMode=function(a,b){if(w.defaults.mode||"null"==a||(w.defaults.mode=a),arguments.length>2){b.dependencies=[];for(var c=2;c0&&b.ch=this.string.length},sol:function(){return 0==this.pos},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.posb},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){var b=this.string.indexOf(a,this.pos);return b>-1?(this.pos=b,!0):void 0},backUp:function(a){this.pos-=a},column:function(){return this.lastColumnPos0?null:(f&&b!==!1&&(this.pos+=f[0].length),f)}var d=function(a){return c?a.toLowerCase():a},e=this.string.substr(this.pos,a.length);return d(e)==d(a)?(b!==!1&&(this.pos+=a.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)}},w.StringStream=ld,w.TextMarker=md,Qe(md),md.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,b=a&&!a.curOp;if(b&&Bb(a),Pe(this,"clear")){var c=this.find();c&&Me(this,"clear",c.from,c.to)}for(var d=null,e=null,f=0;fa.display.maxLineLength&&(a.display.maxLine=i,a.display.maxLineLength=j,a.display.maxLineChanged=!0)}null!=d&&a&&Gb(a,d,e+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Ic(a)),b&&Cb(a)}},md.prototype.find=function(){for(var a,b,c=0;c=b.display.showingFrom&&a.linec;++c){var e=this.lines[c];this.height-=e.height,Md(e),Me(e,"delete")}this.lines.splice(a,b)},collapse:function(a){a.splice.apply(a,[a.length,0].concat(this.lines))},insertInner:function(a,b,c){this.height+=c,this.lines=this.lines.slice(0,a).concat(b).concat(this.lines.slice(a));for(var d=0,e=b.length;e>d;++d)b[d].parent=this},iterN:function(a,b,c){for(var d=a+b;d>a;++a)if(c(this.lines[a]))return!0}},ae.prototype={chunkSize:function(){return this.size},removeInner:function(a,b){this.size-=b;for(var c=0;ca){var f=Math.min(b,e-a),g=d.height;if(d.removeInner(a,f),this.height-=g-d.height,e==f&&(this.children.splice(c--,1),d.parent=null),0==(b-=f))break;a=0}else a-=e}if(this.size-b<25){var h=[];this.collapse(h),this.children=[new _d(h)],this.children[0].parent=this}},collapse:function(a){for(var b=0,c=this.children.length;c>b;++b)this.children[b].collapse(a)},insertInner:function(a,b,c){this.size+=b.length,this.height+=c;for(var d=0,e=this.children.length;e>d;++d){var f=this.children[d],g=f.chunkSize(); +if(g>=a){if(f.insertInner(a,b,c),f.lines&&f.lines.length>50){for(;f.lines.length>50;){var h=f.lines.splice(f.lines.length-25,25),i=new _d(h);f.height-=i.height,this.children.splice(d+1,0,i),i.parent=this}this.maybeSpill()}break}a-=g}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var b=a.children.splice(a.children.length-5,5),c=new ae(b);if(a.parent){a.size-=c.size,a.height-=c.height;var e=Ze(a.parent.children,a);a.parent.children.splice(e+1,0,c)}else{var d=new ae(a.children);d.parent=a,a.children=[d,c],a=d}c.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,b,c){for(var d=0,e=this.children.length;e>d;++d){var f=this.children[d],g=f.chunkSize();if(g>a){var h=Math.min(b,g-a);if(f.iterN(a,h,c))return!0;if(0==(b-=h))break;a=0}else a-=g}}};var be=0,ce=w.Doc=function(a,b,c){if(!(this instanceof ce))return new ce(a,b,c);null==c&&(c=0),ae.call(this,[new _d([new Kd("",null)])]),this.first=c,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.history=pe(),this.cleanGeneration=1,this.frontier=c;var d=xc(c,0);this.sel={from:d,to:d,head:d,anchor:d,shift:!1,extend:!1,goalColumn:null},this.id=++be,this.modeOption=b,"string"==typeof a&&(a=sf(a)),$d(this,{from:d,to:d,text:a},null,{head:d,anchor:d})};ce.prototype=$e(ae.prototype,{constructor:ce,iter:function(a,b,c){c?this.iterN(a-this.first,b-a,c):this.iterN(this.first,this.first+this.size,a)},insert:function(a,b){for(var c=0,d=0,e=b.length;e>d;++d)c+=b[d].height;this.insertInner(a-this.first,b,c)},remove:function(a,b){this.removeInner(a-this.first,b)},getValue:function(a){var b=je(this,this.first,this.first+this.size);return a===!1?b:b.join(a||"\n")},setValue:function(a){var b=xc(this.first,0),c=this.first+this.size-1;qc(this,{from:b,to:xc(c,he(this,c).text.length),text:sf(a),origin:"setValue"},{head:b,anchor:b},!0)},replaceRange:function(a,b,c,d){b=Cc(this,b),c=c?Cc(this,c):b,wc(this,a,b,c,d)},getRange:function(a,b,c){var d=ie(this,Cc(this,a),Cc(this,b));return c===!1?d:d.join(c||"\n")},getLine:function(a){var b=this.getLineHandle(a);return b&&b.text},setLine:function(a,b){Ec(this,a)&&wc(this,b,xc(a,0),Cc(this,xc(a)))},removeLine:function(a){a?wc(this,"",Cc(this,xc(a-1)),Cc(this,xc(a))):wc(this,"",xc(0,0),Cc(this,xc(1,0)))},getLineHandle:function(a){return Ec(this,a)?he(this,a):void 0},getLineNumber:function(a){return le(a)},getLineHandleVisualStart:function(a){return"number"==typeof a&&(a=he(this,a)),Bd(this,a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return Cc(this,a)},getCursor:function(a){var c,b=this.sel;return c=null==a||"head"==a?b.head:"anchor"==a?b.anchor:"end"==a||a===!1?b.to:b.from,Ac(c)},somethingSelected:function(){return!yc(this.sel.head,this.sel.anchor)},setCursor:Eb(function(a,b,c){var d=Cc(this,"number"==typeof a?xc(a,b||0):a);c?Fc(this,d):Hc(this,d,d)}),setSelection:Eb(function(a,b){Hc(this,Cc(this,a),Cc(this,b||a))}),extendSelection:Eb(function(a,b){Fc(this,Cc(this,a),b&&Cc(this,b))}),getSelection:function(a){return this.getRange(this.sel.from,this.sel.to,a)},replaceSelection:function(a,b,c){qc(this,{from:this.sel.from,to:this.sel.to,text:sf(a),origin:c},b||"around")},undo:Eb(function(){sc(this,"undo")}),redo:Eb(function(){sc(this,"redo")}),setExtending:function(a){this.sel.extend=a},historySize:function(){var a=this.history;return{undo:a.done.length,redo:a.undone.length}},clearHistory:function(){this.history=pe(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration()},changeGeneration:function(){return this.history.lastOp=this.history.lastOrigin=null,this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:ve(this.history.done),undone:ve(this.history.undone)}},setHistory:function(a){var b=this.history=pe(this.history.maxGeneration);b.done=a.done.slice(0),b.undone=a.undone.slice(0)},markText:function(a,b,c){return nd(this,Cc(this,a),Cc(this,b),c,"range")},setBookmark:function(a,b){var c={replacedWith:b&&(null==b.nodeType?b.widget:b),insertLeft:b&&b.insertLeft};return a=Cc(this,a),nd(this,a,a,c,"bookmark")},findMarksAt:function(a){a=Cc(this,a);var b=[],c=he(this,a.line).markedSpans;if(c)for(var d=0;d=a.ch)&&b.push(e.marker.parent||e.marker)}return b},getAllMarks:function(){var a=[];return this.iter(function(b){var c=b.markedSpans;if(c)for(var d=0;da?(b=a,!0):(a-=e,++c,void 0)}),Cc(this,xc(c,b))},indexFromPos:function(a){a=Cc(this,a);var b=a.ch;return a.lineb&&(b=a.from),null!=a.to&&a.to1&&45==a.charCodeAt(b-1)){if(/\w/.test(a.charAt(b-2))&&/[^\-?\.]/.test(a.charAt(b)))return!0;if(b>2&&/[\d\.,]/.test(a.charAt(b-2))&&/[\d\.,]/.test(a.charAt(b)))return!1}return/[~!#%&*)=+}\]|\"\.>,:;][({[<]|-[^\-?\.\u2010-\u201f\u2026]|\?[\w~`@#$%\^&*(_=+{[|><]|\u2026[\w~`@#$%\^&*(_=+{[><]/.test(a.slice(b-1,b+1))});var of,qf,sf=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length;d>=b;){var e=a.indexOf("\n",b);-1==e&&(e=a.length);var f=a.slice(b,"\r"==a.charAt(e-1)?e-1:e),g=f.indexOf("\r");-1!=g?(c.push(f.slice(0,g)),b+=g+1):(c.push(f),b=e+1)}return c}:function(a){return a.split(/\r\n?|\n/)};w.splitLines=sf;var tf=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return b&&b.parentElement()==a?0!=b.compareEndPoints("StartToEnd",b):!1},uf=function(){var a=gf("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),"function"==typeof a.oncopy)}(),vf={3:"Enter",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:";",91:"Mod",92:"Mod",93:"Mod",109:"-",107:"=",127:"Delete",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63276:"PageUp",63277:"PageDown",63275:"End",63273:"Home",63234:"Left",63232:"Up",63235:"Right",63233:"Down",63302:"Insert",63272:"Delete"};w.keyNames=vf,function(){for(var a=0;10>a;a++)vf[a+48]=String(a);for(var a=65;90>=a;a++)vf[a]=String.fromCharCode(a);for(var a=1;12>=a;a++)vf[a+111]=vf[a+63235]="F"+a}();var Ef,Jf=function(){function c(c){return 255>=c?a.charAt(c):c>=1424&&1524>=c?"R":c>=1536&&1791>=c?b.charAt(c-1536):c>=1792&&2220>=c?"r":"L"}var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL",b="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr",d=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,f=/[LRr]/,g=/[Lb1n]/,h=/[1n]/,i="L";return function(a){if(!d.test(a))return!1;for(var l,b=a.length,j=[],k=0;b>k;++k)j.push(l=c(a.charCodeAt(k)));for(var k=0,m=i;b>k;++k){var l=j[k];"m"==l?j[k]=m:m=l}for(var k=0,n=i;b>k;++k){var l=j[k];"1"==l&&"r"==n?j[k]="n":f.test(l)&&(n=l,"r"==l&&(j[k]="R"))}for(var k=1,m=j[0];b-1>k;++k){var l=j[k];"+"==l&&"1"==m&&"1"==j[k+1]?j[k]="1":","!=l||m!=j[k+1]||"1"!=m&&"n"!=m||(j[k]=m),m=l}for(var k=0;b>k;++k){var l=j[k];if(","==l)j[k]="N";else if("%"==l){for(var o=k+1;b>o&&"%"==j[o];++o);for(var p=k&&"!"==j[k-1]||b-1>o&&"1"==j[o]?"1":"N",q=k;o>q;++q)j[q]=p;k=o-1}}for(var k=0,n=i;b>k;++k){var l=j[k];"L"==n&&"1"==l?j[k]="L":f.test(l)&&(n=l)}for(var k=0;b>k;++k)if(e.test(j[k])){for(var o=k+1;b>o&&e.test(j[o]);++o);for(var r="L"==(k?j[k-1]:i),s="L"==(b-1>o?j[o]:i),p=r||s?"L":"R",q=k;o>q;++q)j[q]=p;k=o-1}for(var u,t=[],k=0;b>k;)if(g.test(j[k])){var v=k;for(++k;b>k&&g.test(j[k]);++k);t.push({from:v,to:k,level:0})}else{var w=k,x=t.length;for(++k;b>k&&"L"!=j[k];++k);for(var q=w;k>q;)if(h.test(j[q])){q>w&&t.splice(x,0,{from:w,to:q,level:1});var y=q;for(++q;k>q&&h.test(j[q]);++q);t.splice(x,0,{from:y,to:q,level:2}),w=q}else++q;k>w&&t.splice(x,0,{from:w,to:k,level:1})}return 1==t[0].level&&(u=a.match(/^\s+/))&&(t[0].from=u[0].length,t.unshift({from:0,to:u[0].length,level:0})),1==Xe(t).level&&(u=a.match(/\s+$/))&&(Xe(t).to-=u[0].length,t.push({from:b-u[0].length,to:b,level:0})),t[0].level!=Xe(t).level&&t.push({from:b,to:b,level:t[0].level}),t}}();return w.version="3.15.1",w}(),CodeMirror.defineMode("clike",function(a,b){function n(a,b){var c=a.next();if(j[c]){var d=j[c](a,b);if(d!==!1)return d}if('"'==c||"'"==c)return b.tokenize=o(c),b.tokenize(a,b);if(/[\[\]{}\(\),;\:\.]/.test(c))return m=c,null;if(/\d/.test(c))return a.eatWhile(/[\w\.]/),"number";if("/"==c){if(a.eat("*"))return b.tokenize=p,p(a,b);if(a.eat("/"))return a.skipToEnd(),"comment"}if(l.test(c))return a.eatWhile(l),"operator";a.eatWhile(/[\w\$_]/);var e=a.current();return f.propertyIsEnumerable(e)?(h.propertyIsEnumerable(e)&&(m="newstatement"),"keyword"):g.propertyIsEnumerable(e)?(h.propertyIsEnumerable(e)&&(m="newstatement"),"builtin"):i.propertyIsEnumerable(e)?"atom":"variable"}function o(a){return function(b,c){for(var e,d=!1,f=!1;null!=(e=b.next());){if(e==a&&!d){f=!0;break}d=!d&&"\\"==e}return(f||!d&&!k)&&(c.tokenize=null),"string"}}function p(a,b){for(var d,c=!1;d=a.next();){if("/"==d&&c){b.tokenize=null;break}c="*"==d}return"comment"}function q(a,b,c,d,e){this.indented=a,this.column=b,this.type=c,this.align=d,this.prev=e}function r(a,b,c){var d=a.indented;return a.context&&"statement"==a.context.type&&(d=a.context.indented),a.context=new q(d,b,c,null,a.context)}function s(a){var b=a.context.type;return(")"==b||"]"==b||"}"==b)&&(a.indented=a.context.indented),a.context=a.context.prev}var m,c=a.indentUnit,d=b.statementIndentUnit||c,e=b.dontAlignCalls,f=b.keywords||{},g=b.builtin||{},h=b.blockKeywords||{},i=b.atoms||{},j=b.hooks||{},k=b.multiLineStrings,l=/[+\-*&%=<>!?|\/]/;return{startState:function(a){return{tokenize:null,context:new q((a||0)-c,0,"top",!1),indented:0,startOfLine:!0}},token:function(a,b){var c=b.context;if(a.sol()&&(null==c.align&&(c.align=!1),b.indented=a.indentation(),b.startOfLine=!0),a.eatSpace())return null;m=null;var d=(b.tokenize||n)(a,b);if("comment"==d||"meta"==d)return d;if(null==c.align&&(c.align=!0),";"!=m&&":"!=m&&","!=m||"statement"!=c.type)if("{"==m)r(b,a.column(),"}");else if("["==m)r(b,a.column(),"]");else if("("==m)r(b,a.column(),")");else if("}"==m){for(;"statement"==c.type;)c=s(b);for("}"==c.type&&(c=s(b));"statement"==c.type;)c=s(b)}else m==c.type?s(b):(("}"==c.type||"top"==c.type)&&";"!=m||"statement"==c.type&&"newstatement"==m)&&r(b,a.column(),"statement");else s(b);return b.startOfLine=!1,d},indent:function(a,b){if(a.tokenize!=n&&null!=a.tokenize)return CodeMirror.Pass;var f=a.context,g=b&&b.charAt(0);"statement"==f.type&&"}"==g&&(f=f.prev);var h=g==f.type;return"statement"==f.type?f.indented+("{"==g?0:d):!f.align||e&&")"==f.type?")"!=f.type||h?f.indented+(h?0:c):f.indented+d:f.column+(h?0:1)},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}}),function(){function a(a){for(var b={},c=a.split(" "),d=0;d <- <: <% >: # @ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),blockKeywords:a("catch class do else finally for forSome if match switch try while"),atoms:a("true false null"),hooks:{"@":function(a){return a.eatWhile(/[\w\$_]/),"meta"}}}),e(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:a("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4 sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadowconst attribute uniform varying break continue discard return for while do if else struct in out inout"),blockKeywords:a("for while do if else struct"),builtin:a("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smootstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:a("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragColor gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),hooks:{"#":c}})}(),CodeMirror.defineMode("coffeescript",function(a){function c(a){return new RegExp("^(("+a.join(")|(")+"))\\b")}function s(a,c){if(a.sol()){var l=c.scopes[0].offset;if(a.eatSpace()){var m=a.indentation();return m>l?"indent":l>m?"dedent":null}l>0&&w(a,c)}if(a.eatSpace())return null;var q=a.peek();if(a.match("####"))return a.skipToEnd(),"comment";if(a.match("###"))return c.tokenize=u,c.tokenize(a,c);if("#"===q)return a.skipToEnd(),"comment";if(a.match(/^-?[0-9\.]/,!1)){var s=!1;if(a.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(s=!0),a.match(/^-?\d+\.\d*/)&&(s=!0),a.match(/^-?\.\d+/)&&(s=!0),s)return"."==a.peek()&&a.backUp(1),"number";var v=!1;if(a.match(/^-?0x[0-9a-f]+/i)&&(v=!0),a.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(v=!0),a.match(/^-?0(?![\dx])/i)&&(v=!0),v)return"number"}if(a.match(o))return c.tokenize=t(a.current(),"string"),c.tokenize(a,c);if(a.match(p)){if("/"!=a.current()||a.match(/^.*\//,!1))return c.tokenize=t(a.current(),"string-2"),c.tokenize(a,c);a.backUp(1)}return a.match(h)||a.match(g)?"punctuation":a.match(f)||a.match(d)||a.match(k)?"operator":a.match(e)?"punctuation":a.match(r)?"atom":a.match(n)?"keyword":a.match(i)?"variable":a.match(j)?"property":(a.next(),b)}function t(c,d){var e=1==c.length;return function(f,g){for(;!f.eol();)if(f.eatWhile(/[^'"\/\\]/),f.eat("\\")){if(f.next(),e&&f.eol())return d}else{if(f.match(c))return g.tokenize=s,d;f.eat(/['"\/]/)}return e&&(a.mode.singleLineStringErrors?d=b:g.tokenize=s),d}}function u(a,b){for(;!a.eol();){if(a.eatWhile(/[^#]/),a.match("###")){b.tokenize=s;break}a.eatWhile("#")}return"comment"}function v(b,c,d){d=d||"coffee";var e=0;if("coffee"===d){for(var f=0;f"!==e&&"=>"!==e||c.lambda||"coffee"!=c.scopes[0].type||""!==a.peek())&&"indent"!==d||v(a,c);var f="[({".indexOf(e);return-1!==f&&v(a,c,"])}".slice(f,f+1)),l.exec(e)&&v(a,c),"then"==e&&w(a,c),"dedent"===d&&w(a,c)?b:(f="])}".indexOf(e),-1!==f&&w(a,c)?b:(c.dedent>0&&a.eol()&&"coffee"==c.scopes[0].type&&(c.scopes.length>1&&c.scopes.shift(),c.dedent-=1),d))}var b="error",d=new RegExp("^[\\+\\-\\*/%&|\\^~<>!?]"),e=new RegExp("^[\\(\\)\\[\\]\\{\\},:`=;\\.]"),f=new RegExp("^((->)|(=>)|(\\+\\+)|(\\+\\=)|(\\-\\-)|(\\-\\=)|(\\*\\*)|(\\*\\=)|(\\/\\/)|(\\/\\=)|(==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//))"),g=new RegExp("^((\\.\\.)|(\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),h=new RegExp("^((\\.\\.\\.)|(//=)|(>>=)|(<<=)|(\\*\\*=))"),i=new RegExp("^[_A-Za-z$][_A-Za-z$0-9]*"),j=new RegExp("^(@|this.)[_A-Za-z$][_A-Za-z$0-9]*"),k=c(["and","or","not","is","isnt","in","instanceof","typeof"]),l=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],m=["break","by","continue","debugger","delete","do","in","of","new","return","then","this","throw","when","until"],n=c(l.concat(m));l=c(l);var o=new RegExp("^('{3}|\"{3}|['\"])"),p=new RegExp("^(/{3}|/)"),q=["Infinity","NaN","undefined","null","true","false","on","off","yes","no"],r=c(q),y={startState:function(a){return{tokenize:s,scopes:[{offset:a||0,type:"coffee"}],lastToken:null,lambda:!1,dedent:0}},token:function(a,b){var c=x(a,b);return b.lastToken={style:c,content:a.current()},a.eol()&&a.lambda&&(b.lambda=!1),c},indent:function(a){return a.tokenize!=s?0:a.scopes[0].offset},lineComment:"#",fold:"indent"};return y}),CodeMirror.defineMIME("text/x-coffeescript","coffeescript"),CodeMirror.defineMode("css",function(a){return CodeMirror.getMode(a,"text/css")}),CodeMirror.defineMode("css-base",function(a,b){"use strict";function l(a,b){return k=b,a}function m(a,b){var c=a.next();if(d[c]){var e=d[c](a,b);if(e!==!1)return e}if("@"==c)return a.eatWhile(/[\w\\\-]/),l("def",a.current());if("="==c)l(null,"compare");else{if(("~"==c||"|"==c)&&a.eat("="))return l(null,"compare");if('"'==c||"'"==c)return b.tokenize=n(c),b.tokenize(a,b);if("#"==c)return a.eatWhile(/[\w\\\-]/),l("atom","hash");if("!"==c)return a.match(/^\s*\w*/),l("keyword","important");if(/\d/.test(c))return a.eatWhile(/[\w.%]/),l("number","unit");if("-"!==c)return/[,+>*\/]/.test(c)?l(null,"select-op"):"."==c&&a.match(/^-?[_a-z][_a-z0-9-]*/i)?l("qualifier","qualifier"):":"==c?l("operator",c):/[;{}\[\]\(\)]/.test(c)?l(null,c):"u"==c&&a.match("rl(")?(a.backUp(1),b.tokenize=o,l("property","variable")):(a.eatWhile(/[\w\\\-]/),l("property","variable"));if(/\d/.test(a.peek()))return a.eatWhile(/[\w.%]/),l("number","unit");if(a.match(/^[^-]+-/))return l("meta","meta")}}function n(a,b){return function(c,d){for(var f,e=!1;null!=(f=c.next())&&(f!=a||e);)e=!e&&"\\"==f;return e||(b&&c.backUp(1),d.tokenize=m),l("string","string")}}function o(a,b){return a.next(),b.tokenize=a.match(/\s*[\"\']/,!1)?m:n(")",!0),l(null,"(")}var c=a.indentUnit,d=b.hooks||{},e=b.atMediaTypes||{},f=b.atMediaFeatures||{},g=b.propertyKeywords||{},h=b.colorKeywords||{},i=b.valueKeywords||{},j=!!b.allowNested,k=null;return{startState:function(a){return{tokenize:m,baseIndent:a||0,stack:[],lastToken:null}},token:function(a,b){if(b.tokenize=b.tokenize||m,b.tokenize==m&&a.eatSpace())return null;var c=b.tokenize(a,b);c&&"string"!=typeof c&&(c=l(c[0],c[1]));var d=b.stack[b.stack.length-1];if("variable"==c)return"variable-definition"==k&&b.stack.push("propertyValue"),b.lastToken="variable-2";if("property"==c){var n=a.current().toLowerCase();"propertyValue"==d?c=i.hasOwnProperty(n)?"string-2":h.hasOwnProperty(n)?"keyword":"variable-2":"rule"==d?g.hasOwnProperty(n)||(c+=" error"):"block"==d?c=g.hasOwnProperty(n)?"property":h.hasOwnProperty(n)?"keyword":i.hasOwnProperty(n)?"string-2":"tag":d&&"@media{"!=d?"@media"==d?c=e[a.current()]?"attribute":/^(only|not)$/.test(n)?"keyword":"and"==n?"error":f.hasOwnProperty(n)?"error":"attribute error":"@mediaType"==d?c=e.hasOwnProperty(n)?"attribute":"and"==n?"operator":/^(only|not)$/.test(n)?"error":"error":"@mediaType("==d?g.hasOwnProperty(n)||(e.hasOwnProperty(n)?c="error":"and"==n?c="operator":/^(only|not)$/.test(n)?c="error":c+=" error"):c="@import"==d?"tag":"error":c="tag"}else"atom"==c?d&&"@media{"!=d&&"block"!=d?"propertyValue"==d?/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(a.current())||(c+=" error"):c="error":c="builtin":"@media"==d&&"{"==k&&(c="error");if("{"==k)if("@media"==d||"@mediaType"==d)b.stack[b.stack.length-1]="@media{";else{var o=j?"block":"rule";b.stack.push(o)}else"}"==k?("interpolation"==d&&(c="operator"),b.stack.pop(),"propertyValue"==d&&b.stack.pop()):"interpolation"==k?b.stack.push("interpolation"):"@media"==k?b.stack.push("@media"):"@import"==k?b.stack.push("@import"):"@media"==d&&/\b(keyword|attribute)\b/.test(c)?b.stack[b.stack.length-1]="@mediaType":"@mediaType"==d&&","==a.current()?b.stack[b.stack.length-1]="@media":"("==k?("@media"==d||"@mediaType"==d)&&(b.stack[b.stack.length-1]="@mediaType",b.stack.push("@mediaType(")):")"==k?"propertyValue"==d&&"@mediaType("==b.stack[b.stack.length-2]?(b.stack.pop(),b.stack.pop()):"@mediaType("==d&&b.stack.pop():":"==k&&"property"==b.lastToken?b.stack.push("propertyValue"):"propertyValue"==d&&";"==k?b.stack.pop():"@import"==d&&";"==k&&b.stack.pop();return b.lastToken=c},indent:function(a,b){var d=a.stack.length;return/^\}/.test(b)&&(d-="propertyValue"==a.stack[d-1]?2:1),a.baseIndent+d*c},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}}),function(){function a(a){for(var b={},c=0;c=2&&">"==d){b.tokenize=null;break}c="-"==d?c+1:0}return["comment","comment"]}return a.eat("!")?(b.tokenize=c,c(a,b)):void 0},"/":function(a,b){return a.eat("*")?(b.tokenize=g,g(a,b)):!1}},name:"css-base"}),CodeMirror.defineMIME("text/x-scss",{atMediaTypes:b,atMediaFeatures:c,propertyKeywords:d,colorKeywords:e,valueKeywords:f,allowNested:!0,hooks:{$:function(a){return a.match(/^[\w-]+/),":"==a.peek()?["variable","variable-definition"]:["variable","variable"]},"/":function(a,b){return a.eat("/")?(a.skipToEnd(),["comment","comment"]):a.eat("*")?(b.tokenize=g,g(a,b)):["operator","operator"]},"#":function(a){return a.eat("{")?["operator","interpolation"]:(a.eatWhile(/[\w\\\-]/),["atom","hash"])}},name:"css-base"})}(),CodeMirror.defineMode("htmlmixed",function(a,b){function i(a,b){var f=b.htmlState.tagName,g=c.token(a,b.htmlState);if("script"==f&&/\btag\b/.test(g)&&">"==a.current()){var h=a.string.slice(Math.max(0,a.pos-100),a.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);h=h?h[1]:"",h&&/[\"\']/.test(h.charAt(0))&&(h=h.slice(1,h.length-1));for(var i=0;i"==a.current()&&(b.token=l,b.localMode=d,b.localState=d.startState(c.indent(b.htmlState,"")));return g}function j(a,b,c){var f,d=a.current(),e=d.search(b);return e>-1?a.backUp(d.length-e):(f=d.match(/<\/?$/))&&(a.backUp(d.length),a.match(b,!1)||a.match(d[0])),c}function k(a,b){return a.match(/^<\/\s*script\s*>/i,!1)?(b.token=i,b.localState=b.localMode=null,i(a,b)):j(a,/<\/\s*script\s*>/,b.localMode.token(a,b.localState))}function l(a,b){return a.match(/^<\/\s*style\s*>/i,!1)?(b.token=i,b.localState=b.localMode=null,i(a,b)):j(a,/<\/\s*style\s*>/,d.token(a,b.localState))}var c=CodeMirror.getMode(a,{name:"xml",htmlMode:!0}),d=CodeMirror.getMode(a,"css"),e=[],f=b&&b.scriptTypes;if(e.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:CodeMirror.getMode(a,"javascript")}),f)for(var g=0;g=0;a--)u.cc.push(arguments[a])}function w(){return v.apply(null,arguments),!0}function x(a){function b(b){for(var c=b;c;c=c.next)if(c.name==a)return!0;return!1}var c=u.state;if(c.context){if(u.marked="def",b(c.localVars))return;c.localVars={name:a,next:c.localVars}}else{if(b(c.globalVars))return;c.globalVars={name:a,next:c.globalVars}}}function z(){u.state.context={prev:u.state.context,vars:u.state.localVars},u.state.localVars=y}function A(){u.state.localVars=u.state.context.vars,u.state.context=u.state.context.prev}function B(a,b){var c=function(){var c=u.state,d=c.indented;"stat"==c.lexical.type&&(d=c.lexical.indented),c.lexical=new r(d,u.stream.column(),a,null,c.lexical,b)};return c.lex=!0,c}function C(){var a=u.state;a.lexical.prev&&(")"==a.lexical.type&&(a.indented=a.lexical.indented),a.lexical=a.lexical.prev)}function D(a){return function(b){return b==a?w():";"==a?v():w(arguments.callee)}}function E(a){return"var"==a?w(B("vardef"),U,D(";"),C):"keyword a"==a?w(B("form"),F,E,C):"keyword b"==a?w(B("form"),E,C):"{"==a?w(B("}"),R,C):";"==a?w():"if"==a?w(B("form"),F,E,C,W):"function"==a?w(_):"for"==a?w(B("form"),D("("),B(")"),X,D(")"),C,E,C):"variable"==a?w(B("stat"),M):"switch"==a?w(B("form"),F,B("}","switch"),D("{"),R,C,C):"case"==a?w(F,D(":")):"default"==a?w(D(":")):"catch"==a?w(B("form"),z,D("("),ab,D(")"),E,C,A):v(B("stat"),F,D(";"),C)}function F(a){return H(a,!1)}function G(a){return H(a,!0)}function H(a,b){var c=b?L:K;return q.hasOwnProperty(a)?w(c):"function"==a?w(_):"keyword c"==a?w(b?J:I):"("==a?w(B(")"),I,D(")"),C,c):"operator"==a?w(b?G:F):"["==a?w(B("]"),Q(G,"]"),C,c):"{"==a?w(B("}"),Q(O,"}"),C,c):w()}function I(a){return a.match(/[;\}\)\],]/)?v():v(F)}function J(a){return a.match(/[;\}\)\],]/)?v():v(G)}function K(a,b){return","==a?w(F):L(a,b,!1)}function L(a,b,c){var d=0==c?K:L,e=0==c?F:G;return"operator"==a?/\+\+|--/.test(b)?w(d):"?"==b?w(F,D(":"),e):w(e):";"!=a?"("==a?w(B(")","call"),Q(G,")"),C,d):"."==a?w(N,d):"["==a?w(B("]"),I,D("]"),C,d):void 0:void 0}function M(a){return":"==a?w(C,E):v(K,D(";"),C)}function N(a){return"variable"==a?(u.marked="property",w()):void 0}function O(a,b){if("variable"==a){if(u.marked="property","get"==b||"set"==b)return w(P)}else("number"==a||"string"==a)&&(u.marked=a+" property");return q.hasOwnProperty(a)?w(D(":"),G):void 0}function P(a){return":"==a?w(F):"variable"!=a?w(D(":"),F):(u.marked="property",w(_))}function Q(a,b){function c(d){if(","==d){var e=u.state.lexical;return"call"==e.info&&(e.pos=(e.pos||0)+1),w(a,c)}return d==b?w():w(D(b))}return function(d){return d==b?w():v(a,c)}}function R(a){return"}"==a?w():v(E,R)}function S(a){return":"==a?w(T):v()}function T(a){return"variable"==a?(u.marked="variable-3",w()):v()}function U(a,b){return"variable"==a?(x(b),f?w(S,V):w(V)):v()}function V(a,b){return"="==b?w(G,V):","==a?w(U):void 0}function W(a,b){return"keyword b"==a&&"else"==b?w(B("form"),E,C):void 0}function X(a){return"var"==a?w(U,D(";"),Z):";"==a?w(Z):"variable"==a?w(Y):v(F,D(";"),Z)}function Y(a,b){return"in"==b?w(F):w(K,Z)}function Z(a,b){return";"==a?w($):"in"==b?w(F):v(F,D(";"),$)}function $(a){")"!=a&&w(F)}function _(a,b){return"variable"==a?(x(b),w(_)):"("==a?w(B(")"),z,Q(ab,")"),C,E,A):void 0}function ab(a,b){return"variable"==a?(x(b),f?w(S):w()):void 0}var k,l,c=a.indentUnit,d=b.statementIndent,e=b.json,f=b.typescript,g=function(){function a(a){return{type:a,style:"keyword"}}var b=a("keyword a"),c=a("keyword b"),d=a("keyword c"),e=a("operator"),g={type:"atom",style:"atom"},h={"if":a("if"),"while":b,"with":b,"else":c,"do":c,"try":c,"finally":c,"return":d,"break":d,"continue":d,"new":d,"delete":d,"throw":d,"var":a("var"),"const":a("var"),let:a("var"),"function":a("function"),"catch":a("catch"),"for":a("for"),"switch":a("switch"),"case":a("case"),"default":a("default"),"in":e,"typeof":e,"instanceof":e,"true":g,"false":g,"null":g,undefined:g,NaN:g,Infinity:g,"this":a("this")};if(f){var i={type:"variable",style:"variable-3"},j={"interface":a("interface"),"class":a("class"),"extends":a("extends"),constructor:a("constructor"),"public":a("public"),"private":a("private"),"protected":a("protected"),"static":a("static"),"super":a("super"),string:i,number:i,bool:i,any:i};for(var k in j)h[k]=j[k]}return h}(),h=/[+\-*&%=<>!?|~^]/,q={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0},u={state:null,column:null,marked:null,cc:null},y={name:"this",next:{name:"arguments"}};return C.lex=!0,{startState:function(a){return{tokenize:n,lastType:null,cc:[],lexical:new r((a||0)-c,0,"block",!1),localVars:b.localVars,globalVars:b.globalVars,context:b.localVars&&{vars:b.localVars},indented:0}},token:function(a,b){if(a.sol()&&(b.lexical.hasOwnProperty("align")||(b.lexical.align=!1),b.indented=a.indentation()),b.tokenize!=p&&a.eatSpace())return null;var c=b.tokenize(a,b);return"comment"==k?c:(b.lastType="operator"!=k||"++"!=l&&"--"!=l?k:"incdec",t(b,c,k,l,a))},indent:function(a,e){if(a.tokenize==p)return CodeMirror.Pass;if(a.tokenize!=n)return 0;for(var f=e&&e.charAt(0),g=a.lexical,h=a.cc.length-1;h>=0;--h){var i=a.cc[h];if(i==C)g=g.prev;else if(i!=W||/^else\b/.test(e))break}"stat"==g.type&&"}"==f&&(g=g.prev),d&&")"==g.type&&"stat"==g.prev.type&&(g=g.prev);var j=g.type,k=f==j;return"vardef"==j?g.indented+("operator"==a.lastType||","==a.lastType?4:0):"form"==j&&"{"==f?g.indented:"form"==j?g.indented+c:"stat"==j?g.indented+("operator"==a.lastType||","==a.lastType?d||c:0):"switch"!=g.info||k||0==b.doubleIndentSwitch?g.align?g.column+(k?0:1):g.indented+(k?0:c):g.indented+(/^(?:case|default)\b/.test(e)?c:2*c)},electricChars:":{}",blockCommentStart:e?null:"/*",blockCommentEnd:e?null:"*/",lineComment:e?null:"//",fold:"brace",helperType:e?"json":"javascript",jsonMode:e}}),CodeMirror.defineMIME("text/javascript","javascript"),CodeMirror.defineMIME("text/ecmascript","javascript"),CodeMirror.defineMIME("application/javascript","javascript"),CodeMirror.defineMIME("application/ecmascript","javascript"),CodeMirror.defineMIME("application/json",{name:"javascript",json:!0}),CodeMirror.defineMIME("application/x-json",{name:"javascript",json:!0}),CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:!0}),CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:!0}),CodeMirror.defineMode("less",function(a){function d(a,b){return c=b,a}function f(a,b){var f=a.next();if("@"==f)return a.eatWhile(/[\w\-]/),d("meta",a.current());if("/"==f&&a.eat("*"))return b.tokenize=h,h(a,b);if("<"==f&&a.eat("!"))return b.tokenize=i,i(a,b);if("="==f)d(null,"compare");else{if("|"==f&&a.eat("="))return d(null,"compare");if('"'==f||"'"==f)return b.tokenize=j(f),b.tokenize(a,b);if("/"==f){if(a.eat("/"))return b.tokenize=g,g(a,b);if("string"==c||"("==c)return d("string","string");if(void 0!=b.stack[b.stack.length-1])return d(null,f);if(a.eatWhile(/[\a-zA-Z0-9\-_.\s]/),/\/|\)|#/.test(a.peek()||a.eatSpace()&&")"==a.peek())||a.eol())return d("string","string")}else{if("!"==f)return a.match(/^\s*\w*/),d("keyword","important");if(/\d/.test(f))return a.eatWhile(/[\w.%]/),d("number","unit");if(/[,+<>*\/]/.test(f))return"="==a.peek()||"a"==c?d("string","string"):d(null,"select-op");if(!/[;{}:\[\]()~\|]/.test(f)){if("."==f)return"("==c||"string"==c?d("string","string"):(a.eatWhile(/[\a-zA-Z0-9\-_]/)," "==a.peek()&&a.eatSpace(),")"==a.peek()?d("number","unit"):d("tag","tag"));if("#"==f)return a.eatWhile(/[A-Za-z0-9]/),4==a.current().length||7==a.current().length?null!=a.current().match(/[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/,!1)?a.current().substring(1)!=a.current().match(/[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/,!1)?d("atom","tag"):(a.eatSpace(),/[\/<>.(){!$%^&*_\-\\?=+\|#'~`]/.test(a.peek())?d("atom","tag"):"}"==a.peek()?d("number","unit"):/[a-zA-Z\\]/.test(a.peek())?d("atom","tag"):a.eol()?d("atom","tag"):d("number","unit")):(a.eatWhile(/[\w\\\-]/),d("atom","tag")):(a.eatWhile(/[\w\\\-]/),d("atom","tag"));if("&"==f)return a.eatWhile(/[\w\-]/),d(null,f);if(a.eatWhile(/[\w\\\-_%.{]/),"string"==c)return d("string","string");if(null!=a.current().match(/(^http$|^https$)/))return a.eatWhile(/[\w\\\-_%.{:\/]/),d("string","string");if("<"==a.peek()||">"==a.peek())return d("tag","tag");if(/\(/.test(a.peek()))return d(null,f);if("/"==a.peek()&&void 0!=b.stack[b.stack.length-1])return d("string","string");if(a.current().match(/\-\d|\-.\d/))return d("number","unit");if(/\/|[\s\)]/.test(a.peek()||a.eol()||a.eatSpace()&&"/"==a.peek())&&-1!==a.current().indexOf("."))return"{"==a.current().substring(a.current().length-1,a.current().length)?(a.backUp(1),d("tag","tag")):(a.eatSpace(),/[{<>.a-zA-Z\/]/.test(a.peek())||a.eol()?d("tag","tag"):d("string","string"));if(a.eol()||"["==a.peek()||"#"==a.peek()||"tag"==c)return"{"==a.current().substring(a.current().length-1,a.current().length)&&a.backUp(1),d("tag","tag");if("compare"==c||"a"==c||"("==c)return d("string","string");if("|"==c||"-"==a.current()||"["==c)return d(null,f);if(":"==a.peek()){a.next();var k=":"==a.peek()?!0:!1;if(k)a.backUp(1);else{var l=a.pos,m=a.current().length;a.eatWhile(/[a-z\\\-]/);var n=a.pos;if(null!=a.current().substring(m-1).match(e))return a.backUp(n-(l-1)),d("tag","tag");a.backUp(n-(l-1))}return k?d("tag","tag"):d("variable","variable")}return d("variable","variable")}if(":"==f)return a.eatWhile(/[a-z\\\-]/),e.test(a.current())?d("tag","tag"):":"==a.peek()?(a.next(),a.eatWhile(/[a-z\\\-]/),a.current().match(/\:\:\-(o|ms|moz|webkit)\-/)?d("string","string"):e.test(a.current().substring(1))?d("tag","tag"):d(null,f)):d(null,f);if("~"!=f)return d(null,f);if("r"==c)return d("string","string")}}}function g(a,b){return a.skipToEnd(),b.tokenize=f,d("comment","comment")}function h(a,b){for(var e,c=!1;null!=(e=a.next());){if(c&&"/"==e){b.tokenize=f;break}c="*"==e}return d("comment","comment")}function i(a,b){for(var e,c=0;null!=(e=a.next());){if(c>=2&&">"==e){b.tokenize=f;break}c="-"==e?c+1:0}return d("comment","comment")}function j(a){return function(b,c){for(var g,e=!1;null!=(g=b.next())&&(g!=a||e);)e=!e&&"\\"==g;return e||(c.tokenize=f),d("string","string")}}var c,b=a.indentUnit,e=/(^\:root$|^\:nth\-child$|^\:nth\-last\-child$|^\:nth\-of\-type$|^\:nth\-last\-of\-type$|^\:first\-child$|^\:last\-child$|^\:first\-of\-type$|^\:last\-of\-type$|^\:only\-child$|^\:only\-of\-type$|^\:empty$|^\:link|^\:visited$|^\:active$|^\:hover$|^\:focus$|^\:target$|^\:lang$|^\:enabled^\:disabled$|^\:checked$|^\:first\-line$|^\:first\-letter$|^\:before$|^\:after$|^\:not$|^\:required$|^\:invalid$)/;return{startState:function(a){return{tokenize:f,baseIndent:a||0,stack:[]}},token:function(a,b){if(a.eatSpace())return null;var d=b.tokenize(a,b),e=b.stack[b.stack.length-1];return"hash"==c&&"rule"==e?d="atom":"variable"==d&&("rule"==e?d=null:e&&"@media{"!=e||(d="when"==a.current()?"variable":/[\s,|\s\)|\s]/.test(a.peek())?"tag":c)),"rule"==e&&/^[\{\};]$/.test(c)&&b.stack.pop(),"{"==c?"@media"==e?b.stack[b.stack.length-1]="@media{":b.stack.push("{"):"}"==c?b.stack.pop():"@media"==c?b.stack.push("@media"):"{"==e&&"comment"!=c&&b.stack.push("rule"),d},indent:function(a,c){var d=a.stack.length;return/^\}/.test(c)&&(d-="rule"==a.stack[a.stack.length-1]?2:1),a.baseIndent+d*b},electricChars:"}"}}),CodeMirror.defineMIME("text/x-less","less"),CodeMirror.mimeModes.hasOwnProperty("text/css")||CodeMirror.defineMIME("text/css","less"),CodeMirror.defineMode("markdown",function(a,b){function C(a,b,c){return b.f=b.inline=c,c(a,b)}function D(a,b,c){return b.f=b.block=c,c(a,b)}function E(a){return a.linkTitle=!1,a.em=!1,a.strong=!1,a.quote=0,c||a.f!=G||(a.f=K,a.block=F),a.trailingSpace=0,a.trailingSpaceNewLine=!1,a.thisLineHasContent=!1,null}function F(a,c){var d=c.list!==!1;if(c.list!==!1&&c.indentationDiff>=0?(c.indentationDiff<4&&(c.indentation-=c.indentationDiff),c.list=null):c.list!==!1&&c.indentation>0?(c.list=null,c.listDepth=Math.floor(c.indentation/4)):c.list!==!1&&(c.list=!1,c.listDepth=0),c.indentationDiff>=4)return c.indentation-=4,a.skipToEnd(),i;if(a.eatSpace())return null;if("#"===a.peek()||c.prevLineHasContent&&a.match(A))c.header=!0;else if(a.eat(">"))for(c.indentation++,c.quote=1,a.eatSpace();a.eat(">");)a.eatSpace(),c.quote++;else{if("["===a.peek())return C(a,c,M);if(a.match(w,!0))return o;if(c.prevLineHasContent&&!d||!a.match(x,!0)&&!a.match(y,!0)){if(b.fencedCodeBlocks&&a.match(/^```([\w+#]*)/,!0))return c.localMode=f(RegExp.$1),c.localMode&&(c.localState=c.localMode.startState()),D(a,c,H),i}else c.indentation+=4,c.list=!0,c.listDepth++,b.taskLists&&a.match(z,!1)&&(c.taskList=!0)}return C(a,c,c.inline)}function G(a,b){var e=d.token(a,b.htmlState);return c&&"tag"===e&&"openTag"!==b.htmlState.type&&!b.htmlState.context&&(b.f=K,b.block=F),b.md_inside&&-1!=a.current().indexOf(">")&&(b.f=K,b.block=F,b.htmlState.context=void 0),e}function H(a,b){return a.sol()&&a.match(/^```/,!0)?(b.localMode=b.localState=null,b.f=K,b.block=F,i):b.localMode?b.localMode.token(a,b.localState):(a.skipToEnd(),i)}function I(a){var b=[];if(a.taskOpen)return"meta";if(a.taskClosed)return"property";if(a.strong&&b.push(v),a.em&&b.push(u),a.linkText&&b.push(s),a.code&&b.push(i),a.header&&b.push(h),a.quote&&b.push(a.quote%2?j:k),a.list!==!1){var c=(a.listDepth-1)%3;c?1===c?b.push(m):b.push(n):b.push(l)}return a.trailingSpaceNewLine?b.push("trailing-space-new-line"):a.trailingSpace&&b.push("trailing-space-"+(a.trailingSpace%2?"a":"b")),b.length?b.join(" "):null}function J(a,b){return a.match(B,!0)?I(b):void 0}function K(a,c){var d=c.text(a,c);if("undefined"!=typeof d)return d;if(c.list)return c.list=null,I(c);if(c.taskList){var e="x"!==a.match(z,!0)[1];return e?c.taskOpen=!0:c.taskClosed=!0,c.taskList=!1,I(c)}c.taskOpen=!1,c.taskClosed=!1;var f=a.next();if("\\"===f)return a.next(),I(c);if(c.linkTitle){c.linkTitle=!1;var h=f;"("===f&&(h=")"),h=(h+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");var i="^\\s*(?:[^"+h+"\\\\]+|\\\\\\\\|\\\\.)"+h;if(a.match(new RegExp(i),!0))return t}if("`"===f){var j=I(c),k=a.pos;a.eatWhile("`");var l=1+a.pos-k;return c.code?l===g?(c.code=!1,j):I(c):(g=l,c.code=!0,I(c))}if(c.code)return I(c);if("!"===f&&a.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return a.match(/\[[^\]]*\]/),c.inline=c.f=L,p;if("["===f&&a.match(/.*\](\(| ?\[)/,!1))return c.linkText=!0,I(c);if("]"===f&&c.linkText){var m=I(c);return c.linkText=!1,c.inline=c.f=L,m}if("<"===f&&a.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return C(a,c,Q(q,">"));if("<"===f&&a.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return C(a,c,Q(r,">"));if("<"===f&&a.match(/^\w/,!1)){if(-1!=a.string.indexOf(">")){var n=a.string.substring(1,a.string.indexOf(">"));/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(n)&&(c.md_inside=!0)}return a.backUp(1),D(a,c,G)}if("<"===f&&a.match(/^\/\w*?>/))return c.md_inside=!1,"tag";var o=!1;if(!b.underscoresBreakWords&&"_"===f&&"_"!==a.peek()&&a.match(/(\w)/,!1)){var s=a.pos-2;if(s>=0){var u=a.string.charAt(s);"_"!==u&&u.match(/(\w)/,!1)&&(o=!0)}}var j=I(c);if("*"===f||"_"===f&&!o){if(c.strong===f&&a.eat(f))return c.strong=!1,j;if(!c.strong&&a.eat(f))return c.strong=f,I(c);if(c.em===f)return c.em=!1,j;if(!c.em)return c.em=f,I(c)}else if(" "===f&&(a.eat("*")||a.eat("_"))){if(" "===a.peek())return I(c);a.backUp(1)}return" "===f&&(a.match(/ +$/,!1)?c.trailingSpace++:c.trailingSpace&&(c.trailingSpaceNewLine=!0)),I(c)}function L(a,b){if(a.eatSpace())return null;var c=a.next();return"("===c||"["===c?C(a,b,Q(t,"("===c?")":"]")):"error"}function M(a,b){return a.match(/^[^\]]*\]:/,!0)?(b.f=N,s):C(a,b,K)}function N(a,b){return a.eatSpace()?null:(a.match(/^[^\s]+/,!0),void 0===a.peek()?b.linkTitle=!0:a.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),b.f=b.inline=K,t)}function P(a){return O[a]||(a=(a+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),O[a]=new RegExp("^(?:[^\\\\]|\\\\.)*?("+a+")")),O[a]}function Q(a,b,c){return c=c||K,function(d,e){return d.match(P(b)),e.inline=e.f=c,a}}var c=CodeMirror.modes.hasOwnProperty("xml"),d=CodeMirror.getMode(a,c?{name:"xml",htmlMode:!0}:"text/plain"),e={html:"htmlmixed",js:"javascript",json:"application/json",c:"text/x-csrc","c++":"text/x-c++src",java:"text/x-java",csharp:"text/x-csharp","c#":"text/x-csharp",scala:"text/x-scala"},f=function(){var b,f,c={},d={},g=[];for(var h in CodeMirror.modes)CodeMirror.modes.propertyIsEnumerable(h)&&g.push(h);for(b=0;b` "'(]+/,O=[];return{startState:function(){return{f:F,prevLineHasContent:!1,thisLineHasContent:!1,block:F,htmlState:CodeMirror.startState(d),indentation:0,inline:K,text:J,linkText:!1,linkTitle:!1,em:!1,strong:!1,header:!1,taskList:!1,list:!1,listDepth:0,quote:0,trailingSpace:0,trailingSpaceNewLine:!1}},copyState:function(a){return{f:a.f,prevLineHasContent:a.prevLineHasContent,thisLineHasContent:a.thisLineHasContent,block:a.block,htmlState:CodeMirror.copyState(d,a.htmlState),indentation:a.indentation,localMode:a.localMode,localState:a.localMode?CodeMirror.copyState(a.localMode,a.localState):null,inline:a.inline,text:a.text,linkTitle:a.linkTitle,em:a.em,strong:a.strong,header:a.header,taskList:a.taskList,list:a.list,listDepth:a.listDepth,quote:a.quote,trailingSpace:a.trailingSpace,trailingSpaceNewLine:a.trailingSpaceNewLine,md_inside:a.md_inside}},token:function(a,b){if(a.sol()){if(a.match(/^\s*$/,!0))return b.prevLineHasContent=!1,E(b);b.prevLineHasContent=b.thisLineHasContent,b.thisLineHasContent=!0,b.header=!1,b.taskList=!1,b.code=!1,b.trailingSpace=0,b.trailingSpaceNewLine=!1,b.f=b.block;var c=a.match(/^\s*/,!0)[0].replace(/\t/g," ").length,d=4*Math.floor((c-b.indentation)/4);d>4&&(d=4);var e=b.indentation+d;if(b.indentationDiff=e-b.indentation,b.indentation=e,c>0)return null}return b.f(a,b)},blankLine:E,getType:I}},"xml"),CodeMirror.defineMIME("text/x-markdown","markdown"),function(){function a(a){for(var b={},c=a.split(" "),d=0;d",!1);)a.next();return"comment"},"/":function(a){if(a.eat("/")){for(;!a.eol()&&!a.match("?>",!1);)a.next();return"comment"}return!1}}};CodeMirror.defineMode("php",function(a,b){function f(a,b){var c=b.curMode==e;if(a.sol()&&'"'!=b.pending&&(b.pending=null),c)return c&&null==b.php.tokenize&&a.match("?>")?(b.curMode=d,b.curState=b.html,"meta"):e.token(a,b.curState); +if(a.match(/^<\?\w*/))return b.curMode=e,b.curState=b.php,"meta";if('"'==b.pending){for(;!a.eol()&&'"'!=a.next(););var f="string"}else if(b.pending&&a.pos/.test(g)?'"':{end:a.pos,style:f},a.backUp(g.length-h)),f}var d=CodeMirror.getMode(a,"text/html"),e=CodeMirror.getMode(a,c);return{startState:function(){var a=CodeMirror.startState(d),c=CodeMirror.startState(e);return{html:a,php:c,curMode:b.startOpen?e:d,curState:b.startOpen?c:a,pending:null}},copyState:function(a){var h,b=a.html,c=CodeMirror.copyState(d,b),f=a.php,g=CodeMirror.copyState(e,f);return h=a.curMode==d?c:g,{html:c,php:g,curMode:a.curMode,curState:h,pending:a.pending}},token:f,indent:function(a,b){return a.curMode!=e&&/^\s*<\//.test(b)||a.curMode==e&&/^\?>/.test(b)?d.indent(a.html,b):a.curMode.indent(a.curState,b)},electricChars:"/{}:",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(a){return{state:a.curState,mode:a.curMode}}}},"htmlmixed","clike"),CodeMirror.defineMIME("application/x-httpd-php","php"),CodeMirror.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),CodeMirror.defineMIME("text/x-php",c)}(),CodeMirror.defineMode("python",function(a,b){function d(a){return new RegExp("^(("+a.join(")|(")+"))\\b")}function t(a,b){if(a.sol()){var d=b.scopes[0].offset;if(a.eatSpace()){var l=a.indentation();return l>d?s="indent":d>l&&(s="dedent"),null}d>0&&w(a,b)}if(a.eatSpace())return null;var m=a.peek();if("#"===m)return a.skipToEnd(),"comment";if(a.match(/^[0-9\.]/,!1)){var n=!1;if(a.match(/^\d*\.\d+(e[\+\-]?\d+)?/i)&&(n=!0),a.match(/^\d+\.\d*/)&&(n=!0),a.match(/^\.\d+/)&&(n=!0),n)return a.eat(/J/i),"number";var o=!1;if(a.match(/^0x[0-9a-f]+/i)&&(o=!0),a.match(/^0b[01]+/i)&&(o=!0),a.match(/^0o[0-7]+/i)&&(o=!0),a.match(/^[1-9]\d*(e[\+\-]?\d+)?/)&&(a.eat(/J/i),o=!0),a.match(/^0(?![\dx])/i)&&(o=!0),o)return a.eat(/L/i),"number"}return a.match(p)?(b.tokenize=u(a.current()),b.tokenize(a,b)):a.match(i)||a.match(h)?null:a.match(g)||a.match(e)||a.match(k)?"operator":a.match(f)?null:a.match(q)?"keyword":a.match(r)?"builtin":a.match(j)?"variable":(a.next(),c)}function u(a){function f(f,g){for(;!f.eol();)if(f.eatWhile(/[^'"\\]/),f.eat("\\")){if(f.next(),d&&f.eol())return e}else{if(f.match(a))return g.tokenize=t,e;f.eat(/['"]/)}if(d){if(b.singleLineStringErrors)return c;g.tokenize=t}return e}for(;"rub".indexOf(a.charAt(0).toLowerCase())>=0;)a=a.substr(1);var d=1==a.length,e="string";return f.isString=!0,f}function v(b,c,d){d=d||"py";var e=0;if("py"===d){if("py"!==c.scopes[0].type)return c.scopes[0].offset=b.indentation(),void 0;for(var f=0;f0&&a.eol()&&"py"==b.scopes[0].type&&(b.scopes.length>1&&b.scopes.shift(),b.dedent-=1),d))}var c="error",e=b.singleOperators||new RegExp("^[\\+\\-\\*/%&|\\^~<>!]"),f=b.singleDelimiters||new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),g=b.doubleOperators||new RegExp("^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"),h=b.doubleDelimiters||new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),i=b.tripleDelimiters||new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"),j=b.identifiers||new RegExp("^[_A-Za-z][_A-Za-z0-9]*"),k=d(["and","or","not","is","in"]),l=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield"],m=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"],n={builtins:["apply","basestring","buffer","cmp","coerce","execfile","file","intern","long","raw_input","reduce","reload","unichr","unicode","xrange","False","True","None"],keywords:["exec","print"]},o={builtins:["ascii","bytes","exec","print"],keywords:["nonlocal","False","True","None"]};if(void 0!=b.extra_keywords&&(l=l.concat(b.extra_keywords)),void 0!=b.extra_builtins&&(m=m.concat(b.extra_builtins)),b.version&&3===parseInt(b.version,10)){l=l.concat(o.keywords),m=m.concat(o.builtins);var p=new RegExp("^(([rb]|(br))?('{3}|\"{3}|['\"]))","i")}else{l=l.concat(n.keywords),m=m.concat(n.builtins);var p=new RegExp("^(([rub]|(ur)|(br))?('{3}|\"{3}|['\"]))","i")}var q=d(l),r=d(m),s=null,y={startState:function(a){return{tokenize:t,scopes:[{offset:a||0,type:"py"}],lastToken:null,lambda:!1,dedent:0}},token:function(a,b){var c=x(a,b);return b.lastToken=c,a.eol()&&b.lambda&&(b.lambda=!1),c},indent:function(a){return a.tokenize!=t?a.tokenize.isString?CodeMirror.Pass:0:a.scopes[0].offset},lineComment:"#",fold:"indent"};return y}),CodeMirror.defineMIME("text/x-python","python");var words=function(a){return a.split(" ")};CodeMirror.defineMIME("text/x-cython",{name:"python",extra_keywords:words("by cdef cimport cpdef ctypedef enum exceptextern gil include nogil property publicreadonly struct union DEF IF ELIF ELSE")}),CodeMirror.defineMode("ruby",function(a){function b(a){for(var b={},c=0,d=a.length;d>c;++c)b[a[c]]=!0;return b}function h(a,b,c){return c.tokenize.push(a),a(b,c)}function i(a,b){if(g=null,a.sol()&&a.match("=begin")&&a.eol())return b.tokenize.push(n),"comment";if(a.eatSpace())return null;var d,c=a.next();if("`"==c||"'"==c||'"'==c)return h(l(c,"string",'"'==c||"`"==c),a,b);if("/"!=c||a.eol()||" "==a.peek()){if("%"==c){var e="string",i=!0;a.eat("s")?e="atom":a.eat(/[WQ]/)?e="string":a.eat(/[r]/)?e="string-2":a.eat(/[wxq]/)&&(e="string",i=!1);var j=a.eat(/[^\w\s]/);return j?(f.propertyIsEnumerable(j)&&(j=f[j]),h(l(j,e,i,!0),a,b)):"operator"}if("#"==c)return a.skipToEnd(),"comment";if("<"==c&&(d=a.match(/^<-?[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return h(m(d[1]),a,b);if("0"==c)return a.eat("x")?a.eatWhile(/[\da-fA-F]/):a.eat("b")?a.eatWhile(/[01]/):a.eatWhile(/[0-7]/),"number";if(/\d/.test(c))return a.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),"number";if("?"==c){for(;a.match(/^\\[CM]-/););return a.eat("\\")?a.eatWhile(/\w/):a.next(),"string"}return":"==c?a.eat("'")?h(l("'","atom",!1),a,b):a.eat('"')?h(l('"',"atom",!0),a,b):a.eat(/[\<\>]/)?(a.eat(/[\<\>]/),"atom"):a.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":a.eat(/[a-zA-Z$@_]/)?(a.eatWhile(/[\w]/),a.eat(/[\?\!\=]/),"atom"):"operator":"@"==c&&a.match(/^@?[a-zA-Z_]/)?(a.eat("@"),a.eatWhile(/[\w]/),"variable-2"):"$"==c?(a.eat(/[a-zA-Z_]/)?a.eatWhile(/[\w]/):a.eat(/\d/)?a.eat(/\d/):a.next(),"variable-3"):/[a-zA-Z_]/.test(c)?(a.eatWhile(/[\w]/),a.eat(/[\?\!]/),a.eat(":")?"atom":"ident"):"|"!=c||!b.varList&&"{"!=b.lastTok&&"do"!=b.lastTok?/[\(\)\[\]{}\\;]/.test(c)?(g=c,null):"-"==c&&a.eat(">")?"arrow":/[=+\-\/*:\.^%<>~|]/.test(c)?(a.eatWhile(/[=+\-\/*:\.^%<>~|]/),"operator"):null:(g="|",null)}return h(l(c,"string-2",!0),a,b)}function j(){var a=1;return function(b,c){if("}"==b.peek()){if(a--,0==a)return c.tokenize.pop(),c.tokenize[c.tokenize.length-1](b,c)}else"{"==b.peek()&&a++;return i(b,c)}}function k(){var a=!1;return function(b,c){return a?(c.tokenize.pop(),c.tokenize[c.tokenize.length-1](b,c)):(a=!0,i(b,c))}}function l(a,b,c,d){return function(e,f){var h,g=!1;for("read-quoted-paused"===f.context.type&&(f.context=f.context.prev,e.eat("}"));null!=(h=e.next());){if(h==a&&(d||!g)){f.tokenize.pop();break}if(c&&"#"==h&&!g){if(e.eat("{")){"}"==a&&(f.context={prev:f.context,type:"read-quoted-paused"}),f.tokenize.push(j());break}if(/[@\$]/.test(e.peek())){f.tokenize.push(k());break}}g=!g&&"\\"==h}return b}}function m(a){return function(b,c){return b.match(a)?c.tokenize.pop():b.skipToEnd(),"string"}}function n(a,b){return a.sol()&&a.match("=end")&&a.eol()&&b.tokenize.pop(),a.skipToEnd(),"comment"}var g,c=b(["alias","and","BEGIN","begin","break","case","class","def","defined?","do","else","elsif","END","end","ensure","false","for","if","in","module","next","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield","nil","raise","throw","catch","fail","loop","callcc","caller","lambda","proc","public","protected","private","require","load","require_relative","extend","autoload","__END__","__FILE__","__LINE__","__dir__"]),d=b(["def","class","case","for","while","do","module","then","catch","loop","proc","begin"]),e=b(["end","until"]),f={"[":"]","{":"}","(":")"};return{startState:function(){return{tokenize:[i],indented:0,context:{type:"top",indented:-a.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(a,b){a.sol()&&(b.indented=a.indentation());var h,f=b.tokenize[b.tokenize.length-1](a,b);if("ident"==f){var i=a.current();f=c.propertyIsEnumerable(a.current())?"keyword":/^[A-Z]/.test(i)?"tag":"def"==b.lastTok||"class"==b.lastTok||b.varList?"def":"variable",d.propertyIsEnumerable(i)?h="indent":e.propertyIsEnumerable(i)?h="dedent":"if"!=i&&"unless"!=i||a.column()!=a.indentation()||(h="indent")}return(g||f&&"comment"!=f)&&(b.lastTok=i||g||f),"|"==g&&(b.varList=!b.varList),"indent"==h||/[\(\[\{]/.test(g)?b.context={prev:b.context,type:g||f,indented:b.indented}:("dedent"==h||/[\)\]\}]/.test(g))&&b.context.prev&&(b.context=b.context.prev),a.eol()&&(b.continuedLine="\\"==g||"operator"==f),f},indent:function(b,c){if(b.tokenize[b.tokenize.length-1]!=i)return 0;var d=c&&c.charAt(0),e=b.context,g=e.type==f[d]||"keyword"==e.type&&/^(?:end|until|else|elsif|when|rescue)\b/.test(c);return e.indented+(g?0:a.indentUnit)+(b.continuedLine?a.indentUnit:0)},electricChars:"}de",lineComment:"#"}}),CodeMirror.defineMIME("text/x-ruby","ruby"),CodeMirror.defineMode("sql",function(a,b){"use strict";function k(a,b){var k=a.next();if(i[k]){var n=i[k](a,b);if(n!==!1)return n}if(1==h.hexNumber&&("0"==k&&a.match(/^[xX][0-9a-fA-F]+/)||("x"==k||"X"==k)&&a.match(/^'[0-9a-fA-F]+'/)))return"number";if(1==h.binaryNumber&&(("b"==k||"B"==k)&&a.match(/^'[01]+'/)||"0"==k&&a.match(/^b[01]+/)))return"number";if(k.charCodeAt(0)>47&&k.charCodeAt(0)<58)return a.match(/^[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/),1==h.decimallessFloat&&a.eat("."),"number";if("?"==k&&(a.eatSpace()||a.eol()||a.eat(";")))return"variable-3";if("'"==k||'"'==k&&h.doubleQuote)return b.tokenize=l(k),b.tokenize(a,b);if((1==h.nCharCast&&("n"==k||"N"==k)||1==h.charsetCast&&"_"==k&&a.match(/[a-z][a-z0-9]*/i))&&("'"==a.peek()||'"'==a.peek()))return"keyword";if(/^[\(\),\;\[\]]/.test(k))return null;if(h.commentSlashSlash&&"/"==k&&a.eat("/"))return a.skipToEnd(),"comment";if(h.commentHash&&"#"==k||"-"==k&&a.eat("-")&&(!h.commentSpaceRequired||a.eat(" ")))return a.skipToEnd(),"comment";if("/"==k&&a.eat("*"))return b.tokenize=m,b.tokenize(a,b);if("."!=k){if(g.test(k))return a.eatWhile(g),null;if("{"==k&&(a.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||a.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";a.eatWhile(/^[_\w\d]/);var o=a.current().toLowerCase();return j.hasOwnProperty(o)&&(a.match(/^( )+'[^']*'/)||a.match(/^( )+"[^"]*"/))?"number":d.hasOwnProperty(o)?"atom":e.hasOwnProperty(o)?"builtin":f.hasOwnProperty(o)?"keyword":c.hasOwnProperty(o)?"string-2":null}return 1==h.zerolessFloat&&a.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":1==h.ODBCdotTable&&a.match(/^[a-zA-Z_]+/)?"variable-2":void 0}function l(a){return function(b,c){for(var e,d=!1;null!=(e=b.next());){if(e==a&&!d){c.tokenize=k;break}d=!d&&"\\"==e}return"string"}}function m(a,b){for(;;){if(!a.skipTo("*")){a.skipToEnd();break}if(a.next(),a.eat("/")){b.tokenize=k;break}}return"comment"}function n(a,b,c){b.context={prev:b.context,indent:a.indentation(),col:a.column(),type:c}}function o(a){a.indent=a.context.indent,a.context=a.context.prev}var c=b.client||{},d=b.atoms||{"false":!0,"true":!0,"null":!0},e=b.builtin||{},f=b.keywords||{},g=b.operatorChars||/^[*+\-%<>!=&|~^]/,h=b.support||{},i=b.hooks||{},j=b.dateSQL||{date:!0,time:!0,timestamp:!0};return{startState:function(){return{tokenize:k,context:null}},token:function(a,b){if(a.sol()&&b.context&&null==b.context.align&&(b.context.align=!1),a.eatSpace())return null;var c=b.tokenize(a,b);if("comment"==c)return c;b.context&&null==b.context.align&&(b.context.align=!0);var d=a.current();return"("==d?n(a,b,")"):"["==d?n(a,b,"]"):b.context&&b.context.type==d&&o(b),c},indent:function(b,c){var d=b.context;return d?d.align?d.col+(c.charAt(0)==d.type?0:1):d.indent+a.indentUnit:CodeMirror.Pass}}}),function(){"use strict";function a(a){for(var b;null!=(b=a.next());)if("`"==b&&!a.eat("`"))return"variable-2";return null}function b(a){return a.eat("@")&&(a.match(/^session\./),a.match(/^local\./),a.match(/^global\./)),a.eat("'")?(a.match(/^.*'/),"variable-2"):a.eat('"')?(a.match(/^.*"/),"variable-2"):a.eat("`")?(a.match(/^.*`/),"variable-2"):a.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function c(a){return a.eat("N")?"atom":a.match(/^[a-zA-Z.#!?]/)?"variable-2":null}function e(a){for(var b={},c=a.split(" "),d=0;d!=]/,dateSQL:e("date time timestamp"),support:e("ODBCdotTable doubleQuote binaryNumber hexNumber")}),CodeMirror.defineMIME("text/x-mysql",{name:"sql",client:e("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:e(d+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general global grant grants group groupby_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:e("bool boolean bit blob decimal double enum float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:e("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:e("date time timestamp"),support:e("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":b,"`":a,"\\":c}}),CodeMirror.defineMIME("text/x-mariadb",{name:"sql",client:e("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:e(d+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:e("bool boolean bit blob decimal double enum float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:e("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:e("date time timestamp"),support:e("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":b,"`":a,"\\":c}}),CodeMirror.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:e("use select from using consistency where limit first reversed first and in insert into values using consistency ttl update set delete truncate begin batch apply create keyspace with columnfamily primary key index on drop alter type add any one quorum all local_quorum each_quorum"),builtin:e("ascii bigint blob boolean counter decimal double float int text timestamp uuid varchar varint"),atoms:e("false true"),operatorChars:/^[<>=]/,dateSQL:{},support:e("commentSlashSlash decimallessFloat"),hooks:{}}),CodeMirror.defineMIME("text/x-plsql",{name:"sql",client:e("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:e("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),functions:e("abs acos add_months ascii asin atan atan2 average bfilename ceil chartorowid chr concat convert cos cosh count decode deref dual dump dup_val_on_index empty error exp false floor found glb greatest hextoraw initcap instr instrb isopen last_day least lenght lenghtb ln lower lpad ltrim lub make_ref max min mod months_between new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null nvl others power rawtohex reftohex round rowcount rowidtochar rpad rtrim sign sin sinh soundex sqlcode sqlerrm sqrt stddev substr substrb sum sysdate tan tanh to_char to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid upper user userenv variance vsize"),builtin:e("bfile blob character clob dec float int integer mlslabel natural naturaln nchar nclob number numeric nvarchar2 real rowtype signtype smallint string varchar varchar2"),operatorChars:/^[*+\-%<>!=~]/,dateSQL:e("date time timestamp"),support:e("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")})}(),CodeMirror.defineMode("xml",function(a,b){function j(a,b){function c(c){return b.tokenize=c,c(a,b)}var d=a.next();if("<"==d){if(a.eat("!"))return a.eat("[")?a.match("CDATA[")?c(m("atom","]]>")):null:a.match("--")?c(m("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),c(n(1))):null;if(a.eat("?"))return a.eatWhile(/[\w\._\-]/),b.tokenize=m("meta","?>"),"meta";var e=a.eat("/");h="";for(var f;f=a.eat(/[^\s\u00a0=<>\"\'\/?]/);)h+=f;return h?(i=e?"closeTag":"openTag",b.tokenize=k,"tag"):"error"}if("&"==d){var g;return g=a.eat("#")?a.eat("x")?a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):a.eatWhile(/[\d]/)&&a.eat(";"):a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),g?"atom":"error"}return a.eatWhile(/[^&<]/),null}function k(a,b){var c=a.next();return">"==c||"/"==c&&a.eat(">")?(b.tokenize=j,i=">"==c?"endTag":"selfcloseTag","tag"):"="==c?(i="equals",null):"<"==c?"error":/[\'\"]/.test(c)?(b.tokenize=l(c),b.stringStartCol=a.column(),b.tokenize(a,b)):(a.eatWhile(/[^\s\u00a0=<>\"\']/),"word")}function l(a){var b=function(b,c){for(;!b.eol();)if(b.next()==a){c.tokenize=k;break}return"string"};return b.isInAttribute=!0,b}function m(a,b){return function(c,d){for(;!c.eol();){if(c.match(b)){d.tokenize=j;break}c.next()}return a}}function n(a){return function(b,c){for(var d;null!=(d=b.next());){if("<"==d)return c.tokenize=n(a+1),c.tokenize(b,c);if(">"==d){if(1==a){c.tokenize=j;break}return c.tokenize=n(a-1),c.tokenize(b,c)}}return"meta"}}function r(){for(var a=arguments.length-1;a>=0;a--)o.cc.push(arguments[a])}function s(){return r.apply(null,arguments),!0}function t(a,b){var c=f.doNotIndent.hasOwnProperty(a)||o.context&&o.context.noIndent;o.context={prev:o.context,tagName:a,indent:o.indented,startOfLine:b,noIndent:c}}function u(){o.context&&(o.context=o.context.prev)}function v(a){if("openTag"==a)return o.tagName=h,o.tagStart=p.column(),s(z,w(o.startOfLine));if("closeTag"==a){var b=!1;return o.context?o.context.tagName!=h&&(f.implicitlyClosed.hasOwnProperty(o.context.tagName.toLowerCase())&&u(),b=!o.context||o.context.tagName!=h):b=!0,b&&(q="error"),s(x(b))}return s()}function w(a){return function(b){var c=o.tagName;return o.tagName=o.tagStart=null,"selfcloseTag"==b||"endTag"==b&&f.autoSelfClosers.hasOwnProperty(c.toLowerCase())?(y(c.toLowerCase()),s()):"endTag"==b?(y(c.toLowerCase()),t(c,a),s()):s()}}function x(a){return function(b){return a&&(q="error"),"endTag"==b?(u(),s()):(q="error",s(arguments.callee))}}function y(a){for(var b;;){if(!o.context)return;if(b=o.context.tagName.toLowerCase(),!f.contextGrabbers.hasOwnProperty(b)||!f.contextGrabbers[b].hasOwnProperty(a))return;u()}}function z(a){return"word"==a?(q="attribute",s(A,z)):"endTag"==a||"selfcloseTag"==a?r():(q="error",s(z))}function A(a){if("equals"==a)return s(B,z);if(f.allowMissing){if("word"==a)return q="attribute",s(A,z)}else q="error";return"endTag"==a||"selfcloseTag"==a?r():s()}function B(a){return"string"==a?s(C):"word"==a&&f.allowUnquoted?(q="string",s()):(q="error","endTag"==a||"selfCloseTag"==a?r():s())}function C(a){return"string"==a?s(C):r()}var h,i,o,p,q,c=a.indentUnit,d=b.multilineTagIndentFactor||1,e=b.multilineTagIndentPastTag||!0,f=b.htmlMode?{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},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}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1},g=b.alignCDATA;return{startState:function(){return{tokenize:j,cc:[],indented:0,startOfLine:!0,tagName:null,tagStart:null,context:null}},token:function(a,b){if(!b.tagName&&a.sol()&&(b.startOfLine=!0,b.indented=a.indentation()),a.eatSpace())return null;q=i=h=null;var c=b.tokenize(a,b);if(b.type=i,(c||i)&&"comment"!=c)for(o=b,p=a;;){var d=b.cc.pop()||v;if(d(i||c))break}return b.startOfLine=!1,q||c},indent:function(a,b,f){var h=a.context;if(a.tokenize.isInAttribute)return a.stringStartCol+1;if(a.tokenize!=k&&a.tokenize!=j||h&&h.noIndent)return f?f.match(/^(\s*)/)[0].length:0;if(a.tagName)return e?a.tagStart+a.tagName.length+2:a.tagStart+c*d;if(g&&/",configuration:b.htmlMode?"html":"xml",helperType:b.htmlMode?"html":"xml"}}),CodeMirror.defineMIME("text/xml","xml"),CodeMirror.defineMIME("application/xml","xml"),CodeMirror.mimeModes.hasOwnProperty("text/html")||CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:!0}),CodeMirror.registerHelper("fold","brace",function(a,b){function g(e){for(var g=b.ch,h=0;;){var i=0>=g?-1:d.lastIndexOf(e,g-1); +if(-1!=i){if(1==h&&i=n;++n)for(var o=a.getLine(n),p=n==c?e:0;;){var q=o.indexOf(h,p),r=o.indexOf(i,p);if(0>q&&(q=o.length),0>r&&(r=o.length),p=Math.min(q,r),p==o.length)break;if(a.getTokenTypeAt(CodeMirror.Pos(n,p+1))==f)if(p==q)++j;else if(!--j){l=n,m=p;break a}++p}if(null!=l&&(c!=l||m!=e))return{from:CodeMirror.Pos(c,e),to:CodeMirror.Pos(l,m)}}}),CodeMirror.braceRangeFinder=CodeMirror.fold.brace,CodeMirror.registerHelper("fold","import",function(a,b){function c(b){if(ba.lastLine())return null;var c=a.getTokenAt(CodeMirror.Pos(b,1));if(/\S/.test(c.string)||(c=a.getTokenAt(CodeMirror.Pos(b,c.end+1))),"keyword"!=c.type||"import"!=c.string)return null;for(var d=b,e=Math.min(a.lastLine(),b+10);e>=d;++d){var f=a.getLine(d),g=f.indexOf(";");if(-1!=g)return{startCh:c.end,end:CodeMirror.Pos(d,g)}}}var e,b=b.line,d=c(b);if(!d||c(b-1)||(e=c(b-2))&&e.end.line==b-1)return null;for(var f=d.end;;){var g=c(f.line+1);if(null==g)break;f=g.end}return{from:a.clipPos(CodeMirror.Pos(b,d.startCh+1)),to:f}}),CodeMirror.importRangeFinder=CodeMirror.fold["import"],CodeMirror.registerHelper("fold","include",function(a,b){function c(b){if(ba.lastLine())return null;var c=a.getTokenAt(CodeMirror.Pos(b,1));return/\S/.test(c.string)||(c=a.getTokenAt(CodeMirror.Pos(b,c.end+1))),"meta"==c.type&&"#include"==c.string.slice(0,8)?c.start+8:void 0}var b=b.line,d=c(b);if(null==d||null!=c(b-1))return null;for(var e=b;;){var f=c(e+1);if(null==f)break;++e}return{from:CodeMirror.Pos(b,d+1),to:a.clipPos(CodeMirror.Pos(e))}}),CodeMirror.includeRangeFinder=CodeMirror.fold.include,function(){function c(c,e){var f=c.getCursor(),g=c.getTokenAt(f),h=CodeMirror.innerMode(c.getMode(),g.state),i=h.state;if("xml"!=h.mode.name)return CodeMirror.Pass;var j=c.getOption("autoCloseTags"),k="html"==h.mode.configuration,l="object"==typeof j&&j.dontCloseTags||k&&a,m="object"==typeof j&&j.indentTags||k&&b;if(">"==e&&i.tagName){var n=i.tagName;g.end>f.ch&&(n=n.slice(0,n.length-g.end+f.ch));var o=n.toLowerCase();if("tag"==g.type&&"closeTag"==i.type||g.string.indexOf("/")==g.string.length-1||l&&d(l,o)>-1)return CodeMirror.Pass;var p=m&&d(m,o)>-1,q=p?CodeMirror.Pos(f.line+1,0):CodeMirror.Pos(f.line,f.ch+1);return c.replaceSelection(">"+(p?"\n\n":"")+"",{head:q,anchor:q}),p&&(c.indentLine(f.line+1),c.indentLine(f.line+2)),void 0}if("/"==e&&"<"==g.string){var n=i.context&&i.context.tagName;return n&&c.replaceSelection("/"+n+">","end"),void 0}return CodeMirror.Pass}function d(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;d>c;++c)if(a[c]==b)return c;return-1}CodeMirror.defineOption("autoCloseTags",!1,function(a,b,d){if(!b||d!=CodeMirror.Init&&d)!b&&d!=CodeMirror.Init&&d&&a.removeKeyMap("autoCloseTags");else{var e={name:"autoCloseTags"};("object"!=typeof b||b.whenClosing)&&(e["'/'"]=function(a){return c(a,"/")}),("object"!=typeof b||b.whenOpening)&&(e["'>'"]=function(a){return c(a,">")}),a.addKeyMap(e)}});var a=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],b=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"]}(),function(){function j(a){for(var b in i)i.hasOwnProperty(b)&&(a.attrs[b]=i[b])}function l(a,b){var c={schemaInfo:h};if(b)for(var d in b)c[d]=b[d];return CodeMirror.hint.xml(a,c)}var a="ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" "),b=["_blank","_self","_top","_parent"],c=["ascii","utf-8","utf-16","latin1","latin1"],d=["get","post","put","delete"],e=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],f=["all","screen","print","embossed","braille","handheld","print","projection","screen","tty","tv","speech","3d-glasses","resolution [>][<][=] [X]","device-aspect-ratio: X/Y","orientation:portrait","orientation:landscape","device-height: [X]","device-width: [X]"],g={attrs:{}},h={a:{attrs:{href:null,ping:null,type:null,media:f,target:b,hreflang:a}},abbr:g,acronym:g,address:g,applet:g,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:f,hreflang:a,type:null,shape:["default","rect","circle","poly"]}},article:g,aside:g,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:g,base:{attrs:{href:null,target:b}},basefont:g,bdi:g,bdo:g,big:g,blockquote:{attrs:{cite:null}},body:g,br:g,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:e,formmethod:d,formnovalidate:["","novalidate"],formtarget:b,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:g,center:g,cite:g,code:g,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["","disabled"],checked:["","checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["","disabled"],multiple:["","multiple"]}},datalist:{attrs:{data:null}},dd:g,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:g,dir:g,div:g,dl:g,dt:g,em:g,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:g,figure:g,font:g,footer:g,form:{attrs:{action:null,name:null,"accept-charset":c,autocomplete:["on","off"],enctype:e,method:d,novalidate:["","novalidate"],target:b}},frame:g,frameset:g,h1:g,h2:g,h3:g,h4:g,h5:g,h6:g,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:g,hgroup:g,hr:g,html:{attrs:{manifest:null},children:["head","body"]},i:g,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["","seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["","autofocus"],checked:["","checked"],disabled:["","disabled"],formenctype:e,formmethod:d,formnovalidate:["","novalidate"],formtarget:b,multiple:["","multiple"],readonly:["","readonly"],required:["","required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:g,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{"for":null,form:null}},legend:g,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:a,media:f,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:g,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:c,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:g,noframes:g,noscript:g,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["","typemustmatch"]}},ol:{attrs:{reversed:["","reversed"],start:null,type:["1","a","A","i","I"]}},optgroup:{attrs:{disabled:["","disabled"],label:null}},option:{attrs:{disabled:["","disabled"],label:null,selected:["","selected"],value:null}},output:{attrs:{"for":null,form:null,name:null}},p:g,param:{attrs:{name:null,value:null}},pre:g,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:g,rt:g,ruby:g,s:g,samp:g,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:c}},section:g,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:g,source:{attrs:{src:null,type:null,media:null}},span:g,strike:g,strong:g,style:{attrs:{type:["text/css"],media:f,scoped:null}},sub:g,summary:g,sup:g,table:g,tbody:g,td:{attrs:{colspan:null,rowspan:null,headers:null}},textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["","autofocus"],disabled:["","disabled"],readonly:["","readonly"],required:["","required"],wrap:["soft","hard"]}},tfoot:g,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:g,time:{attrs:{datetime:null}},title:g,tr:g,track:{attrs:{src:null,label:null,"default":null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:a}},tt:g,u:g,ul:g,"var":g,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["","autoplay"],mediagroup:["movie"],muted:["","muted"],controls:["","controls"]}},wbr:g},i={accesskey:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"],"class":null,contenteditable:["true","false"],contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["en","es"],spellcheck:["true","false"],style:null,tabindex:["1","2","3","4","5","6","7","8","9"],title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"]};j(g);for(var k in h)h.hasOwnProperty(k)&&h[k]!=g&&j(h[k]);CodeMirror.htmlSchema=h,CodeMirror.htmlHint=l,CodeMirror.registerHelper("hint","html",l)}(),function(){function b(a,b){for(var c=0,d=a.length;d>c;++c)b(a[c])}function c(a,b){if(!Array.prototype.indexOf){for(var c=a.length;c--;)if(a[c]===b)return!0;return!1}return-1!=a.indexOf(b)}function d(b,c,d,e){var f=b.getCursor(),g=d(b,f),h=g;for(g.state=CodeMirror.innerMode(b.getMode(),g.state).state,/^[\w$_]*$/.test(g.string)||(g=h={start:f.ch,end:f.ch,string:"",state:g.state,type:"."==g.string?"property":null});"property"==h.type;){if(h=d(b,a(f.line,h.start)),"."!=h.string)return;if(h=d(b,a(f.line,h.start)),")"==h.string){var i=1;do switch(h=d(b,a(f.line,h.start)),h.string){case")":i++;break;case"(":i--}while(i>0);if(h=d(b,a(f.line,h.start)),0!==h.type.indexOf("variable"))return;h.type="function"}if(!j)var j=[];j.push(h)}return{list:m(g,j,c,e),from:a(f.line,g.start),to:a(f.line,g.end)}}function e(a,b){return d(a,k,function(a,b){return a.getTokenAt(b)},b)}function f(a,b){var c=a.getTokenAt(b);return b.ch==c.start+1&&"."==c.string.charAt(0)?(c.end=c.start,c.string=".",c.type="property"):/^\.[\w$_]*$/.test(c.string)&&(c.type="property",c.start++,c.string=c.string.replace(/\./,"")),c}function g(a,b){return d(a,l,f,b)}function m(a,d,e,f){function l(a){0!=a.indexOf(k)||c(g,a)||g.push(a)}function m(a){"string"==typeof a?b(h,l):a instanceof Array?b(i,l):a instanceof Function&&b(j,l);for(var c in a)l(c)}var g=[],k=a.string;if(d){var o,n=d.pop();for(0===n.type.indexOf("variable")?(f&&f.additionalContext&&(o=f.additionalContext[n.string]),o=o||window[n.string]):"string"==n.type?o="":"atom"==n.type?o=1:"function"==n.type&&(null==window.jQuery||"$"!=n.string&&"jQuery"!=n.string||"function"!=typeof window.jQuery?null!=window._&&"_"==n.string&&"function"==typeof window._&&(o=window._()):o=window.jQuery());null!=o&&d.length;)o=o[d.pop().string];null!=o&&m(o)}else{for(var p=a.state.localVars;p;p=p.next)l(p.name);for(var p=a.state.globalVars;p;p=p.next)l(p.name);m(window),b(e,l)}return g}var a=CodeMirror.Pos;CodeMirror.javascriptHint=e,CodeMirror.registerHelper("hint","javascript",e),CodeMirror.coffeescriptHint=g,CodeMirror.registerHelper("hint","coffeescript",g);var h="charAt charCodeAt indexOf lastIndexOf substring substr slice trim trimLeft trimRight toUpperCase toLowerCase split concat match replace search".split(" "),i="length concat join splice push pop shift unshift slice reverse sort indexOf lastIndexOf every some filter forEach map reduce reduceRight ".split(" "),j="prototype apply call bind".split(" "),k="break case catch continue debugger default delete do else false finally for function if in instanceof new null return switch throw true try typeof var void while with".split(" "),l="and break catch class continue delete do else extends false finally for if in instanceof isnt new no not null of off on or return switch then throw true try typeof until void while with yes".split(" ")}(),function(){function d(a,b){JSHINT(a,b);var c=JSHINT.data().errors,d=[];return c&&h(c,d),d}function e(a){return f(a,b,"warning",!0),f(a,c,"error"),g(a)?null:a}function f(a,b,c,d){var e,f,g,h,i;e=a.description;for(var j=0;j0){var j=d.character;h.forEach(function(a){j>a&&(j-=1)}),d.character=j}}var k=d.character-1,l=k+1;d.evidence&&(g=d.evidence.substring(k).search(/.\b/),g>-1&&(l+=g)),d.description=d.reason,d.start=d.character,d.end=l,d=e(d),d&&b.push({message:d.description,severity:d.severity,from:CodeMirror.Pos(d.line-1,k),to:CodeMirror.Pos(d.line-1,l)})}}}var a=["Dangerous comment"],b=[["Expected '{'","Statement body should be inside '{ }' braces."]],c=["Missing semicolon","Extra comma","Missing property name","Unmatched "," and instead saw"," is not defined","Unclosed string","Stopping, unable to continue"];CodeMirror.registerHelper("lint","javascript",d),CodeMirror.javascriptValidator=CodeMirror.lint.javascript}(),function(){"use strict";function c(a,b){function d(a){return c.parentNode?(c.style.top=Math.max(0,a.clientY-c.offsetHeight-5)+"px",c.style.left=a.clientX+5+"px",void 0):CodeMirror.off(document,"mousemove",d)}var c=document.createElement("div");return c.className="CodeMirror-lint-tooltip",c.appendChild(b.cloneNode(!0)),document.body.appendChild(c),CodeMirror.on(document,"mousemove",d),d(a),null!=c.style.opacity&&(c.style.opacity=1),c}function d(a){a.parentNode&&a.parentNode.removeChild(a)}function e(a){a.parentNode&&(null==a.style.opacity&&d(a),a.style.opacity=0,setTimeout(function(){d(a)},600))}function f(a,b,d){function g(){CodeMirror.off(d,"mouseout",g),f&&(e(f),f=null)}var f=c(a,b),h=setInterval(function(){if(f)for(var a=d;;a=a.parentNode){if(a==document.body)return;if(!a){g();break}}return f?void 0:clearInterval(h)},400);CodeMirror.on(d,"mouseout",g)}function g(a,b,c){this.marked=[],this.options=b,this.timeout=null,this.hasGutter=c,this.onMouseOver=function(b){s(a,b)}}function h(a,b){if(b instanceof Function)return{getAnnotations:b};if(b&&b!==!0||(b={}),b.getAnnotations||(b.getAnnotations=a.getHelper(CodeMirror.Pos(0,0),"lint")),!b.getAnnotations)throw new Error("Required option 'getAnnotations' missing (lint addon)");return b}function i(b){var c=b.state.lint;c.hasGutter&&b.clearGutter(a);for(var d=0;d1,e.options.tooltips))}}f.onUpdateLinting&&f.onUpdateLinting(d,g,c)}function p(a){var b=a.state.lint;clearTimeout(b.timeout),b.timeout=setTimeout(function(){n(a)},b.options.delay||500)}function q(a,b){var c=b.target||b.srcElement;f(b,m(a),c)}function s(a,b){if(/\bCodeMirror-lint-mark-/.test((b.target||b.srcElement).className))for(var c=0;cf&&a.addOverlay(b.overlay=g(e.slice(f,h),c,b.style)),void 0}if(a.getCursor("head").line==a.getCursor("anchor").line){var i=a.getSelection().replace(/^\s+|\s+$/g,"");i.length>=b.minChars&&a.addOverlay(b.overlay=g(i,!1,b.style))}})}function f(a,b){return!(a.start&&b.test(a.string.charAt(a.start-1))||a.pos!=a.string.length&&b.test(a.string.charAt(a.pos)))}function g(a,b,c){return{token:function(d){return!d.match(a)||b&&!f(d,b)?(d.next(),d.skipTo(a.charAt(0))||d.skipToEnd(),void 0):c}}}var a=2,b="matchhighlight";CodeMirror.defineOption("highlightSelectionMatches",!1,function(a,b,f){if(f&&f!=CodeMirror.Init){var g=a.state.matchHighlighter.overlay;g&&a.removeOverlay(g),clearTimeout(a.state.matchHighlighter.timeout),a.state.matchHighlighter=null,a.off("cursorActivity",d)}b&&(a.state.matchHighlighter=new c(b),e(a),a.on("cursorActivity",d))})}(),function(){function b(b,c,d,e){if(this.atOccurrence=!1,this.doc=b,null==e&&"string"==typeof c&&(e=!1),d=d?b.clipPos(d):a(0,0),this.pos={from:d,to:d},"string"!=typeof c)c.global||(c=new RegExp(c.source,c.ignoreCase?"ig":"g")),this.matches=function(d,e){if(d){c.lastIndex=0;for(var h,i,f=b.getLine(e.line).slice(0,e.ch),g=0;;){c.lastIndex=g;var j=c.exec(f);if(!j)break;if(h=j,i=h.index,g=h.index+(h[0].length||1),g==f.length)break}var k=h&&h[0].length||0;k||(0==i&&0==f.length?h=void 0:i!=b.getLine(e.line).length&&k++)}else{c.lastIndex=e.ch;var f=b.getLine(e.line),h=c.exec(f),k=h&&h[0].length||0,i=h&&h.index;i+k==f.length||k||(k=1)}return h&&k?{from:a(e.line,i),to:a(e.line,i+k),match:h}:void 0};else{e&&(c=c.toLowerCase());var f=e?function(a){return a.toLowerCase()}:function(a){return a},g=c.split("\n");this.matches=1==g.length?c.length?function(d,e){var i,g=f(b.getLine(e.line)),h=c.length;return(d?e.ch>=h&&-1!=(i=g.lastIndexOf(c,e.ch-h)):-1!=(i=g.indexOf(c,e.ch)))?{from:a(e.line,i),to:a(e.line,i+h)}:void 0}:function(){}:function(c,d){var e=d.line,h=c?g.length-1:0,i=g[h],j=f(b.getLine(e)),k=c?j.indexOf(i)+i.length:j.lastIndexOf(i);if(!(c?k>=d.ch||k!=i.length:k<=d.ch||k!=j.length-i.length))for(;;){if(c?!e:e==b.lineCount()-1)return;if(j=f(b.getLine(e+=c?-1:1)),i=g[c?--h:++h],!(h>0&&h0&&(t.right-t.left>r&&(h.style.width=r-5+"px",u-=t.right-t.left-r),h.style.left=(o=n.left-u)+"px"),v>0){var w=t.bottom-t.top;t.top-(n.bottom-n.top)-w>0?(v=w+(n.bottom-n.top),q=!1):w>s&&(h.style.height=s-5+"px",v-=w-s),h.style.top=(p=n.bottom-v)+"px"}if((g.container||document.body).appendChild(h),f.addKeyMap(this.keyMap=c(g,{moveFocus:function(a){e.changeActive(e.selectedHint+a)},setFocus:function(a){e.changeActive(a)},menuSize:function(){return e.screenAmount()},length:i.length,close:function(){a.close()},pick:function(){e.pick()}})),g.closeOnUnfocus!==!1){var x;f.on("blur",this.onBlur=function(){x=setTimeout(function(){a.close()},100)}),f.on("focus",this.onFocus=function(){clearTimeout(x)})}var y=f.getScrollInfo();return f.on("scroll",this.onScroll=function(){var b=f.getScrollInfo(),c=f.getWrapperElement().getBoundingClientRect(),d=p+y.top-b.top,e=d-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return q||(e+=h.offsetHeight),e<=c.top||e>=c.bottom?a.close():(h.style.top=d+"px",h.style.left=o+y.left-b.left+"px",void 0)}),CodeMirror.on(h,"dblclick",function(a){var b=a.target||a.srcElement;null!=b.hintId&&(e.changeActive(b.hintId),e.pick())}),CodeMirror.on(h,"click",function(a){var b=a.target||a.srcElement;null!=b.hintId&&e.changeActive(b.hintId)}),CodeMirror.on(h,"mousedown",function(){setTimeout(function(){f.focus()},20)}),CodeMirror.signal(d,"select",i[0],h.firstChild),!0}CodeMirror.showHint=function(b,c,d){if(!b.somethingSelected()&&(null==c&&(c=b.getHelper(b.getCursor(),"hint")),null!=c)){b.state.completionActive&&b.state.completionActive.close();var e=b.state.completionActive=new a(b,c,d||{});return CodeMirror.signal(b,"startCompletion",b),e.options.async?(c(b,function(a){e.showHints(a)},e.options),void 0):e.showHints(c(b,e.options))}},a.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.widget&&this.widget.close(),this.onClose&&this.onClose(),CodeMirror.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(a,c){var d=a.list[c];d.hint?d.hint(this.cm,a,d):this.cm.replaceRange(b(d),a.from,a.to),this.close()},showHints:function(a){return a&&a.list.length&&this.active()?(0!=this.options.completeSingle&&1==a.list.length?this.pick(a,0):this.showWidget(a),void 0):this.close()},showWidget:function(a){function i(){e||(e=!0,c.close(),c.cm.off("cursorActivity",l),a&&CodeMirror.signal(a,"close"))}function j(){e||(CodeMirror.signal(a,"update"),c.options.async?c.getHints(c.cm,k,c.options):k(c.getHints(c.cm,c.options)))}function k(b){return a=b,e?void 0:a&&a.list.length?(c.widget=new d(c,a),void 0):i()}function l(){clearTimeout(b);var a=c.cm.getCursor(),d=c.cm.getLine(a.line);a.line!=g.line||d.length-a.ch!=h-g.ch||a.ch,]/,g=this.cm.getCursor(),h=this.cm.getLine(g.line).length;this.cm.on("cursorActivity",l),this.onClose=i}},d.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var a=this.completion.cm;this.completion.options.closeOnUnfocus!==!1&&(a.off("blur",this.onBlur),a.off("focus",this.onFocus)),a.off("scroll",this.onScroll)}},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(a){if(a=Math.max(0,Math.min(a,this.data.list.length-1)),this.selectedHint!=a){var b=this.hints.childNodes[this.selectedHint];b.className=b.className.replace(" CodeMirror-hint-active",""),b=this.hints.childNodes[this.selectedHint=a],b.className+=" CodeMirror-hint-active",b.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=b.offsetTop+b.offsetHeight-this.hints.clientHeight+3),CodeMirror.signal(this.data,"select",this.data.list[this.selectedHint],b)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}}}(),CodeMirror.defineOption("showTrailingSpace",!1,function(a,b,c){c==CodeMirror.Init&&(c=!1),c&&!b?a.removeOverlay("trailingspace"):!c&&b&&a.addOverlay({token:function(a){for(var b=a.string.length,c=b;c&&/\s/.test(a.string.charAt(c-1));--c);return c>a.pos?(a.pos=c,null):(a.pos=b,"trailingspace")},name:"trailingspace"})}),function(){"use strict";function b(a,b){return a.line-b.line||a.ch-b.ch}function f(a,b,c,d){this.line=b,this.ch=c,this.cm=a,this.text=a.getLine(b),this.min=d?d.from:a.firstLine(),this.max=d?d.to-1:a.lastLine()}function g(b,c){var d=b.cm.getTokenTypeAt(a(b.line,c));return d&&/\btag\b/.test(d)}function h(a){return a.line>=a.max?void 0:(a.ch=0,a.text=a.cm.getLine(++a.line),!0)}function i(a){return a.line<=a.min?void 0:(a.text=a.cm.getLine(--a.line),a.ch=a.text.length,!0)}function j(a){for(;;){var b=a.text.indexOf(">",a.ch);if(-1==b){if(h(a))continue;return}{if(g(a,b+1)){var c=a.text.lastIndexOf("/",b),d=c>-1&&!/\S/.test(a.text.slice(c+1,b));return a.ch=b+1,d?"selfClose":"regular"}a.ch=b+1}}}function k(a){for(;;){var b=a.ch?a.text.lastIndexOf("<",a.ch-1):-1;if(-1==b){if(i(a))continue;return}if(g(a,b+1)){e.lastIndex=b,a.ch=b;var c=e.exec(a.text);if(c&&c.index==b)return c}else a.ch=b}}function l(a){for(;;){e.lastIndex=a.ch;var b=e.exec(a.text);if(!b){if(h(a))continue;return}{if(g(a,b.index+1))return a.ch=b.index+b[0].length,b;a.ch=b.index+1}}}function m(a){for(;;){var b=a.ch?a.text.lastIndexOf(">",a.ch-1):-1;if(-1==b){if(i(a))continue;return}{if(g(a,b+1)){var c=a.text.lastIndexOf("/",b),d=c>-1&&!/\S/.test(a.text.slice(c+1,b));return a.ch=b+1,d?"selfClose":"regular"}a.ch=b}}}function n(b,c){for(var d=[];;){var f,e=l(b),g=b.line,h=b.ch-(e?e[0].length:0);if(!e||!(f=j(b)))return;if("selfClose"!=f)if(e[1]){for(var i=d.length-1;i>=0;--i)if(d[i]==e[2]){d.length=i;break}if(0>i&&(!c||c==e[2]))return{tag:e[2],from:a(g,h),to:a(b.line,b.ch)}}else d.push(e[2])}}function o(b,c){for(var d=[];;){var e=m(b);if(!e)return;if("selfClose"!=e){var f=b.line,g=b.ch,h=k(b);if(!h)return;if(h[1])d.push(h[2]);else{for(var i=d.length-1;i>=0;--i)if(d[i]==h[2]){d.length=i;break}if(0>i&&(!c||c==h[2]))return{tag:h[2],from:a(b.line,b.ch),to:a(f,g)}}}else k(b)}}var a=CodeMirror.Pos,c="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",d=c+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",e=new RegExp("<(/?)(["+c+"]["+d+"]*)","g");CodeMirror.registerHelper("fold","xml",function(b,c){for(var d=new f(b,c.line,0);;){var g,e=l(d);if(!e||d.line!=c.line||!(g=j(d)))return;if(!e[1]&&"selfClose"!=g){var c=a(d.line,d.ch),h=n(d,e[2]);return h&&{from:c,to:h.from}}}}),CodeMirror.tagRangeFinder=CodeMirror.fold.xml,CodeMirror.findMatchingTag=function(c,d,e){var g=new f(c,d.line,d.ch,e);if(-1!=g.text.indexOf(">")||-1!=g.text.indexOf("<")){var h=j(g),i=h&&a(g.line,g.ch),l=h&&k(g);if(h&&"selfClose"!=h&&l&&!(b(g,d)>0)){var m={from:a(g.line,g.ch),to:i,tag:l[2]};return l[1]?{open:o(g,l[2]),close:m,at:"close"}:(g=new f(c,i.line,i.ch,e),{open:m,close:n(g,l[2]),at:"open"})}}},CodeMirror.findEnclosingTag=function(a,b,c){for(var d=new f(a,b.line,b.ch,c);;){var e=o(d);if(!e)break;var g=new f(a,b.line,b.ch,c),h=n(g,e.tag); +if(h)return{open:e,close:h}}}}(); \ No newline at end of file diff --git a/CodeMirror-3.14/lib/codemirror.css b/CodeMirror-3.15/lib/codemirror.css similarity index 96% rename from CodeMirror-3.14/lib/codemirror.css rename to CodeMirror-3.15/lib/codemirror.css index 52881f7..584eecb 100644 --- a/CodeMirror-3.14/lib/codemirror.css +++ b/CodeMirror-3.15/lib/codemirror.css @@ -192,6 +192,16 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} white-space: pre-wrap; word-break: normal; } +.CodeMirror-code pre { + border-right: 30px solid transparent; + width: -webkit-fit-content; + width: -moz-fit-content; + width: fit-content; +} +.CodeMirror-wrap .CodeMirror-code pre { + border-right: none; + width: auto; +} .CodeMirror-linebackground { position: absolute; left: 0; right: 0; top: 0; bottom: 0; diff --git a/CodeMirror-3.15/theme/3024-day.css b/CodeMirror-3.15/theme/3024-day.css new file mode 100644 index 0000000..e931a49 --- /dev/null +++ b/CodeMirror-3.15/theme/3024-day.css @@ -0,0 +1,33 @@ +/* + + Name: 3024 day + Author: Jan T. Sott (http://github.com/idleberg) + + CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) + Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) + +*/ + +.cm-s-3024-day.CodeMirror {background: #f7f7f7; color: #3a3432;} +.cm-s-3024-day div.CodeMirror-selected {background: #d6d5d4 !important;} +.cm-s-3024-day .CodeMirror-gutters {background: #f7f7f7; border-right: 0px;} +.cm-s-3024-day .CodeMirror-linenumber {color: #807d7c;} +.cm-s-3024-day .CodeMirror-cursor {border-left: 1px solid #5c5855 !important;} + +.cm-s-3024-day span.cm-comment {color: #cdab53;} +.cm-s-3024-day span.cm-atom {color: #a16a94;} +.cm-s-3024-day span.cm-number {color: #a16a94;} + +.cm-s-3024-day span.cm-property, .cm-s-3024-day span.cm-attribute {color: #01a252;} +.cm-s-3024-day span.cm-keyword {color: #db2d20;} +.cm-s-3024-day span.cm-string {color: #fded02;} + +.cm-s-3024-day span.cm-variable {color: #01a252;} +.cm-s-3024-day span.cm-variable-2 {color: #01a0e4;} +.cm-s-3024-day span.cm-def {color: #e8bbd0;} +.cm-s-3024-day span.cm-error {background: #db2d20; color: #5c5855;} +.cm-s-3024-day span.cm-bracket {color: #3a3432;} +.cm-s-3024-day span.cm-tag {color: #db2d20;} +.cm-s-3024-day span.cm-link {color: #a16a94;} + +.cm-s-3024-day .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} diff --git a/CodeMirror-3.15/theme/3024-night.css b/CodeMirror-3.15/theme/3024-night.css new file mode 100644 index 0000000..87c7f8a --- /dev/null +++ b/CodeMirror-3.15/theme/3024-night.css @@ -0,0 +1,33 @@ +/* + + Name: 3024 night + Author: Jan T. Sott (http://github.com/idleberg) + + CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) + Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) + +*/ + +.cm-s-3024-night.CodeMirror {background: #090300; color: #d6d5d4;} +.cm-s-3024-night div.CodeMirror-selected {background: #3a3432 !important;} +.cm-s-3024-night .CodeMirror-gutters {background: #090300; border-right: 0px;} +.cm-s-3024-night .CodeMirror-linenumber {color: #5c5855;} +.cm-s-3024-night .CodeMirror-cursor {border-left: 1px solid #807d7c !important;} + +.cm-s-3024-night span.cm-comment {color: #cdab53;} +.cm-s-3024-night span.cm-atom {color: #a16a94;} +.cm-s-3024-night span.cm-number {color: #a16a94;} + +.cm-s-3024-night span.cm-property, .cm-s-3024-night span.cm-attribute {color: #01a252;} +.cm-s-3024-night span.cm-keyword {color: #db2d20;} +.cm-s-3024-night span.cm-string {color: #fded02;} + +.cm-s-3024-night span.cm-variable {color: #01a252;} +.cm-s-3024-night span.cm-variable-2 {color: #01a0e4;} +.cm-s-3024-night span.cm-def {color: #e8bbd0;} +.cm-s-3024-night span.cm-error {background: #db2d20; color: #807d7c;} +.cm-s-3024-night span.cm-bracket {color: #d6d5d4;} +.cm-s-3024-night span.cm-tag {color: #db2d20;} +.cm-s-3024-night span.cm-link {color: #a16a94;} + +.cm-s-3024-night .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} diff --git a/CodeMirror-3.14/theme/ambiance.css b/CodeMirror-3.15/theme/ambiance.css similarity index 100% rename from CodeMirror-3.14/theme/ambiance.css rename to CodeMirror-3.15/theme/ambiance.css diff --git a/CodeMirror-3.14/theme/base16-dark.css b/CodeMirror-3.15/theme/base16-dark.css similarity index 97% rename from CodeMirror-3.14/theme/base16-dark.css rename to CodeMirror-3.15/theme/base16-dark.css index a715927..7a818b7 100644 --- a/CodeMirror-3.14/theme/base16-dark.css +++ b/CodeMirror-3.15/theme/base16-dark.css @@ -30,4 +30,4 @@ .cm-s-base16-dark span.cm-tag {color: #ac4142;} .cm-s-base16-dark span.cm-link {color: #aa759f;} -.cm-s-base16-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} \ No newline at end of file +.cm-s-base16-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} diff --git a/CodeMirror-3.15/theme/base16-light.css b/CodeMirror-3.15/theme/base16-light.css new file mode 100644 index 0000000..a3b2d4d --- /dev/null +++ b/CodeMirror-3.15/theme/base16-light.css @@ -0,0 +1,33 @@ +/* + + Name: Base16 Default Light + Author: Chris Kempson (http://chriskempson.com) + + CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools) + Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) + +*/ + +.cm-s-base16-light.CodeMirror {background: #f5f5f5; color: #202020;} +.cm-s-base16-light div.CodeMirror-selected {background: #e0e0e0 !important;} +.cm-s-base16-light .CodeMirror-gutters {background: #f5f5f5; border-right: 0px;} +.cm-s-base16-light .CodeMirror-linenumber {color: #b0b0b0;} +.cm-s-base16-light .CodeMirror-cursor {border-left: 1px solid #505050 !important;} + +.cm-s-base16-light span.cm-comment {color: #8f5536;} +.cm-s-base16-light span.cm-atom {color: #aa759f;} +.cm-s-base16-light span.cm-number {color: #aa759f;} + +.cm-s-base16-light span.cm-property, .cm-s-base16-light span.cm-attribute {color: #90a959;} +.cm-s-base16-light span.cm-keyword {color: #ac4142;} +.cm-s-base16-light span.cm-string {color: #f4bf75;} + +.cm-s-base16-light span.cm-variable {color: #90a959;} +.cm-s-base16-light span.cm-variable-2 {color: #6a9fb5;} +.cm-s-base16-light span.cm-def {color: #d28445;} +.cm-s-base16-light span.cm-error {background: #ac4142; color: #505050;} +.cm-s-base16-light span.cm-bracket {color: #202020;} +.cm-s-base16-light span.cm-tag {color: #ac4142;} +.cm-s-base16-light span.cm-link {color: #aa759f;} + +.cm-s-base16-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} diff --git a/CodeMirror-3.14/theme/blackboard.css b/CodeMirror-3.15/theme/blackboard.css similarity index 100% rename from CodeMirror-3.14/theme/blackboard.css rename to CodeMirror-3.15/theme/blackboard.css diff --git a/CodeMirror-3.14/theme/cobalt.css b/CodeMirror-3.15/theme/cobalt.css similarity index 100% rename from CodeMirror-3.14/theme/cobalt.css rename to CodeMirror-3.15/theme/cobalt.css diff --git a/CodeMirror-3.14/theme/eclipse.css b/CodeMirror-3.15/theme/eclipse.css similarity index 100% rename from CodeMirror-3.14/theme/eclipse.css rename to CodeMirror-3.15/theme/eclipse.css diff --git a/CodeMirror-3.14/theme/elegant.css b/CodeMirror-3.15/theme/elegant.css similarity index 100% rename from CodeMirror-3.14/theme/elegant.css rename to CodeMirror-3.15/theme/elegant.css diff --git a/CodeMirror-3.14/theme/erlang-dark.css b/CodeMirror-3.15/theme/erlang-dark.css similarity index 100% rename from CodeMirror-3.14/theme/erlang-dark.css rename to CodeMirror-3.15/theme/erlang-dark.css diff --git a/CodeMirror-3.14/theme/lesser-dark.css b/CodeMirror-3.15/theme/lesser-dark.css similarity index 95% rename from CodeMirror-3.14/theme/lesser-dark.css rename to CodeMirror-3.15/theme/lesser-dark.css index 67f71ad..0bd08f5 100644 --- a/CodeMirror-3.14/theme/lesser-dark.css +++ b/CodeMirror-3.15/theme/lesser-dark.css @@ -14,7 +14,7 @@ Ported to CodeMirror by Peter Kroon .cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white !important; } .cm-s-lesser-dark pre { padding: 0 8px; }/*editable code holder*/ -div.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/ +.cm-s-lesser-dark.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/ .cm-s-lesser-dark .CodeMirror-gutters { background: #262626; border-right:1px solid #aaa; } .cm-s-lesser-dark .CodeMirror-linenumber { color: #777; } diff --git a/CodeMirror-3.14/theme/midnight.css b/CodeMirror-3.15/theme/midnight.css similarity index 69% rename from CodeMirror-3.14/theme/midnight.css rename to CodeMirror-3.15/theme/midnight.css index e567625..bc2d49b 100644 --- a/CodeMirror-3.14/theme/midnight.css +++ b/CodeMirror-3.15/theme/midnight.css @@ -1,22 +1,18 @@ /* Based on the theme at http://bonsaiden.github.com/JavaScript-Garden */ -/**/ -.breakpoints {width: .8em;} -.breakpoint { color: #822; } - /**/ -span.CodeMirror-matchhighlight { background: #494949 } -.CodeMirror-focused span.CodeMirror-matchhighlight { background: #314D67; !important } +.cm-s-midnight span.CodeMirror-matchhighlight { background: #494949 } +.cm-s-midnight.CodeMirror-focused span.CodeMirror-matchhighlight { background: #314D67 !important; } /**/ -.activeline {background: #253540 !important;} +.cm-s-midnight .activeline {background: #253540 !important;} .cm-s-midnight.CodeMirror { background: #0F192A; color: #D1EDFF; } -.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;} +.cm-s-midnight.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;} .cm-s-midnight div.CodeMirror-selected {background: #314D67 !important;} .cm-s-midnight .CodeMirror-gutters {background: #0F192A; border-right: 1px solid;} @@ -29,7 +25,7 @@ span.CodeMirror-matchhighlight { background: #494949 } .cm-s-midnight span.cm-atom {color: #AE81FF;} .cm-s-midnight span.cm-number {color: #D1EDFF;} -.cm-s-midnight span.cm-property, .cm-s-tropicaleve span.cm-attribute {color: #A6E22E;} +.cm-s-midnight span.cm-property, .cm-s-midnight span.cm-attribute {color: #A6E22E;} .cm-s-midnight span.cm-keyword {color: #E83737;} .cm-s-midnight span.cm-string {color: #1DC116;} @@ -45,8 +41,3 @@ span.CodeMirror-matchhighlight { background: #494949 } text-decoration: underline; color: white !important; } - -.typ { color: #FFAA3E; } -.atn { color: #606; } -.atv { color: #080; } -.dec { color: #606; } diff --git a/CodeMirror-3.14/theme/monokai.css b/CodeMirror-3.15/theme/monokai.css similarity index 100% rename from CodeMirror-3.14/theme/monokai.css rename to CodeMirror-3.15/theme/monokai.css diff --git a/CodeMirror-3.14/theme/neat.css b/CodeMirror-3.15/theme/neat.css similarity index 100% rename from CodeMirror-3.14/theme/neat.css rename to CodeMirror-3.15/theme/neat.css diff --git a/CodeMirror-3.14/theme/night.css b/CodeMirror-3.15/theme/night.css similarity index 100% rename from CodeMirror-3.14/theme/night.css rename to CodeMirror-3.15/theme/night.css diff --git a/CodeMirror-3.14/theme/rubyblue.css b/CodeMirror-3.15/theme/rubyblue.css similarity index 100% rename from CodeMirror-3.14/theme/rubyblue.css rename to CodeMirror-3.15/theme/rubyblue.css diff --git a/CodeMirror-3.14/theme/solarized.css b/CodeMirror-3.15/theme/solarized.css similarity index 100% rename from CodeMirror-3.14/theme/solarized.css rename to CodeMirror-3.15/theme/solarized.css diff --git a/CodeMirror-3.15/theme/tomorrow-night-eighties.css b/CodeMirror-3.15/theme/tomorrow-night-eighties.css new file mode 100644 index 0000000..d682120 --- /dev/null +++ b/CodeMirror-3.15/theme/tomorrow-night-eighties.css @@ -0,0 +1,33 @@ +/* + + Name: Tomorrow Night - Eighties + Author: Chris Kempson + + CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) + Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) + +*/ + +.cm-s-tomorrow-night-eighties.CodeMirror {background: #000000; color: #CCCCCC;} +.cm-s-tomorrow-night-eighties div.CodeMirror-selected {background: #2D2D2D !important;} +.cm-s-tomorrow-night-eighties .CodeMirror-gutters {background: #000000; border-right: 0px;} +.cm-s-tomorrow-night-eighties .CodeMirror-linenumber {color: #515151;} +.cm-s-tomorrow-night-eighties .CodeMirror-cursor {border-left: 1px solid #6A6A6A !important;} + +.cm-s-tomorrow-night-eighties span.cm-comment {color: #d27b53;} +.cm-s-tomorrow-night-eighties span.cm-atom {color: #a16a94;} +.cm-s-tomorrow-night-eighties span.cm-number {color: #a16a94;} + +.cm-s-tomorrow-night-eighties span.cm-property, .cm-s-tomorrow-night-eighties span.cm-attribute {color: #99cc99;} +.cm-s-tomorrow-night-eighties span.cm-keyword {color: #f2777a;} +.cm-s-tomorrow-night-eighties span.cm-string {color: #ffcc66;} + +.cm-s-tomorrow-night-eighties span.cm-variable {color: #99cc99;} +.cm-s-tomorrow-night-eighties span.cm-variable-2 {color: #6699cc;} +.cm-s-tomorrow-night-eighties span.cm-def {color: #f99157;} +.cm-s-tomorrow-night-eighties span.cm-error {background: #f2777a; color: #6A6A6A;} +.cm-s-tomorrow-night-eighties span.cm-bracket {color: #CCCCCC;} +.cm-s-tomorrow-night-eighties span.cm-tag {color: #f2777a;} +.cm-s-tomorrow-night-eighties span.cm-link {color: #a16a94;} + +.cm-s-tomorrow-night-eighties .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} diff --git a/CodeMirror-3.14/theme/twilight.css b/CodeMirror-3.15/theme/twilight.css similarity index 100% rename from CodeMirror-3.14/theme/twilight.css rename to CodeMirror-3.15/theme/twilight.css diff --git a/CodeMirror-3.14/theme/vibrant-ink.css b/CodeMirror-3.15/theme/vibrant-ink.css similarity index 88% rename from CodeMirror-3.14/theme/vibrant-ink.css rename to CodeMirror-3.15/theme/vibrant-ink.css index 22024a4..4445be2 100644 --- a/CodeMirror-3.14/theme/vibrant-ink.css +++ b/CodeMirror-3.15/theme/vibrant-ink.css @@ -11,8 +11,8 @@ .cm-s-vibrant-ink .cm-atom { color: #FC0; } .cm-s-vibrant-ink .cm-number { color: #FFEE98; } .cm-s-vibrant-ink .cm-def { color: #8DA6CE; } -.cm-s-vibrant-ink span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #FFC66D } -.cm-s-vibrant-ink span.cm-variable-3, .cm-s-cobalt span.cm-def { color: #FFC66D } +.cm-s-vibrant-ink span.cm-variable-2, .cm-s-vibrant span.cm-tag { color: #FFC66D } +.cm-s-vibrant-ink span.cm-variable-3, .cm-s-vibrant span.cm-def { color: #FFC66D } .cm-s-vibrant-ink .cm-operator { color: #888; } .cm-s-vibrant-ink .cm-comment { color: gray; font-weight: bold; } .cm-s-vibrant-ink .cm-string { color: #A5C25C } diff --git a/CodeMirror-3.14/theme/xq-dark.css b/CodeMirror-3.15/theme/xq-dark.css similarity index 100% rename from CodeMirror-3.14/theme/xq-dark.css rename to CodeMirror-3.15/theme/xq-dark.css diff --git a/CodeMirror-3.14/theme/xq-light.css b/CodeMirror-3.15/theme/xq-light.css similarity index 100% rename from CodeMirror-3.14/theme/xq-light.css rename to CodeMirror-3.15/theme/xq-light.css diff --git a/lib/config___settings.php b/lib/config___settings.php index 356de2a..952ff0c 100644 --- a/lib/config___settings.php +++ b/lib/config___settings.php @@ -2,7 +2,7 @@ // ICEcoder system settings $ICEcoderSettings = array( "versionNo" => "3.0", - "codeMirrorDir" => "CodeMirror-3.14", + "codeMirrorDir" => "CodeMirror-3.15", "docRoot" => $_SERVER['DOCUMENT_ROOT'], "demoMode" => false, "devMode" => false,