/* CodeMirror - Minified & Bundled
   Generated with http://codemirror.net/doc/compress.html
   Version: 5.34.0

   CodeMirror Library:
   - codemirror.js
   Modes:
   - css.js
   - htmlembedded.js
   - htmlmixed.js
   - javascript.js
   - xml.js
   - php.js
   - clike.js
   - sql.js
   Add-ons:
   - dialog.js
   - search.js
   - searchcursor.js
   - searchcursor.js
   - autorefresh.js
 */

(function(q,I){"object"===typeof exports&&"undefined"!==typeof module?module.exports=I():"function"===typeof define&&define.amd?define(I):q.CodeMirror=I()})(this,function(){function q(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}function I(a){for(var b=a.childNodes.length;0<b;--b)a.removeChild(a.firstChild);return a}function C(a,b){return I(a).appendChild(b)}function t(a,b,c,d){a=document.createElement(a);c&&(a.className=c);d&&(a.style.cssText=d);if("string"==typeof b)a.appendChild(document.createTextNode(b));
else if(b)for(c=0;c<b.length;++c)a.appendChild(b[c]);return a}function w(a,b,c,d){a=t(a,b,c,d);a.setAttribute("role","presentation");return a}function v(a,b){3==b.nodeType&&(b=b.parentNode);if(a.contains)return a.contains(b);do if(11==b.nodeType&&(b=b.host),b==a)return!0;while(b=b.parentNode)}function D(){try{var a=document.activeElement}catch(b){a=document.body||null}for(;a&&a.shadowRoot&&a.shadowRoot.activeElement;)a=a.shadowRoot.activeElement;return a}function J(a,b){var c=a.className;q(b).test(c)||
(a.className+=(c?" ":"")+b)}function P(a,b){for(var c=a.split(" "),d=0;d<c.length;d++)c[d]&&!q(c[d]).test(b)&&(b+=" "+c[d]);return b}function W(a){var b=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,b)}}function y(a,b,c){b||(b={});for(var d in a)!a.hasOwnProperty(d)||!1===c&&b.hasOwnProperty(d)||(b[d]=a[d]);return b}function k(a,b,c,d,e){null==b&&(b=a.search(/[^\s\u00a0]/),-1==b&&(b=a.length));d=d||0;for(e=e||0;;){var h=a.indexOf("\t",d);if(0>h||h>=b)return e+(b-d);
e+=h-d;e+=c-e%c;d=h+1}}function H(a,b){for(var c=0;c<a.length;++c)if(a[c]==b)return c;return-1}function U(a,b,c){for(var d=0,e=0;;){var h=a.indexOf("\t",d);-1==h&&(h=a.length);var l=h-d;if(h==a.length||e+l>=b)return d+Math.min(l,b-e);e+=h-d;e+=c-e%c;d=h+1;if(e>=b)return d}}function F(a){for(;Yc.length<=a;)Yc.push(g(Yc)+" ");return Yc[a]}function g(a){return a[a.length-1]}function x(a,b){for(var c=[],d=0;d<a.length;d++)c[d]=b(a[d],d);return c}function f(a,b,c){for(var d=0,e=c(b);d<a.length&&c(a[d])<=
e;)d++;a.splice(d,0,b)}function p(){}function aa(a,b){if(Object.create)var c=Object.create(a);else p.prototype=a,c=new p;b&&y(b,c);return c}function O(a){return/\w/.test(a)||"\u0080"<a&&(a.toUpperCase()!=a.toLowerCase()||mg.test(a))}function Q(a,b){return b?-1<b.source.indexOf("\\w")&&O(a)?!0:b.test(a):O(a)}function Ma(a){for(var b in a)if(a.hasOwnProperty(b)&&a[b])return!1;return!0}function ea(a){return 768<=a.charCodeAt(0)&&ng.test(a)}function ab(a,b,c){for(;(0>c?0<b:b<a.length)&&ea(a.charAt(b));)b+=
c;return b}function ma(a,b,c){for(var d=b>c?-1:1;;){if(b==c)return b;var e=(b+c)/2;e=0>d?Math.ceil(e):Math.floor(e);if(e==b)return a(e)?b:c;a(e)?c=e:b=e+d}}function za(a,b,c){this.input=c;this.scrollbarFiller=t("div",null,"CodeMirror-scrollbar-filler");this.scrollbarFiller.setAttribute("cm-not-content","true");this.gutterFiller=t("div",null,"CodeMirror-gutter-filler");this.gutterFiller.setAttribute("cm-not-content","true");this.lineDiv=w("div",null,"CodeMirror-code");this.selectionDiv=t("div",null,
null,"position: relative; z-index: 1");this.cursorDiv=t("div",null,"CodeMirror-cursors");this.measure=t("div",null,"CodeMirror-measure");this.lineMeasure=t("div",null,"CodeMirror-measure");this.lineSpace=w("div",[this.measure,this.lineMeasure,this.selectionDiv,this.cursorDiv,this.lineDiv],null,"position: relative; outline: none");var d=w("div",[this.lineSpace],"CodeMirror-lines");this.mover=t("div",[d],null,"position: relative");this.sizer=t("div",[this.mover],"CodeMirror-sizer");this.sizerWidth=
null;this.heightForcer=t("div",null,null,"position: absolute; height: 30px; width: 1px;");this.gutters=t("div",null,"CodeMirror-gutters");this.lineGutter=null;this.scroller=t("div",[this.sizer,this.heightForcer,this.gutters],"CodeMirror-scroll");this.scroller.setAttribute("tabIndex","-1");this.wrapper=t("div",[this.scrollbarFiller,this.gutterFiller,this.scroller],"CodeMirror");R&&8>fa&&(this.gutters.style.zIndex=-1,this.scroller.style.paddingRight=0);va||hb&&gc||(this.scroller.draggable=!0);a&&(a.appendChild?
a.appendChild(this.wrapper):a(this.wrapper));this.reportedViewFrom=this.reportedViewTo=this.viewFrom=this.viewTo=b.first;this.view=[];this.externalMeasured=this.renderedView=null;this.lastWrapHeight=this.lastWrapWidth=this.viewOffset=0;this.updateLineNumbers=null;this.nativeBarWidth=this.barHeight=this.barWidth=0;this.scrollbarsClipped=!1;this.lineNumWidth=this.lineNumInnerWidth=this.lineNumChars=null;this.alignWidgets=!1;this.maxLine=this.cachedCharWidth=this.cachedTextHeight=this.cachedPaddingH=
null;this.maxLineLength=0;this.maxLineChanged=!1;this.wheelDX=this.wheelDY=this.wheelStartX=this.wheelStartY=null;this.shift=!1;this.activeTouch=this.selForContextMenu=null;c.init(this)}function A(a,b){b-=a.first;if(0>b||b>=a.size)throw Error("There is no line "+(b+a.first)+" in the document.");for(var c=a;!c.lines;)for(var d=0;;++d){var e=c.children[d],h=e.chunkSize();if(b<h){c=e;break}b-=h}return c.lines[b]}function S(a,b,c){var d=[],e=b.line;a.iter(b.line,c.line+1,function(a){a=a.text;e==c.line&&
(a=a.slice(0,c.ch));e==b.line&&(a=a.slice(b.ch));d.push(a);++e});return d}function Jb(a,b,c){var d=[];a.iter(b,c,function(a){d.push(a.text)});return d}function Y(a,b){var c=b-a.height;if(c)for(var d=a;d;d=d.parent)d.height+=c}function T(a){if(null==a.parent)return null;var b=a.parent;a=H(b.lines,a);for(var c=b.parent;c;b=c,c=c.parent)for(var d=0;c.children[d]!=b;++d)a+=c.children[d].chunkSize();return a+b.first}function bb(a,b){var c=a.first;a:do{for(var d=0;d<a.children.length;++d){var e=a.children[d],
h=e.height;if(b<h){a=e;continue a}b-=h;c+=e.chunkSize()}return c}while(!a.lines);for(d=0;d<a.lines.length;++d){e=a.lines[d].height;if(b<e)break;b-=e}return c+d}function qb(a,b){return b>=a.first&&b<a.first+a.size}function hc(a,b){return String(a.lineNumberFormatter(b+a.firstLineNumber))}function z(a,b,c){void 0===c&&(c=null);if(!(this instanceof z))return new z(a,b,c);this.line=a;this.ch=b;this.sticky=c}function K(a,b){return a.line-b.line||a.ch-b.ch}function ic(a,b){return a.sticky==b.sticky&&0==
K(a,b)}function Oa(a){return z(a.line,a.ch)}function pa(a,b){return 0>K(a,b)?b:a}function Va(a,b){return 0>K(a,b)?a:b}function M(a,b){if(b.line<a.first)return z(a.first,0);var c=a.first+a.size-1;if(b.line>c)return z(c,A(a,c).text.length);c=A(a,b.line).text.length;var d=b.ch;c=null==d||d>c?z(b.line,c):0>d?z(b.line,0):b;return c}function cb(a,b){for(var c=[],d=0;d<b.length;d++)c[d]=M(a,b[d]);return c}function Kb(a,b,c){this.marker=a;this.from=b;this.to=c}function rb(a,b){if(a)for(var c=0;c<a.length;++c){var d=
a[c];if(d.marker==b)return d}}function X(a,b){if(b.full)return null;var c=qb(a,b.from.line)&&A(a,b.from.line).markedSpans,d=qb(a,b.to.line)&&A(a,b.to.line).markedSpans;if(!c&&!d)return null;var e=b.from.ch,h=b.to.ch,l=0==K(b.from,b.to),n;if(c)for(var r=0;r<c.length;++r){var G=c[r],m=G.marker;if(null==G.from||(m.inclusiveLeft?G.from<=e:G.from<e)||!(G.from!=e||"bookmark"!=m.type||l&&G.marker.insertLeft)){var f=null==G.to||(m.inclusiveRight?G.to>=e:G.to>e);(n||(n=[])).push(new Kb(m,G.from,f?null:G.to))}}c=
n;var ba;if(d)for(n=0;n<d.length;++n)if(r=d[n],G=r.marker,null==r.to||(G.inclusiveRight?r.to>=h:r.to>h)||r.from==h&&"bookmark"==G.type&&(!l||r.marker.insertLeft))m=null==r.from||(G.inclusiveLeft?r.from<=h:r.from<h),(ba||(ba=[])).push(new Kb(G,m?null:r.from-h,null==r.to?null:r.to-h));d=ba;h=1==b.text.length;l=g(b.text).length+(h?e:0);if(c)for(ba=0;ba<c.length;++ba)if(n=c[ba],null==n.to)(r=rb(d,n.marker),r)?h&&(n.to=null==r.to?null:r.to+l):n.to=e;if(d)for(e=0;e<d.length;++e)ba=d[e],null!=ba.to&&(ba.to+=
l),null==ba.from?rb(c,ba.marker)||(ba.from=l,h&&(c||(c=[])).push(ba)):(ba.from+=l,h&&(c||(c=[])).push(ba));c&&(c=Lb(c));d&&d!=c&&(d=Lb(d));e=[c];if(!h){h=b.text.length-2;var k;if(0<h&&c)for(l=0;l<c.length;++l)null==c[l].to&&(k||(k=[])).push(new Kb(c[l].marker,null,null));for(c=0;c<h;++c)e.push(k);e.push(d)}return e}function Lb(a){for(var b=0;b<a.length;++b){var c=a[b];null!=c.from&&c.from==c.to&&!1!==c.marker.clearWhenEmpty&&a.splice(b--,1)}return a.length?a:null}function Pa(a,b,c){var d=null;a.iter(b.line,
c.line+1,function(a){if(a.markedSpans)for(var b=0;b<a.markedSpans.length;++b){var c=a.markedSpans[b].marker;!c.readOnly||d&&-1!=H(d,c)||(d||(d=[])).push(c)}});if(!d)return null;a=[{from:b,to:c}];for(b=0;b<d.length;++b){c=d[b];for(var e=c.find(0),h=0;h<a.length;++h){var l=a[h];if(!(0>K(l.to,e.from)||0<K(l.from,e.to))){var n=[h,1],r=K(l.from,e.from),G=K(l.to,e.to);(0>r||!c.inclusiveLeft&&!r)&&n.push({from:l.from,to:e.from});(0<G||!c.inclusiveRight&&!G)&&n.push({from:e.to,to:l.to});a.splice.apply(a,
n);h+=n.length-3}}}return a}function Z(a){var b=a.markedSpans;if(b){for(var c=0;c<b.length;++c)b[c].marker.detachLine(a);a.markedSpans=null}}function na(a,b){if(b){for(var c=0;c<b.length;++c)b[c].marker.attachLine(a);a.markedSpans=b}}function E(a,b){var c=a.lines.length-b.lines.length;if(0!=c)return c;c=a.find();var d=b.find(),e=K(c.from,d.from)||(a.inclusiveLeft?-1:0)-(b.inclusiveLeft?-1:0);return e?-e:(c=K(c.to,d.to)||(a.inclusiveRight?1:0)-(b.inclusiveRight?1:0))?c:b.id-a.id}function Wa(a,b){var c=
ib&&a.markedSpans;if(c)for(var d,e=0;e<c.length;++e)if(d=c[e],d.marker.collapsed&&null==(b?d.from:d.to)&&(!h||0>E(h,d.marker)))var h=d.marker;return h}function N(a,b,c,d,e){a=A(a,b);if(a=ib&&a.markedSpans)for(b=0;b<a.length;++b){var h=a[b];if(h.marker.collapsed){var l=h.marker.find(0),n=K(l.from,c)||(h.marker.inclusiveLeft?-1:0)-(e.inclusiveLeft?-1:0),r=K(l.to,d)||(h.marker.inclusiveRight?1:0)-(e.inclusiveRight?1:0);if(!(0<=n&&0>=r||0>=n&&0<=r)&&(0>=n&&(h.marker.inclusiveRight&&e.inclusiveLeft?0<=
K(l.to,c):0<K(l.to,c))||0<=n&&(h.marker.inclusiveRight&&e.inclusiveLeft?0>=K(l.from,d):0>K(l.from,d))))return!0}}}function Da(a){for(var b;b=Wa(a,!0);)a=b.find(-1,!0).line;return a}function Aa(a,b){var c=A(a,b),d=Da(c);return c==d?b:T(d)}function Zc(a,b){if(b>a.lastLine())return b;var c=A(a,b),d;if(!Ea(a,c))return b;for(;d=Wa(c,!1);)c=d.find(1,!0).line;return T(c)+1}function Ea(a,b){var c=ib&&b.markedSpans;if(c)for(var d,e=0;e<c.length;++e)if(d=c[e],d.marker.collapsed&&(null==d.from||!d.marker.widgetNode&&
0==d.from&&d.marker.inclusiveLeft&&jc(a,b,d)))return!0}function jc(a,b,c){if(null==c.to)return b=c.marker.find(1,!0),jc(a,b.line,rb(b.line.markedSpans,c.marker));if(c.marker.inclusiveRight&&c.to==b.text.length)return!0;for(var d,e=0;e<b.markedSpans.length;++e)if(d=b.markedSpans[e],d.marker.collapsed&&!d.marker.widgetNode&&d.from==c.to&&(null==d.to||d.to!=c.from)&&(d.marker.inclusiveLeft||c.marker.inclusiveRight)&&jc(a,b,d))return!0}function Ia(a){a=Da(a);for(var b=0,c=a.parent,d=0;d<c.lines.length;++d){var e=
c.lines[d];if(e==a)break;else b+=e.height}for(a=c.parent;a;c=a,a=c.parent)for(d=0;d<a.children.length&&(e=a.children[d],e!=c);++d)b+=e.height;return b}function Mb(a){if(0==a.height)return 0;for(var b=a.text.length,c,d=a;c=Wa(d,!0);)c=c.find(0,!0),d=c.from.line,b+=c.from.ch-c.to.ch;for(d=a;c=Wa(d,!1);)a=c.find(0,!0),b-=d.text.length-a.from.ch,d=a.to.line,b+=d.text.length-a.to.ch;return b}function kc(a){var b=a.display;a=a.doc;b.maxLine=A(a,a.first);b.maxLineLength=Mb(b.maxLine);b.maxLineChanged=!0;
a.iter(function(a){var d=Mb(a);d>b.maxLineLength&&(b.maxLineLength=d,b.maxLine=a)})}function Ed(a,b,c,d){if(!a)return d(b,c,"ltr",0);for(var e=!1,h=0;h<a.length;++h){var l=a[h];if(l.from<c&&l.to>b||b==c&&l.to==b)d(Math.max(l.from,b),Math.min(l.to,c),1==l.level?"rtl":"ltr",h),e=!0}e||d(b,c,"ltr")}function Xa(a,b,c){var d;lc=null;for(var e=0;e<a.length;++e){var h=a[e];if(h.from<b&&h.to>b)return e;h.to==b&&(h.from!=h.to&&"before"==c?d=e:lc=e);h.from==b&&(h.from!=h.to&&"before"!=c?d=e:lc=e)}return null!=
d?d:lc}function Na(a,b){var c=a.order;null==c&&(c=a.order=og(a.text,b));return c}function ja(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,!1);else if(a.detachEvent)a.detachEvent("on"+b,c);else{var d=(a=a._handlers)&&a[b];d&&(c=H(d,c),-1<c&&(a[b]=d.slice(0,c).concat(d.slice(c+1))))}}function ca(a,b){var c=a._handlers&&a._handlers[b]||$c;if(c.length)for(var d=Array.prototype.slice.call(arguments,2),e=0;e<c.length;++e)c[e].apply(null,d)}function ka(a,b,c){"string"==typeof b&&(b={type:b,
preventDefault:function(){this.defaultPrevented=!0}});ca(a,c||b.type,a,b);return Nb(b)||b.codemirrorIgnore}function mc(a){var b=a._handlers&&a._handlers.cursorActivity;if(b){a=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]);for(var c=0;c<b.length;++c)-1==H(a,b[c])&&a.push(b[c])}}function wa(a,b){return 0<(a._handlers&&a._handlers[b]||$c).length}function Fa(a){a.prototype.on=function(a,c){L(this,a,c)};a.prototype.off=function(a,c){ja(this,a,c)}}function qa(a){a.preventDefault?a.preventDefault():
a.returnValue=!1}function ad(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function Nb(a){return null!=a.defaultPrevented?a.defaultPrevented:0==a.returnValue}function sb(a){qa(a);ad(a)}function tb(a){var b=a.which;null==b&&(a.button&1?b=1:a.button&2?b=3:a.button&4&&(b=2));Qa&&a.ctrlKey&&1==b&&(b=3);return b}function bd(a){if(null==Fd){var b=t("span","\u200b");C(a,t("span",[b,document.createTextNode("x")]));0!=a.firstChild.offsetHeight&&(Fd=1>=b.offsetWidth&&2<b.offsetHeight&&!(R&&8>fa))}a=
Fd?t("span","\u200b"):t("span","\u00a0",null,"display: inline-block; width: 1px; margin-right: -1px");a.setAttribute("cm-text","");return a}function Gd(a,b){2<arguments.length&&(b.dependencies=Array.prototype.slice.call(arguments,2));Hd[a]=b}function jb(a){if("string"==typeof a&&Ob.hasOwnProperty(a))a=Ob[a];else if(a&&"string"==typeof a.name&&Ob.hasOwnProperty(a.name)){var b=Ob[a.name];"string"==typeof b&&(b={name:b});a=aa(b,a);a.name=b.name}else{if("string"==typeof a&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return jb("application/xml");
if("string"==typeof a&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return jb("application/json")}return"string"==typeof a?{name:a}:a||{name:"null"}}function nc(a,b){b=jb(b);var c=Hd[b.name];if(!c)return nc(a,"text/plain");c=c(a,b);if(Pb.hasOwnProperty(b.name)){var d=Pb[b.name],e;for(e in d)d.hasOwnProperty(e)&&(c.hasOwnProperty(e)&&(c["_"+e]=c[e]),c[e]=d[e])}c.name=b.name;b.helperType&&(c.helperType=b.helperType);if(b.modeProps)for(var h in b.modeProps)c[h]=b.modeProps[h];return c}function cd(a,b){var c=Pb.hasOwnProperty(a)?
Pb[a]:Pb[a]={};y(b,c)}function db(a,b){if(!0===b)return b;if(a.copyState)return a.copyState(b);var c={},d;for(d in b){var e=b[d];e instanceof Array&&(e=e.concat([]));c[d]=e}return c}function Qb(a,b){for(var c;a.innerMode;){c=a.innerMode(b);if(!c||c.mode==a)break;b=c.state;a=c.mode}return c||{mode:a,state:b}}function eb(a,b,c){return a.startState?a.startState(b,c):!0}function oc(a,b,c,d){var e=[a.state.modeGen],h={};kb(a,b.text,a.doc.mode,c,function(a,b){return e.push(a,b)},h,d);var l=c.state;d=function(d){c.baseTokens=
e;var n=a.state.overlays[d],r=1,m=0;c.state=!0;kb(a,b.text,n.mode,c,function(a,b){for(var d=r;m<a;){var c=e[r];c>a&&e.splice(r,1,a,e[r+1],c);r+=2;m=Math.min(a,c)}if(b)if(n.opaque)e.splice(d,r-d,a,"overlay "+b),r=d+2;else for(;d<r;d+=2)c=e[d+1],e[d+1]=(c?c+" ":"")+"overlay "+b},h);c.state=l;c.baseTokens=null;c.baseTokenPos=1};for(var n=0;n<a.state.overlays.length;++n)d(n);return{styles:e,classes:h.bgClass||h.textClass?h:null}}function ub(a,b,c){if(!b.styles||b.styles[0]!=a.state.modeGen){var d=Ja(a,
T(b)),e=b.text.length>a.options.maxHighlightLength&&db(a.doc.mode,d.state),h=oc(a,b,d);e&&(d.state=e);b.stateAfter=d.save(!e);b.styles=h.styles;h.classes?b.styleClasses=h.classes:b.styleClasses&&(b.styleClasses=null);c===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return b.styles}function Ja(a,b,c){var d=a.doc,e=a.display;if(!d.mode.startState)return new Ya(d,!0,b);var h=Rb(a,b,c),l=h>d.first&&A(d,h-1).stateAfter,n=l?Ya.fromSaved(d,l,h):new Ya(d,
eb(d.mode),h);d.iter(h,b,function(d){ha(a,d.text,n);var c=n.line;d.stateAfter=c==b-1||0==c%5||c>=e.viewFrom&&c<e.viewTo?n.save():null;n.nextLine()});c&&(d.modeFrontier=n.line);return n}function ha(a,b,c,d){var e=a.doc.mode;a=new la(b,a.options.tabSize,c);a.start=a.pos=d||0;for(""==b&&Sb(e,c.state);!a.eol();)Tb(e,a,c.state),a.start=a.pos}function Sb(a,b){if(a.blankLine)return a.blankLine(b);if(a.innerMode){var c=Qb(a,b);if(c.mode.blankLine)return c.mode.blankLine(c.state)}}function Tb(a,b,c,d){for(var e=
0;10>e;e++){d&&(d[0]=Qb(a,c).mode);var h=a.token(b,c);if(b.pos>b.start)return h}throw Error("Mode "+a.name+" failed to advance stream.");}function pc(a,b,c,d){var e=a.doc,h=e.mode;b=M(e,b);var l=A(e,b.line);c=Ja(a,b.line,c);a=new la(l.text,a.options.tabSize,c);var n;for(d&&(n=[]);(d||a.pos<b.ch)&&!a.eol();){a.start=a.pos;var r=Tb(h,a,c.state);d&&n.push(new xe(a,r,db(e.mode,c.state)))}return d?n:new xe(a,r,c.state)}function dd(a,b){if(a)for(;;){var c=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!c)break;
a=a.slice(0,c.index)+a.slice(c.index+c[0].length);var d=c[1]?"bgClass":"textClass";null==b[d]?b[d]=c[2]:(new RegExp("(?:^|s)"+c[2]+"(?:$|s)")).test(b[d])||(b[d]+=" "+c[2])}return a}function kb(a,b,c,d,e,h,l){var n=c.flattenSpans;null==n&&(n=a.options.flattenSpans);var r=0,G=null,m=new la(b,a.options.tabSize,d),f=a.options.addModeClass&&[null];for(""==b&&dd(Sb(c,d.state),h);!m.eol();){if(m.pos>a.options.maxHighlightLength){n=!1;l&&ha(a,b,d,m.pos);m.pos=b.length;var k=null}else k=dd(Tb(c,m,d.state,
f),h);if(f){var g=f[0].name;g&&(k="m-"+(k?g+" "+k:g))}if(!n||G!=k){for(;r<m.start;)r=Math.min(m.start,r+5E3),e(r,G);G=k}m.start=m.pos}for(;r<m.pos;)a=Math.min(m.pos,r+5E3),e(a,G),r=a}function Rb(a,b,c){for(var d,e,h=a.doc,l=c?-1:b-(a.doc.mode.innerMode?1E3:100);b>l;--b){if(b<=h.first)return h.first;var n=A(h,b-1),r=n.stateAfter;if(r&&(!c||b+(r instanceof ed?r.lookAhead:0)<=h.modeFrontier))return b;n=k(n.text,null,a.options.tabSize);if(null==e||d>n)e=b-1,d=n}return e}function Id(a,b){a.modeFrontier=
Math.min(a.modeFrontier,b);if(!(a.highlightFrontier<b-10)){for(var c=a.first,d=b-1;d>c;d--){var e=A(a,d).stateAfter;if(e&&(!(e instanceof ed)||d+e.lookAhead<b)){c=d+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,c)}}function B(a,b){if(!a||/^\s*$/.test(a))return null;var c=b.addModeClass?pg:qg;return c[a]||(c[a]=a.replace(/\S+/g,"cm-$&"))}function fd(a,b){var c=w("span",null,null,va?"padding-right: .1px":null);c={pre:w("pre",[c],"CodeMirror-line"),content:c,col:0,pos:0,cm:a,trailingSpace:!1,
splitSpaces:(R||va)&&a.getOption("lineWrapping")};b.measure={};for(var d=0;d<=(b.rest?b.rest.length:0);d++){var e=d?b.rest[d-1]:b.line,h=void 0;c.pos=0;c.addToken=u;var l=a.display.measure;if(null!=Jd)l=Jd;else{var n=C(l,document.createTextNode("A\u062eA")),r=qc(n,0,1).getBoundingClientRect();n=qc(n,1,2).getBoundingClientRect();I(l);l=r&&r.left!=r.right?Jd=3>n.right-r.right:!1}l&&(h=Na(e,a.doc.direction))&&(c.addToken=rg(c.addToken,h));c.map=[];var G=b!=a.display.externalMeasured&&T(e);a:{var m=n=
r=l=void 0,f=void 0,k=void 0,g=void 0;h=c;G=ub(a,e,G);var p=e.markedSpans,x=e.text,q=0;if(p)for(var S=x.length,N=0,F=1,y="",v=0;;){if(v==N){f=m=n=r=k="";l=null;v=Infinity;for(var Q=[],t=void 0,z=0;z<p.length;++z){var A=p[z],Y=A.marker;"bookmark"==Y.type&&A.from==N&&Y.widgetNode?Q.push(Y):A.from<=N&&(null==A.to||A.to>N||Y.collapsed&&A.to==N&&A.from==N)?(null!=A.to&&A.to!=N&&v>A.to&&(v=A.to,m=""),Y.className&&(f+=" "+Y.className),Y.css&&(k=(k?k+";":"")+Y.css),Y.startStyle&&A.from==N&&(n+=" "+Y.startStyle),
Y.endStyle&&A.to==v&&(t||(t=[])).push(Y.endStyle,A.to),Y.title&&!r&&(r=Y.title),Y.collapsed&&(!l||0>E(l.marker,Y))&&(l=A)):A.from>N&&v>A.from&&(v=A.from)}if(t)for(z=0;z<t.length;z+=2)t[z+1]==v&&(m+=" "+t[z]);if(!l||l.from==N)for(t=0;t<Q.length;++t)ye(h,0,Q[t]);if(l&&(l.from||0)==N){ye(h,(null==l.to?S+1:l.to)-N,l.marker,null==l.from);if(null==l.to)break a;l.to==N&&(l=!1)}}if(N>=S)break;for(Q=Math.min(S,v);;){if(y){t=N+y.length;l||(z=t>Q?y.slice(0,Q-N):y,h.addToken(h,z,g?g+f:f,n,N+z.length==v?m:"",
r,k));if(t>=Q){y=y.slice(Q-N);N=Q;break}N=t;n=""}y=x.slice(q,q=G[F++]);g=B(G[F++],h.cm.options)}}else for(l=1;l<G.length;l+=2)h.addToken(h,x.slice(q,q=G[l]),B(G[l+1],h.cm.options))}e.styleClasses&&(e.styleClasses.bgClass&&(c.bgClass=P(e.styleClasses.bgClass,c.bgClass||"")),e.styleClasses.textClass&&(c.textClass=P(e.styleClasses.textClass,c.textClass||"")));0==c.map.length&&c.map.push(0,0,c.content.appendChild(bd(a.display.measure)));0==d?(b.measure.map=c.map,b.measure.cache={}):((b.measure.maps||
(b.measure.maps=[])).push(c.map),(b.measure.caches||(b.measure.caches=[])).push({}))}va&&(d=c.content.lastChild,/\bcm-tab\b/.test(d.className)||d.querySelector&&d.querySelector(".cm-tab"))&&(c.content.className="cm-tab-wrap-hack");ca(a,"renderLine",a,b.line,c.pre);c.pre.className&&(c.textClass=P(c.pre.className,c.textClass||""));return c}function m(a){var b=t("span","\u2022","cm-invalidchar");b.title="\\u"+a.charCodeAt(0).toString(16);b.setAttribute("aria-label",b.title);return b}function u(a,b,c,
d,e,h,l){if(b){if(a.splitSpaces){var n=a.trailingSpace;if(1<b.length&&!/  /.test(b))n=b;else{for(var r="",G=0;G<b.length;G++){var m=b.charAt(G);" "!=m||!n||G!=b.length-1&&32!=b.charCodeAt(G+1)||(m="\u00a0");r+=m;n=" "==m}n=r}}else n=b;r=n;G=a.cm.state.specialChars;m=!1;if(G.test(b)){n=document.createDocumentFragment();for(var f=0;;){G.lastIndex=f;var k=G.exec(b),g=k?k.index-f:b.length-f;if(g){var u=document.createTextNode(r.slice(f,f+g));R&&9>fa?n.appendChild(t("span",[u])):n.appendChild(u);a.map.push(a.pos,
a.pos+g,u);a.col+=g;a.pos+=g}if(!k)break;f+=g+1;"\t"==k[0]?(k=a.cm.options.tabSize,k-=a.col%k,g=n.appendChild(t("span",F(k),"cm-tab")),g.setAttribute("role","presentation"),g.setAttribute("cm-text","\t"),a.col+=k):("\r"==k[0]||"\n"==k[0]?(g=n.appendChild(t("span","\r"==k[0]?"\u240d":"\u2424","cm-invalidchar")),g.setAttribute("cm-text",k[0])):(g=a.cm.options.specialCharPlaceholder(k[0]),g.setAttribute("cm-text",k[0]),R&&9>fa?n.appendChild(t("span",[g])):n.appendChild(g)),a.col+=1);a.map.push(a.pos,
a.pos+1,g);a.pos++}}else a.col+=b.length,n=document.createTextNode(r),a.map.push(a.pos,a.pos+b.length,n),R&&9>fa&&(m=!0),a.pos+=b.length;a.trailingSpace=32==r.charCodeAt(b.length-1);if(c||d||e||m||l)return b=c||"",d&&(b+=d),e&&(b+=e),d=t("span",[n],b,l),h&&(d.title=h),a.content.appendChild(d);a.content.appendChild(n)}}function rg(a,b){return function(c,d,e,h,l,n,r){e=e?e+" cm-force-border":"cm-force-border";for(var G=c.pos,m=G+d.length;;){for(var f=void 0,k=0;k<b.length&&!(f=b[k],f.to>G&&f.from<=
G);k++);if(f.to>=m)return a(c,d,e,h,l,n,r);a(c,d.slice(0,f.to-G),e,h,null,n,r);h=null;d=d.slice(f.to-G);G=f.to}}}function ye(a,b,c,d){var e=!d&&c.widgetNode;e&&a.map.push(a.pos,a.pos+b,e);!d&&a.cm.display.input.needsContentAttribute&&(e||(e=a.content.appendChild(document.createElement("span"))),e.setAttribute("cm-marker",c.id));e&&(a.cm.display.input.setUneditable(e),a.content.appendChild(e));a.pos+=b;a.trailingSpace=!1}function ze(a,b,c){for(var d=this.line=b,e;d=Wa(d,!1);)d=d.find(1,!0).line,(e||
(e=[])).push(d);this.size=(this.rest=e)?T(g(this.rest))-c+1:1;this.node=this.text=null;this.hidden=Ea(a,b)}function gd(a,b,c){var d=[],e;for(e=b;e<c;)b=new ze(a.doc,A(a.doc,e),e),e+=b.size,d.push(b);return d}function sg(a,b){var c=a.ownsGroup;if(c)try{var d=c.delayedCallbacks,e=0;do{for(;e<d.length;e++)d[e].call(null);for(var h=0;h<c.ops.length;h++){var l=c.ops[h];if(l.cursorActivityHandlers)for(;l.cursorActivityCalled<l.cursorActivityHandlers.length;)l.cursorActivityHandlers[l.cursorActivityCalled++].call(null,
l.cm)}}while(e<d.length)}finally{Ub=null,b(c)}}function ta(a,b){var c=a._handlers&&a._handlers[b]||$c;if(c.length){var d=Array.prototype.slice.call(arguments,2);if(Ub)var e=Ub.delayedCallbacks;else rc?e=rc:(e=rc=[],setTimeout(tg,0));for(var h=function(a){e.push(function(){return c[a].apply(null,d)})},l=0;l<c.length;++l)h(l)}}function tg(){var a=rc;rc=null;for(var b=0;b<a.length;++b)a[b]()}function Ae(a,b,c,d){for(var e=0;e<b.changes.length;e++){var h=b.changes[e];if("text"==h){h=a;var l=b,n=l.text.className,
r=Be(h,l);l.text==l.node&&(l.node=r.pre);l.text.parentNode.replaceChild(r.pre,l.text);l.text=r.pre;r.bgClass!=l.bgClass||r.textClass!=l.textClass?(l.bgClass=r.bgClass,l.textClass=r.textClass,Kd(h,l)):n&&(l.text.className=n)}else if("gutter"==h)Ce(a,b,c,d);else if("class"==h)Kd(a,b);else if("widget"==h){h=a;l=b;n=d;l.alignable&&(l.alignable=null);r=l.node.firstChild;for(var G;r;r=G)G=r.nextSibling,"CodeMirror-linewidget"==r.className&&l.node.removeChild(r);De(h,l,n)}}b.changes=null}function sc(a){a.node==
a.text&&(a.node=t("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),R&&8>fa&&(a.node.style.zIndex=2));return a.node}function Be(a,b){var c=a.display.externalMeasured;return c&&c.line==b.line?(a.display.externalMeasured=null,b.measure=c.measure,c.built):fd(a,b)}function Kd(a,b){var c=b.bgClass?b.bgClass+" "+(b.line.bgClass||""):b.line.bgClass;c&&(c+=" CodeMirror-linebackground");if(b.background)c?b.background.className=
c:(b.background.parentNode.removeChild(b.background),b.background=null);else if(c){var d=sc(b);b.background=d.insertBefore(t("div",null,c),d.firstChild);a.display.input.setUneditable(b.background)}b.line.wrapClass?sc(b).className=b.line.wrapClass:b.node!=b.text&&(b.node.className="");b.text.className=(b.textClass?b.textClass+" "+(b.line.textClass||""):b.line.textClass)||""}function Ce(a,b,c,d){b.gutter&&(b.node.removeChild(b.gutter),b.gutter=null);b.gutterBackground&&(b.node.removeChild(b.gutterBackground),
b.gutterBackground=null);if(b.line.gutterClass){var e=sc(b);b.gutterBackground=t("div",null,"CodeMirror-gutter-background "+b.line.gutterClass,"left: "+(a.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+"px; width: "+d.gutterTotalWidth+"px");a.display.input.setUneditable(b.gutterBackground);e.insertBefore(b.gutterBackground,b.text)}e=b.line.gutterMarkers;if(a.options.lineNumbers||e){var h=sc(b),l=b.gutter=t("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?d.fixedPos:-d.gutterTotalWidth)+
"px");a.display.input.setUneditable(l);h.insertBefore(l,b.text);b.line.gutterClass&&(l.className+=" "+b.line.gutterClass);!a.options.lineNumbers||e&&e["CodeMirror-linenumbers"]||(b.lineNumber=l.appendChild(t("div",hc(a.options,c),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+d.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px")));if(e)for(b=0;b<a.options.gutters.length;++b)c=a.options.gutters[b],(h=e.hasOwnProperty(c)&&e[c])&&l.appendChild(t("div",[h],"CodeMirror-gutter-elt",
"left: "+d.gutterLeft[c]+"px; width: "+d.gutterWidth[c]+"px"))}}function ug(a,b,c,d){var e=Be(a,b);b.text=b.node=e.pre;e.bgClass&&(b.bgClass=e.bgClass);e.textClass&&(b.textClass=e.textClass);Kd(a,b);Ce(a,b,c,d);De(a,b,d);return b.node}function De(a,b,c){Ee(a,b.line,b,c,!0);if(b.rest)for(var d=0;d<b.rest.length;d++)Ee(a,b.rest[d],b,c,!1)}function Ee(a,b,c,d,e){if(b.widgets){var h=sc(c),l=0;for(b=b.widgets;l<b.length;++l){var n=b[l],r=t("div",[n.node],"CodeMirror-linewidget");n.handleMouseEvents||r.setAttribute("cm-ignore-events",
"true");var G=n,m=r,f=d;if(G.noHScroll){(c.alignable||(c.alignable=[])).push(m);var k=f.wrapperWidth;m.style.left=f.fixedPos+"px";G.coverGutter||(k-=f.gutterTotalWidth,m.style.paddingLeft=f.gutterTotalWidth+"px");m.style.width=k+"px"}G.coverGutter&&(m.style.zIndex=5,m.style.position="relative",G.noHScroll||(m.style.marginLeft=-f.gutterTotalWidth+"px"));a.display.input.setUneditable(r);e&&n.above?h.insertBefore(r,c.gutter||c.text):h.appendChild(r);ta(n,"redraw")}}}function tc(a){if(null!=a.height)return a.height;
var b=a.doc.cm;if(!b)return 0;if(!v(document.body,a.node)){var c="position: relative;";a.coverGutter&&(c+="margin-left: -"+b.display.gutters.offsetWidth+"px;");a.noHScroll&&(c+="width: "+b.display.wrapper.clientWidth+"px;");C(b.display.measure,t("div",[a.node],null,c))}return a.height=a.node.parentNode.offsetHeight}function fb(a,b){for(var c=b.target||b.srcElement;c!=a.wrapper;c=c.parentNode)if(!c||1==c.nodeType&&"true"==c.getAttribute("cm-ignore-events")||c.parentNode==a.sizer&&c!=a.mover)return!0}
function Ld(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Fe(a){if(a.cachedPaddingH)return a.cachedPaddingH;var b=C(a.measure,t("pre","x"));b=window.getComputedStyle?window.getComputedStyle(b):b.currentStyle;b={left:parseInt(b.paddingLeft),right:parseInt(b.paddingRight)};isNaN(b.left)||isNaN(b.right)||(a.cachedPaddingH=b);return b}function Za(a){return 30-a.display.nativeBarWidth}function vb(a){return a.display.scroller.clientWidth-Za(a)-a.display.barWidth}function Md(a){return a.display.scroller.clientHeight-
Za(a)-a.display.barHeight}function Ge(a,b,c){if(a.line==b)return{map:a.measure.map,cache:a.measure.cache};for(var d=0;d<a.rest.length;d++)if(a.rest[d]==b)return{map:a.measure.maps[d],cache:a.measure.caches[d]};for(b=0;b<a.rest.length;b++)if(T(a.rest[b])>c)return{map:a.measure.maps[b],cache:a.measure.caches[b],before:!0}}function Nd(a,b){if(b>=a.display.viewFrom&&b<a.display.viewTo)return a.display.view[wb(a,b)];var c=a.display.externalMeasured;if(c&&b>=c.lineN&&b<c.lineN+c.size)return c}function xb(a,
b){var c=T(b),d=Nd(a,c);d&&!d.text?d=null:d&&d.changes&&(Ae(a,d,c,Od(a)),a.curOp.forceUpdate=!0);if(!d){var e=Da(b);d=T(e);e=a.display.externalMeasured=new ze(a.doc,e,d);e.lineN=d;d=e.built=fd(a,e);e.text=d.pre;C(a.display.lineMeasure,d.pre);d=e}c=Ge(d,b,c);return{line:b,view:d,rect:null,map:c.map,cache:c.cache,before:c.before,hasHeights:!1}}function Ra(a,b,c,d,e){b.before&&(c=-1);var h=c+(d||"");if(b.cache.hasOwnProperty(h))a=b.cache[h];else{b.rect||(b.rect=b.view.text.getBoundingClientRect());if(!b.hasHeights){var l=
b.view,n=b.rect,r=a.options.lineWrapping,m=r&&vb(a);if(!l.measure.heights||r&&l.measure.width!=m){var f=l.measure.heights=[];if(r)for(l.measure.width=m,l=l.text.firstChild.getClientRects(),r=0;r<l.length-1;r++){m=l[r];var k=l[r+1];2<Math.abs(m.bottom-k.bottom)&&f.push((m.bottom+k.top)/2-n.top)}f.push(n.bottom-n.top)}b.hasHeights=!0}f=d;l=He(b.map,c,f);d=l.node;n=l.start;r=l.end;c=l.collapse;if(3==d.nodeType){for(var g=0;4>g;g++){for(;n&&ea(b.line.text.charAt(l.coverStart+n));)--n;for(;l.coverStart+
r<l.coverEnd&&ea(b.line.text.charAt(l.coverStart+r));)++r;if(R&&9>fa&&0==n&&r==l.coverEnd-l.coverStart)var u=d.parentNode.getBoundingClientRect();else{u=qc(d,n,r).getClientRects();r=Ie;if("left"==f)for(m=0;m<u.length&&(r=u[m]).left==r.right;m++);else for(m=u.length-1;0<=m&&(r=u[m]).left==r.right;m--);u=r}if(u.left||u.right||0==n)break;r=n;--n;c="right"}R&&11>fa&&((g=!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI)||(null!=Pd?g=Pd:(f=C(a.display.measure,t("span","x")),
g=f.getBoundingClientRect(),f=qc(f,0,1).getBoundingClientRect(),g=Pd=1<Math.abs(g.left-f.left)),g=!g),g||(g=screen.logicalXDPI/screen.deviceXDPI,f=screen.logicalYDPI/screen.deviceYDPI,u={left:u.left*g,right:u.right*g,top:u.top*f,bottom:u.bottom*f}))}else 0<n&&(c=f="right"),u=a.options.lineWrapping&&1<(g=d.getClientRects()).length?g["right"==f?g.length-1:0]:d.getBoundingClientRect();!(R&&9>fa)||n||u&&(u.left||u.right)||(u=(u=d.parentNode.getClientRects()[0])?{left:u.left,right:u.left+uc(a.display),
top:u.top,bottom:u.bottom}:Ie);d=u.top-b.rect.top;n=u.bottom-b.rect.top;g=(d+n)/2;f=b.view.measure.heights;for(l=0;l<f.length-1&&!(g<f[l]);l++);c={left:("right"==c?u.right:u.left)-b.rect.left,right:("left"==c?u.left:u.right)-b.rect.left,top:l?f[l-1]:0,bottom:f[l]};u.left||u.right||(c.bogus=!0);a.options.singleCursorHeightPerLine||(c.rtop=d,c.rbottom=n);a=c;a.bogus||(b.cache[h]=a)}return{left:a.left,right:a.right,top:e?a.rtop:a.top,bottom:e?a.rbottom:a.bottom}}function He(a,b,c){for(var d,e,h,l,n,
r,m=0;m<a.length;m+=3){n=a[m];r=a[m+1];if(b<n)e=0,h=1,l="left";else if(b<r)e=b-n,h=e+1;else if(m==a.length-3||b==r&&a[m+3]>b)h=r-n,e=h-1,b>=r&&(l="right");if(null!=e){d=a[m+2];n==r&&c==(d.insertLeft?"left":"right")&&(l=c);if("left"==c&&0==e)for(;m&&a[m-2]==a[m-3]&&a[m-1].insertLeft;)d=a[(m-=3)+2],l="left";if("right"==c&&e==r-n)for(;m<a.length-3&&a[m+3]==a[m+4]&&!a[m+5].insertLeft;)d=a[(m+=3)+2],l="right";break}}return{node:d,start:e,end:h,collapse:l,coverStart:n,coverEnd:r}}function Je(a){if(a.measure&&
(a.measure.cache={},a.measure.heights=null,a.rest))for(var b=0;b<a.rest.length;b++)a.measure.caches[b]={}}function Ke(a){a.display.externalMeasure=null;I(a.display.lineMeasure);for(var b=0;b<a.display.view.length;b++)Je(a.display.view[b])}function vc(a){Ke(a);a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null;a.options.lineWrapping||(a.display.maxLineChanged=!0);a.display.lineNumChars=null}function Le(){return hd&&id?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):
window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Me(){return hd&&id?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Qd(a){var b=0;if(a.widgets)for(var c=0;c<a.widgets.length;++c)a.widgets[c].above&&(b+=tc(a.widgets[c]));return b}function jd(a,b,c,d,e){e||(e=Qd(b),c.top+=e,c.bottom+=e);if("line"==d)return c;d||(d="local");b=Ia(b);b="local"==
d?b+a.display.lineSpace.offsetTop:b-a.display.viewOffset;if("page"==d||"window"==d)a=a.display.lineSpace.getBoundingClientRect(),b+=a.top+("window"==d?0:Me()),d=a.left+("window"==d?0:Le()),c.left+=d,c.right+=d;c.top+=b;c.bottom+=b;return c}function Ne(a,b,c){if("div"==c)return b;var d=b.left;b=b.top;"page"==c?(d-=Le(),b-=Me()):"local"!=c&&c||(c=a.display.sizer.getBoundingClientRect(),d+=c.left,b+=c.top);a=a.display.lineSpace.getBoundingClientRect();return{left:d-a.left,top:b-a.top}}function Rd(a,
b,c,d,e){d||(d=A(a.doc,b.line));var h=d;b=b.ch;d=Ra(a,xb(a,d),b,e);return jd(a,h,d,c)}function Sa(a,b,c,d,e,h){function l(b,l){var n=Ra(a,e,b,l?"right":"left",h);l?n.left=n.right:n.right=n.left;return jd(a,d,n,c)}function n(a,b,d){return l(d?a-1:a,1==r[b].level!=d)}d=d||A(a.doc,b.line);e||(e=xb(a,d));var r=Na(d,a.doc.direction),m=b.ch;b=b.sticky;m>=d.text.length?(m=d.text.length,b="before"):0>=m&&(m=0,b="after");if(!r)return l("before"==b?m-1:m,"before"==b);var f=Xa(r,m,b),k=lc;f=n(m,f,"before"==
b);null!=k&&(f.other=n(m,k,"before"!=b));return f}function Oe(a,b){var c=0;b=M(a.doc,b);a.options.lineWrapping||(c=uc(a.display)*b.ch);var d=A(a.doc,b.line),e=Ia(d)+a.display.lineSpace.offsetTop;return{left:c,right:c,top:e,bottom:e+d.height}}function Sd(a,b,c,d,e){a=z(a,b,c);a.xRel=e;d&&(a.outside=!0);return a}function Td(a,b,c){var d=a.doc;c+=a.display.viewOffset;if(0>c)return Sd(d.first,0,null,!0,-1);var e=bb(d,c),h=d.first+d.size-1;if(e>h)return Sd(d.first+d.size-1,A(d,h).text.length,null,!0,1);
0>b&&(b=0);for(d=A(d,e);;)if(e=vg(a,d,e,b,c),h=(d=Wa(d,!1))&&d.find(0,!0),d&&(e.ch>h.from.ch||e.ch==h.from.ch&&0<e.xRel))e=T(d=h.to.line);else return e}function Pe(a,b,c,d){d-=Qd(b);b=b.text.length;var e=ma(function(b){return Ra(a,c,b-1).bottom<=d},b,0);b=ma(function(b){return Ra(a,c,b).top>d},e,b);return{begin:e,end:b}}function Qe(a,b,c,d){c||(c=xb(a,b));d=jd(a,b,Ra(a,c,d),"line").top;return Pe(a,b,c,d)}function Ud(a,b,c,d){return a.bottom<=c?!1:a.top>c?!0:(d?a.left:a.right)>b}function vg(a,b,c,
d,e){e-=Ia(b);var h=xb(a,b),l=Qd(b),n=0,r=b.text.length,m=!0,f=Na(b,a.doc.direction);f&&(f=(a.options.lineWrapping?wg:xg)(a,b,c,h,f,d,e),n=(m=1!=f.level)?f.from:f.to-1,r=m?f.to:f.from-1);var k=null,g=null;f=ma(function(b){var c=Ra(a,h,b);c.top+=l;c.bottom+=l;if(!Ud(c,d,e,!1))return!1;c.top<=e&&c.left<=d&&(k=b,g=c);return!0},n,r);var u=!1;g?(n=d-g.left<g.right-d,m=n==m,f=k+(m?0:1),m=m?"after":"before",n=n?g.left:g.right):(m||f!=r&&f!=n||f++,m=0==f?"after":f==b.text.length?"before":Ra(a,h,f-(m?1:0)).bottom+
l<=e==m?"after":"before",u=Sa(a,z(c,f,m),"line",b,h),n=u.left,u=e<u.top||e>=u.bottom);f=ab(b.text,f,1);return Sd(c,f,m,u,d-n)}function xg(a,b,c,d,e,h,l){var n=ma(function(n){n=e[n];var r=1!=n.level;return Ud(Sa(a,z(c,r?n.to:n.from,r?"before":"after"),"line",b,d),h,l,!0)},0,e.length-1),r=e[n];if(0<n){var m=1!=r.level;m=Sa(a,z(c,m?r.from:r.to,m?"after":"before"),"line",b,d);Ud(m,h,l,!0)&&m.top>l&&(r=e[n-1])}return r}function wg(a,b,c,d,e,h,l){l=Pe(a,b,d,l);c=l.begin;l=l.end;/\s/.test(b.text.charAt(l-
1))&&l--;for(var n=b=null,r=0;r<e.length;r++){var m=e[r];if(!(m.from>=l||m.to<=c)){var f=Ra(a,d,1!=m.level?Math.min(l,m.to)-1:Math.max(c,m.from)).right;f=f<h?h-f+1E9:f-h;if(!b||n>f)b=m,n=f}}b||(b=e[e.length-1]);b.from<c&&(b={from:c,to:b.to,level:b.level});b.to>l&&(b={from:b.from,to:l,level:b.level});return b}function yb(a){if(null!=a.cachedTextHeight)return a.cachedTextHeight;if(null==zb){zb=t("pre");for(var b=0;49>b;++b)zb.appendChild(document.createTextNode("x")),zb.appendChild(t("br"));zb.appendChild(document.createTextNode("x"))}C(a.measure,
zb);b=zb.offsetHeight/50;3<b&&(a.cachedTextHeight=b);I(a.measure);return b||1}function uc(a){if(null!=a.cachedCharWidth)return a.cachedCharWidth;var b=t("span","xxxxxxxxxx"),c=t("pre",[b]);C(a.measure,c);b=b.getBoundingClientRect();b=(b.right-b.left)/10;2<b&&(a.cachedCharWidth=b);return b||10}function Od(a){for(var b=a.display,c={},d={},e=b.gutters.clientLeft,h=b.gutters.firstChild,l=0;h;h=h.nextSibling,++l)c[a.options.gutters[l]]=h.offsetLeft+h.clientLeft+e,d[a.options.gutters[l]]=h.clientWidth;
return{fixedPos:Vd(b),gutterTotalWidth:b.gutters.offsetWidth,gutterLeft:c,gutterWidth:d,wrapperWidth:b.wrapper.clientWidth}}function Vd(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function Re(a){var b=yb(a.display),c=a.options.lineWrapping,d=c&&Math.max(5,a.display.scroller.clientWidth/uc(a.display)-3);return function(e){if(Ea(a.doc,e))return 0;var h=0;if(e.widgets)for(var l=0;l<e.widgets.length;l++)e.widgets[l].height&&(h+=e.widgets[l].height);return c?
h+(Math.ceil(e.text.length/d)||1)*b:h+b}}function Wd(a){var b=a.doc,c=Re(a);b.iter(function(a){var b=c(a);b!=a.height&&Y(a,b)})}function Ab(a,b,c,d){var e=a.display;if(!c&&"true"==(b.target||b.srcElement).getAttribute("cm-not-content"))return null;c=e.lineSpace.getBoundingClientRect();try{var h=b.clientX-c.left;var l=b.clientY-c.top}catch(r){return null}b=Td(a,h,l);var n;d&&1==b.xRel&&(n=A(a.doc,b.line).text).length==b.ch&&(d=k(n,n.length,a.options.tabSize)-n.length,b=z(b.line,Math.max(0,Math.round((h-
Fe(a.display).left)/uc(a.display))-d)));return b}function wb(a,b){if(b>=a.display.viewTo)return null;b-=a.display.viewFrom;if(0>b)return null;for(var c=a.display.view,d=0;d<c.length;d++)if(b-=c[d].size,0>b)return d}function wc(a){a.display.input.showSelection(a.display.input.prepareSelection())}function Se(a,b){void 0===b&&(b=!0);for(var c=a.doc,d={},e=d.cursors=document.createDocumentFragment(),h=d.selection=document.createDocumentFragment(),l=0;l<c.sel.ranges.length;l++)if(b||l!=c.sel.primIndex){var n=
c.sel.ranges[l];if(!(n.from().line>=a.display.viewTo||n.to().line<a.display.viewFrom)){var r=n.empty();(r||a.options.showCursorWhenSelecting)&&Te(a,n.head,e);r||yg(a,n,h)}}return d}function Te(a,b,c){b=Sa(a,b,"div",null,null,!a.options.singleCursorHeightPerLine);var d=c.appendChild(t("div","\u00a0","CodeMirror-cursor"));d.style.left=b.left+"px";d.style.top=b.top+"px";d.style.height=Math.max(0,b.bottom-b.top)*a.options.cursorHeight+"px";b.other&&(a=c.appendChild(t("div","\u00a0","CodeMirror-cursor CodeMirror-secondarycursor")),
a.style.display="",a.style.left=b.other.left+"px",a.style.top=b.other.top+"px",a.style.height=.85*(b.other.bottom-b.other.top)+"px")}function kd(a,b){return a.top-b.top||a.left-b.left}function yg(a,b,c){function d(a,b,d,c){0>b&&(b=0);b=Math.round(b);c=Math.round(c);n.appendChild(t("div",null,"CodeMirror-selected","position: absolute; left: "+a+"px;\n                             top: "+b+"px; width: "+(null==d?f-a:d)+"px;\n                             height: "+(c-b)+"px"))}function e(b,c,e){function h(d,
c){return Rd(a,z(b,d),"div",r,c)}function n(b,d,c){b=Qe(a,r,null,b);d="ltr"==d==("after"==c)?"left":"right";c="after"==c?b.begin:b.end-(/\s/.test(r.text.charAt(b.end-1))?2:1);return h(c,d)[d]}var r=A(l,b),g=r.text.length,G,u,p=Na(r,l.direction);Ed(p,c||0,null==e?g:e,function(a,b,l,r){var ba="ltr"==l,E=h(a,ba?"left":"right"),x=h(b-1,ba?"right":"left"),N=null==c&&0==a,q=null==e&&b==g,Dd=0==r;r=!p||r==p.length-1;3>=x.top-E.top?(b=(k?N:q)&&Dd?m:(ba?E:x).left,d(b,E.top,((k?q:N)&&r?f:(ba?x:E).right)-b,
E.bottom)):(ba?(ba=k&&N&&Dd?m:E.left,N=k?f:n(a,l,"before"),a=k?m:n(b,l,"after"),q=k&&q&&r?f:x.right):(ba=k?n(a,l,"before"):m,N=!k&&N&&Dd?f:E.right,a=!k&&q&&r?m:x.left,q=k?n(b,l,"after"):f),d(ba,E.top,N-ba,E.bottom),E.bottom<x.top&&d(m,E.bottom,null,x.top),d(a,x.top,q-a,x.bottom));if(!G||0>kd(E,G))G=E;0>kd(x,G)&&(G=x);if(!u||0>kd(E,u))u=E;0>kd(x,u)&&(u=x)});return{start:G,end:u}}var h=a.display,l=a.doc,n=document.createDocumentFragment(),r=Fe(a.display),m=r.left,f=Math.max(h.sizerWidth,vb(a)-h.sizer.offsetLeft)-
r.right,k="ltr"==l.direction;h=b.from();b=b.to();if(h.line==b.line)e(h.line,h.ch,b.ch);else{var g=A(l,h.line);r=A(l,b.line);r=Da(g)==Da(r);h=e(h.line,h.ch,r?g.text.length+1:null).end;b=e(b.line,r?0:null,b.ch).start;r&&(h.top<b.top-2?(d(h.right,h.top,null,h.bottom),d(m,b.top,b.left,b.bottom)):d(h.right,h.top,b.left-h.right,h.bottom));h.bottom<b.top&&d(m,h.bottom,null,b.top)}c.appendChild(n)}function Xd(a){if(a.state.focused){var b=a.display;clearInterval(b.blinker);var c=!0;b.cursorDiv.style.visibility=
"";0<a.options.cursorBlinkRate?b.blinker=setInterval(function(){return b.cursorDiv.style.visibility=(c=!c)?"":"hidden"},a.options.cursorBlinkRate):0>a.options.cursorBlinkRate&&(b.cursorDiv.style.visibility="hidden")}}function Ue(a){a.state.focused||(a.display.input.focus(),Yd(a))}function Ve(a){a.state.delayingBlurEvent=!0;setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,xc(a))},100)}function Yd(a,b){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1);"nocursor"!=
a.options.readOnly&&(a.state.focused||(ca(a,"focus",a,b),a.state.focused=!0,J(a.display.wrapper,"CodeMirror-focused"),a.curOp||a.display.selForContextMenu==a.doc.sel||(a.display.input.reset(),va&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),Xd(a))}function xc(a,b){a.state.delayingBlurEvent||(a.state.focused&&(ca(a,"blur",a,b),a.state.focused=!1,Bb(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||
(a.display.shift=!1)},150))}function ld(a){a=a.display;for(var b=a.lineDiv.offsetTop,c=0;c<a.view.length;c++){var d=a.view[c];if(!d.hidden){if(R&&8>fa){var e=d.node.offsetTop+d.node.offsetHeight;var h=e-b;b=e}else h=d.node.getBoundingClientRect(),h=h.bottom-h.top;e=d.line.height-h;2>h&&(h=yb(a));if(.005<e||-.005>e)if(Y(d.line,h),We(d.line),d.rest)for(h=0;h<d.rest.length;h++)We(d.rest[h])}}}function We(a){if(a.widgets)for(var b=0;b<a.widgets.length;++b){var c=a.widgets[b],d=c.node.parentNode;d&&(c.height=
d.offsetHeight)}}function Zd(a,b,c){var d=c&&null!=c.top?Math.max(0,c.top):a.scroller.scrollTop;d=Math.floor(d-a.lineSpace.offsetTop);var e=c&&null!=c.bottom?c.bottom:d+a.wrapper.clientHeight;d=bb(b,d);e=bb(b,e);if(c&&c.ensure){var h=c.ensure.from.line;c=c.ensure.to.line;h<d?(d=h,e=bb(b,Ia(A(b,h))+a.wrapper.clientHeight)):Math.min(c,b.lastLine())>=e&&(d=bb(b,Ia(A(b,c))-a.wrapper.clientHeight),e=c)}return{from:d,to:Math.max(e,d+1)}}function Xe(a){var b=a.display,c=b.view;if(b.alignWidgets||b.gutters.firstChild&&
a.options.fixedGutter){for(var d=Vd(b)-b.scroller.scrollLeft+a.doc.scrollLeft,e=b.gutters.offsetWidth,h=d+"px",l=0;l<c.length;l++)if(!c[l].hidden){a.options.fixedGutter&&(c[l].gutter&&(c[l].gutter.style.left=h),c[l].gutterBackground&&(c[l].gutterBackground.style.left=h));var n=c[l].alignable;if(n)for(var r=0;r<n.length;r++)n[r].style.left=h}a.options.fixedGutter&&(b.gutters.style.left=d+e+"px")}}function Ye(a){if(!a.options.lineNumbers)return!1;var b=a.doc;b=hc(a.options,b.first+b.size-1);var c=a.display;
if(b.length!=c.lineNumChars){var d=c.measure.appendChild(t("div",[t("div",b)],"CodeMirror-linenumber CodeMirror-gutter-elt")),e=d.firstChild.offsetWidth;d=d.offsetWidth-e;c.lineGutter.style.width="";c.lineNumInnerWidth=Math.max(e,c.lineGutter.offsetWidth-d)+1;c.lineNumWidth=c.lineNumInnerWidth+d;c.lineNumChars=c.lineNumInnerWidth?b.length:-1;c.lineGutter.style.width=c.lineNumWidth+"px";$d(a);return!0}return!1}function ae(a,b){var c=a.display,d=yb(a.display);0>b.top&&(b.top=0);var e=a.curOp&&null!=
a.curOp.scrollTop?a.curOp.scrollTop:c.scroller.scrollTop,h=Md(a),l={};b.bottom-b.top>h&&(b.bottom=b.top+h);var n=a.doc.height+Ld(c),r=b.top<d;d=b.bottom>n-d;b.top<e?l.scrollTop=r?0:b.top:b.bottom>e+h&&(h=Math.min(b.top,(d?n:b.bottom)-h),h!=e&&(l.scrollTop=h));e=a.curOp&&null!=a.curOp.scrollLeft?a.curOp.scrollLeft:c.scroller.scrollLeft;c=vb(a)-(a.options.fixedGutter?c.gutters.offsetWidth:0);if(h=b.right-b.left>c)b.right=b.left+c;10>b.left?l.scrollLeft=0:b.left<e?l.scrollLeft=Math.max(0,b.left-(h?0:
10)):b.right>c+e-3&&(l.scrollLeft=b.right+(h?0:10)-c);return l}function md(a,b){null!=b&&(nd(a),a.curOp.scrollTop=(null==a.curOp.scrollTop?a.doc.scrollTop:a.curOp.scrollTop)+b)}function Vb(a){nd(a);var b=a.getCursor();a.curOp.scrollToPos={from:b,to:b,margin:a.options.cursorScrollMargin}}function yc(a,b,c){null==b&&null==c||nd(a);null!=b&&(a.curOp.scrollLeft=b);null!=c&&(a.curOp.scrollTop=c)}function nd(a){var b=a.curOp.scrollToPos;if(b){a.curOp.scrollToPos=null;var c=Oe(a,b.from),d=Oe(a,b.to);Ze(a,
c,d,b.margin)}}function Ze(a,b,c,d){b=ae(a,{left:Math.min(b.left,c.left),top:Math.min(b.top,c.top)-d,right:Math.max(b.right,c.right),bottom:Math.max(b.bottom,c.bottom)+d});yc(a,b.scrollLeft,b.scrollTop)}function zc(a,b){2>Math.abs(a.doc.scrollTop-b)||(hb||be(a,{top:b}),$e(a,b,!0),hb&&be(a),Ac(a,100))}function $e(a,b,c){b=Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,b);if(a.display.scroller.scrollTop!=b||c)a.doc.scrollTop=b,a.display.scrollbars.setScrollTop(b),a.display.scroller.scrollTop!=
b&&(a.display.scroller.scrollTop=b)}function Cb(a,b,c,d){b=Math.min(b,a.display.scroller.scrollWidth-a.display.scroller.clientWidth);(c?b==a.doc.scrollLeft:2>Math.abs(a.doc.scrollLeft-b))&&!d||(a.doc.scrollLeft=b,Xe(a),a.display.scroller.scrollLeft!=b&&(a.display.scroller.scrollLeft=b),a.display.scrollbars.setScrollLeft(b))}function Bc(a){var b=a.display,c=b.gutters.offsetWidth,d=Math.round(a.doc.height+Ld(a.display));return{clientHeight:b.scroller.clientHeight,viewHeight:b.wrapper.clientHeight,scrollWidth:b.scroller.scrollWidth,
clientWidth:b.scroller.clientWidth,viewWidth:b.wrapper.clientWidth,barLeft:a.options.fixedGutter?c:0,docHeight:d,scrollHeight:d+Za(a)+b.barHeight,nativeBarWidth:b.nativeBarWidth,gutterWidth:c}}function Wb(a,b){b||(b=Bc(a));var c=a.display.barWidth,d=a.display.barHeight;af(a,b);for(var e=0;4>e&&c!=a.display.barWidth||d!=a.display.barHeight;e++)c!=a.display.barWidth&&a.options.lineWrapping&&ld(a),af(a,Bc(a)),c=a.display.barWidth,d=a.display.barHeight}function af(a,b){var c=a.display,d=c.scrollbars.update(b);
c.sizer.style.paddingRight=(c.barWidth=d.right)+"px";c.sizer.style.paddingBottom=(c.barHeight=d.bottom)+"px";c.heightForcer.style.borderBottom=d.bottom+"px solid transparent";d.right&&d.bottom?(c.scrollbarFiller.style.display="block",c.scrollbarFiller.style.height=d.bottom+"px",c.scrollbarFiller.style.width=d.right+"px"):c.scrollbarFiller.style.display="";d.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(c.gutterFiller.style.display="block",c.gutterFiller.style.height=d.bottom+
"px",c.gutterFiller.style.width=b.gutterWidth+"px"):c.gutterFiller.style.display=""}function bf(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&Bb(a.display.wrapper,a.display.scrollbars.addClass));a.display.scrollbars=new cf[a.options.scrollbarStyle](function(b){a.display.wrapper.insertBefore(b,a.display.scrollbarFiller);L(b,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)});b.setAttribute("cm-not-content","true")},
function(b,c){"horizontal"==c?Cb(a,b):zc(a,b)},a);a.display.scrollbars.addClass&&J(a.display.wrapper,a.display.scrollbars.addClass)}function Db(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++zg};a=a.curOp;Ub?Ub.ops.push(a):a.ownsGroup=Ub={ops:[a],delayedCallbacks:[]}}function Eb(a){sg(a.curOp,
function(a){for(var b=0;b<a.ops.length;b++)a.ops[b].cm.curOp=null;a=a.ops;for(b=0;b<a.length;b++){var d=a[b],e=d.cm,h=e.display,l=e.display;!l.scrollbarsClipped&&l.scroller.offsetWidth&&(l.nativeBarWidth=l.scroller.offsetWidth-l.scroller.clientWidth,l.heightForcer.style.height=Za(e)+"px",l.sizer.style.marginBottom=-l.nativeBarWidth+"px",l.sizer.style.borderRightWidth=Za(e)+"px",l.scrollbarsClipped=!0);d.updateMaxLine&&kc(e);d.mustUpdate=d.viewChanged||d.forceUpdate||null!=d.scrollTop||d.scrollToPos&&
(d.scrollToPos.from.line<h.viewFrom||d.scrollToPos.to.line>=h.viewTo)||h.maxLineChanged&&e.options.lineWrapping;d.update=d.mustUpdate&&new od(e,d.mustUpdate&&{top:d.scrollTop,ensure:d.scrollToPos},d.forceUpdate)}for(b=0;b<a.length;b++)d=a[b],d.updatedDisplay=d.mustUpdate&&ce(d.cm,d.update);for(b=0;b<a.length;b++)if(d=a[b],e=d.cm,h=e.display,d.updatedDisplay&&ld(e),d.barMeasure=Bc(e),h.maxLineChanged&&!e.options.lineWrapping&&(l=h.maxLine.text.length,l=Ra(e,xb(e,h.maxLine),l,void 0),d.adjustWidthTo=
l.left+3,e.display.sizerWidth=d.adjustWidthTo,d.barMeasure.scrollWidth=Math.max(h.scroller.clientWidth,h.sizer.offsetLeft+d.adjustWidthTo+Za(e)+e.display.barWidth),d.maxScrollLeft=Math.max(0,h.sizer.offsetLeft+d.adjustWidthTo-vb(e))),d.updatedDisplay||d.selectionChanged)d.preparedSelection=h.input.prepareSelection();for(b=0;b<a.length;b++)d=a[b],e=d.cm,null!=d.adjustWidthTo&&(e.display.sizer.style.minWidth=d.adjustWidthTo+"px",d.maxScrollLeft<e.doc.scrollLeft&&Cb(e,Math.min(e.display.scroller.scrollLeft,
d.maxScrollLeft),!0),e.display.maxLineChanged=!1),h=d.focus&&d.focus==D(),d.preparedSelection&&e.display.input.showSelection(d.preparedSelection,h),(d.updatedDisplay||d.startHeight!=e.doc.height)&&Wb(e,d.barMeasure),d.updatedDisplay&&de(e,d.barMeasure),d.selectionChanged&&Xd(e),e.state.focused&&d.updateInput&&e.display.input.reset(d.typing),h&&Ue(d.cm);for(b=0;b<a.length;b++){var n=void 0;d=a[b];e=d.cm;h=e.display;l=e.doc;d.updatedDisplay&&df(e,d.update);null==h.wheelStartX||null==d.scrollTop&&null==
d.scrollLeft&&!d.scrollToPos||(h.wheelStartX=h.wheelStartY=null);null!=d.scrollTop&&$e(e,d.scrollTop,d.forceScroll);null!=d.scrollLeft&&Cb(e,d.scrollLeft,!0,!0);if(d.scrollToPos){var r=M(l,d.scrollToPos.from);var m=M(l,d.scrollToPos.to);var f=d.scrollToPos.margin;null==f&&(f=0);e.options.lineWrapping||r!=m||(r=r.ch?z(r.line,"before"==r.sticky?r.ch-1:r.ch,"after"):r,m="before"==r.sticky?z(r.line,r.ch+1,"before"):r);for(var k=0;5>k;k++){var g=!1;n=Sa(e,r);var u=m&&m!=r?Sa(e,m):n;n={left:Math.min(n.left,
u.left),top:Math.min(n.top,u.top)-f,right:Math.max(n.left,u.left),bottom:Math.max(n.bottom,u.bottom)+f};u=ae(e,n);var p=e.doc.scrollTop,E=e.doc.scrollLeft;null!=u.scrollTop&&(zc(e,u.scrollTop),1<Math.abs(e.doc.scrollTop-p)&&(g=!0));null!=u.scrollLeft&&(Cb(e,u.scrollLeft),1<Math.abs(e.doc.scrollLeft-E)&&(g=!0));if(!g)break}m=n;ka(e,"scrollCursorIntoView")||(f=e.display,k=f.sizer.getBoundingClientRect(),r=null,0>m.top+k.top?r=!0:m.bottom+k.top>(window.innerHeight||document.documentElement.clientHeight)&&
(r=!1),null==r||Ag||(m=t("div","\u200b",null,"position: absolute;\n                         top: "+(m.top-f.viewOffset-e.display.lineSpace.offsetTop)+"px;\n                         height: "+(m.bottom-m.top+Za(e)+f.barHeight)+"px;\n                         left: "+m.left+"px; width: "+Math.max(2,m.right-m.left)+"px;"),e.display.lineSpace.appendChild(m),m.scrollIntoView(r),e.display.lineSpace.removeChild(m)))}m=d.maybeHiddenMarkers;r=d.maybeUnhiddenMarkers;if(m)for(f=0;f<m.length;++f)m[f].lines.length||
ca(m[f],"hide");if(r)for(m=0;m<r.length;++m)r[m].lines.length&&ca(r[m],"unhide");h.wrapper.offsetHeight&&(l.scrollTop=e.display.scroller.scrollTop);d.changeObjs&&ca(e,"changes",e,d.changeObjs);d.update&&d.update.finish()}})}function Ga(a,b){if(a.curOp)return b();Db(a);try{return b()}finally{Eb(a)}}function ra(a,b){return function(){if(a.curOp)return b.apply(a,arguments);Db(a);try{return b.apply(a,arguments)}finally{Eb(a)}}}function xa(a){return function(){if(this.curOp)return a.apply(this,arguments);
Db(this);try{return a.apply(this,arguments)}finally{Eb(this)}}}function sa(a){return function(){var b=this.cm;if(!b||b.curOp)return a.apply(this,arguments);Db(b);try{return a.apply(this,arguments)}finally{Eb(b)}}}function Ba(a,b,c,d){null==b&&(b=a.doc.first);null==c&&(c=a.doc.first+a.doc.size);d||(d=0);var e=a.display;d&&c<e.viewTo&&(null==e.updateLineNumbers||e.updateLineNumbers>b)&&(e.updateLineNumbers=b);a.curOp.viewChanged=!0;if(b>=e.viewTo)ib&&Aa(a.doc,b)<e.viewTo&&lb(a);else if(c<=e.viewFrom)ib&&
Zc(a.doc,c+d)>e.viewFrom?lb(a):(e.viewFrom+=d,e.viewTo+=d);else if(b<=e.viewFrom&&c>=e.viewTo)lb(a);else if(b<=e.viewFrom){var h=pd(a,c,c+d,1);h?(e.view=e.view.slice(h.index),e.viewFrom=h.lineN,e.viewTo+=d):lb(a)}else if(c>=e.viewTo)(h=pd(a,b,b,-1))?(e.view=e.view.slice(0,h.index),e.viewTo=h.lineN):lb(a);else{h=pd(a,b,b,-1);var l=pd(a,c,c+d,1);h&&l?(e.view=e.view.slice(0,h.index).concat(gd(a,h.lineN,l.lineN)).concat(e.view.slice(l.index)),e.viewTo+=d):lb(a)}if(a=e.externalMeasured)c<a.lineN?a.lineN+=
d:b<a.lineN+a.size&&(e.externalMeasured=null)}function mb(a,b,c){a.curOp.viewChanged=!0;var d=a.display,e=a.display.externalMeasured;e&&b>=e.lineN&&b<e.lineN+e.size&&(d.externalMeasured=null);b<d.viewFrom||b>=d.viewTo||(a=d.view[wb(a,b)],null!=a.node&&(a=a.changes||(a.changes=[]),-1==H(a,c)&&a.push(c)))}function lb(a){a.display.viewFrom=a.display.viewTo=a.doc.first;a.display.view=[];a.display.viewOffset=0}function pd(a,b,c,d){var e=wb(a,b),h=a.display.view;if(!ib||c==a.doc.first+a.doc.size)return{index:e,
lineN:c};for(var l=a.display.viewFrom,n=0;n<e;n++)l+=h[n].size;if(l!=b){if(0<d){if(e==h.length-1)return null;b=l+h[e].size-b;e++}else b=l-b;c+=b}for(;Aa(a.doc,c)!=c;){if(e==(0>d?0:h.length-1))return null;c+=d*h[e-(0>d?1:0)].size;e+=d}return{index:e,lineN:c}}function ef(a){a=a.display.view;for(var b=0,c=0;c<a.length;c++){var d=a[c];d.hidden||d.node&&!d.changes||++b}return b}function Ac(a,b){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(b,W(Bg,a))}function Bg(a){var b=a.doc;if(!(b.highlightFrontier>=
a.display.viewTo)){var c=+new Date+a.options.workTime,d=Ja(a,b.highlightFrontier),e=[];b.iter(d.line,Math.min(b.first+b.size,a.display.viewTo+500),function(h){if(d.line>=a.display.viewFrom){var l=h.styles,n=h.text.length>a.options.maxHighlightLength?db(b.mode,d.state):null,r=oc(a,h,d,!0);n&&(d.state=n);h.styles=r.styles;n=h.styleClasses;(r=r.classes)?h.styleClasses=r:n&&(h.styleClasses=null);r=!l||l.length!=h.styles.length||n!=r&&(!n||!r||n.bgClass!=r.bgClass||n.textClass!=r.textClass);for(n=0;!r&&
n<l.length;++n)r=l[n]!=h.styles[n];r&&e.push(d.line);h.stateAfter=d.save()}else h.text.length<=a.options.maxHighlightLength&&ha(a,h.text,d),h.stateAfter=0==d.line%5?d.save():null;d.nextLine();if(+new Date>c)return Ac(a,a.options.workDelay),!0});b.highlightFrontier=d.line;b.modeFrontier=Math.max(b.modeFrontier,d.line);e.length&&Ga(a,function(){for(var b=0;b<e.length;b++)mb(a,e[b],"text")})}}function ce(a,b){var c=a.display,d=a.doc;if(b.editorIsHidden)return lb(a),!1;if(!b.force&&b.visible.from>=c.viewFrom&&
b.visible.to<=c.viewTo&&(null==c.updateLineNumbers||c.updateLineNumbers>=c.viewTo)&&c.renderedView==c.view&&0==ef(a))return!1;Ye(a)&&(lb(a),b.dims=Od(a));var e=d.first+d.size,h=Math.max(b.visible.from-a.options.viewportMargin,d.first),l=Math.min(e,b.visible.to+a.options.viewportMargin);c.viewFrom<h&&20>h-c.viewFrom&&(h=Math.max(d.first,c.viewFrom));c.viewTo>l&&20>c.viewTo-l&&(l=Math.min(e,c.viewTo));ib&&(h=Aa(a.doc,h),l=Zc(a.doc,l));d=h!=c.viewFrom||l!=c.viewTo||c.lastWrapHeight!=b.wrapperHeight||
c.lastWrapWidth!=b.wrapperWidth;e=a.display;0==e.view.length||h>=e.viewTo||l<=e.viewFrom?(e.view=gd(a,h,l),e.viewFrom=h):(e.viewFrom>h?e.view=gd(a,h,e.viewFrom).concat(e.view):e.viewFrom<h&&(e.view=e.view.slice(wb(a,h))),e.viewFrom=h,e.viewTo<l?e.view=e.view.concat(gd(a,e.viewTo,l)):e.viewTo>l&&(e.view=e.view.slice(0,wb(a,l))));e.viewTo=l;c.viewOffset=Ia(A(a.doc,c.viewFrom));a.display.mover.style.top=c.viewOffset+"px";l=ef(a);if(!d&&0==l&&!b.force&&c.renderedView==c.view&&(null==c.updateLineNumbers||
c.updateLineNumbers>=c.viewTo))return!1;a.hasFocus()?h=null:(h=D())&&v(a.display.lineDiv,h)?(h={activeElt:h},window.getSelection&&(e=window.getSelection(),e.anchorNode&&e.extend&&v(a.display.lineDiv,e.anchorNode)&&(h.anchorNode=e.anchorNode,h.anchorOffset=e.anchorOffset,h.focusNode=e.focusNode,h.focusOffset=e.focusOffset))):h=null;4<l&&(c.lineDiv.style.display="none");Cg(a,c.updateLineNumbers,b.dims);4<l&&(c.lineDiv.style.display="");c.renderedView=c.view;(l=h)&&l.activeElt&&l.activeElt!=D()&&(l.activeElt.focus(),
l.anchorNode&&v(document.body,l.anchorNode)&&v(document.body,l.focusNode)&&(h=window.getSelection(),e=document.createRange(),e.setEnd(l.anchorNode,l.anchorOffset),e.collapse(!1),h.removeAllRanges(),h.addRange(e),h.extend(l.focusNode,l.focusOffset)));I(c.cursorDiv);I(c.selectionDiv);c.gutters.style.height=c.sizer.style.minHeight=0;d&&(c.lastWrapHeight=b.wrapperHeight,c.lastWrapWidth=b.wrapperWidth,Ac(a,400));c.updateLineNumbers=null;return!0}function df(a,b){for(var c=b.viewport,d=!0;;d=!1){if(!d||
!a.options.lineWrapping||b.oldDisplayWidth==vb(a))if(c&&null!=c.top&&(c={top:Math.min(a.doc.height+Ld(a.display)-Md(a),c.top)}),b.visible=Zd(a.display,a.doc,c),b.visible.from>=a.display.viewFrom&&b.visible.to<=a.display.viewTo)break;if(!ce(a,b))break;ld(a);d=Bc(a);wc(a);Wb(a,d);de(a,d);b.force=!1}b.signal(a,"update",a);if(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)b.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=
a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo}function be(a,b){var c=new od(a,b);if(ce(a,c)){ld(a);df(a,c);var d=Bc(a);wc(a);Wb(a,d);de(a,d);c.finish()}}function Cg(a,b,c){function d(b){var d=b.nextSibling;va&&Qa&&a.display.currentWheelTarget==b?b.style.display="none":b.parentNode.removeChild(b);return d}var e=a.display,h=a.options.lineNumbers,l=e.lineDiv,n=l.firstChild,r=e.view;e=e.viewFrom;for(var m=0;m<r.length;m++){var f=r[m];if(!f.hidden)if(f.node&&f.node.parentNode==l){for(;n!=
f.node;)n=d(n);n=h&&null!=b&&b<=e&&f.lineNumber;f.changes&&(-1<H(f.changes,"gutter")&&(n=!1),Ae(a,f,e,c));n&&(I(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(hc(a.options,e))));n=f.node.nextSibling}else{var k=ug(a,f,e,c);l.insertBefore(k,n)}e+=f.size}for(;n;)n=d(n)}function $d(a){a.display.sizer.style.marginLeft=a.display.gutters.offsetWidth+"px"}function de(a,b){a.display.sizer.style.minHeight=b.docHeight+"px";a.display.heightForcer.style.top=b.docHeight+"px";a.display.gutters.style.height=
b.docHeight+a.display.barHeight+Za(a)+"px"}function ff(a){var b=a.display.gutters,c=a.options.gutters;I(b);for(var d=0;d<c.length;++d){var e=c[d],h=b.appendChild(t("div",null,"CodeMirror-gutter "+e));"CodeMirror-linenumbers"==e&&(a.display.lineGutter=h,h.style.width=(a.display.lineNumWidth||1)+"px")}b.style.display=d?"":"none";$d(a)}function ee(a){var b=H(a.gutters,"CodeMirror-linenumbers");-1==b&&a.lineNumbers?a.gutters=a.gutters.concat(["CodeMirror-linenumbers"]):-1<b&&!a.lineNumbers&&(a.gutters=
a.gutters.slice(0),a.gutters.splice(b,1))}function gf(a){var b=a.wheelDeltaX,c=a.wheelDeltaY;null==b&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(b=a.detail);null==c&&a.detail&&a.axis==a.VERTICAL_AXIS?c=a.detail:null==c&&(c=a.wheelDelta);return{x:b,y:c}}function Dg(a){a=gf(a);a.x*=Ka;a.y*=Ka;return a}function hf(a,b){var c=gf(b),d=c.x;c=c.y;var e=a.display,h=e.scroller,l=h.scrollWidth>h.clientWidth,n=h.scrollHeight>h.clientHeight;if(d&&l||c&&n){if(c&&Qa&&va){l=b.target;var r=e.view;a:for(;l!=h;l=l.parentNode)for(var m=
0;m<r.length;m++)if(r[m].node==l){a.display.currentWheelTarget=l;break a}}!d||hb||Ta||null==Ka?(c&&null!=Ka&&(n=c*Ka,l=a.doc.scrollTop,r=l+e.wrapper.clientHeight,0>n?l=Math.max(0,l+n-50):r=Math.min(a.doc.height,r+n+50),be(a,{top:l,bottom:r})),20>qd&&(null==e.wheelStartX?(e.wheelStartX=h.scrollLeft,e.wheelStartY=h.scrollTop,e.wheelDX=d,e.wheelDY=c,setTimeout(function(){if(null!=e.wheelStartX){var a=h.scrollLeft-e.wheelStartX,b=h.scrollTop-e.wheelStartY;a=b&&e.wheelDY&&b/e.wheelDY||a&&e.wheelDX&&a/
e.wheelDX;e.wheelStartX=e.wheelStartY=null;a&&(Ka=(Ka*qd+a)/(qd+1),++qd)}},200)):(e.wheelDX+=d,e.wheelDY+=c))):(c&&n&&zc(a,Math.max(0,h.scrollTop+c*Ka)),Cb(a,Math.max(0,h.scrollLeft+d*Ka)),(!c||c&&n)&&qa(b),e.wheelStartX=null)}}function Ua(a,b){var c=a[b];a.sort(function(a,b){return K(a.from(),b.from())});b=H(a,c);for(c=1;c<a.length;c++){var d=a[c],e=a[c-1];if(0<=K(e.to(),d.from())){var h=Va(e.from(),d.from()),l=pa(e.to(),d.to());d=e.empty()?d.from()==d.head:e.from()==e.head;c<=b&&--b;a.splice(--c,
2,new V(d?l:h,d?h:l))}}return new La(a,b)}function gb(a,b){return new La([new V(a,b||a)],0)}function nb(a){return a.text?z(a.from.line+a.text.length-1,g(a.text).length+(1==a.text.length?a.from.ch:0)):a.to}function jf(a,b){if(0>K(a,b.from))return a;if(0>=K(a,b.to))return nb(b);var c=a.line+b.text.length-(b.to.line-b.from.line)-1,d=a.ch;a.line==b.to.line&&(d+=nb(b).ch-b.to.ch);return z(c,d)}function fe(a,b){for(var c=[],d=0;d<a.sel.ranges.length;d++){var e=a.sel.ranges[d];c.push(new V(jf(e.anchor,b),
jf(e.head,b)))}return Ua(c,a.sel.primIndex)}function kf(a,b,c){return a.line==b.line?z(c.line,a.ch-b.ch+c.ch):z(c.line+(a.line-b.line),a.ch)}function ge(a){a.doc.mode=nc(a.options,a.doc.modeOption);Cc(a)}function Cc(a){a.doc.iter(function(a){a.stateAfter&&(a.stateAfter=null);a.styles&&(a.styles=null)});a.doc.modeFrontier=a.doc.highlightFrontier=a.doc.first;Ac(a,100);a.state.modeGen++;a.curOp&&Ba(a)}function lf(a,b){return 0==b.from.ch&&0==b.to.ch&&""==g(b.text)&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}
function he(a,b,c,d){function e(a,c,e){a.text=c;a.stateAfter&&(a.stateAfter=null);a.styles&&(a.styles=null);null!=a.order&&(a.order=null);Z(a);na(a,e);c=d?d(a):1;c!=a.height&&Y(a,c);ta(a,"change",a,b)}function h(a,b){for(var e=[],h=a;h<b;++h)e.push(new Xb(r[h],c?c[h]:null,d));return e}var l=b.from,n=b.to,r=b.text,m=A(a,l.line),f=A(a,n.line),k=g(r),u=c?c[r.length-1]:null,p=n.line-l.line;b.full?(a.insert(0,h(0,r.length)),a.remove(r.length,a.size-r.length)):lf(a,b)?(n=h(0,r.length-1),e(f,f.text,u),p&&
a.remove(l.line,p),n.length&&a.insert(l.line,n)):m==f?1==r.length?e(m,m.text.slice(0,l.ch)+k+m.text.slice(n.ch),u):(p=h(1,r.length-1),p.push(new Xb(k+m.text.slice(n.ch),u,d)),e(m,m.text.slice(0,l.ch)+r[0],c?c[0]:null),a.insert(l.line+1,p)):1==r.length?(e(m,m.text.slice(0,l.ch)+r[0]+f.text.slice(n.ch),c?c[0]:null),a.remove(l.line+1,p)):(e(m,m.text.slice(0,l.ch)+r[0],c?c[0]:null),e(f,k+f.text.slice(n.ch),u),u=h(1,r.length-1),1<p&&a.remove(l.line+1,p-1),a.insert(l.line+1,u));ta(a,"change",a,b)}function Fb(a,
b,c){function d(a,h,l){if(a.linked)for(var e=0;e<a.linked.length;++e){var r=a.linked[e];if(r.doc!=h){var m=l&&r.sharedHist;if(!c||m)b(r.doc,m),d(r.doc,a,m)}}}d(a,null,!0)}function mf(a,b){if(b.cm)throw Error("This document is already in use.");a.doc=b;b.cm=a;Wd(a);ge(a);nf(a);a.options.lineWrapping||kc(a);a.options.mode=b.modeOption;Ba(a)}function nf(a){("rtl"==a.doc.direction?J:Bb)(a.display.lineDiv,"CodeMirror-rtl")}function Eg(a){Ga(a,function(){nf(a);Ba(a)})}function rd(a){this.done=[];this.undone=
[];this.undoDepth=Infinity;this.lastModTime=this.lastSelTime=0;this.lastOrigin=this.lastSelOrigin=this.lastOp=this.lastSelOp=null;this.generation=this.maxGeneration=a||1}function ie(a,b){var c={from:Oa(b.from),to:nb(b),text:S(a,b.from,b.to)};of(a,c,b.from.line,b.to.line+1);Fb(a,function(a){return of(a,c,b.from.line,b.to.line+1)},!0);return c}function pf(a){for(;a.length;)if(g(a).ranges)a.pop();else break}function qf(a,b,c,d){var e=a.history;e.undone.length=0;var h=+new Date,l;if(l=e.lastOp==d||e.lastOrigin==
b.origin&&b.origin&&("+"==b.origin.charAt(0)&&a.cm&&e.lastModTime>h-a.cm.options.historyEventDelay||"*"==b.origin.charAt(0))){if(e.lastOp==d){pf(e.done);var n=g(e.done)}else e.done.length&&!g(e.done).ranges?n=g(e.done):1<e.done.length&&!e.done[e.done.length-2].ranges?(e.done.pop(),n=g(e.done)):n=void 0;l=n}if(l){var r=g(n.changes);0==K(b.from,b.to)&&0==K(b.from,r.to)?r.to=nb(b):n.changes.push(ie(a,b))}else for((n=g(e.done))&&n.ranges||sd(a.sel,e.done),n={changes:[ie(a,b)],generation:e.generation},
e.done.push(n);e.done.length>e.undoDepth;)e.done.shift(),e.done[0].ranges||e.done.shift();e.done.push(c);e.generation=++e.maxGeneration;e.lastModTime=e.lastSelTime=h;e.lastOp=e.lastSelOp=d;e.lastOrigin=e.lastSelOrigin=b.origin;r||ca(a,"historyAdded")}function sd(a,b){var c=g(b);c&&c.ranges&&c.equals(a)||b.push(a)}function of(a,b,c,d){var e=b["spans_"+a.id],h=0;a.iter(Math.max(a.first,c),Math.min(a.first+a.size,d),function(d){d.markedSpans&&((e||(e=b["spans_"+a.id]={}))[h]=d.markedSpans);++h})}function Fg(a){if(!a)return null;
for(var b,c=0;c<a.length;++c)a[c].marker.explicitlyCleared?b||(b=a.slice(0,c)):b&&b.push(a[c]);return b?b.length?b:null:a}function rf(a,b){var c;if(c=b["spans_"+a.id]){for(var d=[],e=0;e<b.text.length;++e)d.push(Fg(c[e]));c=d}else c=null;d=X(a,b);if(!c)return d;if(!d)return c;for(e=0;e<c.length;++e){var h=c[e],l=d[e];if(h&&l){var n=0;a:for(;n<l.length;++n){for(var r=l[n],m=0;m<h.length;++m)if(h[m].marker==r.marker)continue a;h.push(r)}}else l&&(c[e]=l)}return c}function Yb(a,b,c){for(var d=[],e=0;e<
a.length;++e){var h=a[e];if(h.ranges)d.push(c?La.prototype.deepCopy.call(h):h);else{h=h.changes;var l=[];d.push({changes:l});for(var n=0;n<h.length;++n){var r=h[n],m;l.push({from:r.from,to:r.to,text:r.text});if(b)for(var f in r)(m=f.match(/^spans_(\d+)$/))&&-1<H(b,Number(m[1]))&&(g(l)[f]=r[f],delete r[f])}}}return d}function je(a,b,c,d){return d?(a=a.anchor,c&&(d=0>K(b,a),d!=0>K(c,a)?(a=b,b=c):d!=0>K(b,c)&&(b=c)),new V(a,b)):new V(c||b,b)}function td(a,b,c,d,e){null==e&&(e=a.cm&&(a.cm.display.shift||
a.extend));ua(a,new La([je(a.sel.primary(),b,c,e)],0),d)}function sf(a,b,c){for(var d=[],e=a.cm&&(a.cm.display.shift||a.extend),h=0;h<a.sel.ranges.length;h++)d[h]=je(a.sel.ranges[h],b[h],null,e);b=Ua(d,a.sel.primIndex);ua(a,b,c)}function ke(a,b,c,d){var e=a.sel.ranges.slice(0);e[b]=c;ua(a,Ua(e,a.sel.primIndex),d)}function Gg(a,b,c){c={ranges:b.ranges,update:function(b){this.ranges=[];for(var d=0;d<b.length;d++)this.ranges[d]=new V(M(a,b[d].anchor),M(a,b[d].head))},origin:c&&c.origin};ca(a,"beforeSelectionChange",
a,c);a.cm&&ca(a.cm,"beforeSelectionChange",a.cm,c);return c.ranges!=b.ranges?Ua(c.ranges,c.ranges.length-1):b}function tf(a,b,c){var d=a.history.done,e=g(d);e&&e.ranges?(d[d.length-1]=b,ud(a,b,c)):ua(a,b,c)}function ua(a,b,c){ud(a,b,c);b=a.sel;var d=a.cm?a.cm.curOp.id:NaN,e=a.history,h=c&&c.origin,l;if(!(l=d==e.lastSelOp)&&(l=h&&e.lastSelOrigin==h)&&!(l=e.lastModTime==e.lastSelTime&&e.lastOrigin==h)){l=g(e.done);var n=h.charAt(0);l="*"==n||"+"==n&&l.ranges.length==b.ranges.length&&l.somethingSelected()==
b.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}l?e.done[e.done.length-1]=b:sd(b,e.done);e.lastSelTime=+new Date;e.lastSelOrigin=h;e.lastSelOp=d;c&&!1!==c.clearRedo&&pf(e.undone)}function ud(a,b,c){if(wa(a,"beforeSelectionChange")||a.cm&&wa(a.cm,"beforeSelectionChange"))b=Gg(a,b,c);var d=c&&c.bias||(0>K(b.primary().head,a.sel.primary().head)?-1:1);uf(a,vf(a,b,d,!0));c&&!1===c.scroll||!a.cm||Vb(a.cm)}function uf(a,b){b.equals(a.sel)||(a.sel=b,a.cm&&
(a.cm.curOp.updateInput=a.cm.curOp.selectionChanged=!0,mc(a.cm)),ta(a,"cursorActivity",a))}function wf(a){uf(a,vf(a,a.sel,null,!1))}function vf(a,b,c,d){for(var e,h=0;h<b.ranges.length;h++){var l=b.ranges[h],n=b.ranges.length==a.sel.ranges.length&&a.sel.ranges[h],r=le(a,l.anchor,n&&n.anchor,c,d);n=le(a,l.head,n&&n.head,c,d);if(e||r!=l.anchor||n!=l.head)e||(e=b.ranges.slice(0,h)),e[h]=new V(r,n)}return e?Ua(e,b.primIndex):b}function Zb(a,b,c,d,e){var h=A(a,b.line);if(h.markedSpans)for(var l=0;l<h.markedSpans.length;++l){var n=
h.markedSpans[l],r=n.marker;if((null==n.from||(r.inclusiveLeft?n.from<=b.ch:n.from<b.ch))&&(null==n.to||(r.inclusiveRight?n.to>=b.ch:n.to>b.ch))){if(e&&(ca(r,"beforeCursorEnter"),r.explicitlyCleared))if(h.markedSpans){--l;continue}else break;if(r.atomic){if(c){l=r.find(0>d?1:-1);n=void 0;if(0>d?r.inclusiveRight:r.inclusiveLeft)l=xf(a,l,-d,l&&l.line==b.line?h:null);if(l&&l.line==b.line&&(n=K(l,c))&&(0>d?0>n:0<n))return Zb(a,l,b,d,e)}c=r.find(0>d?-1:1);if(0>d?r.inclusiveLeft:r.inclusiveRight)c=xf(a,
c,d,c.line==b.line?h:null);return c?Zb(a,c,b,d,e):null}}}return b}function le(a,b,c,d,e){d=d||1;b=Zb(a,b,c,d,e)||!e&&Zb(a,b,c,d,!0)||Zb(a,b,c,-d,e)||!e&&Zb(a,b,c,-d,!0);return b?b:(a.cantEdit=!0,z(a.first,0))}function xf(a,b,c,d){return 0>c&&0==b.ch?b.line>a.first?M(a,z(b.line-1)):null:0<c&&b.ch==(d||A(a,b.line)).text.length?b.line<a.first+a.size-1?z(b.line+1,0):null:new z(b.line,b.ch+c)}function yf(a){a.setSelection(z(a.firstLine(),0),z(a.lastLine()),$a)}function zf(a,b,c){var d={canceled:!1,from:b.from,
to:b.to,text:b.text,origin:b.origin,cancel:function(){return d.canceled=!0}};c&&(d.update=function(b,c,l,n){b&&(d.from=M(a,b));c&&(d.to=M(a,c));l&&(d.text=l);void 0!==n&&(d.origin=n)});ca(a,"beforeChange",a,d);a.cm&&ca(a.cm,"beforeChange",a.cm,d);return d.canceled?null:{from:d.from,to:d.to,text:d.text,origin:d.origin}}function $b(a,b,c){if(a.cm){if(!a.cm.curOp)return ra(a.cm,$b)(a,b,c);if(a.cm.state.suppressEdits)return}if(wa(a,"beforeChange")||a.cm&&wa(a.cm,"beforeChange"))if(b=zf(a,b,!0),!b)return;
if(c=Af&&!c&&Pa(a,b.from,b.to))for(var d=c.length-1;0<=d;--d)Bf(a,{from:c[d].from,to:c[d].to,text:d?[""]:b.text,origin:b.origin});else Bf(a,b)}function Bf(a,b){if(1!=b.text.length||""!=b.text[0]||0!=K(b.from,b.to)){var c=fe(a,b);qf(a,b,c,a.cm?a.cm.curOp.id:NaN);Dc(a,b,c,X(a,b));var d=[];Fb(a,function(a,c){c||-1!=H(d,a.history)||(Cf(a.history,b),d.push(a.history));Dc(a,b,null,X(a,b))})}}function vd(a,b,c){if(!a.cm||!a.cm.state.suppressEdits||c){for(var d=a.history,e,h=a.sel,l="undo"==b?d.done:d.undone,
n="undo"==b?d.undone:d.done,r=0;r<l.length&&(e=l[r],c?!e.ranges||e.equals(a.sel):e.ranges);r++);if(r!=l.length){for(d.lastOrigin=d.lastSelOrigin=null;;)if(e=l.pop(),e.ranges){sd(e,n);if(c&&!e.equals(a.sel)){ua(a,e,{clearRedo:!1});return}h=e}else break;var m=[];sd(h,n);n.push({changes:m,generation:d.generation});d.generation=e.generation||++d.maxGeneration;var f=wa(a,"beforeChange")||a.cm&&wa(a.cm,"beforeChange");c=function(d){var c=e.changes[d];c.origin=b;if(f&&!zf(a,c,!1))return l.length=0,{};m.push(ie(a,
c));var h=d?fe(a,c):g(l);Dc(a,c,h,rf(a,c));!d&&a.cm&&a.cm.scrollIntoView({from:c.from,to:nb(c)});var n=[];Fb(a,function(a,b){b||-1!=H(n,a.history)||(Cf(a.history,c),n.push(a.history));Dc(a,c,null,rf(a,c))})};for(d=e.changes.length-1;0<=d;--d)if(h=c(d))return h.v}}}function Df(a,b){if(0!=b&&(a.first+=b,a.sel=new La(x(a.sel.ranges,function(a){return new V(z(a.anchor.line+b,a.anchor.ch),z(a.head.line+b,a.head.ch))}),a.sel.primIndex),a.cm)){Ba(a.cm,a.first,a.first-b,b);for(var c=a.cm.display,d=c.viewFrom;d<
c.viewTo;d++)mb(a.cm,d,"gutter")}}function Dc(a,b,c,d){if(a.cm&&!a.cm.curOp)return ra(a.cm,Dc)(a,b,c,d);if(b.to.line<a.first)Df(a,b.text.length-1-(b.to.line-b.from.line));else if(!(b.from.line>a.lastLine())){if(b.from.line<a.first){var e=b.text.length-1-(a.first-b.from.line);Df(a,e);b={from:z(a.first,0),to:z(b.to.line+e,b.to.ch),text:[g(b.text)],origin:b.origin}}e=a.lastLine();b.to.line>e&&(b={from:b.from,to:z(e,A(a,e).text.length),text:[b.text[0]],origin:b.origin});b.removed=S(a,b.from,b.to);c||
(c=fe(a,b));a.cm?Hg(a.cm,b,d):he(a,b,d);ud(a,c,$a)}}function Hg(a,b,c){var d=a.doc,e=a.display,h=b.from,l=b.to,n=!1,r=h.line;a.options.lineWrapping||(r=T(Da(A(d,h.line))),d.iter(r,l.line+1,function(a){if(a==e.maxLine)return n=!0}));-1<d.sel.contains(b.from,b.to)&&mc(a);he(d,b,c,Re(a));a.options.lineWrapping||(d.iter(r,h.line+b.text.length,function(a){var b=Mb(a);b>e.maxLineLength&&(e.maxLine=a,e.maxLineLength=b,e.maxLineChanged=!0,n=!1)}),n&&(a.curOp.updateMaxLine=!0));Id(d,h.line);Ac(a,400);c=b.text.length-
(l.line-h.line)-1;b.full?Ba(a):h.line!=l.line||1!=b.text.length||lf(a.doc,b)?Ba(a,h.line,l.line+1,c):mb(a,h.line,"text");c=wa(a,"changes");if((d=wa(a,"change"))||c)b={from:h,to:l,text:b.text,removed:b.removed,origin:b.origin},d&&ta(a,"change",a,b),c&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(b);a.display.selForContextMenu=null}function ac(a,b,c,d,e){d||(d=c);if(0>K(d,c)){var h=[d,c];c=h[0];d=h[1];h}"string"==typeof b&&(b=a.splitLines(b));$b(a,{from:c,to:d,text:b,origin:e})}function Ef(a,
b,c,d){c<a.line?a.line+=d:b<a.line&&(a.line=b,a.ch=0)}function Ff(a,b,c,d){for(var e=0;e<a.length;++e){var h=a[e],l=!0;if(h.ranges)for(h.copied||(h=a[e]=h.deepCopy(),h.copied=!0),l=0;l<h.ranges.length;l++)Ef(h.ranges[l].anchor,b,c,d),Ef(h.ranges[l].head,b,c,d);else{for(var n=0;n<h.changes.length;++n){var r=h.changes[n];if(c<r.from.line)r.from=z(r.from.line+d,r.from.ch),r.to=z(r.to.line+d,r.to.ch);else if(b<=r.to.line){l=!1;break}}l||(a.splice(0,e+1),e=0)}}}function Cf(a,b){var c=b.from.line,d=b.to.line,
e=b.text.length-(d-c)-1;Ff(a.done,c,d,e);Ff(a.undone,c,d,e)}function Ec(a,b,c,d){var e=b,h=b;"number"==typeof b?h=A(a,Math.max(a.first,Math.min(b,a.first+a.size-1))):e=T(b);if(null==e)return null;d(h,e)&&a.cm&&mb(a.cm,e,c);return h}function Fc(a){this.lines=a;this.parent=null;for(var b=0,c=0;c<a.length;++c)a[c].parent=this,b+=a[c].height;this.height=b}function Gc(a){this.children=a;for(var b=0,c=0,d=0;d<a.length;++d){var e=a[d];b+=e.chunkSize();c+=e.height;e.parent=this}this.size=b;this.height=c;
this.parent=null}function Ig(a,b,c,d){var e=new Hc(a,c,d),h=a.cm;h&&e.noHScroll&&(h.display.alignWidgets=!0);Ec(a,b,"widget",function(b){var d=b.widgets||(b.widgets=[]);null==e.insertAt?d.push(e):d.splice(Math.min(d.length-1,Math.max(0,e.insertAt)),0,e);e.line=b;h&&!Ea(a,b)&&(d=Ia(b)<a.scrollTop,Y(b,b.height+tc(e)),d&&md(h,e.height),h.curOp.forceUpdate=!0);return!0});ta(h,"lineWidgetAdded",h,e,"number"==typeof b?b:T(b));return e}function bc(a,b,c,d,e){if(d&&d.shared)return Jg(a,b,c,d,e);if(a.cm&&
!a.cm.curOp)return ra(a.cm,bc)(a,b,c,d,e);var h=new ob(a,e);e=K(b,c);d&&y(d,h,!1);if(0<e||0==e&&!1!==h.clearWhenEmpty)return h;h.replacedWith&&(h.collapsed=!0,h.widgetNode=w("span",[h.replacedWith],"CodeMirror-widget"),d.handleMouseEvents||h.widgetNode.setAttribute("cm-ignore-events","true"),d.insertLeft&&(h.widgetNode.insertLeft=!0));if(h.collapsed){if(N(a,b.line,b,c,h)||b.line!=c.line&&N(a,c.line,b,c,h))throw Error("Inserting collapsed marker partially overlapping an existing one");ib=!0}h.addToHistory&&
qf(a,{from:b,to:c,origin:"markText"},a.sel,NaN);var l=b.line,n=a.cm,r;a.iter(l,c.line+1,function(a){n&&h.collapsed&&!n.options.lineWrapping&&Da(a)==n.display.maxLine&&(r=!0);h.collapsed&&l!=b.line&&Y(a,0);var d=new Kb(h,l==b.line?b.ch:null,l==c.line?c.ch:null);a.markedSpans=a.markedSpans?a.markedSpans.concat([d]):[d];d.marker.attachLine(a);++l});h.collapsed&&a.iter(b.line,c.line+1,function(b){Ea(a,b)&&Y(b,0)});h.clearOnEnter&&L(h,"beforeCursorEnter",function(){return h.clear()});h.readOnly&&(Af=!0,
(a.history.done.length||a.history.undone.length)&&a.clearHistory());h.collapsed&&(h.id=++Gf,h.atomic=!0);if(n){r&&(n.curOp.updateMaxLine=!0);if(h.collapsed)Ba(n,b.line,c.line+1);else if(h.className||h.title||h.startStyle||h.endStyle||h.css)for(d=b.line;d<=c.line;d++)mb(n,d,"text");h.atomic&&wf(n.doc);ta(n,"markerAdded",n,h)}return h}function Jg(a,b,c,d,e){d=y(d);d.shared=!1;var h=[bc(a,b,c,d,e)],l=h[0],n=d.widgetNode;Fb(a,function(a){n&&(d.widgetNode=n.cloneNode(!0));h.push(bc(a,M(a,b),M(a,c),d,e));
for(var r=0;r<a.linked.length;++r)if(a.linked[r].isParent)return;l=g(h)});return new Ic(h,l)}function Hf(a){return a.findMarks(z(a.first,0),a.clipPos(z(a.lastLine())),function(a){return a.parent})}function Kg(a){for(var b=function(b){b=a[b];var d=[b.primary.doc];Fb(b.primary.doc,function(a){return d.push(a)});for(var c=0;c<b.markers.length;c++){var l=b.markers[c];-1==H(d,l.doc)&&(l.parent=null,b.markers.splice(c--,1))}},c=0;c<a.length;c++)b(c)}function Lg(a){var b=this;If(b);if(!ka(b,a)&&!fb(b.display,
a)){qa(a);R&&(Jf=+new Date);var c=Ab(b,a,!0),d=a.dataTransfer.files;if(c&&!b.isReadOnly())if(d&&d.length&&window.FileReader&&window.File)for(var e=d.length,h=Array(e),l=0,n=function(a,d){if(!b.options.allowDropFileTypes||-1!=H(b.options.allowDropFileTypes,a.type)){var n=new FileReader;n.onload=ra(b,function(){var a=n.result;/[\x00-\x08\x0e-\x1f]{2}/.test(a)&&(a="");h[d]=a;++l==e&&(c=M(b.doc,c),a={from:c,to:c,text:b.doc.splitLines(h.join(b.doc.lineSeparator())),origin:"paste"},$b(b.doc,a),tf(b.doc,
gb(c,nb(a))))});n.readAsText(a)}},r=0;r<e;++r)n(d[r],r);else if(b.state.draggingText&&-1<b.doc.sel.contains(c))b.state.draggingText(a),setTimeout(function(){return b.display.input.focus()},20);else try{if(n=a.dataTransfer.getData("Text")){b.state.draggingText&&!b.state.draggingText.copy&&(r=b.listSelections());ud(b.doc,gb(c,c));if(r)for(d=0;d<r.length;++d)ac(b.doc,"",r[d].anchor,r[d].head,"drag");b.replaceSelection(n,"around","paste");b.display.input.focus()}}catch(G){}}}function If(a){a.display.dragCursor&&
(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function Kf(a){if(document.getElementsByClassName)for(var b=document.getElementsByClassName("CodeMirror"),c=0;c<b.length;c++){var d=b[c].CodeMirror;d&&a(d)}}function Mg(){var a;L(window,"resize",function(){null==a&&(a=setTimeout(function(){a=null;Kf(Ng)},100))});L(window,"blur",function(){return Kf(xc)})}function Ng(a){var b=a.display;if(b.lastWrapHeight!=b.wrapper.clientHeight||b.lastWrapWidth!=b.wrapper.clientWidth)b.cachedCharWidth=
b.cachedTextHeight=b.cachedPaddingH=null,b.scrollbarsClipped=!1,a.setSize()}function Og(a){var b=a.split(/-(?!$)/);a=b[b.length-1];for(var c,d,e,h,l=0;l<b.length-1;l++){var n=b[l];if(/^(cmd|meta|m)$/i.test(n))h=!0;else if(/^a(lt)?$/i.test(n))c=!0;else if(/^(c|ctrl|control)$/i.test(n))d=!0;else if(/^s(hift)?$/i.test(n))e=!0;else throw Error("Unrecognized modifier name: "+n);}c&&(a="Alt-"+a);d&&(a="Ctrl-"+a);h&&(a="Cmd-"+a);e&&(a="Shift-"+a);return a}function Pg(a){var b={},c;for(c in a)if(a.hasOwnProperty(c)){var d=
a[c];if(!/^(name|fallthrough|(de|at)tach)$/.test(c)){if("..."!=d)for(var e=x(c.split(" "),Og),h=0;h<e.length;h++){if(h==e.length-1){var l=e.join(" ");var n=d}else l=e.slice(0,h+1).join(" "),n="...";var r=b[l];if(!r)b[l]=n;else if(r!=n)throw Error("Inconsistent bindings for "+l);}delete a[c]}}for(var m in b)a[m]=b[m];return a}function cc(a,b,c,d){b=wd(b);var e=b.call?b.call(a,d):b[a];if(!1===e)return"nothing";if("..."===e)return"multi";if(null!=e&&c(e))return"handled";if(b.fallthrough){if("[object Array]"!=
Object.prototype.toString.call(b.fallthrough))return cc(a,b.fallthrough,c,d);for(e=0;e<b.fallthrough.length;e++){var h=cc(a,b.fallthrough[e],c,d);if(h)return h}}}function Lf(a){a="string"==typeof a?a:pb[a.keyCode];return"Ctrl"==a||"Alt"==a||"Shift"==a||"Mod"==a}function Mf(a,b,c){var d=a;b.altKey&&"Alt"!=d&&(a="Alt-"+a);(Nf?b.metaKey:b.ctrlKey)&&"Ctrl"!=d&&(a="Ctrl-"+a);(Nf?b.ctrlKey:b.metaKey)&&"Cmd"!=d&&(a="Cmd-"+a);!c&&b.shiftKey&&"Shift"!=d&&(a="Shift-"+a);return a}function Of(a,b){if(Ta&&34==
a.keyCode&&a["char"])return!1;var c=pb[a.keyCode];if(null==c||a.altGraphKey)return!1;3==a.keyCode&&a.code&&(c=a.code);return Mf(c,a,b)}function wd(a){return"string"==typeof a?Jc[a]:a}function dc(a,b){for(var c=a.doc.sel.ranges,d=[],e=0;e<c.length;e++){for(var h=b(c[e]);d.length&&0>=K(h.from,g(d).to);){var l=d.pop();if(0>K(l.from,h.from)){h.from=l.from;break}}d.push(h)}Ga(a,function(){for(var b=d.length-1;0<=b;b--)ac(a.doc,"",d[b].from,d[b].to,"+delete");Vb(a)})}function me(a,b,c){b=ab(a.text,b+c,
c);return 0>b||b>a.text.length?null:b}function ne(a,b,c){a=me(a,b.ch,c);return null==a?null:new z(b.line,a,0>c?"after":"before")}function oe(a,b,c,d,e){if(a&&(a=Na(c,b.doc.direction))){a=0>e?g(a):a[0];var h=0>e==(1==a.level)?"after":"before";if(0<a.level||"rtl"==b.doc.direction){var l=xb(b,c);var n=0>e?c.text.length-1:0;var r=Ra(b,l,n).top;n=ma(function(a){return Ra(b,l,a).top==r},0>e==(1==a.level)?a.from:a.to-1,n);"before"==h&&(n=me(c,n,1))}else n=0>e?a.to:a.from;return new z(d,n,h)}return new z(d,
0>e?c.text.length:0,0>e?"before":"after")}function Qg(a,b,c,d){var e=Na(b,a.doc.direction);if(!e)return ne(b,c,d);c.ch>=b.text.length?(c.ch=b.text.length,c.sticky="before"):0>=c.ch&&(c.ch=0,c.sticky="after");var h=Xa(e,c.ch,c.sticky),l=e[h];if("ltr"==a.doc.direction&&0==l.level%2&&(0<d?l.to>c.ch:l.from<c.ch))return ne(b,c,d);var n=function(a,d){return me(b,a instanceof z?a.ch:a,d)},r,m=function(d){if(!a.options.lineWrapping)return{begin:0,end:b.text.length};r=r||xb(a,b);return Qe(a,b,r,d)},f=m("before"==
c.sticky?n(c,-1):c.ch);if("rtl"==a.doc.direction||1==l.level){var k=1==l.level==0>d,g=n(c,k?1:-1);if(null!=g&&(k?g<=l.to&&g<=f.end:g>=l.from&&g>=f.begin))return new z(c.line,g,k?"before":"after")}l=function(a,b,d){for(var h=function(a,b){return b?new z(c.line,n(a,1),"before"):new z(c.line,a,"after")};0<=a&&a<e.length;a+=b){var l=e[a],r=0<b==(1!=l.level),m=r?d.begin:n(d.end,-1);if(l.from<=m&&m<l.to)return h(m,r);m=r?l.from:n(l.to,-1);if(d.begin<=m&&m<d.end)return h(m,r)}};if(h=l(h+d,d,f))return h;
f=0<d?f.end:n(f.begin,-1);return null==f||0<d&&f==b.text.length||!(h=l(0<d?0:e.length-1,d,m(f)))?null:h}function Pf(a,b){var c=A(a.doc,b),d=Da(c);d!=c&&(b=T(d));return oe(!0,a,d,b,1)}function Qf(a,b){var c=Pf(a,b.line),d=A(a.doc,c.line),e=Na(d,a.doc.direction);return e&&0!=e[0].level?c:(d=Math.max(0,d.text.search(/\S/)),z(c.line,b.line==c.line&&b.ch<=d&&b.ch?0:d,c.sticky))}function xd(a,b,c){if("string"==typeof b&&(b=Kc[b],!b))return!1;a.display.input.ensurePolled();var d=a.display.shift,e=!1;try{a.isReadOnly()&&
(a.state.suppressEdits=!0),c&&(a.display.shift=!1),e=b(a)!=yd}finally{a.display.shift=d,a.state.suppressEdits=!1}return e}function Lc(a,b,c,d){var e=a.state.keySeq;if(e){if(Lf(b))return"handled";/'$/.test(b)?a.state.keySeq=null:Rg.set(50,function(){a.state.keySeq==e&&(a.state.keySeq=null,a.display.input.reset())});if(Rf(a,e+" "+b,c,d))return!0}return Rf(a,b,c,d)}function Rf(a,b,c,d){a:{for(var e=0;e<a.state.keyMaps.length;e++){var h=cc(b,a.state.keyMaps[e],d,a);if(h){d=h;break a}}d=a.options.extraKeys&&
cc(b,a.options.extraKeys,d,a)||cc(b,a.options.keyMap,d,a)}"multi"==d&&(a.state.keySeq=b);"handled"==d&&ta(a,"keyHandled",a,b,c);if("handled"==d||"multi"==d)qa(c),Xd(a);return!!d}function Sf(a,b){var c=Of(b,!0);return c?b.shiftKey&&!a.state.keySeq?Lc(a,"Shift-"+c,b,function(b){return xd(a,b,!0)})||Lc(a,c,b,function(b){if("string"==typeof b?/^go[A-Z]/.test(b):b.motion)return xd(a,b)}):Lc(a,c,b,function(b){return xd(a,b)}):!1}function Sg(a,b,c){return Lc(a,"'"+c+"'",b,function(b){return xd(a,b,!0)})}
function Tf(a){this.curOp.focus=D();if(!ka(this,a)){R&&11>fa&&27==a.keyCode&&(a.returnValue=!1);var b=a.keyCode;this.display.shift=16==b||a.shiftKey;var c=Sf(this,a);Ta&&(pe=c?b:null,!c&&88==b&&!Tg&&(Qa?a.metaKey:a.ctrlKey)&&this.replaceSelection("",null,"cut"));18!=b||/\bCodeMirror-crosshair\b/.test(this.display.lineDiv.className)||Ug(this)}}function Ug(a){function b(a){18!=a.keyCode&&a.altKey||(Bb(c,"CodeMirror-crosshair"),ja(document,"keyup",b),ja(document,"mouseover",b))}var c=a.display.lineDiv;
J(c,"CodeMirror-crosshair");L(document,"keyup",b);L(document,"mouseover",b)}function Uf(a){16==a.keyCode&&(this.doc.sel.shift=!1);ka(this,a)}function Vf(a){if(!(fb(this.display,a)||ka(this,a)||a.ctrlKey&&!a.altKey||Qa&&a.metaKey)){var b=a.keyCode,c=a.charCode;if(Ta&&b==pe)pe=null,qa(a);else if(!Ta||a.which&&!(10>a.which)||!Sf(this,a))if(b=String.fromCharCode(null==c?b:c),"\b"!=b&&!Sg(this,a,b))this.display.input.onKeyPress(a)}}function Vg(a,b){var c=+new Date;if(Mc&&Mc.compare(c,a,b))return Nc=Mc=
null,"triple";if(Nc&&Nc.compare(c,a,b))return Mc=new qe(c,a,b),Nc=null,"double";Nc=new qe(c,a,b);Mc=null;return"single"}function Wf(a){var b=this.display;if(!(ka(this,a)||b.activeTouch&&b.input.supportsTouch()))if(b.input.ensurePolled(),b.shift=a.shiftKey,fb(b,a))va||(b.scroller.draggable=!1,setTimeout(function(){return b.scroller.draggable=!0},100));else if(!zd(this,a,"gutterClick",!0)){var c=Ab(this,a),d=tb(a),e=c?Vg(c,d):"single";window.focus();1==d&&this.state.selectingText&&this.state.selectingText(a);
c&&Wg(this,d,c,e,a)||(1==d?c?Xg(this,c,e,a):(a.target||a.srcElement)==b.scroller&&qa(a):2==d?(c&&td(this.doc,c),setTimeout(function(){return b.input.focus()},20)):3==d&&(re?Xf(this,a):Ve(this)))}}function Wg(a,b,c,d,e){var h="Click";"double"==d?h="Double"+h:"triple"==d&&(h="Triple"+h);return Lc(a,Mf((1==b?"Left":2==b?"Middle":"Right")+h,e),e,function(b){"string"==typeof b&&(b=Kc[b]);if(!b)return!1;var d=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),d=b(a,c)!=yd}finally{a.state.suppressEdits=!1}return d})}
function Xg(a,b,c,d){R?setTimeout(W(Ue,a),0):a.curOp.focus=D();var e=a.getOption("configureMouse");e=e?e(a,c,d):{};null==e.unit&&(e.unit=(Yg?d.shiftKey&&d.metaKey:d.altKey)?"rectangle":"single"==c?"char":"double"==c?"word":"line");if(null==e.extend||a.doc.extend)e.extend=a.doc.extend||d.shiftKey;null==e.addNew&&(e.addNew=Qa?d.metaKey:d.ctrlKey);null==e.moveOnDrag&&(e.moveOnDrag=!(Qa?d.altKey:d.ctrlKey));var h=a.doc.sel,l;a.options.dragDrop&&Zg&&!a.isReadOnly()&&"single"==c&&-1<(l=h.contains(b))&&
(0>K((l=h.ranges[l]).from(),b)||0<b.xRel)&&(0<K(l.to(),b)||0>b.xRel)?$g(a,d,b,e):ah(a,d,b,e)}function $g(a,b,c,d){var e=a.display,h=!1,l=ra(a,function(b){va&&(e.scroller.draggable=!1);a.state.draggingText=!1;ja(document,"mouseup",l);ja(document,"mousemove",n);ja(e.scroller,"dragstart",r);ja(e.scroller,"drop",l);h||(qa(b),d.addNew||td(a.doc,c,null,null,d.extend),va||R&&9==fa?setTimeout(function(){document.body.focus();e.input.focus()},20):e.input.focus())}),n=function(a){h=h||10<=Math.abs(b.clientX-
a.clientX)+Math.abs(b.clientY-a.clientY)},r=function(){return h=!0};va&&(e.scroller.draggable=!0);a.state.draggingText=l;l.copy=!d.moveOnDrag;e.scroller.dragDrop&&e.scroller.dragDrop();L(document,"mouseup",l);L(document,"mousemove",n);L(e.scroller,"dragstart",r);L(e.scroller,"drop",l);Ve(a);setTimeout(function(){return e.input.focus()},20)}function Yf(a,b,c){if("char"==c)return new V(b,b);if("word"==c)return a.findWordAt(b);if("line"==c)return new V(z(b.line,0),M(a.doc,z(b.line+1,0)));a=c(a,b);return new V(a.from,
a.to)}function ah(a,b,c,d){function e(b){if(0!=K(p,b))if(p=b,"rectangle"==d.unit){var e=[],h=a.options.tabSize,l=k(A(r,c.line).text,c.ch,h),n=k(A(r,b.line).text,b.ch,h),f=Math.min(l,n);l=Math.max(l,n);n=Math.min(c.line,b.line);for(var E=Math.min(a.lastLine(),Math.max(c.line,b.line));n<=E;n++){var x=A(r,n).text,G=U(x,f,h);f==l?e.push(new V(z(n,G),z(n,G))):x.length>G&&e.push(new V(z(n,G),z(n,U(x,l,h))))}e.length||e.push(new V(c,c));ua(r,Ua(m.ranges.slice(0,g).concat(e),g),{origin:"*mouse",scroll:!1});
a.scrollIntoView(b)}else e=u,f=Yf(a,b,d.unit),b=e.anchor,0<K(f.anchor,b)?(h=f.head,b=Va(e.from(),f.anchor)):(h=f.anchor,b=pa(e.to(),f.head)),e=m.ranges.slice(0),e[g]=bh(a,new V(M(r,b),h)),ua(r,Ua(e,g),se)}function h(b){var c=++x,l=Ab(a,b,!0,"rectangle"==d.unit);if(l)if(0!=K(l,p)){a.curOp.focus=D();e(l);var m=Zd(n,r);(l.line>=m.to||l.line<m.from)&&setTimeout(ra(a,function(){x==c&&h(b)}),150)}else{var f=b.clientY<E.top?-20:b.clientY>E.bottom?20:0;f&&setTimeout(ra(a,function(){x==c&&(n.scroller.scrollTop+=
f,h(b))}),50)}}function l(b){a.state.selectingText=!1;x=Infinity;qa(b);n.input.focus();ja(document,"mousemove",N);ja(document,"mouseup",q);r.history.lastSelOrigin=null}var n=a.display,r=a.doc;qa(b);var m=r.sel,f=m.ranges;if(d.addNew&&!d.extend){var g=r.sel.contains(c);var u=-1<g?f[g]:new V(c,c)}else u=r.sel.primary(),g=r.sel.primIndex;"rectangle"==d.unit?(d.addNew||(u=new V(c,c)),c=Ab(a,b,!0,!0),g=-1):(b=Yf(a,c,d.unit),u=d.extend?je(u,b.anchor,b.head,d.extend):b);d.addNew?-1==g?(g=f.length,ua(r,Ua(f.concat([u]),
g),{scroll:!1,origin:"*mouse"})):1<f.length&&f[g].empty()&&"char"==d.unit&&!d.extend?(ua(r,Ua(f.slice(0,g).concat(f.slice(g+1)),0),{scroll:!1,origin:"*mouse"}),m=r.sel):ke(r,g,u,se):(g=0,ua(r,new La([u],0),se),m=r.sel);var p=c,E=n.wrapper.getBoundingClientRect(),x=0,N=ra(a,function(a){tb(a)?h(a):l(a)}),q=ra(a,l);a.state.selectingText=q;L(document,"mousemove",N);L(document,"mouseup",q)}function bh(a,b){var c=b.anchor,d=b.head,e=A(a.doc,c.line);if(0==K(c,d)&&c.sticky==d.sticky)return b;e=Na(e);if(!e)return b;
var h=Xa(e,c.ch,c.sticky),l=e[h];if(l.from!=c.ch&&l.to!=c.ch)return b;var n=h+(l.from==c.ch==(1!=l.level)?0:1);if(0==n||n==e.length)return b;if(d.line!=c.line)var m=0<(d.line-c.line)*("ltr"==a.doc.direction?1:-1);else m=Xa(e,d.ch,d.sticky),h=m-h||(d.ch-c.ch)*(1==l.level?-1:1),m=m==n-1||m==n?0>h:0<h;e=e[n+(m?-1:0)];e=(n=m==(1==e.level))?e.from:e.to;n=n?"after":"before";return c.ch==e&&c.sticky==n?b:new V(new z(c.line,e,n),d)}function zd(a,b,c,d){if(b.touches){var e=b.touches[0].clientX;var h=b.touches[0].clientY}else try{e=
b.clientX,h=b.clientY}catch(r){return!1}if(e>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;d&&qa(b);d=a.display;var l=d.lineDiv.getBoundingClientRect();if(h>l.bottom||!wa(a,c))return Nb(b);h-=l.top-d.viewOffset;for(l=0;l<a.options.gutters.length;++l){var n=d.gutters.childNodes[l];if(n&&n.getBoundingClientRect().right>=e)return e=bb(a.doc,h),ca(a,c,a,e,a.options.gutters[l],b),Nb(b)}}function Xf(a,b){var c;(c=fb(a.display,b))||(c=wa(a,"gutterContextMenu")?zd(a,b,"gutterContextMenu",
!1):!1);if(!c&&!ka(a,b,"contextmenu"))a.display.input.onContextMenu(b)}function Zf(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-");vc(a)}function Oc(a){ff(a);Ba(a);Xe(a)}function ch(a,b,c){!b!=!(c&&c!=ec)&&(c=a.display.dragFunctions,b=b?L:ja,b(a.display.scroller,"dragstart",c.start),b(a.display.scroller,"dragenter",c.enter),b(a.display.scroller,"dragover",c.over),b(a.display.scroller,"dragleave",c.leave),b(a.display.scroller,
"drop",c.drop))}function dh(a){a.options.lineWrapping?(J(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(Bb(a.display.wrapper,"CodeMirror-wrap"),kc(a));Wd(a);Ba(a);vc(a);setTimeout(function(){return Wb(a)},100)}function ia(a,b){var c=this;if(!(this instanceof ia))return new ia(a,b);this.options=b=b?y(b):{};y($f,b,!1);ee(b);var d=b.value;"string"==typeof d&&(d=new Ca(d,b.mode,null,b.lineSeparator,b.direction));this.doc=d;var e=new ia.inputStyles[b.inputStyle](this);
e=this.display=new za(a,d,e);e.wrapper.CodeMirror=this;ff(this);Zf(this);b.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap");bf(this);this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new Gb,keySeq:null,specialChars:null};b.autofocus&&!gc&&e.input.focus();R&&11>fa&&setTimeout(function(){return c.display.input.reset(!0)},20);eh(this);ag||(Mg(),ag=!0);
Db(this);this.curOp.forceUpdate=!0;mf(this,d);b.autofocus&&!gc||this.hasFocus()?setTimeout(W(Yd,this),20):xc(this);for(var h in Ad)if(Ad.hasOwnProperty(h))Ad[h](c,b[h],ec);Ye(this);b.finishInit&&b.finishInit(this);for(d=0;d<te.length;++d)te[d](c);Eb(this);va&&b.lineWrapping&&"optimizelegibility"==getComputedStyle(e.lineDiv).textRendering&&(e.lineDiv.style.textRendering="auto")}function eh(a){function b(){d.activeTouch&&(e=setTimeout(function(){return d.activeTouch=null},1E3),h=d.activeTouch,h.end=
+new Date)}function c(a,b){if(null==b.left)return!0;var d=b.left-a.left,c=b.top-a.top;return 400<d*d+c*c}var d=a.display;L(d.scroller,"mousedown",ra(a,Wf));R&&11>fa?L(d.scroller,"dblclick",ra(a,function(b){if(!ka(a,b)){var d=Ab(a,b);!d||zd(a,b,"gutterClick",!0)||fb(a.display,b)||(qa(b),b=a.findWordAt(d),td(a.doc,b.anchor,b.head))}})):L(d.scroller,"dblclick",function(b){return ka(a,b)||qa(b)});re||L(d.scroller,"contextmenu",function(b){return Xf(a,b)});var e,h={end:0};L(d.scroller,"touchstart",function(b){var c;
if(c=!ka(a,b))1!=b.touches.length?c=!1:(c=b.touches[0],c=1>=c.radiusX&&1>=c.radiusY),c=!c;c&&!zd(a,b,"gutterClick",!0)&&(d.input.ensurePolled(),clearTimeout(e),c=+new Date,d.activeTouch={start:c,moved:!1,prev:300>=c-h.end?h:null},1==b.touches.length&&(d.activeTouch.left=b.touches[0].pageX,d.activeTouch.top=b.touches[0].pageY))});L(d.scroller,"touchmove",function(){d.activeTouch&&(d.activeTouch.moved=!0)});L(d.scroller,"touchend",function(e){var h=d.activeTouch;if(h&&!fb(d,e)&&null!=h.left&&!h.moved&&
300>new Date-h.start){var l=a.coordsChar(d.activeTouch,"page");h=!h.prev||c(h,h.prev)?new V(l,l):!h.prev.prev||c(h,h.prev.prev)?a.findWordAt(l):new V(z(l.line,0),M(a.doc,z(l.line+1,0)));a.setSelection(h.anchor,h.head);a.focus();qa(e)}b()});L(d.scroller,"touchcancel",b);L(d.scroller,"scroll",function(){d.scroller.clientHeight&&(zc(a,d.scroller.scrollTop),Cb(a,d.scroller.scrollLeft,!0),ca(a,"scroll",a))});L(d.scroller,"mousewheel",function(b){return hf(a,b)});L(d.scroller,"DOMMouseScroll",function(b){return hf(a,
b)});L(d.wrapper,"scroll",function(){return d.wrapper.scrollTop=d.wrapper.scrollLeft=0});d.dragFunctions={enter:function(b){ka(a,b)||sb(b)},over:function(b){if(!ka(a,b)){var d=Ab(a,b);if(d){var c=document.createDocumentFragment();Te(a,d,c);a.display.dragCursor||(a.display.dragCursor=t("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv));C(a.display.dragCursor,c)}sb(b)}},start:function(b){if(R&&(!a.state.draggingText||100>
+new Date-Jf))sb(b);else if(!ka(a,b)&&!fb(a.display,b)&&(b.dataTransfer.setData("Text",a.getSelection()),b.dataTransfer.effectAllowed="copyMove",b.dataTransfer.setDragImage&&!bg)){var d=t("img",null,null,"position: fixed; left: 0; top: 0;");d.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";Ta&&(d.width=d.height=1,a.display.wrapper.appendChild(d),d._top=d.offsetTop);b.dataTransfer.setDragImage(d,0,0);Ta&&d.parentNode.removeChild(d)}},drop:ra(a,Lg),leave:function(b){ka(a,
b)||If(a)}};var l=d.input.getField();L(l,"keyup",function(b){return Uf.call(a,b)});L(l,"keydown",ra(a,Tf));L(l,"keypress",ra(a,Vf));L(l,"focus",function(b){return Yd(a,b)});L(l,"blur",function(b){return xc(a,b)})}function Pc(a,b,c,d){var e=a.doc,h;null==c&&(c="add");"smart"==c&&(e.mode.indent?h=Ja(a,b).state:c="prev");var l=a.options.tabSize,n=A(e,b),m=k(n.text,null,l);n.stateAfter&&(n.stateAfter=null);var f=n.text.match(/^\s*/)[0];if(!d&&!/\S/.test(n.text)){var g=0;c="not"}else if("smart"==c&&(g=
e.mode.indent(h,n.text.slice(f.length),n.text),g==yd||150<g)){if(!d)return;c="prev"}"prev"==c?g=b>e.first?k(A(e,b-1).text,null,l):0:"add"==c?g=m+a.options.indentUnit:"subtract"==c?g=m-a.options.indentUnit:"number"==typeof c&&(g=m+c);g=Math.max(0,g);c="";d=0;if(a.options.indentWithTabs)for(a=Math.floor(g/l);a;--a)d+=l,c+="\t";d<g&&(c+=F(g-d));if(c!=f)return ac(e,c,z(b,0),z(b,f.length),"+input"),n.stateAfter=null,!0;for(l=0;l<e.sel.ranges.length;l++)if(n=e.sel.ranges[l],n.head.line==b&&n.head.ch<f.length){b=
z(b,f.length);ke(e,l,new V(b,b));break}}function ue(a,b,c,d,e){var h=a.doc;a.display.shift=!1;d||(d=h.sel);var l=a.state.pasteIncoming||"paste"==e,n=ve(b),m=null;if(l&&1<d.ranges.length)if(Ha&&Ha.text.join("\n")==b){if(0==d.ranges.length%Ha.text.length){m=[];for(var f=0;f<Ha.text.length;f++)m.push(h.splitLines(Ha.text[f]))}}else n.length==d.ranges.length&&a.options.pasteLinesPerSelection&&(m=x(n,function(a){return[a]}));for(f=d.ranges.length-1;0<=f;f--){var k=d.ranges[f];var u=k.from(),p=k.to();k.empty()&&
(c&&0<c?u=z(u.line,u.ch-c):a.state.overwrite&&!l?p=z(p.line,Math.min(A(h,p.line).text.length,p.ch+g(n).length)):Ha&&Ha.lineWise&&Ha.text.join("\n")==b&&(u=p=z(u.line,0)));k=a.curOp.updateInput;u={from:u,to:p,text:m?m[f%m.length]:n,origin:e||(l?"paste":a.state.cutIncoming?"cut":"+input")};$b(a.doc,u);ta(a,"inputRead",a,u)}b&&!l&&cg(a,b);Vb(a);a.curOp.updateInput=k;a.curOp.typing=!0;a.state.pasteIncoming=a.state.cutIncoming=!1}function dg(a,b){var c=a.clipboardData&&a.clipboardData.getData("Text");
if(c)return a.preventDefault(),b.isReadOnly()||b.options.disableInput||Ga(b,function(){return ue(b,c,0,null,"paste")}),!0}function cg(a,b){if(a.options.electricChars&&a.options.smartIndent)for(var c=a.doc.sel,d=c.ranges.length-1;0<=d;d--){var e=c.ranges[d];if(!(100<e.head.ch||d&&c.ranges[d-1].head.line==e.head.line)){var h=a.getModeAt(e.head),l=!1;if(h.electricChars)for(var n=0;n<h.electricChars.length;n++){if(-1<b.indexOf(h.electricChars.charAt(n))){l=Pc(a,e.head.line,"smart");break}}else h.electricInput&&
h.electricInput.test(A(a.doc,e.head.line).text.slice(0,e.head.ch))&&(l=Pc(a,e.head.line,"smart"));l&&ta(a,"electricInput",a,e.head.line)}}}function eg(a){for(var b=[],c=[],d=0;d<a.doc.sel.ranges.length;d++){var e=a.doc.sel.ranges[d].head.line;e={anchor:z(e,0),head:z(e+1,0)};c.push(e);b.push(a.getRange(e.anchor,e.head))}return{text:b,ranges:c}}function fg(a,b){a.setAttribute("autocorrect","off");a.setAttribute("autocapitalize","off");a.setAttribute("spellcheck",!!b)}function gg(){var a=t("textarea",
null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),b=t("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");va?a.style.width="1000px":a.setAttribute("wrap","off");Qc&&(a.style.border="1px solid black");fg(a);return b}function we(a,b,c,d,e){function h(d){var h=e?Qg(a.cm,m,b,c):ne(m,b,c);if(null==h){if(d=!d)d=b.line+c,d<a.first||d>=a.first+a.size?d=!1:(b=new z(d,b.ch,b.sticky),d=m=A(a,d));if(d)b=oe(e,a.cm,m,b.line,c);else return!1}else b=
h;return!0}var l=b,n=c,m=A(a,b.line);if("char"==d)h();else if("column"==d)h(!0);else if("word"==d||"group"==d){var f=null;d="group"==d;for(var g=a.cm&&a.cm.getHelper(b,"wordChars"),k=!0;!(0>c)||h(!k);k=!1){var u=m.text.charAt(b.ch)||"\n";u=Q(u,g)?"w":d&&"\n"==u?"n":!d||/\s/.test(u)?null:"p";!d||k||u||(u="s");if(f&&f!=u){0>c&&(c=1,h(),b.sticky="after");break}u&&(f=u);if(0<c&&!h(!k))break}}n=le(a,b,l,n,!0);ic(l,n)&&(n.hitSide=!0);return n}function hg(a,b,c,d){var e=a.doc,h=b.left;if("page"==d){var l=
Math.max(Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight)-.5*yb(a.display),3);l=(0<c?b.bottom:b.top)+c*l}else"line"==d&&(l=0<c?b.bottom+3:b.top-3);for(;;){b=Td(a,h,l);if(!b.outside)break;if(0>c?0>=l:l>=e.height){b.hitSide=!0;break}l+=5*c}return b}function ig(a,b){var c=Nd(a,b.line);if(!c||c.hidden)return null;var d=A(a.doc,b.line);c=Ge(c,d,b.line);d=Na(d,a.doc.direction);var e="left";d&&(e=Xa(d,b.ch)%2?"right":"left");c=He(c.map,b.ch,e);c.offset="right"==
c.collapse?c.end:c.start;return c}function fh(a){for(;a;a=a.parentNode)if(/CodeMirror-gutter-wrapper/.test(a.className))return!0;return!1}function fc(a,b){b&&(a.bad=!0);return a}function gh(a,b,c,d,e){function h(a){return function(b){return b.id==a}}function l(a){a&&(f&&(m+=g,f=!1),m+=a)}function n(b){if(1==b.nodeType){var c=b.getAttribute("cm-text");if(null!=c)l(c||b.textContent.replace(/\u200b/g,""));else{c=b.getAttribute("cm-marker");var r;if(c)b=a.findMarks(z(d,0),z(e+1,0),h(+c)),b.length&&(r=
b[0].find(0))&&l(S(a.doc,r.from,r.to).join(g));else if("false"!=b.getAttribute("contenteditable")){(r=/^(pre|div|p)$/i.test(b.nodeName))&&f&&(m+=g,f=!1);for(c=0;c<b.childNodes.length;c++)n(b.childNodes[c]);r&&(f=!0)}}}else 3==b.nodeType&&l(b.nodeValue)}for(var m="",f=!1,g=a.doc.lineSeparator();;){n(b);if(b==c)break;b=b.nextSibling}return m}function Bd(a,b,c){if(b==a.display.lineDiv){var d=a.display.lineDiv.childNodes[c];if(!d)return fc(a.clipPos(z(a.display.viewTo-1)),!0);b=null;c=0}else for(d=b;;d=
d.parentNode){if(!d||d==a.display.lineDiv)return null;if(d.parentNode&&d.parentNode==a.display.lineDiv)break}for(var e=0;e<a.display.view.length;e++){var h=a.display.view[e];if(h.node==d)return hh(h,b,c)}}function hh(a,b,c){function d(b,d,c){for(var e=-1;e<(f?f.length:0);e++)for(var h=0>e?m.map:f[e],l=0;l<h.length;l+=3){var n=h[l+2];if(n==b||n==d){d=T(0>e?a.line:a.rest[e]);e=h[l]+c;if(0>c||n!=b)e=h[l+(c?1:0)];return z(d,e)}}}var e=a.text.firstChild,h=!1;if(!b||!v(e,b))return fc(z(T(a.line),0),!0);
if(b==e&&(h=!0,b=e.childNodes[c],c=0,!b))return c=a.rest?g(a.rest):a.line,fc(z(T(c),c.text.length),h);var l=3==b.nodeType?b:null,n=b;l||1!=b.childNodes.length||3!=b.firstChild.nodeType||(l=b.firstChild,c&&(c=l.nodeValue.length));for(;n.parentNode!=e;)n=n.parentNode;var m=a.measure,f=m.maps;if(b=d(l,n,c))return fc(b,h);e=n.nextSibling;for(l=l?l.nodeValue.length-c:0;e;e=e.nextSibling){if(b=d(e,e.firstChild,0))return fc(z(b.line,b.ch-l),h);l+=e.textContent.length}for(n=n.previousSibling;n;n=n.previousSibling){if(b=
d(n,n.firstChild,-1))return fc(z(b.line,b.ch+c),h);c+=n.textContent.length}}var ya=navigator.userAgent,jg=navigator.platform,hb=/gecko\/\d/i.test(ya),kg=/MSIE \d/.test(ya),lg=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ya),Rc=/Edge\/(\d+)/.exec(ya),R=kg||lg||Rc,fa=R&&(kg?document.documentMode||6:+(Rc||lg)[1]),va=!Rc&&/WebKit\//.test(ya),ih=va&&/Qt\/\d+\.\d+/.test(ya),hd=!Rc&&/Chrome\//.test(ya),Ta=/Opera\//.test(ya),bg=/Apple Computer/.test(navigator.vendor),jh=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ya),
Ag=/PhantomJS/.test(ya),Qc=!Rc&&/AppleWebKit/.test(ya)&&/Mobile\/\w+/.test(ya),id=/Android/.test(ya),gc=Qc||id||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ya),Qa=Qc||/Mac/.test(jg),Yg=/\bCrOS\b/.test(ya),kh=/win/i.test(jg),Hb=Ta&&ya.match(/Version\/(\d*\.\d*)/);Hb&&(Hb=Number(Hb[1]));Hb&&15<=Hb&&(Ta=!1,va=!0);var Nf=Qa&&(ih||Ta&&(null==Hb||12.11>Hb)),re=hb||R&&9<=fa,Bb=function(a,b){var c=a.className,d=q(b).exec(c);if(d){var e=c.slice(d.index+d[0].length);a.className=c.slice(0,d.index)+
(e?d[1]+e:"")}};var qc=document.createRange?function(a,b,c,d){var e=document.createRange();e.setEnd(d||a,c);e.setStart(a,b);return e}:function(a,b,c){var d=document.body.createTextRange();try{d.moveToElementText(a.parentNode)}catch(e){return d}d.collapse(!0);d.moveEnd("character",c);d.moveStart("character",b);return d};var Sc=function(a){a.select()};Qc?Sc=function(a){a.selectionStart=0;a.selectionEnd=a.value.length}:R&&(Sc=function(a){try{a.select()}catch(b){}});var Gb=function(){this.id=null};Gb.prototype.set=
function(a,b){clearTimeout(this.id);this.id=setTimeout(b,a)};var yd={toString:function(){return"CodeMirror.Pass"}},$a={scroll:!1},se={origin:"*mouse"},Tc={origin:"+move"},Yc=[""],mg=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,ng=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,
Af=!1,ib=!1,lc=null,og=function(){function a(a){return 247>=a?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(a):1424<=a&&1524>=a?"R":1536<=a&&1785>=a?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(a-
1536):1774<=a&&2220>=a?"r":8192<=a&&8203>=a?"w":8204==a?"b":"L"}function b(a,b,d){this.level=a;this.from=b;this.to=d}var c=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,d=/[stwN]/,e=/[LRr]/,h=/[Lb1n]/,l=/[1n]/;return function(n,m){var f="ltr"==m?"L":"R";if(0==n.length||"ltr"==m&&!c.test(n))return!1;for(var r=n.length,k=[],u=0;u<r;++u)k.push(a(n.charCodeAt(u)));u=0;for(var p=f;u<r;++u){var E=k[u];"m"==E?k[u]=p:p=E}u=0;for(p=f;u<r;++u)E=k[u],"1"==E&&"r"==p?k[u]="n":e.test(E)&&(p=E,"r"==E&&(k[u]="R"));
u=1;for(p=k[0];u<r-1;++u)E=k[u],"+"==E&&"1"==p&&"1"==k[u+1]?k[u]="1":","!=E||p!=k[u+1]||"1"!=p&&"n"!=p||(k[u]=p),p=E;for(u=0;u<r;++u)if(p=k[u],","==p)k[u]="N";else if("%"==p){for(p=u+1;p<r&&"%"==k[p];++p);for(E=u&&"!"==k[u-1]||p<r&&"1"==k[p]?"1":"N";u<p;++u)k[u]=E;u=p-1}u=0;for(p=f;u<r;++u)E=k[u],"L"==p&&"1"==E?k[u]="L":e.test(E)&&(p=E);for(p=0;p<r;++p)if(d.test(k[p])){for(u=p+1;u<r&&d.test(k[u]);++u);E="L"==(p?k[p-1]:f);for(E=E==("L"==(u<r?k[u]:f))?E?"L":"R":f;p<u;++p)k[p]=E;p=u-1}f=[];var x;for(u=
0;u<r;)if(h.test(k[u])){p=u;for(++u;u<r&&h.test(k[u]);++u);f.push(new b(0,p,u))}else{var N=u;p=f.length;for(++u;u<r&&"L"!=k[u];++u);for(E=N;E<u;)if(l.test(k[E])){N<E&&f.splice(p,0,new b(1,N,E));N=E;for(++E;E<u&&l.test(k[E]);++E);f.splice(p,0,new b(2,N,E));N=E}else++E;N<u&&f.splice(p,0,new b(1,N,u))}"ltr"==m&&(1==f[0].level&&(x=n.match(/^\s+/))&&(f[0].from=x[0].length,f.unshift(new b(0,0,x[0].length))),1==g(f).level&&(x=n.match(/\s+$/))&&(g(f).to-=x[0].length,f.push(new b(0,r-x[0].length,r))));return"rtl"==
m?f.reverse():f}}(),$c=[],L=function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent?a.attachEvent("on"+b,c):(a=a._handlers||(a._handlers={}),a[b]=(a[b]||$c).concat(c))},Zg=function(){if(R&&9>fa)return!1;var a=t("div");return"draggable"in a||"dragDrop"in a}(),Fd,Jd,ve=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length;b<=d;){var e=a.indexOf("\n",b);-1==e&&(e=a.length);var h=a.slice(b,"\r"==a.charAt(e-1)?e-1:e),l=h.indexOf("\r");-1!=l?(c.push(h.slice(0,l)),b+=
l+1):(c.push(h),b=e+1)}return c}:function(a){return a.split(/\r\n?|\n/)},lh=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},Tg=function(){var a=t("div");if("oncopy"in a)return!0;a.setAttribute("oncopy","return;");return"function"==typeof a.oncopy}(),Pd=null,Hd={},Ob={},Pb={},la=function(a,b,c){this.pos=this.start=
0;this.string=a;this.tabSize=b||8;this.lineStart=this.lastColumnPos=this.lastColumnValue=0;this.lineOracle=c};la.prototype.eol=function(){return this.pos>=this.string.length};la.prototype.sol=function(){return this.pos==this.lineStart};la.prototype.peek=function(){return this.string.charAt(this.pos)||void 0};la.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)};la.prototype.eat=function(a){var b=this.string.charAt(this.pos);if("string"==typeof a?b==a:b&&
(a.test?a.test(b):a(b)))return++this.pos,b};la.prototype.eatWhile=function(a){for(var b=this.pos;this.eat(a););return this.pos>b};la.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a};la.prototype.skipToEnd=function(){this.pos=this.string.length};la.prototype.skipTo=function(a){a=this.string.indexOf(a,this.pos);if(-1<a)return this.pos=a,!0};la.prototype.backUp=function(a){this.pos-=a};la.prototype.column=function(){this.lastColumnPos<
this.start&&(this.lastColumnValue=k(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start);return this.lastColumnValue-(this.lineStart?k(this.string,this.lineStart,this.tabSize):0)};la.prototype.indentation=function(){return k(this.string,null,this.tabSize)-(this.lineStart?k(this.string,this.lineStart,this.tabSize):0)};la.prototype.match=function(a,b,c){if("string"==typeof a){var d=function(a){return c?a.toLowerCase():a},e=this.string.substr(this.pos,
a.length);if(d(e)==d(a))return!1!==b&&(this.pos+=a.length),!0}else{if((a=this.string.slice(this.pos).match(a))&&0<a.index)return null;a&&!1!==b&&(this.pos+=a[0].length);return a}};la.prototype.current=function(){return this.string.slice(this.start,this.pos)};la.prototype.hideFirstChars=function(a,b){this.lineStart+=a;try{return b()}finally{this.lineStart-=a}};la.prototype.lookAhead=function(a){var b=this.lineOracle;return b&&b.lookAhead(a)};la.prototype.baseToken=function(){var a=this.lineOracle;
return a&&a.baseToken(this.pos)};var ed=function(a,b){this.state=a;this.lookAhead=b},Ya=function(a,b,c,d){this.state=b;this.doc=a;this.line=c;this.maxLookAhead=d||0;this.baseTokens=null;this.baseTokenPos=1};Ya.prototype.lookAhead=function(a){var b=this.doc.getLine(this.line+a);null!=b&&a>this.maxLookAhead&&(this.maxLookAhead=a);return b};Ya.prototype.baseToken=function(a){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=a;)this.baseTokenPos+=2;var b=this.baseTokens[this.baseTokenPos+
1];return{type:b&&b.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-a}};Ya.prototype.nextLine=function(){this.line++;0<this.maxLookAhead&&this.maxLookAhead--};Ya.fromSaved=function(a,b,c){return b instanceof ed?new Ya(a,db(a.mode,b.state),c,b.lookAhead):new Ya(a,db(a.mode,b),c)};Ya.prototype.save=function(a){a=!1!==a?db(this.doc.mode,this.state):this.state;return 0<this.maxLookAhead?new ed(a,this.maxLookAhead):a};var xe=function(a,b,c){this.start=a.start;this.end=a.pos;this.string=
a.current();this.type=b||null;this.state=c},Xb=function(a,b,c){this.text=a;na(this,b);this.height=c?c(this):1};Xb.prototype.lineNo=function(){return T(this)};Fa(Xb);var qg={},pg={},Ub=null,rc=null,Ie={left:0,right:0,top:0,bottom:0},zb,Ib=function(a,b,c){this.cm=c;var d=this.vert=t("div",[t("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),e=this.horiz=t("div",[t("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");a(d);a(e);L(d,"scroll",function(){d.clientHeight&&b(d.scrollTop,
"vertical")});L(e,"scroll",function(){e.clientWidth&&b(e.scrollLeft,"horizontal")});this.checkedZeroWidth=!1;R&&8>fa&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ib.prototype.update=function(a){var b=a.scrollWidth>a.clientWidth+1,c=a.scrollHeight>a.clientHeight+1,d=a.nativeBarWidth;c?(this.vert.style.display="block",this.vert.style.bottom=b?d+"px":"0",this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+(a.viewHeight-(b?d:0)))+"px"):(this.vert.style.display=
"",this.vert.firstChild.style.height="0");b?(this.horiz.style.display="block",this.horiz.style.right=c?d+"px":"0",this.horiz.style.left=a.barLeft+"px",this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+(a.viewWidth-a.barLeft-(c?d:0)))+"px"):(this.horiz.style.display="",this.horiz.firstChild.style.width="0");!this.checkedZeroWidth&&0<a.clientHeight&&(0==d&&this.zeroWidthHack(),this.checkedZeroWidth=!0);return{right:c?d:0,bottom:b?d:0}};Ib.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=
a&&(this.horiz.scrollLeft=a);this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")};Ib.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a);this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")};Ib.prototype.zeroWidthHack=function(){this.horiz.style.height=this.vert.style.width=Qa&&!jh?"12px":"18px";this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none";this.disableHoriz=new Gb;this.disableVert=new Gb};Ib.prototype.enableZeroWidthBar=
function(a,b,c){function d(){var e=a.getBoundingClientRect();("vert"==c?document.elementFromPoint(e.right-1,(e.top+e.bottom)/2):document.elementFromPoint((e.right+e.left)/2,e.bottom-1))!=a?a.style.pointerEvents="none":b.set(1E3,d)}a.style.pointerEvents="auto";b.set(1E3,d)};Ib.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz);a.removeChild(this.vert)};var Uc=function(){};Uc.prototype.update=function(){return{bottom:0,right:0}};Uc.prototype.setScrollLeft=function(){};
Uc.prototype.setScrollTop=function(){};Uc.prototype.clear=function(){};var cf={"native":Ib,"null":Uc},zg=0,od=function(a,b,c){var d=a.display;this.viewport=b;this.visible=Zd(d,a.doc,b);this.editorIsHidden=!d.wrapper.offsetWidth;this.wrapperHeight=d.wrapper.clientHeight;this.wrapperWidth=d.wrapper.clientWidth;this.oldDisplayWidth=vb(a);this.force=c;this.dims=Od(a);this.events=[]};od.prototype.signal=function(a,b){wa(a,b)&&this.events.push(arguments)};od.prototype.finish=function(){for(var a=0;a<this.events.length;a++)ca.apply(null,
this.events[a])};var qd=0,Ka=null;R?Ka=-.53:hb?Ka=15:hd?Ka=-.7:bg&&(Ka=-1/3);var La=function(a,b){this.ranges=a;this.primIndex=b};La.prototype.primary=function(){return this.ranges[this.primIndex]};La.prototype.equals=function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var b=0;b<this.ranges.length;b++){var c=this.ranges[b],d=a.ranges[b];if(!ic(c.anchor,d.anchor)||!ic(c.head,d.head))return!1}return!0};La.prototype.deepCopy=function(){for(var a=
[],b=0;b<this.ranges.length;b++)a[b]=new V(Oa(this.ranges[b].anchor),Oa(this.ranges[b].head));return new La(a,this.primIndex)};La.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1};La.prototype.contains=function(a,b){b||(b=a);for(var c=0;c<this.ranges.length;c++){var d=this.ranges[c];if(0<=K(b,d.from())&&0>=K(a,d.to()))return c}return-1};var V=function(a,b){this.anchor=a;this.head=b};V.prototype.from=function(){return Va(this.anchor,
this.head)};V.prototype.to=function(){return pa(this.anchor,this.head)};V.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};Fc.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,b){for(var c=a,d=a+b;c<d;++c){var e=this.lines[c];this.height-=e.height;var h=e;h.parent=null;Z(h);ta(e,"delete")}this.lines.splice(a,b)},collapse:function(a){a.push.apply(a,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(a=0;a<b.length;++a)b[a].parent=this},iterN:function(a,b,c){for(b=a+b;a<b;++a)if(c(this.lines[a]))return!0}};Gc.prototype={chunkSize:function(){return this.size},removeInner:function(a,b){this.size-=b;for(var c=0;c<this.children.length;++c){var d=this.children[c],e=d.chunkSize();if(a<e){var h=Math.min(b,e-a),l=d.height;d.removeInner(a,h);this.height-=l-d.height;e==h&&(this.children.splice(c--,1),d.parent=null);if(0==(b-=h))break;a=0}else a-=e}25>this.size-
b&&(1<this.children.length||!(this.children[0]instanceof Fc))&&(c=[],this.collapse(c),this.children=[new Fc(c)],this.children[0].parent=this)},collapse:function(a){for(var b=0;b<this.children.length;++b)this.children[b].collapse(a)},insertInner:function(a,b,c){this.size+=b.length;this.height+=c;for(var d=0;d<this.children.length;++d){var e=this.children[d],h=e.chunkSize();if(a<=h){e.insertInner(a,b,c);if(e.lines&&50<e.lines.length){for(b=a=e.lines.length%25+25;b<e.lines.length;)c=new Fc(e.lines.slice(b,
b+=25)),e.height-=c.height,this.children.splice(++d,0,c),c.parent=this;e.lines=e.lines.slice(0,a);this.maybeSpill()}break}a-=h}},maybeSpill:function(){if(!(10>=this.children.length)){var a=this;do{var b=a.children.splice(a.children.length-5,5);b=new Gc(b);if(a.parent){a.size-=b.size;a.height-=b.height;var c=H(a.parent.children,a);a.parent.children.splice(c+1,0,b)}else c=new Gc(a.children),c.parent=a,a.children=[c,b],a=c;b.parent=a.parent}while(10<a.children.length);a.parent.maybeSpill()}},iterN:function(a,
b,c){for(var d=0;d<this.children.length;++d){var e=this.children[d],h=e.chunkSize();if(a<h){h=Math.min(b,h-a);if(e.iterN(a,h,c))return!0;if(0==(b-=h))break;a=0}else a-=h}}};var Hc=function(a,b,c){if(c)for(var d in c)c.hasOwnProperty(d)&&(this[d]=c[d]);this.doc=a;this.node=b};Hc.prototype.clear=function(){var a=this.doc.cm,b=this.line.widgets,c=this.line,d=T(c);if(null!=d&&b){for(var e=0;e<b.length;++e)b[e]==this&&b.splice(e--,1);b.length||(c.widgets=null);var h=tc(this);Y(c,Math.max(0,c.height-h));
a&&(Ga(a,function(){var b=-h;Ia(c)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&md(a,b);mb(a,d,"widget")}),ta(a,"lineWidgetCleared",a,this,d))}};Hc.prototype.changed=function(){var a=this,b=this.height,c=this.doc.cm,d=this.line;this.height=null;var e=tc(this)-b;e&&(Y(d,d.height+e),c&&Ga(c,function(){c.curOp.forceUpdate=!0;Ia(d)<(c.curOp&&c.curOp.scrollTop||c.doc.scrollTop)&&md(c,e);ta(c,"lineWidgetChanged",c,a,T(d))}))};Fa(Hc);var Gf=0,ob=function(a,b){this.lines=[];this.type=b;this.doc=a;this.id=
++Gf};ob.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,b=a&&!a.curOp;b&&Db(a);if(wa(this,"clear")){var c=this.find();c&&ta(this,"clear",c.from,c.to)}for(var d=c=null,e=0;e<this.lines.length;++e){var h=this.lines[e],l=rb(h.markedSpans,this);a&&!this.collapsed?mb(a,T(h),"text"):a&&(null!=l.to&&(d=T(h)),null!=l.from&&(c=T(h)));for(var n=h,m=void 0,f=h.markedSpans,k=l,u=0;u<f.length;++u)f[u]!=k&&(m||(m=[])).push(f[u]);n.markedSpans=m;null==l.from&&this.collapsed&&!Ea(this.doc,
h)&&a&&Y(h,yb(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(e=0;e<this.lines.length;++e)h=Da(this.lines[e]),l=Mb(h),l>a.display.maxLineLength&&(a.display.maxLine=h,a.display.maxLineLength=l,a.display.maxLineChanged=!0);null!=c&&a&&this.collapsed&&Ba(a,c,d+1);this.lines.length=0;this.explicitlyCleared=!0;this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&wf(a.doc));a&&ta(a,"markerCleared",a,this,c,d);b&&Eb(a);this.parent&&this.parent.clear()}};ob.prototype.find=function(a,b){null==
a&&"bookmark"==this.type&&(a=1);for(var c,d,e=0;e<this.lines.length;++e){var h=this.lines[e],l=rb(h.markedSpans,this);if(null!=l.from&&(c=z(b?h:T(h),l.from),-1==a))return c;if(null!=l.to&&(d=z(b?h:T(h),l.to),1==a))return d}return c&&{from:c,to:d}};ob.prototype.changed=function(){var a=this,b=this.find(-1,!0),c=this,d=this.doc.cm;b&&d&&Ga(d,function(){var e=b.line,h=T(b.line);if(h=Nd(d,h))Je(h),d.curOp.selectionChanged=d.curOp.forceUpdate=!0;d.curOp.updateMaxLine=!0;Ea(c.doc,e)||null==c.height||(h=
c.height,c.height=null,(h=tc(c)-h)&&Y(e,e.height+h));ta(d,"markerChanged",d,a)})};ob.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var b=this.doc.cm.curOp;b.maybeHiddenMarkers&&-1!=H(b.maybeHiddenMarkers,this)||(b.maybeUnhiddenMarkers||(b.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)};ob.prototype.detachLine=function(a){this.lines.splice(H(this.lines,a),1);!this.lines.length&&this.doc.cm&&(a=this.doc.cm.curOp,(a.maybeHiddenMarkers||(a.maybeHiddenMarkers=[])).push(this))};
Fa(ob);var Ic=function(a,b){this.markers=a;this.primary=b;for(var c=0;c<a.length;++c)a[c].parent=this};Ic.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();ta(this,"clear")}};Ic.prototype.find=function(a,b){return this.primary.find(a,b)};Fa(Ic);var mh=0,Ca=function(a,b,c,d,e){if(!(this instanceof Ca))return new Ca(a,b,c,d,e);null==c&&(c=0);Gc.call(this,[new Fc([new Xb("",null)])]);this.first=c;this.scrollTop=
this.scrollLeft=0;this.cantEdit=!1;this.cleanGeneration=1;this.modeFrontier=this.highlightFrontier=c;c=z(c,0);this.sel=gb(c);this.history=new rd(null);this.id=++mh;this.modeOption=b;this.lineSep=d;this.direction="rtl"==e?"rtl":"ltr";this.extend=!1;"string"==typeof a&&(a=this.splitLines(a));he(this,{from:c,to:c,text:a});ua(this,gb(c),$a)};Ca.prototype=aa(Gc.prototype,{constructor:Ca,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;d<b.length;++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=Jb(this,this.first,this.first+this.size);return!1===a?b:b.join(a||this.lineSeparator())},setValue:sa(function(a){var b=z(this.first,0),c=this.first+this.size-1;$b(this,{from:b,to:z(c,A(this,c).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0);this.cm&&yc(this.cm,0,0);ua(this,gb(b),$a)}),replaceRange:function(a,b,c,
d){b=M(this,b);c=c?M(this,c):b;ac(this,a,b,c,d)},getRange:function(a,b,c){a=S(this,M(this,a),M(this,b));return!1===c?a:a.join(c||this.lineSeparator())},getLine:function(a){return(a=this.getLineHandle(a))&&a.text},getLineHandle:function(a){if(qb(this,a))return A(this,a)},getLineNumber:function(a){return T(a)},getLineHandleVisualStart:function(a){"number"==typeof a&&(a=A(this,a));return Da(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+
this.size-1},clipPos:function(a){return M(this,a)},getCursor:function(a){var b=this.sel.primary();return null==a||"head"==a?b.head:"anchor"==a?b.anchor:"end"==a||"to"==a||!1===a?b.to():b.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:sa(function(a,b,c){a=M(this,"number"==typeof a?z(a,b||0):a);ua(this,gb(a,null),c)}),setSelection:sa(function(a,b,c){var d=M(this,a);a=M(this,b||a);ua(this,gb(d,a),c)}),extendSelection:sa(function(a,
b,c){td(this,M(this,a),b&&M(this,b),c)}),extendSelections:sa(function(a,b){sf(this,cb(this,a),b)}),extendSelectionsBy:sa(function(a,b){var c=x(this.sel.ranges,a);sf(this,cb(this,c),b)}),setSelections:sa(function(a,b,c){if(a.length){for(var d=[],e=0;e<a.length;e++)d[e]=new V(M(this,a[e].anchor),M(this,a[e].head));null==b&&(b=Math.min(a.length-1,this.sel.primIndex));ua(this,Ua(d,b),c)}}),addSelection:sa(function(a,b,c){var d=this.sel.ranges.slice(0);d.push(new V(M(this,a),M(this,b||a)));ua(this,Ua(d,
d.length-1),c)}),getSelection:function(a){for(var b=this.sel.ranges,c,d=0;d<b.length;d++){var e=S(this,b[d].from(),b[d].to());c=c?c.concat(e):e}return!1===a?c:c.join(a||this.lineSeparator())},getSelections:function(a){for(var b=[],c=this.sel.ranges,d=0;d<c.length;d++){var e=S(this,c[d].from(),c[d].to());!1!==a&&(e=e.join(a||this.lineSeparator()));b[d]=e}return b},replaceSelection:function(a,b,c){for(var d=[],e=0;e<this.sel.ranges.length;e++)d[e]=a;this.replaceSelections(d,b,c||"+input")},replaceSelections:sa(function(a,
b,c){for(var d=[],e=this.sel,h=0;h<e.ranges.length;h++){var l=e.ranges[h];d[h]={from:l.from(),to:l.to(),text:this.splitLines(a[h]),origin:c}}if(a=b&&"end"!=b){a=[];e=c=z(this.first,0);for(h=0;h<d.length;h++){var n=d[h];l=kf(n.from,c,e);var m=kf(nb(n),c,e);c=n.to;e=m;"around"==b?(n=this.sel.ranges[h],n=0>K(n.head,n.anchor),a[h]=new V(n?m:l,n?l:m)):a[h]=new V(l,l)}a=new La(a,this.sel.primIndex)}b=a;for(a=d.length-1;0<=a;a--)$b(this,d[a]);b?tf(this,b):this.cm&&Vb(this.cm)}),undo:sa(function(){vd(this,
"undo")}),redo:sa(function(){vd(this,"redo")}),undoSelection:sa(function(){vd(this,"undo",!0)}),redoSelection:sa(function(){vd(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,b=0,c=0,d=0;d<a.done.length;d++)a.done[d].ranges||++b;for(d=0;d<a.undone.length;d++)a.undone[d].ranges||++c;return{undo:b,redo:c}},clearHistory:function(){this.history=new rd(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=
this.changeGeneration(!0)},changeGeneration:function(a){a&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null);return this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:Yb(this.history.done),undone:Yb(this.history.undone)}},setHistory:function(a){var b=this.history=new rd(this.history.maxGeneration);b.done=Yb(a.done.slice(0),null,!0);b.undone=Yb(a.undone.slice(0),null,!0)},setGutterMarker:sa(function(a,
b,c){return Ec(this,a,"gutter",function(a){var d=a.gutterMarkers||(a.gutterMarkers={});d[b]=c;!c&&Ma(d)&&(a.gutterMarkers=null);return!0})}),clearGutter:sa(function(a){var b=this;this.iter(function(c){c.gutterMarkers&&c.gutterMarkers[a]&&Ec(b,c,"gutter",function(){c.gutterMarkers[a]=null;Ma(c.gutterMarkers)&&(c.gutterMarkers=null);return!0})})}),lineInfo:function(a){if("number"==typeof a){if(!qb(this,a))return null;var b=a;a=A(this,a);if(!a)return null}else if(b=T(a),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}},addLineClass:sa(function(a,b,c){return Ec(this,a,"gutter"==b?"gutter":"class",function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"gutter"==b?"gutterClass":"wrapClass";if(a[d]){if(q(c).test(a[d]))return!1;a[d]+=" "+c}else a[d]=c;return!0})}),removeLineClass:sa(function(a,b,c){return Ec(this,a,"gutter"==b?"gutter":"class",function(a){var d="text"==b?"textClass":
"background"==b?"bgClass":"gutter"==b?"gutterClass":"wrapClass",h=a[d];if(h)if(null==c)a[d]=null;else{var l=h.match(q(c));if(!l)return!1;var m=l.index+l[0].length;a[d]=h.slice(0,l.index)+(l.index&&m!=h.length?" ":"")+h.slice(m)||null}else return!1;return!0})}),addLineWidget:sa(function(a,b,c){return Ig(this,a,b,c)}),removeLineWidget:function(a){a.clear()},markText:function(a,b,c){return bc(this,M(this,a),M(this,b),c,c&&c.type||"range")},setBookmark:function(a,b){var c={replacedWith:b&&(null==b.nodeType?
b.widget:b),insertLeft:b&&b.insertLeft,clearWhenEmpty:!1,shared:b&&b.shared,handleMouseEvents:b&&b.handleMouseEvents};a=M(this,a);return bc(this,a,a,c,"bookmark")},findMarksAt:function(a){a=M(this,a);var b=[],c=A(this,a.line).markedSpans;if(c)for(var d=0;d<c.length;++d){var e=c[d];(null==e.from||e.from<=a.ch)&&(null==e.to||e.to>=a.ch)&&b.push(e.marker.parent||e.marker)}return b},findMarks:function(a,b,c){a=M(this,a);b=M(this,b);var d=[],e=a.line;this.iter(a.line,b.line+1,function(h){if(h=h.markedSpans)for(var l=
0;l<h.length;l++){var m=h[l];null!=m.to&&e==a.line&&a.ch>=m.to||null==m.from&&e!=a.line||null!=m.from&&e==b.line&&m.from>=b.ch||c&&!c(m.marker)||d.push(m.marker.parent||m.marker)}++e});return d},getAllMarks:function(){var a=[];this.iter(function(b){if(b=b.markedSpans)for(var c=0;c<b.length;++c)null!=b[c].from&&a.push(b[c].marker)});return a},posFromIndex:function(a){var b,c=this.first,d=this.lineSeparator().length;this.iter(function(e){e=e.text.length+d;if(e>a)return b=a,!0;a-=e;++c});return M(this,
z(c,b))},indexFromPos:function(a){a=M(this,a);var b=a.ch;if(a.line<this.first||0>a.ch)return 0;var c=this.lineSeparator().length;this.iter(this.first,a.line,function(a){b+=a.text.length+c});return b},copy:function(a){var b=new Ca(Jb(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);b.scrollTop=this.scrollTop;b.scrollLeft=this.scrollLeft;b.sel=this.sel;b.extend=!1;a&&(b.history.undoDepth=this.history.undoDepth,b.setHistory(this.getHistory()));return b},linkedDoc:function(a){a||
(a={});var b=this.first,c=this.first+this.size;null!=a.from&&a.from>b&&(b=a.from);null!=a.to&&a.to<c&&(c=a.to);b=new Ca(Jb(this,b,c),a.mode||this.modeOption,b,this.lineSep,this.direction);a.sharedHist&&(b.history=this.history);(this.linked||(this.linked=[])).push({doc:b,sharedHist:a.sharedHist});b.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}];a=Hf(this);for(c=0;c<a.length;c++){var d=a[c],e=d.find(),h=b.clipPos(e.from);e=b.clipPos(e.to);K(h,e)&&(h=bc(b,h,e,d.primary,d.primary.type),d.markers.push(h),
h.parent=d)}return b},unlinkDoc:function(a){a instanceof ia&&(a=a.doc);if(this.linked)for(var b=0;b<this.linked.length;++b)if(this.linked[b].doc==a){this.linked.splice(b,1);a.unlinkDoc(this);Kg(Hf(this));break}if(a.history==this.history){var c=[a.id];Fb(a,function(a){return c.push(a.id)},!0);a.history=new rd(null);a.history.done=Yb(this.history.done,c);a.history.undone=Yb(this.history.undone,c)}},iterLinkedDocs:function(a){Fb(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},
splitLines:function(a){return this.lineSep?a.split(this.lineSep):ve(a)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:sa(function(a){"rtl"!=a&&(a="ltr");a!=this.direction&&(this.direction=a,this.iter(function(a){return a.order=null}),this.cm&&Eg(this.cm))})});Ca.prototype.eachLine=Ca.prototype.iter;for(var Jf=0,ag=!1,pb={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",
37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Vc=0;10>Vc;Vc++)pb[Vc+48]=pb[Vc+96]=String(Vc);for(var Cd=65;90>=Cd;Cd++)pb[Cd]=
String.fromCharCode(Cd);for(var Wc=1;12>=Wc;Wc++)pb[Wc+111]=pb[Wc+63235]="F"+Wc;var Jc={basic:{Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},pcDefault:{"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo",
"Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection",
"Alt-U":"redoSelection",fallthrough:"basic"},emacsy:{"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},macDefault:{"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo",
"Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft",
"Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]}};Jc["default"]=Qa?Jc.macDefault:Jc.pcDefault;var Kc={selectAll:yf,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),$a)},killLine:function(a){return dc(a,function(b){if(b.empty()){var c=A(a.doc,b.head.line).text.length;return b.head.ch==c&&b.head.line<a.lastLine()?{from:b.head,to:z(b.head.line+
1,0)}:{from:b.head,to:z(b.head.line,c)}}return{from:b.from(),to:b.to()}})},deleteLine:function(a){return dc(a,function(b){return{from:z(b.from().line,0),to:M(a.doc,z(b.to().line+1,0))}})},delLineLeft:function(a){return dc(a,function(a){return{from:z(a.from().line,0),to:a.from()}})},delWrappedLineLeft:function(a){return dc(a,function(b){var c=a.charCoords(b.head,"div").top+5;return{from:a.coordsChar({left:0,top:c},"div"),to:b.from()}})},delWrappedLineRight:function(a){return dc(a,function(b){var c=
a.charCoords(b.head,"div").top+5;c=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:c},"div");return{from:b.from(),to:c}})},undo:function(a){return a.undo()},redo:function(a){return a.redo()},undoSelection:function(a){return a.undoSelection()},redoSelection:function(a){return a.redoSelection()},goDocStart:function(a){return a.extendSelection(z(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(z(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(b){return Pf(a,
b.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(b){return Qf(a,b.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(b){b=b.head.line;var c=A(a.doc,b);var d=c;for(var e;e=Wa(d,!1);)d=e.find(1,!0).line;d!=c&&(b=T(d));return oe(!0,a,c,b,-1)},{origin:"+move",bias:-1})},goLineRight:function(a){return a.extendSelectionsBy(function(b){b=a.cursorCoords(b.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+
100,top:b},"div")},Tc)},goLineLeft:function(a){return a.extendSelectionsBy(function(b){b=a.cursorCoords(b.head,"div").top+5;return a.coordsChar({left:0,top:b},"div")},Tc)},goLineLeftSmart:function(a){return a.extendSelectionsBy(function(b){var c=a.cursorCoords(b.head,"div").top+5;c=a.coordsChar({left:0,top:c},"div");return c.ch<a.getLine(c.line).search(/\S/)?Qf(a,b.head):c},Tc)},goLineUp:function(a){return a.moveV(-1,"line")},goLineDown:function(a){return a.moveV(1,"line")},goPageUp:function(a){return a.moveV(-1,
"page")},goPageDown:function(a){return a.moveV(1,"page")},goCharLeft:function(a){return a.moveH(-1,"char")},goCharRight:function(a){return a.moveH(1,"char")},goColumnLeft:function(a){return a.moveH(-1,"column")},goColumnRight:function(a){return a.moveH(1,"column")},goWordLeft:function(a){return a.moveH(-1,"word")},goGroupRight:function(a){return a.moveH(1,"group")},goGroupLeft:function(a){return a.moveH(-1,"group")},goWordRight:function(a){return a.moveH(1,"word")},delCharBefore:function(a){return a.deleteH(-1,
"char")},delCharAfter:function(a){return a.deleteH(1,"char")},delWordBefore:function(a){return a.deleteH(-1,"word")},delWordAfter:function(a){return a.deleteH(1,"word")},delGroupBefore:function(a){return a.deleteH(-1,"group")},delGroupAfter:function(a){return a.deleteH(1,"group")},indentAuto:function(a){return a.indentSelection("smart")},indentMore:function(a){return a.indentSelection("add")},indentLess:function(a){return a.indentSelection("subtract")},insertTab:function(a){return a.replaceSelection("\t")},
insertSoftTab:function(a){for(var b=[],c=a.listSelections(),d=a.options.tabSize,e=0;e<c.length;e++){var h=c[e].from();h=k(a.getLine(h.line),h.ch,d);b.push(F(d-h%d))}a.replaceSelections(b)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return Ga(a,function(){for(var b=a.listSelections(),c=[],d=0;d<b.length;d++)if(b[d].empty()){var e=b[d].head,h=A(a.doc,e.line).text;if(h)if(e.ch==h.length&&(e=new z(e.line,e.ch-1)),0<e.ch)e=
new z(e.line,e.ch+1),a.replaceRange(h.charAt(e.ch-1)+h.charAt(e.ch-2),z(e.line,e.ch-2),e,"+transpose");else if(e.line>a.doc.first){var l=A(a.doc,e.line-1).text;l&&(e=new z(e.line,1),a.replaceRange(h.charAt(0)+a.doc.lineSeparator()+l.charAt(l.length-1),z(e.line-1,l.length-1),e,"+transpose"))}c.push(new V(e,e))}a.setSelections(c)})},newlineAndIndent:function(a){return Ga(a,function(){for(var b=a.listSelections(),c=b.length-1;0<=c;c--)a.replaceRange(a.doc.lineSeparator(),b[c].anchor,b[c].head,"+input");
b=a.listSelections();for(c=0;c<b.length;c++)a.indentLine(b[c].from().line,null,!0);Vb(a)})},openLine:function(a){return a.replaceSelection("\n","start")},toggleOverwrite:function(a){return a.toggleOverwrite()}},Rg=new Gb,pe=null,qe=function(a,b,c){this.time=a;this.pos=b;this.button=c};qe.prototype.compare=function(a,b,c){return this.time+400>a&&0==K(b,this.pos)&&c==this.button};var Nc,Mc,ec={toString:function(){return"CodeMirror.Init"}},$f={},Ad={};ia.defaults=$f;ia.optionHandlers=Ad;var te=[];ia.defineInitHook=
function(a){return te.push(a)};var Ha=null,da=function(a){this.cm=a;this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null;this.polling=new Gb;this.composing=null;this.gracePeriod=!1;this.readDOMTimeout=null};da.prototype.init=function(a){function b(a){if(!ka(e,a)){if(e.somethingSelected())Ha={lineWise:!1,text:e.getSelections()},"cut"==a.type&&e.replaceSelection("",null,"cut");else if(e.options.lineWiseCopyCut){var b=eg(e);Ha={lineWise:!0,text:b.text};"cut"==a.type&&
e.operation(function(){e.setSelections(b.ranges,0,$a);e.replaceSelection("",null,"cut")})}else return;if(a.clipboardData){a.clipboardData.clearData();var c=Ha.text.join("\n");a.clipboardData.setData("Text",c);if(a.clipboardData.getData("Text")==c){a.preventDefault();return}}var l=gg();a=l.firstChild;e.display.lineSpace.insertBefore(l,e.display.lineSpace.firstChild);a.value=Ha.text.join("\n");var m=document.activeElement;Sc(a);setTimeout(function(){e.display.lineSpace.removeChild(l);m.focus();m==h&&
d.showPrimarySelection()},50)}}var c=this,d=this,e=d.cm,h=d.div=a.lineDiv;fg(h,e.options.spellcheck);L(h,"paste",function(a){ka(e,a)||dg(a,e)||11>=fa&&setTimeout(ra(e,function(){return c.updateFromDOM()}),20)});L(h,"compositionstart",function(a){c.composing={data:a.data,done:!1}});L(h,"compositionupdate",function(a){c.composing||(c.composing={data:a.data,done:!1})});L(h,"compositionend",function(a){c.composing&&(a.data!=c.composing.data&&c.readFromDOMSoon(),c.composing.done=!0)});L(h,"touchstart",
function(){return d.forceCompositionEnd()});L(h,"input",function(){c.composing||c.readFromDOMSoon()});L(h,"copy",b);L(h,"cut",b)};da.prototype.prepareSelection=function(){var a=Se(this.cm,!1);a.focus=this.cm.state.focused;return a};da.prototype.showSelection=function(a,b){a&&this.cm.display.view.length&&((a.focus||b)&&this.showPrimarySelection(),this.showMultipleSelections(a))};da.prototype.showPrimarySelection=function(){var a=window.getSelection(),b=this.cm,c=b.doc.sel.primary(),d=c.from();c=c.to();
if(b.display.viewTo==b.display.viewFrom||d.line>=b.display.viewTo||c.line<b.display.viewFrom)a.removeAllRanges();else{var e=Bd(b,a.anchorNode,a.anchorOffset),h=Bd(b,a.focusNode,a.focusOffset);if(!e||e.bad||!h||h.bad||0!=K(Va(e,h),d)||0!=K(pa(e,h),c))if(e=b.display.view,d=d.line>=b.display.viewFrom&&ig(b,d)||{node:e[0].measure.map[2],offset:0},c=c.line<b.display.viewTo&&ig(b,c),c||(c=e[e.length-1].measure,c=c.maps?c.maps[c.maps.length-1]:c.map,c={node:c[c.length-1],offset:c[c.length-2]-c[c.length-
3]}),d&&c){e=a.rangeCount&&a.getRangeAt(0);try{var l=qc(d.node,d.offset,c.offset,c.node)}catch(n){}l&&(!hb&&b.state.focused?(a.collapse(d.node,d.offset),l.collapsed||(a.removeAllRanges(),a.addRange(l))):(a.removeAllRanges(),a.addRange(l)),e&&null==a.anchorNode?a.addRange(e):hb&&this.startGracePeriod());this.rememberSelection()}else a.removeAllRanges()}};da.prototype.startGracePeriod=function(){var a=this;clearTimeout(this.gracePeriod);this.gracePeriod=setTimeout(function(){a.gracePeriod=!1;a.selectionChanged()&&
a.cm.operation(function(){return a.cm.curOp.selectionChanged=!0})},20)};da.prototype.showMultipleSelections=function(a){C(this.cm.display.cursorDiv,a.cursors);C(this.cm.display.selectionDiv,a.selection)};da.prototype.rememberSelection=function(){var a=window.getSelection();this.lastAnchorNode=a.anchorNode;this.lastAnchorOffset=a.anchorOffset;this.lastFocusNode=a.focusNode;this.lastFocusOffset=a.focusOffset};da.prototype.selectionInEditor=function(){var a=window.getSelection();if(!a.rangeCount)return!1;
a=a.getRangeAt(0).commonAncestorContainer;return v(this.div,a)};da.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())};da.prototype.blur=function(){this.div.blur()};da.prototype.getField=function(){return this.div};da.prototype.supportsTouch=function(){return!0};da.prototype.receivedFocus=function(){function a(){b.cm.state.focused&&(b.pollSelection(),b.polling.set(b.cm.options.pollInterval,a))}
var b=this;this.selectionInEditor()?this.pollSelection():Ga(this.cm,function(){return b.cm.curOp.selectionChanged=!0});this.polling.set(this.cm.options.pollInterval,a)};da.prototype.selectionChanged=function(){var a=window.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset};da.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var a=
window.getSelection(),b=this.cm;if(id&&hd&&this.cm.options.gutters.length&&fh(a.anchorNode))this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();else if(!this.composing){this.rememberSelection();var c=Bd(b,a.anchorNode,a.anchorOffset),d=Bd(b,a.focusNode,a.focusOffset);c&&d&&Ga(b,function(){ua(b.doc,gb(c,d),$a);if(c.bad||d.bad)b.curOp.selectionChanged=!0})}}};da.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),
this.readDOMTimeout=null);var a=this.cm,b=a.display,c=a.doc.sel.primary(),d=c.from(),e=c.to();0==d.ch&&d.line>a.firstLine()&&(d=z(d.line-1,A(a.doc,d.line-1).length));e.ch==A(a.doc,e.line).text.length&&e.line<a.lastLine()&&(e=z(e.line+1,0));if(d.line<b.viewFrom||e.line>b.viewTo-1)return!1;var h;d.line==b.viewFrom||0==(h=wb(a,d.line))?(c=T(b.view[0].line),h=b.view[0].node):(c=T(b.view[h].line),h=b.view[h-1].node.nextSibling);var l=wb(a,e.line);l==b.view.length-1?(e=b.viewTo-1,b=b.lineDiv.lastChild):
(e=T(b.view[l+1].line)-1,b=b.view[l+1].node.previousSibling);if(!h)return!1;b=a.doc.splitLines(gh(a,h,b,c,e));for(h=S(a.doc,z(c,0),z(e,A(a.doc,e).text.length));1<b.length&&1<h.length;)if(g(b)==g(h))b.pop(),h.pop(),e--;else if(b[0]==h[0])b.shift(),h.shift(),c++;else break;var m=0;l=0;for(var f=b[0],k=h[0],u=Math.min(f.length,k.length);m<u&&f.charCodeAt(m)==k.charCodeAt(m);)++m;f=g(b);k=g(h);for(u=Math.min(f.length-(1==b.length?m:0),k.length-(1==h.length?m:0));l<u&&f.charCodeAt(f.length-l-1)==k.charCodeAt(k.length-
l-1);)++l;if(1==b.length&&1==h.length&&c==d.line)for(;m&&m>d.ch&&f.charCodeAt(f.length-l-1)==k.charCodeAt(k.length-l-1);)m--,l++;b[b.length-1]=f.slice(0,f.length-l).replace(/^\u200b+/,"");b[0]=b[0].slice(m).replace(/\u200b+$/,"");d=z(c,m);c=z(e,h.length?g(h).length-l:0);if(1<b.length||b[0]||K(d,c))return ac(a.doc,b,d,c,"+input"),!0};da.prototype.ensurePolled=function(){this.forceCompositionEnd()};da.prototype.reset=function(){this.forceCompositionEnd()};da.prototype.forceCompositionEnd=function(){this.composing&&
(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())};da.prototype.readFromDOMSoon=function(){var a=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){a.readDOMTimeout=null;if(a.composing)if(a.composing.done)a.composing=null;else return;a.updateFromDOM()},80))};da.prototype.updateFromDOM=function(){var a=this;!this.cm.isReadOnly()&&this.pollContent()||Ga(this.cm,function(){return Ba(a.cm)})};da.prototype.setUneditable=
function(a){a.contentEditable="false"};da.prototype.onKeyPress=function(a){0!=a.charCode&&(a.preventDefault(),this.cm.isReadOnly()||ra(this.cm,ue)(this.cm,String.fromCharCode(null==a.charCode?a.keyCode:a.charCode),0))};da.prototype.readOnlyChanged=function(a){this.div.contentEditable=String("nocursor"!=a)};da.prototype.onContextMenu=function(){};da.prototype.resetPosition=function(){};da.prototype.needsContentAttribute=!0;var oa=function(a){this.cm=a;this.prevInput="";this.pollingFast=!1;this.polling=
new Gb;this.hasSelection=!1;this.composing=null};oa.prototype.init=function(a){function b(a){if(!ka(e,a)){if(e.somethingSelected())Ha={lineWise:!1,text:e.getSelections()};else if(e.options.lineWiseCopyCut){var b=eg(e);Ha={lineWise:!0,text:b.text};"cut"==a.type?e.setSelections(b.ranges,null,$a):(d.prevInput="",l.value=b.text.join("\n"),Sc(l))}else return;"cut"==a.type&&(e.state.cutIncoming=!0)}}var c=this,d=this,e=this.cm,h=this.wrapper=gg(),l=this.textarea=h.firstChild;a.wrapper.insertBefore(h,a.wrapper.firstChild);
Qc&&(l.style.width="0px");L(l,"input",function(){R&&9<=fa&&c.hasSelection&&(c.hasSelection=null);d.poll()});L(l,"paste",function(a){ka(e,a)||dg(a,e)||(e.state.pasteIncoming=!0,d.fastPoll())});L(l,"cut",b);L(l,"copy",b);L(a.scroller,"paste",function(b){fb(a,b)||ka(e,b)||(e.state.pasteIncoming=!0,d.focus())});L(a.lineSpace,"selectstart",function(b){fb(a,b)||qa(b)});L(l,"compositionstart",function(){var a=e.getCursor("from");d.composing&&d.composing.range.clear();d.composing={start:a,range:e.markText(a,
e.getCursor("to"),{className:"CodeMirror-composing"})}});L(l,"compositionend",function(){d.composing&&(d.poll(),d.composing.range.clear(),d.composing=null)})};oa.prototype.prepareSelection=function(){var a=this.cm,b=a.display,c=a.doc,d=Se(a);if(a.options.moveInputWithCursor){a=Sa(a,c.sel.primary().head,"div");c=b.wrapper.getBoundingClientRect();var e=b.lineDiv.getBoundingClientRect();d.teTop=Math.max(0,Math.min(b.wrapper.clientHeight-10,a.top+e.top-c.top));d.teLeft=Math.max(0,Math.min(b.wrapper.clientWidth-
10,a.left+e.left-c.left))}return d};oa.prototype.showSelection=function(a){var b=this.cm.display;C(b.cursorDiv,a.cursors);C(b.selectionDiv,a.selection);null!=a.teTop&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")};oa.prototype.reset=function(a){if(!this.contextMenuPending&&!this.composing){var b=this.cm;b.somethingSelected()?(this.prevInput="",a=b.getSelection(),this.textarea.value=a,b.state.focused&&Sc(this.textarea),R&&9<=fa&&(this.hasSelection=a)):a||(this.prevInput=
this.textarea.value="",R&&9<=fa&&(this.hasSelection=null))}};oa.prototype.getField=function(){return this.textarea};oa.prototype.supportsTouch=function(){return!1};oa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!gc||D()!=this.textarea))try{this.textarea.focus()}catch(a){}};oa.prototype.blur=function(){this.textarea.blur()};oa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0};oa.prototype.receivedFocus=function(){this.slowPoll()};oa.prototype.slowPoll=
function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll();a.cm.state.focused&&a.slowPoll()})};oa.prototype.fastPoll=function(){function a(){c.poll()||b?(c.pollingFast=!1,c.slowPoll()):(b=!0,c.polling.set(60,a))}var b=!1,c=this;c.pollingFast=!0;c.polling.set(20,a)};oa.prototype.poll=function(){var a=this,b=this.cm,c=this.textarea,d=this.prevInput;if(this.contextMenuPending||!b.state.focused||lh(c)&&!d&&!this.composing||b.isReadOnly()||b.options.disableInput||
b.state.keySeq)return!1;var e=c.value;if(e==d&&!b.somethingSelected())return!1;if(R&&9<=fa&&this.hasSelection===e||Qa&&/[\uf700-\uf7ff]/.test(e))return b.display.input.reset(),!1;if(b.doc.sel==b.display.selForContextMenu){var h=e.charCodeAt(0);8203!=h||d||(d="\u200b");if(8666==h)return this.reset(),this.cm.execCommand("undo")}var l=0;for(h=Math.min(d.length,e.length);l<h&&d.charCodeAt(l)==e.charCodeAt(l);)++l;Ga(b,function(){ue(b,e.slice(l),d.length-l,null,a.composing?"*compose":null);1E3<e.length||
-1<e.indexOf("\n")?c.value=a.prevInput="":a.prevInput=e;a.composing&&(a.composing.range.clear(),a.composing.range=b.markText(a.composing.start,b.getCursor("to"),{className:"CodeMirror-composing"}))});return!0};oa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)};oa.prototype.onKeyPress=function(){R&&9<=fa&&(this.hasSelection=null);this.fastPoll()};oa.prototype.onContextMenu=function(a){function b(){if(null!=l.selectionStart){var a=e.somethingSelected(),b="\u200b"+
(a?l.value:"");l.value="\u21da";l.value=b;d.prevInput=a?"":"\u200b";l.selectionStart=1;l.selectionEnd=b.length;h.selForContextMenu=e.doc.sel}}function c(){d.contextMenuPending=!1;d.wrapper.style.cssText=u;l.style.cssText=k;R&&9>fa&&h.scrollbars.setScrollTop(h.scroller.scrollTop=f);if(null!=l.selectionStart){(!R||R&&9>fa)&&b();var a=0,c=function(){h.selForContextMenu==e.doc.sel&&0==l.selectionStart&&0<l.selectionEnd&&"\u200b"==d.prevInput?ra(e,yf)(e):10>a++?h.detectingSelectAll=setTimeout(c,500):(h.selForContextMenu=
null,h.input.reset())};h.detectingSelectAll=setTimeout(c,200)}}var d=this,e=d.cm,h=e.display,l=d.textarea,m=Ab(e,a),f=h.scroller.scrollTop;if(m&&!Ta){e.options.resetSelectionOnContextMenu&&-1==e.doc.sel.contains(m)&&ra(e,ua)(e.doc,gb(m),$a);var k=l.style.cssText,u=d.wrapper.style.cssText;d.wrapper.style.cssText="position: absolute";m=d.wrapper.getBoundingClientRect();l.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(a.clientY-m.top-5)+"px; left: "+(a.clientX-m.left-5)+
"px;\n      z-index: 1000; background: "+(R?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";if(va)var g=window.scrollY;h.input.focus();va&&window.scrollTo(null,g);h.input.reset();e.somethingSelected()||(l.value=d.prevInput=" ");d.contextMenuPending=!0;h.selForContextMenu=e.doc.sel;clearTimeout(h.detectingSelectAll);R&&9<=fa&&b();if(re){sb(a);var p=function(){ja(window,"mouseup",p);setTimeout(c,
20)};L(window,"mouseup",p)}else setTimeout(c,50)}};oa.prototype.readOnlyChanged=function(a){a||this.reset();this.textarea.disabled="nocursor"==a};oa.prototype.setUneditable=function(){};oa.prototype.needsContentAttribute=!1;(function(a){function b(b,e,h,l){a.defaults[b]=e;h&&(c[b]=l?function(a,b,d){d!=ec&&h(a,b,d)}:h)}var c=a.optionHandlers;a.defineOption=b;a.Init=ec;b("value","",function(a,b){return a.setValue(b)},!0);b("mode",null,function(a,b){a.doc.modeOption=b;ge(a)},!0);b("indentUnit",2,ge,
!0);b("indentWithTabs",!1);b("smartIndent",!0);b("tabSize",4,function(a){Cc(a);vc(a);Ba(a)},!0);b("lineSeparator",null,function(a,b){if(a.doc.lineSep=b){var c=[],d=a.doc.first;a.doc.iter(function(a){for(var e=0;;){var h=a.text.indexOf(b,e);if(-1==h)break;e=h+b.length;c.push(z(d,h))}d++});for(var e=c.length-1;0<=e;e--)ac(a.doc,b,c[e],z(c[e].line,c[e].ch+b.length))}});b("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(a,b,c){a.state.specialChars=new RegExp(b.source+
(b.test("\t")?"":"|\t"),"g");c!=ec&&a.refresh()});b("specialCharPlaceholder",m,function(a){return a.refresh()},!0);b("electricChars",!0);b("inputStyle",gc?"contenteditable":"textarea",function(){throw Error("inputStyle can not (yet) be changed in a running editor");},!0);b("spellcheck",!1,function(a,b){return a.getInputField().spellcheck=b},!0);b("rtlMoveVisually",!kh);b("wholeLineUpdateBefore",!0);b("theme","default",function(a){Zf(a);Oc(a)},!0);b("keyMap","default",function(a,b,c){b=wd(b);(c=c!=
ec&&wd(c))&&c.detach&&c.detach(a,b);b.attach&&b.attach(a,c||null)});b("extraKeys",null);b("configureMouse",null);b("lineWrapping",!1,dh,!0);b("gutters",[],function(a){ee(a.options);Oc(a)},!0);b("fixedGutter",!0,function(a,b){a.display.gutters.style.left=b?Vd(a.display)+"px":"0";a.refresh()},!0);b("coverGutterNextToScrollbar",!1,function(a){return Wb(a)},!0);b("scrollbarStyle","native",function(a){bf(a);Wb(a);a.display.scrollbars.setScrollTop(a.doc.scrollTop);a.display.scrollbars.setScrollLeft(a.doc.scrollLeft)},
!0);b("lineNumbers",!1,function(a){ee(a.options);Oc(a)},!0);b("firstLineNumber",1,Oc,!0);b("lineNumberFormatter",function(a){return a},Oc,!0);b("showCursorWhenSelecting",!1,wc,!0);b("resetSelectionOnContextMenu",!0);b("lineWiseCopyCut",!0);b("pasteLinesPerSelection",!0);b("readOnly",!1,function(a,b){"nocursor"==b&&(xc(a),a.display.input.blur());a.display.input.readOnlyChanged(b)});b("disableInput",!1,function(a,b){b||a.display.input.reset()},!0);b("dragDrop",!0,ch);b("allowDropFileTypes",null);b("cursorBlinkRate",
530);b("cursorScrollMargin",0);b("cursorHeight",1,wc,!0);b("singleCursorHeightPerLine",!0,wc,!0);b("workTime",100);b("workDelay",100);b("flattenSpans",!0,Cc,!0);b("addModeClass",!1,Cc,!0);b("pollInterval",100);b("undoDepth",200,function(a,b){return a.doc.history.undoDepth=b});b("historyEventDelay",1250);b("viewportMargin",10,function(a){return a.refresh()},!0);b("maxHighlightLength",1E4,Cc,!0);b("moveInputWithCursor",!0,function(a,b){b||a.display.input.resetPosition()});b("tabindex",null,function(a,
b){return a.display.input.getField().tabIndex=b||""});b("autofocus",null);b("direction","ltr",function(a,b){return a.doc.setDirection(b)},!0)})(ia);(function(a){var b=a.optionHandlers,c=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus();this.display.input.focus()},setOption:function(a,c){var d=this.options,e=d[a];if(d[a]!=c||"mode"==a)d[a]=c,b.hasOwnProperty(a)&&ra(this,b[a])(this,c,e),ca(this,"optionChange",this,a)},getOption:function(a){return this.options[a]},getDoc:function(){return this.doc},
addKeyMap:function(a,b){this.state.keyMaps[b?"push":"unshift"](wd(a))},removeKeyMap:function(a){for(var b=this.state.keyMaps,c=0;c<b.length;++c)if(b[c]==a||b[c].name==a)return b.splice(c,1),!0},addOverlay:xa(function(b,c){var d=b.token?b:a.getMode(this.options,b);if(d.startState)throw Error("Overlays may not be stateful.");f(this.state.overlays,{mode:d,modeSpec:b,opaque:c&&c.opaque,priority:c&&c.priority||0},function(a){return a.priority});this.state.modeGen++;Ba(this)}),removeOverlay:xa(function(a){for(var b=
this.state.overlays,c=0;c<b.length;++c){var d=b[c].modeSpec;if(d==a||"string"==typeof a&&d.name==a){b.splice(c,1);this.state.modeGen++;Ba(this);break}}}),indentLine:xa(function(a,b,c){"string"!=typeof b&&"number"!=typeof b&&(b=null==b?this.options.smartIndent?"smart":"prev":b?"add":"subtract");qb(this.doc,a)&&Pc(this,a,b,c)}),indentSelection:xa(function(a){for(var b=this.doc.sel.ranges,c=-1,d=0;d<b.length;d++){var m=b[d];if(m.empty())m.head.line>c&&(Pc(this,m.head.line,a,!0),c=m.head.line,d==this.doc.sel.primIndex&&
Vb(this));else{var f=m.from();m=m.to();var k=Math.max(c,f.line);c=Math.min(this.lastLine(),m.line-(m.ch?0:1))+1;for(m=k;m<c;++m)Pc(this,m,a);m=this.doc.sel.ranges;0==f.ch&&b.length==m.length&&0<m[d].from().ch&&ke(this.doc,d,new V(f,m[d].to()),$a)}}}),getTokenAt:function(a,b){return pc(this,a,b)},getLineTokens:function(a,b){return pc(this,z(a),b,!0)},getTokenTypeAt:function(a){a=M(this.doc,a);var b=ub(this,A(this.doc,a.line)),c=0,d=(b.length-1)/2;a=a.ch;if(0==a)b=b[2];else for(;;){var m=c+d>>1;if((m?
b[2*m-1]:0)>=a)d=m;else if(b[2*m+1]<a)c=m+1;else{b=b[2*m+2];break}}c=b?b.indexOf("overlay "):-1;return 0>c?b:0==c?null:b.slice(0,c-1)},getModeAt:function(b){var c=this.doc.mode;return c.innerMode?a.innerMode(c,this.getTokenAt(b).state).mode:c},getHelper:function(a,b){return this.getHelpers(a,b)[0]},getHelpers:function(a,b){var d=[];if(!c.hasOwnProperty(b))return d;var e=c[b],m=this.getModeAt(a);if("string"==typeof m[b])e[m[b]]&&d.push(e[m[b]]);else if(m[b])for(var f=0;f<m[b].length;f++){var k=e[m[b][f]];
k&&d.push(k)}else m.helperType&&e[m.helperType]?d.push(e[m.helperType]):e[m.name]&&d.push(e[m.name]);for(f=0;f<e._global.length;f++)k=e._global[f],k.pred(m,this)&&-1==H(d,k.val)&&d.push(k.val);return d},getStateAfter:function(a,b){var c=this.doc;a=Math.max(c.first,Math.min(null==a?c.first+c.size-1:a,c.first+c.size-1));return Ja(this,a+1,b).state},cursorCoords:function(a,b){var c=this.doc.sel.primary();c=null==a?c.head:"object"==typeof a?M(this.doc,a):a?c.from():c.to();return Sa(this,c,b||"page")},
charCoords:function(a,b){return Rd(this,M(this.doc,a),b||"page")},coordsChar:function(a,b){a=Ne(this,a,b||"page");return Td(this,a.left,a.top)},lineAtHeight:function(a,b){a=Ne(this,{top:a,left:0},b||"page").top;return bb(this.doc,a+this.display.viewOffset)},heightAtLine:function(a,b,c){var d=!1;if("number"==typeof a){var e=this.doc.first+this.doc.size-1;a<this.doc.first?a=this.doc.first:a>e&&(a=e,d=!0);a=A(this.doc,a)}return jd(this,a,{top:0,left:0},b||"page",c||d).top+(d?this.doc.height-Ia(a):0)},
defaultTextHeight:function(){return yb(this.display)},defaultCharWidth:function(){return uc(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(a,b,c,l,m){var d=this.display;a=Sa(this,M(this.doc,a));var e=a.bottom,h=a.left;b.style.position="absolute";b.setAttribute("cm-ignore-events","true");this.display.input.setUneditable(b);d.sizer.appendChild(b);if("over"==l)e=a.top;else if("above"==l||"near"==l){var f=Math.max(d.wrapper.clientHeight,
this.doc.height),n=Math.max(d.sizer.clientWidth,d.lineSpace.clientWidth);("above"==l||a.bottom+b.offsetHeight>f)&&a.top>b.offsetHeight?e=a.top-b.offsetHeight:a.bottom+b.offsetHeight<=f&&(e=a.bottom);h+b.offsetWidth>n&&(h=n-b.offsetWidth)}b.style.top=e+"px";b.style.left=b.style.right="";"right"==m?(h=d.sizer.clientWidth-b.offsetWidth,b.style.right="0px"):("left"==m?h=0:"middle"==m&&(h=(d.sizer.clientWidth-b.offsetWidth)/2),b.style.left=h+"px");c&&(a=ae(this,{left:h,top:e,right:h+b.offsetWidth,bottom:e+
b.offsetHeight}),null!=a.scrollTop&&zc(this,a.scrollTop),null!=a.scrollLeft&&Cb(this,a.scrollLeft))},triggerOnKeyDown:xa(Tf),triggerOnKeyPress:xa(Vf),triggerOnKeyUp:Uf,triggerOnMouseDown:xa(Wf),execCommand:function(a){if(Kc.hasOwnProperty(a))return Kc[a].call(null,this)},triggerElectric:xa(function(a){cg(this,a)}),findPosH:function(a,b,c,l){var d=1;0>b&&(d=-1,b=-b);a=M(this.doc,a);for(var e=0;e<b&&(a=we(this.doc,a,d,c,l),!a.hitSide);++e);return a},moveH:xa(function(a,b){var c=this;this.extendSelectionsBy(function(d){return c.display.shift||
c.doc.extend||d.empty()?we(c.doc,d.head,a,b,c.options.rtlMoveVisually):0>a?d.from():d.to()},Tc)}),deleteH:xa(function(a,b){var c=this.doc;this.doc.sel.somethingSelected()?c.replaceSelection("",null,"+delete"):dc(this,function(d){var e=we(c,d.head,a,b,!1);return 0>a?{from:e,to:d.head}:{from:d.head,to:e}})}),findPosV:function(a,b,c,l){var d=1;0>b&&(d=-1,b=-b);var e=M(this.doc,a);for(a=0;a<b&&(e=Sa(this,e,"div"),null==l?l=e.left:e.left=l,e=hg(this,e,d,c),!e.hitSide);++a);return e},moveV:xa(function(a,
b){var c=this,d=this.doc,e=[],m=!this.display.shift&&!d.extend&&d.sel.somethingSelected();d.extendSelectionsBy(function(h){if(m)return 0>a?h.from():h.to();var l=Sa(c,h.head,"div");null!=h.goalColumn&&(l.left=h.goalColumn);e.push(l.left);var f=hg(c,l,a,b);"page"==b&&h==d.sel.primary()&&md(c,Rd(c,f,"div").top-l.top);return f},Tc);if(e.length)for(var f=0;f<d.sel.ranges.length;f++)d.sel.ranges[f].goalColumn=e[f]}),findWordAt:function(a){var b=A(this.doc,a.line).text,c=a.ch,d=a.ch;if(b){var m=this.getHelper(a,
"wordChars");"before"!=a.sticky&&d!=b.length||!c?++d:--c;var f=b.charAt(c);for(f=Q(f,m)?function(a){return Q(a,m)}:/\s/.test(f)?function(a){return/\s/.test(a)}:function(a){return!/\s/.test(a)&&!Q(a)};0<c&&f(b.charAt(c-1));)--c;for(;d<b.length&&f(b.charAt(d));)++d}return new V(z(a.line,c),z(a.line,d))},toggleOverwrite:function(a){if(null==a||a!=this.state.overwrite)(this.state.overwrite=!this.state.overwrite)?J(this.display.cursorDiv,"CodeMirror-overwrite"):Bb(this.display.cursorDiv,"CodeMirror-overwrite"),
ca(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==D()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:xa(function(a,b){yc(this,a,b)}),getScrollInfo:function(){var a=this.display.scroller;return{left:a.scrollLeft,top:a.scrollTop,height:a.scrollHeight-Za(this)-this.display.barHeight,width:a.scrollWidth-Za(this)-this.display.barWidth,clientHeight:Md(this),clientWidth:vb(this)}},scrollIntoView:xa(function(a,
b){null==a?(a={from:this.doc.sel.primary().head,to:null},null==b&&(b=this.options.cursorScrollMargin)):"number"==typeof a?a={from:z(a,0),to:null}:null==a.from&&(a={from:a,to:null});a.to||(a.to=a.from);a.margin=b||0;if(null!=a.from.line){var c=a;nd(this);this.curOp.scrollToPos=c}else Ze(this,a.from,a.to,a.margin)}),setSize:xa(function(a,b){var c=this,d=function(a){return"number"==typeof a||/^\d+$/.test(String(a))?a+"px":a};null!=a&&(this.display.wrapper.style.width=d(a));null!=b&&(this.display.wrapper.style.height=
d(b));this.options.lineWrapping&&Ke(this);var e=this.display.viewFrom;this.doc.iter(e,this.display.viewTo,function(a){if(a.widgets)for(var b=0;b<a.widgets.length;b++)if(a.widgets[b].noHScroll){mb(c,e,"widget");break}++e});this.curOp.forceUpdate=!0;ca(this,"refresh",this)}),operation:function(a){return Ga(this,a)},startOperation:function(){return Db(this)},endOperation:function(){return Eb(this)},refresh:xa(function(){var a=this.display.cachedTextHeight;Ba(this);this.curOp.forceUpdate=!0;vc(this);
yc(this,this.doc.scrollLeft,this.doc.scrollTop);$d(this);(null==a||.5<Math.abs(a-yb(this.display)))&&Wd(this);ca(this,"refresh",this)}),swapDoc:xa(function(a){var b=this.doc;b.cm=null;mf(this,a);vc(this);this.display.input.reset();yc(this,a.scrollLeft,a.scrollTop);this.curOp.forceScroll=!0;ta(this,"swapDoc",this,b);return b}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},
getGutterElement:function(){return this.display.gutters}};Fa(a);a.registerHelper=function(b,e,h){c.hasOwnProperty(b)||(c[b]=a[b]={_global:[]});c[b][e]=h};a.registerGlobalHelper=function(b,e,h,l){a.registerHelper(b,e,l);c[b]._global.push({pred:h,val:l})}})(ia);var nh="iter insert remove copy getEditor constructor".split(" "),Xc;for(Xc in Ca.prototype)Ca.prototype.hasOwnProperty(Xc)&&0>H(nh,Xc)&&(ia.prototype[Xc]=function(a){return function(){return a.apply(this.doc,arguments)}}(Ca.prototype[Xc]));
Fa(Ca);ia.inputStyles={textarea:oa,contenteditable:da};ia.defineMode=function(a){ia.defaults.mode||"null"==a||(ia.defaults.mode=a);Gd.apply(this,arguments)};ia.defineMIME=function(a,b){Ob[a]=b};ia.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}});ia.defineMIME("text/plain","null");ia.defineExtension=function(a,b){ia.prototype[a]=b};ia.defineDocExtension=function(a,b){Ca.prototype[a]=b};ia.fromTextArea=function(a,b){function c(){a.value=m.getValue()}b=b?y(b):{};b.value=
a.value;!b.tabindex&&a.tabIndex&&(b.tabindex=a.tabIndex);!b.placeholder&&a.placeholder&&(b.placeholder=a.placeholder);if(null==b.autofocus){var d=D();b.autofocus=d==a||null!=a.getAttribute("autofocus")&&d==document.body}if(a.form&&(L(a.form,"submit",c),!b.leaveSubmitMethodAlone)){var e=a.form;var h=e.submit;try{var l=e.submit=function(){c();e.submit=h;e.submit();e.submit=l}}catch(r){}}b.finishInit=function(b){b.save=c;b.getTextArea=function(){return a};b.toTextArea=function(){b.toTextArea=isNaN;c();
a.parentNode.removeChild(b.getWrapperElement());a.style.display="";a.form&&(ja(a.form,"submit",c),"function"==typeof a.form.submit&&(a.form.submit=h))}};a.style.display="none";var m=ia(function(b){return a.parentNode.insertBefore(b,a.nextSibling)},b);return m};(function(a){a.off=ja;a.on=L;a.wheelEventPixels=Dg;a.Doc=Ca;a.splitLines=ve;a.countColumn=k;a.findColumn=U;a.isWordChar=O;a.Pass=yd;a.signal=ca;a.Line=Xb;a.changeEnd=nb;a.scrollbarModel=cf;a.Pos=z;a.cmpPos=K;a.modes=Hd;a.mimeModes=Ob;a.resolveMode=
jb;a.getMode=nc;a.modeExtensions=Pb;a.extendMode=cd;a.copyState=db;a.startState=eb;a.innerMode=Qb;a.commands=Kc;a.keyMap=Jc;a.keyName=Of;a.isModifierKey=Lf;a.lookupKey=cc;a.normalizeKeyMap=Pg;a.StringStream=la;a.SharedTextMarker=Ic;a.TextMarker=ob;a.LineWidget=Hc;a.e_preventDefault=qa;a.e_stopPropagation=ad;a.e_stop=sb;a.addClass=J;a.contains=v;a.rmClass=Bb;a.keyNames=pb})(ia);ia.version="5.34.0";return ia});
(function(q){"object"==typeof exports&&"object"==typeof module?q(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],q):q(CodeMirror)})(function(q){function I(f){for(var k={},g=0;g<f.length;++g)k[f[g].toLowerCase()]=!0;return k}function C(f,k){for(var g=!1,p;null!=(p=f.next());){if(g&&"/"==p){k.tokenize=null;break}g="*"==p}return["comment","comment"]}q.defineMode("css",function(f,k){function g(f,k){Pa=k;return f}function p(f,k){var p=f.next();if(D[p]){var E=
D[p](f,k);if(!1!==E)return E}if("@"==p)return f.eatWhile(/[\w\\\-]/),g("def",f.current());if("="==p||("~"==p||"|"==p)&&f.eat("="))return g(null,"compare");if('"'==p||"'"==p)return k.tokenize=x(p),k.tokenize(f,k);if("#"==p)return f.eatWhile(/[\w\\\-]/),g("atom","hash");if("!"==p)return f.match(/^\s*\w*/),g("keyword","important");if(/\d/.test(p)||"."==p&&f.eat(/\d/))return f.eatWhile(/[\w.%]/),g("number","unit");if("-"===p){if(/[\d.]/.test(f.peek()))return f.eatWhile(/[\w.%]/),g("number","unit");if(f.match(/^-[\w\\\-]+/))return f.eatWhile(/[\w\\\-]/),
f.match(/^\s*:/,!1)?g("variable-2","variable-definition"):g("variable-2","variable");if(f.match(/^\w+-/))return g("meta","meta")}else return/[,+>*\/]/.test(p)?g(null,"select-op"):"."==p&&f.match(/^-?[_a-z][_a-z0-9-]*/i)?g("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(p)?g(null,p):("u"==p||"U"==p)&&f.match(/rl(-prefix)?\(/i)||("d"==p||"D"==p)&&f.match("omain(",!0,!0)||("r"==p||"R"==p)&&f.match("egexp(",!0,!0)?(f.backUp(1),k.tokenize=v,g("property","word")):/[\w\\\-]/.test(p)?(f.eatWhile(/[\w\\\-]/),
g("property","word")):g(null,null)}function x(f){return function(k,p){for(var E=!1,x;null!=(x=k.next());){if(x==f&&!E){")"==f&&k.backUp(1);break}E=!E&&"\\"==x}if(x==f||!E&&")"!=f)p.tokenize=null;return g("string","string")}}function v(f,k){f.next();f.match(/\s*["')]/,!1)?k.tokenize=null:k.tokenize=x(")");return g(null,"(")}function t(f,k,g){this.type=f;this.indent=k;this.prev=g}function S(f,k,g,p){f.context=new t(g,k.indentation()+(!1===p?0:aa),f.context);return g}function y(f){f.context.prev&&(f.context=
f.context.prev);return f.context.type}function F(f,k,g,p){for(p=p||1;0<p;p--)g.context=g.context.prev;return na[g.context.type](f,k,g)}function Q(f){f=f.current().toLowerCase();Z=U.hasOwnProperty(f)?"atom":I.hasOwnProperty(f)?"keyword":"variable"}var w=k.inline;k.propertyKeywords||(k=q.resolveMode("text/css"));var aa=f.indentUnit,D=k.tokenHooks,z=k.documentTypes||{},O=k.mediaTypes||{},J=k.mediaFeatures||{},W=k.mediaValueKeywords||{},H=k.propertyKeywords||{},P=k.nonStandardPropertyKeywords||{},C=k.fontProperties||
{},Ma=k.counterDescriptors||{},I=k.colorKeywords||{},U=k.valueKeywords||{},X=k.allowNested,Lb=!0===k.supportsAtComponent,Pa,Z,na={top:function(f,k,g){if("{"==f)return S(g,k,"block");if("}"==f&&g.context.prev)return y(g);if(Lb&&/@component/i.test(f))return S(g,k,"atComponentBlock");if(/^@(-moz-)?document$/i.test(f))return S(g,k,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(f))return S(g,k,"atBlock");if(/^@(font-face|counter-style)/i.test(f))return g.stateArg=f,"restricted_atBlock_before";
if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(f))return"keyframes";if(f&&"@"==f.charAt(0))return S(g,k,"at");if("hash"==f)Z="builtin";else if("word"==f)Z="tag";else{if("variable-definition"==f)return"maybeprop";if("interpolation"==f)return S(g,k,"interpolation");if(":"==f)return"pseudo";if(X&&"("==f)return S(g,k,"parens")}return g.context.type},block:function(f,k,g){if("word"==f){f=k.current().toLowerCase();if(H.hasOwnProperty(f))return Z="property","maybeprop";if(P.hasOwnProperty(f))return Z="string-2",
"maybeprop";if(X)return Z=k.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block";Z+=" error";return"maybeprop"}if("meta"==f)return"block";if(X||"hash"!=f&&"qualifier"!=f)return na.top(f,k,g);Z="error";return"block"},maybeprop:function(f,k,g){return":"==f?S(g,k,"prop"):na[g.context.type](f,k,g)},prop:function(f,k,g){if(";"==f)return y(g);if("{"==f&&X)return S(g,k,"propBlock");if("}"==f||"{"==f)return F(f,k,g);if("("==f)return S(g,k,"parens");if("hash"==f&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(k.current()))Z+=
" error";else if("word"==f)Q(k);else if("interpolation"==f)return S(g,k,"interpolation");return"prop"},propBlock:function(f,k,g){return"}"==f?y(g):"word"==f?(Z="property","maybeprop"):g.context.type},parens:function(f,k,g){if("{"==f||"}"==f)return F(f,k,g);if(")"==f)return y(g);if("("==f)return S(g,k,"parens");if("interpolation"==f)return S(g,k,"interpolation");"word"==f&&Q(k);return"parens"},pseudo:function(f,k,g){return"meta"==f?"pseudo":"word"==f?(Z="variable-3",g.context.type):na[g.context.type](f,
k,g)},documentTypes:function(f,k,g){return"word"==f&&z.hasOwnProperty(k.current())?(Z="tag",g.context.type):na.atBlock(f,k,g)},atBlock:function(f,k,g){if("("==f)return S(g,k,"atBlock_parens");if("}"==f||";"==f)return F(f,k,g);if("{"==f)return y(g)&&S(g,k,X?"block":"top");if("interpolation"==f)return S(g,k,"interpolation");"word"==f&&(f=k.current().toLowerCase(),Z="only"==f||"not"==f||"and"==f||"or"==f?"keyword":O.hasOwnProperty(f)?"attribute":J.hasOwnProperty(f)?"property":W.hasOwnProperty(f)?"keyword":
H.hasOwnProperty(f)?"property":P.hasOwnProperty(f)?"string-2":U.hasOwnProperty(f)?"atom":I.hasOwnProperty(f)?"keyword":"error");return g.context.type},atComponentBlock:function(f,k,g){if("}"==f)return F(f,k,g);if("{"==f)return y(g)&&S(g,k,X?"block":"top",!1);"word"==f&&(Z="error");return g.context.type},atBlock_parens:function(f,k,g){return")"==f?y(g):"{"==f||"}"==f?F(f,k,g,2):na.atBlock(f,k,g)},restricted_atBlock_before:function(f,k,g){return"{"==f?S(g,k,"restricted_atBlock"):"word"==f&&"@counter-style"==
g.stateArg?(Z="variable","restricted_atBlock_before"):na[g.context.type](f,k,g)},restricted_atBlock:function(f,k,g){return"}"==f?(g.stateArg=null,y(g)):"word"==f?(Z="@font-face"==g.stateArg&&!C.hasOwnProperty(k.current().toLowerCase())||"@counter-style"==g.stateArg&&!Ma.hasOwnProperty(k.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(f,k,g){return"word"==f?(Z="variable","keyframes"):"{"==f?S(g,k,"top"):na[g.context.type](f,k,g)},at:function(f,k,g){if(";"==
f)return y(g);if("{"==f||"}"==f)return F(f,k,g);"word"==f?Z="tag":"hash"==f&&(Z="builtin");return"at"},interpolation:function(f,k,g){if("}"==f)return y(g);if("{"==f||";"==f)return F(f,k,g);"word"==f?Z="variable":"variable"!=f&&"("!=f&&")"!=f&&(Z="error");return"interpolation"}};return{startState:function(f){return{tokenize:null,state:w?"block":"top",stateArg:null,context:new t(w?"block":"top",f||0,null)}},token:function(f,k){if(!k.tokenize&&f.eatSpace())return null;var g=(k.tokenize||p)(f,k);g&&"object"==
typeof g&&(Pa=g[1],g=g[0]);Z=g;"comment"!=Pa&&(k.state=na[k.state](Pa,f,k));return Z},indent:function(f,k){var g=f.context,p=k&&k.charAt(0),x=g.indent;"prop"!=g.type||"}"!=p&&")"!=p||(g=g.prev);if(g.prev)if("}"==p&&("block"==g.type||"top"==g.type||"interpolation"==g.type||"restricted_atBlock"==g.type))g=g.prev,x=g.indent;else if(")"==p&&("parens"==g.type||"atBlock_parens"==g.type)||"{"==p&&("at"==g.type||"atBlock"==g.type))x=Math.max(0,g.indent-aa);return x},electricChars:"}",blockCommentStart:"/*",
blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:k.lineComment,fold:"brace"}});var t=["domain","regexp","url","url-prefix"],w=I(t),v="all aural braille handheld print projection screen tty tv embossed".split(" "),D=I(v),J="width min-width max-width height min-height max-height device-width min-device-width max-device-width device-height min-device-height max-device-height aspect-ratio min-aspect-ratio max-aspect-ratio device-aspect-ratio min-device-aspect-ratio max-device-aspect-ratio color min-color max-color color-index min-color-index max-color-index monochrome min-monochrome max-monochrome resolution min-resolution max-resolution scan grid orientation device-pixel-ratio min-device-pixel-ratio max-device-pixel-ratio pointer any-pointer hover any-hover".split(" "),
P=I(J),W="landscape portrait none coarse fine on-demand hover interlace progressive".split(" "),y=I(W),k="align-content align-items align-self alignment-adjust alignment-baseline anchor-point animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function appearance azimuth backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-repeat background-size baseline-shift binding bleed bookmark-label bookmark-level bookmark-state bookmark-target border border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-decoration-break box-shadow box-sizing break-after break-before break-inside caption-side caret-color clear clip color color-profile column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width columns content counter-increment counter-reset crop cue cue-after cue-before cursor direction display dominant-baseline drop-initial-after-adjust drop-initial-after-align drop-initial-before-adjust drop-initial-before-align drop-initial-size drop-initial-value elevation empty-cells fit fit-position flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float float-offset flow-from flow-into font font-feature-settings font-family font-kerning font-language-override font-size font-size-adjust font-stretch font-style font-synthesis font-variant font-variant-alternates font-variant-caps font-variant-east-asian font-variant-ligatures font-variant-numeric font-variant-position font-weight grid grid-area grid-auto-columns grid-auto-flow grid-auto-rows grid-column grid-column-end grid-column-gap grid-column-start grid-gap grid-row grid-row-end grid-row-gap grid-row-start grid-template grid-template-areas grid-template-columns grid-template-rows hanging-punctuation height hyphens icon image-orientation image-rendering image-resolution inline-box-align justify-content justify-items justify-self left letter-spacing line-break line-height line-stacking line-stacking-ruby line-stacking-shift line-stacking-strategy list-style list-style-image list-style-position list-style-type margin margin-bottom margin-left margin-right margin-top marks marquee-direction marquee-loop marquee-play-count marquee-speed marquee-style max-height max-width min-height min-width move-to nav-down nav-index nav-left nav-right nav-up object-fit object-position opacity order orphans outline outline-color outline-offset outline-style outline-width overflow overflow-style overflow-wrap overflow-x overflow-y padding padding-bottom padding-left padding-right padding-top page page-break-after page-break-before page-break-inside page-policy pause pause-after pause-before perspective perspective-origin pitch pitch-range place-content place-items place-self play-during position presentation-level punctuation-trim quotes region-break-after region-break-before region-break-inside region-fragment rendering-intent resize rest rest-after rest-before richness right rotation rotation-point ruby-align ruby-overhang ruby-position ruby-span shape-image-threshold shape-inside shape-margin shape-outside size speak speak-as speak-header speak-numeral speak-punctuation speech-rate stress string-set tab-size table-layout target target-name target-new target-position text-align text-align-last text-decoration text-decoration-color text-decoration-line text-decoration-skip text-decoration-style text-emphasis text-emphasis-color text-emphasis-position text-emphasis-style text-height text-indent text-justify text-outline text-overflow text-shadow text-size-adjust text-space-collapse text-transform text-underline-position text-wrap top transform transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function unicode-bidi user-select vertical-align visibility voice-balance voice-duration voice-family voice-pitch voice-range voice-rate voice-stress voice-volume volume white-space widows width will-change word-break word-spacing word-wrap z-index clip-path clip-rule mask enable-background filter flood-color flood-opacity lighting-color stop-color stop-opacity pointer-events color-interpolation color-interpolation-filters color-rendering fill fill-opacity fill-rule image-rendering marker marker-end marker-mid marker-start shape-rendering stroke stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-rendering baseline-shift dominant-baseline glyph-orientation-horizontal glyph-orientation-vertical text-anchor writing-mode".split(" "),
H=I(k),U="scrollbar-arrow-color scrollbar-base-color scrollbar-dark-shadow-color scrollbar-face-color scrollbar-highlight-color scrollbar-shadow-color scrollbar-3d-light-color scrollbar-track-color shape-inside searchfield-cancel-button searchfield-decoration searchfield-results-button searchfield-results-decoration zoom".split(" "),F=I(U),g=I("font-family src unicode-range font-variant font-feature-settings font-stretch font-weight font-style".split(" ")),x=I("additive-symbols fallback negative pad prefix range speak-as suffix symbols system".split(" ")),
f="aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkkhaki darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen darkslateblue darkslategray darkturquoise darkviolet deeppink deepskyblue dimgray dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray grey green greenyellow honeydew hotpink indianred indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan lightgoldenrodyellow lightgray lightgreen lightpink lightsalmon lightseagreen lightskyblue lightslategray lightsteelblue lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum powderblue purple rebeccapurple red rosybrown royalblue saddlebrown salmon sandybrown seagreen seashell sienna silver skyblue slateblue slategray snow springgreen steelblue tan teal thistle tomato turquoise violet wheat white whitesmoke yellow yellowgreen".split(" "),
p=I(f),aa="above absolute activeborder additive activecaption afar after-white-space ahead alias all all-scroll alphabetic alternate always amharic amharic-abegede antialiased appworkspace arabic-indic armenian asterisks attr auto auto-flow avoid avoid-column avoid-page avoid-region background backwards baseline below bidi-override binary bengali blink block block-axis bold bolder border border-box both bottom break break-all break-word bullets button button-bevel buttonface buttonhighlight buttonshadow buttontext calc cambodian capitalize caps-lock-indicator caption captiontext caret cell center checkbox circle cjk-decimal cjk-earthly-branch cjk-heavenly-stem cjk-ideographic clear clip close-quote col-resize collapse color color-burn color-dodge column column-reverse compact condensed contain content contents content-box context-menu continuous copy counter counters cover crop cross crosshair currentcolor cursive cyclic darken dashed decimal decimal-leading-zero default default-button dense destination-atop destination-in destination-out destination-over devanagari difference disc discard disclosure-closed disclosure-open document dot-dash dot-dot-dash dotted double down e-resize ease ease-in ease-in-out ease-out element ellipse ellipsis embed end ethiopic ethiopic-abegede ethiopic-abegede-am-et ethiopic-abegede-gez ethiopic-abegede-ti-er ethiopic-abegede-ti-et ethiopic-halehame-aa-er ethiopic-halehame-aa-et ethiopic-halehame-am-et ethiopic-halehame-gez ethiopic-halehame-om-et ethiopic-halehame-sid-et ethiopic-halehame-so-et ethiopic-halehame-ti-er ethiopic-halehame-ti-et ethiopic-halehame-tig ethiopic-numeric ew-resize exclusion expanded extends extra-condensed extra-expanded fantasy fast fill fixed flat flex flex-end flex-start footnotes forwards from geometricPrecision georgian graytext grid groove gujarati gurmukhi hand hangul hangul-consonant hard-light hebrew help hidden hide higher highlight highlighttext hiragana hiragana-iroha horizontal hsl hsla hue icon ignore inactiveborder inactivecaption inactivecaptiontext infinite infobackground infotext inherit initial inline inline-axis inline-block inline-flex inline-grid inline-table inset inside intrinsic invert italic japanese-formal japanese-informal justify kannada katakana katakana-iroha keep-all khmer korean-hangul-formal korean-hanja-formal korean-hanja-informal landscape lao large larger left level lighter lighten line-through linear linear-gradient lines list-item listbox listitem local logical loud lower lower-alpha lower-armenian lower-greek lower-hexadecimal lower-latin lower-norwegian lower-roman lowercase ltr luminosity malayalam match matrix matrix3d media-controls-background media-current-time-display media-fullscreen-button media-mute-button media-play-button media-return-to-realtime-button media-rewind-button media-seek-back-button media-seek-forward-button media-slider media-sliderthumb media-time-remaining-display media-volume-slider media-volume-slider-container media-volume-sliderthumb medium menu menulist menulist-button menulist-text menulist-textfield menutext message-box middle min-intrinsic mix mongolian monospace move multiple multiply myanmar n-resize narrower ne-resize nesw-resize no-close-quote no-drop no-open-quote no-repeat none normal not-allowed nowrap ns-resize numbers numeric nw-resize nwse-resize oblique octal opacity open-quote optimizeLegibility optimizeSpeed oriya oromo outset outside outside-shape overlay overline padding padding-box painted page paused persian perspective plus-darker plus-lighter pointer polygon portrait pre pre-line pre-wrap preserve-3d progress push-button radial-gradient radio read-only read-write read-write-plaintext-only rectangle region relative repeat repeating-linear-gradient repeating-radial-gradient repeat-x repeat-y reset reverse rgb rgba ridge right rotate rotate3d rotateX rotateY rotateZ round row row-resize row-reverse rtl run-in running s-resize sans-serif saturation scale scale3d scaleX scaleY scaleZ screen scroll scrollbar scroll-position se-resize searchfield searchfield-cancel-button searchfield-decoration searchfield-results-button searchfield-results-decoration self-start self-end semi-condensed semi-expanded separate serif show sidama simp-chinese-formal simp-chinese-informal single skew skewX skewY skip-white-space slide slider-horizontal slider-vertical sliderthumb-horizontal sliderthumb-vertical slow small small-caps small-caption smaller soft-light solid somali source-atop source-in source-out source-over space space-around space-between space-evenly spell-out square square-button start static status-bar stretch stroke sub subpixel-antialiased super sw-resize symbolic symbols system-ui table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group tamil telugu text text-bottom text-top textarea textfield thai thick thin threeddarkshadow threedface threedhighlight threedlightshadow threedshadow tibetan tigre tigrinya-er tigrinya-er-abegede tigrinya-et tigrinya-et-abegede to top trad-chinese-formal trad-chinese-informal transform translate translate3d translateX translateY translateZ transparent ultra-condensed ultra-expanded underline unset up upper-alpha upper-armenian upper-greek upper-hexadecimal upper-latin upper-norwegian upper-roman uppercase urdu url var vertical vertical-text visible visibleFill visiblePainted visibleStroke visual w-resize wait wave wider window windowframe windowtext words wrap wrap-reverse x-large x-small xor xx-large xx-small".split(" "),
O=I(aa);t=t.concat(v).concat(J).concat(W).concat(k).concat(U).concat(f).concat(aa);q.registerHelper("hintWords","css",t);q.defineMIME("text/css",{documentTypes:w,mediaTypes:D,mediaFeatures:P,mediaValueKeywords:y,propertyKeywords:H,nonStandardPropertyKeywords:F,fontProperties:g,counterDescriptors:x,colorKeywords:p,valueKeywords:O,tokenHooks:{"/":function(f,k){if(!f.eat("*"))return!1;k.tokenize=C;return C(f,k)}},name:"css"});q.defineMIME("text/x-scss",{mediaTypes:D,mediaFeatures:P,mediaValueKeywords:y,
propertyKeywords:H,nonStandardPropertyKeywords:F,colorKeywords:p,valueKeywords:O,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(f,k){return f.eat("/")?(f.skipToEnd(),["comment","comment"]):f.eat("*")?(k.tokenize=C,C(f,k)):["operator","operator"]},":":function(f){return f.match(/\s*\{/,!1)?[null,null]:!1},$:function(f){f.match(/^[\w-]+/);return f.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(f){return f.eat("{")?[null,"interpolation"]:
!1}},name:"css",helperType:"scss"});q.defineMIME("text/x-less",{mediaTypes:D,mediaFeatures:P,mediaValueKeywords:y,propertyKeywords:H,nonStandardPropertyKeywords:F,colorKeywords:p,valueKeywords:O,fontProperties:g,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(f,k){return f.eat("/")?(f.skipToEnd(),["comment","comment"]):f.eat("*")?(k.tokenize=C,C(f,k)):["operator","operator"]},"@":function(f){if(f.eat("{"))return[null,"interpolation"];if(f.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,
!1))return!1;f.eatWhile(/[\w\\\-]/);return f.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"});q.defineMIME("text/x-gss",{documentTypes:w,mediaTypes:D,mediaFeatures:P,propertyKeywords:H,nonStandardPropertyKeywords:F,fontProperties:g,counterDescriptors:x,colorKeywords:p,valueKeywords:O,supportsAtComponent:!0,tokenHooks:{"/":function(f,k){if(!f.eat("*"))return!1;k.tokenize=C;return C(f,k)}},name:"css",
helperType:"gss"})});
(function(q){"object"==typeof exports&&"object"==typeof module?q(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],q):q(CodeMirror)})(function(q){function I(q){var t=D[q];return t?t:D[q]=new RegExp("\\s+"+q+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function C(q,t){var v=q.match(I(t));return v?/^\s*(.*?)\s*$/.exec(v[2])[1]:""}
function t(q,t){for(var v in q)for(var y=t[v]||(t[v]=[]),k=q[v],w=k.length-1;0<=w;w--)y.unshift(k[w])}function w(q,t){for(var v=0;v<q.length;v++){var y=q[v];if(!y[0]||y[1].test(C(t,y[0])))return y[2]}}var v={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],
[null,null,"css"]]},D={};q.defineMode("htmlmixed",function(D,C){function J(v,g){var x=y.token(v,g.htmlState),f=/\btag\b/.test(x),p;if(f&&!/[<>\s\/]/.test(v.current())&&(p=g.htmlState.tagName&&g.htmlState.tagName.toLowerCase())&&k.hasOwnProperty(p))g.inTag=p+" ";else if(g.inTag&&f&&/>$/.test(v.current())){f=/^([\S]+) (.*)/.exec(g.inTag);g.inTag=null;p=">"==v.current()&&w(k[f[1]],f[2]);p=q.getMode(D,p);var t=new RegExp("^</s*"+f[1]+"s*>","i"),F=new RegExp("</s*"+f[1]+"s*>","i");g.token=function(f,k){if(f.match(t,
!1))return k.token=J,k.localState=k.localMode=null;var g=k.localMode.token(f,k.localState),p=f.current(),x=p.search(F);-1<x?f.backUp(p.length-x):p.match(/<\/?$/)&&(f.backUp(p.length),f.match(F,!1)||f.match(p));return g};g.localMode=p;g.localState=q.startState(p,y.indent(g.htmlState,""))}else g.inTag&&(g.inTag+=v.current(),v.eol()&&(g.inTag+=" "));return x}var y=q.getMode(D,{name:"xml",htmlMode:!0,multilineTagIndentFactor:C.multilineTagIndentFactor,multilineTagIndentPastTag:C.multilineTagIndentPastTag}),
k={},H=C&&C.tags,P=C&&C.scriptTypes;t(v,k);H&&t(H,k);if(P)for(H=P.length-1;0<=H;H--)k.script.unshift(["type",P[H].matches,P[H].mode]);return{startState:function(){var k=q.startState(y);return{token:J,inTag:null,localMode:null,localState:null,htmlState:k}},copyState:function(k){var g;k.localState&&(g=q.copyState(k.localMode,k.localState));return{token:k.token,inTag:k.inTag,localMode:k.localMode,localState:g,htmlState:q.copyState(y,k.htmlState)}},token:function(k,g){return g.token(k,g)},indent:function(k,
g,x){return!k.localMode||/^\s*<\//.test(g)?y.indent(k.htmlState,g):k.localMode.indent?k.localMode.indent(k.localState,g,x):q.Pass},innerMode:function(k){return{state:k.localState||k.htmlState,mode:k.localMode||y}}}},"xml","javascript","css");q.defineMIME("text/html","htmlmixed")});
(function(q){"object"==typeof exports&&"object"==typeof module?q(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],q):q(CodeMirror)})(function(q){q.defineMode("javascript",function(I,C){function t(f,k,g){kb=f;Rb=g;return k}function w(f,k){var m=f.next();if('"'==m||"'"==m)return k.tokenize=v(m),k.tokenize(f,k);if("."==m&&f.match(/^\d+(?:[eE][+\-]?\d+)?/))return t("number","number");if("."==m&&f.match(".."))return t("spread","meta");if(/[\[\]{}\(\),;:\.]/.test(m))return t(m);
if("="==m&&f.eat(">"))return t("=>","operator");if("0"==m&&f.eat(/x/i))return f.eatWhile(/[\da-f]/i),t("number","number");if("0"==m&&f.eat(/o/i))return f.eatWhile(/[0-7]/i),t("number","number");if("0"==m&&f.eat(/b/i))return f.eatWhile(/[01]/i),t("number","number");if(/\d/.test(m))return f.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),t("number","number");if("/"==m){if(f.eat("*"))return k.tokenize=D,D(f,k);if(f.eat("/"))return f.skipToEnd(),t("comment","comment");if(Qb(f,k,1)){a:{m=!1;for(var g,u=!1;null!=
(g=f.next());){if(!m){if("/"==g&&!u)break a;"["==g?u=!0:u&&"]"==g&&(u=!1)}m=!m&&"\\"==g}}f.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);return t("regexp","string-2")}f.eat("=");return t("operator","operator",f.current())}if("`"==m)return k.tokenize=J,J(f,k);if("#"==m)return f.skipToEnd(),t("error","error");if(pc.test(m))return">"==m&&k.lexical&&">"==k.lexical.type||(f.eat("=")?"!"!=m&&"="!=m||f.eat("="):/[<>*+\-]/.test(m)&&(f.eat(m),">"==m&&f.eat(m))),t("operator","operator",f.current());if(Sb.test(m)){f.eatWhile(Sb);
m=f.current();if("."!=k.lastType){if(Tb.propertyIsEnumerable(m))return g=Tb[m],t(g.type,g.style,m);if("async"==m&&f.match(/^(\s|\/\*.*?\*\/)*[\(\w]/,!1))return t("async","keyword",m)}return t("variable","variable",m)}}function v(f){return function(m,k){var g=!1,u;if(ub&&"@"==m.peek()&&m.match(dd))return k.tokenize=w,t("jsonld-keyword","meta");for(;null!=(u=m.next())&&(u!=f||g);)g=!g&&"\\"==u;g||(k.tokenize=w);return t("string","string")}}function D(f,k){for(var m=!1,g;g=f.next();){if("/"==g&&m){k.tokenize=
w;break}m="*"==g}return t("comment","comment")}function J(f,k){for(var m=!1,g;null!=(g=f.next());){if(!m&&("`"==g||"$"==g&&f.eat("{"))){k.tokenize=w;break}m=!m&&"\\"==g}return t("quasi","string-2",f.current())}function P(f,k){k.fatArrowAt&&(k.fatArrowAt=null);var m=f.string.indexOf("=>",f.start);if(!(0>m)){if(ha){var g=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(f.string.slice(f.start,m));g&&(m=g.index)}g=0;var u=!1;for(--m;0<=m;--m){var p=f.string.charAt(m),x="([{}])".indexOf(p);if(0<=x&&3>
x){if(!g){++m;break}if(0==--g){"("==p&&(u=!0);break}}else if(3<=x&&6>x)++g;else if(Sb.test(p))u=!0;else{if(/["'\/]/.test(p))return;if(u&&!g){++m;break}}}u&&!g&&(k.fatArrowAt=m)}}function W(f,k,g,p,x,q){this.indented=f;this.column=k;this.type=g;this.prev=x;this.info=q;null!=p&&(this.align=p)}function y(){for(var f=arguments.length-1;0<=f;f--)B.cc.push(arguments[f])}function k(){y.apply(null,arguments);return!0}function H(f){function m(m){for(;m;m=m.next)if(m.name==f)return!0;return!1}var k=B.state;
B.marked="def";k.context?m(k.localVars)||(k.localVars={name:f,next:k.localVars}):!m(k.globalVars)&&C.globalVars&&(k.globalVars={name:f,next:k.globalVars})}function U(f){return"public"==f||"private"==f||"protected"==f||"abstract"==f||"readonly"==f}function F(){B.state.context={prev:B.state.context,vars:B.state.localVars};B.state.localVars=fd}function g(){B.state.localVars=B.state.context.vars;B.state.context=B.state.context.prev}function x(f,k){var m=function(){var m=B.state,g=m.indented;if("stat"==
m.lexical.type)g=m.lexical.indented;else for(var u=m.lexical;u&&")"==u.type&&u.align;u=u.prev)g=u.indented;m.lexical=new W(g,B.stream.column(),f,null,m.lexical,k)};m.lex=!0;return m}function f(){var f=B.state;f.lexical.prev&&(")"==f.lexical.type&&(f.indented=f.lexical.indented),f.lexical=f.lexical.prev)}function p(f){function m(g){return g==f?k():";"==f?y():k(m)}return m}function aa(m,u){return"var"==m?k(x("vardef",u.length),Da,p(";"),f):"keyword a"==m?k(x("form"),Ma,aa,f):"keyword b"==m?k(x("form"),
aa,f):"keyword d"==m?B.stream.match(/^\s*$/,!1)?k():k(x("stat"),ab,p(";"),f):"debugger"==m?k(p(";")):"{"==m?k(x("}"),M,f):";"==m?k():"if"==m?("else"==B.state.lexical.info&&B.state.cc[B.state.cc.length-1]==f&&B.state.cc.pop()(),k(x("form"),Ma,aa,f,Ia)):"function"==m?k(ja):"for"==m?k(x("form"),Mb,aa,f):"class"==m||ha&&"interface"==u?(B.marked="keyword",k(x("form"),mc,f)):"variable"==m?ha&&"declare"==u?(B.marked="keyword",k(aa)):ha&&("module"==u||"enum"==u||"type"==u)&&B.stream.match(/^\s*\w/,!1)?(B.marked=
"keyword","enum"==u?k(cd):"type"==u?k(X,p("operator"),X,p(";")):k(x("form"),Aa,p("{"),x("}"),M,f,f)):ha&&"namespace"==u?(B.marked="keyword",k(x("form"),O,M,f)):k(x("stat"),hc):"switch"==m?k(x("form"),Ma,p("{"),x("}","switch"),M,f,f):"case"==m?k(O,p(":")):"default"==m?k(p(":")):"catch"==m?k(x("form"),F,p("("),ca,p(")"),aa,f,g):"export"==m?k(x("stat"),ad,f):"import"==m?k(x("stat"),sb,f):"async"==m?k(aa):"@"==u?k(O,aa):y(x("stat"),O,p(";"),f)}function O(f,k){return ea(f,k,!1)}function Q(f,k){return ea(f,
k,!0)}function Ma(m){return"("!=m?y():k(x(")"),O,p(")"),f)}function ea(m,u,q){if(B.state.fatArrowAt==B.stream.start){var v=q?Y:Jb;if("("==m)return k(F,x(")"),pa(ca,")"),f,p("=>"),v,g);if("variable"==m)return y(F,Aa,p("=>"),v,g)}v=q?za:ma;return Id.hasOwnProperty(m)?k(v):"function"==m?k(ja,v):"class"==m||ha&&"interface"==u?(B.marked="keyword",k(x("form"),ka,f)):"keyword c"==m||"async"==m?k(q?Q:O):"("==m?k(x(")"),ab,p(")"),f,v):"operator"==m||"spread"==m?k(q?Q:O):"["==m?k(x("]"),nc,f,v):"{"==m?Va(K,
"}",null,v):"quasi"==m?y(A,v):"new"==m?k(T(q)):k()}function ab(f){return f.match(/[;\}\)\],]/)?y():y(O)}function ma(f,g){return","==f?k(O):za(f,g,!1)}function za(m,u,q){var v=0==q?ma:za,t=0==q?O:Q;if("=>"==m)return k(F,q?Y:Jb,g);if("operator"==m)return/\+\+|--/.test(u)||ha&&"!"==u?k(v):ha&&"<"==u&&B.stream.match(/^([^>]|<.*?>)*>\s*\(/,!1)?k(x(">"),pa(X,">"),f,v):"?"==u?k(O,p(":"),t):k(t);if("quasi"==m)return y(A,v);if(";"!=m){if("("==m)return Va(Q,")","call",v);if("."==m)return k(z,v);if("["==m)return k(x("]"),
ab,p("]"),f,v);if(ha&&"as"==u)return B.marked="keyword",k(X,v);if("regexp"==m)return B.state.lastType=B.marked="operator",B.stream.backUp(B.stream.pos-B.stream.start-1),k(t)}}function A(f,g){return"quasi"!=f?y():"${"!=g.slice(g.length-2)?k(A):k(O,S)}function S(f){if("}"==f)return B.marked="string-2",B.state.tokenize=J,k(A)}function Jb(f){P(B.stream,B.state);return y("{"==f?aa:O)}function Y(f){P(B.stream,B.state);return y("{"==f?aa:Q)}function T(f){return function(m){return"."==m?k(f?qb:bb):"variable"==
m&&ha?k(E,f?za:ma):y(f?Q:O)}}function bb(f,g){if("target"==g)return B.marked="keyword",k(ma)}function qb(f,g){if("target"==g)return B.marked="keyword",k(za)}function hc(m){return":"==m?k(f,aa):y(ma,p(";"),f)}function z(f){if("variable"==f)return B.marked="property",k()}function K(f,g){if("async"==f)return B.marked="property",k(K);if("variable"==f||"keyword"==B.style){B.marked="property";if("get"==g||"set"==g)return k(ic);var m;ha&&B.state.fatArrowAt==B.stream.start&&(m=B.stream.match(/^\s*:\s*/,!1))&&
(B.state.fatArrowAt=B.stream.pos+m[0].length);return k(Oa)}if("number"==f||"string"==f)return B.marked=ub?"property":B.style+" property",k(Oa);if("jsonld-keyword"==f)return k(Oa);if(ha&&U(g))return B.marked="keyword",k(K);if("["==f)return k(O,cb,p("]"),Oa);if("spread"==f)return k(Q,Oa);if("*"==g)return B.marked="keyword",k(K);if(":"==f)return y(Oa)}function ic(f){if("variable"!=f)return y(Oa);B.marked="property";return k(ja)}function Oa(f){if(":"==f)return k(Q);if("("==f)return y(ja)}function pa(f,
g,x){function m(u,q){if(x?-1<x.indexOf(u):","==u){var v=B.state.lexical;"call"==v.info&&(v.pos=(v.pos||0)+1);return k(function(m,k){return m==g||k==g?y():y(f)},m)}return u==g||q==g?k():k(p(g))}return function(u,p){return u==g||p==g?k():y(f,m)}}function Va(m,g,p){for(var u=3;u<arguments.length;u++)B.cc.push(arguments[u]);return k(x(g,p),pa(m,g),f)}function M(f){return"}"==f?k():y(aa,M)}function cb(f,g){if(ha){if(":"==f)return k(X);if("?"==g)return k(cb)}}function Kb(f){if(ha&&":"==f)return B.stream.match(/^\s*\w+\s+is\b/,
!1)?k(O,rb,X):k(X)}function rb(f,g){if("is"==g)return B.marked="keyword",k()}function X(m,g){if("variable"==m||"void"==g){if("keyof"==g)return B.marked="keyword",k(X);B.marked="type";return k(na)}if("string"==m||"number"==m||"atom"==m)return k(na);if("["==m)return k(x("]"),pa(X,"]",","),f,na);if("{"==m)return k(x("}"),pa(Pa,"}",",;"),f,na);if("("==m)return k(pa(Z,")"),Lb)}function Lb(f){if("=>"==f)return k(X)}function Pa(f,g){if("variable"==f||"keyword"==B.style)return B.marked="property",k(Pa);if("?"==
g)return k(Pa);if(":"==f)return k(X);if("["==f)return k(O,cb,p("]"),Pa)}function Z(f){if("variable"==f)return k(Z);if(":"==f)return k(X)}function na(m,g){if("<"==g)return k(x(">"),pa(X,">"),f,na);if("|"==g||"."==m)return k(X);if("["==m)return k(p("]"),na);if("extends"==g||"implements"==g)return B.marked="keyword",k(X)}function E(m,g){if("<"==g)return k(x(">"),pa(X,">"),f,na)}function Wa(){return y(X,N)}function N(f,g){if("="==g)return k(X)}function Da(f,g){return"enum"==g?(B.marked="keyword",k(cd)):
y(Aa,cb,Ea,jc)}function Aa(f,g){if(ha&&U(g))return B.marked="keyword",k(Aa);if("variable"==f)return H(g),k();if("spread"==f)return k(Aa);if("["==f)return Va(Aa,"]");if("{"==f)return Va(Zc,"}")}function Zc(f,g){if("variable"==f&&!B.stream.match(/^\s*:/,!1))return H(g),k(Ea);"variable"==f&&(B.marked="property");return"spread"==f?k(Aa):"}"==f?y():k(p(":"),Aa,Ea)}function Ea(f,g){if("="==g)return k(Q)}function jc(f){if(","==f)return k(Da)}function Ia(m,g){if("keyword b"==m&&"else"==g)return k(x("form",
"else"),aa,f)}function Mb(m){if("("==m)return k(x(")"),kc,p(")"),f)}function kc(f){return"var"==f?k(Da,p(";"),Xa):";"==f?k(Xa):"variable"==f?k(Ed):y(O,p(";"),Xa)}function Ed(f,g){return"in"==g||"of"==g?(B.marked="keyword",k(O)):k(ma,Xa)}function Xa(f,g){return";"==f?k(Na):"in"==g||"of"==g?(B.marked="keyword",k(O)):y(O,p(";"),Na)}function Na(f){")"!=f&&k(O)}function ja(m,p){if("*"==p)return B.marked="keyword",k(ja);if("variable"==m)return H(p),k(ja);if("("==m)return k(F,x(")"),pa(ca,")"),f,Kb,aa,g);
if(ha&&"<"==p)return k(x(">"),pa(Wa,">"),f,ja)}function ca(f,g){"@"==g&&k(O,ca);return"spread"==f?k(ca):ha&&U(g)?(B.marked="keyword",k(ca)):y(Aa,cb,Ea)}function ka(f,g){return"variable"==f?mc(f,g):wa(f,g)}function mc(f,g){if("variable"==f)return H(g),k(wa)}function wa(g,p){if("<"==p)return k(x(">"),pa(Wa,">"),f,wa);if("extends"==p||"implements"==p||ha&&","==g)return"implements"==p&&(B.marked="keyword"),k(ha?X:O,wa);if("{"==g)return k(x("}"),Fa,f)}function Fa(f,g){if("async"==f||"variable"==f&&("static"==
g||"get"==g||"set"==g||ha&&U(g))&&B.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return B.marked="keyword",k(Fa);if("variable"==f||"keyword"==B.style)return B.marked="property",k(ha?qa:ja,Fa);if("["==f)return k(O,cb,p("]"),ha?qa:ja,Fa);if("*"==g)return B.marked="keyword",k(Fa);if(";"==f)return k(Fa);if("}"==f)return k();if("@"==g)return k(O,Fa)}function qa(f,g){return"?"==g?k(qa):":"==f?k(X,Ea):"="==g?k(Q):y(ja)}function ad(f,g){return"*"==g?(B.marked="keyword",k(jb,p(";"))):"default"==g?(B.marked="keyword",
k(O,p(";"))):"{"==f?k(pa(Nb,"}"),jb,p(";")):y(aa)}function Nb(f,g){if("as"==g)return B.marked="keyword",k(p("variable"));if("variable"==f)return y(Q,Nb)}function sb(f){return"string"==f?k():y(tb,bd,jb)}function tb(f,g){if("{"==f)return Va(tb,"}");"variable"==f&&H(g);"*"==g&&(B.marked="keyword");return k(Gd)}function bd(f){if(","==f)return k(tb,bd)}function Gd(f,g){if("as"==g)return B.marked="keyword",k(tb)}function jb(f,g){if("from"==g)return B.marked="keyword",k(O)}function nc(f){return"]"==f?k():
y(pa(Q,"]"))}function cd(){return y(x("form"),Aa,p("{"),x("}"),pa(db,"}"),f,f)}function db(){return y(Aa,Ea)}function Qb(f,g,k){return g.tokenize==w&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(g.lastType)||"quasi"==g.lastType&&/\{\s*$/.test(f.string.slice(0,f.pos-(k||0)))}var eb=I.indentUnit,oc=C.statementIndent,ub=C.jsonld,Ja=C.json||ub,ha=C.typescript,Sb=C.wordCharacters||/[\w$\xa1-\uffff]/,Tb=function(){function f(f){return{type:f,style:"keyword"}}var g=
f("keyword a"),k=f("keyword b"),p=f("keyword c"),x=f("keyword d"),q=f("operator"),v={type:"atom",style:"atom"};return{"if":f("if"),"while":g,"with":g,"else":k,"do":k,"try":k,"finally":k,"return":x,"break":x,"continue":x,"new":f("new"),"delete":p,"void":p,"throw":p,"debugger":f("debugger"),"var":f("var"),"const":f("var"),let:f("var"),"function":f("function"),"catch":f("catch"),"for":f("for"),"switch":f("switch"),"case":f("case"),"default":f("default"),"in":q,"typeof":q,"instanceof":q,"true":v,"false":v,
"null":v,undefined:v,NaN:v,Infinity:v,"this":f("this"),"class":f("class"),"super":f("atom"),yield:p,"export":f("export"),"import":f("import"),"extends":p,await:p}}(),pc=/[+\-*&%=<>!?|~^@]/,dd=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,kb,Rb,Id={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},B={state:null,column:null,marked:null,cc:null},fd={name:"this",next:{name:"arguments"}};f.lex=!0;return{startState:function(f){f={tokenize:w,
lastType:"sof",cc:[],lexical:new W((f||0)-eb,0,"block",!1),localVars:C.localVars,context:C.localVars&&{vars:C.localVars},indented:f||0};C.globalVars&&"object"==typeof C.globalVars&&(f.globalVars=C.globalVars);return f},token:function(f,g){f.sol()&&(g.lexical.hasOwnProperty("align")||(g.lexical.align=!1),g.indented=f.indentation(),P(f,g));if(g.tokenize!=D&&f.eatSpace())return null;var k=g.tokenize(f,g);if("comment"==kb)return k;g.lastType="operator"!=kb||"++"!=Rb&&"--"!=Rb?kb:"incdec";a:{var m=kb,
p=Rb,u=g.cc;B.state=g;B.stream=f;B.marked=null;B.cc=u;B.style=k;g.lexical.hasOwnProperty("align")||(g.lexical.align=!0);for(;;)if((u.length?u.pop():Ja?O:aa)(m,p)){for(;u.length&&u[u.length-1].lex;)u.pop()();if(B.marked){k=B.marked;break a}if(m="variable"==m)b:{for(m=g.localVars;m;m=m.next)if(m.name==p){m=!0;break b}for(u=g.context;u;u=u.prev)for(m=u.vars;m;m=m.next)if(m.name==p){m=!0;break b}m=void 0}if(m){k="variable-2";break a}break a}}return k},indent:function(g,k){if(g.tokenize==D)return q.Pass;
if(g.tokenize!=w)return 0;var m=k&&k.charAt(0),p=g.lexical,u;if(!/^\s*else\b/.test(k))for(var x=g.cc.length-1;0<=x;--x){var v=g.cc[x];if(v==f)p=p.prev;else if(v!=Ia)break}for(;!("stat"!=p.type&&"form"!=p.type||"}"!=m&&(!(u=g.cc[g.cc.length-1])||u!=ma&&u!=za||/^[,\.=+\-*:?[\(]/.test(k)));)p=p.prev;oc&&")"==p.type&&"stat"==p.prev.type&&(p=p.prev);u=p.type;x=m==u;return"vardef"==u?p.indented+("operator"==g.lastType||","==g.lastType?p.info+1:0):"form"==u&&"{"==m?p.indented:"form"==u?p.indented+eb:"stat"==
u?(m=p.indented,p="operator"==g.lastType||","==g.lastType||pc.test(k.charAt(0))||/[,.]/.test(k.charAt(0)),m+(p?oc||eb:0)):"switch"!=p.info||x||0==C.doubleIndentSwitch?p.align?p.column+(x?0:1):p.indented+(x?0:eb):p.indented+(/^(?:case|default)\b/.test(k)?eb:2*eb)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Ja?null:"/*",blockCommentEnd:Ja?null:"*/",blockCommentContinue:Ja?null:" * ",lineComment:Ja?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Ja?"json":"javascript",
jsonldMode:ub,jsonMode:Ja,expressionAllowed:Qb,skipExpression:function(f){var g=f.cc[f.cc.length-1];g!=O&&g!=Q||f.cc.pop()}}});q.registerHelper("wordChars","javascript",/[\w$]/);q.defineMIME("text/javascript","javascript");q.defineMIME("text/ecmascript","javascript");q.defineMIME("application/javascript","javascript");q.defineMIME("application/x-javascript","javascript");q.defineMIME("application/ecmascript","javascript");q.defineMIME("application/json",{name:"javascript",json:!0});q.defineMIME("application/x-json",
{name:"javascript",json:!0});q.defineMIME("application/ld+json",{name:"javascript",jsonld:!0});q.defineMIME("text/typescript",{name:"javascript",typescript:!0});q.defineMIME("application/typescript",{name:"javascript",typescript:!0})});
(function(q){"object"==typeof exports&&"object"==typeof module?q(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],q):q(CodeMirror)})(function(q){var I={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,path:!0,use:!0,source:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,
dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,
caseFold:!0},C={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};q.defineMode("xml",function(t,w){function v(f,g){function k(k){g.tokenize=k;return k(f,g)}var p=f.next();if("<"==p){if(f.eat("!"))return f.eat("[")?f.match("CDATA[")?k(P("atom","]]\x3e")):null:f.match("--")?k(P("comment","--\x3e")):f.match("DOCTYPE",!0,!0)?(f.eatWhile(/[\w\._\-]/),k(W(1))):null;if(f.eat("?"))return f.eatWhile(/[\w\._\-]/),g.tokenize=
P("meta","?>"),"meta";za=f.eat("/")?"closeTag":"openTag";g.tokenize=D;return"tag bracket"}if("&"==p)return(f.eat("#")?f.eat("x")?f.eatWhile(/[a-fA-F\d]/)&&f.eat(";"):f.eatWhile(/[\d]/)&&f.eat(";"):f.eatWhile(/[\w\.\-:]/)&&f.eat(";"))?"atom":"error";f.eatWhile(/[^&<]/);return null}function D(f,g){var k=f.next();if(">"==k||"/"==k&&f.eat(">"))return g.tokenize=v,za=">"==k?"endTag":"selfcloseTag","tag bracket";if("="==k)return za="equals",null;if("<"==k)return g.tokenize=v,g.state=U,g.tagName=g.tagStart=
null,(k=g.tokenize(f,g))?k+" tag error":"tag error";if(/['"]/.test(k))return g.tokenize=J(k),g.stringStartCol=f.column(),g.tokenize(f,g);f.match(/^[^\s\u00a0=<>"']*[^\s\u00a0=<>"'\/]/);return"word"}function J(f){var g=function(g,k){for(;!g.eol();)if(g.next()==f){k.tokenize=D;break}return"string"};g.isInAttribute=!0;return g}function P(f,g){return function(k,p){for(;!k.eol();){if(k.match(g)){p.tokenize=v;break}k.next()}return f}}function W(f){return function(g,k){for(var p;null!=(p=g.next());){if("<"==
p)return k.tokenize=W(f+1),k.tokenize(g,k);if(">"==p)if(1==f){k.tokenize=v;break}else return k.tokenize=W(f-1),k.tokenize(g,k)}return"meta"}}function y(f,g,k){this.prev=f.context;this.tagName=g;this.indent=f.indented;this.startOfLine=k;if(ea.doNotIndent.hasOwnProperty(g)||f.context&&f.context.noIndent)this.noIndent=!0}function k(f){f.context&&(f.context=f.context.prev)}function H(f,g){for(var p;f.context;){p=f.context.tagName;if(!ea.contextGrabbers.hasOwnProperty(p)||!ea.contextGrabbers[p].hasOwnProperty(g))break;
k(f)}}function U(f,k,p){return"openTag"==f?(p.tagStart=k.column(),F):"closeTag"==f?g:U}function F(f,g,k){if("word"==f)return k.tagName=g.current(),A="tag",p;if(ea.allowMissingTagName&&"endTag"==f)return A="tag bracket",p(f,g,k);A="error";return F}function g(g,p,q){if("word"==g){g=p.current();q.context&&q.context.tagName!=g&&ea.implicitlyClosed.hasOwnProperty(q.context.tagName)&&k(q);if(q.context&&q.context.tagName==g||!1===ea.matchClosing)return A="tag",x;A="tag error";return f}if(ea.allowMissingTagName&&
"endTag"==g)return A="tag bracket",x(g,p,q);A="error";return f}function x(f,g,p){if("endTag"!=f)return A="error",x;k(p);return U}function f(f,g,k){A="error";return x(f,g,k)}function p(f,g,k){if("word"==f)return A="attribute",aa;if("endTag"==f||"selfcloseTag"==f){g=k.tagName;var x=k.tagStart;k.tagName=k.tagStart=null;"selfcloseTag"==f||ea.autoSelfClosers.hasOwnProperty(g)?H(k,g):(H(k,g),k.context=new y(k,g,x==k.indented));return U}A="error";return p}function aa(f,g,k){if("equals"==f)return O;ea.allowMissing||
(A="error");return p(f,g,k)}function O(f,g,k){if("string"==f)return Q;if("word"==f&&ea.allowUnquoted)return A="string",p;A="error";return p(f,g,k)}function Q(f,g,k){return"string"==f?Q:p(f,g,k)}var Ma=t.indentUnit,ea={},ab=w.htmlMode?I:C,ma;for(ma in ab)ea[ma]=ab[ma];for(ma in w)ea[ma]=w[ma];var za,A;v.isInText=!0;return{startState:function(f){var g={tokenize:v,state:U,indented:f||0,tagName:null,tagStart:null,context:null};null!=f&&(g.baseIndent=f);return g},token:function(f,g){!g.tagName&&f.sol()&&
(g.indented=f.indentation());if(f.eatSpace())return null;za=null;var k=g.tokenize(f,g);(k||za)&&"comment"!=k&&(A=null,g.state=g.state(za||k,f,g),A&&(k="error"==A?k+" error":A));return k},indent:function(f,g,k){var p=f.context;if(f.tokenize.isInAttribute)return f.tagStart==f.indented?f.stringStartCol+1:f.indented+Ma;if(p&&p.noIndent)return q.Pass;if(f.tokenize!=D&&f.tokenize!=v)return k?k.match(/^(\s*)/)[0].length:0;if(f.tagName)return!1!==ea.multilineTagIndentPastTag?f.tagStart+f.tagName.length+2:
f.tagStart+Ma*(ea.multilineTagIndentFactor||1);if(ea.alignCDATA&&/<!\[CDATA\[/.test(g))return 0;if((g=g&&/^<(\/)?([\w_:\.-]*)/.exec(g))&&g[1])for(;p;)if(p.tagName==g[2]){p=p.prev;break}else if(ea.implicitlyClosed.hasOwnProperty(p.tagName))p=p.prev;else break;else if(g)for(;p;)if((k=ea.contextGrabbers[p.tagName])&&k.hasOwnProperty(g[2]))p=p.prev;else break;for(;p&&p.prev&&!p.startOfLine;)p=p.prev;return p?p.indent+Ma:f.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",
configuration:ea.htmlMode?"html":"xml",helperType:ea.htmlMode?"html":"xml",skipAttribute:function(f){f.state==O&&(f.state=p)}}});q.defineMIME("text/xml","xml");q.defineMIME("application/xml","xml");q.mimeModes.hasOwnProperty("text/html")||q.defineMIME("text/html",{name:"xml",htmlMode:!0})});
(function(q){"object"==typeof exports&&"object"==typeof module?q(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],q):q(CodeMirror)})(function(q){function I(q){var v={};q=q.split(" ");for(var t=0;t<q.length;++t)v[q[t]]=!0;return v}function C(q,w,J){return 0==q.length?t(w):function(v,D){for(var y=q[0],k=0;k<y.length;k++)if(v.match(y[k][0]))return D.tokenize=
C(q.slice(1),w),y[k][1];D.tokenize=t(w,J);return"string"}}function t(q,t){return function(v,w){if(!1!==t&&v.match("${",!1)||v.match("{$",!1)){w.tokenize=null;var D="string"}else if(!1!==t&&v.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/))v.match("[",!1)&&(w.tokenize=C([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],q,t)),v.match(/\->\w/,!1)&&(w.tokenize=C([[["->",null]],[[/[\w]+/,"variable"]]],q,t)),D="variable-2";else{for(D=!1;!v.eol()&&(D||
!1===t||!v.match("{$",!1)&&!v.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!D&&v.match(q)){w.tokenize=null;w.tokStack.pop();w.tokStack.pop();break}D="\\"==v.next()&&!D}D="string"}return D}}q.registerHelper("hintWords","php","abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__ func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count".split(" "));
q.registerHelper("wordChars","php",/[\w$]/);var w={name:"clike",helperType:"php",keywords:I("abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally"),
blockKeywords:I("catch do else elseif for foreach if switch try while finally"),defKeywords:I("class function interface namespace trait"),atoms:I("true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__"),builtin:I("func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count"),
multiLineStrings:!0,hooks:{$:function(q){q.eatWhile(/[\w\$_]/);return"variable-2"},"<":function(q,w){var v;if(v=q.match(/<<\s*/)){var D=q.eat(/['"]/);q.eatWhile(/[\w\.]/);v=q.current().slice(v[0].length+(D?2:1));D&&q.eat(D);if(v)return(w.tokStack||(w.tokStack=[])).push(v,0),w.tokenize=t(v,"'"!=D),"string"}return!1},"#":function(q){for(;!q.eol()&&!q.match("?>",!1);)q.next();return"comment"},"/":function(q){if(q.eat("/")){for(;!q.eol()&&!q.match("?>",!1);)q.next();return"comment"}return!1},'"':function(q,
w){(w.tokStack||(w.tokStack=[])).push('"',0);w.tokenize=t('"');return"string"},"{":function(q,t){t.tokStack&&t.tokStack.length&&t.tokStack[t.tokStack.length-1]++;return!1},"}":function(q,w){w.tokStack&&0<w.tokStack.length&&!--w.tokStack[w.tokStack.length-1]&&(w.tokenize=t(w.tokStack[w.tokStack.length-2]));return!1}}};q.defineMode("php",function(v,t){var D=q.getMode(v,t&&t.htmlMode||"text/html"),C=q.getMode(v,w);return{startState:function(){var v=q.startState(D),y=t.startOpen?q.startState(C):null;
return{html:v,php:y,curMode:t.startOpen?C:D,curState:t.startOpen?y:v,pending:null}},copyState:function(v){var t=q.copyState(D,v.html),k=v.php;k=k&&q.copyState(C,k);return{html:t,php:k,curMode:v.curMode,curState:v.curMode==D?t:k,pending:v.pending}},token:function(v,t){var k=t.curMode==C;v.sol()&&t.pending&&'"'!=t.pending&&"'"!=t.pending&&(t.pending=null);if(k)return k&&null==t.php.tokenize&&v.match("?>")?(t.curMode=D,t.curState=t.html,t.php.context.prev||(t.php=null),"meta"):C.token(v,t.curState);
if(v.match(/^<\?\w*/))return t.curMode=C,t.php||(t.php=q.startState(C,D.indent(t.html,""))),t.curState=t.php,"meta";if('"'==t.pending||"'"==t.pending){for(;!v.eol()&&v.next()!=t.pending;);k="string"}else t.pending&&v.pos<t.pending.end?(v.pos=t.pending.end,k=t.pending.style):k=D.token(v,t.curState);t.pending&&(t.pending=null);var w=v.current(),y=w.search(/<\?/),F;-1!=y&&("string"==k&&(F=w.match(/['"]$/))&&!/\?>/.test(w)?t.pending=F[0]:t.pending={end:v.pos,style:k},v.backUp(w.length-y));return k},indent:function(q,
t){return q.curMode!=C&&/^\s*<\//.test(t)||q.curMode==C&&/^\?>/.test(t)?D.indent(q.html,t):q.curMode.indent(q.curState,t)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(q){return{state:q.curState,mode:q.curMode}}}},"htmlmixed","clike");q.defineMIME("application/x-httpd-php","php");q.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0});q.defineMIME("text/x-php",w)});
(function(q){"object"==typeof exports&&"object"==typeof module?q(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],q):q(CodeMirror)})(function(q){q.defineMode("sql",function(I,C){function t(g,q){var f=g.next();if(U[f]){var p=U[f](g,q);if(!1!==p)return p}if(H.hexNumber&&("0"==f&&g.match(/^[xX][0-9a-fA-F]+/)||("x"==f||"X"==f)&&g.match(/^'[0-9a-fA-F]+'/))||H.binaryNumber&&(("b"==f||"B"==f)&&g.match(/^'[01]+'/)||"0"==f&&g.match(/^b[01]+/)))return"number";
if(47<f.charCodeAt(0)&&58>f.charCodeAt(0))return g.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/),H.decimallessFloat&&g.match(/^\.(?!\.)/),"number";if("?"==f&&(g.eatSpace()||g.eol()||g.eat(";")))return"variable-3";if("'"==f||'"'==f&&H.doubleQuote)return q.tokenize=w(f),q.tokenize(g,q);if(!(H.nCharCast&&("n"==f||"N"==f)||H.charsetCast&&"_"==f&&g.match(/[a-z][a-z0-9]*/i))||"'"!=g.peek()&&'"'!=g.peek()){if(/^[\(\),;\[\]]/.test(f))return null;if(H.commentSlashSlash&&"/"==f&&g.eat("/")||H.commentHash&&
"#"==f||"-"==f&&g.eat("-")&&(!H.commentSpaceRequired||g.eat(" ")))return g.skipToEnd(),"comment";if("/"==f&&g.eat("*"))return q.tokenize=v(1),q.tokenize(g,q);if("."==f){if(H.zerolessFloat&&g.match(/^(?:\d+(?:e[+-]?\d+)?)/i))return"number";if(g.match(/^\.+/))return null;if(H.ODBCdotTable&&g.match(/^[\w\d_]+/))return"variable-2"}else{if(k.test(f))return g.eatWhile(k),null;if("{"==f&&(g.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||g.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";g.eatWhile(/^[_\w\d]/);
f=g.current().toLowerCase();return F.hasOwnProperty(f)&&(g.match(/^( )+'[^']*'/)||g.match(/^( )+"[^"]*"/))?"number":P.hasOwnProperty(f)?"atom":W.hasOwnProperty(f)?"builtin":y.hasOwnProperty(f)?"keyword":J.hasOwnProperty(f)?"string-2":null}}else return"keyword"}function w(g){return function(k,f){for(var p=!1,q;null!=(q=k.next());){if(q==g&&!p){f.tokenize=t;break}p=!p&&"\\"==q}return"string"}}function v(g){return function(k,f){var p=k.match(/^.*?(\/\*|\*\/)/);p?f.tokenize="/*"==p[1]?v(g+1):1<g?v(g-
1):t:k.skipToEnd();return"comment"}}function D(g,k,f){k.context={prev:k.context,indent:g.indentation(),col:g.column(),type:f}}var J=C.client||{},P=C.atoms||{"false":!0,"true":!0,"null":!0},W=C.builtin||{},y=C.keywords||{},k=C.operatorChars||/^[*+\-%<>!=&|~^]/,H=C.support||{},U=C.hooks||{},F=C.dateSQL||{date:!0,time:!0,timestamp:!0};return{startState:function(){return{tokenize:t,context:null}},token:function(g,k){g.sol()&&k.context&&null==k.context.align&&(k.context.align=!1);if(k.tokenize==t&&g.eatSpace())return null;
var f=k.tokenize(g,k);if("comment"==f)return f;k.context&&null==k.context.align&&(k.context.align=!0);var p=g.current();"("==p?D(g,k,")"):"["==p?D(g,k,"]"):k.context&&k.context.type==p&&(k.indent=k.context.indent,k.context=k.context.prev);return f},indent:function(g,k){var f=g.context;if(!f)return q.Pass;var p=k.charAt(0)==f.type;return f.align?f.col+(p?0:1):f.indent+(p?0:I.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:H.commentSlashSlash?"//":H.commentHash?"#":"--"}});(function(){function I(q){for(var t;null!=
(t=q.next());)if("`"==t&&!q.eat("`"))return"variable-2";q.backUp(q.current().length-1);return q.eatWhile(/\w/)?"variable-2":null}function C(q){q.eat("@")&&(q.match(/^session\./),q.match(/^local\./),q.match(/^global\./));return q.eat("'")?(q.match(/^.*'/),"variable-2"):q.eat('"')?(q.match(/^.*"/),"variable-2"):q.eat("`")?(q.match(/^.*`/),"variable-2"):q.match(/^[0-9a-zA-Z$\._]+/)?"variable-2":null}function t(q){return q.eat("N")?"atom":q.match(/^[a-zA-Z.#!?]/)?"variable-2":null}function w(q){var t=
{};q=q.split(" ");for(var v=0;v<q.length;++v)t[q[v]]=!0;return t}q.defineMIME("text/x-sql",{name:"sql",keywords:w("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit begin"),builtin:w("bool boolean bit blob enum 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 real date datetime year unsigned signed decimal numeric"),
atoms:w("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:w("date time timestamp"),support:w("ODBCdotTable doubleQuote binaryNumber hexNumber")});q.defineMIME("text/x-mssql",{name:"sql",client:w("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:w("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec"),
builtin:w("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:w("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:w("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":C}});q.defineMIME("text/x-mysql",{name:"sql",client:w("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),
keywords:w("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit 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 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 diagnostics 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 get global grant grants group group_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:w("bool boolean bit blob decimal double 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:w("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:w("date time timestamp"),support:w("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),
hooks:{"@":C,"`":I,"\\":t}});q.defineMIME("text/x-mariadb",{name:"sql",client:w("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:w("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit 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 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 diagnostics 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 get 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 shutdown 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:w("bool boolean bit blob decimal double 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:w("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:w("date time timestamp"),support:w("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),
hooks:{"@":C,"`":I,"\\":t}});q.defineMIME("text/x-sqlite",{name:"sql",client:w("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:w("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),
builtin:w("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:w("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:w("date time timestamp datetime"),support:w("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":C,":":C,"?":C,$:C,'"':function(q){for(var t;null!=
(t=q.next());)if('"'==t&&!q.eat('"'))return"variable-2";q.backUp(q.current().length-1);return q.eatWhile(/\w/)?"variable-2":null},"`":I}});q.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:w("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),
builtin:w("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:w("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:w("commentSlashSlash decimallessFloat"),hooks:{}});q.defineMIME("text/x-plsql",{name:"sql",client:w("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:w("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 elseif 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 returns 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"),
builtin:w("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob 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 number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),
operatorChars:/^[*+\-%<>!=~]/,dateSQL:w("date time timestamp"),support:w("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")});q.defineMIME("text/x-hive",{name:"sql",keywords:w("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external false fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger true unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with"),
builtin:w("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype"),atoms:w("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:w("date timestamp"),support:w("ODBCdotTable doubleQuote binaryNumber hexNumber")});q.defineMIME("text/x-pgsql",{name:"sql",client:w("source"),keywords:w("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit a abort abs absent absolute access according action ada add admin after aggregate all allocate also always analyse analyze any are array array_agg array_max_cardinality asensitive assertion assignment asymmetric at atomic attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli binary bit_length blob blocked bom both breadth c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain characteristics characters character_length character_set_catalog character_set_name character_set_schema char_length check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column columns column_name command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constraint constraints constraint_catalog constraint_name constraint_schema constructor contains content continue control conversion convert copy corr corresponding cost covar_pop covar_samp cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datetime_interval_code datetime_interval_precision day db deallocate dec declare default defaults deferrable deferred defined definer degree delimiter delimiters dense_rank depth deref derived describe descriptor deterministic diagnostics dictionary disable discard disconnect dispatch dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain dynamic dynamic_function dynamic_function_code each element else empty enable encoding encrypted end end-exec end_frame end_partition enforced enum equals escape event every except exception exclude excluding exclusive exec execute exists exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreign fortran forward found frame_row free freeze fs full function functions fusion g general generated get global go goto grant granted greatest grouping groups handler header hex hierarchy hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import including increment indent index indexes indicator inherit inherits initially inline inner inout input insensitive instance instantiable instead integrity intersect intersection invoker isnull isolation k key key_member key_type label lag language large last last_value lateral lc_collate lc_ctype lead leading leakproof least left length level library like_regex link listen ln load local localtime localtimestamp location locator lock locked logged lower m map mapping match matched materialized max maxvalue max_cardinality member merge message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized nothing notify notnull nowait nth_value ntile null nullable nullif nulls number object occurrences_regex octets octet_length of off offset oids old only open operator option options ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password percent percentile_cont percentile_disc percent_rank period permission placing plans pli policy portion position position_regex power precedes preceding prepare prepared preserve primary prior privileges procedural procedure program public quote range rank read reads reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict restricted result return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns revoke right role rollback rollup routine routine_catalog routine_name routine_schema row rows row_count row_number rule savepoint scale schema schema_name scope scope_catalog scope_name scope_schema scroll search second section security selective self sensitive sequence sequences serializable server server_name session session_user setof sets share show similar simple size skip snapshot some source space specific specifictype specific_name sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset substring substring_regex succeeds sum symmetric sysid system system_time system_user t tables tablesample tablespace table_name temp template temporary then ties timezone_hour timezone_minute to token top_level_count trailing transaction transactions_committed transactions_rolled_back transaction_active transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted unique unknown unlink unlisten unlogged unnamed unnest until untyped upper uri usage user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of varbinary variadic var_pop var_samp verbose version versioning view views volatile when whenever whitespace width_bucket window within work wrapper write xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes loop repeat attach path depends detach zone"),
builtin:w("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:w("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:w("date time timestamp"),
support:w("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")});q.defineMIME("text/x-gql",{name:"sql",keywords:w("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:w("false true"),builtin:w("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/});q.defineMIME("text/x-gpsql",{name:"sql",client:w("source"),keywords:w("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"),
builtin:w("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:w("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,
dateSQL:w("date time timestamp"),support:w("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")});q.defineMIME("text/x-sparksql",{name:"sql",keywords:w("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases datata dbproperties defined delete delimited desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"),
builtin:w("tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat"),atoms:w("false true null"),operatorChars:/^[*+\-%<>!=~&|^]/,dateSQL:w("date time timestamp"),support:w("ODBCdotTable doubleQuote zerolessFloat")});q.defineMIME("text/x-esper",{name:"sql",client:w("source"),keywords:w("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"),
builtin:{},atoms:w("false true null"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:w("time"),support:w("decimallessFloat zerolessFloat binaryNumber hexNumber")})})()});
(function(q){"object"==typeof exports&&"object"==typeof module?q(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],q):q(CodeMirror)})(function(q){function I(q,w,v){q=q.getWrapperElement().appendChild(document.createElement("div"));q.className=v?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top";"string"==typeof w?q.innerHTML=w:q.appendChild(w);return q}function C(q,w){q.state.currentNotificationClose&&q.state.currentNotificationClose();
q.state.currentNotificationClose=w}q.defineExtension("openDialog",function(t,w,v){function D(k){if("string"==typeof k)y.value=k;else if(!P&&(P=!0,J.parentNode.removeChild(J),W.focus(),v.onClose))v.onClose(J)}v||(v={});C(this,null);var J=I(this,t,v.bottom),P=!1,W=this,y=J.getElementsByTagName("input")[0];if(y){y.focus();v.value&&(y.value=v.value,!1!==v.selectValueOnOpen&&y.select());if(v.onInput)q.on(y,"input",function(k){v.onInput(k,y.value,D)});if(v.onKeyUp)q.on(y,"keyup",function(k){v.onKeyUp(k,
y.value,D)});q.on(y,"keydown",function(k){if(!(v&&v.onKeyDown&&v.onKeyDown(k,y.value,D))){if(27==k.keyCode||!1!==v.closeOnEnter&&13==k.keyCode)y.blur(),q.e_stop(k),D();13==k.keyCode&&w(y.value,k)}});if(!1!==v.closeOnBlur)q.on(y,"blur",D)}else if(t=J.getElementsByTagName("button")[0]){q.on(t,"click",function(){D();W.focus()});if(!1!==v.closeOnBlur)q.on(t,"blur",D);t.focus()}return D});q.defineExtension("openConfirm",function(t,w,v){function D(){P||(P=!0,J.parentNode.removeChild(J),W.focus())}C(this,
null);var J=I(this,t,v&&v.bottom);t=J.getElementsByTagName("button");var P=!1,W=this,y=1;t[0].focus();for(v=0;v<t.length;++v){var k=t[v];(function(t){q.on(k,"click",function(k){q.e_preventDefault(k);D();t&&t(W)})})(w[v]);q.on(k,"blur",function(){--y;setTimeout(function(){0>=y&&D()},200)});q.on(k,"focus",function(){++y})}});q.defineExtension("openNotification",function(t,w){function v(){J||(J=!0,clearTimeout(P),D.parentNode.removeChild(D))}C(this,v);var D=I(this,t,w&&w.bottom),J=!1,P,W=w&&"undefined"!==
typeof w.duration?w.duration:5E3;q.on(D,"click",function(t){q.e_preventDefault(t);v()});W&&(P=setTimeout(v,W));return v})});
(function(q){"object"==typeof exports&&"object"==typeof module?q(require("../../lib/codemirror"),require("./searchcursor"),require("../dialog/dialog")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","./searchcursor","../dialog/dialog"],q):q(CodeMirror)})(function(q){function I(f,g){"string"==typeof f?f=new RegExp(f.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),g?"gi":"g"):f.global||(f=new RegExp(f.source,f.ignoreCase?"gi":"g"));return{token:function(g){f.lastIndex=g.pos;
var k=f.exec(g.string);if(k&&k.index==g.pos)return g.pos+=k[0].length||1,"searching";k?g.pos=k.index:g.skipToEnd()}}}function C(){this.overlay=this.posFrom=this.posTo=this.lastQuery=this.query=null}function t(f){return f.state.search||(f.state.search=new C)}function w(f){return"string"==typeof f&&f==f.toLowerCase()}function v(f,g,k){return f.getSearchCursor(g,k,{caseFold:w(g),multiline:!0})}function D(f,g,k,q,t){f.openDialog(g,q,{value:k,selectValueOnOpen:!0,closeOnEnter:!1,onClose:function(){F(f)},
onKeyDown:t})}function J(f,g,k,q,t){f.openDialog?f.openDialog(g,t,{value:q,selectValueOnOpen:!0}):t(prompt(k,q))}function P(f,g,k,q){if(f.openConfirm)f.openConfirm(g,q);else if(confirm(k))q[0]()}function W(f){return f.replace(/\\(.)/g,function(f,g){return"n"==g?"\n":"r"==g?"\r":g})}function y(f){var g=f.match(/^\/(.*)\/([a-z]*)$/);if(g)try{f=new RegExp(g[1],-1==g[2].indexOf("i")?"":"i")}catch(aa){}else f=W(f);if("string"==typeof f?""==f:f.test(""))f=/x^/;return f}function k(f,g,k){g.queryText=k;g.query=
y(k);f.removeOverlay(g.overlay,w(g.query));g.overlay=I(g.query,w(g.query));f.addOverlay(g.overlay);f.showMatchesOnScrollbar&&(g.annotate&&(g.annotate.clear(),g.annotate=null),g.annotate=f.showMatchesOnScrollbar(g.query,w(g.query)))}function H(f,g,x,v){var p=t(f);if(p.query)return U(f,g);var w=f.getSelection()||p.lastQuery;w instanceof RegExp&&"x^"==w.source&&(w=null);if(x&&f.openDialog){var F=null,y=function(g,t){q.e_stop(t);g&&(g!=p.queryText&&(k(f,p,g),p.posFrom=p.posTo=f.getCursor()),F&&(F.style.opacity=
1),U(f,t.shiftKey,function(g,k){var p;3>k.line&&document.querySelector&&(p=f.display.wrapper.querySelector(".CodeMirror-dialog"))&&p.getBoundingClientRect().bottom-4>f.cursorCoords(k,"window").top&&((F=p).style.opacity=.4)}))};D(f,'<span class="CodeMirror-search-label">Search:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>',w,y,function(g,p){var x=q.keyName(g),v=f.getOption("extraKeys");
x=v&&v[x]||q.keyMap[f.getOption("keyMap")][x];if("findNext"==x||"findPrev"==x||"findPersistentNext"==x||"findPersistentPrev"==x)q.e_stop(g),k(f,t(f),p),f.execCommand(x);else if("find"==x||"findPersistent"==x)q.e_stop(g),y(p,g)});v&&w&&(k(f,p,w),U(f,g))}else J(f,'<span class="CodeMirror-search-label">Search:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>',"Search for:",
w,function(q){q&&!p.query&&f.operation(function(){k(f,p,q);p.posFrom=p.posTo=f.getCursor();U(f,g)})})}function U(f,g,k){f.operation(function(){var p=t(f),x=v(f,p.query,g?p.posFrom:p.posTo);if(!x.find(g)&&(x=v(f,p.query,g?q.Pos(f.lastLine()):q.Pos(f.firstLine(),0)),!x.find(g)))return;f.setSelection(x.from(),x.to());f.scrollIntoView({from:x.from(),to:x.to()},20);p.posFrom=x.from();p.posTo=x.to();k&&k(x.from(),x.to())})}function F(f){f.operation(function(){var g=t(f);if(g.lastQuery=g.query)g.query=g.queryText=
null,f.removeOverlay(g.overlay),g.annotate&&(g.annotate.clear(),g.annotate=null)})}function g(f,g,k){f.operation(function(){for(var p=v(f,g);p.findNext();)if("string"!=typeof g){var q=f.getRange(p.from(),p.to()).match(g);p.replace(k.replace(/\$(\d)/g,function(f,g){return q[g]}))}else p.replace(k)})}function x(f,k){if(!f.getOption("readOnly")){var p=f.getSelection()||t(f).lastQuery,q='<span class="CodeMirror-search-label">'+(k?"Replace all:":"Replace:")+"</span>";J(f,q+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">(Use /re/ syntax for regexp search)</span>',
q,p,function(p){p&&(p=y(p),J(f,'<span class="CodeMirror-search-label">With:</span> <input type="text" style="width: 10em" class="CodeMirror-search-field"/>',"Replace with:","",function(q){q=W(q);if(k)g(f,p,q);else{F(f);var t=v(f,p,f.getCursor("from")),x=function(){var k=t.from(),F;if(!(F=t.findNext())&&(t=v(f,p),!(F=t.findNext())||k&&t.from().line==k.line&&t.from().ch==k.ch))return;f.setSelection(t.from(),t.to());f.scrollIntoView({from:t.from(),to:t.to()});P(f,'<span class="CodeMirror-search-label">Replace?</span> <button>Yes</button> <button>No</button> <button>All</button> <button>Stop</button>',
"Replace?",[function(){w(F)},x,function(){g(f,p,q)}])},w=function(f){t.replace("string"==typeof p?q:q.replace(/\$(\d)/g,function(g,k){return f[k]}));x()};x()}}))})}}q.commands.find=function(f){F(f);H(f)};q.commands.findPersistent=function(f){F(f);H(f,!1,!0)};q.commands.findPersistentNext=function(f){H(f,!1,!0,!0)};q.commands.findPersistentPrev=function(f){H(f,!0,!0,!0)};q.commands.findNext=H;q.commands.findPrev=function(f){H(f,!0)};q.commands.clearSearch=F;q.commands.replace=x;q.commands.replaceAll=
function(f){x(f,!0)}});
(function(q){"object"==typeof exports&&"object"==typeof module?q(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],q):q(CodeMirror)})(function(q){function I(k){if(!k.global){var g=k.flags;k=new RegExp(k.source,(null!=g?g:(k.ignoreCase?"i":"")+(k.global?"g":"")+(k.multiline?"m":""))+"g")}return k}function C(q,g,t){g=I(g);var f=t.line,p=t.ch;for(t=q.lastLine();f<=t;f++,p=0)if(g.lastIndex=p,p=q.getLine(f),p=g.exec(p))return{from:k(f,p.index),to:k(f,
p.index+p[0].length),match:p}}function t(q,g,t){if(!/\\s|\\n|\n|\\W|\\D|\[\^/.test(g.source))return C(q,g,t);g=I(g);for(var f,p=1,x=t.line,v=q.lastLine();x<=v;){for(var w=0;w<p;w++){var y=q.getLine(x++);f=null==f?y:f+"\n"+y}p*=2;g.lastIndex=t.ch;if(w=g.exec(f))return g=f.slice(0,w.index).split("\n"),q=w[0].split("\n"),t=t.line+g.length-1,g=g[g.length-1].length,{from:k(t,g),to:k(t+q.length-1,1==q.length?g+q[0].length:q[q.length-1].length),match:w}}}function w(k,g){for(var q=0,f;;){g.lastIndex=q;q=
g.exec(k);if(!q)return f;f=q;q=f.index+(f[0].length||1);if(q==k.length)return f}}function v(q,g,t){g=I(g);var f=t.line,p=t.ch;for(t=q.firstLine();f>=t;f--,p=-1){var x=q.getLine(f);-1<p&&(x=x.slice(0,p));if(p=w(x,g))return{from:k(f,p.index),to:k(f,p.index+p[0].length),match:p}}}function D(q,g,t){g=I(g);for(var f,p=1,x=t.line,v=q.firstLine();x>=v;){for(var y=0;y<p;y++){var F=q.getLine(x--);f=null==f?F.slice(0,t.ch):F+"\n"+f}p*=2;if(y=w(f,g))return g=f.slice(0,y.index).split("\n"),q=y[0].split("\n"),
x+=g.length,g=g[g.length-1].length,{from:k(x,g),to:k(x+q.length-1,1==q.length?g+q[0].length:q[q.length-1].length),match:y}}}function J(k,g,q,f){if(k.length==g.length)return q;var p=0;for(g=q+Math.max(0,k.length-g.length);;){if(p==g)return p;var t=p+g>>1,x=f(k.slice(0,t)).length;if(x==q)return t;x>q?g=t:p=t+1}}function P(q,g,t,f){if(!g.length)return null;f=f?H:U;g=f(g).split(/\r|\n\r?/);var p=t.line;t=t.ch;var x=q.lastLine()+1-g.length;a:for(;p<=x;p++,t=0){var v=q.getLine(p).slice(t),w=f(v);if(1==
g.length){var y=w.indexOf(g[0]);if(-1==y)continue a;J(v,w,y,f);return{from:k(p,J(v,w,y,f)+t),to:k(p,J(v,w,y+g[0].length,f)+t)}}y=w.length-g[0].length;if(w.slice(y)!=g[0])continue a;for(var F=1;F<g.length-1;F++)if(f(q.getLine(p+F))!=g[F])continue a;F=q.getLine(p+g.length-1);var C=f(F),D=g[g.length-1];if(C.slice(0,D.length)!=D)continue a;return{from:k(p,J(v,w,y,f)+t),to:k(p+g.length-1,J(F,C,D.length,f))}}}function W(q,g,t,f){if(!g.length)return null;f=f?H:U;g=f(g).split(/\r|\n\r?/);var p=t.line,v=t.ch,
x=q.firstLine()-1+g.length;a:for(;p>=x;p--,v=-1){var w=q.getLine(p);-1<v&&(w=w.slice(0,v));v=f(w);if(1==g.length){t=v.lastIndexOf(g[0]);if(-1==t)continue a;return{from:k(p,J(w,v,t,f)),to:k(p,J(w,v,t+g[0].length,f))}}var y=g[g.length-1];if(v.slice(0,y.length)!=y)continue a;var F=1;for(t=p-g.length+1;F<g.length-1;F++)if(f(q.getLine(t+F))!=g[F])continue a;t=q.getLine(p+1-g.length);F=f(t);if(F.slice(F.length-g[0].length)!=g[0])continue a;return{from:k(p+1-g.length,J(t,F,t.length-g[0].length,f)),to:k(p,
J(w,v,y.length,f))}}}function y(q,g,x,f){this.atOccurrence=!1;this.doc=q;x=x?q.clipPos(x):k(0,0);this.pos={from:x,to:x};if("object"==typeof f)var p=f.caseFold;else p=f,f=null;"string"==typeof g?(null==p&&(p=!1),this.matches=function(f,k){return(f?W:P)(q,g,k,p)}):(g=I(g),this.matches=f&&!1===f.multiline?function(f,k){return(f?v:C)(q,g,k)}:function(f,k){return(f?D:t)(q,g,k)})}var k=q.Pos;if(String.prototype.normalize){var H=function(k){return k.normalize("NFD").toLowerCase()};var U=function(k){return k.normalize("NFD")}}else H=
function(k){return k.toLowerCase()},U=function(k){return k};y.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){for(var g=this.matches(t,this.doc.clipPos(t?this.pos.from:this.pos.to));g&&0==q.cmpPos(g.from,g.to);)t?g.from.ch?g.from=k(g.from.line,g.from.ch-1):g=g.from.line==this.doc.firstLine()?null:this.matches(t,this.doc.clipPos(k(g.from.line-1))):g.to.ch<this.doc.getLine(g.to.line).length?g.to=k(g.to.line,g.to.ch+1):g=g.to.line==
this.doc.lastLine()?null:this.matches(t,k(g.to.line+1,0));if(g)return this.pos=g,this.atOccurrence=!0,this.pos.match||!0;t=k(t?this.doc.firstLine():this.doc.lastLine()+1,0);this.pos={from:t,to:t};return this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,g){if(this.atOccurrence){var v=q.splitLines(t);this.doc.replaceRange(v,this.pos.from,this.pos.to,g);this.pos.to=k(this.pos.from.line+v.length-1,
v[v.length-1].length+(1==v.length?this.pos.from.ch:0))}}};q.defineExtension("getSearchCursor",function(k,g,q){return new y(this.doc,k,g,q)});q.defineDocExtension("getSearchCursor",function(k,g,q){return new y(this,k,g,q)});q.defineExtension("selectMatches",function(k,g){for(var t=[],f=this.getSearchCursor(k,this.getCursor("from"),g);f.findNext()&&!(0<q.cmpPos(f.to(),this.getCursor("to")));)t.push({anchor:f.from(),head:f.to()});t.length&&this.setSelections(t,0)})});

(function(p){"object"==typeof exports&&"object"==typeof module?p(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],p):p(CodeMirror)})(function(p){function C(a,b,d,c,f,m){this.indented=a;this.column=b;this.type=d;this.info=c;this.align=f;this.prev=m}function y(a,b,d,c){var G=a.indented;a.context&&"statement"==a.context.type&&"statement"!=d&&(G=a.context.indented);return a.context=new C(G,b,d,c,null,a.context)}function v(a){var b=a.context.type;if(")"==
b||"]"==b||"}"==b)a.indented=a.context.indented;return a.context=a.context.prev}function H(a,b,d){if("variable"==b.prevToken||"type"==b.prevToken||/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(a.string.slice(0,d))||b.typeAtEndOfLine&&a.column()==a.indentation())return!0}function I(a){for(;;){if(!a||"top"==a.type)return!0;if("}"==a.type&&"namespace"!=a.prev.info)return!1;a=a.prev}}function c(a){var b={};a=a.split(" ");for(var d=0;d<a.length;++d)b[a[d]]=!0;return b}function q(a,b){return"function"===typeof a?a(b):
a.propertyIsEnumerable(b)}function n(a,b){if(!b.startOfLine)return!1;for(var d,c=null;d=a.peek();){if("\\"==d&&a.match(/^.$/)){c=n;break}else if("/"==d&&a.match(/^\/[\/\*]/,!1))break;a.next()}b.tokenize=c;return"meta"}function z(a,b){return"type"==b.prevToken?"type":!1}function k(a){a.eatWhile(/[\w\.']/);return"number"}function r(a,b){a.backUp(1);if(a.match(/(R|u8R|uR|UR|LR)/)){var d=a.match(/"([^\s\\()]{0,16})\(/);if(!d)return!1;b.cpp11RawStringDelim=d[1];b.tokenize=w;return w(a,b)}if(a.match(/(u8|u|U|L)/))return a.match(/["']/,
!1)?"string":!1;a.next();return!1}function A(a,b){for(var d;null!=(d=a.next());)if('"'==d&&!a.eat('"')){b.tokenize=null;break}return"string"}function w(a,b){var d=b.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");a.match(new RegExp(".*?\\)"+d+'"'))?b.tokenize=null:a.skipToEnd();return"string"}function l(a,b){function d(a){if(a)for(var b in a)a.hasOwnProperty(b)&&c.push(b)}"string"==typeof a&&(a=[a]);var c=[];d(b.keywords);d(b.types);d(b.builtin);d(b.atoms);c.length&&(b.helperType=a[0],p.registerHelper("hintWords",
a[0],c));for(var f=0;f<a.length;++f)p.defineMIME(a[f],b)}function D(a,b){for(var c=!1;!a.eol();){if(!c&&a.match('"""')){b.tokenize=null;break}c="\\"==a.next()&&!c}return"string"}function x(a){return function(b,c){for(var d;d=b.next();)if("*"==d&&b.eat("/"))if(1==a){c.tokenize=null;break}else return c.tokenize=x(a-1),c.tokenize(b,c);else if("/"==d&&b.eat("*"))return c.tokenize=x(a+1),c.tokenize(b,c);return"comment"}}function E(a){return function(b,c){for(var d=!1,f,m=!1;!b.eol();){if(!a&&!d&&b.match('"')){m=
!0;break}if(a&&b.match('"""')){m=!0;break}f=b.next();!d&&"$"==f&&b.match("{")&&b.skipTo("}");d=!d&&"\\"==f&&!a}if(m||!a)c.tokenize=null;return"string"}}function B(a){return function(b,c){for(var d=!1,f,m=!1;!b.eol();){if(!d&&b.match('"')&&("single"==a||b.match('""'))){m=!0;break}if(!d&&b.match("``")){t=B(a);m=!0;break}f=b.next();d="single"==a&&!d&&"\\"==f}m&&(c.tokenize=null);return"string"}}p.defineMode("clike",function(a,b){function c(a,b){var c=a.next();if(u[c]){var d=u[c](a,b);if(!1!==d)return d}if('"'==
c||"'"==c)return b.tokenize=l(c),b.tokenize(a,b);if(N.test(c))return g=c,null;if(O.test(c)){a.backUp(1);if(a.match(P))return"number";a.next()}if("/"==c){if(a.eat("*"))return b.tokenize=f,f(a,b);if(a.eat("/"))return a.skipToEnd(),"comment"}if(K.test(c)){for(;!a.match(/^\/[\/*]/,!1)&&a.eat(K););return"operator"}a.eatWhile(L);if(M)for(;a.match(M);)a.eatWhile(L);c=a.current();return q(t,c)?(q(w,c)&&(g="newstatement"),q(A,c)&&(F=!0),"keyword"):q(x,c)?"type":q(z,c)?(q(w,c)&&(g="newstatement"),"builtin"):
q(B,c)?"atom":"variable"}function l(a){return function(b,c){for(var d=!1,e,J=!1;null!=(e=b.next());){if(e==a&&!d){J=!0;break}d=!d&&"\\"==e}if(J||!d&&!D)c.tokenize=null;return"string"}}function f(a,b){for(var c=!1,d;d=a.next();){if("/"==d&&c){b.tokenize=null;break}c="*"==d}return"comment"}function m(a,c){b.typeFirstDefinitions&&a.eol()&&I(c.context)&&(c.typeAtEndOfLine=H(a,c,a.pos))}var k=a.indentUnit,n=b.statementIndentUnit||k,r=b.dontAlignCalls,t=b.keywords||{},x=b.types||{},z=b.builtin||{},w=b.blockKeywords||
{},A=b.defKeywords||{},B=b.atoms||{},u=b.hooks||{},D=b.multiLineStrings,E=!1!==b.indentStatements,M=b.namespaceSeparator,N=b.isPunctuationChar||/[\[\]{}\(\),;:\.]/,O=b.numberStart||/[\d\.]/,P=b.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,K=b.isOperatorChar||/[+\-*&%=<>!?|\/]/,L=b.isIdentifierChar||/[\w\$_\xa1-\uffff]/,g,F;return{startState:function(a){return{tokenize:null,context:new C((a||0)-k,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(a,
d){var e=d.context;a.sol()&&(null==e.align&&(e.align=!1),d.indented=a.indentation(),d.startOfLine=!0);if(a.eatSpace())return m(a,d),null;g=F=null;var h=(d.tokenize||c)(a,d);if("comment"==h||"meta"==h)return h;null==e.align&&(e.align=!0);if(";"==g||":"==g||","==g&&a.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==d.context.type;)v(d);else if("{"==g)y(d,a.column(),"}");else if("["==g)y(d,a.column(),"]");else if("("==g)y(d,a.column(),")");else if("}"==g){for(;"statement"==e.type;)e=v(d);for("}"==e.type&&
(e=v(d));"statement"==e.type;)e=v(d)}else g==e.type?v(d):E&&(("}"==e.type||"top"==e.type)&&";"!=g||"statement"==e.type&&"newstatement"==g)&&y(d,a.column(),"statement",a.current());"variable"==h&&("def"==d.prevToken||b.typeFirstDefinitions&&H(a,d,a.start)&&I(d.context)&&a.match(/^\s*\(/,!1))&&(h="def");u.token&&(e=u.token(a,d,h),void 0!==e&&(h=e));"def"==h&&!1===b.styleDefs&&(h="variable");d.startOfLine=!1;d.prevToken=F?"def":h||g;m(a,d);return h},indent:function(a,d){if(a.tokenize!=c&&null!=a.tokenize||
a.typeAtEndOfLine)return p.Pass;var e=a.context,h=d&&d.charAt(0);"statement"==e.type&&"}"==h&&(e=e.prev);if(b.dontIndentStatements)for(;"statement"==e.type&&b.dontIndentStatements.test(e.info);)e=e.prev;if(u.indent){var f=u.indent(a,e,d);if("number"==typeof f)return f}f=h==e.type;var g=e.prev&&"switch"==e.prev.info;if(b.allmanIndentation&&/[{(]/.test(h)){for(;"top"!=e.type&&"}"!=e.type;)e=e.prev;return e.indented}return"statement"==e.type?e.indented+("{"==h?0:n):!e.align||r&&")"==e.type?")"!=e.type||
f?e.indented+(f?0:k)+(f||!g||/^(?:case|default)\b/.test(d)?0:k):e.indented+n:e.column+(f?0:1)},electricInput:!1!==b.indentSwitch?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:"//",fold:"brace"}});l(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:c("auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile"),types:c("int long char short double float unsigned signed void size_t ptrdiff_t bool _Complex _Bool float_t double_t intptr_t intmax_t int8_t int16_t int32_t int64_t uintptr_t uintmax_t uint8_t uint16_t uint32_t uint64_t"),
blockKeywords:c("case do else for if switch while struct"),defKeywords:c("struct"),typeFirstDefinitions:!0,atoms:c("null true false"),hooks:{"#":n,"*":z},modeProps:{fold:["brace","include"]}});l(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:c("auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile asm dynamic_cast namespace reinterpret_cast try explicit new static_cast typeid catch operator template typename class friend private this using const_cast inline public throw virtual delete mutable protected alignas alignof constexpr decltype nullptr noexcept thread_local final static_assert override"),
types:c("int long char short double float unsigned signed void size_t ptrdiff_t bool wchar_t"),blockKeywords:c("catch class do else finally for if struct switch try while"),defKeywords:c("class namespace struct enum union"),typeFirstDefinitions:!0,atoms:c("true false null"),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,hooks:{"#":n,"*":z,u:r,U:r,L:r,R:r,0:k,1:k,2:k,3:k,4:k,5:k,6:k,7:k,8:k,9:k,token:function(a,b,c){if(b="variable"==c&&"("==a.peek()&&(";"==b.prevToken||null==
b.prevToken||"}"==b.prevToken))a=a.current(),b=(a=/(\w+)::~?(\w+)$/.exec(a))&&a[1]==a[2];if(b)return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}});l("text/x-java",{name:"clike",keywords:c("abstract assert break case catch class const continue default do else enum extends final finally float for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),
types:c("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:c("catch class do else finally for if switch try while"),defKeywords:c("class interface enum @interface"),typeFirstDefinitions:!0,atoms:c("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(a){if(a.match("interface",!1))return!1;a.eatWhile(/[\w\$_]/);
return"meta"}},modeProps:{fold:["brace","import"]}});l("text/x-csharp",{name:"clike",keywords:c("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),
types:c("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:c("catch class do else finally for foreach if struct switch try while"),defKeywords:c("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:c("true false null"),hooks:{"@":function(a,b){if(a.eat('"'))return b.tokenize=
A,A(a,b);a.eatWhile(/[\w\$_]/);return"meta"}}});l("text/x-scala",{name:"clike",keywords:c("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:c("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int 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"),
multiLineStrings:!0,blockKeywords:c("catch class enum do else finally for forSome if match switch try while"),defKeywords:c("class enum def object package trait type val var"),atoms:c("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(a){a.eatWhile(/[\w\$_]/);return"meta"},'"':function(a,b){if(!a.match('""'))return!1;b.tokenize=D;return b.tokenize(a,b)},"'":function(a){a.eatWhile(/[\w\$_\xa1-\uffff]/);return"atom"},"=":function(a,b){var c=
b.context;return"}"==c.type&&c.align&&a.eat(">")?(b.context=new C(c.indented,c.column,c.type,c.info,null,c.prev),"operator"):!1},"/":function(a,b){if(!a.eat("*"))return!1;b.tokenize=x(1);return b.tokenize(a,b)}},modeProps:{closeBrackets:{triples:'"'}}});l("text/x-kotlin",{name:"clike",keywords:c("package as typealias class interface this super val var fun for is in This throw return break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend actual expect"),
types:c("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"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:c("catch class do else finally for if where try while enum"),
defKeywords:c("class val var object interface fun"),atoms:c("true false null this"),hooks:{'"':function(a,b){b.tokenize=E(a.match('""'));return b.tokenize(a,b)}},modeProps:{closeBrackets:{triples:'"'}}});l(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:c("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:c("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),
blockKeywords:c("for while do if else struct"),builtin:c("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 smoothstep 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:c("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_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing 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"),
indentSwitch:!1,hooks:{"#":n},modeProps:{fold:["brace","include"]}});l("text/x-nesc",{name:"clike",keywords:c("auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatileas atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:c("int long char short double float unsigned signed void size_t ptrdiff_t"),
blockKeywords:c("case do else for if switch while struct"),atoms:c("null true false"),hooks:{"#":n},modeProps:{fold:["brace","include"]}});l("text/x-objectivec",{name:"clike",keywords:c("auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatileinline restrict _Bool _Complex _Imaginary BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),
types:c("int long char short double float unsigned signed void size_t ptrdiff_t"),atoms:c("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(a){a.eatWhile(/[\w\$]/);return"keyword"},"#":n,indent:function(a,b,c){if("statement"==b.type&&/^@\w/.test(c))return b.indented}},modeProps:{fold:"brace"}});l("text/x-squirrel",{name:"clike",keywords:c("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),
types:c("int long char short double float unsigned signed void size_t ptrdiff_t"),blockKeywords:c("case catch class else for foreach if switch try while"),defKeywords:c("function local class"),typeFirstDefinitions:!0,atoms:c("true false null"),hooks:{"#":n},modeProps:{fold:["brace","include"]}});var t=null;l("text/x-ceylon",{name:"clike",keywords:c("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),
types:function(a){a=a.charAt(0);return a===a.toUpperCase()&&a!==a.toLowerCase()},blockKeywords:c("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:c("class dynamic function interface module object package value"),builtin:c("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;:\.`]/,
isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:c("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(a){a.eatWhile(/[\w\$_]/);return"meta"},'"':function(a,b){b.tokenize=B(a.match('""')?"triple":"single");return b.tokenize(a,b)},"`":function(a,b){if(!t||!a.match("`"))return!1;b.tokenize=
t;t=null;return b.tokenize(a,b)},"'":function(a){a.eatWhile(/[\w\$_\xa1-\uffff]/);return"atom"},token:function(a,b,c){if(("variable"==c||"type"==c)&&"."==b.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})});

(function(c){"object"==typeof exports&&"object"==typeof module?c(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],c):c(CodeMirror)})(function(c){function f(b,a){function d(){b.display.wrapper.offsetHeight?(e(b,a),b.display.lastWrapHeight!=b.display.wrapper.clientHeight&&b.refresh()):a.timeout=setTimeout(d,a.delay)}a.timeout=setTimeout(d,a.delay);a.hurry=function(){clearTimeout(a.timeout);a.timeout=setTimeout(d,50)};c.on(window,"mouseup",a.hurry);
c.on(window,"keyup",a.hurry)}function e(b,a){clearTimeout(a.timeout);c.off(window,"mouseup",a.hurry);c.off(window,"keyup",a.hurry)}c.defineOption("autoRefresh",!1,function(b,a){b.state.autoRefresh&&(e(b,b.state.autoRefresh),b.state.autoRefresh=null);a&&0==b.display.wrapper.offsetHeight&&f(b,b.state.autoRefresh={delay:a.delay||250})})});