You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
327 KiB

  1. !function(){function g(a){var e=function(a,b){return d("",a,b)},f=b;a&&(b[a]||(b[a]={}),f=b[a]),f.define&&f.define.packaged||(c.original=f.define,f.define=c,f.define.packaged=!0),f.require&&f.require.packaged||(d.original=f.require,f.require=e,f.require.packaged=!0)}var a="",b=function(){return this}();if(a||"undefined"==typeof requirejs){var c=function(a,b,d){return"string"!=typeof a?(c.original?c.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace()),void 0):(2==arguments.length&&(d=b),c.modules||(c.modules={},c.payloads={}),c.payloads[a]=d,c.modules[a]=null,void 0)},d=function(a,b,c){if("[object Array]"===Object.prototype.toString.call(b)){for(var e=[],g=0,h=b.length;h>g;++g){var i=f(a,b[g]);if(!i&&d.original)return d.original.apply(window,arguments);e.push(i)}c&&c.apply(null,e)}else{if("string"==typeof b){var j=f(a,b);return!j&&d.original?d.original.apply(window,arguments):(c&&c(),j)}if(d.original)return d.original.apply(window,arguments)}},e=function(a,b){if(-1!==b.indexOf("!")){var c=b.split("!");return e(a,c[0])+"!"+e(a,c[1])}if("."==b.charAt(0)){var d=a.split("/").slice(0,-1).join("/");for(b=d+"/"+b;-1!==b.indexOf(".")&&f!=b;){var f=b;b=b.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return b},f=function(a,b){b=e(a,b);var f=c.modules[b];if(!f){if(f=c.payloads[b],"function"==typeof f){var g={},h={id:b,uri:"",exports:g,packaged:!0},i=function(a,c){return d(b,a,c)},j=f(i,g,h);g=j||h.exports,c.modules[b]=g,delete c.payloads[b]}f=c.modules[b]=g||f}return f};g(a)}}(),define("ace/lib/regexp",["require","exports","module"],function(){"use strict";function g(a){return(a.global?"g":"")+(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.extended?"x":"")+(a.sticky?"y":"")}function h(a,b,c){if(Array.prototype.indexOf)return a.indexOf(b,c);for(var d=c||0;d<a.length;d++)if(a[d]===b)return d;return-1}var d={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},e=void 0===d.exec.call(/()??/,"")[1],f=function(){var a=/^/g;return d.test.call(a,""),!a.lastIndex}();f&&e||(RegExp.prototype.exec=function(a){var c,i,b=d.exec.apply(this,arguments);if("string"==typeof a&&b){if(!e&&b.length>1&&h(b,"")>-1&&(i=RegExp(this.source,d.replace.call(g(this),"g","")),d.replace.call(a.slice(b.index),i,function(){for(var a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(b[a]=void 0)})),this._xregexp&&this._xregexp.captureNames)for(var j=1;j<b.length;j++)c=this._xregexp.captureNames[j-1],c&&(b[c]=b[j]);!f&&this.global&&!b[0].length&&this.lastIndex>b.index&&this.lastIndex--}return b},f||(RegExp.prototype.test=function(a){var b=d.exec.call(this,a);return b&&this.global&&!b[0].length&&this.lastIndex>b.index&&this.lastIndex--,!!b}))}),define("ace/lib/es5-shim",["require","exports","module"],function(){function d(){}function u(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(b){}}function J(a){return a=+a,a!==a?a=0:0!==a&&a!==1/0&&a!==-(1/0)&&(a=(a>0||-1)*Math.floor(Math.abs(a))),a}Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError("Function.prototype.bind called on incompatible "+b);var c=h.call(arguments,1),e=function(){if(this instanceof e){var d=b.apply(this,c.concat(h.call(arguments)));return Object(d)===d?d:this}return b.apply(a,c.concat(h.call(arguments)))};return b.prototype&&(d.prototype=b.prototype,e.prototype=new d,d.prototype=null),e});var k,l,m,n,o,e=Function.prototype.call,f=Array.prototype,g=Object.prototype,h=f.slice,i=e.bind(g.toString),j=e.bind(g.hasOwnProperty);if((o=j(g,"__defineGetter__"))&&(k=e.bind(g.__defineGetter__),l=e.bind(g.__defineSetter__),m=e.bind(g.__lookupGetter__),n=e.bind(g.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function a(a){var b=new Array(a+2);return b[0]=b[1]=0,b}var c,b=[];return b.splice.apply(b,a(20)),b.splice.apply(b,a(26)),c=b.length,b.splice(5,0,"XXX"),c+1==b.length,c+1==b.length?!0:void 0}()){var p=Array.prototype.splice;Array.prototype.splice=fun
  2. var d=this.editor,e=a.getButton();if(0!==e){var f=d.getSelectionRange(),g=f.isEmpty();return g&&d.selection.moveToPosition(c),d.textInput.onContextMenu(a.domEvent),void 0}return this.mousedownEvent.time=Date.now(),!b||d.isFocused()||(d.focus(),!this.$focusTimout||this.$clickSelection||d.inMultiSelectMode)?(this.captureMouse(a),this.startSelect(c,a.domEvent._clicks>1),a.preventDefault()):(this.setState("focusWait"),this.captureMouse(a),void 0)},this.startSelect=function(a,b){a=a||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var c=this.editor;this.mousedownEvent.getShiftKey()?c.selection.selectToPosition(a):b||c.selection.moveToPosition(a),b||this.select(),c.renderer.scroller.setCapture&&c.renderer.scroller.setCapture(),c.setStyle("ace_selecting"),this.setState("select")},this.select=function(){var a,b=this.editor,c=b.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var d=this.$clickSelection.comparePoint(c);if(-1==d)a=this.$clickSelection.end;else if(1==d)a=this.$clickSelection.start;else{var e=j(this.$clickSelection,c);c=e.cursor,a=e.anchor}b.selection.setSelectionAnchor(a.row,a.column)}b.selection.selectToPosition(c),b.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(a){var b,c=this.editor,d=c.renderer.screenToTextCoordinates(this.x,this.y),e=c.selection[a](d.row,d.column);if(this.$clickSelection){var f=this.$clickSelection.comparePoint(e.start),g=this.$clickSelection.comparePoint(e.end);if(-1==f&&0>=g)b=this.$clickSelection.end,(e.end.row!=d.row||e.end.column!=d.column)&&(d=e.start);else if(1==g&&f>=0)b=this.$clickSelection.start,(e.start.row!=d.row||e.start.column!=d.column)&&(d=e.end);else if(-1==f&&1==g)d=e.end,b=e.start;else{var h=j(this.$clickSelection,d);d=h.cursor,b=h.anchor}c.selection.setSelectionAnchor(b.row,b.column)}c.selection.selectToPosition(d),c.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var a=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),b=Date.now();(a>g||b-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(a){var b=a.getDocumentPosition(),c=this.editor,d=c.session,e=d.getBracketRange(b);e?(e.isEmpty()&&(e.start.column--,e.end.column++),this.setState("select")):(e=c.selection.getWordRange(b.row,b.column),this.setState("selectByWords")),this.$clickSelection=e,this.select()},this.onTripleClick=function(a){var b=a.getDocumentPosition(),c=this.editor;this.setState("selectByLines");var d=c.getSelectionRange();d.isMultiLine()&&d.contains(b.row,b.column)?(this.$clickSelection=c.selection.getLineRange(d.start.row),this.$clickSelection.end=c.selection.getLineRange(d.end.row).end):this.$clickSelection=c.selection.getLineRange(b.row),this.select()},this.onQuadClick=function(){var b=this.editor;b.selectAll(),this.$clickSelection=b.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(a){if(!a.getAccelKey()){a.getShiftKey()&&a.wheelY&&!a.wheelX&&(a.wheelX=a.wheelY,a.wheelY=0);var b=a.domEvent.timeStamp,c=b-(this.$lastScrollTime||0),d=this.editor,e=d.renderer.isScrollableBy(a.wheelX*a.speed,a.wheelY*a.speed);return e||200>c?(this.$lastScrollTime=b,d.renderer.scrollBy(a.wheelX*a.speed,a.wheelY*a.speed),a.stop()):void 0}}}.call(h.prototype),b.DefaultHandlers=h}),define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(a,b){"use strict";function f(a){this.isOpen=!1,this.$element=null,this.$parentNode=a}a("./lib/oop");var e=a("./lib/dom");!function(){this.$init=function(){return this.$element=e.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(a){e.setInnerText(this.getEle
  3. })},this.isBackwards=function(){var a=this.anchor,b=this.lead;return a.row>b.row||a.row==b.row&&a.column>b.column},this.getRange=function(){var a=this.anchor,b=this.lead;return this.isEmpty()?g.fromPoints(b,b):this.isBackwards()?g.fromPoints(b,a):g.fromPoints(a,b)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var a=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(a,this.doc.getLine(a).length)},this.setRange=this.setSelectionRange=function(a,b){b?(this.setSelectionAnchor(a.end.row,a.end.column),this.selectTo(a.start.row,a.start.column)):(this.setSelectionAnchor(a.start.row,a.start.column),this.selectTo(a.end.row,a.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(a){var b=this.lead;this.$isEmpty&&this.setSelectionAnchor(b.row,b.column),a.call(this)},this.selectTo=function(a,b){this.$moveSelection(function(){this.moveCursorTo(a,b)})},this.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},this.moveTo=function(a,b){this.clearSelection(),this.moveCursorTo(a,b)},this.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(a,b){if("undefined"==typeof b){var c=a||this.lead;a=c.row,b=c.column}return this.session.getWordRange(a,b)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var a=this.getCursor(),b=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(b)},this.getLineRange=function(a,b){var d,c="number"==typeof a?a:this.lead.row,e=this.session.getFoldLine(c);return e?(c=e.start.row,d=e.end.row):d=c,b===!0?new g(c,0,d,this.session.getLine(d).length):new g(c,0,d+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var b,a=this.lead.getPosition();if(b=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(b.start.row,b.start.column);else if(0===a.column)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var c=this.session.getTabSize();this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(a.column-c,a.column).split(" ").length-1==c?this.moveCursorBy(0,-c):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var b,a=this.lead.getPosition();if(b=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(b.end.row,b.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var c=this.session.getTabSize(),a=this.lead;this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(a.column,a.column+c).split(" ").length-1==c?this.moveCursorBy(0,c):this.moveCursorBy(0,1)}},this.moveCursorLineStart=function(){var a=this.lead.row,b=this.lead.column,c=this.session.documentToScreenRow(a,b),d=this.session.screenToDocumentPosition(c,0),e=this.session.getDisplayLine(a,null,d.row,d.column),f=e.match(/^\s*/);f[0].length==b||this.session.$useEmacsStyleLineStart||(d.column+=f[0].length),this.moveCursorToPosition(d)},this.moveCursorLineEnd=function(){var a=this.lead,b=this.session.getDocumentLastRowColumnPosition(a.row,a.col
  4. }),define("ace/token_iterator",["require","exports","module"],function(a,b){"use strict";var d=function(a,b,c){this.$session=a,this.$row=b,this.$rowTokens=a.getTokens(b);var d=a.getTokenAt(b,c);this.$tokenIndex=d?d.index:-1};!function(){this.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},this.stepForward=function(){this.$tokenIndex+=1;for(var a;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var a=this.$rowTokens,b=this.$tokenIndex,c=a[b].start;if(void 0!==c)return c;for(c=0;b>0;)b-=1,c+=a[b].value.length;return c}}.call(d.prototype),b.TokenIterator=d}),define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(a,b){"use strict";var d=a("../tokenizer").Tokenizer,e=a("./text_highlight_rules").TextHighlightRules,f=a("./behaviour").Behaviour,g=a("../unicode"),h=a("../lib/lang"),i=a("../token_iterator").TokenIterator,j=a("../range").Range,k=function(){this.HighlightRules=e,this.$behaviour=new f};!function(){this.tokenRe=new RegExp("^["+g.packages.L+g.packages.Mn+g.packages.Mc+g.packages.Nd+g.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+g.packages.L+g.packages.Mn+g.packages.Mc+g.packages.Nd+g.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules,this.$tokenizer=new d(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(a,b,c,d){function u(a){for(var b=c;d>=b;b++)a(e.getLine(b),b)}var e=b.doc,f=!0,g=!0,i=1/0,j=b.getTabSize(),k=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var n=this.lineCommentStart.map(h.escapeRegExp).join("|"),l=this.lineCommentStart[0];else var n=h.escapeRegExp(this.lineCommentStart),l=this.lineCommentStart;n=new RegExp("^(\\s*)(?:"+n+") ?"),k=b.getUseSoftTabs();var q=function(a,b){var c=a.match(n);if(c){var d=c[1].length,f=c[0].length;t(a,d,f)||" "!=c[0][f-1]||f--,e.removeInLine(b,d,f)}},s=l+" ",p=function(a,b){(!f||/\S/.test(a))&&(t(a,i,i)?e.insertInLine({row:b,column:i},s):e.insertInLine({row:b,column:i},l))},r=function(a){return n.test(a)},t=function(a,b,c){for(var d=0;b--&&" "==a.charAt(b);)d++;if(0!=d%j)return!1;for(var d=0;" "==a.charAt(c++);)d++;return j>2?d%j!=j-1:0==d%j}}else{if(!this.blockComment)return!1;var l=this.blockComment.start,m=this.blockComment.end,n=new RegExp("^(\\s*)(?:"+h.escapeRegExp(l)+")"),o=new RegExp("(?:"+h.escapeRegExp(m)+")\\s*$"),p=function(a,b){r(a,b)||(!f||/\S/.test(a))&&(e.insertInLine({row:b,column:a.length},m),e.insertInLine({row:b,column:i},l))},q=function(a,b){var c;(c=a.match(o))&&e.removeInLine(b,a.length-c[0].length,a.length),(c=a.match(n))&&e.removeInLine(b,c[1].length,c[0].length)},r=function(a,c){if(n.test(a))return!0;for(var d=b.getTokens(c),e=0;e<d.length;e++)if("comment"===d[e].type)return!0}}var v=1/0;u(function(a,b){var c=a.search(/\S/);-1!==c?(i>c&&(i=c),g&&!r(a,b)&&(g=!1)):v>a.length&&(v=a.length)}),1/0==i&&(i=v,f=!1,g=!1),k&&0!=i%j&&(i=Math.floor(i/j)*j),u(g?q:p)},this.toggleBlockComment=function(a,b,c,d){var e=this.blockComment;if(e){!e.start&&e[0]&&(e=e[0]);var f=new i(b,d.row,d.column),g=f.getCurrentToken();b.selection;var l,m,k=b.selection.toOrientedRange();if(g&&/comment/.test(g.type)){for(var n,o;g&&/comment/.test(g.type);){var p=g.value.indexOf(e.start);if(-1!=p){var q=f.getCurrentTokenRow(),r=f.getCurrentTokenColumn()+p;n=new j(q,r,q,r+e.star
  5. var h="...";if(!c.isMultiLine()){if(h=this.getTextRange(c),h.length<4)return;h=h.trim().substring(0,2)+".."}this.addFold(h,c)},this.getCommentFoldRange=function(a,b,c){var e=new g(this,a,b),f=e.getCurrentToken();if(f&&/^comment|string/.test(f.type)){var h=new d,i=new RegExp(f.type.replace(/\..*/,"\\."));if(1!=c){do f=e.stepBackward();while(f&&i.test(f.type));e.stepForward()}if(h.start.row=e.getCurrentTokenRow(),h.start.column=e.getCurrentTokenColumn()+2,e=new g(this,a,b),-1!=c){do f=e.stepForward();while(f&&i.test(f.type));f=e.stepBackward()}else f=e.getCurrentToken();return h.end.row=e.getCurrentTokenRow(),h.end.column=e.getCurrentTokenColumn()+f.value.length-2,h}},this.foldAll=function(a,b,c){void 0==c&&(c=1e5);var d=this.foldWidgets;if(d){b=b||this.getLength(),a=a||0;for(var e=a;b>e;e++)if(null==d[e]&&(d[e]=this.getFoldWidget(e)),"start"==d[e]){var f=this.getFoldWidgetRange(e);if(f&&f.isMultiLine()&&f.end.row<=b&&f.start.row>=a){e=f.end.row;try{var g=this.addFold("...",f);g&&(g.collapseChildren=c)}catch(h){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=a){this.$foldStyle=a,"manual"==a&&this.unfold();var b=this.$foldMode;this.$setFolding(null),this.$setFolding(b)}},this.$setFolding=function(a){if(this.$foldMode!=a){if(this.$foldMode=a,this.removeListener("change",this.$updateFoldWidgets),this._emit("changeAnnotation"),!a||"manual"==this.$foldStyle)return this.foldWidgets=null,void 0;this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets)}},this.getParentFoldRangeData=function(a,b){var c=this.foldWidgets;if(!c||b&&c[a])return{};for(var e,d=a-1;d>=0;){var f=c[d];if(null==f&&(f=c[d]=this.getFoldWidget(d)),"start"==f){var g=this.getFoldWidgetRange(d);if(e||(e=g),g&&g.end.row>=a)break}d--}return{range:-1!==d&&g,firstRange:e}},this.onFoldWidgetClick=function(a,b){b=b.domEvent;var c={children:b.shiftKey,all:b.ctrlKey||b.metaKey,siblings:b.altKey},d=this.$toggleFoldWidget(a,c);if(!d){var e=b.target||b.srcElement;e&&/ace_fold-widget/.test(e.className)&&(e.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,b){if(this.getFoldWidget){var c=this.getFoldWidget(a),d=this.getLine(a),e="end"===c?-1:1,f=this.getFoldAt(a,-1===e?0:d.length,e);if(f)return b.children||b.all?this.removeFold(f):this.expandFold(f),void 0;var g=this.getFoldWidgetRange(a,!0);if(g&&!g.isMultiLine()&&(f=this.getFoldAt(g.start.row,g.start.column,1),f&&g.isEqual(f.range)))return this.removeFold(f),void 0;if(b.siblings){var h=this.getParentFoldRangeData(a);if(h.range)var i=h.range.start.row+1,j=h.range.end.row;this.foldAll(i,j,b.all?1e4:0)}else b.children?(j=g?g.end.row:this.getLength(),this.foldAll(a+1,g.end.row,b.all?1e4:0)):g&&(b.all&&(g.collapseChildren=1e4),this.addFold("...",g));return g}},this.toggleFoldWidget=function(){var b=this.selection.getCursor().row;b=this.getRowFoldStart(b);var c=this.$toggleFoldWidget(b,{});if(!c){var d=this.getParentFoldRangeData(b,!0);if(c=d.range||d.firstRange){b=c.start.row;var e=this.getFoldAt(b,this.getLine(b).length,1);e?this.removeFold(e):this.addFold("...",c)}}},this.updateFoldWidgets=function(a){var b=a.data,c=b.range,d=c.start.row,e=c.end.row-d;if(0===e)this.foldWidgets[d]=null;else if("removeText"==b.action||"removeLines"==b.action)this.foldWidgets.splice(d,e+1,null);else{var f=Array(e+1);f.unshift(d,1),this.foldWidgets.splice.apply(this.foldWidgets,f)}}}var d=a("../range").Range,e=a("./fold_line").FoldLine,f=a("./fold").Fold,g=a("../token_iterator").TokenIterator;b.Folding=h}),define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(a,b){"use strict";function f(){this.findMatchingBracket=function(a,b){if(0==a.column)return null;var c=b||this.getLine(a.
  6. if(!b)return!1;var c=null;return b.forEach(function(a,b,d){if(a.start)c=a;else{var e=a.offset+(d||0);c=new f(b,e,b,e+a.length)}return!0}),c},this.findAll=function(a){var b=this.$options;if(!b.needle)return[];this.$assembleRegExp(b);var c=b.range,e=c?a.getLines(c.start.row,c.end.row):a.doc.getAllLines(),g=[],h=b.re;if(b.$isMultiLine){var k,i=h.length,j=e.length-i;a:for(var l=h.offset||0;j>=l;l++){for(var m=0;i>m;m++)if(-1==e[l+m].search(h[m]))continue a;var n=e[l],o=e[l+i-1],p=n.length-n.match(h[0])[0].length,q=o.match(h[i-1])[0].length;k&&k.end.row===l&&k.end.column>p||(g.push(k=new f(l,p,l+i-1,q)),i>2&&(l=l+i-2))}}else for(var r=0;r<e.length;r++)for(var s=d.getMatchOffsets(e[r],h),m=0;m<s.length;m++){var t=s[m];g.push(new f(r,t.offset,r,t.offset+t.length))}if(c){for(var u=c.start.column,v=c.start.column,r=0,m=g.length-1;m>r&&g[r].start.column<u&&g[r].start.row==c.start.row;)r++;for(;m>r&&g[m].end.column>v&&g[m].end.row==c.end.row;)m--;for(g=g.slice(r,m+1),r=0,m=g.length;m>r;r++)g[r].start.row+=c.start.row,g[r].end.row+=c.start.row}return g},this.replace=function(a,b){var c=this.$options,d=this.$assembleRegExp(c);if(c.$isMultiLine)return b;if(d){var e=d.exec(a);if(!e||e[0].length!=a.length)return null;if(b=a.replace(d,b),c.preserveCase){b=b.split("");for(var f=Math.min(a.length,a.length);f--;){var g=a[f];b[f]=g&&g.toLowerCase()!=g?b[f].toUpperCase():b[f].toLowerCase()}b=b.join("")}return b}},this.$matchIterator=function(a,b){var c=this.$assembleRegExp(b);if(!c)return!1;var g,e=this,h=b.backwards;if(b.$isMultiLine)var i=c.length,j=function(b,d,e){var h=b.search(c[0]);if(-1!=h){for(var j=1;i>j;j++)if(b=a.getLine(d+j),-1==b.search(c[j]))return;var k=b.match(c[i-1])[0].length,l=new f(d,h,d+i-1,k);return 1==c.offset?(l.start.row--,l.start.column=Number.MAX_VALUE):e&&(l.start.column+=e),g(l)?!0:void 0}};else if(h)var j=function(a,b,e){for(var f=d.getMatchOffsets(a,c),h=f.length-1;h>=0;h--)if(g(f[h],b,e))return!0};else var j=function(a,b,e){for(var f=d.getMatchOffsets(a,c),h=0;h<f.length;h++)if(g(f[h],b,e))return!0};return{forEach:function(c){g=c,e.$lineIterator(a,b).forEach(j)}}},this.$assembleRegExp=function(a,b){if(a.needle instanceof RegExp)return a.re=a.needle;var c=a.needle;if(!a.needle)return a.re=!1;a.regExp||(c=d.escapeRegExp(c)),a.wholeWord&&(c="\\b"+c+"\\b");var e=a.caseSensitive?"g":"gi";if(a.$isMultiLine=!b&&/[\n\r]/.test(c),a.$isMultiLine)return a.re=this.$assembleMultilineRegExp(c,e);try{var f=new RegExp(c,e)}catch(g){f=!1}return a.re=f},this.$assembleMultilineRegExp=function(a,b){for(var c=a.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),d=[],e=0;e<c.length;e++)try{d.push(new RegExp(c[e],b))}catch(f){return!1}return""==c[0]?(d.shift(),d.offset=1):d.offset=0,d},this.$lineIterator=function(a,b){var c=1==b.backwards,d=0!=b.skipCurrent,e=b.range,f=b.start;f||(f=e?e[c?"end":"start"]:a.selection.getRange()),f.start&&(f=f[d!=c?"end":"start"]);var g=e?e.start.row:0,h=e?e.end.row:a.getLength()-1,i=c?function(c){var d=f.row,e=a.getLine(d).substring(0,f.column);if(!c(e,d)){for(d--;d>=g;d--)if(c(a.getLine(d),d))return;if(0!=b.wrap)for(d=h,g=f.row;d>=g;d--)if(c(a.getLine(d),d))return}}:function(c){var d=f.row,e=a.getLine(d).substr(f.column);if(!c(e,d,f.column)){for(d+=1;h>=d;d++)if(c(a.getLine(d),d))return;if(0!=b.wrap)for(d=g,h=f.row;h>=d;d++)if(c(a.getLine(d),d))return}};return{forEach:i}}}.call(g.prototype),b.Search=g}),define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(a,b){"use strict";function f(a,b){if(this.platform=b||(e.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.__defineGetter__&&this.__defineSetter__&&"undefined"!=typeof console&&console.error){var c=!1,d=function(){c||(c=!0,console.error("commmandKeyBinding has too many m's. use commandKeyBinding"))};this.__defineGetter__("commmandKeyBinding",function(){return d(),this.commandKeyBinding}),this.__defineSetter__("commmandKeyBinding",function(a){return d(),this.commandKeyBinding=a})}else this.commmandKeyBinding=this.commandKeyBinding;this.addCommands(a)}var d=a("../lib/keys"),e=a("../lib/u
  7. }},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var a=this;this.$highlightTagPending=!0,setTimeout(function(){a.$highlightTagPending=!1;var b=a.session;if(b&&b.bgTokenizer){var c=a.getCursorPosition(),d=new s(a.session,c.row,c.column),e=d.getCurrentToken();if(!e||-1===e.type.indexOf("tag-name"))return b.removeMarker(b.$tagHighlight),b.$tagHighlight=null,void 0;var f=e.value,g=0,h=d.stepBackward();if("<"==h.value){do h=e,e=d.stepForward(),e&&e.value===f&&-1!==e.type.indexOf("tag-name")&&("<"===h.value?g++:"</"===h.value&&g--);while(e&&g>=0)}else{do e=h,h=d.stepBackward(),e&&e.value===f&&-1!==e.type.indexOf("tag-name")&&("<"===h.value?g++:"</"===h.value&&g--);while(h&&0>=g);d.stepForward()}if(!e)return b.removeMarker(b.$tagHighlight),b.$tagHighlight=null,void 0;var i=d.getCurrentTokenRow(),j=d.getCurrentTokenColumn(),k=new n(i,j,i,j+e.value.length);b.$tagHighlight&&0!==k.compareRange(b.$backMarkers[b.$tagHighlight].range)&&(b.removeMarker(b.$tagHighlight),b.$tagHighlight=null),k&&!b.$tagHighlight&&(b.$tagHighlight=b.addMarker(k,"ace_bracket","text"))}},50)}},this.focus=function(){var a=this;setTimeout(function(){a.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus"))},this.onBlur=function(){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur"))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(a){var d,b=a.data,c=b.range;d=c.start.row==c.end.row&&"insertLines"!=b.action&&"removeLines"!=b.action?c.end.row:1/0,this.renderer.updateLines(c.start.row,d,this.session.$useWrapMode),this._signal("change",a),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(a){var b=a.data;this.renderer.updateLines(b.first,b.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||this.renderer.scrollCursorIntoView(),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var b,a=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(b=this.getCursorPosition()),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(b=!1)),a.$highlightLineMarker&&!b)a.removeMarker(a.$highlightLineMarker.id),a.$highlightLineMarker=null;else if(!a.$highlightLineMarker&&b){var c=new n(b.row,b.column,b.row,1/0);c.id=a.addMarker(c,"ace_active-line","screenLine"),a.$highlightLineMarker=c}else b&&(a.$highlightLineMarker.start.row=b.row,a.$highlightLineMarker.end.row=b.row,a.$highlightLineMarker.start.column=b.column,a._signal("changeBackMarker"))},this.onSelectionChange=function(){var b=this.session;if(b.$selectionMarker&&b.removeMarker(b.$selectionMarker),b.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var c=this.selection.getRange(),d=this.getSelectionStyle();b.$selectionMarker=b.addMarker(c,"ace_selection",d)}var e=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(e),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var a=this.session,b=this.getSelectionRange();if(!b.isEmpty()&&!b.isMultiLine()){var c=b.start.column-1,d=b.end.column+1,e=a.getLine(b.start.row),f=e.length,g=e.substring(Math.max(c,0),Math.min(d,f));if(!(c>=0&&/^[\w\d]/.test(g)||f>=d&&/[\w\d]$/.test(g))&&(g=e.substring(b.start.column,b.end.column),/^[\w\d]+$/.test(g))){var h=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:g});return h}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.o
  8. }}.call(h.prototype),b.Gutter=h}),define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(a,b){"use strict";var d=a("../range").Range,e=a("../lib/dom"),f=function(a){this.element=e.createElement("div"),this.element.className="ace_layer ace_marker-layer",a.appendChild(this.element)};!function(){this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.setMarkers=function(a){this.markers=a},this.update=function(a){var a=a||this.config;if(a){this.config=a;var b=[];for(var c in this.markers){var d=this.markers[c];if(d.range){var e=d.range.clipRows(a.firstRow,a.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),d.renderer){var f=this.$getTop(e.start.row,a),g=this.$padding+e.start.column*a.characterWidth;d.renderer(b,e,g,f,a)}else"fullLine"==d.type?this.drawFullLineMarker(b,e,d.clazz,a):"screenLine"==d.type?this.drawScreenLineMarker(b,e,d.clazz,a):e.isMultiLine()?"text"==d.type?this.drawTextMarker(b,e,d.clazz,a):this.drawMultiLineMarker(b,e,d.clazz,a):this.drawSingleLineMarker(b,e,d.clazz+" ace_start",a)}else d.update(b,this,this.session,a)}this.element.innerHTML=b.join("")}},this.$getTop=function(a,b){return(a-b.firstRowScreen)*b.lineHeight},this.drawTextMarker=function(a,b,c,e,f){var g=b.start.row,h=new d(g,b.start.column,g,this.session.getScreenLastRowColumn(g));for(this.drawSingleLineMarker(a,h,c+" ace_start",e,1,f),g=b.end.row,h=new d(g,0,g,b.end.column),this.drawSingleLineMarker(a,h,c,e,0,f),g=b.start.row+1;g<b.end.row;g++)h.start.row=g,h.end.row=g,h.end.column=this.session.getScreenLastRowColumn(g),this.drawSingleLineMarker(a,h,c,e,1,f)},this.drawMultiLineMarker=function(a,b,c,d,e){var f=this.$padding,g=d.lineHeight,h=this.$getTop(b.start.row,d),i=f+b.start.column*d.characterWidth;e=e||"",a.push("<div class='",c," ace_start' style='","height:",g,"px;","right:0;","top:",h,"px;","left:",i,"px;",e,"'></div>"),h=this.$getTop(b.end.row,d);var j=b.end.column*d.characterWidth;a.push("<div class='",c,"' style='","height:",g,"px;","width:",j,"px;","top:",h,"px;","left:",f,"px;",e,"'></div>"),g=(b.end.row-b.start.row-1)*d.lineHeight,0>g||(h=this.$getTop(b.start.row+1,d),a.push("<div class='",c,"' style='","height:",g,"px;","right:0;","top:",h,"px;","left:",f,"px;",e,"'></div>"))},this.drawSingleLineMarker=function(a,b,c,d,e,f){var g=d.lineHeight,h=(b.end.column+(e||0)-b.start.column)*d.characterWidth,i=this.$getTop(b.start.row,d),j=this.$padding+b.start.column*d.characterWidth;a.push("<div class='",c,"' style='","height:",g,"px;","width:",h,"px;","top:",i,"px;","left:",j,"px;",f||"","'></div>")},this.drawFullLineMarker=function(a,b,c,d,e){var f=this.$getTop(b.start.row,d),g=d.lineHeight;b.start.row!=b.end.row&&(g+=this.$getTop(b.end.row,d)-f),a.push("<div class='",c,"' style='","height:",g,"px;","top:",f,"px;","left:0;right:0;",e||"","'></div>")},this.drawScreenLineMarker=function(a,b,c,d,e){var f=this.$getTop(b.start.row,d),g=d.lineHeight;a.push("<div class='",c,"' style='","height:",g,"px;","top:",f,"px;","left:0;right:0;",e||"","'></div>")}}.call(f.prototype),b.Marker=f}),define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(a,b){"use strict";var d=a("../lib/oop"),e=a("../lib/dom"),f=a("../lib/lang");a("../lib/useragent");var h=a("../lib/event_emitter").EventEmitter,i=function(a){this.element=e.createElement("div"),this.element.className="ace_layer ace_text-layer",a.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};!function(){d.implement(this,h),this.EOF_CHAR="\xb6",this.EOL_CHAR_LF="\xac",this.EOL_CHAR_CRLF="\xa4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2192",this.SPACE_CHAR="\xb7",this.$padding=0,this.$updateEolChar=function(){var a="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;return this.EOL_CHAR!=a?(this.EOL_CHAR=a,!0):void 0},this.setPadding=function(a){this.$padding=a,this.element.style.padding="0 "+a+"px"},this.getLineHeight=function(){return this.$fontMetr
  9. e.importCssString(q,"ace_editor");var r=function(a,b){var c=this;this.container=a||e.createElement("div"),this.$keepTextAreaAtCursor=!g.isOldIE,e.addCssClass(this.container,"ace_editor"),this.setTheme(b),this.$gutter=e.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=e.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=e.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new h(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new i(this.content);var d=this.$textLayer=new j(this.content);this.canvas=d.element,this.$markerFront=new i(this.content),this.$cursorLayer=new k(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new m(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.addEventListener("scroll",function(a){c.$scrollAnimation||c.session.setScrollTop(a.data-c.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(a){c.$scrollAnimation||c.session.setScrollLeft(a.data-c.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new o(this.container,500),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(a){c.updateCharacterSize(),c.onResize(!0,c.gutterWidth,c.$size.width,c.$size.height),c._signal("changeCharacterSize",a)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new n(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),f.resetOptions(this),f._emit("renderer",this)};!function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,d.implement(this,p),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(a){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=a,a&&this.scrollMargin.top&&a.getScrollTop()<=0&&a.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(a),this.$markerBack.setSession(a),this.$markerFront.setSession(a),this.$gutterLayer.setSession(a),this.$textLayer.setSession(a),a&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(a,b,c){if(void 0===b&&(b=1/0),this.$changedLines?(this.$changedLines.firstRow>a&&(this.$changedLines.firstRow=a),this.$changedLines.lastRow<b&&(this.$changedLines.lastRow=b)):this.$changedLines={firstRow:a,lastRow:b},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!c)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar()},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop
  10. h.row===c.start.row&&c.start.column<h.column&&(i.column+=e),this.doc.insert(i,b.text)}else if("removeText"===b.action)for(var g=this.others.length-1;g>=0;g--){var h=this.others[g],i={row:h.row,column:h.column+f};h.row===c.start.row&&c.start.column<h.column&&(i.column+=e),this.doc.remove(new d(i.row,i.column,i.row,i.column-e))}c.start.column===this.pos.column&&"insertText"===b.action?setTimeout(function(){this.pos.setPosition(this.pos.row,this.pos.column-e);for(var a=0;a<this.others.length;a++){var b=this.others[a],d={row:b.row,column:b.column-e};b.row===c.start.row&&c.start.column<b.column&&(d.column+=e),b.setPosition(d.row,d.column)}}.bind(this),0):c.start.column===this.pos.column&&"removeText"===b.action&&setTimeout(function(){for(var a=0;a<this.others.length;a++){var b=this.others[a];b.row===c.start.row&&c.start.column<b.column&&b.setPosition(b.row,b.column-e)}}.bind(this),0)}this.pos._emit("change",{value:this.pos});for(var g=0;g<this.others.length;g++)this.others[g]._emit("change",{value:this.others[g]})}this.$updating=!1}},this.onCursorChange=function(a){if(!this.$updating&&this.session){var b=this.session.selection.getCursor();b.row===this.pos.row&&b.column>=this.pos.column&&b.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",a)):(this.hideOtherMarkers(),this._emit("cursorLeave",a))}},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var a=0;a<this.others.length;a++)this.others[a].detach();this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1===this.$undoStackDepth)throw Error("Canceling placeholders only supported with undo manager attached to session.");for(var a=this.session.getUndoManager(),b=(a.$undoStack||a.$undostack).length-this.$undoStackDepth,c=0;b>c;c++)a.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}.call(g.prototype),b.PlaceHolder=g}),define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(a,b){function f(a,b){return a.row==b.row&&a.column==b.column}function g(a){var b=a.domEvent,c=b.altKey,g=b.shiftKey,h=b.ctrlKey,i=a.getAccelKey(),j=a.getButton();if(h&&e.isMac&&(j=b.button),a.editor.inMultiSelectMode&&2==j)return a.editor.textInput.onContextMenu(a.domEvent),void 0;if(!h&&!c&&!i)return 0===j&&a.editor.inMultiSelectMode&&a.editor.exitMultiSelectMode(),void 0;if(0===j){var w,k=a.editor,l=k.selection,m=k.inMultiSelectMode,n=a.getDocumentPosition(),o=l.getCursor(),p=a.inSelection()||l.isEmpty()&&f(n,o),q=a.x,r=a.y,s=function(a){q=a.clientX,r=a.clientY},t=k.session,u=k.renderer.pixelToScreenCoordinates(q,r),v=u;if(k.$mouseHandler.$enableJumpToDef)h&&c||i&&c?w="add":c&&(w="block");else if(i&&!c){if(w="add",!m&&g)return}else c&&(w="block");if(w&&e.isMac&&b.ctrlKey&&k.$mouseHandler.cancelContextMenu(),"add"==w){if(!m&&p)return;if(!m){var x=l.toOrientedRange();k.addSelectionMarker(x)}var y=l.rangeList.rangeAtPoint(n);k.$blockScrolling++,k.inVirtualSelectionMode=!0,g&&(y=null,x=l.ranges[0],k.removeSelectionMarker(x)),k.once("mouseup",function(){var a=l.toOrientedRange();y&&a.isEmpty()&&f(y.cursor,a.cursor)?l.substractPoint(a.cursor):(g?l.substractPoint(x.cursor):x&&(k.removeSelectionMarker(x),l.addRange(x)),l.addRange(a)),k.$blockScrolling--,k.inVirtualSelectionMode=!1})}else if("block"==w){a.stop(),k.inVirtualSelectionMode=!0;var z,A=[],B=function(){var a=k.renderer.pixelToScreenCoordinates(q,r),b=t.screenToDocumentPosition(a.row,a.column);f(v,a)&&f(b,l.lead)||(v=a,k.selection.moveToPosition(b),k.renderer.scrollCursorIntoView(),k.removeSelectionMarkers(A),A=l.rectangularRangeBlock(v,u),k.$mouseHandler.$clickSelection&&1==A.length&&A[0].isEmpty()&&(A[0]=k.$mouseHandler.$clickSelection.clone()),A.forEach(k.addSelectionMarker,k),k.updateSelectionMarkers())};m&&!i?l.toSingleRange():!m&&i&&(z=l.toOrientedRange(),k.addSelectionMarker(z)),g?u=t.documentToScreenPositi
  11. },e.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(a,b){"use strict";a("./lib/fixoldbrowsers");var d=a("./lib/dom"),e=a("./lib/event"),f=a("./editor").Editor,g=a("./edit_session").EditSession,h=a("./undomanager").UndoManager,i=a("./virtual_renderer").VirtualRenderer;a("./worker/worker_client"),a("./keyboard/hash_handler"),a("./placeholder"),a("./multi_select"),a("./mode/folding/fold_mode"),a("./theme/textmate"),a("./ext/error_marker"),b.config=a("./config"),b.require=a,b.edit=function(a){if("string"==typeof a){var c=a;if(a=document.getElementById(c),!a)throw new Error("ace.edit can't find div #"+c)}if(a&&a.env&&a.env.editor instanceof f)return a.env.editor;var g="";if(a&&/input|textarea/i.test(a.tagName)){var h=a;g=h.value,a=d.createElement("pre"),h.parentNode.replaceChild(a,h)}else g=d.getInnerText(a),a.innerHTML="";var j=b.createEditSession(g),k=new f(new i(a));k.setSession(j);var l={document:j,editor:k,onResize:k.resize.bind(k,null)};return h&&(l.textarea=h),e.addListener(window,"resize",l.onResize),k.on("destroy",function(){e.removeListener(window,"resize",l.onResize),l.editor.container.env=null}),k.container.env=k.env=l,k},b.createEditSession=function(a,b){var c=new g(a,b);return c.setUndoManager(new h),c},b.EditSession=g,b.UndoManager=h}),function(){window.require(["ace/ace"],function(a){a&&a.config.init(!0),window.ace||(window.ace=a);for(var b in a)a.hasOwnProperty(b)&&(window.ace[b]=a[b])})}();