| 1 |
var ye={exports:{}};(function(pe,be){(function(){var R="ace",M=function(){return this}();!M&&typeof window!="undefined"&&(M=window);var P=function(r,n,i){if(typeof r!="string"){P.original?P.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(i=n),P.modules[r]||(P.payloads[r]=i,P.modules[r]=null)};P.modules={},P.payloads={};var x=function(r,n,i){if(typeof n=="string"){var t=a(r,n);if(t!=null)return i&&i(),t}else if(Object.prototype.toString.call(n)==="[object Array]"){for(var e=[],o=0,s=n.length;o<s;++o){var l=a(r,n[o]);if(l==null&&L.original)return;e.push(l)}return i&&i.apply(null,e)||!0}},L=function(r,n){var i=x("",r,n);return i==null&&L.original?L.original.apply(this,arguments):i},b=function(r,n){if(n.indexOf("!")!==-1){var i=n.split("!");return b(r,i[0])+"!"+b(r,i[1])}if(n.charAt(0)=="."){var t=r.split("/").slice(0,-1).join("/");for(n=t+"/"+n;n.indexOf(".")!==-1&&e!=n;){var e=n;n=n.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},a=function(r,n){n=b(r,n);var i=P.modules[n];if(!i){if(i=P.payloads[n],typeof i=="function"){var t={},e={id:n,uri:"",exports:t,packaged:!0},o=function(l,h){return x(n,l,h)},s=i(o,t,e);t=s||e.exports,P.modules[n]=t,delete P.payloads[n]}i=P.modules[n]=t||i}return i};function c(r){var n=M;r&&(M[r]||(M[r]={}),n=M[r]),(!n.define||!n.define.packaged)&&(P.original=n.define,n.define=P,n.define.packaged=!0),(!n.require||!n.require.packaged)&&(L.original=n.require,n.require=L,n.require.packaged=!0)}c(R)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(R,M,P){function x(L,b,a){Object.defineProperty(L,b,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||x(String.prototype,"startsWith",function(L,b){return b=b||0,this.lastIndexOf(L,b)===b}),String.prototype.endsWith||x(String.prototype,"endsWith",function(L,b){var a=this;(b===void 0||b>a.length)&&(b=a.length),b-=L.length;var c=a.indexOf(L,b);return c!==-1&&c===b}),String.prototype.repeat||x(String.prototype,"repeat",function(L){for(var b="",a=this;L>0;)L&1&&(b+=a),(L>>=1)&&(a+=a);return b}),String.prototype.includes||x(String.prototype,"includes",function(L,b){return this.indexOf(L,b)!=-1}),Object.assign||(Object.assign=function(L){if(L==null)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(L),a=1;a<arguments.length;a++){var c=arguments[a];c!=null&&Object.keys(c).forEach(function(r){b[r]=c[r]})}return b}),Object.values||(Object.values=function(L){return Object.keys(L).map(function(b){return L[b]})}),Array.prototype.find||x(Array.prototype,"find",function(L){for(var b=this.length,a=arguments[1],c=0;c<b;c++){var r=this[c];if(L.call(a,r,c,this))return r}}),Array.prototype.findIndex||x(Array.prototype,"findIndex",function(L){for(var b=this.length,a=arguments[1],c=0;c<b;c++){var r=this[c];if(L.call(a,r,c,this))return c}}),Array.prototype.includes||x(Array.prototype,"includes",function(L,b){return this.indexOf(L,b)!=-1}),Array.prototype.fill||x(Array.prototype,"fill",function(L){for(var b=this,a=b.length>>>0,c=arguments[1],r=c>>0,n=r<0?Math.max(a+r,0):Math.min(r,a),i=arguments[2],t=i===void 0?a:i>>0,e=t<0?Math.max(a+t,0):Math.min(t,a);n<e;)b[n]=L,n++;return b}),Array.of||x(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(R,M,P){R("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(R,M,P){M.deepCopy=function x(L){if(typeof L!="object"||!L)return L;var b;if(Array.isArray(L)){b=[];for(var a=0;a<L.length;a++)b[a]=x(L[a]);return b}if(Object.prototype.toString.call(L)!=="[object Object]")return L;b={};for(var a in L)b[a]=x(L[a]);return b}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(R,M,P){M.last=function(b){return b[b.length-1]},M.stringReverse=function(b){return b.split("").reverse().join("")},M.stringRepeat=function(b,a){for(var c="";a>0;)a&1&&(c+=b),(a>>=1)&&(b+=b);return c};var x=/^\s\s*/,L=/\s\s*$/;M.stringTrimLeft=function(b){return b.replace(x,"")},M.stringTrimRight=function(b){return b.replace(L,"")},M.copyObject=function(b){var a={};for(var c in b)a[c]=b[c];return a},M.copyArray=function(b){for(var a=[],c=0,r=b.length;c<r;c++)b[c]&&typeof b[c]=="object"?a[c]=this.copyObject(b[c]):a[c]=b[c];return a},M.deepCopy=R("./deep_copy").deepCopy,M.arrayToMap=function(b){for(var a={},c=0;c<b.length;c++)a[b[c]]=1;return a},M.createMap=function(b){var a=Object.create(null);for(var c in b)a[c]=b[c];return a},M.arrayRemove=function(b,a){for(var c=0;c<=b.length;c++)a===b[c]&&b.splice(c,1)},M.escapeRegExp=function(b){return b.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},M.escapeHTML=function(b){return(""+b).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},M.getMatchOffsets=function(b,a){var c=[];return b.replace(a,function(r){c.push({offset:arguments[arguments.length-2],length:r.length})}),c},M.deferredCall=function(b){var a=null,c=function(){a=null,b()},r=function(n){return r.cancel(),a=setTimeout(c,n||0),r};return r.schedule=r,r.call=function(){return this.cancel(),b(),r},r.cancel=function(){return clearTimeout(a),a=null,r},r.isPending=function(){return a},r},M.delayedCall=function(b,a){var c=null,r=function(){c=null,b()},n=function(i){c==null&&(c=setTimeout(r,i||a))};return n.delay=function(i){c&&clearTimeout(c),c=setTimeout(r,i||a)},n.schedule=n,n.call=function(){this.cancel(),b()},n.cancel=function(){c&&clearTimeout(c),c=null},n.isPending=function(){return c},n},M.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch(b){return!1}return!0},M.skipEmptyMatch=function(b,a,c){return c&&b.codePointAt(a)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(R,M,P){M.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},M.getOS=function(){return M.isMac?M.OS.MAC:M.isLinux?M.OS.LINUX:M.OS.WINDOWS};var x=typeof navigator=="object"?navigator:{},L=(/mac|win|linux/i.exec(x.platform)||["other"])[0].toLowerCase(),b=x.userAgent||"",a=x.appName||"";M.isWin=L=="win",M.isMac=L=="mac",M.isLinux=L=="linux",M.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((b.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((b.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),M.isOldIE=M.isIE&&M.isIE<9,M.isGecko=M.isMozilla=b.match(/ Gecko\/\d+/),M.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",M.isWebKit=parseFloat(b.split("WebKit/")[1])||void 0,M.isChrome=parseFloat(b.split(" Chrome/")[1])||void 0,M.isSafari=parseFloat(b.split(" Safari/")[1])&&!M.isChrome||void 0,M.isEdge=parseFloat(b.split(" Edge/")[1])||void 0,M.isAIR=b.indexOf("AdobeAIR")>=0,M.isAndroid=b.indexOf("Android")>=0,M.isChromeOS=b.indexOf(" CrOS ")>=0,M.isIOS=/iPad|iPhone|iPod/.test(b)&&!window.MSStream,M.isIOS&&(M.isMac=!0),M.isMobile=M.isIOS||M.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(R,M,P){var x=R("./useragent"),L="http://www.w3.org/1999/xhtml";M.buildDom=function i(t,e,o){if(typeof t=="string"&&t){var s=document.createTextNode(t);return e&&e.appendChild(s),s}if(!Array.isArray(t))return t&&t.appendChild&&e&&e.appendChild(t),t;if(typeof t[0]!="string"||!t[0]){for(var l=[],h=0;h<t.length;h++){var S=i(t[h],e,o);S&&l.push(S)}return l}var p=document.createElement(t[0]),f=t[1],d=1;f&&typeof f=="object"&&!Array.isArray(f)&&(d=2);for(var h=d;h<t.length;h++)i(t[h],p,o);return d==2&&Object.keys(f).forEach(function($){var A=f[$];$==="class"?p.className=Array.isArray(A)?A.join(" "):A:typeof A=="function"||$=="value"||$[0]=="$"?p[$]=A:$==="ref"?o&&(o[A]=p):$==="style"?typeof A=="string"&&(p.style.cssText=A):A!=null&&p.setAttribute($,A)}),e&&e.appendChild(p),p},M.getDocumentHead=function(i){return i||(i=document),i.head||i.getElementsByTagName("head")[0]||i.documentElement},M.createElement=function(i,t){return document.createElementNS?document.createElementNS(t||L,i):document.createElement(i)},M.removeChildren=function(i){i.innerHTML=""},M.createTextNode=function(i,t){var e=t?t.ownerDocument:document;return e.createTextNode(i)},M.createFragment=function(i){var t=i?i.ownerDocument:document;return t.createDocumentFragment()},M.hasCssClass=function(i,t){var e=(i.className+"").split(/\s+/g);return e.indexOf(t)!==-1},M.addCssClass=function(i,t){M.hasCssClass(i,t)||(i.className+=" "+t)},M.removeCssClass=function(i,t){for(var e=i.className.split(/\s+/g);;){var o=e.indexOf(t);if(o==-1)break;e.splice(o,1)}i.className=e.join(" ")},M.toggleCssClass=function(i,t){for(var e=i.className.split(/\s+/g),o=!0;;){var s=e.indexOf(t);if(s==-1)break;o=!1,e.splice(s,1)}return o&&e.push(t),i.className=e.join(" "),o},M.setCssClass=function(i,t,e){e?M.addCssClass(i,t):M.removeCssClass(i,t)},M.hasCssString=function(i,t){var e=0,o;if(t=t||document,o=t.querySelectorAll("style")){for(;e<o.length;)if(o[e++].id===i)return!0}},M.removeElementById=function(i,t){t=t||document,t.getElementById(i)&&t.getElementById(i).remove()};var b,a=[];M.useStrictCSP=function(i){b=i,i==!1?c():a||(a=[])};function c(){var i=a;a=null,i&&i.forEach(function(t){r(t[0],t[1])})}function r(i,t,e){if(typeof document!="undefined"){if(a){if(e)c();else if(e===!1)return a.push([i,t])}if(!b){var o=e;!e||!e.getRootNode?o=document:(o=e.getRootNode(),(!o||o==e)&&(o=document));var s=o.ownerDocument||o;if(t&&M.hasCssString(t,o))return null;t&&(i+=` |
| 2 |
/*# sourceURL=ace/css/`+t+" */");var l=M.createElement("style");l.appendChild(s.createTextNode(i)),t&&(l.id=t),o==s&&(o=M.getDocumentHead(s)),o.insertBefore(l,o.firstChild)}}}if(M.importCssString=r,M.importCssStylsheet=function(i,t){M.buildDom(["link",{rel:"stylesheet",href:i}],M.getDocumentHead(t))},M.scrollbarWidth=function(i){var t=M.createElement("ace_inner");t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block";var e=M.createElement("ace_outer"),o=e.style;o.position="absolute",o.left="-10000px",o.overflow="hidden",o.width="200px",o.minWidth="0px",o.height="150px",o.display="block",e.appendChild(t);var s=i&&i.documentElement||document&&document.documentElement;if(!s)return 0;s.appendChild(e);var l=t.offsetWidth;o.overflow="scroll";var h=t.offsetWidth;return l===h&&(h=e.clientWidth),s.removeChild(e),l-h},M.computedStyle=function(i,t){return window.getComputedStyle(i,"")||{}},M.setStyle=function(i,t,e){i[t]!==e&&(i[t]=e)},M.HAS_CSS_ANIMATION=!1,M.HAS_CSS_TRANSFORMS=!1,M.HI_DPI=x.isWin?typeof window!="undefined"&&window.devicePixelRatio>=1.5:!0,x.isChromeOS&&(M.HI_DPI=!1),typeof document!="undefined"){var n=document.createElement("div");M.HI_DPI&&n.style.transform!==void 0&&(M.HAS_CSS_TRANSFORMS=!0),!x.isEdge&&typeof n.style.animationName!="undefined"&&(M.HAS_CSS_ANIMATION=!0),n=null}M.HAS_CSS_TRANSFORMS?M.translate=function(i,t,e){i.style.transform="translate("+Math.round(t)+"px, "+Math.round(e)+"px)"}:M.translate=function(i,t,e){i.style.top=Math.round(e)+"px",i.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(R,M,P){/* |
| 3 |
* based on code from: |
| 4 |
* |
| 5 |
* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. |
| 6 |
* Available via the MIT or new BSD license. |
| 7 |
* see: http://github.com/jrburke/requirejs for details |
| 8 |
*/var x=R("./dom");M.get=function(L,b){var a=new XMLHttpRequest;a.open("GET",L,!0),a.onreadystatechange=function(){a.readyState===4&&b(a.responseText)},a.send(null)},M.loadScript=function(L,b){var a=x.getDocumentHead(),c=document.createElement("script");c.src=L,a.appendChild(c),c.onload=c.onreadystatechange=function(r,n){(n||!c.readyState||c.readyState=="loaded"||c.readyState=="complete")&&(c=c.onload=c.onreadystatechange=null,n||b())}},M.qualifyURL=function(L){var b=document.createElement("a");return b.href=L,b.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(R,M,P){M.inherits=function(x,L){x.super_=L,x.prototype=Object.create(L.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}})},M.mixin=function(x,L){for(var b in L)x[b]=L[b];return x},M.implement=function(x,L){M.mixin(x,L)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(R,M,P){var x={},L=function(){this.propagationStopped=!0},b=function(){this.defaultPrevented=!0};x._emit=x._dispatchEvent=function(a,c){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._eventRegistry[a]||[],n=this._defaultHandlers[a];if(!(!r.length&&!n)){(typeof c!="object"||!c)&&(c={}),c.type||(c.type=a),c.stopPropagation||(c.stopPropagation=L),c.preventDefault||(c.preventDefault=b),r=r.slice();for(var i=0;i<r.length&&(r[i](c,this),!c.propagationStopped);i++);if(n&&!c.defaultPrevented)return n(c,this)}},x._signal=function(a,c){var r=(this._eventRegistry||{})[a];if(r){r=r.slice();for(var n=0;n<r.length;n++)r[n](c,this)}},x.once=function(a,c){var r=this;if(this.on(a,function n(){r.off(a,n),c.apply(null,arguments)}),!c)return new Promise(function(n){c=n})},x.setDefaultHandler=function(a,c){var r=this._defaultHandlers;if(r||(r=this._defaultHandlers={_disabled_:{}}),r[a]){var n=r[a],i=r._disabled_[a];i||(r._disabled_[a]=i=[]),i.push(n);var t=i.indexOf(c);t!=-1&&i.splice(t,1)}r[a]=c},x.removeDefaultHandler=function(a,c){var r=this._defaultHandlers;if(r){var n=r._disabled_[a];if(r[a]==c)n&&this.setDefaultHandler(a,n.pop());else if(n){var i=n.indexOf(c);i!=-1&&n.splice(i,1)}}},x.on=x.addEventListener=function(a,c,r){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[a];return n||(n=this._eventRegistry[a]=[]),n.indexOf(c)==-1&&n[r?"unshift":"push"](c),c},x.off=x.removeListener=x.removeEventListener=function(a,c){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[a];if(r){var n=r.indexOf(c);n!==-1&&r.splice(n,1)}},x.removeAllListeners=function(a){a||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[a]=void 0),this._defaultHandlers&&(this._defaultHandlers[a]=void 0)},M.EventEmitter=x}),ace.define("ace/lib/report_error",["require","exports","module"],function(R,M,P){M.reportError=function(L,b){var a=new Error(L);a.data=b,typeof console=="object"&&console.error&&console.error(a),setTimeout(function(){throw a})}}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error"],function(R,M,P){"no use strict";var x=R("./oop"),L=R("./event_emitter").EventEmitter,b=R("./report_error").reportError,a={setOptions:function(i){Object.keys(i).forEach(function(t){this.setOption(t,i[t])},this)},getOptions:function(i){var t={};if(i)Array.isArray(i)||(t=i,i=Object.keys(t));else{var e=this.$options;i=Object.keys(e).filter(function(o){return!e[o].hidden})}return i.forEach(function(o){t[o]=this.getOption(o)},this),t},setOption:function(i,t){if(this["$"+i]!==t){var e=this.$options[i];if(!e)return c('misspelled option "'+i+'"');if(e.forwardTo)return this[e.forwardTo]&&this[e.forwardTo].setOption(i,t);e.handlesSet||(this["$"+i]=t),e&&e.set&&e.set.call(this,t)}},getOption:function(i){var t=this.$options[i];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(i):t&&t.get?t.get.call(this):this["$"+i]:c('misspelled option "'+i+'"')}};function c(i){typeof console!="undefined"&&console.warn&&console.warn.apply(console,arguments)}var r,n=function(){function i(){this.$defaultOptions={}}return i.prototype.defineOptions=function(t,e,o){return t.$options||(this.$defaultOptions[e]=t.$options={}),Object.keys(o).forEach(function(s){var l=o[s];typeof l=="string"&&(l={forwardTo:l}),l.name||(l.name=s),t.$options[l.name]=l,"initialValue"in l&&(t["$"+l.name]=l.initialValue)}),x.implement(t,a),this},i.prototype.resetOptions=function(t){Object.keys(t.$options).forEach(function(e){var o=t.$options[e];"value"in o&&t.setOption(e,o.value)})},i.prototype.setDefaultValue=function(t,e,o){if(!t){for(t in this.$defaultOptions)if(this.$defaultOptions[t][e])break;if(!this.$defaultOptions[t][e])return!1}var s=this.$defaultOptions[t]||(this.$defaultOptions[t]={});s[e]&&(s.forwardTo?this.setDefaultValue(s.forwardTo,e,o):s[e].value=o)},i.prototype.setDefaultValues=function(t,e){Object.keys(e).forEach(function(o){this.setDefaultValue(t,o,e[o])},this)},i.prototype.setMessages=function(t){r=t},i.prototype.nls=function(t,e){r&&!r[t]&&c("No message found for '"+t+"' in the provided messages, falling back to default English message.");var o=r&&r[t]||t;return e&&(o=o.replace(/\$(\$|[\d]+)/g,function(s,l){return l=="$"?"$":e[l]})),o},i}();n.prototype.warn=c,n.prototype.reportError=b,x.implement(n.prototype,L),M.AppConfig=n}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(R,M,P){P.exports=`.ace-tm .ace_gutter { |
| 9 |
background: #f0f0f0; |
| 10 |
color: #333; |
| 11 |
} |
| 12 |
|
| 13 |
.ace-tm .ace_print-margin { |
| 14 |
width: 1px; |
| 15 |
background: #e8e8e8; |
| 16 |
} |
| 17 |
|
| 18 |
.ace-tm .ace_fold { |
| 19 |
background-color: #6B72E6; |
| 20 |
} |
| 21 |
|
| 22 |
.ace-tm { |
| 23 |
background-color: #FFFFFF; |
| 24 |
color: black; |
| 25 |
} |
| 26 |
|
| 27 |
.ace-tm .ace_cursor { |
| 28 |
color: black; |
| 29 |
} |
| 30 |
|
| 31 |
.ace-tm .ace_invisible { |
| 32 |
color: rgb(191, 191, 191); |
| 33 |
} |
| 34 |
|
| 35 |
.ace-tm .ace_storage, |
| 36 |
.ace-tm .ace_keyword { |
| 37 |
color: blue; |
| 38 |
} |
| 39 |
|
| 40 |
.ace-tm .ace_constant { |
| 41 |
color: rgb(197, 6, 11); |
| 42 |
} |
| 43 |
|
| 44 |
.ace-tm .ace_constant.ace_buildin { |
| 45 |
color: rgb(88, 72, 246); |
| 46 |
} |
| 47 |
|
| 48 |
.ace-tm .ace_constant.ace_language { |
| 49 |
color: rgb(88, 92, 246); |
| 50 |
} |
| 51 |
|
| 52 |
.ace-tm .ace_constant.ace_library { |
| 53 |
color: rgb(6, 150, 14); |
| 54 |
} |
| 55 |
|
| 56 |
.ace-tm .ace_invalid { |
| 57 |
background-color: rgba(255, 0, 0, 0.1); |
| 58 |
color: red; |
| 59 |
} |
| 60 |
|
| 61 |
.ace-tm .ace_support.ace_function { |
| 62 |
color: rgb(60, 76, 114); |
| 63 |
} |
| 64 |
|
| 65 |
.ace-tm .ace_support.ace_constant { |
| 66 |
color: rgb(6, 150, 14); |
| 67 |
} |
| 68 |
|
| 69 |
.ace-tm .ace_support.ace_type, |
| 70 |
.ace-tm .ace_support.ace_class { |
| 71 |
color: rgb(109, 121, 222); |
| 72 |
} |
| 73 |
|
| 74 |
.ace-tm .ace_keyword.ace_operator { |
| 75 |
color: rgb(104, 118, 135); |
| 76 |
} |
| 77 |
|
| 78 |
.ace-tm .ace_string { |
| 79 |
color: rgb(3, 106, 7); |
| 80 |
} |
| 81 |
|
| 82 |
.ace-tm .ace_comment { |
| 83 |
color: rgb(76, 136, 107); |
| 84 |
} |
| 85 |
|
| 86 |
.ace-tm .ace_comment.ace_doc { |
| 87 |
color: rgb(0, 102, 255); |
| 88 |
} |
| 89 |
|
| 90 |
.ace-tm .ace_comment.ace_doc.ace_tag { |
| 91 |
color: rgb(128, 159, 191); |
| 92 |
} |
| 93 |
|
| 94 |
.ace-tm .ace_constant.ace_numeric { |
| 95 |
color: rgb(0, 0, 205); |
| 96 |
} |
| 97 |
|
| 98 |
.ace-tm .ace_variable { |
| 99 |
color: rgb(49, 132, 149); |
| 100 |
} |
| 101 |
|
| 102 |
.ace-tm .ace_xml-pe { |
| 103 |
color: rgb(104, 104, 91); |
| 104 |
} |
| 105 |
|
| 106 |
.ace-tm .ace_entity.ace_name.ace_function { |
| 107 |
color: #0000A2; |
| 108 |
} |
| 109 |
|
| 110 |
|
| 111 |
.ace-tm .ace_heading { |
| 112 |
color: rgb(12, 7, 255); |
| 113 |
} |
| 114 |
|
| 115 |
.ace-tm .ace_list { |
| 116 |
color:rgb(185, 6, 144); |
| 117 |
} |
| 118 |
|
| 119 |
.ace-tm .ace_meta.ace_tag { |
| 120 |
color:rgb(0, 22, 142); |
| 121 |
} |
| 122 |
|
| 123 |
.ace-tm .ace_string.ace_regex { |
| 124 |
color: rgb(255, 0, 0) |
| 125 |
} |
| 126 |
|
| 127 |
.ace-tm .ace_marker-layer .ace_selection { |
| 128 |
background: rgb(181, 213, 255); |
| 129 |
} |
| 130 |
.ace-tm.ace_multiselect .ace_selection.ace_start { |
| 131 |
box-shadow: 0 0 3px 0px white; |
| 132 |
} |
| 133 |
.ace-tm .ace_marker-layer .ace_step { |
| 134 |
background: rgb(252, 255, 0); |
| 135 |
} |
| 136 |
|
| 137 |
.ace-tm .ace_marker-layer .ace_stack { |
| 138 |
background: rgb(164, 229, 101); |
| 139 |
} |
| 140 |
|
| 141 |
.ace-tm .ace_marker-layer .ace_bracket { |
| 142 |
margin: -1px 0 0 -1px; |
| 143 |
border: 1px solid rgb(192, 192, 192); |
| 144 |
} |
| 145 |
|
| 146 |
.ace-tm .ace_marker-layer .ace_active-line { |
| 147 |
background: rgba(0, 0, 0, 0.07); |
| 148 |
} |
| 149 |
|
| 150 |
.ace-tm .ace_gutter-active-line { |
| 151 |
background-color : #dcdcdc; |
| 152 |
} |
| 153 |
|
| 154 |
.ace-tm .ace_marker-layer .ace_selected-word { |
| 155 |
background: rgb(250, 250, 255); |
| 156 |
border: 1px solid rgb(200, 200, 250); |
| 157 |
} |
| 158 |
|
| 159 |
.ace-tm .ace_indent-guide { |
| 160 |
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y; |
| 161 |
} |
| 162 |
|
| 163 |
.ace-tm .ace_indent-guide-active { |
| 164 |
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y; |
| 165 |
} |
| 166 |
`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(R,M,P){M.isDark=!1,M.cssClass="ace-tm",M.cssText=R("./textmate-css"),M.$id="ace/theme/textmate";var x=R("../lib/dom");x.importCssString(M.cssText,M.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(R,M,P){"no use strict";var x=R("./lib/lang"),L=R("./lib/net"),b=R("./lib/dom"),a=R("./lib/app_config").AppConfig;P.exports=M=new a;var c={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};M.get=function(t){if(!c.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return c[t]},M.set=function(t,e){if(c.hasOwnProperty(t))c[t]=e;else if(this.setDefaultValue("",t,e)==!1)throw new Error("Unknown config key: "+t);t=="useStrictCSP"&&b.useStrictCSP(e)},M.all=function(){return x.copyObject(c)},M.$modes={},M.moduleUrl=function(t,e){if(c.$moduleUrls[t])return c.$moduleUrls[t];var o=t.split("/");e=e||o[o.length-2]||"";var s=e=="snippets"?"/":"-",l=o[o.length-1];if(e=="worker"&&s=="-"){var h=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");l=l.replace(h,"")}(!l||l==e)&&o.length>1&&(l=o[o.length-2]);var S=c[e+"Path"];return S==null?S=c.basePath:s=="/"&&(e=s=""),S&&S.slice(-1)!="/"&&(S+="/"),S+e+s+l+this.get("suffix")},M.setModuleUrl=function(t,e){return c.$moduleUrls[t]=e};var r=function(t,e){if(t==="ace/theme/textmate"||t==="./theme/textmate")return e(null,R("./theme/textmate"));if(n)return n(t,e);console.error("loader is not configured")},n;M.setLoader=function(t){n=t},M.dynamicModules=Object.create(null),M.$loading={},M.$loaded={},M.loadModule=function(t,e){var o;if(Array.isArray(t))var s=t[0],l=t[1];else if(typeof t=="string")var l=t;var h=function(S){if(S&&!M.$loading[l])return e&&e(S);if(M.$loading[l]||(M.$loading[l]=[]),M.$loading[l].push(e),!(M.$loading[l].length>1)){var p=function(){r(l,function(f,d){d&&(M.$loaded[l]=d),M._emit("load.module",{name:l,module:d});var $=M.$loading[l];M.$loading[l]=null,$.forEach(function(A){A&&A(d)})})};if(!M.get("packaged"))return p();L.loadScript(M.moduleUrl(l,s),p),i()}};if(M.dynamicModules[l])M.dynamicModules[l]().then(function(S){S.default?h(S.default):h(S)});else{try{o=this.$require(l)}catch(S){}h(o||M.$loaded[l])}},M.$require=function(t){if(typeof P.require=="function"){var e="require";return P[e](t)}},M.setModuleLoader=function(t,e){M.dynamicModules[t]=e};var i=function(){!c.basePath&&!c.workerPath&&!c.modePath&&!c.themePath&&!Object.keys(c.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),i=function(){})};M.version="1.32.6"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(R,M,P){R("./lib/fixoldbrowsers");var x=R("./config");x.setLoader(function(c,r){R([c],function(n){r(null,n)})});var L=function(){return this||typeof window!="undefined"&&window}();P.exports=function(c){x.init=b,x.$require=R,c.require=R},b(!0);function b(c){if(!(!L||!L.document)){x.set("packaged",c||R.packaged||P.packaged||L.define&&(void 0).packaged);var r={},n="",i=document.currentScript||document._currentScript,t=i&&i.ownerDocument||document;i&&i.src&&(n=i.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=t.getElementsByTagName("script"),o=0;o<e.length;o++){var s=e[o],l=s.src||s.getAttribute("src");if(l){for(var h=s.attributes,S=0,p=h.length;S<p;S++){var f=h[S];f.name.indexOf("data-ace-")===0&&(r[a(f.name.replace(/^data-ace-/,""))]=f.value)}var d=l.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);d&&(n=d[1])}}n&&(r.base=r.base||n,r.packaged=!0),r.basePath=r.base,r.workerPath=r.workerPath||r.base,r.modePath=r.modePath||r.base,r.themePath=r.themePath||r.base,delete r.base;for(var $ in r)typeof r[$]!="undefined"&&x.set($,r[$])}}function a(c){return c.replace(/-(.)/g,function(r,n){return n.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(R,M,P){var x=function(){function L(b,a,c,r){this.start={row:b,column:a},this.end={row:c,column:r}}return L.prototype.isEqual=function(b){return this.start.row===b.start.row&&this.end.row===b.end.row&&this.start.column===b.start.column&&this.end.column===b.end.column},L.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},L.prototype.contains=function(b,a){return this.compare(b,a)==0},L.prototype.compareRange=function(b){var a,c=b.end,r=b.start;return a=this.compare(c.row,c.column),a==1?(a=this.compare(r.row,r.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(r.row,r.column),a==-1?-1:a==1?42:0)},L.prototype.comparePoint=function(b){return this.compare(b.row,b.column)},L.prototype.containsRange=function(b){return this.comparePoint(b.start)==0&&this.comparePoint(b.end)==0},L.prototype.intersects=function(b){var a=this.compareRange(b);return a==-1||a==0||a==1},L.prototype.isEnd=function(b,a){return this.end.row==b&&this.end.column==a},L.prototype.isStart=function(b,a){return this.start.row==b&&this.start.column==a},L.prototype.setStart=function(b,a){typeof b=="object"?(this.start.column=b.column,this.start.row=b.row):(this.start.row=b,this.start.column=a)},L.prototype.setEnd=function(b,a){typeof b=="object"?(this.end.column=b.column,this.end.row=b.row):(this.end.row=b,this.end.column=a)},L.prototype.inside=function(b,a){return this.compare(b,a)==0?!(this.isEnd(b,a)||this.isStart(b,a)):!1},L.prototype.insideStart=function(b,a){return this.compare(b,a)==0?!this.isEnd(b,a):!1},L.prototype.insideEnd=function(b,a){return this.compare(b,a)==0?!this.isStart(b,a):!1},L.prototype.compare=function(b,a){return!this.isMultiLine()&&b===this.start.row?a<this.start.column?-1:a>this.end.column?1:0:b<this.start.row?-1:b>this.end.row?1:this.start.row===b?a>=this.start.column?0:-1:this.end.row===b?a<=this.end.column?0:1:0},L.prototype.compareStart=function(b,a){return this.start.row==b&&this.start.column==a?-1:this.compare(b,a)},L.prototype.compareEnd=function(b,a){return this.end.row==b&&this.end.column==a?1:this.compare(b,a)},L.prototype.compareInside=function(b,a){return this.end.row==b&&this.end.column==a?1:this.start.row==b&&this.start.column==a?-1:this.compare(b,a)},L.prototype.clipRows=function(b,a){if(this.end.row>a)var c={row:a+1,column:0};else if(this.end.row<b)var c={row:b,column:0};if(this.start.row>a)var r={row:a+1,column:0};else if(this.start.row<b)var r={row:b,column:0};return L.fromPoints(r||this.start,c||this.end)},L.prototype.extend=function(b,a){var c=this.compare(b,a);if(c==0)return this;if(c==-1)var r={row:b,column:a};else var n={row:b,column:a};return L.fromPoints(r||this.start,n||this.end)},L.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},L.prototype.isMultiLine=function(){return this.start.row!==this.end.row},L.prototype.clone=function(){return L.fromPoints(this.start,this.end)},L.prototype.collapseRows=function(){return this.end.column==0?new L(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new L(this.start.row,0,this.end.row,0)},L.prototype.toScreenRange=function(b){var a=b.documentToScreenPosition(this.start),c=b.documentToScreenPosition(this.end);return new L(a.row,a.column,c.row,c.column)},L.prototype.moveBy=function(b,a){this.start.row+=b,this.start.column+=a,this.end.row+=b,this.end.column+=a},L}();x.fromPoints=function(L,b){return new x(L.row,L.column,b.row,b.column)},x.comparePoints=function(L,b){return L.row-b.row||L.column-b.column},M.Range=x}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(R,M,P){/*! @license |
| 167 |
========================================================================== |
| 168 |
SproutCore -- JavaScript Application Framework |
| 169 |
copyright 2006-2009, Sprout Systems Inc., Apple Inc. and contributors. |
| 170 |
|
| 171 |
Permission is hereby granted, free of charge, to any person obtaining a |
| 172 |
copy of this software and associated documentation files (the "Software"), |
| 173 |
to deal in the Software without restriction, including without limitation |
| 174 |
the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 175 |
and/or sell copies of the Software, and to permit persons to whom the |
| 176 |
Software is furnished to do so, subject to the following conditions: |
| 177 |
|
| 178 |
The above copyright notice and this permission notice shall be included in |
| 179 |
all copies or substantial portions of the Software. |
| 180 |
|
| 181 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 182 |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 183 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 184 |
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 185 |
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 186 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 187 |
DEALINGS IN THE SOFTWARE. |
| 188 |
|
| 189 |
SproutCore and the SproutCore logo are trademarks of Sprout Systems, Inc. |
| 190 |
|
| 191 |
For more information about SproutCore, visit http://www.sproutcore.com |
| 192 |
|
| 193 |
|
| 194 |
========================================================================== |
| 195 |
@license */var x=R("./oop"),L=function(){var b={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};b.PRINTABLE_KEYS[173]="-";var a,c;for(c in b.FUNCTION_KEYS)a=b.FUNCTION_KEYS[c].toLowerCase(),b[a]=parseInt(c,10);for(c in b.PRINTABLE_KEYS)a=b.PRINTABLE_KEYS[c].toLowerCase(),b[a]=parseInt(c,10);return x.mixin(b,b.MODIFIER_KEYS),x.mixin(b,b.PRINTABLE_KEYS),x.mixin(b,b.FUNCTION_KEYS),b.enter=b.return,b.escape=b.esc,b.del=b.delete,function(){for(var r=["cmd","ctrl","alt","shift"],n=Math.pow(2,r.length);n--;)b.KEY_MODS[n]=r.filter(function(i){return n&b.KEY_MODS[i]}).join("-")+"-"}(),b.KEY_MODS[0]="",b.KEY_MODS[-1]="input-",b}();x.mixin(M,L),M.default=M,M.keyCodeToString=function(b){var a=L[b];return typeof a!="string"&&(a=String.fromCharCode(b)),a.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(R,M,P){var x=R("./keys"),L=R("./useragent"),b=null,a=0,c;function r(){c=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return c={passive:!1},!0}})}catch(S){}}function n(){return c==null&&r(),c}function i(S,p,f){this.elem=S,this.type=p,this.callback=f}i.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var t=M.addListener=function(S,p,f,d){S.addEventListener(p,f,n()),d&&d.$toDestroy.push(new i(S,p,f))},e=M.removeListener=function(S,p,f){S.removeEventListener(p,f,n())};M.stopEvent=function(S){return M.stopPropagation(S),M.preventDefault(S),!1},M.stopPropagation=function(S){S.stopPropagation&&S.stopPropagation()},M.preventDefault=function(S){S.preventDefault&&S.preventDefault()},M.getButton=function(S){return S.type=="dblclick"?0:S.type=="contextmenu"||L.isMac&&S.ctrlKey&&!S.altKey&&!S.shiftKey?2:S.button},M.capture=function(S,p,f){var d=S&&S.ownerDocument||document;function $(A){p&&p(A),f&&f(A),e(d,"mousemove",p),e(d,"mouseup",$),e(d,"dragstart",$)}return t(d,"mousemove",p),t(d,"mouseup",$),t(d,"dragstart",$),$},M.addMouseWheelListener=function(S,p,f){t(S,"wheel",function(d){var $=.15,A=d.deltaX||0,w=d.deltaY||0;switch(d.deltaMode){case d.DOM_DELTA_PIXEL:d.wheelX=A*$,d.wheelY=w*$;break;case d.DOM_DELTA_LINE:var k=15;d.wheelX=A*k,d.wheelY=w*k;break;case d.DOM_DELTA_PAGE:var y=150;d.wheelX=A*y,d.wheelY=w*y;break}p(d)},f)},M.addMultiMouseDownListener=function(S,p,f,d,$){var A=0,w,k,y,m={2:"dblclick",3:"tripleclick",4:"quadclick"};function g(u){if(M.getButton(u)!==0?A=0:u.detail>1?(A++,A>4&&(A=1)):A=1,L.isIE){var v=Math.abs(u.clientX-w)>5||Math.abs(u.clientY-k)>5;(!y||v)&&(A=1),y&&clearTimeout(y),y=setTimeout(function(){y=null},p[A-1]||600),A==1&&(w=u.clientX,k=u.clientY)}if(u._clicks=A,f[d]("mousedown",u),A>4)A=0;else if(A>1)return f[d](m[A],u)}Array.isArray(S)||(S=[S]),S.forEach(function(u){t(u,"mousedown",g,$)})};function o(S){return 0|(S.ctrlKey?1:0)|(S.altKey?2:0)|(S.shiftKey?4:0)|(S.metaKey?8:0)}M.getModifierString=function(S){return x.KEY_MODS[o(S)]};function s(S,p,f){var d=o(p);if(!L.isMac&&b){if(p.getModifierState&&(p.getModifierState("OS")||p.getModifierState("Win"))&&(d|=8),b.altGr)if((3&d)!=3)b.altGr=0;else return;if(f===18||f===17){var $=p.location;if(f===17&&$===1)b[f]==1&&(a=p.timeStamp);else if(f===18&&d===3&&$===2){var A=p.timeStamp-a;A<50&&(b.altGr=!0)}}}if(f in x.MODIFIER_KEYS&&(f=-1),!(!d&&f===13&&p.location===3&&(S(p,d,-f),p.defaultPrevented))){if(L.isChromeOS&&d&8){if(S(p,d,f),p.defaultPrevented)return;d&=-9}return!d&&!(f in x.FUNCTION_KEYS)&&!(f in x.PRINTABLE_KEYS)?!1:S(p,d,f)}}M.addCommandKeyListener=function(S,p,f){var d=null;t(S,"keydown",function($){b[$.keyCode]=(b[$.keyCode]||0)+1;var A=s(p,$,$.keyCode);return d=$.defaultPrevented,A},f),t(S,"keypress",function($){d&&($.ctrlKey||$.altKey||$.shiftKey||$.metaKey)&&(M.stopEvent($),d=null)},f),t(S,"keyup",function($){b[$.keyCode]=null},f),b||(l(),t(window,"focus",l))};function l(){b=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!L.isOldIE){var h=1;M.nextTick=function(S,p){p=p||window;var f="zero-timeout-message-"+h++,d=function($){$.data==f&&(M.stopPropagation($),e(p,"message",d),S())};t(p,"message",d),p.postMessage(f,"*")}}M.$idleBlocked=!1,M.onIdle=function(S,p){return setTimeout(function f(){M.$idleBlocked?setTimeout(f,100):S()},p)},M.$idleBlockId=null,M.blockIdle=function(S){M.$idleBlockId&&clearTimeout(M.$idleBlockId),M.$idleBlocked=!0,M.$idleBlockId=setTimeout(function(){M.$idleBlocked=!1},S||100)},M.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),M.nextFrame?M.nextFrame=M.nextFrame.bind(window):M.nextFrame=function(S){setTimeout(S,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(R,M,P){var x;P.exports={lineMode:!1,pasteCancelled:function(){return x&&x>Date.now()-50?!0:x=!1},cancel:function(){x=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(R,M,P){var x=R("../lib/event"),L=R("../config").nls,b=R("../lib/useragent"),a=R("../lib/dom"),c=R("../lib/lang"),r=R("../clipboard"),n=b.isChrome<18,i=b.isIE,t=b.isChrome>63,e=400,o=R("../lib/keys"),s=o.KEY_MODS,l=b.isIOS,h=l?/\s/:/\n/,S=b.isMobile,p;p=function(f,d){var $=a.createElement("textarea");$.className="ace_text-input",$.setAttribute("wrap","off"),$.setAttribute("autocorrect","off"),$.setAttribute("autocapitalize","off"),$.setAttribute("spellcheck","false"),$.style.opacity="0",f.insertBefore($,f.firstChild);var A=!1,w=!1,k=!1,y=!1,m="";S||($.style.fontSize="1px");var g=!1,u=!1,v="",C=0,E=0,T=0,_=Number.MAX_SAFE_INTEGER,I=Number.MIN_SAFE_INTEGER,F=0;try{var H=document.activeElement===$}catch(N){}this.setNumberOfExtraLines=function(N){if(_=Number.MAX_SAFE_INTEGER,I=Number.MIN_SAFE_INTEGER,N<0){F=0;return}F=N},this.setAriaOptions=function(N){if(N.activeDescendant?($.setAttribute("aria-haspopup","true"),$.setAttribute("aria-autocomplete",N.inline?"both":"list"),$.setAttribute("aria-activedescendant",N.activeDescendant)):($.setAttribute("aria-haspopup","false"),$.setAttribute("aria-autocomplete","both"),$.removeAttribute("aria-activedescendant")),N.role&&$.setAttribute("role",N.role),N.setLabel&&($.setAttribute("aria-roledescription",L("editor")),d.session)){var K=d.session.selection.cursor.row;$.setAttribute("aria-label",L("Cursor at row $0",[K+1]))}},this.setAriaOptions({role:"textbox"}),x.addListener($,"blur",function(N){u||(d.onBlur(N),H=!1)},d),x.addListener($,"focus",function(N){if(!u){if(H=!0,b.isEdge)try{if(!document.hasFocus())return}catch(K){}d.onFocus(N),b.isEdge?setTimeout(O):O()}},d),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:d.renderer.enableKeyboardAccessibility}),m||t||this.$focusScroll=="browser")return $.focus({preventScroll:!0});var N=$.style.top;$.style.position="fixed",$.style.top="0px";try{var K=$.getBoundingClientRect().top!=0}catch(Q){return}var j=[];if(K)for(var X=$.parentElement;X&&X.nodeType==1;)j.push(X),X.setAttribute("ace_nocontext","true"),!X.parentElement&&X.getRootNode?X=X.getRootNode().host:X=X.parentElement;$.focus({preventScroll:!0}),K&&j.forEach(function(Q){Q.removeAttribute("ace_nocontext")}),setTimeout(function(){$.style.position="",$.style.top=="0px"&&($.style.top=N)},0)},this.blur=function(){$.blur()},this.isFocused=function(){return H},d.on("beforeEndOperation",function(){var N=d.curOp,K=N&&N.command&&N.command.name;if(K!="insertstring"){var j=K&&(N.docChanged||N.selectionChanged);k&&j&&(v=$.value="",ce()),O()}});var D=function(N,K){for(var j=K,X=1;X<=N-_&&X<2*F+1;X++)j+=d.session.getLine(N-X).length+1;return j},O=l?function(N){if(!(!H||A&&!N||y)){N||(N="");var K=` |
| 196 |
ab`+N+`cde fg |
| 197 |
`;K!=$.value&&($.value=v=K);var j=4,X=4+(N.length||(d.selection.isEmpty()?0:1));(C!=j||E!=X)&&$.setSelectionRange(j,X),C=j,E=X}}:function(){if(!(k||y)&&!(!H&&!V)){k=!0;var N=0,K=0,j="";if(d.session){var X=d.selection,Q=X.getRange(),te=X.cursor.row;te===I+1?(_=I+1,I=_+2*F):te===_-1?(I=_-1,_=I-2*F):(te<_-1||te>I+1)&&(_=te>F?te-F:0,I=te>F?te+F:2*F);for(var ne=[],ie=_;ie<=I;ie++)ne.push(d.session.getLine(ie));if(j=ne.join(` |
| 198 |
`),N=D(Q.start.row,Q.start.column),K=D(Q.end.row,Q.end.column),Q.start.row<_){var ee=d.session.getLine(_-1);N=Q.start.row<_-1?0:N,K+=ee.length+1,j=ee+` |
| 199 |
`+j}else if(Q.end.row>I){var Z=d.session.getLine(I+1);K=Q.end.row>I+1?Z.length:Q.end.column,K+=j.length+1,j=j+` |
| 200 |
`+Z}else S&&te>0&&(j=` |
| 201 |
`+j,K+=1,N+=1);j.length>e&&(N<e&&K<e?j=j.slice(0,e):(j=` |
| 202 |
`,N==K?N=K=0:(N=0,K=1)));var se=j+` |
| 203 |
|
| 204 |
`;se!=v&&($.value=v=se,C=E=se.length)}if(V&&(C=$.selectionStart,E=$.selectionEnd),E!=K||C!=N||$.selectionEnd!=E)try{$.setSelectionRange(N,K),C=N,E=K}catch(he){}k=!1}};this.resetSelection=O,H&&d.onFocus();var W=function(N){return N.selectionStart===0&&N.selectionEnd>=v.length&&N.value===v&&v&&N.selectionEnd!==E},B=function(N){k||(A?A=!1:W($)?(d.selectAll(),O()):S&&$.selectionStart!=C&&O())},z=null;this.setInputHandler=function(N){z=N},this.getInputHandler=function(){return z};var V=!1,U=function(N,K){if(V&&(V=!1),w)return O(),N&&d.onPaste(N),w=!1,"";for(var j=$.selectionStart,X=$.selectionEnd,Q=C,te=v.length-E,ne=N,ie=N.length-j,ee=N.length-X,Z=0;Q>0&&v[Z]==N[Z];)Z++,Q--;for(ne=ne.slice(Z),Z=1;te>0&&v.length-Z>C-1&&v[v.length-Z]==N[N.length-Z];)Z++,te--;ie-=Z-1,ee-=Z-1;var se=ne.length-Z+1;if(se<0&&(Q=-se,se=0),ne=ne.slice(0,se),!K&&!ne&&!ie&&!Q&&!te&&!ee)return"";y=!0;var he=!1;return b.isAndroid&&ne==". "&&(ne=" ",he=!0),ne&&!Q&&!te&&!ie&&!ee||g?d.onTextInput(ne):d.onTextInput(ne,{extendLeft:Q,extendRight:te,restoreStart:ie,restoreEnd:ee}),y=!1,v=N,C=j,E=X,T=ee,he?` |
| 205 |
`:ne},G=function(N){if(k)return le();if(N&&N.inputType){if(N.inputType=="historyUndo")return d.execCommand("undo");if(N.inputType=="historyRedo")return d.execCommand("redo")}var K=$.value,j=U(K,!0);(K.length>e+100||h.test(j)||S&&C<1&&C==E)&&O()},Y=function(N,K,j){var X=N.clipboardData||window.clipboardData;if(!(!X||n)){var Q=i||j?"Text":"text/plain";try{return K?X.setData(Q,K)!==!1:X.getData(Q)}catch(te){if(!j)return Y(te,K,!0)}}},J=function(N,K){var j=d.getCopyText();if(!j)return x.preventDefault(N);Y(N,j)?(l&&(O(j),A=j,setTimeout(function(){A=!1},10)),K?d.onCut():d.onCopy(),x.preventDefault(N)):(A=!0,$.value=j,$.select(),setTimeout(function(){A=!1,O(),K?d.onCut():d.onCopy()}))},oe=function(N){J(N,!0)},re=function(N){J(N,!1)},q=function(N){var K=Y(N);r.pasteCancelled()||(typeof K=="string"?(K&&d.onPaste(K,N),b.isIE&&setTimeout(O),x.preventDefault(N)):($.value="",w=!0))};x.addCommandKeyListener($,function(N,K,j){if(!k)return d.onCommandKey(N,K,j)},d),x.addListener($,"select",B,d),x.addListener($,"input",G,d),x.addListener($,"cut",oe,d),x.addListener($,"copy",re,d),x.addListener($,"paste",q,d),(!("oncut"in $)||!("oncopy"in $)||!("onpaste"in $))&&x.addListener(f,"keydown",function(N){if(!(b.isMac&&!N.metaKey||!N.ctrlKey))switch(N.keyCode){case 67:re(N);break;case 86:q(N);break;case 88:oe(N);break}},d);var ae=function(N){if(!(k||!d.onCompositionStart||d.$readOnly)&&(k={},!g)){N.data&&(k.useTextareaForIME=!1),setTimeout(le,0),d._signal("compositionStart"),d.on("mousedown",de);var K=d.getSelectionRange();K.end.row=K.start.row,K.end.column=K.start.column,k.markerRange=K,k.selectionStart=C,d.onCompositionStart(k),k.useTextareaForIME?(v=$.value="",C=0,E=0):($.msGetInputContext&&(k.context=$.msGetInputContext()),$.getInputContext&&(k.context=$.getInputContext()))}},le=function(){if(!(!k||!d.onCompositionUpdate||d.$readOnly)){if(g)return de();if(k.useTextareaForIME)d.onCompositionUpdate($.value);else{var N=$.value;U(N),k.markerRange&&(k.context&&(k.markerRange.start.column=k.selectionStart=k.context.compositionStartOffset),k.markerRange.end.column=k.markerRange.start.column+E-k.selectionStart+T)}}},ce=function(N){!d.onCompositionEnd||d.$readOnly||(k=!1,d.onCompositionEnd(),d.off("mousedown",de),N&&G())};function de(){u=!0,$.blur(),$.focus(),u=!1}var me=c.delayedCall(le,50).schedule.bind(null,null);function we(N){N.keyCode==27&&$.value.length<$.selectionStart&&(k||(v=$.value),C=E=-1,O()),me()}x.addListener($,"compositionstart",ae,d),x.addListener($,"compositionupdate",le,d),x.addListener($,"keyup",we,d),x.addListener($,"keydown",me,d),x.addListener($,"compositionend",ce,d),this.getElement=function(){return $},this.setCommandMode=function(N){g=N,$.readOnly=!1},this.setReadOnly=function(N){g||($.readOnly=N)},this.setCopyWithEmptySelection=function(N){},this.onContextMenu=function(N){V=!0,O(),d._emit("nativecontextmenu",{target:d,domEvent:N}),this.moveToMouse(N,!0)},this.moveToMouse=function(N,K){m||(m=$.style.cssText),$.style.cssText=(K?"z-index:100000;":"")+(b.isIE?"opacity:0.1;":"")+"text-indent: -"+(C+E)*d.renderer.characterWidth*.5+"px;";var j=d.container.getBoundingClientRect(),X=a.computedStyle(d.container),Q=j.top+(parseInt(X.borderTopWidth)||0),te=j.left+(parseInt(j.borderLeftWidth)||0),ne=j.bottom-Q-$.clientHeight-2,ie=function(ee){a.translate($,ee.clientX-te-2,Math.min(ee.clientY-Q-2,ne))};ie(N),N.type=="mousedown"&&(d.renderer.$isMousePressed=!0,clearTimeout(fe),b.isWin&&x.capture(d.container,ie,ue))},this.onContextMenuClose=ue;var fe;function ue(){clearTimeout(fe),fe=setTimeout(function(){m&&($.style.cssText=m,m=""),d.renderer.$isMousePressed=!1,d.renderer.$keepTextAreaAtCursor&&d.renderer.$moveTextAreaToCursor()},0)}var ge=function(N){d.textInput.onContextMenu(N),ue()};x.addListener($,"mouseup",ge,d),x.addListener($,"mousedown",function(N){N.preventDefault(),ue()},d),x.addListener(d.renderer.scroller,"contextmenu",ge,d),x.addListener($,"contextmenu",ge,d),l&&$e(f,d,$);function $e(N,K,j){var X=null,Q=!1;j.addEventListener("keydown",function(ne){X&&clearTimeout(X),Q=!0},!0),j.addEventListener("keyup",function(ne){X=setTimeout(function(){Q=!1},100)},!0);var te=function(ne){if(document.activeElement===j&&!(Q||k||K.$mouseHandler.isMousePressed)&&!A){var ie=j.selectionStart,ee=j.selectionEnd,Z=null,se=0;if(ie==0?Z=o.up:ie==1?Z=o.home:ee>E&&v[ee]==` |
| 206 |
`?Z=o.end:ie<C&&v[ie-1]==" "?(Z=o.left,se=s.option):ie<C||ie==C&&E!=C&&ie==ee?Z=o.left:ee>E&&v.slice(0,ee).split(` |
| 207 |
`).length>2?Z=o.down:ee>E&&v[ee-1]==" "?(Z=o.right,se=s.option):(ee>E||ee==E&&E!=C&&ie==ee)&&(Z=o.right),ie!==ee&&(se|=s.shift),Z){var he=K.onCommandKey({},se,Z);if(!he&&K.commands){Z=o.keyCodeToString(Z);var ve=K.commands.findKeyCommand(se,Z);ve&&K.execCommand(ve)}C=ie,E=ee,O("")}}};document.addEventListener("selectionchange",te),K.on("destroy",function(){document.removeEventListener("selectionchange",te)})}this.destroy=function(){$.parentElement&&$.parentElement.removeChild($)}},M.TextInput=p,M.$setUserAgentForTests=function(f,d){S=f,l=d}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(R,M,P){var x=R("../lib/useragent"),L=0,b=550,a=function(){function n(i){i.$clickSelection=null;var t=i.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(i)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(i)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(i)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(i)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(i));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(o){i[o]=this[o]},this),i.selectByLines=this.extendSelectionBy.bind(i,"getLineRange"),i.selectByWords=this.extendSelectionBy.bind(i,"getWordRange")}return n.prototype.onMouseDown=function(i){var t=i.inSelection(),e=i.getDocumentPosition();this.mousedownEvent=i;var o=this.editor,s=i.getButton();if(s!==0){var l=o.getSelectionRange(),h=l.isEmpty();(h||s==1)&&o.selection.moveToPosition(e),s==2&&(o.textInput.onContextMenu(i.domEvent),x.isMozilla||i.preventDefault());return}if(this.mousedownEvent.time=Date.now(),t&&!o.isFocused()&&(o.focus(),this.$focusTimeout&&!this.$clickSelection&&!o.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(i);return}return this.captureMouse(i),this.startSelect(e,i.domEvent._clicks>1),i.preventDefault()},n.prototype.startSelect=function(i,t){i=i||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(i):t||e.selection.moveToPosition(i),t||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},n.prototype.select=function(){var i,t=this.editor,e=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var o=this.$clickSelection.comparePoint(e);if(o==-1)i=this.$clickSelection.end;else if(o==1)i=this.$clickSelection.start;else{var s=r(this.$clickSelection,e);e=s.cursor,i=s.anchor}t.selection.setSelectionAnchor(i.row,i.column)}t.selection.selectToPosition(e),t.renderer.scrollCursorIntoView()},n.prototype.extendSelectionBy=function(i){var t,e=this.editor,o=e.renderer.screenToTextCoordinates(this.x,this.y),s=e.selection[i](o.row,o.column);if(this.$clickSelection){var l=this.$clickSelection.comparePoint(s.start),h=this.$clickSelection.comparePoint(s.end);if(l==-1&&h<=0)t=this.$clickSelection.end,(s.end.row!=o.row||s.end.column!=o.column)&&(o=s.start);else if(h==1&&l>=0)t=this.$clickSelection.start,(s.start.row!=o.row||s.start.column!=o.column)&&(o=s.end);else if(l==-1&&h==1)o=s.end,t=s.start;else{var S=r(this.$clickSelection,o);o=S.cursor,t=S.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(o),e.renderer.scrollCursorIntoView()},n.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},n.prototype.focusWait=function(){var i=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(i>L||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},n.prototype.onDoubleClick=function(i){var t=i.getDocumentPosition(),e=this.editor,o=e.session,s=o.getBracketRange(t);s?(s.isEmpty()&&(s.start.column--,s.end.column++),this.setState("select")):(s=e.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=s,this.select()},n.prototype.onTripleClick=function(i){var t=i.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var o=e.getSelectionRange();o.isMultiLine()&&o.contains(t.row,t.column)?(this.$clickSelection=e.selection.getLineRange(o.start.row),this.$clickSelection.end=e.selection.getLineRange(o.end.row).end):this.$clickSelection=e.selection.getLineRange(t.row),this.select()},n.prototype.onQuadClick=function(i){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},n.prototype.onMouseWheel=function(i){if(!i.getAccelKey()){i.getShiftKey()&&i.wheelY&&!i.wheelX&&(i.wheelX=i.wheelY,i.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,o=i.domEvent.timeStamp,s=o-e.t,l=s?i.wheelX/s:e.vx,h=s?i.wheelY/s:e.vy;s<b&&(l=(l+e.vx)/2,h=(h+e.vy)/2);var S=Math.abs(l/h),p=!1;if(S>=1&&t.renderer.isScrollableBy(i.wheelX*i.speed,0)&&(p=!0),S<=1&&t.renderer.isScrollableBy(0,i.wheelY*i.speed)&&(p=!0),p)e.allowed=o;else if(o-e.allowed<b){var f=Math.abs(l)<=1.5*Math.abs(e.vx)&&Math.abs(h)<=1.5*Math.abs(e.vy);f?(p=!0,e.allowed=o):e.allowed=0}if(e.t=o,e.vx=l,e.vy=h,p)return t.renderer.scrollBy(i.wheelX*i.speed,i.wheelY*i.speed),i.stop()}},n}();a.prototype.selectEnd=a.prototype.selectByLinesEnd,a.prototype.selectAllEnd=a.prototype.selectByLinesEnd,a.prototype.selectByWordsEnd=a.prototype.selectByLinesEnd,M.DefaultHandlers=a;function c(n,i,t,e){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-i,2))}function r(n,i){if(n.start.row==n.end.row)var t=2*i.column-n.start.column-n.end.column;else if(n.start.row==n.end.row-1&&!n.start.column&&!n.end.column)var t=i.column-4;else var t=2*i.row-n.start.row-n.end.row;return t<0?{cursor:n.start,anchor:n.end}:{cursor:n.end,anchor:n.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(R,M,P){M.preventParentScroll=function(L){L.stopPropagation();var b=L.currentTarget,a=b.scrollHeight>b.clientHeight;a||L.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(R,M,P){var x=this&&this.__extends||function(){var o=function(s,l){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,S){h.__proto__=S}||function(h,S){for(var p in S)Object.prototype.hasOwnProperty.call(S,p)&&(h[p]=S[p])},o(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");o(s,l);function h(){this.constructor=s}s.prototype=l===null?Object.create(l):(h.prototype=l.prototype,new h)}}(),L=this&&this.__values||function(o){var s=typeof Symbol=="function"&&Symbol.iterator,l=s&&o[s],h=0;if(l)return l.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&h>=o.length&&(o=void 0),{value:o&&o[h++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},b=R("./lib/dom");R("./lib/event");var a=R("./range").Range,c=R("./lib/scroll").preventParentScroll,r="ace_tooltip",n=function(){function o(s){this.isOpen=!1,this.$element=null,this.$parentNode=s}return o.prototype.$init=function(){return this.$element=b.createElement("div"),this.$element.className=r,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},o.prototype.getElement=function(){return this.$element||this.$init()},o.prototype.setText=function(s){this.getElement().textContent=s},o.prototype.setHtml=function(s){this.getElement().innerHTML=s},o.prototype.setPosition=function(s,l){this.getElement().style.left=s+"px",this.getElement().style.top=l+"px"},o.prototype.setClassName=function(s){b.addCssClass(this.getElement(),s)},o.prototype.setTheme=function(s){this.$element.className=r+" "+(s.isDark?"ace_dark ":"")+(s.cssClass||"")},o.prototype.show=function(s,l,h){s!=null&&this.setText(s),l!=null&&h!=null&&this.setPosition(l,h),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},o.prototype.hide=function(s){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=r,this.isOpen=!1)},o.prototype.getHeight=function(){return this.getElement().offsetHeight},o.prototype.getWidth=function(){return this.getElement().offsetWidth},o.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},o}(),i=function(){function o(){this.popups=[]}return o.prototype.addPopup=function(s){this.popups.push(s),this.updatePopups()},o.prototype.removePopup=function(s){var l=this.popups.indexOf(s);l!==-1&&(this.popups.splice(l,1),this.updatePopups())},o.prototype.updatePopups=function(){var s,l,h,S;this.popups.sort(function(m,g){return g.priority-m.priority});var p=[];try{for(var f=L(this.popups),d=f.next();!d.done;d=f.next()){var $=d.value,A=!0;try{for(var w=(h=void 0,L(p)),k=w.next();!k.done;k=w.next()){var y=k.value;if(this.doPopupsOverlap(y,$)){A=!1;break}}}catch(m){h={error:m}}finally{try{k&&!k.done&&(S=w.return)&&S.call(w)}finally{if(h)throw h.error}}A?p.push($):$.hide()}}catch(m){s={error:m}}finally{try{d&&!d.done&&(l=f.return)&&l.call(f)}finally{if(s)throw s.error}}},o.prototype.doPopupsOverlap=function(s,l){var h=s.getElement().getBoundingClientRect(),S=l.getElement().getBoundingClientRect();return h.left<S.right&&h.right>S.left&&h.top<S.bottom&&h.bottom>S.top},o}(),t=new i;M.popupManager=t,M.Tooltip=n;var e=function(o){x(s,o);function s(l){l===void 0&&(l=document.body);var h=o.call(this,l)||this;h.timeout=void 0,h.lastT=0,h.idleTime=350,h.lastEvent=void 0,h.onMouseOut=h.onMouseOut.bind(h),h.onMouseMove=h.onMouseMove.bind(h),h.waitForHover=h.waitForHover.bind(h),h.hide=h.hide.bind(h);var S=h.getElement();return S.style.whiteSpace="pre-wrap",S.style.pointerEvents="auto",S.addEventListener("mouseout",h.onMouseOut),S.tabIndex=-1,S.addEventListener("blur",function(){S.contains(document.activeElement)||this.hide()}.bind(h)),S.addEventListener("wheel",c),h}return s.prototype.addToEditor=function(l){l.on("mousemove",this.onMouseMove),l.on("mousedown",this.hide),l.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},s.prototype.removeFromEditor=function(l){l.off("mousemove",this.onMouseMove),l.off("mousedown",this.hide),l.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},s.prototype.onMouseMove=function(l,h){this.lastEvent=l,this.lastT=Date.now();var S=h.$mouseHandler.isMousePressed;if(this.isOpen){var p=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(p.row,p.column)||S||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||S||(this.lastEvent=l,this.timeout=setTimeout(this.waitForHover,this.idleTime))},s.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var l=Date.now()-this.lastT;if(this.idleTime-l>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-l);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},s.prototype.isOutsideOfText=function(l){var h=l.editor,S=l.getDocumentPosition(),p=h.session.getLine(S.row);if(S.column==p.length){var f=h.renderer.pixelToScreenCoordinates(l.clientX,l.clientY),d=h.session.documentToScreenPosition(S.row,S.column);if(d.column!=f.column||d.row!=f.row)return!0}return!1},s.prototype.setDataProvider=function(l){this.$gatherData=l},s.prototype.showForRange=function(l,h,S,p){var f=10;if(!(p&&p!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var d=l.renderer;this.isOpen||(t.addPopup(this),this.$registerCloseEvents(),this.setTheme(d.theme)),this.isOpen=!0,this.addMarker(h,l.session),this.range=a.fromPoints(h.start,h.end);var $=d.textToScreenCoordinates(h.start.row,h.start.column),A=d.scroller.getBoundingClientRect();$.pageX<A.left&&($.pageX=A.left);var w=this.getElement();w.innerHTML="",w.appendChild(S),w.style.maxHeight="",w.style.display="block";var k=w.clientHeight,y=w.clientWidth,m=window.innerHeight-$.pageY-d.lineHeight,g=!0;$.pageY-k<0&&$.pageY<m&&(g=!1),w.style.maxHeight=(g?$.pageY:m)-f+"px",w.style.top=g?"":$.pageY+d.lineHeight+"px",w.style.bottom=g?window.innerHeight-$.pageY+"px":"",w.style.left=Math.min($.pageX,window.innerWidth-y-f)+"px"}},s.prototype.addMarker=function(l,h){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=h,this.marker=h&&h.addMarker(l,"ace_highlight-marker","text")},s.prototype.hide=function(l){!l&&document.activeElement==this.getElement()||l&&l.target&&(l.type!="keydown"||l.ctrlKey||l.metaKey)&&this.$element.contains(l.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,t.removePopup(this)))},s.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},s.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},s.prototype.onMouseOut=function(l){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!l.relatedTarget||this.getElement().contains(l.relatedTarget)||l&&l.currentTarget.contains(l.relatedTarget)||l.relatedTarget.classList.contains("ace_content")||this.hide())},s}(n);M.HoverTooltip=e}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],function(R,M,P){var x=this&&this.__extends||function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var h in l)Object.prototype.hasOwnProperty.call(l,h)&&(s[h]=l[h])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function s(){this.constructor=e}e.prototype=o===null?Object.create(o):(s.prototype=o.prototype,new s)}}(),L=this&&this.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,o=e&&t[e],s=0;if(o)return o.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},b=R("../lib/dom"),a=R("../lib/event"),c=R("../tooltip").Tooltip,r=R("../config").nls;function n(t){var e=t.editor,o=e.renderer.$gutterLayer,s=new i(e);t.editor.setDefaultHandler("guttermousedown",function(d){if(!(!e.isFocused()||d.getButton()!=0)){var $=o.getRegion(d);if($!="foldWidgets"){var A=d.getDocumentPosition().row,w=e.session.selection;if(d.getShiftKey())w.selectTo(A,0);else{if(d.domEvent.detail==2)return e.selectAll(),d.preventDefault();t.$clickSelection=e.selection.getLineRange(A)}return t.setState("selectByLines"),t.captureMouse(d),d.preventDefault()}}});var l,h;function S(){var d=h.getDocumentPosition().row,$=e.session.getLength();if(d==$){var A=e.renderer.pixelToScreenCoordinates(0,h.y).row,w=h.$pos;if(A>e.session.documentToScreenRow(w.row,w.column))return p()}if(s.showTooltip(d),!!s.isOpen)if(e.on("mousewheel",p),t.$tooltipFollowsMouse)f(h);else{var k=h.getGutterRow(),y=o.$lines.get(k);if(y){var m=y.element.querySelector(".ace_gutter_annotation"),g=m.getBoundingClientRect(),u=s.getElement().style;u.left=g.right+"px",u.top=g.bottom+"px"}else f(h)}}function p(){l&&(l=clearTimeout(l)),s.isOpen&&(s.hideTooltip(),e.off("mousewheel",p))}function f(d){s.setPosition(d.x,d.y)}t.editor.setDefaultHandler("guttermousemove",function(d){var $=d.domEvent.target||d.domEvent.srcElement;if(b.hasCssClass($,"ace_fold-widget"))return p();s.isOpen&&t.$tooltipFollowsMouse&&f(d),h=d,!l&&(l=setTimeout(function(){l=null,h&&!t.isMousePressed?S():p()},50))}),a.addListener(e.renderer.$gutter,"mouseout",function(d){h=null,!(!s.isOpen||l)&&(l=setTimeout(function(){l=null,p()},50))},e),e.on("changeSession",p),e.on("input",p)}M.GutterHandler=n;var i=function(t){x(e,t);function e(o){var s=t.call(this,o.container)||this;return s.editor=o,s}return e.prototype.setPosition=function(o,s){var l=window.innerWidth||document.documentElement.clientWidth,h=window.innerHeight||document.documentElement.clientHeight,S=this.getWidth(),p=this.getHeight();o+=15,s+=15,o+S>l&&(o-=o+S-l),s+p>h&&(s-=20+p),c.prototype.setPosition.call(this,o,s)},Object.defineProperty(e,"annotationLabels",{get:function(){return{error:{singular:r("error"),plural:r("errors")},warning:{singular:r("warning"),plural:r("warnings")},info:{singular:r("information message"),plural:r("information messages")}}},enumerable:!1,configurable:!0}),e.prototype.showTooltip=function(o){var s=this.editor.renderer.$gutterLayer,l=s.$annotations[o],h;l?h={text:Array.from(l.text),type:Array.from(l.type)}:h={text:[],type:[]};var S=s.session.getFoldLine(o);if(S&&s.$showFoldedAnnotations){for(var p={error:[],warning:[],info:[]},f,d=o+1;d<=S.end.row;d++)if(s.$annotations[d])for(var $=0;$<s.$annotations[d].text.length;$++){var A=s.$annotations[d].type[$];if(p[A].push(s.$annotations[d].text[$]),A==="error"){f="error_fold";continue}if(A==="warning"){f="warning_fold";continue}}if(f==="error_fold"||f==="warning_fold"){var w="".concat(e.annotationsToSummaryString(p)," in folded code.");h.text.push(w),h.type.push(f)}}if(h.text.length===0)return this.hide();for(var k={error:[],warning:[],info:[]},y=s.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",d=0;d<h.text.length;d++){var m="<span class='ace_".concat(h.type[d]," ").concat(y,"' aria-label='").concat(e.annotationLabels[h.type[d].replace("_fold","")].singular,"' role=img> </span> ").concat(h.text[d]);k[h.type[d].replace("_fold","")].push(m)}var g=[].concat(k.error,k.warning,k.info).join("<br>");this.setHtml(g),this.$element.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},e.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},e.annotationsToSummaryString=function(o){var s,l,h=[],S=["error","warning","info"];try{for(var p=L(S),f=p.next();!f.done;f=p.next()){var d=f.value;if(o[d].length){var $=o[d].length===1?e.annotationLabels[d].singular:e.annotationLabels[d].plural;h.push("".concat(o[d].length," ").concat($))}}}catch(A){s={error:A}}finally{try{f&&!f.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}return h.join(", ")},e}(c);M.GutterTooltip=i}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(R,M,P){var x=R("../lib/event"),L=R("../lib/useragent"),b=function(){function a(c,r){this.speed,this.wheelX,this.wheelY,this.domEvent=c,this.editor=r,this.x=this.clientX=c.clientX,this.y=this.clientY=c.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){x.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){x.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.getGutterRow=function(){var c=this.getDocumentPosition().row,r=this.editor.session.documentToScreenRow(c,0),n=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return r-n},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var c=this.editor,r=c.getSelectionRange();if(r.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=r.contains(n.row,n.column)}return this.$inSelection},a.prototype.getButton=function(){return x.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return L.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();M.MouseEvent=b}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(R,M,P){var x=R("../lib/dom"),L=R("../lib/event"),b=R("../lib/useragent"),a=200,c=200,r=5;function n(t){var e=t.editor,o=x.createElement("div");o.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",o.textContent=" ";var s=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];s.forEach(function(D){t[D]=this[D]},this),e.on("mousedown",this.onMouseDown.bind(t));var l=e.container,h,S,p,f,d,$,A=0,w,k,y,m,g;this.onDragStart=function(D){if(this.cancelDrag||!l.draggable){var O=this;return setTimeout(function(){O.startSelect(),O.captureMouse(D)},0),D.preventDefault()}d=e.getSelectionRange();var W=D.dataTransfer;W.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(o),W.setDragImage&&W.setDragImage(o,0,0),setTimeout(function(){e.container.removeChild(o)}),W.clearData(),W.setData("Text",e.session.getTextRange()),k=!0,this.setState("drag")},this.onDragEnd=function(D){if(l.draggable=!1,k=!1,this.setState(null),!e.getReadOnly()){var O=D.dataTransfer.dropEffect;!w&&O=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(D){if(!(e.getReadOnly()||!F(D.dataTransfer)))return S=D.clientX,p=D.clientY,h||E(),A++,D.dataTransfer.dropEffect=w=H(D),L.preventDefault(D)},this.onDragOver=function(D){if(!(e.getReadOnly()||!F(D.dataTransfer)))return S=D.clientX,p=D.clientY,h||(E(),A++),_!==null&&(_=null),D.dataTransfer.dropEffect=w=H(D),L.preventDefault(D)},this.onDragLeave=function(D){if(A--,A<=0&&h)return T(),w=null,L.preventDefault(D)},this.onDrop=function(D){if($){var O=D.dataTransfer;if(k)switch(w){case"move":d.contains($.row,$.column)?d={start:$,end:$}:d=e.moveText(d,$);break;case"copy":d=e.moveText(d,$,!0);break}else{var W=O.getData("Text");d={start:$,end:e.session.insert($,W)},e.focus(),w=null}return T(),L.preventDefault(D)}},L.addListener(l,"dragstart",this.onDragStart.bind(t),e),L.addListener(l,"dragend",this.onDragEnd.bind(t),e),L.addListener(l,"dragenter",this.onDragEnter.bind(t),e),L.addListener(l,"dragover",this.onDragOver.bind(t),e),L.addListener(l,"dragleave",this.onDragLeave.bind(t),e),L.addListener(l,"drop",this.onDrop.bind(t),e);function u(D,O){var W=Date.now(),B=!O||D.row!=O.row,z=!O||D.column!=O.column;if(!m||B||z)e.moveCursorToPosition(D),m=W,g={x:S,y:p};else{var V=i(g.x,g.y,S,p);V>r?m=null:W-m>=c&&(e.renderer.scrollCursorIntoView(),m=null)}}function v(D,O){var W=Date.now(),B=e.renderer.layerConfig.lineHeight,z=e.renderer.layerConfig.characterWidth,V=e.renderer.scroller.getBoundingClientRect(),U={x:{left:S-V.left,right:V.right-S},y:{top:p-V.top,bottom:V.bottom-p}},G=Math.min(U.x.left,U.x.right),Y=Math.min(U.y.top,U.y.bottom),J={row:D.row,column:D.column};G/z<=2&&(J.column+=U.x.left<U.x.right?-3:2),Y/B<=1&&(J.row+=U.y.top<U.y.bottom?-1:1);var oe=D.row!=J.row,re=D.column!=J.column,q=!O||D.row!=O.row;oe||re&&!q?y?W-y>=a&&e.renderer.scrollCursorIntoView(J):y=W:y=null}function C(){var D=$;$=e.renderer.screenToTextCoordinates(S,p),u($,D),v($,D)}function E(){d=e.selection.toOrientedRange(),h=e.session.addMarker(d,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(f),C(),f=setInterval(C,20),A=0,L.addListener(document,"mousemove",I)}function T(){clearInterval(f),e.session.removeMarker(h),h=null,e.selection.fromOrientedRange(d),e.isFocused()&&!k&&e.$resetCursorStyle(),d=null,$=null,A=0,y=null,m=null,L.removeListener(document,"mousemove",I)}var _=null;function I(){_==null&&(_=setTimeout(function(){_!=null&&h&&T()},20))}function F(D){var O=D.types;return!O||Array.prototype.some.call(O,function(W){return W=="text/plain"||W=="Text"})}function H(D){var O=["copy","copymove","all","uninitialized"],W=["move","copymove","linkmove","all","uninitialized"],B=b.isMac?D.altKey:D.ctrlKey,z="uninitialized";try{z=D.dataTransfer.effectAllowed.toLowerCase()}catch(U){}var V="none";return B&&O.indexOf(z)>=0?V="copy":W.indexOf(z)>=0?V="move":O.indexOf(z)>=0&&(V="copy"),V}}(function(){this.dragWait=function(){var t=Date.now()-this.mousedownEvent.time;t>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var t=this.editor.container;t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(t){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var t=this.editor,e=t.container;e.draggable=!0,t.renderer.$cursorLayer.setBlinking(!1),t.setStyle("ace_dragging");var o=b.isWin?"default":"move";t.renderer.setCursorStyle(o),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if(b.isIE&&this.state=="dragReady"){var o=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);o>3&&e.dragDrop()}if(this.state==="dragWait"){var o=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);o>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,o=t.inSelection(),s=t.getButton(),l=t.domEvent.detail||1;if(l===1&&s===0&&o){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var h=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in h&&(h.unselectable="on"),e.getDragDelay()){if(b.isWebKit){this.cancelDrag=!0;var S=e.container;S.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(n.prototype);function i(t,e,o,s){return Math.sqrt(Math.pow(o-t,2)+Math.pow(s-e,2))}M.DragdropHandler=n}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(R,M,P){var x=R("./mouse_event").MouseEvent,L=R("../lib/event"),b=R("../lib/dom");M.addTouchListeners=function(a,c){var r="scroll",n,i,t,e,o,s,l=0,h,S=0,p=0,f=0,d,$;function A(){var u=window.navigator&&window.navigator.clipboard,v=!1,C=function(){var T=c.getCopyText(),_=c.session.getUndoManager().hasUndo();$.replaceChild(b.buildDom(v?["span",!T&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],T&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],T&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],u&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],_&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),$.firstChild)},E=function(T){var _=T.target.getAttribute("action");if(_=="more"||!v)return v=!v,C();_=="paste"?u.readText().then(function(I){c.execCommand(_,I)}):_&&((_=="cut"||_=="copy")&&(u?u.writeText(c.getCopyText()):document.execCommand("copy")),c.execCommand(_)),$.firstChild.style.display="none",v=!1,_!="openCommandPalette"&&c.focus()};$=b.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(T){r="menu",T.stopPropagation(),T.preventDefault(),c.textInput.focus()},ontouchend:function(T){T.stopPropagation(),T.preventDefault(),E(T)},onclick:E},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],c.container)}function w(){$||A();var u=c.selection.cursor,v=c.renderer.textToScreenCoordinates(u.row,u.column),C=c.renderer.textToScreenCoordinates(0,0).pageX,E=c.renderer.scrollLeft,T=c.container.getBoundingClientRect();$.style.top=v.pageY-T.top-3+"px",v.pageX-T.left<T.width-70?($.style.left="",$.style.right="10px"):($.style.right="",$.style.left=C+E-T.left+"px"),$.style.display="",$.firstChild.style.display="none",c.on("input",k)}function k(u){$&&($.style.display="none"),c.off("input",k)}function y(){o=null,clearTimeout(o);var u=c.selection.getRange(),v=u.contains(h.row,h.column);(u.isEmpty()||!v)&&(c.selection.moveToPosition(h),c.selection.selectWord()),r="wait",w()}function m(){o=null,clearTimeout(o),c.selection.moveToPosition(h);var u=S>=2?c.selection.getLineRange(h.row):c.session.getBracketRange(h);u&&!u.isEmpty()?c.selection.setRange(u):c.selection.selectWord(),r="wait"}L.addListener(a,"contextmenu",function(u){if(d){var v=c.textInput.getElement();v.focus()}},c),L.addListener(a,"touchstart",function(u){var v=u.touches;if(o||v.length>1){clearTimeout(o),o=null,t=-1,r="zoom";return}d=c.$mouseHandler.isMousePressed=!0;var C=c.renderer.layerConfig.lineHeight,E=c.renderer.layerConfig.lineHeight,T=u.timeStamp;e=T;var _=v[0],I=_.clientX,F=_.clientY;Math.abs(n-I)+Math.abs(i-F)>C&&(t=-1),n=u.clientX=I,i=u.clientY=F,p=f=0;var H=new x(u,c);if(h=H.getDocumentPosition(),T-t<500&&v.length==1&&!l)S++,u.preventDefault(),u.button=0,m();else{S=0;var D=c.selection.cursor,O=c.selection.isEmpty()?D:c.selection.anchor,W=c.renderer.$cursorLayer.getPixelPosition(D,!0),B=c.renderer.$cursorLayer.getPixelPosition(O,!0),z=c.renderer.scroller.getBoundingClientRect(),V=c.renderer.layerConfig.offset,U=c.renderer.scrollLeft,G=function(oe,re){return oe=oe/E,re=re/C-.75,oe*oe+re*re};if(u.clientX<z.left){r="zoom";return}var Y=G(u.clientX-z.left-W.left+U,u.clientY-z.top-W.top+V),J=G(u.clientX-z.left-B.left+U,u.clientY-z.top-B.top+V);Y<3.5&&J<3.5&&(r=Y>J?"cursor":"anchor"),J<3.5?r="anchor":Y<3.5?r="cursor":r="scroll",o=setTimeout(y,450)}t=T},c),L.addListener(a,"touchend",function(u){d=c.$mouseHandler.isMousePressed=!1,s&&clearInterval(s),r=="zoom"?(r="",l=0):o?(c.selection.moveToPosition(h),l=0,w()):r=="scroll"?(g(),k()):w(),clearTimeout(o),o=null},c),L.addListener(a,"touchmove",function(u){o&&(clearTimeout(o),o=null);var v=u.touches;if(!(v.length>1||r=="zoom")){var C=v[0],E=n-C.clientX,T=i-C.clientY;if(r=="wait")if(E*E+T*T>4)r="cursor";else return u.preventDefault();n=C.clientX,i=C.clientY,u.clientX=C.clientX,u.clientY=C.clientY;var _=u.timeStamp,I=_-e;if(e=_,r=="scroll"){var F=new x(u,c);F.speed=1,F.wheelX=E,F.wheelY=T,10*Math.abs(E)<Math.abs(T)&&(E=0),10*Math.abs(T)<Math.abs(E)&&(T=0),I!=0&&(p=E/I,f=T/I),c._emit("mousewheel",F),F.propagationStopped||(p=f=0)}else{var H=new x(u,c),D=H.getDocumentPosition();r=="cursor"?c.selection.moveCursorToPosition(D):r=="anchor"&&c.selection.setSelectionAnchor(D.row,D.column),c.renderer.scrollCursorIntoView(D),u.preventDefault()}}},c);function g(){l+=60,s=setInterval(function(){l--<=0&&(clearInterval(s),s=null),Math.abs(p)<.01&&(p=0),Math.abs(f)<.01&&(f=0),l<20&&(p=.9*p),l<20&&(f=.9*f);var u=c.session.getScrollTop();c.renderer.scrollBy(10*p,10*f),u==c.session.getScrollTop()&&(l=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(R,M,P){var x=R("../lib/event"),L=R("../lib/useragent"),b=R("./default_handlers").DefaultHandlers,a=R("./default_gutter_handler").GutterHandler,c=R("./mouse_event").MouseEvent,r=R("./dragdrop_handler").DragdropHandler,n=R("./touch_handler").addTouchListeners,i=R("../config"),t=function(){function e(o){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var s=this;this.editor=o,new b(this),new a(this),new r(this);var l=function(p){var f=!document.hasFocus||!document.hasFocus()||!o.isFocused()&&document.activeElement==(o.textInput&&o.textInput.getElement());f&&window.focus(),o.focus(),setTimeout(function(){o.isFocused()||o.focus()})},h=o.renderer.getMouseEventTarget();x.addListener(h,"click",this.onMouseEvent.bind(this,"click"),o),x.addListener(h,"mousemove",this.onMouseMove.bind(this,"mousemove"),o),x.addMultiMouseDownListener([h,o.renderer.scrollBarV&&o.renderer.scrollBarV.inner,o.renderer.scrollBarH&&o.renderer.scrollBarH.inner,o.textInput&&o.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",o),x.addMouseWheelListener(o.container,this.onMouseWheel.bind(this,"mousewheel"),o),n(o.container,o);var S=o.renderer.$gutter;x.addListener(S,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),o),x.addListener(S,"click",this.onMouseEvent.bind(this,"gutterclick"),o),x.addListener(S,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),o),x.addListener(S,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),o),x.addListener(h,"mousedown",l,o),x.addListener(S,"mousedown",l,o),L.isIE&&o.renderer.scrollBarV&&(x.addListener(o.renderer.scrollBarV.element,"mousedown",l,o),x.addListener(o.renderer.scrollBarH.element,"mousedown",l,o)),o.on("mousemove",function(p){if(!(s.state||s.$dragDelay||!s.$dragEnabled)){var f=o.renderer.screenToTextCoordinates(p.x,p.y),d=o.session.selection.getRange(),$=o.renderer;!d.isEmpty()&&d.insideStart(f.row,f.column)?$.setCursorStyle("default"):$.setCursorStyle("")}},o)}return e.prototype.onMouseEvent=function(o,s){this.editor.session&&this.editor._emit(o,new c(s,this.editor))},e.prototype.onMouseMove=function(o,s){var l=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!l||!l.length||this.editor._emit(o,new c(s,this.editor))},e.prototype.onMouseWheel=function(o,s){var l=new c(s,this.editor);l.speed=this.$scrollSpeed*2,l.wheelX=s.wheelX,l.wheelY=s.wheelY,this.editor._emit(o,l)},e.prototype.setState=function(o){this.state=o},e.prototype.captureMouse=function(o,s){this.x=o.x,this.y=o.y,this.isMousePressed=!0;var l=this.editor,h=this.editor.renderer;h.$isMousePressed=!0;var S=this,p=function(w){if(w){if(L.isWebKit&&!w.which&&S.releaseMouse)return S.releaseMouse();S.x=w.clientX,S.y=w.clientY,s&&s(w),S.mouseEvent=new c(w,S.editor),S.$mouseMoved=!0}},f=function(w){l.off("beforeEndOperation",$),clearInterval(A),l.session&&d(),S[S.state+"End"]&&S[S.state+"End"](w),S.state="",S.isMousePressed=h.$isMousePressed=!1,h.$keepTextAreaAtCursor&&h.$moveTextAreaToCursor(),S.$onCaptureMouseMove=S.releaseMouse=null,w&&S.onMouseEvent("mouseup",w),l.endOperation()},d=function(){S[S.state]&&S[S.state](),S.$mouseMoved=!1};if(L.isOldIE&&o.domEvent.type=="dblclick")return setTimeout(function(){f(o)});var $=function(w){S.releaseMouse&&l.curOp.command.name&&l.curOp.selectionChanged&&(S[S.state+"End"]&&S[S.state+"End"](),S.state="",S.releaseMouse())};l.on("beforeEndOperation",$),l.startOperation({command:{name:"mouse"}}),S.$onCaptureMouseMove=p,S.releaseMouse=x.capture(this.editor.container,p,f);var A=setInterval(d,20)},e.prototype.cancelContextMenu=function(){var o=function(s){s&&s.domEvent&&s.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",o),s&&s.domEvent&&x.stopEvent(s.domEvent))}.bind(this);setTimeout(o,10),this.editor.on("nativecontextmenu",o)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},e}();t.prototype.releaseMouse=null,i.defineOptions(t.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:L.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),M.MouseHandler=t}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(R,M,P){var x=R("../lib/dom"),L=function(){function b(a){a.on("click",function(c){var r=c.getDocumentPosition(),n=a.session,i=n.getFoldAt(r.row,r.column,1);i&&(c.getAccelKey()?n.removeFold(i):n.expandFold(i),c.stop());var t=c.domEvent&&c.domEvent.target;t&&x.hasCssClass(t,"ace_inline_button")&&x.hasCssClass(t,"ace_toggle_wrap")&&(n.setOption("wrap",!n.getUseWrapMode()),a.renderer.scrollCursorIntoView())}),a.on("gutterclick",function(c){var r=a.renderer.$gutterLayer.getRegion(c);if(r=="foldWidgets"){var n=c.getDocumentPosition().row,i=a.session;i.foldWidgets&&i.foldWidgets[n]&&a.session.onFoldWidgetClick(n,c),a.isFocused()||a.focus(),c.stop()}}),a.on("gutterdblclick",function(c){var r=a.renderer.$gutterLayer.getRegion(c);if(r=="foldWidgets"){var n=c.getDocumentPosition().row,i=a.session,t=i.getParentFoldRangeData(n,!0),e=t.range||t.firstRange;if(e){n=e.start.row;var o=i.getFoldAt(n,i.getLine(n).length,1);o?i.removeFold(o):(i.addFold("...",e),a.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}c.stop()}})}return b}();M.FoldHandler=L}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(R,M,P){var x=R("../lib/keys"),L=R("../lib/event"),b=function(){function a(c){this.$editor=c,this.$data={editor:c},this.$handlers=[],this.setDefaultHandler(c.commands)}return a.prototype.setDefaultHandler=function(c){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=c,this.addKeyboardHandler(c,0)},a.prototype.setKeyboardHandler=function(c){var r=this.$handlers;if(r[r.length-1]!=c){for(;r[r.length-1]&&r[r.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(r[r.length-1]);this.addKeyboardHandler(c,1)}},a.prototype.addKeyboardHandler=function(c,r){if(c){typeof c=="function"&&!c.handleKeyboard&&(c.handleKeyboard=c);var n=this.$handlers.indexOf(c);n!=-1&&this.$handlers.splice(n,1),r==null?this.$handlers.push(c):this.$handlers.splice(r,0,c),n==-1&&c.attach&&c.attach(this.$editor)}},a.prototype.removeKeyboardHandler=function(c){var r=this.$handlers.indexOf(c);return r==-1?!1:(this.$handlers.splice(r,1),c.detach&&c.detach(this.$editor),!0)},a.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},a.prototype.getStatusText=function(){var c=this.$data,r=c.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(r,c)||""}).filter(Boolean).join(" ")},a.prototype.$callKeyboardHandlers=function(c,r,n,i){for(var t,e=!1,o=this.$editor.commands,s=this.$handlers.length;s--&&(t=this.$handlers[s].handleKeyboard(this.$data,c,r,n,i),!(!(!t||!t.command)&&(t.command=="null"?e=!0:e=o.exec(t.command,this.$editor,t.args,i),e&&i&&c!=-1&&t.passEvent!=!0&&t.command.passEvent!=!0&&L.stopEvent(i),e))););return!e&&c==-1&&(t={command:"insertstring"},e=o.exec("insertstring",this.$editor,r)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",t),e},a.prototype.onCommandKey=function(c,r,n){var i=x.keyCodeToString(n);return this.$callKeyboardHandlers(r,i,n,c)},a.prototype.onTextInput=function(c){return this.$callKeyboardHandlers(-1,c)},a}();M.KeyBinding=b}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(R,M,P){var x=0,L=0,b=!1,a=!1,c=!1,r=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],n=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],i=0,t=1,e=0,o=1,s=2,l=3,h=4,S=5,p=6,f=7,d=8,$=9,A=10,w=11,k=12,y=13,m=14,g=15,u=16,v=17,C=18,E=[C,C,C,C,C,C,C,C,C,p,S,p,d,S,C,C,C,C,C,C,C,C,C,C,C,C,C,C,S,S,S,p,d,h,h,w,w,w,h,h,h,h,h,A,$,A,$,$,s,s,s,s,s,s,s,s,s,s,$,h,h,h,h,h,h,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,h,h,h,h,h,h,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,h,h,h,h,C,C,C,C,C,C,S,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,$,h,w,w,w,w,h,h,h,h,e,h,h,C,h,h,w,w,s,s,h,e,h,h,h,s,e,h,h,h,h,h],T=[d,d,d,d,d,d,d,d,d,d,d,C,C,C,e,o,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,d,S,y,m,g,u,v,$,w,w,w,w,w,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,$,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,d];function _(D,O,W,B){var z=x?n:r,V=null,U=null,G=null,Y=0,J=null,oe=null,re=-1,q=null,ae=null,le=[];if(!B)for(q=0,B=[];q<W;q++)B[q]=H(D[q]);for(L=x,b=!1,a=!1,c=!1,ae=0;ae<W;ae++){if(V=Y,le[ae]=U=F(D,B,le,ae),Y=z[V][U],J=Y&240,Y&=15,O[ae]=G=z[Y][5],J>0)if(J==16){for(q=re;q<ae;q++)O[q]=1;re=-1}else re=-1;if(oe=z[Y][6],oe)re==-1&&(re=ae);else if(re>-1){for(q=re;q<ae;q++)O[q]=G;re=-1}B[ae]==S&&(O[ae]=0),L|=G}if(c){for(q=0;q<W;q++)if(B[q]==p){O[q]=x;for(var ce=q-1;ce>=0&&B[ce]==d;ce--)O[ce]=x}}}function I(D,O,W){if(!(L<D)){if(D==1&&x==t&&!a){W.reverse();return}for(var B=W.length,z=0,V,U,G,Y;z<B;){if(O[z]>=D){for(V=z+1;V<B&&O[V]>=D;)V++;for(U=z,G=V-1;U<G;U++,G--)Y=W[U],W[U]=W[G],W[G]=Y;z=V}z++}}}function F(D,O,W,B){var z=O[B],V,U,G,Y;switch(z){case e:case o:b=!1;case h:case l:return z;case s:return b?l:s;case f:return b=!0,o;case d:return h;case $:return B<1||B+1>=O.length||(V=W[B-1])!=s&&V!=l||(U=O[B+1])!=s&&U!=l?h:(b&&(U=l),U==V?U:h);case A:return V=B>0?W[B-1]:S,V==s&&B+1<O.length&&O[B+1]==s?s:h;case w:if(B>0&&W[B-1]==s)return s;if(b)return h;for(Y=B+1,G=O.length;Y<G&&O[Y]==w;)Y++;return Y<G&&O[Y]==s?s:h;case k:for(G=O.length,Y=B+1;Y<G&&O[Y]==k;)Y++;if(Y<G){var J=D[B],oe=J>=1425&&J<=2303||J==64286;if(V=O[Y],oe&&(V==o||V==f))return o}return B<1||(V=O[B-1])==S?h:W[B-1];case S:return b=!1,a=!0,x;case p:return c=!0,h;case y:case m:case u:case v:case g:b=!1;case C:return h}}function H(D){var O=D.charCodeAt(0),W=O>>8;return W==0?O>191?e:E[O]:W==5?/[\u0591-\u05f4]/.test(D)?o:e:W==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(D)?k:/[\u0660-\u0669\u066b-\u066c]/.test(D)?l:O==1642?w:/[\u06f0-\u06f9]/.test(D)?s:f:W==32&&O<=8287?T[O&255]:W==254&&O>=65136?f:h}M.L=e,M.R=o,M.EN=s,M.ON_R=3,M.AN=4,M.R_H=5,M.B=6,M.RLE=7,M.DOT="·",M.doBidiReorder=function(D,O,W){if(D.length<2)return{};var B=D.split(""),z=new Array(B.length),V=new Array(B.length),U=[];x=W?t:i,_(B,U,B.length,O);for(var G=0;G<z.length;z[G]=G,G++);I(2,U,z),I(1,U,z);for(var G=0;G<z.length-1;G++)O[G]===l?U[G]=M.AN:U[G]===o&&(O[G]>f&&O[G]<y||O[G]===h||O[G]===C)?U[G]=M.ON_R:G>0&&B[G-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(B[G])&&(U[G-1]=U[G]=M.R_H,G++);B[B.length-1]===M.DOT&&(U[B.length-1]=M.B),B[0]===""&&(U[0]=M.RLE);for(var G=0;G<z.length;G++)V[G]=U[z[G]];return{logicalFromVisual:z,bidiLevels:V}},M.hasBidiCharacters=function(D,O){for(var W=!1,B=0;B<D.length;B++)O[B]=H(D.charAt(B)),!W&&(O[B]==o||O[B]==f||O[B]==l)&&(W=!0);return W},M.getVisualFromLogicalIdx=function(D,O){for(var W=0;W<O.logicalFromVisual.length;W++)if(O.logicalFromVisual[W]==D)return W;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(R,M,P){var x=R("./lib/bidiutil"),L=R("./lib/lang"),b=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=function(){function c(r){this.session=r,this.bidiMap={},this.currentRow=null,this.bidiUtil=x,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=b.test(r.getValue())}return c.prototype.isBidiRow=function(r,n,i){return this.seenBidi?(r!==this.currentRow&&(this.currentRow=r,this.updateRowLine(n,i),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},c.prototype.onChange=function(r){this.seenBidi?this.currentRow=null:r.action=="insert"&&b.test(r.lines.join(` |
| 208 |
`))&&(this.seenBidi=!0,this.currentRow=null)},c.prototype.getDocumentRow=function(){var r=0,n=this.session.$screenRowCache;if(n.length){var i=this.session.$getRowCacheIndex(n,this.currentRow);i>=0&&(r=this.session.$docRowCache[i])}return r},c.prototype.getSplitIndex=function(){var r=0,n=this.session.$screenRowCache;if(n.length)for(var i,t=this.session.$getRowCacheIndex(n,this.currentRow);this.currentRow-r>0&&(i=this.session.$getRowCacheIndex(n,this.currentRow-r-1),i===t);)t=i,r++;else r=this.currentRow;return r},c.prototype.updateRowLine=function(r,n){r===void 0&&(r=this.getDocumentRow());var i=r===this.session.getLength()-1,t=i?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(r),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[r];e&&(n===void 0&&(n=this.getSplitIndex()),n>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[x.L],this.line=n<e.length?this.line.substring(e[n-1],e[n]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[n]),n==e.length&&(this.line+=this.showInvisibles?t:x.DOT))}else this.line+=this.showInvisibles?t:x.DOT;var o=this.session,s=0,l;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(h,S){return h===" "||o.isFullWidth(h.charCodeAt(0))?(l=h===" "?o.getScreenTabSize(S+s):2,s+=l-1,L.stringRepeat(x.DOT,l)):h}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==x.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},c.prototype.updateBidiMap=function(){var r=[];x.hasBidiCharacters(this.line,r)||this.isRtlDir?this.bidiMap=x.doBidiReorder(this.line,r,this.isRtlDir):this.bidiMap={}},c.prototype.markAsDirty=function(){this.currentRow=null},c.prototype.updateCharacterWidths=function(r){if(this.characterWidth!==r.$characterSize.width){this.fontMetrics=r;var n=this.characterWidth=r.$characterSize.width,i=r.$measureCharWidth("ה");this.charWidths[x.L]=this.charWidths[x.EN]=this.charWidths[x.ON_R]=n,this.charWidths[x.R]=this.charWidths[x.AN]=i,this.charWidths[x.R_H]=i*.45,this.charWidths[x.B]=this.charWidths[x.RLE]=0,this.currentRow=null}},c.prototype.setShowInvisibles=function(r){this.showInvisibles=r,this.currentRow=null},c.prototype.setEolChar=function(r){this.EOL=r},c.prototype.setContentWidth=function(r){this.contentWidth=r},c.prototype.isRtlLine=function(r){return this.$isRtl?!0:r!=null?this.session.getLine(r).charAt(0)==this.RLE:this.isRtlDir},c.prototype.setRtlDirection=function(r,n){for(var i=r.getCursorPosition(),t=r.selection.getSelectionAnchor().row;t<=i.row;t++)!n&&r.session.getLine(t).charAt(0)===r.session.$bidiHandler.RLE?r.session.doc.removeInLine(t,0,1):n&&r.session.getLine(t).charAt(0)!==r.session.$bidiHandler.RLE&&r.session.doc.insert({column:0,row:t},r.session.$bidiHandler.RLE)},c.prototype.getPosLeft=function(r){r-=this.wrapIndent;var n=this.line.charAt(0)===this.RLE?1:0,i=r>n?this.session.getOverwrite()?r:r-1:n,t=x.getVisualFromLogicalIdx(i,this.bidiMap),e=this.bidiMap.bidiLevels,o=0;!this.session.getOverwrite()&&r<=n&&e[t]%2!==0&&t++;for(var s=0;s<t;s++)o+=this.charWidths[e[s]];return!this.session.getOverwrite()&&r>n&&e[t]%2===0&&(o+=this.charWidths[e[t]]),this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(o+=this.rtlLineOffset),o},c.prototype.getSelections=function(r,n){var i=this.bidiMap,t=i.bidiLevels,e,o=[],s=0,l=Math.min(r,n)-this.wrapIndent,h=Math.max(r,n)-this.wrapIndent,S=!1,p=!1,f=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,$=0;$<t.length;$++)d=i.logicalFromVisual[$],e=t[$],S=d>=l&&d<h,S&&!p?f=s:!S&&p&&o.push({left:f,width:s-f}),s+=this.charWidths[e],p=S;if(S&&$===t.length&&o.push({left:f,width:s-f}),this.isRtlDir)for(var A=0;A<o.length;A++)o[A].left+=this.rtlLineOffset;return o},c.prototype.offsetToCol=function(i){this.isRtlDir&&(i-=this.rtlLineOffset);var n=0,i=Math.max(i,0),t=0,e=0,o=this.bidiMap.bidiLevels,s=this.charWidths[o[e]];for(this.wrapIndent&&(i-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);i>t+s/2;){if(t+=s,e===o.length-1){s=0;break}s=this.charWidths[o[++e]]}return e>0&&o[e-1]%2!==0&&o[e]%2===0?(i<t&&e--,n=this.bidiMap.logicalFromVisual[e]):e>0&&o[e-1]%2===0&&o[e]%2!==0?n=1+(i>t?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===o.length-1&&s===0&&o[e-1]%2===0||!this.isRtlDir&&e===0&&o[e]%2!==0?n=1+this.bidiMap.logicalFromVisual[e]:(e>0&&o[e-1]%2!==0&&s!==0&&e--,n=this.bidiMap.logicalFromVisual[e]),n===0&&this.isRtlDir&&n++,n+this.wrapIndent},c}();M.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(R,M,P){var x=R("./lib/oop"),L=R("./lib/lang"),b=R("./lib/event_emitter").EventEmitter,a=R("./range").Range,c=function(){function r(n){this.session=n,this.doc=n.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var i=this;this.cursor.on("change",function(t){i.$cursorChanged=!0,i.$silent||i._emit("changeCursor"),!i.$isEmpty&&!i.$silent&&i._emit("changeSelection"),!i.$keepDesiredColumnOnChange&&t.old.column!=t.value.column&&(i.$desiredColumn=null)}),this.anchor.on("change",function(){i.$anchorChanged=!0,!i.$isEmpty&&!i.$silent&&i._emit("changeSelection")})}return r.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},r.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},r.prototype.getCursor=function(){return this.lead.getPosition()},r.prototype.setAnchor=function(n,i){this.$isEmpty=!1,this.anchor.setPosition(n,i)},r.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},r.prototype.getSelectionLead=function(){return this.lead.getPosition()},r.prototype.isBackwards=function(){var n=this.anchor,i=this.lead;return n.row>i.row||n.row==i.row&&n.column>i.column},r.prototype.getRange=function(){var n=this.anchor,i=this.lead;return this.$isEmpty?a.fromPoints(i,i):this.isBackwards()?a.fromPoints(i,n):a.fromPoints(n,i)},r.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},r.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},r.prototype.setRange=function(n,i){var t=i?n.end:n.start,e=i?n.start:n.end;this.$setSelection(t.row,t.column,e.row,e.column)},r.prototype.$setSelection=function(n,i,t,e){if(!this.$silent){var o=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(n,i),this.cursor.setPosition(t,e),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||s)&&this._emit("changeSelection")}},r.prototype.$moveSelection=function(n){var i=this.lead;this.$isEmpty&&this.setSelectionAnchor(i.row,i.column),n.call(this)},r.prototype.selectTo=function(n,i){this.$moveSelection(function(){this.moveCursorTo(n,i)})},r.prototype.selectToPosition=function(n){this.$moveSelection(function(){this.moveCursorToPosition(n)})},r.prototype.moveTo=function(n,i){this.clearSelection(),this.moveCursorTo(n,i)},r.prototype.moveToPosition=function(n){this.clearSelection(),this.moveCursorToPosition(n)},r.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},r.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},r.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},r.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},r.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},r.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},r.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},r.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},r.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},r.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},r.prototype.getWordRange=function(n,i){if(typeof i=="undefined"){var t=n||this.lead;n=t.row,i=t.column}return this.session.getWordRange(n,i)},r.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},r.prototype.selectAWord=function(){var n=this.getCursor(),i=this.session.getAWordRange(n.row,n.column);this.setSelectionRange(i)},r.prototype.getLineRange=function(n,i){var t=typeof n=="number"?n:this.lead.row,e,o=this.session.getFoldLine(t);return o?(t=o.start.row,e=o.end.row):e=t,i===!0?new a(t,0,e,this.session.getLine(e).length):new a(t,0,e+1,0)},r.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},r.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},r.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},r.prototype.wouldMoveIntoSoftTab=function(n,i,t){var e=n.column,o=n.column+i;return t<0&&(e=n.column-i,o=n.column),this.session.isTabStop(n)&&this.doc.getLine(n.row).slice(e,o).split(" ").length-1==i},r.prototype.moveCursorLeft=function(){var n=this.lead.getPosition(),i;if(i=this.session.getFoldAt(n.row,n.column,-1))this.moveCursorTo(i.start.row,i.start.column);else if(n.column===0)n.row>0&&this.moveCursorTo(n.row-1,this.doc.getLine(n.row-1).length);else{var t=this.session.getTabSize();this.wouldMoveIntoSoftTab(n,t,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-t):this.moveCursorBy(0,-1)}},r.prototype.moveCursorRight=function(){var n=this.lead.getPosition(),i;if(i=this.session.getFoldAt(n.row,n.column,1))this.moveCursorTo(i.end.row,i.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 t=this.session.getTabSize(),n=this.lead;this.wouldMoveIntoSoftTab(n,t,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,t):this.moveCursorBy(0,1)}},r.prototype.moveCursorLineStart=function(){var n=this.lead.row,i=this.lead.column,t=this.session.documentToScreenRow(n,i),e=this.session.screenToDocumentPosition(t,0),o=this.session.getDisplayLine(n,null,e.row,e.column),s=o.match(/^\s*/);s[0].length!=i&&!this.session.$useEmacsStyleLineStart&&(e.column+=s[0].length),this.moveCursorToPosition(e)},r.prototype.moveCursorLineEnd=function(){var n=this.lead,i=this.session.getDocumentLastRowColumnPosition(n.row,n.column);if(this.lead.column==i.column){var t=this.session.getLine(i.row);if(i.column==t.length){var e=t.search(/\s+$/);e>0&&(i.column=e)}}this.moveCursorTo(i.row,i.column)},r.prototype.moveCursorFileEnd=function(){var n=this.doc.getLength()-1,i=this.doc.getLine(n).length;this.moveCursorTo(n,i)},r.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},r.prototype.moveCursorLongWordRight=function(){var n=this.lead.row,i=this.lead.column,t=this.doc.getLine(n),e=t.substring(i);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(n,i,1);if(o){this.moveCursorTo(o.end.row,o.end.column);return}if(this.session.nonTokenRe.exec(e)&&(i+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=t.substring(i)),i>=t.length){this.moveCursorTo(n,t.length),this.moveCursorRight(),n<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(i+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(n,i)},r.prototype.moveCursorLongWordLeft=function(){var n=this.lead.row,i=this.lead.column,t;if(t=this.session.getFoldAt(n,i,-1)){this.moveCursorTo(t.start.row,t.start.column);return}var e=this.session.getFoldStringAt(n,i,-1);e==null&&(e=this.doc.getLine(n).substring(0,i));var o=L.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(i-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),i<=0){this.moveCursorTo(n,0),this.moveCursorLeft(),n>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(o)&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(n,i)},r.prototype.$shortWordEndIndex=function(n){var i=0,t,e=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(n))i=this.session.tokenRe.lastIndex;else{for(;(t=n[i])&&e.test(t);)i++;if(i<1){for(o.lastIndex=0;(t=n[i])&&!o.test(t);)if(o.lastIndex=0,i++,e.test(t))if(i>2){i--;break}else{for(;(t=n[i])&&e.test(t);)i++;if(i>2)break}}}return o.lastIndex=0,i},r.prototype.moveCursorShortWordRight=function(){var n=this.lead.row,i=this.lead.column,t=this.doc.getLine(n),e=t.substring(i),o=this.session.getFoldAt(n,i,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(i==t.length){var s=this.doc.getLength();do n++,e=this.doc.getLine(n);while(n<s&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),i=0}var l=this.$shortWordEndIndex(e);this.moveCursorTo(n,i+l)},r.prototype.moveCursorShortWordLeft=function(){var n=this.lead.row,i=this.lead.column,t;if(t=this.session.getFoldAt(n,i,-1))return this.moveCursorTo(t.start.row,t.start.column);var e=this.session.getLine(n).substring(0,i);if(i===0){do n--,e=this.doc.getLine(n);while(n>0&&/^\s*$/.test(e));i=e.length,/\s+$/.test(e)||(e="")}var o=L.stringReverse(e),s=this.$shortWordEndIndex(o);return this.moveCursorTo(n,i-s)},r.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},r.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},r.prototype.moveCursorBy=function(n,i){var t=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(i===0&&(n!==0&&(this.session.$bidiHandler.isBidiRow(t.row,this.lead.row)?(e=this.session.$bidiHandler.getPosLeft(t.column),t.column=Math.round(e/this.session.$bidiHandler.charWidths[0])):e=t.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?t.column=this.$desiredColumn:this.$desiredColumn=t.column),n!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var o=this.session.lineWidgets[this.lead.row];n<0?n-=o.rowsAbove||0:n>0&&(n+=o.rowCount-(o.rowsAbove||0))}var s=this.session.screenToDocumentPosition(t.row+n,t.column,e);n!==0&&i===0&&s.row===this.lead.row&&(s.column,this.lead.column),this.moveCursorTo(s.row,s.column+i,i===0)},r.prototype.moveCursorToPosition=function(n){this.moveCursorTo(n.row,n.column)},r.prototype.moveCursorTo=function(n,i,t){var e=this.session.getFoldAt(n,i,1);e&&(n=e.start.row,i=e.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(n);/[\uDC00-\uDFFF]/.test(o.charAt(i))&&o.charAt(i-1)&&(this.lead.row==n&&this.lead.column==i+1?i=i-1:i=i+1),this.lead.setPosition(n,i),this.$keepDesiredColumnOnChange=!1,t||(this.$desiredColumn=null)},r.prototype.moveCursorToScreen=function(n,i,t){var e=this.session.screenToDocumentPosition(n,i);this.moveCursorTo(e.row,e.column,t)},r.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},r.prototype.fromOrientedRange=function(n){this.setSelectionRange(n,n.cursor==n.start),this.$desiredColumn=n.desiredColumn||this.$desiredColumn},r.prototype.toOrientedRange=function(n){var i=this.getRange();return n?(n.start.column=i.start.column,n.start.row=i.start.row,n.end.column=i.end.column,n.end.row=i.end.row):n=i,n.cursor=this.isBackwards()?n.start:n.end,n.desiredColumn=this.$desiredColumn,n},r.prototype.getRangeOfMovements=function(n){var i=this.getCursor();try{n(this);var t=this.getCursor();return a.fromPoints(i,t)}catch(e){return a.fromPoints(i,i)}finally{this.moveCursorToPosition(i)}},r.prototype.toJSON=function(){if(this.rangeCount)var n=this.ranges.map(function(i){var t=i.clone();return t.isBackwards=i.cursor==i.start,t});else{var n=this.getRange();n.isBackwards=this.isBackwards()}return n},r.prototype.fromJSON=function(n){if(n.start==null)if(this.rangeList&&n.length>1){this.toSingleRange(n[0]);for(var i=n.length;i--;){var t=a.fromPoints(n[i].start,n[i].end);n[i].isBackwards&&(t.cursor=t.start),this.addRange(t,!0)}return}else n=n[0];this.rangeList&&this.toSingleRange(n),this.setSelectionRange(n,n.isBackwards)},r.prototype.isEqual=function(n){if((n.length||this.rangeCount)&&n.length!=this.rangeCount)return!1;if(!n.length||!this.ranges)return this.getRange().isEqual(n);for(var i=this.ranges.length;i--;)if(!this.ranges[i].isEqual(n[i]))return!1;return!0},r}();c.prototype.setSelectionAnchor=c.prototype.setAnchor,c.prototype.getSelectionAnchor=c.prototype.getAnchor,c.prototype.setSelectionRange=c.prototype.setRange,x.implement(c.prototype,b),M.Selection=c}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(R,M,P){var x=R("./lib/report_error").reportError,L=2e3,b=function(){function a(c){this.splitRegex,this.states=c,this.regExps={},this.matchMappings={};for(var r in this.states){for(var n=this.states[r],i=[],t=0,e=this.matchMappings[r]={defaultToken:"text"},o="g",s=[],l=0;l<n.length;l++){var h=n[l];if(h.defaultToken&&(e.defaultToken=h.defaultToken),h.caseInsensitive&&o.indexOf("i")===-1&&(o+="i"),h.unicode&&o.indexOf("u")===-1&&(o+="u"),h.regex!=null){h.regex instanceof RegExp&&(h.regex=h.regex.toString().slice(1,-1));var S=h.regex,p=new RegExp("(?:("+S+")|(.))").exec("a").length-2;Array.isArray(h.token)?h.token.length==1||p==1?h.token=h.token[0]:p-1!=h.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:h,groupCount:p-1}),h.token=h.token[0]):(h.tokenArray=h.token,h.token=null,h.onMatch=this.$arrayTokens):typeof h.token=="function"&&!h.onMatch&&(p>1?h.onMatch=this.$applyToken:h.onMatch=h.token),p>1&&(/\\\d/.test(h.regex)?S=h.regex.replace(/\\([0-9]+)/g,function(f,d){return"\\"+(parseInt(d,10)+t+1)}):(p=1,S=this.removeCapturingGroups(h.regex)),!h.splitRegex&&typeof h.token!="string"&&s.push(h)),e[t]=l,t+=p,i.push(S),h.onMatch||(h.onMatch=null)}}i.length||(e[0]=0,i.push("$")),s.forEach(function(f){f.splitRegex=this.createSplitterRegexp(f.regex,o)},this),this.regExps[r]=new RegExp("("+i.join(")|(")+")|($)",o)}}return a.prototype.$setMaxTokenCount=function(c){L=c|0},a.prototype.$applyToken=function(c){var r=this.splitRegex.exec(c).slice(1),n=this.token.apply(this,r);if(typeof n=="string")return[{type:n,value:c}];for(var i=[],t=0,e=n.length;t<e;t++)r[t]&&(i[i.length]={type:n[t],value:r[t]});return i},a.prototype.$arrayTokens=function(c){if(!c)return[];var r=this.splitRegex.exec(c);if(!r)return"text";for(var n=[],i=this.tokenArray,t=0,e=i.length;t<e;t++)r[t+1]&&(n[n.length]={type:i[t],value:r[t+1]});return n},a.prototype.removeCapturingGroups=function(c){var r=c.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(n,i){return i?"(?:":n});return r},a.prototype.createSplitterRegexp=function(c,r){if(c.indexOf("(?=")!=-1){var n=0,i=!1,t={};c.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,o,s,l,h,S){return i?i=h!="]":h?i=!0:l?(n==t.stack&&(t.end=S+1,t.stack=-1),n--):s&&(n++,s.length!=1&&(t.stack=n,t.start=S)),e}),t.end!=null&&/^\)*$/.test(c.substr(t.end))&&(c=c.substring(0,t.start)+c.substr(t.end))}return c.charAt(0)!="^"&&(c="^"+c),c.charAt(c.length-1)!="$"&&(c+="$"),new RegExp(c,(r||"").replace("g",""))},a.prototype.getLineTokens=function(c,r){if(r&&typeof r!="string"){var n=r.slice(0);r=n[0],r==="#tmp"&&(n.shift(),r=n.shift())}else var n=[];var i=r||"start",t=this.states[i];t||(i="start",t=this.states[i]);var e=this.matchMappings[i],o=this.regExps[i];o.lastIndex=0;for(var s,l=[],h=0,S=0,p={type:null,value:""};s=o.exec(c);){var f=e.defaultToken,d=null,$=s[0],A=o.lastIndex;if(A-$.length>h){var w=c.substring(h,A-$.length);p.type==f?p.value+=w:(p.type&&l.push(p),p={type:f,value:w})}for(var k=0;k<s.length-2;k++)if(s[k+1]!==void 0){d=t[e[k]],d.onMatch?f=d.onMatch($,i,n,c):f=d.token,d.next&&(typeof d.next=="string"?i=d.next:i=d.next(i,n),t=this.states[i],t||(this.reportError("state doesn't exist",i),i="start",t=this.states[i]),e=this.matchMappings[i],h=A,o=this.regExps[i],o.lastIndex=A),d.consumeLineEnd&&(h=A);break}if($){if(typeof f=="string")(!d||d.merge!==!1)&&p.type===f?p.value+=$:(p.type&&l.push(p),p={type:f,value:$});else if(f){p.type&&l.push(p),p={type:null,value:""};for(var k=0;k<f.length;k++)l.push(f[k])}}if(h==c.length)break;if(h=A,S++>L){for(S>2*c.length&&this.reportError("infinite loop with in ace tokenizer",{startState:r,line:c});h<c.length;)p.type&&l.push(p),p={value:c.substring(h,h+=500),type:"overflow"};i="start",n=[];break}}return p.type&&l.push(p),n.length>1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:l,state:n.length?n:i}},a}();b.prototype.reportError=x,M.Tokenizer=b}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(R,M,P){var x=R("../lib/deep_copy").deepCopy,L;L=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},function(){this.addRules=function(c,r){if(!r){for(var n in c)this.$rules[n]=c[n];return}for(var n in c){for(var i=c[n],t=0;t<i.length;t++){var e=i[t];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(r)!==0&&(e.next=r+e.next),e.nextState&&e.nextState.indexOf(r)!==0&&(e.nextState=r+e.nextState))}this.$rules[r+n]=i}},this.getRules=function(){return this.$rules},this.embedRules=function(c,r,n,i,t){var e=typeof c=="function"?new c().getRules():c;if(i)for(var o=0;o<i.length;o++)i[o]=r+i[o];else{i=[];for(var s in e)i.push(r+s)}if(this.addRules(e,r),n)for(var l=Array.prototype[t?"push":"unshift"],o=0;o<i.length;o++)l.apply(this.$rules[i[o]],x(n));this.$embeds||(this.$embeds=[]),this.$embeds.push(r)},this.getEmbeds=function(){return this.$embeds};var b=function(c,r){return(c!="start"||r.length)&&r.unshift(this.nextState,c),this.nextState},a=function(c,r){return r.shift(),r.shift()||"start"};this.normalizeRules=function(){var c=0,r=this.$rules;function n(i){var t=r[i];t.processed=!0;for(var e=0;e<t.length;e++){var o=t[e],s=null;Array.isArray(o)&&(s=o,o={}),!o.regex&&o.start&&(o.regex=o.start,o.next||(o.next=[]),o.next.push({defaultToken:o.token},{token:o.token+".end",regex:o.end||o.start,next:"pop"}),o.token=o.token+".start",o.push=!0);var l=o.next||o.push;if(l&&Array.isArray(l)){var h=o.stateName;h||(h=o.token,typeof h!="string"&&(h=h[0]||""),r[h]&&(h+=c++)),r[h]=l,o.next=h,n(h)}else l=="pop"&&(o.next=a);if(o.push&&(o.nextState=o.next||o.push,o.next=b,delete o.push),o.rules)for(var S in o.rules)r[S]?r[S].push&&r[S].push.apply(r[S],o.rules[S]):r[S]=o.rules[S];var p=typeof o=="string"?o:o.include;if(p&&(p==="$self"&&(p="start"),Array.isArray(p)?s=p.map(function(d){return r[d]}):s=r[p]),s){var f=[e,1].concat(s);o.noEscape&&(f=f.filter(function(d){return!d.next})),t.splice.apply(t,f),e--}o.keywordMap&&(o.token=this.createKeywordMapper(o.keywordMap,o.defaultToken||"text",o.caseInsensitive),delete o.defaultToken)}}Object.keys(r).forEach(n,this)},this.createKeywordMapper=function(c,r,n,i){var t=Object.create(null);return this.$keywordList=[],Object.keys(c).forEach(function(e){for(var o=c[e],s=o.split(i||"|"),l=s.length;l--;){var h=s[l];this.$keywordList.push(h),n&&(h=h.toLowerCase()),t[h]=e}},this),c=null,n?function(e){return t[e.toLowerCase()]||r}:function(e){return t[e]||r}},this.getKeywords=function(){return this.$keywords}}.call(L.prototype),M.TextHighlightRules=L}),ace.define("ace/mode/behaviour",["require","exports","module"],function(R,M,P){var x;x=function(){this.$behaviours={}},function(){this.add=function(L,b,a){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[L]:this.$behaviours[L]={}}this.$behaviours[L][b]=a},this.addBehaviours=function(L){for(var b in L)for(var a in L[b])this.add(b,a,L[b][a])},this.remove=function(L){this.$behaviours&&this.$behaviours[L]&&delete this.$behaviours[L]},this.inherit=function(L,b){if(typeof L=="function")var a=new L().getBehaviours(b);else var a=L.getBehaviours(b);this.addBehaviours(a)},this.getBehaviours=function(L){if(L){for(var b={},a=0;a<L.length;a++)this.$behaviours[L[a]]&&(b[L[a]]=this.$behaviours[L[a]]);return b}else return this.$behaviours}}.call(x.prototype),M.Behaviour=x}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(R,M,P){var x=R("./range").Range,L=function(){function b(a,c,r){this.$session=a,this.$row=c,this.$rowTokens=a.getTokens(c);var n=a.getTokenAt(c,r);this.$tokenIndex=n?n.index:-1}return b.prototype.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]},b.prototype.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]},b.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},b.prototype.getCurrentTokenRow=function(){return this.$row},b.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,c=this.$tokenIndex,r=a[c].start;if(r!==void 0)return r;for(r=0;c>0;)c-=1,r+=a[c].value.length;return r},b.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},b.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],c=this.getCurrentTokenColumn();return new x(this.$row,c,this.$row,c+a.value.length)},b}();M.TokenIterator=L}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(R,M,P){var x=R("../../lib/oop"),L=R("../behaviour").Behaviour,b=R("../../token_iterator").TokenIterator,a=R("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],r=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],n,i={},t={'"':'"',"'":"'"},e=function(l){var h=-1;if(l.multiSelect&&(h=l.selection.index,i.rangeCount!=l.multiSelect.rangeCount&&(i={rangeCount:l.multiSelect.rangeCount})),i[h])return n=i[h];n=i[h]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},o=function(l,h,S,p){var f=l.end.row-l.start.row;return{text:S+h+p,selection:[0,l.start.column+1,f,l.end.column+(f?0:1)]}},s;s=function(l){l=l||{},this.add("braces","insertion",function(h,S,p,f,d){var $=p.getCursorPosition(),A=f.doc.getLine($.row);if(d=="{"){e(p);var w=p.getSelectionRange(),k=f.doc.getTextRange(w);if(k!==""&&k!=="{"&&p.getWrapBehavioursEnabled())return o(w,k,"{","}");if(s.isSaneInsertion(p,f))return/[\]\}\)]/.test(A[$.column])||p.inMultiSelectMode||l.braces?(s.recordAutoInsert(p,f,"}"),{text:"{}",selection:[1,1]}):(s.recordMaybeInsert(p,f,"{"),{text:"{",selection:[1,1]})}else if(d=="}"){e(p);var y=A.substring($.column,$.column+1);if(y=="}"){var m=f.$findOpeningBracket("}",{column:$.column+1,row:$.row});if(m!==null&&s.isAutoInsertedClosing($,A,d))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(d==` |
| 209 |
`||d==`\r |
| 210 |
`){e(p);var g="";s.isMaybeInsertedClosing($,A)&&(g=a.stringRepeat("}",n.maybeInsertedBrackets),s.clearMaybeInsertedClosing());var y=A.substring($.column,$.column+1);if(y==="}"){var u=f.findMatchingBracket({row:$.row,column:$.column+1},"}");if(!u)return null;var v=this.$getIndent(f.getLine(u.row))}else if(g)var v=this.$getIndent(A);else{s.clearMaybeInsertedClosing();return}var C=v+f.getTabString();return{text:` |
| 211 |
`+C+` |
| 212 |
`+v+g,selection:[1,C.length,1,C.length]}}else s.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(h,S,p,f,d){var $=f.doc.getTextRange(d);if(!d.isMultiLine()&&$=="{"){e(p);var A=f.doc.getLine(d.start.row),w=A.substring(d.end.column,d.end.column+1);if(w=="}")return d.end.column++,d;n.maybeInsertedBrackets--}}),this.add("parens","insertion",function(h,S,p,f,d){if(d=="("){e(p);var $=p.getSelectionRange(),A=f.doc.getTextRange($);if(A!==""&&p.getWrapBehavioursEnabled())return o($,A,"(",")");if(s.isSaneInsertion(p,f))return s.recordAutoInsert(p,f,")"),{text:"()",selection:[1,1]}}else if(d==")"){e(p);var w=p.getCursorPosition(),k=f.doc.getLine(w.row),y=k.substring(w.column,w.column+1);if(y==")"){var m=f.$findOpeningBracket(")",{column:w.column+1,row:w.row});if(m!==null&&s.isAutoInsertedClosing(w,k,d))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(h,S,p,f,d){var $=f.doc.getTextRange(d);if(!d.isMultiLine()&&$=="("){e(p);var A=f.doc.getLine(d.start.row),w=A.substring(d.start.column+1,d.start.column+2);if(w==")")return d.end.column++,d}}),this.add("brackets","insertion",function(h,S,p,f,d){if(d=="["){e(p);var $=p.getSelectionRange(),A=f.doc.getTextRange($);if(A!==""&&p.getWrapBehavioursEnabled())return o($,A,"[","]");if(s.isSaneInsertion(p,f))return s.recordAutoInsert(p,f,"]"),{text:"[]",selection:[1,1]}}else if(d=="]"){e(p);var w=p.getCursorPosition(),k=f.doc.getLine(w.row),y=k.substring(w.column,w.column+1);if(y=="]"){var m=f.$findOpeningBracket("]",{column:w.column+1,row:w.row});if(m!==null&&s.isAutoInsertedClosing(w,k,d))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(h,S,p,f,d){var $=f.doc.getTextRange(d);if(!d.isMultiLine()&&$=="["){e(p);var A=f.doc.getLine(d.start.row),w=A.substring(d.start.column+1,d.start.column+2);if(w=="]")return d.end.column++,d}}),this.add("string_dquotes","insertion",function(h,S,p,f,d){var $=f.$mode.$quotes||t;if(d.length==1&&$[d]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(d)!=-1)return;e(p);var A=d,w=p.getSelectionRange(),k=f.doc.getTextRange(w);if(k!==""&&(k.length!=1||!$[k])&&p.getWrapBehavioursEnabled())return o(w,k,A,A);if(!k){var y=p.getCursorPosition(),m=f.doc.getLine(y.row),g=m.substring(y.column-1,y.column),u=m.substring(y.column,y.column+1),v=f.getTokenAt(y.row,y.column),C=f.getTokenAt(y.row,y.column+1);if(g=="\\"&&v&&/escape/.test(v.type))return null;var E=v&&/string|escape/.test(v.type),T=!C||/string|escape/.test(C.type),_;if(u==A)_=E!==T,_&&/string\.end/.test(C.type)&&(_=!1);else{if(E&&!T||E&&T)return null;var I=f.$mode.tokenRe;I.lastIndex=0;var F=I.test(g);I.lastIndex=0;var H=I.test(u),D=f.$mode.$pairQuotesAfter,O=D&&D[A]&&D[A].test(g);if(!O&&F||H||u&&!/[\s;,.})\]\\]/.test(u))return null;var W=m[y.column-2];if(g==A&&(W==A||I.test(W)))return null;_=!0}return{text:_?A+A:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(h,S,p,f,d){var $=f.$mode.$quotes||t,A=f.doc.getTextRange(d);if(!d.isMultiLine()&&$.hasOwnProperty(A)){e(p);var w=f.doc.getLine(d.start.row),k=w.substring(d.start.column+1,d.start.column+2);if(k==A)return d.end.column++,d}}),l.closeDocComment!==!1&&this.add("doc comment end","insertion",function(h,S,p,f,d){if(h==="doc-start"&&(d===` |
| 213 |
`||d===`\r |
| 214 |
`)&&p.selection.isEmpty()){var $=p.getCursorPosition(),A=f.doc.getLine($.row),w=f.doc.getLine($.row+1),k=this.$getIndent(A);if(/\s*\*/.test(w))return/^\s*\*/.test(A)?{text:d+k+"* ",selection:[1,3+k.length,1,3+k.length]}:{text:d+k+" * ",selection:[1,3+k.length,1,3+k.length]};if(/\/\*\*/.test(A.substring(0,$.column)))return{text:d+k+" * "+d+" "+k+"*/",selection:[1,4+k.length,1,4+k.length]}}})},s.isSaneInsertion=function(l,h){var S=l.getCursorPosition(),p=new b(h,S.row,S.column);if(!this.$matchTokenType(p.getCurrentToken()||"text",c)){if(/[)}\]]/.test(l.session.getLine(S.row)[S.column]))return!0;var f=new b(h,S.row,S.column+1);if(!this.$matchTokenType(f.getCurrentToken()||"text",c))return!1}return p.stepForward(),p.getCurrentTokenRow()!==S.row||this.$matchTokenType(p.getCurrentToken()||"text",r)},s.$matchTokenType=function(l,h){return h.indexOf(l.type||l)>-1},s.recordAutoInsert=function(l,h,S){var p=l.getCursorPosition(),f=h.doc.getLine(p.row);this.isAutoInsertedClosing(p,f,n.autoInsertedLineEnd[0])||(n.autoInsertedBrackets=0),n.autoInsertedRow=p.row,n.autoInsertedLineEnd=S+f.substr(p.column),n.autoInsertedBrackets++},s.recordMaybeInsert=function(l,h,S){var p=l.getCursorPosition(),f=h.doc.getLine(p.row);this.isMaybeInsertedClosing(p,f)||(n.maybeInsertedBrackets=0),n.maybeInsertedRow=p.row,n.maybeInsertedLineStart=f.substr(0,p.column)+S,n.maybeInsertedLineEnd=f.substr(p.column),n.maybeInsertedBrackets++},s.isAutoInsertedClosing=function(l,h,S){return n.autoInsertedBrackets>0&&l.row===n.autoInsertedRow&&S===n.autoInsertedLineEnd[0]&&h.substr(l.column)===n.autoInsertedLineEnd},s.isMaybeInsertedClosing=function(l,h){return n.maybeInsertedBrackets>0&&l.row===n.maybeInsertedRow&&h.substr(l.column)===n.maybeInsertedLineEnd&&h.substr(0,l.column)==n.maybeInsertedLineStart},s.popAutoInsertedClosing=function(){n.autoInsertedLineEnd=n.autoInsertedLineEnd.substr(1),n.autoInsertedBrackets--},s.clearMaybeInsertedClosing=function(){n&&(n.maybeInsertedBrackets=0,n.maybeInsertedRow=-1)},x.inherits(s,L),M.CstyleBehaviour=s}),ace.define("ace/unicode",["require","exports","module"],function(R,M,P){for(var x=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],L=0,b=[],a=0;a<x.length;a+=2)b.push(L+=x[a]),x[a+1]&&b.push(45,L+=x[a+1]);M.wordChars=String.fromCharCode.apply(null,b)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(R,M,P){var x=R("../config"),L=R("../tokenizer").Tokenizer,b=R("./text_highlight_rules").TextHighlightRules,a=R("./behaviour/cstyle").CstyleBehaviour,c=R("../unicode"),r=R("../lib/lang"),n=R("../token_iterator").TokenIterator,i=R("../range").Range,t;t=function(){this.HighlightRules=b},function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+c.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+c.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new L(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,o,s,l){var h=o.doc,S=!0,p=!0,f=1/0,d=o.getTabSize(),$=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var k=this.lineCommentStart.map(r.escapeRegExp).join("|"),A=this.lineCommentStart[0];else var k=r.escapeRegExp(this.lineCommentStart),A=this.lineCommentStart;k=new RegExp("^(\\s*)(?:"+k+") ?"),$=o.getUseSoftTabs();var g=function(H,D){var O=H.match(k);if(O){var W=O[1].length,B=O[0].length;!C(H,W,B)&&O[0][B-1]==" "&&B--,h.removeInLine(D,W,B)}},v=A+" ",m=function(H,D){(!S||/\S/.test(H))&&(C(H,f,f)?h.insertInLine({row:D,column:f},v):h.insertInLine({row:D,column:f},A))},u=function(H,D){return k.test(H)},C=function(H,D,O){for(var W=0;D--&&H.charAt(D)==" ";)W++;if(W%d!=0)return!1;for(var W=0;H.charAt(O++)==" ";)W++;return d>2?W%d!=d-1:W%d==0}}else{if(!this.blockComment)return!1;var A=this.blockComment.start,w=this.blockComment.end,k=new RegExp("^(\\s*)(?:"+r.escapeRegExp(A)+")"),y=new RegExp("(?:"+r.escapeRegExp(w)+")\\s*$"),m=function(_,I){u(_,I)||(!S||/\S/.test(_))&&(h.insertInLine({row:I,column:_.length},w),h.insertInLine({row:I,column:f},A))},g=function(_,I){var F;(F=_.match(y))&&h.removeInLine(I,_.length-F[0].length,_.length),(F=_.match(k))&&h.removeInLine(I,F[1].length,F[0].length)},u=function(_,I){if(k.test(_))return!0;for(var F=o.getTokens(I),H=0;H<F.length;H++)if(F[H].type==="comment")return!0}}function E(_){for(var I=s;I<=l;I++)_(h.getLine(I),I)}var T=1/0;E(function(_,I){var F=_.search(/\S/);F!==-1?(F<f&&(f=F),p&&!u(_,I)&&(p=!1)):T>_.length&&(T=_.length)}),f==1/0&&(f=T,S=!1,p=!1),$&&f%d!=0&&(f=Math.floor(f/d)*d),E(p?g:m)},this.toggleBlockComment=function(e,o,s,l){var h=this.blockComment;if(h){!h.start&&h[0]&&(h=h[0]);var S=new n(o,l.row,l.column),p=S.getCurrentToken();o.selection;var f=o.selection.toOrientedRange(),d,$;if(p&&/comment/.test(p.type)){for(var A,w;p&&/comment/.test(p.type);){var k=p.value.indexOf(h.start);if(k!=-1){var y=S.getCurrentTokenRow(),m=S.getCurrentTokenColumn()+k;A=new i(y,m,y,m+h.start.length);break}p=S.stepBackward()}for(var S=new n(o,l.row,l.column),p=S.getCurrentToken();p&&/comment/.test(p.type);){var k=p.value.indexOf(h.end);if(k!=-1){var y=S.getCurrentTokenRow(),m=S.getCurrentTokenColumn()+k;w=new i(y,m,y,m+h.end.length);break}p=S.stepForward()}w&&o.remove(w),A&&(o.remove(A),d=A.start.row,$=-h.start.length)}else $=h.start.length,d=s.start.row,o.insert(s.end,h.end),o.insert(s.start,h.start);f.start.row==d&&(f.start.column+=$),f.end.row==d&&(f.end.column+=$),o.selection.fromOrientedRange(f)}},this.getNextLineIndent=function(e,o,s){return this.$getIndent(o)},this.checkOutdent=function(e,o,s){return!1},this.autoOutdent=function(e,o,s){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var o in e)if(e[o]){var s=e[o],l=s.prototype.$id,h=x.$modes[l];h||(x.$modes[l]=h=new s),x.$modes[o]||(x.$modes[o]=h),this.$embeds.push(o),this.$modes[o]=h}for(var S=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],p=function(d){(function($){var A=S[d],w=$[A];$[S[d]]=function(){return this.$delegator(A,arguments,w)}})(f)},f=this,o=0;o<S.length;o++)p(o)},this.$delegator=function(e,o,s){var l=o[0]||"start";if(typeof l!="string"){if(Array.isArray(l[2])){var h=l[2][l[2].length-1],S=this.$modes[h];if(S)return S[e].apply(S,[l[1]].concat([].slice.call(o,1)))}l=l[0]||"start"}for(var p=0;p<this.$embeds.length;p++)if(this.$modes[this.$embeds[p]]){var f=l.split(this.$embeds[p]);if(!f[0]&&f[1]){o[0]=f[1];var S=this.$modes[this.$embeds[p]];return S[e].apply(S,o)}}var d=s.apply(this,o);return s?d:void 0},this.transformAction=function(e,o,s,l,h){if(this.$behaviour){var S=this.$behaviour.getBehaviours();for(var p in S)if(S[p][o]){var f=S[p][o].apply(this,arguments);if(f)return f}}},this.getKeywords=function(e){if(!this.completionKeywords){var o=this.$tokenizer.rules,s=[];for(var l in o)for(var h=o[l],S=0,p=h.length;S<p;S++)if(typeof h[S].token=="string")/keyword|support|storage/.test(h[S].token)&&s.push(h[S].regex);else if(typeof h[S].token=="object"){for(var f=0,d=h[S].token.length;f<d;f++)if(/keyword|support|storage/.test(h[S].token[f])){var l=h[S].regex.match(/\(.+?\)/g)[f];s.push(l.substr(1,l.length-2))}}this.completionKeywords=s}return e?s.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,o,s,l){var h=this.$keywordList||this.$createKeywordList();return h.map(function(S){return{name:S,value:S,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}.call(t.prototype),M.Mode=t}),ace.define("ace/apply_delta",["require","exports","module"],function(R,M,P){M.applyDelta=function(x,L,b){var a=L.start.row,c=L.start.column,r=x[a]||"";switch(L.action){case"insert":var n=L.lines;if(n.length===1)x[a]=r.substring(0,c)+L.lines[0]+r.substring(c);else{var i=[a,1].concat(L.lines);x.splice.apply(x,i),x[a]=r.substring(0,c)+x[a],x[a+L.lines.length-1]+=r.substring(c)}break;case"remove":var t=L.end.column,e=L.end.row;a===e?x[a]=r.substring(0,c)+r.substring(t):x.splice(a,e-a+1,r.substring(0,c)+x[e].substring(t));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(R,M,P){var x=R("./lib/oop"),L=R("./lib/event_emitter").EventEmitter,b=function(){function r(n,i,t){this.$onChange=this.onChange.bind(this),this.attach(n),typeof i!="number"?this.setPosition(i.row,i.column):this.setPosition(i,t)}return r.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},r.prototype.getDocument=function(){return this.document},r.prototype.onChange=function(n){if(!(n.start.row==n.end.row&&n.start.row!=this.row)&&!(n.start.row>this.row)){var i=c(n,{row:this.row,column:this.column},this.$insertRight);this.setPosition(i.row,i.column,!0)}},r.prototype.setPosition=function(n,i,t){var e;if(t?e={row:n,column:i}:e=this.$clipPositionToDocument(n,i),!(this.row==e.row&&this.column==e.column)){var o={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:o,value:e})}},r.prototype.detach=function(){this.document.off("change",this.$onChange)},r.prototype.attach=function(n){this.document=n||this.document,this.document.on("change",this.$onChange)},r.prototype.$clipPositionToDocument=function(n,i){var t={};return n>=this.document.getLength()?(t.row=Math.max(0,this.document.getLength()-1),t.column=this.document.getLine(t.row).length):n<0?(t.row=0,t.column=0):(t.row=n,t.column=Math.min(this.document.getLine(t.row).length,Math.max(0,i))),i<0&&(t.column=0),t},r}();b.prototype.$insertRight=!1,x.implement(b.prototype,L);function a(r,n,i){var t=i?r.column<=n.column:r.column<n.column;return r.row<n.row||r.row==n.row&&t}function c(r,n,i){var t=r.action=="insert",e=(t?1:-1)*(r.end.row-r.start.row),o=(t?1:-1)*(r.end.column-r.start.column),s=r.start,l=t?s:r.end;return a(n,s,i)?{row:n.row,column:n.column}:a(l,n,!i)?{row:n.row+e,column:n.column+(n.row==l.row?o:0)}:{row:s.row,column:s.column}}M.Anchor=b}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(R,M,P){var x=R("./lib/oop"),L=R("./apply_delta").applyDelta,b=R("./lib/event_emitter").EventEmitter,a=R("./range").Range,c=R("./anchor").Anchor,r=function(){function n(i){this.$lines=[""],i.length===0?this.$lines=[""]:Array.isArray(i)?this.insertMergedLines({row:0,column:0},i):this.insert({row:0,column:0},i)}return n.prototype.setValue=function(i){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},i||"")},n.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},n.prototype.createAnchor=function(i,t){return new c(this,i,t)},n.prototype.$detectNewLine=function(i){var t=i.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:` |
| 215 |
`,this._signal("changeNewLineMode")},n.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r |
| 216 |
`;case"unix":return` |
| 217 |
`;default:return this.$autoNewLine||` |
| 218 |
`}},n.prototype.setNewLineMode=function(i){this.$newLineMode!==i&&(this.$newLineMode=i,this._signal("changeNewLineMode"))},n.prototype.getNewLineMode=function(){return this.$newLineMode},n.prototype.isNewLine=function(i){return i==`\r |
| 219 |
`||i=="\r"||i==` |
| 220 |
`},n.prototype.getLine=function(i){return this.$lines[i]||""},n.prototype.getLines=function(i,t){return this.$lines.slice(i,t+1)},n.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},n.prototype.getLength=function(){return this.$lines.length},n.prototype.getTextRange=function(i){return this.getLinesForRange(i).join(this.getNewLineCharacter())},n.prototype.getLinesForRange=function(i){var t;if(i.start.row===i.end.row)t=[this.getLine(i.start.row).substring(i.start.column,i.end.column)];else{t=this.getLines(i.start.row,i.end.row),t[0]=(t[0]||"").substring(i.start.column);var e=t.length-1;i.end.row-i.start.row==e&&(t[e]=t[e].substring(0,i.end.column))}return t},n.prototype.insertLines=function(i,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(i,t)},n.prototype.removeLines=function(i,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(i,t)},n.prototype.insertNewLine=function(i){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(i,["",""])},n.prototype.insert=function(i,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(i,this.$split(t))},n.prototype.insertInLine=function(i,t){var e=this.clippedPos(i.row,i.column),o=this.pos(i.row,i.column+t.length);return this.applyDelta({start:e,end:o,action:"insert",lines:[t]},!0),this.clonePos(o)},n.prototype.clippedPos=function(i,t){var e=this.getLength();i===void 0?i=e:i<0?i=0:i>=e&&(i=e-1,t=void 0);var o=this.getLine(i);return t==null&&(t=o.length),t=Math.min(Math.max(t,0),o.length),{row:i,column:t}},n.prototype.clonePos=function(i){return{row:i.row,column:i.column}},n.prototype.pos=function(i,t){return{row:i,column:t}},n.prototype.$clipPosition=function(i){var t=this.getLength();return i.row>=t?(i.row=Math.max(0,t-1),i.column=this.getLine(t-1).length):(i.row=Math.max(0,i.row),i.column=Math.min(Math.max(i.column,0),this.getLine(i.row).length)),i},n.prototype.insertFullLines=function(i,t){i=Math.min(Math.max(i,0),this.getLength());var e=0;i<this.getLength()?(t=t.concat([""]),e=0):(t=[""].concat(t),i--,e=this.$lines[i].length),this.insertMergedLines({row:i,column:e},t)},n.prototype.insertMergedLines=function(i,t){var e=this.clippedPos(i.row,i.column),o={row:e.row+t.length-1,column:(t.length==1?e.column:0)+t[t.length-1].length};return this.applyDelta({start:e,end:o,action:"insert",lines:t}),this.clonePos(o)},n.prototype.remove=function(i){var t=this.clippedPos(i.start.row,i.start.column),e=this.clippedPos(i.end.row,i.end.column);return this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})}),this.clonePos(t)},n.prototype.removeInLine=function(i,t,e){var o=this.clippedPos(i,t),s=this.clippedPos(i,e);return this.applyDelta({start:o,end:s,action:"remove",lines:this.getLinesForRange({start:o,end:s})},!0),this.clonePos(o)},n.prototype.removeFullLines=function(i,t){i=Math.min(Math.max(0,i),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var e=t==this.getLength()-1&&i>0,o=t<this.getLength()-1,s=e?i-1:i,l=e?this.getLine(s).length:0,h=o?t+1:t,S=o?0:this.getLine(h).length,p=new a(s,l,h,S),f=this.$lines.slice(i,t+1);return this.applyDelta({start:p.start,end:p.end,action:"remove",lines:this.getLinesForRange(p)}),f},n.prototype.removeNewLine=function(i){i<this.getLength()-1&&i>=0&&this.applyDelta({start:this.pos(i,this.getLine(i).length),end:this.pos(i+1,0),action:"remove",lines:["",""]})},n.prototype.replace=function(i,t){if(i instanceof a||(i=a.fromPoints(i.start,i.end)),t.length===0&&i.isEmpty())return i.start;if(t==this.getTextRange(i))return i.end;this.remove(i);var e;return t?e=this.insert(i.start,t):e=i.start,e},n.prototype.applyDeltas=function(i){for(var t=0;t<i.length;t++)this.applyDelta(i[t])},n.prototype.revertDeltas=function(i){for(var t=i.length-1;t>=0;t--)this.revertDelta(i[t])},n.prototype.applyDelta=function(i,t){var e=i.action=="insert";(e?i.lines.length<=1&&!i.lines[0]:!a.comparePoints(i.start,i.end))||(e&&i.lines.length>2e4?this.$splitAndapplyLargeDelta(i,2e4):(L(this.$lines,i,t),this._signal("change",i)))},n.prototype.$safeApplyDelta=function(i){var t=this.$lines.length;(i.action=="remove"&&i.start.row<t&&i.end.row<t||i.action=="insert"&&i.start.row<=t)&&this.applyDelta(i)},n.prototype.$splitAndapplyLargeDelta=function(i,t){for(var e=i.lines,o=e.length-t+1,s=i.start.row,l=i.start.column,h=0,S=0;h<o;h=S){S+=t-1;var p=e.slice(h,S);p.push(""),this.applyDelta({start:this.pos(s+h,l),end:this.pos(s+S,l=0),action:i.action,lines:p},!0)}i.lines=e.slice(h),i.start.row=s+h,i.start.column=l,this.applyDelta(i,!0)},n.prototype.revertDelta=function(i){this.$safeApplyDelta({start:this.clonePos(i.start),end:this.clonePos(i.end),action:i.action=="insert"?"remove":"insert",lines:i.lines.slice()})},n.prototype.indexToPosition=function(i,t){for(var e=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,s=t||0,l=e.length;s<l;s++)if(i-=e[s].length+o,i<0)return{row:s,column:i+e[s].length+o};return{row:l-1,column:i+e[l-1].length+o}},n.prototype.positionToIndex=function(i,t){for(var e=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,s=0,l=Math.min(i.row,e.length),h=t||0;h<l;++h)s+=e[h].length+o;return s+i.column},n.prototype.$split=function(i){return i.split(/\r\n|\r|\n/)},n}();r.prototype.$autoNewLine="",r.prototype.$newLineMode="auto",x.implement(r.prototype,b),M.Document=r}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(R,M,P){var x=R("./lib/oop"),L=R("./lib/event_emitter").EventEmitter,b=function(){function a(c,r){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=c;var n=this;this.$worker=function(){if(n.running){for(var i=new Date,t=n.currentLine,e=-1,o=n.doc,s=t;n.lines[t];)t++;var l=o.getLength(),h=0;for(n.running=!1;t<l;){n.$tokenizeRow(t),e=t;do t++;while(n.lines[t]);if(h++,h%5===0&&new Date-i>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,e==-1&&(e=t),s<=e&&n.fireUpdateEvent(s,e)}}}return a.prototype.setTokenizer=function(c){this.tokenizer=c,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(c){this.doc=c,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(c,r){var n={first:c,last:r};this._signal("update",{data:n})},a.prototype.start=function(c){this.currentLine=Math.min(c||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(c){var r=c.start.row,n=c.end.row-r;if(n===0)this.lines[r]=null;else if(c.action=="remove")this.lines.splice(r,n+1,null),this.states.splice(r,n+1,null);else{var i=Array(n+1);i.unshift(r,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(r,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(c){return this.lines[c]||this.$tokenizeRow(c)},a.prototype.getState=function(c){return this.currentLine==c&&this.$tokenizeRow(c),this.states[c]||"start"},a.prototype.$tokenizeRow=function(c){var r=this.doc.getLine(c),n=this.states[c-1],i=this.tokenizer.getLineTokens(r,n,c);return this.states[c]+""!=i.state+""?(this.states[c]=i.state,this.lines[c+1]=null,this.currentLine>c+1&&(this.currentLine=c+1)):this.currentLine==c&&(this.currentLine=c+1),this.lines[c]=i.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a}();x.implement(b.prototype,L),M.BackgroundTokenizer=b}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(R,M,P){var x=R("./lib/lang"),L=R("./range").Range,b=function(){function a(c,r,n){n===void 0&&(n="text"),this.setRegexp(c),this.clazz=r,this.type=n}return a.prototype.setRegexp=function(c){this.regExp+""!=c+""&&(this.regExp=c,this.cache=[])},a.prototype.update=function(c,r,n,i){if(this.regExp)for(var t=i.firstRow,e=i.lastRow,o={},s=t;s<=e;s++){var l=this.cache[s];l==null&&(l=x.getMatchOffsets(n.getLine(s),this.regExp),l.length>this.MAX_RANGES&&(l=l.slice(0,this.MAX_RANGES)),l=l.map(function(f){return new L(s,f.offset,s,f.offset+f.length)}),this.cache[s]=l.length?l:"");for(var h=l.length;h--;){var S=l[h].toScreenRange(n),p=S.toString();o[p]||(o[p]=!0,r.drawSingleLineMarker(c,S,this.clazz,i))}}},a}();b.prototype.MAX_RANGES=500,M.SearchHighlight=b}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(R,M,P){var x=function(){function f(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return f.prototype.addSession=function(d){this.$session=d},f.prototype.add=function(d,$,A){if(!this.$fromUndo&&d!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),$===!1||!this.lastDeltas){this.lastDeltas=[];var w=this.$undoStack.length;w>this.$undoDepth-1&&this.$undoStack.splice(0,w-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),d.id=this.$rev=++this.$maxRev}(d.action=="remove"||d.action=="insert")&&(this.$lastDelta=d),this.lastDeltas.push(d)}},f.prototype.addSelection=function(d,$){this.selections.push({value:d,rev:$||this.$rev})},f.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},f.prototype.markIgnored=function(d,$){$==null&&($=this.$rev+1);for(var A=this.$undoStack,w=A.length;w--;){var k=A[w][0];if(k.id<=d)break;k.id<$&&(k.ignore=!0)}this.lastDeltas=null},f.prototype.getSelection=function(d,$){for(var A=this.selections,w=A.length;w--;){var k=A[w];if(k.rev<d)return $&&(k=A[w+1]),k}},f.prototype.getRevision=function(){return this.$rev},f.prototype.getDeltas=function(d,$){$==null&&($=this.$rev+1);for(var A=this.$undoStack,w=null,k=0,y=A.length;y--;){var m=A[y][0];if(m.id<$&&!w&&(w=y+1),m.id<=d){k=y+1;break}}return A.slice(k,w)},f.prototype.getChangedRanges=function(d,$){$==null&&($=this.$rev+1)},f.prototype.getChangedLines=function(d,$){$==null&&($=this.$rev+1)},f.prototype.undo=function(d,$){this.lastDeltas=null;var A=this.$undoStack;if(L(A,A.length)){d||(d=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var w=A.pop(),k=null;return w&&(k=d.undoChanges(w,$),this.$redoStack.push(w),this.$syncRev()),this.$fromUndo=!1,k}},f.prototype.redo=function(d,$){if(this.lastDeltas=null,d||(d=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var A=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);p(this.$redoStack,A),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(y){y[0].id=++this.$maxRev},this)}var w=this.$redoStack.pop(),k=null;return w&&(k=d.redoChanges(w,$),this.$undoStack.push(w),this.$syncRev()),this.$fromUndo=!1,k},f.prototype.$syncRev=function(){var d=this.$undoStack,$=d[d.length-1],A=$&&$[0].id||0;this.$redoStackBaseRev=A,this.$rev=A},f.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},f.prototype.canUndo=function(){return this.$undoStack.length>0},f.prototype.canRedo=function(){return this.$redoStack.length>0},f.prototype.bookmark=function(d){d==null&&(d=this.$rev),this.mark=d},f.prototype.isAtBookmark=function(){return this.$rev===this.mark},f.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},f.prototype.fromJSON=function(d){this.reset(),this.$undoStack=d.$undoStack,this.$redoStack=d.$redoStack},f.prototype.$prettyPrint=function(d){return d?n(d):n(this.$undoStack)+` |
| 221 |
--- |
| 222 |
`+n(this.$redoStack)},f}();x.prototype.hasUndo=x.prototype.canUndo,x.prototype.hasRedo=x.prototype.canRedo,x.prototype.isClean=x.prototype.isAtBookmark,x.prototype.markClean=x.prototype.bookmark;function L(f,d){for(var $=d;$--;){var A=f[$];if(A&&!A[0].ignore){for(;$<d-1;){var w=e(f[$],f[$+1]);f[$]=w[0],f[$+1]=w[1],$++}return!0}}}var b=R("./range").Range,a=b.comparePoints;b.comparePoints;function c(f){return{row:f.row,column:f.column}}function r(f){return{start:c(f.start),end:c(f.end),action:f.action,lines:f.lines.slice()}}function n(f){if(f=f||this,Array.isArray(f))return f.map(n).join(` |
| 223 |
`);var d="";return f.action?(d=f.action=="insert"?"+":"-",d+="["+f.lines+"]"):f.value&&(Array.isArray(f.value)?d=f.value.map(i).join(` |
| 224 |
`):d=i(f.value)),f.start&&(d+=i(f)),(f.id||f.rev)&&(d+=" ("+(f.id||f.rev)+")"),d}function i(f){return f.start.row+":"+f.start.column+"=>"+f.end.row+":"+f.end.column}function t(f,d){var $=f.action=="insert",A=d.action=="insert";if($&&A)if(a(d.start,f.end)>=0)s(d,f,-1);else if(a(d.start,f.start)<=0)s(f,d,1);else return null;else if($&&!A)if(a(d.start,f.end)>=0)s(d,f,-1);else if(a(d.end,f.start)<=0)s(f,d,-1);else return null;else if(!$&&A)if(a(d.start,f.start)>=0)s(d,f,1);else if(a(d.start,f.start)<=0)s(f,d,1);else return null;else if(!$&&!A)if(a(d.start,f.start)>=0)s(d,f,1);else if(a(d.end,f.start)<=0)s(f,d,-1);else return null;return[d,f]}function e(f,d){for(var $=f.length;$--;)for(var A=0;A<d.length;A++)if(!t(f[$],d[A])){for(;$<f.length;){for(;A--;)t(d[A],f[$]);A=d.length,$++}return[f,d]}return f.selectionBefore=d.selectionBefore=f.selectionAfter=d.selectionAfter=null,[d,f]}function o(f,d){var $=f.action=="insert",A=d.action=="insert";if($&&A)a(f.start,d.start)<0?s(d,f,1):s(f,d,1);else if($&&!A)a(f.start,d.end)>=0?s(f,d,-1):(a(f.start,d.start)<=0||s(f,b.fromPoints(d.start,f.start),-1),s(d,f,1));else if(!$&&A)a(d.start,f.end)>=0?s(d,f,-1):(a(d.start,f.start)<=0||s(d,b.fromPoints(f.start,d.start),-1),s(f,d,1));else if(!$&&!A)if(a(d.start,f.end)>=0)s(d,f,-1);else if(a(d.end,f.start)<=0)s(f,d,-1);else{var w,k;return a(f.start,d.start)<0&&(w=f,f=h(f,d.start)),a(f.end,d.end)>0&&(k=h(f,d.end)),l(d.end,f.start,f.end,-1),k&&!w&&(f.lines=k.lines,f.start=k.start,f.end=k.end,k=f),[d,w,k].filter(Boolean)}return[d,f]}function s(f,d,$){l(f.start,d.start,d.end,$),l(f.end,d.start,d.end,$)}function l(f,d,$,A){f.row==(A==1?d:$).row&&(f.column+=A*($.column-d.column)),f.row+=A*($.row-d.row)}function h(f,d){var $=f.lines,A=f.end;f.end=c(d);var w=f.end.row-f.start.row,k=$.splice(w,$.length),y=w?d.column:d.column-f.start.column;$.push(k[0].substring(0,y)),k[0]=k[0].substr(y);var m={start:c(d),end:A,lines:k,action:f.action};return m}function S(f,d){d=r(d);for(var $=f.length;$--;){for(var A=f[$],w=0;w<A.length;w++){var k=A[w],y=o(k,d);d=y[0],y.length!=2&&(y[2]?(A.splice(w+1,1,y[1],y[2]),w++):y[1]||(A.splice(w,1),w--))}A.length||f.splice($,1)}return f}function p(f,d){for(var $=0;$<d.length;$++)for(var A=d[$],w=0;w<A.length;w++)S(f,A[w])}M.UndoManager=x}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(R,M,P){var x=R("../range").Range,L=function(){function b(a,c){this.foldData=a,Array.isArray(c)?this.folds=c:c=this.folds=[c];var r=c[c.length-1];this.range=new x(c[0].start.row,c[0].start.column,r.end.row,r.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(n){n.setFoldLine(this)},this)}return b.prototype.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(c){c.start.row+=a,c.end.row+=a})},b.prototype.addFold=function(a){if(a.sameRow){if(a.start.row<this.startRow||a.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(c,r){return-c.range.compareEnd(r.start.row,r.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this},b.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},b.prototype.walk=function(a,c,r){var n=0,i=this.folds,t,e,o,s=!0;c==null&&(c=this.end.row,r=this.end.column);for(var l=0;l<i.length;l++){if(t=i[l],e=t.range.compareStart(c,r),e==-1){a(null,c,r,n,s);return}if(o=a(null,t.start.row,t.start.column,n,s),o=!o&&a(t.placeholder,t.start.row,t.start.column,n),o||e===0)return;s=!t.sameRow,n=t.end.column}a(null,c,r,n,s)},b.prototype.getNextFoldTo=function(a,c){for(var r,n,i=0;i<this.folds.length;i++){if(r=this.folds[i],n=r.range.compareEnd(a,c),n==-1)return{fold:r,kind:"after"};if(n===0)return{fold:r,kind:"inside"}}return null},b.prototype.addRemoveChars=function(a,c,r){var n=this.getNextFoldTo(a,c),i,t;if(n){if(i=n.fold,n.kind=="inside"&&i.start.column!=c&&i.start.row!=a)window.console&&window.console.log(a,c,i);else if(i.start.row==a){t=this.folds;var e=t.indexOf(i);for(e===0&&(this.start.column+=r),e;e<t.length;e++){if(i=t[e],i.start.column+=r,!i.sameRow)return;i.end.column+=r}this.end.column+=r}}},b.prototype.split=function(a,c){var r=this.getNextFoldTo(a,c);if(!r||r.kind=="inside")return null;var n=r.fold,i=this.folds,t=this.foldData,e=i.indexOf(n),o=i[e-1];this.end.row=o.end.row,this.end.column=o.end.column,i=i.splice(e,i.length-e);var s=new b(t,i);return t.splice(t.indexOf(this)+1,0,s),s},b.prototype.merge=function(a){for(var c=a.folds,r=0;r<c.length;r++)this.addFold(c[r]);var n=this.foldData;n.splice(n.indexOf(a),1)},b.prototype.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(c){a.push(" "+c.toString())}),a.push("]"),a.join(` |
| 225 |
`)},b.prototype.idxToPosition=function(a){for(var c=0,r=0;r<this.folds.length;r++){var n=this.folds[r];if(a-=n.start.column-c,a<0)return{row:n.start.row,column:n.start.column+a};if(a-=n.placeholder.length,a<0)return n.start;c=n.end.column}return{row:this.end.row,column:this.end.column+a}},b}();M.FoldLine=L}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(R,M,P){var x=R("./range").Range,L=x.comparePoints,b=function(){function a(){this.ranges=[],this.$bias=1}return a.prototype.pointIndex=function(c,r,n){for(var i=this.ranges,t=n||0;t<i.length;t++){var e=i[t],o=L(c,e.end);if(!(o>0)){var s=L(c,e.start);return o===0?r&&s!==0?-t-2:t:s>0||s===0&&!r?t:-t-1}}return-t-1},a.prototype.add=function(c){var r=!c.isEmpty(),n=this.pointIndex(c.start,r);n<0&&(n=-n-1);var i=this.pointIndex(c.end,r,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,c)},a.prototype.addList=function(c){for(var r=[],n=c.length;n--;)r.push.apply(r,this.add(c[n]));return r},a.prototype.substractPoint=function(c){var r=this.pointIndex(c);if(r>=0)return this.ranges.splice(r,1)},a.prototype.merge=function(){var c=[],r=this.ranges;r=r.sort(function(o,s){return L(o.start,s.start)});for(var n=r[0],i,t=1;t<r.length;t++){i=n,n=r[t];var e=L(i.end,n.start);e<0||e==0&&!i.isEmpty()&&!n.isEmpty()||(L(i.end,n.end)<0&&(i.end.row=n.end.row,i.end.column=n.end.column),r.splice(t,1),c.push(n),n=i,t--)}return this.ranges=r,c},a.prototype.contains=function(c,r){return this.pointIndex({row:c,column:r})>=0},a.prototype.containsPoint=function(c){return this.pointIndex(c)>=0},a.prototype.rangeAtPoint=function(c){var r=this.pointIndex(c);if(r>=0)return this.ranges[r]},a.prototype.clipRows=function(c,r){var n=this.ranges;if(n[0].start.row>r||n[n.length-1].start.row<c)return[];var i=this.pointIndex({row:c,column:0});i<0&&(i=-i-1);var t=this.pointIndex({row:r,column:0},i);t<0&&(t=-t-1);for(var e=[],o=i;o<t;o++)e.push(n[o]);return e},a.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},a.prototype.attach=function(c){this.session&&this.detach(),this.session=c,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},a.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},a.prototype.$onChange=function(c){for(var r=c.start,n=c.end,i=r.row,t=n.row,e=this.ranges,o=0,s=e.length;o<s;o++){var l=e[o];if(l.end.row>=i)break}if(c.action=="insert")for(var h=t-i,S=-r.column+n.column;o<s;o++){var l=e[o];if(l.start.row>i)break;if(l.start.row==i&&l.start.column>=r.column&&(l.start.column==r.column&&this.$bias<=0||(l.start.column+=S,l.start.row+=h)),l.end.row==i&&l.end.column>=r.column){if(l.end.column==r.column&&this.$bias<0)continue;l.end.column==r.column&&S>0&&o<s-1&&l.end.column>l.start.column&&l.end.column==e[o+1].start.column&&(l.end.column-=S),l.end.column+=S,l.end.row+=h}}else for(var h=i-t,S=r.column-n.column;o<s;o++){var l=e[o];if(l.start.row>t)break;l.end.row<t&&(i<l.end.row||i==l.end.row&&r.column<l.end.column)?(l.end.row=i,l.end.column=r.column):l.end.row==t?l.end.column<=n.column?(h||l.end.column>r.column)&&(l.end.column=r.column,l.end.row=r.row):(l.end.column+=S,l.end.row+=h):l.end.row>t&&(l.end.row+=h),l.start.row<t&&(i<l.start.row||i==l.start.row&&r.column<l.start.column)?(l.start.row=i,l.start.column=r.column):l.start.row==t?l.start.column<=n.column?(h||l.start.column>r.column)&&(l.start.column=r.column,l.start.row=r.row):(l.start.column+=S,l.start.row+=h):l.start.row>t&&(l.start.row+=h)}if(h!=0&&o<s)for(;o<s;o++){var l=e[o];l.start.row+=h,l.end.row+=h}},a}();b.prototype.comparePoints=L,M.RangeList=b}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(R,M,P){var x=this&&this.__extends||function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(o[l]=s[l])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function o(){this.constructor=t}t.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)}}(),L=R("../range_list").RangeList,b=function(i){x(t,i);function t(e,o){var s=i.call(this)||this;return s.foldLine=null,s.placeholder=o,s.range=e,s.start=e.start,s.end=e.end,s.sameRow=e.start.row==e.end.row,s.subFolds=s.ranges=[],s}return t.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(o){o.setFoldLine(e)})},t.prototype.clone=function(){var e=this.range.clone(),o=new t(e,this.placeholder);return this.subFolds.forEach(function(s){o.subFolds.push(s.clone())}),o.collapseChildren=this.collapseChildren,o},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){c(e,this.start);for(var S=e.start.row,p=e.start.column,o=0,s=-1;o<this.subFolds.length&&(s=this.subFolds[o].range.compare(S,p),s==1);o++);var l=this.subFolds[o],h=0;if(s==0){if(l.range.containsRange(e))return l.addSubFold(e);h=1}for(var S=e.range.end.row,p=e.range.end.column,f=o,s=-1;f<this.subFolds.length&&(s=this.subFolds[f].range.compare(S,p),s==1);f++);s==0&&f++;for(var d=this.subFolds.splice(o,f-o,e),$=s==0?d.length-1:d.length,A=h;A<$;A++)e.addSubFold(d[A]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return n(e,this.start)},t}(L);function a(i,t){i.row-=t.row,i.row==0&&(i.column-=t.column)}function c(i,t){a(i.start,t),a(i.end,t)}function r(i,t){i.row==0&&(i.column+=t.column),i.row+=t.row}function n(i,t){r(i.start,t),r(i.end,t)}M.Fold=b}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(R,M,P){var x=R("../range").Range,L=R("./fold_line").FoldLine,b=R("./fold").Fold,a=R("../token_iterator").TokenIterator,c=R("../mouse/mouse_event").MouseEvent;function r(){this.getFoldAt=function(n,i,t){var e=this.getFoldLine(n);if(!e)return null;for(var o=e.folds,s=0;s<o.length;s++){var l=o[s].range;if(l.contains(n,i)){if(t==1&&l.isEnd(n,i)&&!l.isEmpty())continue;if(t==-1&&l.isStart(n,i)&&!l.isEmpty())continue;return o[s]}}},this.getFoldsInRange=function(n){var i=n.start,t=n.end,e=this.$foldData,o=[];i.column+=1,t.column-=1;for(var s=0;s<e.length;s++){var l=e[s].range.compareRange(n);if(l!=2){if(l==-2)break;for(var h=e[s].folds,S=0;S<h.length;S++){var p=h[S];if(l=p.range.compareRange(n),l==-2)break;if(l==2)continue;if(l==42)break;o.push(p)}}}return i.column-=1,t.column+=1,o},this.getFoldsInRangeList=function(n){if(Array.isArray(n)){var i=[];n.forEach(function(t){i=i.concat(this.getFoldsInRange(t))},this)}else var i=this.getFoldsInRange(n);return i},this.getAllFolds=function(){for(var n=[],i=this.$foldData,t=0;t<i.length;t++)for(var e=0;e<i[t].folds.length;e++)n.push(i[t].folds[e]);return n},this.getFoldStringAt=function(n,i,t,e){if(e=e||this.getFoldLine(n),!e)return null;for(var o={end:{column:0}},s,l,h=0;h<e.folds.length;h++){l=e.folds[h];var S=l.range.compareEnd(n,i);if(S==-1){s=this.getLine(l.start.row).substring(o.end.column,l.start.column);break}else if(S===0)return null;o=l}return s||(s=this.getLine(l.start.row).substring(o.end.column)),t==-1?s.substring(0,i-o.end.column):t==1?s.substring(i-o.end.column):s},this.getFoldLine=function(n,i){var t=this.$foldData,e=0;for(i&&(e=t.indexOf(i)),e==-1&&(e=0),e;e<t.length;e++){var o=t[e];if(o.start.row<=n&&o.end.row>=n)return o;if(o.end.row>n)return null}return null},this.getNextFoldLine=function(n,i){var t=this.$foldData,e=0;for(i&&(e=t.indexOf(i)),e==-1&&(e=0),e;e<t.length;e++){var o=t[e];if(o.end.row>=n)return o}return null},this.getFoldedRowCount=function(n,i){for(var t=this.$foldData,e=i-n+1,o=0;o<t.length;o++){var s=t[o],l=s.end.row,h=s.start.row;if(l>=i){h<i&&(h>=n?e-=i-h:e=0);break}else l>=n&&(h>=n?e-=l-h:e-=l-n+1)}return e},this.$addFoldLine=function(n){return this.$foldData.push(n),this.$foldData.sort(function(i,t){return i.start.row-t.start.row}),n},this.addFold=function(n,i){var t=this.$foldData,e=!1,o;n instanceof b?o=n:(o=new b(i,n),o.collapseChildren=i.collapseChildren),this.$clipRangeToDocument(o.range);var s=o.start.row,l=o.start.column,h=o.end.row,S=o.end.column,p=this.getFoldAt(s,l,1),f=this.getFoldAt(h,S,-1);if(p&&f==p)return p.addSubFold(o);p&&!p.range.isStart(s,l)&&this.removeFold(p),f&&!f.range.isEnd(h,S)&&this.removeFold(f);var d=this.getFoldsInRange(o.range);d.length>0&&(this.removeFolds(d),o.collapseChildren||d.forEach(function(k){o.addSubFold(k)}));for(var $=0;$<t.length;$++){var A=t[$];if(h==A.start.row){A.addFold(o),e=!0;break}else if(s==A.end.row){if(A.addFold(o),e=!0,!o.sameRow){var w=t[$+1];if(w&&w.start.row==h){A.merge(w);break}}break}else if(h<=A.start.row)break}return e||(A=this.$addFoldLine(new L(this.$foldData,o))),this.$useWrapMode?this.$updateWrapData(A.start.row,A.start.row):this.$updateRowLengthCache(A.start.row,A.start.row),this.$modified=!0,this._signal("changeFold",{data:o,action:"add"}),o},this.addFolds=function(n){n.forEach(function(i){this.addFold(i)},this)},this.removeFold=function(n){var i=n.foldLine,t=i.start.row,e=i.end.row,o=this.$foldData,s=i.folds;if(s.length==1)o.splice(o.indexOf(i),1);else if(i.range.isEnd(n.end.row,n.end.column))s.pop(),i.end.row=s[s.length-1].end.row,i.end.column=s[s.length-1].end.column;else if(i.range.isStart(n.start.row,n.start.column))s.shift(),i.start.row=s[0].start.row,i.start.column=s[0].start.column;else if(n.sameRow)s.splice(s.indexOf(n),1);else{var l=i.split(n.start.row,n.start.column);s=l.folds,s.shift(),l.start.row=s[0].start.row,l.start.column=s[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(t,e):this.$updateRowLengthCache(t,e)),this.$modified=!0,this._signal("changeFold",{data:n,action:"remove"})},this.removeFolds=function(n){for(var i=[],t=0;t<n.length;t++)i.push(n[t]);i.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(n){this.removeFold(n),n.subFolds.forEach(function(i){n.restoreRange(i),this.addFold(i)},this),n.collapseChildren>0&&this.foldAll(n.start.row+1,n.end.row,n.collapseChildren-1),n.subFolds=[]},this.expandFolds=function(n){n.forEach(function(i){this.expandFold(i)},this)},this.unfold=function(n,i){var t,e;if(n==null)t=new x(0,0,this.getLength(),0),i==null&&(i=!0);else if(typeof n=="number")t=new x(n,0,n,this.getLine(n).length);else if("row"in n)t=x.fromPoints(n,n);else{if(Array.isArray(n))return e=[],n.forEach(function(s){e=e.concat(this.unfold(s))},this),e;t=n}e=this.getFoldsInRangeList(t);for(var o=e;e.length==1&&x.comparePoints(e[0].start,t.start)<0&&x.comparePoints(e[0].end,t.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(t);if(i!=!1?this.removeFolds(e):this.expandFolds(e),o.length)return o},this.isRowFolded=function(n,i){return!!this.getFoldLine(n,i)},this.getRowFoldEnd=function(n,i){var t=this.getFoldLine(n,i);return t?t.end.row:n},this.getRowFoldStart=function(n,i){var t=this.getFoldLine(n,i);return t?t.start.row:n},this.getFoldDisplayLine=function(n,i,t,e,o){e==null&&(e=n.start.row),o==null&&(o=0),i==null&&(i=n.end.row),t==null&&(t=this.getLine(i).length);var s=this.doc,l="";return n.walk(function(h,S,p,f){if(!(S<e)){if(S==e){if(p<o)return;f=Math.max(o,f)}h!=null?l+=h:l+=s.getLine(S).substring(f,p)}},i,t),l},this.getDisplayLine=function(n,i,t,e){var o=this.getFoldLine(n);if(o)return this.getFoldDisplayLine(o,n,i,t,e);var s;return s=this.doc.getLine(n),s.substring(e||0,i||s.length)},this.$cloneFoldData=function(){var n=[];return n=this.$foldData.map(function(i){var t=i.folds.map(function(e){return e.clone()});return new L(n,t)}),n},this.toggleFold=function(n){var i=this.selection,t=i.getRange(),e,o;if(t.isEmpty()){var s=t.start;if(e=this.getFoldAt(s.row,s.column),e){this.expandFold(e);return}else(o=this.findMatchingBracket(s))?t.comparePoint(o)==1?t.end=o:(t.start=o,t.start.column++,t.end.column--):(o=this.findMatchingBracket({row:s.row,column:s.column+1}))?(t.comparePoint(o)==1?t.end=o:t.start=o,t.start.column++):t=this.getCommentFoldRange(s.row,s.column)||t}else{var l=this.getFoldsInRange(t);if(n&&l.length){this.expandFolds(l);return}else l.length==1&&(e=l[0])}if(e||(e=this.getFoldAt(t.start.row,t.start.column)),e&&e.range.toString()==t.toString()){this.expandFold(e);return}var h="...";if(!t.isMultiLine()){if(h=this.getTextRange(t),h.length<4)return;h=h.trim().substring(0,2)+".."}this.addFold(h,t)},this.getCommentFoldRange=function(n,i,t){var e=new a(this,n,i),o=e.getCurrentToken(),s=o&&o.type;if(o&&/^comment|string/.test(s)){s=s.match(/comment|string/)[0],s=="comment"&&(s+="|doc-start|\\.doc");var l=new RegExp(s),h=new x;if(t!=1){do o=e.stepBackward();while(o&&l.test(o.type)&&!/^comment.end/.test(o.type));o=e.stepForward()}if(h.start.row=e.getCurrentTokenRow(),h.start.column=e.getCurrentTokenColumn()+(/^comment.start/.test(o.type)?o.value.length:2),e=new a(this,n,i),t!=-1){var S=-1;do if(o=e.stepForward(),S==-1){var p=this.getState(e.$row);l.test(p)||(S=e.$row)}else if(e.$row>S)break;while(o&&l.test(o.type)&&!/^comment.start/.test(o.type));o=e.stepBackward()}else o=e.getCurrentToken();return h.end.row=e.getCurrentTokenRow(),h.end.column=e.getCurrentTokenColumn(),/^comment.end/.test(o.type)||(h.end.column+=o.value.length-2),h}},this.foldAll=function(n,i,t,e){t==null&&(t=1e5);var o=this.foldWidgets;if(o){i=i||this.getLength(),n=n||0;for(var s=n;s<i;s++)if(o[s]==null&&(o[s]=this.getFoldWidget(s)),o[s]=="start"&&!(e&&!e(s))){var l=this.getFoldWidgetRange(s);l&&l.isMultiLine()&&l.end.row<=i&&l.start.row>=n&&(s=l.end.row,l.collapseChildren=t,this.addFold("...",l))}}},this.foldToLevel=function(n){for(this.foldAll();n-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var n=this;this.foldAll(null,null,null,function(i){for(var t=n.getTokens(i),e=0;e<t.length;e++){var o=t[e];if(!(o.type=="text"&&/^\s+$/.test(o.value)))return!!/comment/.test(o.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(n){if(!this.$foldStyles[n])throw new Error("invalid fold style: "+n+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=n){this.$foldStyle=n,n=="manual"&&this.unfold();var i=this.$foldMode;this.$setFolding(null),this.$setFolding(i)}},this.$setFolding=function(n){if(this.$foldMode!=n){if(this.$foldMode=n,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!n||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=n.getFoldWidget.bind(n,this,this.$foldStyle),this.getFoldWidgetRange=n.getFoldWidgetRange.bind(n,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(n,i){var t=this.foldWidgets;if(!t||i&&t[n])return{};for(var e=n-1,o;e>=0;){var s=t[e];if(s==null&&(s=t[e]=this.getFoldWidget(e)),s=="start"){var l=this.getFoldWidgetRange(e);if(o||(o=l),l&&l.end.row>=n)break}e--}return{range:e!==-1&&l,firstRange:o}},this.onFoldWidgetClick=function(n,i){i instanceof c&&(i=i.domEvent);var t={children:i.shiftKey,all:i.ctrlKey||i.metaKey,siblings:i.altKey},e=this.$toggleFoldWidget(n,t);if(!e){var o=i.target||i.srcElement;o&&/ace_fold-widget/.test(o.className)&&(o.className+=" ace_invalid")}},this.$toggleFoldWidget=function(n,i){if(this.getFoldWidget){var t=this.getFoldWidget(n),e=this.getLine(n),o=t==="end"?-1:1,s=this.getFoldAt(n,o===-1?0:e.length,o);if(s)return i.children||i.all?this.removeFold(s):this.expandFold(s),s;var l=this.getFoldWidgetRange(n,!0);if(l&&!l.isMultiLine()&&(s=this.getFoldAt(l.start.row,l.start.column,1),s&&l.isEqual(s.range)))return this.removeFold(s),s;if(i.siblings){var h=this.getParentFoldRangeData(n);if(h.range)var S=h.range.start.row+1,p=h.range.end.row;this.foldAll(S,p,i.all?1e4:0)}else i.children?(p=l?l.end.row:this.getLength(),this.foldAll(n+1,p,i.all?1e4:0)):l&&(i.all&&(l.collapseChildren=1e4),this.addFold("...",l));return l}},this.toggleFoldWidget=function(n){var i=this.selection.getCursor().row;i=this.getRowFoldStart(i);var t=this.$toggleFoldWidget(i,{});if(!t){var e=this.getParentFoldRangeData(i,!0);if(t=e.range||e.firstRange,t){i=t.start.row;var o=this.getFoldAt(i,this.getLine(i).length,1);o?this.removeFold(o):this.addFold("...",t)}}},this.updateFoldWidgets=function(n){var i=n.start.row,t=n.end.row-i;if(t===0)this.foldWidgets[i]=null;else if(n.action=="remove")this.foldWidgets.splice(i,t+1,null);else{var e=Array(t+1);e.unshift(i,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(n){var i=n.data;i.first!=i.last&&this.foldWidgets.length>i.first&&this.foldWidgets.splice(i.first,this.foldWidgets.length)}}M.Folding=r}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(R,M,P){var x=R("../token_iterator").TokenIterator,L=R("../range").Range;function b(){this.findMatchingBracket=function(a,c){if(a.column==0)return null;var r=c||this.getLine(a.row).charAt(a.column-1);if(r=="")return null;var n=r.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],a):this.$findOpeningBracket(n[2],a):null},this.getBracketRange=function(a){var c=this.getLine(a.row),r=!0,n,i=c.charAt(a.column-1),t=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(t||(i=c.charAt(a.column),a={row:a.row,column:a.column+1},t=i&&i.match(/([\(\[\{])|([\)\]\}])/),r=!1),!t)return null;if(t[1]){var e=this.$findClosingBracket(t[1],a);if(!e)return null;n=L.fromPoints(a,e),r||(n.end.column++,n.start.column--),n.cursor=n.end}else{var e=this.$findOpeningBracket(t[2],a);if(!e)return null;n=L.fromPoints(e,a),r||(n.start.column++,n.end.column--),n.cursor=n.start}return n},this.getMatchingBracketRanges=function(a,c){var r=this.getLine(a.row),n=/([\(\[\{])|([\)\]\}])/,i=!c&&r.charAt(a.column-1),t=i&&i.match(n);if(t||(i=(c===void 0||c)&&r.charAt(a.column),a={row:a.row,column:a.column+1},t=i&&i.match(n)),!t)return null;var e=new L(a.row,a.column-1,a.row,a.column),o=t[1]?this.$findClosingBracket(t[1],a):this.$findOpeningBracket(t[2],a);if(!o)return[e];var s=new L(o.row,o.column,o.row,o.column+1);return[e,s]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,c,r){var n=this.$brackets[a],i=1,t=new x(this,c.row,c.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){r||(r=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var o=c.column-t.getCurrentTokenColumn()-2,s=e.value;;){for(;o>=0;){var l=s.charAt(o);if(l==n){if(i-=1,i==0)return{row:t.getCurrentTokenRow(),column:o+t.getCurrentTokenColumn()}}else l==a&&(i+=1);o-=1}do e=t.stepBackward();while(e&&!r.test(e.type));if(e==null)break;s=e.value,o=s.length-1}return null}},this.$findClosingBracket=function(a,c,r){var n=this.$brackets[a],i=1,t=new x(this,c.row,c.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){r||(r=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var o=c.column-t.getCurrentTokenColumn();;){for(var s=e.value,l=s.length;o<l;){var h=s.charAt(o);if(h==n){if(i-=1,i==0)return{row:t.getCurrentTokenRow(),column:o+t.getCurrentTokenColumn()}}else h==a&&(i+=1);o+=1}do e=t.stepForward();while(e&&!r.test(e.type));if(e==null)break;o=0}return null}},this.getMatchingTags=function(a){var c=new x(this,a.row,a.column),r=this.$findTagName(c);if(r){var n=c.stepBackward();return n.value==="<"?this.$findClosingTag(c,r):this.$findOpeningTag(c,r)}},this.$findTagName=function(a){var c=a.getCurrentToken(),r=!1,n=!1;if(c&&c.type.indexOf("tag-name")===-1)do n?c=a.stepBackward():c=a.stepForward(),c&&(c.value==="/>"?n=!0:c.type.indexOf("tag-name")!==-1&&(r=!0));while(c&&!r);return c},this.$findClosingTag=function(a,c){var r,n=c.value,i=c.value,t=0,e=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);c=a.stepForward();var o=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+c.value.length),s=!1;do if(r=c,c=a.stepForward(),c){if(c.value===">"&&!s){var l=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(c.type.indexOf("tag-name")!==-1){if(n=c.value,i===n){if(r.value==="<")t++;else if(r.value==="</"&&(t--,t<0)){a.stepBackward();var h=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2);c=a.stepForward();var S=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+c.value.length);if(c=a.stepForward(),c&&c.value===">")var p=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(i===n&&c.value==="/>"&&(t--,t<0))var h=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),S=h,p=S,l=new L(o.end.row,o.end.column,o.end.row,o.end.column+1)}while(c&&t>=0);if(e&&l&&h&&p&&o&&S)return{openTag:new L(e.start.row,e.start.column,l.end.row,l.end.column),closeTag:new L(h.start.row,h.start.column,p.end.row,p.end.column),openTagName:o,closeTagName:S}},this.$findOpeningTag=function(a,c){var r=a.getCurrentToken(),n=c.value,i=0,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),o=e+2,s=new L(t,e,t,o);a.stepForward();var l=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+c.value.length);if(c=a.stepForward(),!(!c||c.value!==">")){var h=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(c=r,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),o=e+c.value.length,r=a.stepBackward(),c){if(c.type.indexOf("tag-name")!==-1){if(n===c.value)if(r.value==="<"){if(i++,i>0){var S=new L(t,e,t,o),p=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do c=a.stepForward();while(c&&c.value!==">");var f=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else r.value==="</"&&i--}else if(c.value==="/>"){for(var d=0,$=r;$;){if($.type.indexOf("tag-name")!==-1&&$.value===n){i--;break}else if($.value==="<")break;$=a.stepBackward(),d++}for(var A=0;A<d;A++)a.stepForward()}}while(r&&i<=0);if(p&&f&&s&&h&&S&&l)return{openTag:new L(p.start.row,p.start.column,f.end.row,f.end.column),closeTag:new L(s.start.row,s.start.column,h.end.row,h.end.column),openTagName:S,closeTagName:l}}}}M.BracketMatch=b}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(R,M,P){var x=R("./lib/oop"),L=R("./lib/lang"),b=R("./bidihandler").BidiHandler,a=R("./config"),c=R("./lib/event_emitter").EventEmitter,r=R("./selection").Selection,n=R("./mode/text").Mode,i=R("./range").Range,t=R("./document").Document,e=R("./background_tokenizer").BackgroundTokenizer,o=R("./search_highlight").SearchHighlight,s=R("./undomanager").UndoManager,l=function(){function y(m,g){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++y.$uid,this.$foldData.toString=function(){return this.join(` |
| 226 |
`)},this.bgTokenizer=new e(new n().getTokenizer(),this);var u=this;this.bgTokenizer.on("update",function(v){u._signal("tokenizerUpdate",v)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof m!="object"||!m.getLine)&&(m=new t(m)),this.setDocument(m),this.selection=new r(this),this.$bidiHandler=new b(this),a.resetOptions(this),this.setMode(g),a._signal("session",this),this.destroyed=!1}return y.prototype.setDocument=function(m){this.doc&&this.doc.off("change",this.$onChange),this.doc=m,m.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},y.prototype.getDocument=function(){return this.doc},y.prototype.$resetRowCache=function(m){if(!m){this.$docRowCache=[],this.$screenRowCache=[];return}var g=this.$docRowCache.length,u=this.$getRowCacheIndex(this.$docRowCache,m)+1;g>u&&(this.$docRowCache.splice(u,g),this.$screenRowCache.splice(u,g))},y.prototype.$getRowCacheIndex=function(m,g){for(var u=0,v=m.length-1;u<=v;){var C=u+v>>1,E=m[C];if(g>E)u=C+1;else if(g<E)v=C-1;else return C}return u-1},y.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},y.prototype.onChangeFold=function(m){var g=m.data;this.$resetRowCache(g.start.row)},y.prototype.onChange=function(m){this.$modified=!0,this.$bidiHandler.onChange(m),this.$resetRowCache(m.start.row);var g=this.$updateInternalDataOnChange(m);!this.$fromUndo&&this.$undoManager&&(g&&g.length&&(this.$undoManager.add({action:"removeFolds",folds:g},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(m,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(m),this._signal("change",m)},y.prototype.setValue=function(m){this.doc.setValue(m),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},y.fromJSON=function(m){typeof m=="string"&&(m=JSON.parse(m));var g=new s;g.$undoStack=m.history.undo,g.$redoStack=m.history.redo,g.mark=m.history.mark,g.$rev=m.history.rev;var u=new y(m.value);return m.folds.forEach(function(v){u.addFold("...",i.fromPoints(v.start,v.end))}),u.setAnnotations(m.annotations),u.setBreakpoints(m.breakpoints),u.setMode(m.mode),u.setScrollLeft(m.scrollLeft),u.setScrollTop(m.scrollTop),u.setUndoManager(g),u.selection.fromJSON(m.selection),u},y.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(m){return m.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},y.prototype.toString=function(){return this.doc.getValue()},y.prototype.getSelection=function(){return this.selection},y.prototype.getState=function(m){return this.bgTokenizer.getState(m)},y.prototype.getTokens=function(m){return this.bgTokenizer.getTokens(m)},y.prototype.getTokenAt=function(m,g){var u=this.bgTokenizer.getTokens(m),v,C=0;if(g==null){var E=u.length-1;C=this.getLine(m).length}else for(var E=0;E<u.length&&(C+=u[E].value.length,!(C>=g));E++);return v=u[E],v?(v.index=E,v.start=C-v.value.length,v):null},y.prototype.setUndoManager=function(m){if(this.$undoManager=m,this.$informUndoManager&&this.$informUndoManager.cancel(),m){var g=this;m.addSession(this),this.$syncInformUndoManager=function(){g.$informUndoManager.cancel(),g.mergeUndoDeltas=!1},this.$informUndoManager=L.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},y.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},y.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},y.prototype.getTabString=function(){return this.getUseSoftTabs()?L.stringRepeat(" ",this.getTabSize()):" "},y.prototype.setUseSoftTabs=function(m){this.setOption("useSoftTabs",m)},y.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},y.prototype.setTabSize=function(m){this.setOption("tabSize",m)},y.prototype.getTabSize=function(){return this.$tabSize},y.prototype.isTabStop=function(m){return this.$useSoftTabs&&m.column%this.$tabSize===0},y.prototype.setNavigateWithinSoftTabs=function(m){this.setOption("navigateWithinSoftTabs",m)},y.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},y.prototype.setOverwrite=function(m){this.setOption("overwrite",m)},y.prototype.getOverwrite=function(){return this.$overwrite},y.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},y.prototype.addGutterDecoration=function(m,g){this.$decorations[m]||(this.$decorations[m]=""),this.$decorations[m]+=" "+g,this._signal("changeBreakpoint",{})},y.prototype.removeGutterDecoration=function(m,g){this.$decorations[m]=(this.$decorations[m]||"").replace(" "+g,""),this._signal("changeBreakpoint",{})},y.prototype.getBreakpoints=function(){return this.$breakpoints},y.prototype.setBreakpoints=function(m){this.$breakpoints=[];for(var g=0;g<m.length;g++)this.$breakpoints[m[g]]="ace_breakpoint";this._signal("changeBreakpoint",{})},y.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},y.prototype.setBreakpoint=function(m,g){g===void 0&&(g="ace_breakpoint"),g?this.$breakpoints[m]=g:delete this.$breakpoints[m],this._signal("changeBreakpoint",{})},y.prototype.clearBreakpoint=function(m){delete this.$breakpoints[m],this._signal("changeBreakpoint",{})},y.prototype.addMarker=function(m,g,u,v){var C=this.$markerId++,E={range:m,type:u||"line",renderer:typeof u=="function"?u:null,clazz:g,inFront:!!v,id:C};return v?(this.$frontMarkers[C]=E,this._signal("changeFrontMarker")):(this.$backMarkers[C]=E,this._signal("changeBackMarker")),C},y.prototype.addDynamicMarker=function(m,g){if(m.update){var u=this.$markerId++;return m.id=u,m.inFront=!!g,g?(this.$frontMarkers[u]=m,this._signal("changeFrontMarker")):(this.$backMarkers[u]=m,this._signal("changeBackMarker")),m}},y.prototype.removeMarker=function(m){var g=this.$frontMarkers[m]||this.$backMarkers[m];if(g){var u=g.inFront?this.$frontMarkers:this.$backMarkers;delete u[m],this._signal(g.inFront?"changeFrontMarker":"changeBackMarker")}},y.prototype.getMarkers=function(m){return m?this.$frontMarkers:this.$backMarkers},y.prototype.highlight=function(m){if(!this.$searchHighlight){var g=new o(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(g)}this.$searchHighlight.setRegexp(m)},y.prototype.highlightLines=function(m,g,u,v){typeof g!="number"&&(u=g,g=m),u||(u="ace_step");var C=new i(m,0,g,1/0);return C.id=this.addMarker(C,u,"fullLine",v),C},y.prototype.setAnnotations=function(m){this.$annotations=m,this._signal("changeAnnotation",{})},y.prototype.getAnnotations=function(){return this.$annotations||[]},y.prototype.clearAnnotations=function(){this.setAnnotations([])},y.prototype.$detectNewLine=function(m){var g=m.match(/^.*?(\r?\n)/m);g?this.$autoNewLine=g[1]:this.$autoNewLine=` |
| 227 |
`},y.prototype.getWordRange=function(m,g){var u=this.getLine(m),v=!1;if(g>0&&(v=!!u.charAt(g-1).match(this.tokenRe)),v||(v=!!u.charAt(g).match(this.tokenRe)),v)var C=this.tokenRe;else if(/^\s+$/.test(u.slice(g-1,g+1)))var C=/\s/;else var C=this.nonTokenRe;var E=g;if(E>0){do E--;while(E>=0&&u.charAt(E).match(C));E++}for(var T=g;T<u.length&&u.charAt(T).match(C);)T++;return new i(m,E,m,T)},y.prototype.getAWordRange=function(m,g){for(var u=this.getWordRange(m,g),v=this.getLine(u.end.row);v.charAt(u.end.column).match(/[ \t]/);)u.end.column+=1;return u},y.prototype.setNewLineMode=function(m){this.doc.setNewLineMode(m)},y.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},y.prototype.setUseWorker=function(m){this.setOption("useWorker",m)},y.prototype.getUseWorker=function(){return this.$useWorker},y.prototype.onReloadTokenizer=function(m){var g=m.data;this.bgTokenizer.start(g.first),this._signal("tokenizerUpdate",m)},y.prototype.setMode=function(m,g){if(m&&typeof m=="object"){if(m.getTokenizer)return this.$onChangeMode(m);var u=m,v=u.path}else v=m||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new n),this.$modes[v]&&!u){this.$onChangeMode(this.$modes[v]),g&&g();return}this.$modeId=v,a.loadModule(["mode",v],function(C){if(this.$modeId!==v)return g&&g();this.$modes[v]&&!u?this.$onChangeMode(this.$modes[v]):C&&C.Mode&&(C=new C.Mode(u),u||(this.$modes[v]=C,C.$id=v),this.$onChangeMode(C)),g&&g()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},y.prototype.$onChangeMode=function(m,g){if(g||(this.$modeId=m.$id),this.$mode!==m){var u=this.$mode;this.$mode=m,this.$stopWorker(),this.$useWorker&&this.$startWorker();var v=m.getTokenizer();if(v.on!==void 0){var C=this.onReloadTokenizer.bind(this);v.on("update",C)}this.bgTokenizer.setTokenizer(v),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=m.tokenRe,this.nonTokenRe=m.nonTokenRe,g||(m.attachToSession&&m.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(m.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:u,mode:m}))}},y.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},y.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(m){a.warn("Could not load worker",m),this.$worker=null}},y.prototype.getMode=function(){return this.$mode},y.prototype.setScrollTop=function(m){this.$scrollTop===m||isNaN(m)||(this.$scrollTop=m,this._signal("changeScrollTop",m))},y.prototype.getScrollTop=function(){return this.$scrollTop},y.prototype.setScrollLeft=function(m){this.$scrollLeft===m||isNaN(m)||(this.$scrollLeft=m,this._signal("changeScrollLeft",m))},y.prototype.getScrollLeft=function(){return this.$scrollLeft},y.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},y.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var m=0;return this.lineWidgets.forEach(function(g){g&&g.screenWidth>m&&(m=g.screenWidth)}),this.lineWidgetWidth=m},y.prototype.$computeWidth=function(m){if(this.$modified||m){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var g=this.doc.getAllLines(),u=this.$rowLengthCache,v=0,C=0,E=this.$foldData[C],T=E?E.start.row:1/0,_=g.length,I=0;I<_;I++){if(I>T){if(I=E.end.row+1,I>=_)break;E=this.$foldData[C++],T=E?E.start.row:1/0}u[I]==null&&(u[I]=this.$getStringScreenWidth(g[I])[0]),u[I]>v&&(v=u[I])}this.screenWidth=v}},y.prototype.getLine=function(m){return this.doc.getLine(m)},y.prototype.getLines=function(m,g){return this.doc.getLines(m,g)},y.prototype.getLength=function(){return this.doc.getLength()},y.prototype.getTextRange=function(m){return this.doc.getTextRange(m||this.selection.getRange())},y.prototype.insert=function(m,g){return this.doc.insert(m,g)},y.prototype.remove=function(m){return this.doc.remove(m)},y.prototype.removeFullLines=function(m,g){return this.doc.removeFullLines(m,g)},y.prototype.undoChanges=function(m,g){if(m.length){this.$fromUndo=!0;for(var u=m.length-1;u!=-1;u--){var v=m[u];v.action=="insert"||v.action=="remove"?this.doc.revertDelta(v):v.folds&&this.addFolds(v.folds)}!g&&this.$undoSelect&&(m.selectionBefore?this.selection.fromJSON(m.selectionBefore):this.selection.setRange(this.$getUndoSelection(m,!0))),this.$fromUndo=!1}},y.prototype.redoChanges=function(m,g){if(m.length){this.$fromUndo=!0;for(var u=0;u<m.length;u++){var v=m[u];(v.action=="insert"||v.action=="remove")&&this.doc.$safeApplyDelta(v)}!g&&this.$undoSelect&&(m.selectionAfter?this.selection.fromJSON(m.selectionAfter):this.selection.setRange(this.$getUndoSelection(m,!1))),this.$fromUndo=!1}},y.prototype.setUndoSelect=function(m){this.$undoSelect=m},y.prototype.$getUndoSelection=function(m,g){function u(_){return g?_.action!=="insert":_.action==="insert"}for(var v,C,E=0;E<m.length;E++){var T=m[E];if(T.start){if(!v){u(T)?v=i.fromPoints(T.start,T.end):v=i.fromPoints(T.start,T.start);continue}u(T)?(C=T.start,v.compare(C.row,C.column)==-1&&v.setStart(C),C=T.end,v.compare(C.row,C.column)==1&&v.setEnd(C)):(C=T.start,v.compare(C.row,C.column)==-1&&(v=i.fromPoints(T.start,T.start)))}}return v},y.prototype.replace=function(m,g){return this.doc.replace(m,g)},y.prototype.moveText=function(m,g,u){var v=this.getTextRange(m),C=this.getFoldsInRange(m),E=i.fromPoints(g,g);if(!u){this.remove(m);var T=m.start.row-m.end.row,_=T?-m.end.column:m.start.column-m.end.column;_&&(E.start.row==m.end.row&&E.start.column>m.end.column&&(E.start.column+=_),E.end.row==m.end.row&&E.end.column>m.end.column&&(E.end.column+=_)),T&&E.start.row>=m.end.row&&(E.start.row+=T,E.end.row+=T)}if(E.end=this.insert(E.start,v),C.length){var I=m.start,F=E.start,T=F.row-I.row,_=F.column-I.column;this.addFolds(C.map(function(O){return O=O.clone(),O.start.row==I.row&&(O.start.column+=_),O.end.row==I.row&&(O.end.column+=_),O.start.row+=T,O.end.row+=T,O}))}return E},y.prototype.indentRows=function(m,g,u){u=u.replace(/\t/g,this.getTabString());for(var v=m;v<=g;v++)this.doc.insertInLine({row:v,column:0},u)},y.prototype.outdentRows=function(m){for(var g=m.collapseRows(),u=new i(0,0,0,0),v=this.getTabSize(),C=g.start.row;C<=g.end.row;++C){var E=this.getLine(C);u.start.row=C,u.end.row=C;for(var T=0;T<v&&E.charAt(T)==" ";++T);T<v&&E.charAt(T)==" "?(u.start.column=T,u.end.column=T+1):(u.start.column=0,u.end.column=T),this.remove(u)}},y.prototype.$moveLines=function(m,g,u){if(m=this.getRowFoldStart(m),g=this.getRowFoldEnd(g),u<0){var v=this.getRowFoldStart(m+u);if(v<0)return 0;var C=v-m}else if(u>0){var v=this.getRowFoldEnd(g+u);if(v>this.doc.getLength()-1)return 0;var C=v-g}else{m=this.$clipRowToDocument(m),g=this.$clipRowToDocument(g);var C=g-m+1}var E=new i(m,0,g,Number.MAX_VALUE),T=this.getFoldsInRange(E).map(function(I){return I=I.clone(),I.start.row+=C,I.end.row+=C,I}),_=u==0?this.doc.getLines(m,g):this.doc.removeFullLines(m,g);return this.doc.insertFullLines(m+C,_),T.length&&this.addFolds(T),C},y.prototype.moveLinesUp=function(m,g){return this.$moveLines(m,g,-1)},y.prototype.moveLinesDown=function(m,g){return this.$moveLines(m,g,1)},y.prototype.duplicateLines=function(m,g){return this.$moveLines(m,g,0)},y.prototype.$clipRowToDocument=function(m){return Math.max(0,Math.min(m,this.doc.getLength()-1))},y.prototype.$clipColumnToRow=function(m,g){return g<0?0:Math.min(this.doc.getLine(m).length,g)},y.prototype.$clipPositionToDocument=function(m,g){if(g=Math.max(0,g),m<0)m=0,g=0;else{var u=this.doc.getLength();m>=u?(m=u-1,g=this.doc.getLine(u-1).length):g=Math.min(this.doc.getLine(m).length,g)}return{row:m,column:g}},y.prototype.$clipRangeToDocument=function(m){m.start.row<0?(m.start.row=0,m.start.column=0):m.start.column=this.$clipColumnToRow(m.start.row,m.start.column);var g=this.doc.getLength()-1;return m.end.row>g?(m.end.row=g,m.end.column=this.doc.getLine(g).length):m.end.column=this.$clipColumnToRow(m.end.row,m.end.column),m},y.prototype.setUseWrapMode=function(m){if(m!=this.$useWrapMode){if(this.$useWrapMode=m,this.$modified=!0,this.$resetRowCache(0),m){var g=this.getLength();this.$wrapData=Array(g),this.$updateWrapData(0,g-1)}this._signal("changeWrapMode")}},y.prototype.getUseWrapMode=function(){return this.$useWrapMode},y.prototype.setWrapLimitRange=function(m,g){(this.$wrapLimitRange.min!==m||this.$wrapLimitRange.max!==g)&&(this.$wrapLimitRange={min:m,max:g},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},y.prototype.adjustWrapLimit=function(m,g){var u=this.$wrapLimitRange;u.max<0&&(u={min:g,max:g});var v=this.$constrainWrapLimit(m,u.min,u.max);return v!=this.$wrapLimit&&v>1?(this.$wrapLimit=v,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},y.prototype.$constrainWrapLimit=function(m,g,u){return g&&(m=Math.max(g,m)),u&&(m=Math.min(u,m)),m},y.prototype.getWrapLimit=function(){return this.$wrapLimit},y.prototype.setWrapLimit=function(m){this.setWrapLimitRange(m,m)},y.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},y.prototype.$updateInternalDataOnChange=function(m){var g=this.$useWrapMode,u=m.action,v=m.start,C=m.end,E=v.row,T=C.row,_=T-E,I=null;if(this.$updating=!0,_!=0)if(u==="remove"){this[g?"$wrapData":"$rowLengthCache"].splice(E,_);var F=this.$foldData;I=this.getFoldsInRange(m),this.removeFolds(I);var H=this.getFoldLine(C.row),D=0;if(H){H.addRemoveChars(C.row,C.column,v.column-C.column),H.shiftRow(-_);var O=this.getFoldLine(E);O&&O!==H&&(O.merge(H),H=O),D=F.indexOf(H)+1}for(D;D<F.length;D++){var H=F[D];H.start.row>=C.row&&H.shiftRow(-_)}T=E}else{var W=Array(_);W.unshift(E,0);var B=g?this.$wrapData:this.$rowLengthCache;B.splice.apply(B,W);var F=this.$foldData,H=this.getFoldLine(E),D=0;if(H){var z=H.range.compareInside(v.row,v.column);z==0?(H=H.split(v.row,v.column),H&&(H.shiftRow(_),H.addRemoveChars(T,0,C.column-v.column))):z==-1&&(H.addRemoveChars(E,0,C.column-v.column),H.shiftRow(_)),D=F.indexOf(H)+1}for(D;D<F.length;D++){var H=F[D];H.start.row>=E&&H.shiftRow(_)}}else{_=Math.abs(m.start.column-m.end.column),u==="remove"&&(I=this.getFoldsInRange(m),this.removeFolds(I),_=-_);var H=this.getFoldLine(E);H&&H.addRemoveChars(E,v.column,_)}return g&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,g?this.$updateWrapData(E,T):this.$updateRowLengthCache(E,T),I},y.prototype.$updateRowLengthCache=function(m,g){this.$rowLengthCache[m]=null,this.$rowLengthCache[g]=null},y.prototype.$updateWrapData=function(m,g){var u=this.doc.getAllLines(),v=this.getTabSize(),C=this.$wrapData,E=this.$wrapLimit,T,_,I=m;for(g=Math.min(g,u.length-1);I<=g;)_=this.getFoldLine(I,_),_?(T=[],_.walk(function(F,H,D,O){var W;if(F!=null){W=this.$getDisplayTokens(F,T.length),W[0]=p;for(var B=1;B<W.length;B++)W[B]=f}else W=this.$getDisplayTokens(u[H].substring(O,D),T.length);T=T.concat(W)}.bind(this),_.end.row,u[_.end.row].length+1),C[_.start.row]=this.$computeWrapSplits(T,E,v),I=_.end.row+1):(T=this.$getDisplayTokens(u[I]),C[I]=this.$computeWrapSplits(T,E,v),I++)},y.prototype.$computeWrapSplits=function(m,g,u){if(m.length==0)return[];var v=[],C=m.length,E=0,T=0,_=this.$wrapAsCode,I=this.$indentedSoftWrap,F=g<=Math.max(2*u,8)||I===!1?0:Math.floor(g/2);function H(){var z=0;if(F===0)return z;if(I)for(var V=0;V<m.length;V++){var U=m[V];if(U==$)z+=1;else if(U==A)z+=u;else{if(U==w)continue;break}}return _&&I!==!1&&(z+=u),Math.min(z,F)}function D(z){for(var V=z-E,U=E;U<z;U++){var G=m[U];(G===12||G===2)&&(V-=1)}v.length||(O=H(),v.indent=O),T+=V,v.push(T),E=z}for(var O=0;C-E>g-O;){var W=E+g-O;if(m[W-1]>=$&&m[W]>=$){D(W);continue}if(m[W]==p||m[W]==f){for(W;W!=E-1&&m[W]!=p;W--);if(W>E){D(W);continue}for(W=E+g,W;W<m.length&&m[W]==f;W++);if(W==m.length)break;D(W);continue}for(var B=Math.max(W-(g-(g>>2)),E-1);W>B&&m[W]<p;)W--;if(_){for(;W>B&&m[W]<p;)W--;for(;W>B&&m[W]==d;)W--}else for(;W>B&&m[W]<$;)W--;if(W>B){D(++W);continue}W=E+g,m[W]==S&&W--,D(W-O)}return v},y.prototype.$getDisplayTokens=function(m,g){var u=[],v;g=g||0;for(var C=0;C<m.length;C++){var E=m.charCodeAt(C);if(E==9){v=this.getScreenTabSize(u.length+g),u.push(A);for(var T=1;T<v;T++)u.push(w)}else E==32?u.push($):E>39&&E<48||E>57&&E<64?u.push(d):E>=4352&&k(E)?u.push(h,S):u.push(h)}return u},y.prototype.$getStringScreenWidth=function(m,g,u){if(g==0)return[0,0];g==null&&(g=1/0),u=u||0;var v,C;for(C=0;C<m.length&&(v=m.charCodeAt(C),v==9?u+=this.getScreenTabSize(u):v>=4352&&k(v)?u+=2:u+=1,!(u>g));C++);return[u,C]},y.prototype.getRowLength=function(m){var g=1;return this.lineWidgets&&(g+=this.lineWidgets[m]&&this.lineWidgets[m].rowCount||0),!this.$useWrapMode||!this.$wrapData[m]?g:this.$wrapData[m].length+g},y.prototype.getRowLineCount=function(m){return!this.$useWrapMode||!this.$wrapData[m]?1:this.$wrapData[m].length+1},y.prototype.getRowWrapIndent=function(m){if(this.$useWrapMode){var g=this.screenToDocumentPosition(m,Number.MAX_VALUE),u=this.$wrapData[g.row];return u.length&&u[0]<g.column?u.indent:0}else return 0},y.prototype.getScreenLastRowColumn=function(m){var g=this.screenToDocumentPosition(m,Number.MAX_VALUE);return this.documentToScreenColumn(g.row,g.column)},y.prototype.getDocumentLastRowColumn=function(m,g){var u=this.documentToScreenRow(m,g);return this.getScreenLastRowColumn(u)},y.prototype.getDocumentLastRowColumnPosition=function(m,g){var u=this.documentToScreenRow(m,g);return this.screenToDocumentPosition(u,Number.MAX_VALUE/10)},y.prototype.getRowSplitData=function(m){if(this.$useWrapMode)return this.$wrapData[m]},y.prototype.getScreenTabSize=function(m){return this.$tabSize-(m%this.$tabSize|0)},y.prototype.screenToDocumentRow=function(m,g){return this.screenToDocumentPosition(m,g).row},y.prototype.screenToDocumentColumn=function(m,g){return this.screenToDocumentPosition(m,g).column},y.prototype.screenToDocumentPosition=function(m,g,u){if(m<0)return{row:0,column:0};var v,C=0,E=0,T,_=0,I=0,F=this.$screenRowCache,H=this.$getRowCacheIndex(F,m),D=F.length;if(D&&H>=0)var _=F[H],C=this.$docRowCache[H],O=m>F[D-1];else var O=!D;for(var W=this.getLength()-1,B=this.getNextFoldLine(C),z=B?B.start.row:1/0;_<=m&&(I=this.getRowLength(C),!(_+I>m||C>=W));)_+=I,C++,C>z&&(C=B.end.row+1,B=this.getNextFoldLine(C,B),z=B?B.start.row:1/0),O&&(this.$docRowCache.push(C),this.$screenRowCache.push(_));if(B&&B.start.row<=C)v=this.getFoldDisplayLine(B),C=B.start.row;else{if(_+I<=m||C>W)return{row:W,column:this.getLine(W).length};v=this.getLine(C),B=null}var V=0,U=Math.floor(m-_);if(this.$useWrapMode){var G=this.$wrapData[C];G&&(T=G[U],U>0&&G.length&&(V=G.indent,E=G[U-1]||G[G.length-1],v=v.substring(E)))}return u!==void 0&&this.$bidiHandler.isBidiRow(_+U,C,U)&&(g=this.$bidiHandler.offsetToCol(u)),E+=this.$getStringScreenWidth(v,g-V)[1],this.$useWrapMode&&E>=T&&(E=T-1),B?B.idxToPosition(E):{row:C,column:E}},y.prototype.documentToScreenPosition=function(m,g){if(typeof g=="undefined")var u=this.$clipPositionToDocument(m.row,m.column);else u=this.$clipPositionToDocument(m,g);m=u.row,g=u.column;var v=0,C=null,E=null;E=this.getFoldAt(m,g,1),E&&(m=E.start.row,g=E.start.column);var T,_=0,I=this.$docRowCache,F=this.$getRowCacheIndex(I,m),H=I.length;if(H&&F>=0)var _=I[F],v=this.$screenRowCache[F],D=m>I[H-1];else var D=!H;for(var O=this.getNextFoldLine(_),W=O?O.start.row:1/0;_<m;){if(_>=W){if(T=O.end.row+1,T>m)break;O=this.getNextFoldLine(T,O),W=O?O.start.row:1/0}else T=_+1;v+=this.getRowLength(_),_=T,D&&(this.$docRowCache.push(_),this.$screenRowCache.push(v))}var B="";O&&_>=W?(B=this.getFoldDisplayLine(O,m,g),C=O.start.row):(B=this.getLine(m).substring(0,g),C=m);var z=0;if(this.$useWrapMode){var V=this.$wrapData[C];if(V){for(var U=0;B.length>=V[U];)v++,U++;B=B.substring(V[U-1]||0,B.length),z=U>0?V.indent:0}}return this.lineWidgets&&this.lineWidgets[_]&&this.lineWidgets[_].rowsAbove&&(v+=this.lineWidgets[_].rowsAbove),{row:v,column:z+this.$getStringScreenWidth(B)[0]}},y.prototype.documentToScreenColumn=function(m,g){return this.documentToScreenPosition(m,g).column},y.prototype.documentToScreenRow=function(m,g){return this.documentToScreenPosition(m,g).row},y.prototype.getScreenLength=function(){var m=0,g=null;if(this.$useWrapMode)for(var C=this.$wrapData.length,E=0,v=0,g=this.$foldData[v++],T=g?g.start.row:1/0;E<C;){var _=this.$wrapData[E];m+=_?_.length+1:1,E++,E>T&&(E=g.end.row+1,g=this.$foldData[v++],T=g?g.start.row:1/0)}else{m=this.getLength();for(var u=this.$foldData,v=0;v<u.length;v++)g=u[v],m-=g.end.row-g.start.row}return this.lineWidgets&&(m+=this.$getWidgetScreenLength()),m},y.prototype.$setFontMetrics=function(m){this.$enableVarChar&&(this.$getStringScreenWidth=function(g,u,v){if(u===0)return[0,0];u||(u=1/0),v=v||0;var C,E;for(E=0;E<g.length&&(C=g.charAt(E),C===" "?v+=this.getScreenTabSize(v):v+=m.getCharacterWidth(C),!(v>u));E++);return[v,E]})},y.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},y}();l.$uid=0,l.prototype.$modes=a.$modes,l.prototype.getValue=l.prototype.toString,l.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},l.prototype.$overwrite=!1,l.prototype.$mode=null,l.prototype.$modeId=null,l.prototype.$scrollTop=0,l.prototype.$scrollLeft=0,l.prototype.$wrapLimit=80,l.prototype.$useWrapMode=!1,l.prototype.$wrapLimitRange={min:null,max:null},l.prototype.lineWidgets=null,l.prototype.isFullWidth=k,x.implement(l.prototype,c);var h=1,S=2,p=3,f=4,d=9,$=10,A=11,w=12;function k(y){return y<4352?!1:y>=4352&&y<=4447||y>=4515&&y<=4519||y>=4602&&y<=4607||y>=9001&&y<=9002||y>=11904&&y<=11929||y>=11931&&y<=12019||y>=12032&&y<=12245||y>=12272&&y<=12283||y>=12288&&y<=12350||y>=12353&&y<=12438||y>=12441&&y<=12543||y>=12549&&y<=12589||y>=12593&&y<=12686||y>=12688&&y<=12730||y>=12736&&y<=12771||y>=12784&&y<=12830||y>=12832&&y<=12871||y>=12880&&y<=13054||y>=13056&&y<=19903||y>=19968&&y<=42124||y>=42128&&y<=42182||y>=43360&&y<=43388||y>=44032&&y<=55203||y>=55216&&y<=55238||y>=55243&&y<=55291||y>=63744&&y<=64255||y>=65040&&y<=65049||y>=65072&&y<=65106||y>=65108&&y<=65126||y>=65128&&y<=65131||y>=65281&&y<=65376||y>=65504&&y<=65510}R("./edit_session/folding").Folding.call(l.prototype),R("./edit_session/bracket_match").BracketMatch.call(l.prototype),a.defineOptions(l.prototype,"session",{wrap:{set:function(y){if(!y||y=="off"?y=!1:y=="free"?y=!0:y=="printMargin"?y=-1:typeof y=="string"&&(y=parseInt(y,10)||!1),this.$wrap!=y)if(this.$wrap=y,!y)this.setUseWrapMode(!1);else{var m=typeof y=="number"?y:null;this.setWrapLimitRange(m,m),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(y){y=y=="auto"?this.$mode.type!="text":y!="text",y!=this.$wrapAsCode&&(this.$wrapAsCode=y,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(y){this.$useWorker=y,this.$stopWorker(),y&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(y){y=parseInt(y),y>0&&this.$tabSize!==y&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=y,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(y){this.setFoldStyle(y)},handlesSet:!0},overwrite:{set:function(y){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(y){this.doc.setNewLineMode(y)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(y){this.setMode(y)},get:function(){return this.$modeId},handlesSet:!0}}),M.EditSession=l}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(R,M,P){var x=R("./lib/lang"),L=R("./lib/oop"),b=R("./range").Range,a=function(){function r(){this.$options={}}return r.prototype.set=function(n){return L.mixin(this.$options,n),this},r.prototype.getOptions=function(){return x.copyObject(this.$options)},r.prototype.setOptions=function(n){this.$options=n},r.prototype.find=function(n){var i=this.$options,t=this.$matchIterator(n,i);if(!t)return!1;var e=null;return t.forEach(function(o,s,l,h){return e=new b(o,s,l,h),s==h&&i.start&&i.start.start&&i.skipCurrent!=!1&&e.isEqual(i.start)?(e=null,!1):!0}),e},r.prototype.findAll=function(n){var i=this.$options;if(!i.needle)return[];this.$assembleRegExp(i);var t=i.range,e=t?n.getLines(t.start.row,t.end.row):n.doc.getAllLines(),o=[],s=i.re;if(i.$isMultiLine){var l=s.length,h=e.length-l,S;e:for(var p=s.offset||0;p<=h;p++){for(var f=0;f<l;f++)if(e[p+f].search(s[f])==-1)continue e;var d=e[p],$=e[p+l-1],A=d.length-d.match(s[0])[0].length,w=$.match(s[l-1])[0].length;S&&S.end.row===p&&S.end.column>A||(o.push(S=new b(p,A,p+l-1,w)),l>2&&(p=p+l-2))}}else for(var k=0;k<e.length;k++)for(var y=x.getMatchOffsets(e[k],s),f=0;f<y.length;f++){var m=y[f];o.push(new b(k,m.offset,k,m.offset+m.length))}if(t){for(var g=t.start.column,u=t.end.column,k=0,f=o.length-1;k<f&&o[k].start.column<g&&o[k].start.row==0;)k++;for(var v=t.end.row-t.start.row;k<f&&o[f].end.column>u&&o[f].end.row==v;)f--;for(o=o.slice(k,f+1),k=0,f=o.length;k<f;k++)o[k].start.row+=t.start.row,o[k].end.row+=t.start.row}return o},r.prototype.replace=function(n,i){var t=this.$options,e=this.$assembleRegExp(t);if(t.$isMultiLine)return i;if(e){var o=e.exec(n);if(!o||o[0].length!=n.length)return null;if(i=n.replace(e,i),t.preserveCase){i=i.split("");for(var s=Math.min(n.length,n.length);s--;){var l=n[s];l&&l.toLowerCase()!=l?i[s]=i[s].toUpperCase():i[s]=i[s].toLowerCase()}i=i.join("")}return i}},r.prototype.$assembleRegExp=function(n,i){if(n.needle instanceof RegExp)return n.re=n.needle;var t=n.needle;if(!n.needle)return n.re=!1;n.regExp||(t=x.escapeRegExp(t));var e=n.caseSensitive?"gm":"gmi";try{new RegExp(t,"u"),n.$supportsUnicodeFlag=!0,e+="u"}catch(s){n.$supportsUnicodeFlag=!1}if(n.wholeWord&&(t=c(t,n)),n.$isMultiLine=!i&&/[\n\r]/.test(t),n.$isMultiLine)return n.re=this.$assembleMultilineRegExp(t,e);try{var o=new RegExp(t,e)}catch(s){o=!1}return n.re=o},r.prototype.$assembleMultilineRegExp=function(n,i){for(var t=n.replace(/\r\n|\r|\n/g,`$ |
| 228 |
^`).split(` |
| 229 |
`),e=[],o=0;o<t.length;o++)try{e.push(new RegExp(t[o],i))}catch(s){return!1}return e},r.prototype.$matchIterator=function(n,i){var t=this.$assembleRegExp(i);if(!t)return!1;var e=i.backwards==!0,o=i.skipCurrent!=!1,s=t.unicode,l=i.range,h=i.start;h||(h=l?l[e?"end":"start"]:n.selection.getRange()),h.start&&(h=h[o!=e?"end":"start"]);var S=l?l.start.row:0,p=l?l.end.row:n.getLength()-1;if(e)var f=function(A){var w=h.row;if(!$(w,h.column,A)){for(w--;w>=S;w--)if($(w,Number.MAX_VALUE,A))return;if(i.wrap!=!1){for(w=p,S=h.row;w>=S;w--)if($(w,Number.MAX_VALUE,A))return}}};else var f=function(w){var k=h.row;if(!$(k,h.column,w)){for(k=k+1;k<=p;k++)if($(k,0,w))return;if(i.wrap!=!1){for(k=S,p=h.row;k<=p;k++)if($(k,0,w))return}}};if(i.$isMultiLine)var d=t.length,$=function(A,w,k){var y=e?A-d+1:A;if(!(y<0||y+d>n.getLength())){var m=n.getLine(y),g=m.search(t[0]);if(!(!e&&g<w||g===-1)){for(var u=1;u<d;u++)if(m=n.getLine(y+u),m.search(t[u])==-1)return;var v=m.match(t[d-1])[0].length;if(!(e&&v>w)&&k(y,g,y+d-1,v))return!0}}};else if(e)var $=function(w,k,y){var m=n.getLine(w),g=[],u,v=0;for(t.lastIndex=0;u=t.exec(m);){var C=u[0].length;if(v=u.index,!C){if(v>=m.length)break;t.lastIndex=v+=x.skipEmptyMatch(m,v,s)}if(u.index+C>k)break;g.push(u.index,C)}for(var E=g.length-1;E>=0;E-=2){var T=g[E-1],C=g[E];if(y(w,T,w,T+C))return!0}};else var $=function(w,k,y){var m=n.getLine(w),g,u;for(t.lastIndex=k;u=t.exec(m);){var v=u[0].length;if(g=u.index,y(w,g,w,g+v))return!0;if(!v&&(t.lastIndex=g+=x.skipEmptyMatch(m,g,s),g>=m.length))return!1}};return{forEach:f}},r}();function c(r,n){var i=x.supportsLookbehind();function t(l,h){h===void 0&&(h=!0);var S=i&&n.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return S.test(l)||n.regExp?i&&n.$supportsUnicodeFlag?h?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var e=Array.from(r),o=e[0],s=e[e.length-1];return t(o)+r+t(s,!1)}M.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(R,M,P){var x=this&&this.__extends||function(){var i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(o[l]=s[l])},i(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");i(t,e);function o(){this.constructor=t}t.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)}}(),L=R("../lib/keys"),b=R("../lib/useragent"),a=L.KEY_MODS,c=function(){function i(t,e){this.$init(t,e,!1)}return i.prototype.$init=function(t,e,o){this.platform=e||(b.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=o},i.prototype.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},i.prototype.removeCommand=function(t,e){var o=t&&(typeof t=="string"?t:t.name);t=this.commands[o],e||delete this.commands[o];var s=this.commandKeyBinding;for(var l in s){var h=s[l];if(h==t)delete s[l];else if(Array.isArray(h)){var S=h.indexOf(t);S!=-1&&(h.splice(S,1),h.length==1&&(s[l]=h[0]))}}},i.prototype.bindKey=function(t,e,o){if(typeof t=="object"&&t&&(o==null&&(o=t.position),t=t[this.platform]),!!t){if(typeof e=="function")return this.addCommand({exec:e,bindKey:t,name:e.name||t});t.split("|").forEach(function(s){var l="";if(s.indexOf(" ")!=-1){var h=s.split(/\s+/);s=h.pop(),h.forEach(function(f){var d=this.parseKeys(f),$=a[d.hashId]+d.key;l+=(l?" ":"")+$,this._addCommandToBinding(l,"chainKeys")},this),l+=" "}var S=this.parseKeys(s),p=a[S.hashId]+S.key;this._addCommandToBinding(l+p,e,o)},this)}},i.prototype._addCommandToBinding=function(t,e,o){var s=this.commandKeyBinding,l;if(!e)delete s[t];else if(!s[t]||this.$singleCommand)s[t]=e;else{Array.isArray(s[t])?(l=s[t].indexOf(e))!=-1&&s[t].splice(l,1):s[t]=[s[t]],typeof o!="number"&&(o=r(e));var h=s[t];for(l=0;l<h.length;l++){var S=h[l],p=r(S);if(p>o)break}h.splice(l,0,e)}},i.prototype.addCommands=function(t){t&&Object.keys(t).forEach(function(e){var o=t[e];if(o){if(typeof o=="string")return this.bindKey(o,e);typeof o=="function"&&(o={exec:o}),typeof o=="object"&&(o.name||(o.name=e),this.addCommand(o))}},this)},i.prototype.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},i.prototype.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},i.prototype._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},i.prototype.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(p){return p}),o=e.pop(),s=L[o];if(L.FUNCTION_KEYS[s])o=L.FUNCTION_KEYS[s].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:o.toUpperCase(),hashId:-1}}else return{key:o,hashId:-1};for(var l=0,h=e.length;h--;){var S=L.KEY_MODS[e[h]];if(S==null)return typeof console!="undefined"&&console.error("invalid modifier "+e[h]+" in "+t),!1;l|=S}return{key:o,hashId:l}},i.prototype.findKeyCommand=function(t,e){var o=a[t]+e;return this.commandKeyBinding[o]},i.prototype.handleKeyboard=function(t,e,o,s){if(!(s<0)){var l=a[e]+o,h=this.commandKeyBinding[l];return t.$keyChain&&(t.$keyChain+=" "+l,h=this.commandKeyBinding[t.$keyChain]||h),h&&(h=="chainKeys"||h[h.length-1]=="chainKeys")?(t.$keyChain=t.$keyChain||l,{command:"null"}):(t.$keyChain&&((!e||e==4)&&o.length==1?t.$keyChain=t.$keyChain.slice(0,-l.length-1):(e==-1||s>0)&&(t.$keyChain="")),{command:h})}},i.prototype.getStatusText=function(t,e){return e.$keyChain||""},i}();function r(i){return typeof i=="object"&&i.bindKey&&i.bindKey.position||(i.isDefault?-100:0)}var n=function(i){x(t,i);function t(e,o){var s=i.call(this,e,o)||this;return s.$singleCommand=!0,s}return t}(c);n.call=function(i,t,e){c.prototype.$init.call(i,t,e,!0)},c.call=function(i,t,e){c.prototype.$init.call(i,t,e,!1)},M.HashHandler=n,M.MultiHashHandler=c}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(R,M,P){var x=this&&this.__extends||function(){var r=function(n,i){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},r(n,i)};return function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");r(n,i);function t(){this.constructor=n}n.prototype=i===null?Object.create(i):(t.prototype=i.prototype,new t)}}(),L=R("../lib/oop"),b=R("../keyboard/hash_handler").MultiHashHandler,a=R("../lib/event_emitter").EventEmitter,c=function(r){x(n,r);function n(i,t){var e=r.call(this,t,i)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(o){return o.args?o.command.exec(o.editor,o.args,o.event,!1):o.command.exec(o.editor,{},o.event,!0)}),e}return n.prototype.exec=function(i,t,e){if(Array.isArray(i)){for(var o=i.length;o--;)if(this.exec(i[o],t,e))return!0;return!1}if(typeof i=="string"&&(i=this.commands[i]),!i||t&&t.$readOnly&&!i.readOnly||this.$checkCommandState!=!1&&i.isAvailable&&!i.isAvailable(t))return!1;var s={editor:t,command:i,args:e};return s.returnValue=this._emit("exec",s),this._signal("afterExec",s),s.returnValue!==!1},n.prototype.toggleRecording=function(i){if(!this.$inReplay)return i&&i._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(t){this.macro.push([t.command,t.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},n.prototype.replay=function(i){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(i);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,i):this.exec(t[0],i,t[1])},this)}finally{this.$inReplay=!1}}},n.prototype.trimMacro=function(i){return i.map(function(t){return typeof t[0]!="string"&&(t[0]=t[0].name),t[1]||(t=t[0]),t})},n}(b);L.implement(c.prototype,a),M.CommandManager=c}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(R,M,P){var x=R("../lib/lang"),L=R("../config"),b=R("../range").Range;function a(r,n){return{win:r,mac:n}}M.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(r){L.loadModule("ace/ext/settings_menu",function(n){n.init(r),r.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(r){L.loadModule("ace/ext/error_marker",function(n){n.showErrorMarker(r,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(r){L.loadModule("ace/ext/error_marker",function(n){n.showErrorMarker(r,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(r){r.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(r){r.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(r,n){typeof n=="number"&&!isNaN(n)&&r.gotoLine(n),r.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(r){r.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(r){r.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(r){r.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(r){r.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(r){r.session.foldAll(),r.session.unfold(r.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(r){r.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(r){r.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(r){r.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(r){L.loadModule("ace/ext/searchbox",function(n){n.Search(r)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(r){r.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(r){r.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(r){r.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(r){r.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(r,n){r.navigateUp(n.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(r){r.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(r){r.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(r){r.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(r,n){r.navigateDown(n.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(r){r.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(r){r.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(r){r.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(r){r.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(r,n){r.navigateLeft(n.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(r){r.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(r){r.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(r){r.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(r){r.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(r,n){r.navigateRight(n.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(r){r.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(r){r.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(r){r.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(r){r.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(r){r.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(r){r.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(r){r.renderer.scrollBy(0,-2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(r){r.renderer.scrollBy(0,2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(r){r.commands.toggleRecording(r)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(r){r.commands.replay(r)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(r){r.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(r){r.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(r){r.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(r){},readOnly:!0},{name:"cut",description:"Cut",exec:function(r){var n=r.$copyWithEmptySelection&&r.selection.isEmpty(),i=n?r.selection.getLineRange():r.selection.getRange();r._emit("cut",i),i.isEmpty()||r.session.remove(i),r.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(r,n){r.$handlePaste(n)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(r){r.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(r){r.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(r){r.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(r){r.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(r){r.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(r){r.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(r){r.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(r){L.loadModule("ace/ext/searchbox",function(n){n.Search(r,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(r){r.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(r){r.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(r){r.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(r){r.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(r){r.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(r){r.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(r){r.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(r){r.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(r){if(r.selection.isEmpty())r.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(r){r.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(r){r.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(r){var n=r.selection.getRange();n.start.column=0,r.session.remove(n)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(r){var n=r.selection.getRange();n.end.column=Number.MAX_VALUE,r.session.remove(n)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(r){r.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(r){r.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(r){r.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(r){r.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(r){r.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(r){r.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(r,n){r.insert(n)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(r,n){r.insert(x.stringRepeat(n.text||"",n.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(r){r.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(r){r.transposeLetters()},multiSelectAction:function(r){r.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(r){r.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(r){r.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(r){r.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(r){var n=r.selection.getRange();n.start.column=n.end.column=0,n.end.row++,r.selection.setRange(n,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(r){r.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(r){for(var n=r.selection.isBackwards(),i=n?r.selection.getSelectionLead():r.selection.getSelectionAnchor(),t=n?r.selection.getSelectionAnchor():r.selection.getSelectionLead(),e=r.session.doc.getLine(i.row).length,o=r.session.doc.getTextRange(r.selection.getRange()),s=o.replace(/\n\s*/," ").length,l=r.session.doc.getLine(i.row),h=i.row+1;h<=t.row+1;h++){var S=x.stringTrimLeft(x.stringTrimRight(r.session.doc.getLine(h)));S.length!==0&&(S=" "+S),l+=S}t.row+1<r.session.doc.getLength()-1&&(l+=r.session.doc.getNewLineCharacter()),r.clearSelection(),r.session.doc.replace(new b(i.row,0,t.row+2,0),l),s>0?(r.selection.moveCursorTo(i.row,i.column),r.selection.selectTo(i.row,i.column+s)):(e=r.session.doc.getLine(i.row).length>e?e+1:e,r.selection.moveCursorTo(i.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(r){var n=r.session.doc.getLength()-1,i=r.session.doc.getLine(n).length,t=r.selection.rangeList.ranges,e=[];t.length<1&&(t=[r.selection.getRange()]);for(var o=0;o<t.length;o++)o==t.length-1&&(t[o].end.row===n&&t[o].end.column===i||e.push(new b(t[o].end.row,t[o].end.column,n,i))),o===0?t[o].start.row===0&&t[o].start.column===0||e.push(new b(0,0,t[o].start.row,t[o].start.column)):e.push(new b(t[o-1].end.row,t[o-1].end.column,t[o].start.row,t[o].start.column));r.exitMultiSelectMode(),r.clearSelection();for(var o=0;o<e.length;o++)r.selection.addRange(e[o],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(r){r.selection.clearSelection(),r.navigateLineEnd(),r.insert(` |
| 230 |
`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(r){r.selection.clearSelection();var n=r.getCursorPosition();r.selection.moveTo(n.row-1,Number.MAX_VALUE),r.insert(` |
| 231 |
`),n.row===0&&r.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(r){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),r.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:a("F1","F1"),exec:function(r){r.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(r){r.prompt({$type:"modes"})},readOnly:!0}];for(var c=1;c<9;c++)M.commands.push({name:"foldToLevel"+c,description:"Fold To Level "+c,level:c,exec:function(r){r.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(R,M,P){var x=R("./lib/dom"),L=function(){function b(a){this.session=a,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return b.prototype.getRowLength=function(a){var c;return this.lineWidgets?c=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:c=0,!this.$useWrapMode||!this.$wrapData[a]?1+c:this.$wrapData[a].length+1+c},b.prototype.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(c){c&&c.rowCount&&!c.hidden&&(a+=c.rowCount)}),a},b.prototype.$onChangeEditor=function(a){this.attach(a.editor)},b.prototype.attach=function(a){a&&a.widgetManager&&a.widgetManager!=this&&a.widgetManager.detach(),this.editor!=a&&(this.detach(),this.editor=a,a&&(a.widgetManager=this,a.renderer.on("beforeRender",this.measureWidgets),a.renderer.on("afterRender",this.renderWidgets)))},b.prototype.detach=function(a){var c=this.editor;if(c){this.editor=null,c.widgetManager=null,c.renderer.off("beforeRender",this.measureWidgets),c.renderer.off("afterRender",this.renderWidgets);var r=this.session.lineWidgets;r&&r.forEach(function(n){n&&n.el&&n.el.parentNode&&(n._inDocument=!1,n.el.parentNode.removeChild(n.el))})}},b.prototype.updateOnFold=function(a,c){var r=c.lineWidgets;if(!(!r||!a.action)){for(var n=a.data,i=n.start.row,t=n.end.row,e=a.action=="add",o=i+1;o<t;o++)r[o]&&(r[o].hidden=e);r[t]&&(e?r[i]?r[t].hidden=e:r[i]=r[t]:(r[i]==r[t]&&(r[i]=void 0),r[t].hidden=e))}},b.prototype.updateOnChange=function(a){var c=this.session.lineWidgets;if(c){var r=a.start.row,n=a.end.row-r;if(n!==0)if(a.action=="remove"){var i=c.splice(r+1,n);!c[r]&&i[i.length-1]&&(c[r]=i.pop()),i.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var t=new Array(n);c[r]&&c[r].column!=null&&a.start.column>c[r].column&&r++,t.unshift(r,0),c.splice.apply(c,t),this.$updateRows()}}},b.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var c=!0;a.forEach(function(r,n){if(r)for(c=!1,r.row=n;r.$oldWidget;)r.$oldWidget.row=n,r=r.$oldWidget}),c&&(this.session.lineWidgets=null)}},b.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var c=this.session.lineWidgets[a.row];return c&&(a.$oldWidget=c,c.el&&c.el.parentNode&&(c.el.parentNode.removeChild(c.el),c._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},b.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var c=this.editor.renderer;a.html&&!a.el&&(a.el=x.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=x.createElement("div"),a.el.textContent=a.text),a.el&&(x.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&x.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex="5",c.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex="3"),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/c.layerConfig.lineHeight);var r=this.session.getFoldAt(a.row,0);if(a.$fold=r,r){var n=this.session.lineWidgets;a.row==r.end.row&&!n[r.start.row]?n[r.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,c),this.onWidgetChanged(a),a},b.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch(r){}if(this.session.lineWidgets){var c=this.session.lineWidgets[a.row];if(c==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;c;){if(c.$oldWidget==a){c.$oldWidget=a.$oldWidget;break}c=c.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},b.prototype.getWidgetsAtRow=function(a){for(var c=this.session.lineWidgets,r=c&&c[a],n=[];r;)n.push(r),r=r.$oldWidget;return n},b.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},b.prototype.measureWidgets=function(a,c){var r=this.session._changedWidgets,n=c.layerConfig;if(!(!r||!r.length)){for(var i=1/0,t=0;t<r.length;t++){var e=r[t];if(!(!e||!e.el)&&e.session==this.session){if(!e._inDocument){if(this.session.lineWidgets[e.row]!=e)continue;e._inDocument=!0,c.container.appendChild(e.el)}e.h=e.el.offsetHeight,e.fixedWidth||(e.w=e.el.offsetWidth,e.screenWidth=Math.ceil(e.w/n.characterWidth));var o=e.h/n.lineHeight;e.coverLine&&(o-=this.session.getRowLineCount(e.row),o<0&&(o=0)),e.rowCount!=o&&(e.rowCount=o,e.row<i&&(i=e.row))}}i!=1/0&&(this.session._emit("changeFold",{data:{start:{row:i}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},b.prototype.renderWidgets=function(a,c){var r=c.layerConfig,n=this.session.lineWidgets;if(n){for(var i=Math.min(this.firstRow,r.firstRow),t=Math.max(this.lastRow,r.lastRow,n.length);i>0&&!n[i];)i--;this.firstRow=r.firstRow,this.lastRow=r.lastRow,c.$cursorLayer.config=r;for(var e=i;e<=t;e++){var o=n[e];if(!(!o||!o.el)){if(o.hidden){o.el.style.top=-100-(o.pixelHeight||0)+"px";continue}o._inDocument||(o._inDocument=!0,c.container.appendChild(o.el));var s=c.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;o.coverLine||(s+=r.lineHeight*this.session.getRowLineCount(o.row)),o.el.style.top=s-r.offset+"px";var l=o.coverGutter?0:c.gutterWidth;o.fixedWidth||(l-=c.scrollLeft),o.el.style.left=l+"px",o.fullWidth&&o.screenWidth&&(o.el.style.minWidth=r.width+2*r.padding+"px"),o.fixedWidth?o.el.style.right=c.scrollBar.getWidth()+"px":o.el.style.right=""}}}},b}();M.LineWidgets=L}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(R,M,P){var x=R("../lib/keys"),L=R("../mouse/default_gutter_handler").GutterTooltip,b=function(){function c(r){this.editor=r,this.gutterLayer=r.renderer.$gutterLayer,this.element=r.renderer.$gutter,this.lines=r.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new L(this.editor)}return c.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},c.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},c.prototype.$onGutterKeyDown=function(r){if(this.annotationTooltip.isOpen){r.preventDefault(),r.keyCode===x.escape&&this.annotationTooltip.hideTooltip();return}if(r.target===this.element){if(r.keyCode!=x.enter)return;r.preventDefault();var n=this.editor.getCursorPosition().row;this.editor.isRowVisible(n)||this.editor.scrollToLine(n,!0,!0),setTimeout(function(){var i=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldWidget(i),e=this.$findNearestAnnotation(i);if(!(t===null&&e===null)){if(t===null&&e!==null){this.activeRowIndex=e,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(t!==null&&e===null){this.activeRowIndex=t,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(e-i)<Math.abs(t-i)){this.activeRowIndex=e,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else{this.activeRowIndex=t,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}.bind(this),10);return}this.$handleGutterKeyboardInteraction(r),setTimeout(function(){this.editor._signal("gutterkeydown",new a(r,this))}.bind(this),10)},c.prototype.$handleGutterKeyboardInteraction=function(r){if(r.keyCode===x.tab){r.preventDefault();return}if(r.keyCode===x.escape){r.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(r.keyCode===x.up){switch(r.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(r.keyCode===x.down){switch(r.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(r.keyCode===x.left){r.preventDefault(),this.$switchLane("annotation");return}if(r.keyCode===x.right){r.preventDefault(),this.$switchLane("fold");return}if(r.keyCode===x.enter||r.keyCode===x.space){switch(r.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var n=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),r),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==n&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(n),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var i=this.lines.cells[this.activeRowIndex].element.childNodes[2],t=i.getBoundingClientRect(),e=this.annotationTooltip.getElement().style;e.left=t.right+"px",e.top=t.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},c.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},c.prototype.$isFoldWidgetVisible=function(r){var n=this.editor.isRowFullyVisible(this.$rowIndexToRow(r)),i=this.$getFoldWidget(r).style.display!=="none";return n&&i},c.prototype.$isAnnotationVisible=function(r){var n=this.editor.isRowFullyVisible(this.$rowIndexToRow(r)),i=this.$getAnnotation(r).style.display!=="none";return n&&i},c.prototype.$getFoldWidget=function(r){var n=this.lines.get(r),i=n.element;return i.childNodes[1]},c.prototype.$getAnnotation=function(r){var n=this.lines.get(r),i=n.element;return i.childNodes[2]},c.prototype.$findNearestFoldWidget=function(r){if(this.$isFoldWidgetVisible(r))return r;for(var n=0;r-n>0||r+n<this.lines.getLength()-1;){if(n++,r-n>=0&&this.$isFoldWidgetVisible(r-n))return r-n;if(r+n<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(r+n))return r+n}return null},c.prototype.$findNearestAnnotation=function(r){if(this.$isAnnotationVisible(r))return r;for(var n=0;r-n>0||r+n<this.lines.getLength()-1;){if(n++,r-n>=0&&this.$isAnnotationVisible(r-n))return r-n;if(r+n<=this.lines.getLength()-1&&this.$isAnnotationVisible(r+n))return r+n}return null},c.prototype.$focusFoldWidget=function(r){if(r!=null){var n=this.$getFoldWidget(r);n.classList.add(this.editor.renderer.keyboardFocusClassName),n.focus()}},c.prototype.$focusAnnotation=function(r){if(r!=null){var n=this.$getAnnotation(r);n.classList.add(this.editor.renderer.keyboardFocusClassName),n.focus()}},c.prototype.$blurFoldWidget=function(r){var n=this.$getFoldWidget(r);n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur()},c.prototype.$blurAnnotation=function(r){var n=this.$getAnnotation(r);n.classList.remove(this.editor.renderer.keyboardFocusClassName),n.blur()},c.prototype.$moveFoldWidgetUp=function(){for(var r=this.activeRowIndex;r>0;)if(r--,this.$isFoldWidgetVisible(r)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusFoldWidget(this.activeRowIndex);return}},c.prototype.$moveFoldWidgetDown=function(){for(var r=this.activeRowIndex;r<this.lines.getLength()-1;)if(r++,this.$isFoldWidgetVisible(r)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusFoldWidget(this.activeRowIndex);return}},c.prototype.$moveAnnotationUp=function(){for(var r=this.activeRowIndex;r>0;)if(r--,this.$isAnnotationVisible(r)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);return}},c.prototype.$moveAnnotationDown=function(){for(var r=this.activeRowIndex;r<this.lines.getLength()-1;)if(r++,this.$isAnnotationVisible(r)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);return}},c.prototype.$switchLane=function(r){switch(r){case"annotation":if(this.activeLane==="annotation")break;var n=this.$findNearestAnnotation(this.activeRowIndex);if(n==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=n,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var i=this.$findNearestFoldWidget(this.activeRowIndex);if(i==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=i,this.$focusFoldWidget(this.activeRowIndex);break}},c.prototype.$rowIndexToRow=function(r){var n=this.lines.get(r);return n?n.row:null},c.prototype.$rowToRowIndex=function(r){for(var n=0;n<this.lines.getLength();n++){var i=this.lines.get(n);if(i.row==r)return n}return null},c}();M.GutterKeyboardHandler=b;var a=function(){function c(r,n){this.gutterKeyboardHandler=n,this.domEvent=r}return c.prototype.getKey=function(){return x.keyCodeToString(this.domEvent.keyCode)},c.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},c.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},c.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},c}();M.GutterKeyboardEvent=a}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(R,M,P){var x=this&&this.__values||function(g){var u=typeof Symbol=="function"&&Symbol.iterator,v=u&&g[u],C=0;if(v)return v.call(g);if(g&&typeof g.length=="number")return{next:function(){return g&&C>=g.length&&(g=void 0),{value:g&&g[C++],done:!g}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")},L=R("./lib/oop"),b=R("./lib/dom"),a=R("./lib/lang"),c=R("./lib/useragent"),r=R("./keyboard/textinput").TextInput,n=R("./mouse/mouse_handler").MouseHandler,i=R("./mouse/fold_handler").FoldHandler,t=R("./keyboard/keybinding").KeyBinding,e=R("./edit_session").EditSession,o=R("./search").Search,s=R("./range").Range,l=R("./lib/event_emitter").EventEmitter,h=R("./commands/command_manager").CommandManager,S=R("./commands/default_commands").commands,p=R("./config"),f=R("./token_iterator").TokenIterator,d=R("./line_widgets").LineWidgets,$=R("./keyboard/gutter_handler").GutterKeyboardHandler,A=R("./config").nls,w=R("./clipboard"),k=R("./lib/keys"),y=function(){function g(u,v,C){this.session,this.$toDestroy=[];var E=u.getContainerElement();this.container=E,this.renderer=u,this.id="editor"+ ++g.$uid,this.commands=new h(c.isMac?"mac":"win",S),typeof document=="object"&&(this.textInput=new r(u.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new n(this),new i(this)),this.keyBinding=new t(this),this.$search=new o().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(T,_){_._$emitInputEvent.schedule(31)}),this.setSession(v||C&&C.session||new e("")),p.resetOptions(this),C&&this.setOptions(C),p._signal("editor",this)}return g.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=a.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},g.prototype.startOperation=function(u){if(this.curOp){if(!u||this.curOp.command)return;this.prevOp=this.curOp}u||(this.previousCommand=null,u={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:u.command||{},args:u.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},g.prototype.endOperation=function(u){if(this.curOp&&this.session){if(u&&u.returnValue===!1||!this.session)return this.curOp=null;if(u==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var v=this.curOp.command,C=v&&v.scrollIntoView;if(C){switch(C){case"center-animate":C="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var E=this.selection.getRange(),T=this.renderer.layerConfig;(E.start.row>=T.lastRow||E.end.row<=T.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}C=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var _=this.selection.toJSON();this.curOp.selectionAfter=_,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(_),this.prevOp=this.curOp,this.curOp=null}},g.prototype.$historyTracker=function(u){if(this.$mergeUndoDeltas){var v=this.prevOp,C=this.$mergeableCommands,E=v.command&&u.command.name==v.command.name;if(u.command.name=="insertstring"){var T=u.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),E=E&&this.mergeNextCommand&&(!/\s/.test(T)||/\s/.test(v.args)),this.mergeNextCommand=!0}else E=E&&C.indexOf(u.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(E=!1),E?this.session.mergeUndoDeltas=!0:C.indexOf(u.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},g.prototype.setKeyboardHandler=function(u,v){if(u&&typeof u=="string"&&u!="ace"){this.$keybindingId=u;var C=this;p.loadModule(["keybinding",u],function(E){C.$keybindingId==u&&C.keyBinding.setKeyboardHandler(E&&E.handler),v&&v()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(u),v&&v()},g.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},g.prototype.setSession=function(u){if(this.session!=u){this.curOp&&this.endOperation(),this.curOp={};var v=this.session;if(v){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var C=this.session.getSelection();C.off("changeCursor",this.$onCursorChange),C.off("changeSelection",this.$onSelectionChange)}this.session=u,u?(this.$onDocumentChange=this.onDocumentChange.bind(this),u.on("change",this.$onDocumentChange),this.renderer.setSession(u),this.$onChangeMode=this.onChangeMode.bind(this),u.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),u.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),u.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),u.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),u.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),u.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=u.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(u)),this._signal("changeSession",{session:u,oldSession:v}),this.curOp=null,v&&v._signal("changeEditor",{oldEditor:this}),u&&u._signal("changeEditor",{editor:this}),u&&!u.destroyed&&u.bgTokenizer.scheduleStart()}},g.prototype.getSession=function(){return this.session},g.prototype.setValue=function(u,v){return this.session.doc.setValue(u),v?v==1?this.navigateFileEnd():v==-1&&this.navigateFileStart():this.selectAll(),u},g.prototype.getValue=function(){return this.session.getValue()},g.prototype.getSelection=function(){return this.selection},g.prototype.resize=function(u){this.renderer.onResize(u)},g.prototype.setTheme=function(u,v){this.renderer.setTheme(u,v)},g.prototype.getTheme=function(){return this.renderer.getTheme()},g.prototype.setStyle=function(u){this.renderer.setStyle(u)},g.prototype.unsetStyle=function(u){this.renderer.unsetStyle(u)},g.prototype.getFontSize=function(){return this.getOption("fontSize")||b.computedStyle(this.container).fontSize},g.prototype.setFontSize=function(u){this.setOption("fontSize",u)},g.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var u=this;this.$highlightPending=!0,setTimeout(function(){u.$highlightPending=!1;var v=u.session;if(!(!v||v.destroyed)){v.$bracketHighlight&&(v.$bracketHighlight.markerIds.forEach(function(O){v.removeMarker(O)}),v.$bracketHighlight=null);var C=u.getCursorPosition(),E=u.getKeyboardHandler(),T=E&&E.$getDirectionForHighlight&&E.$getDirectionForHighlight(u),_=v.getMatchingBracketRanges(C,T);if(!_){var I=new f(v,C.row,C.column),F=I.getCurrentToken();if(F&&/\b(?:tag-open|tag-name)/.test(F.type)){var H=v.getMatchingTags(C);H&&(_=[H.openTagName,H.closeTagName])}}if(!_&&v.$mode.getMatching&&(_=v.$mode.getMatching(u.session)),!_){u.getHighlightIndentGuides()&&u.renderer.$textLayer.$highlightIndentGuide();return}var D="ace_bracket";Array.isArray(_)?_.length==1&&(D="ace_error_bracket"):_=[_],_.length==2&&(s.comparePoints(_[0].end,_[1].start)==0?_=[s.fromPoints(_[0].start,_[1].end)]:s.comparePoints(_[0].start,_[1].end)==0&&(_=[s.fromPoints(_[1].start,_[0].end)])),v.$bracketHighlight={ranges:_,markerIds:_.map(function(O){return v.addMarker(O,D,"text")})},u.getHighlightIndentGuides()&&u.renderer.$textLayer.$highlightIndentGuide()}},50)}},g.prototype.focus=function(){this.textInput.focus()},g.prototype.isFocused=function(){return this.textInput.isFocused()},g.prototype.blur=function(){this.textInput.blur()},g.prototype.onFocus=function(u){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",u))},g.prototype.onBlur=function(u){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",u))},g.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},g.prototype.onDocumentChange=function(u){var v=this.session.$useWrapMode,C=u.start.row==u.end.row?u.end.row:1/0;this.renderer.updateLines(u.start.row,C,v),this._signal("change",u),this.$cursorChange()},g.prototype.onTokenizerUpdate=function(u){var v=u.data;this.renderer.updateLines(v.first,v.last)},g.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},g.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},g.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},g.prototype.$updateHighlightActiveLine=function(){var u=this.getSession(),v;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(v=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(v=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(v=!1)),u.$highlightLineMarker&&!v)u.removeMarker(u.$highlightLineMarker.id),u.$highlightLineMarker=null;else if(!u.$highlightLineMarker&&v){var C=new s(v.row,v.column,v.row,1/0);C.id=u.addMarker(C,"ace_active-line","screenLine"),u.$highlightLineMarker=C}else v&&(u.$highlightLineMarker.start.row=v.row,u.$highlightLineMarker.end.row=v.row,u.$highlightLineMarker.start.column=v.column,u._signal("changeBackMarker"))},g.prototype.onSelectionChange=function(u){var v=this.session;if(v.$selectionMarker&&v.removeMarker(v.$selectionMarker),v.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var C=this.selection.getRange(),E=this.getSelectionStyle();v.$selectionMarker=v.addMarker(C,"ace_selection",E)}var T=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(T),this._signal("changeSelection")},g.prototype.$getSelectionHighLightRegexp=function(){var u=this.session,v=this.getSelectionRange();if(!(v.isEmpty()||v.isMultiLine())){var C=v.start.column,E=v.end.column,T=u.getLine(v.start.row),_=T.substring(C,E);if(!(_.length>5e3||!/[\w\d]/.test(_))){var I=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:_}),F=T.substring(C-1,E+1);if(I.test(F))return I}}},g.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},g.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},g.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},g.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},g.prototype.onChangeMode=function(u){this.renderer.updateText(),this._emit("changeMode",u)},g.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},g.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},g.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},g.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},g.prototype.getCopyText=function(){var u=this.getSelectedText(),v=this.session.doc.getNewLineCharacter(),C=!1;if(!u&&this.$copyWithEmptySelection){C=!0;for(var E=this.selection.getAllRanges(),T=0;T<E.length;T++){var _=E[T];T&&E[T-1].start.row==_.start.row||(u+=this.session.getLine(_.start.row)+v)}}var I={text:u};return this._signal("copy",I),w.lineMode=C?I.text:!1,I.text},g.prototype.onCopy=function(){this.commands.exec("copy",this)},g.prototype.onCut=function(){this.commands.exec("cut",this)},g.prototype.onPaste=function(u,v){var C={text:u,event:v};this.commands.exec("paste",this,C)},g.prototype.$handlePaste=function(u){typeof u=="string"&&(u={text:u}),this._signal("paste",u);var v=u.text,C=v===w.lineMode,E=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)C?E.insert({row:this.selection.lead.row,column:0},v):this.insert(v);else if(C)this.selection.rangeList.ranges.forEach(function(D){E.insert({row:D.start.row,column:0},v)});else{var T=v.split(/\r\n|\r|\n/),_=this.selection.rangeList.ranges,I=T.length==2&&(!T[0]||!T[1]);if(T.length!=_.length||I)return this.commands.exec("insertstring",this,v);for(var F=_.length;F--;){var H=_[F];H.isEmpty()||E.remove(H),E.insert(H.start,T[F])}}},g.prototype.execCommand=function(u,v){return this.commands.exec(u,this,v)},g.prototype.insert=function(u,v){var C=this.session,E=C.getMode(),T=this.getCursorPosition();if(this.getBehavioursEnabled()&&!v){var _=E.transformAction(C.getState(T.row),"insertion",this,C,u);_&&(u!==_.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),u=_.text)}if(u==" "&&(u=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&u.indexOf(` |
| 232 |
`)==-1){var I=s.fromPoints(T,T);I.end.column+=u.length,this.session.remove(I)}}else{var I=this.getSelectionRange();T=this.session.remove(I),this.clearSelection()}if(u==` |
| 233 |
`||u==`\r |
| 234 |
`){var O=C.getLine(T.row);if(T.column>O.search(/\S|$/)){var F=O.substr(T.column).search(/\S|$/);C.doc.removeInLine(T.row,T.column,T.column+F)}}this.clearSelection();var H=T.column,D=C.getState(T.row),O=C.getLine(T.row),W=E.checkOutdent(D,O,u);if(C.insert(T,u),_&&_.selection&&(_.selection.length==2?this.selection.setSelectionRange(new s(T.row,H+_.selection[0],T.row,H+_.selection[1])):this.selection.setSelectionRange(new s(T.row+_.selection[0],_.selection[1],T.row+_.selection[2],_.selection[3]))),this.$enableAutoIndent){if(C.getDocument().isNewLine(u)){var B=E.getNextLineIndent(D,O.slice(0,T.column),C.getTabString());C.insert({row:T.row+1,column:0},B)}W&&E.autoOutdent(D,C,T.row)}},g.prototype.autoIndent=function(){for(var u=this.session,v=u.getMode(),C=this.selection.isEmpty()?[new s(0,0,u.doc.getLength()-1,0)]:this.selection.getAllRanges(),E="",T="",_="",I=u.getTabString(),F=0;F<C.length;F++)for(var H=C[F].start.row,D=C[F].end.row,O=H;O<=D;O++){O>0&&(E=u.getState(O-1),T=u.getLine(O-1),_=v.getNextLineIndent(E,T,I));var W=u.getLine(O),B=v.$getIndent(W);if(_!==B){if(B.length>0){var z=new s(O,0,O,B.length);u.remove(z)}_.length>0&&u.insert({row:O,column:0},_)}v.autoOutdent(E,u,O)}},g.prototype.onTextInput=function(u,v){if(!v)return this.keyBinding.onTextInput(u);this.startOperation({command:{name:"insertstring"}});var C=this.applyComposition.bind(this,u,v);this.selection.rangeCount?this.forEachSelection(C):C(),this.endOperation()},g.prototype.applyComposition=function(u,v){if(v.extendLeft||v.extendRight){var C=this.selection.getRange();C.start.column-=v.extendLeft,C.end.column+=v.extendRight,C.start.column<0&&(C.start.row--,C.start.column+=this.session.getLine(C.start.row).length+1),this.selection.setRange(C),!u&&!C.isEmpty()&&this.remove()}if((u||!this.selection.isEmpty())&&this.insert(u,!0),v.restoreStart||v.restoreEnd){var C=this.selection.getRange();C.start.column-=v.restoreStart,C.end.column-=v.restoreEnd,this.selection.setRange(C)}},g.prototype.onCommandKey=function(u,v,C){return this.keyBinding.onCommandKey(u,v,C)},g.prototype.setOverwrite=function(u){this.session.setOverwrite(u)},g.prototype.getOverwrite=function(){return this.session.getOverwrite()},g.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},g.prototype.setScrollSpeed=function(u){this.setOption("scrollSpeed",u)},g.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},g.prototype.setDragDelay=function(u){this.setOption("dragDelay",u)},g.prototype.getDragDelay=function(){return this.getOption("dragDelay")},g.prototype.setSelectionStyle=function(u){this.setOption("selectionStyle",u)},g.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},g.prototype.setHighlightActiveLine=function(u){this.setOption("highlightActiveLine",u)},g.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},g.prototype.setHighlightGutterLine=function(u){this.setOption("highlightGutterLine",u)},g.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},g.prototype.setHighlightSelectedWord=function(u){this.setOption("highlightSelectedWord",u)},g.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},g.prototype.setAnimatedScroll=function(u){this.renderer.setAnimatedScroll(u)},g.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},g.prototype.setShowInvisibles=function(u){this.renderer.setShowInvisibles(u)},g.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},g.prototype.setDisplayIndentGuides=function(u){this.renderer.setDisplayIndentGuides(u)},g.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},g.prototype.setHighlightIndentGuides=function(u){this.renderer.setHighlightIndentGuides(u)},g.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},g.prototype.setShowPrintMargin=function(u){this.renderer.setShowPrintMargin(u)},g.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},g.prototype.setPrintMarginColumn=function(u){this.renderer.setPrintMarginColumn(u)},g.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},g.prototype.setReadOnly=function(u){this.setOption("readOnly",u)},g.prototype.getReadOnly=function(){return this.getOption("readOnly")},g.prototype.setBehavioursEnabled=function(u){this.setOption("behavioursEnabled",u)},g.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},g.prototype.setWrapBehavioursEnabled=function(u){this.setOption("wrapBehavioursEnabled",u)},g.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},g.prototype.setShowFoldWidgets=function(u){this.setOption("showFoldWidgets",u)},g.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},g.prototype.setFadeFoldWidgets=function(u){this.setOption("fadeFoldWidgets",u)},g.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},g.prototype.remove=function(u){this.selection.isEmpty()&&(u=="left"?this.selection.selectLeft():this.selection.selectRight());var v=this.getSelectionRange();if(this.getBehavioursEnabled()){var C=this.session,E=C.getState(v.start.row),T=C.getMode().transformAction(E,"deletion",this,C,v);if(v.end.column===0){var _=C.getTextRange(v);if(_[_.length-1]==` |
| 235 |
`){var I=C.getLine(v.end.row);/^\s+$/.test(I)&&(v.end.column=I.length)}}T&&(v=T)}this.session.remove(v),this.clearSelection()},g.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},g.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},g.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},g.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var u=this.getSelectionRange();u.start.column==u.end.column&&u.start.row==u.end.row&&(u.end.column=0,u.end.row++),this.session.remove(u),this.clearSelection()},g.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var u=this.getCursorPosition();this.insert(` |
| 236 |
`),this.moveCursorToPosition(u)},g.prototype.setGhostText=function(u,v){this.session.widgetManager||(this.session.widgetManager=new d(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(u,v)},g.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},g.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var u=this.getCursorPosition(),v=u.column;if(v!==0){var C=this.session.getLine(u.row),E,T;v<C.length?(E=C.charAt(v)+C.charAt(v-1),T=new s(u.row,v-1,u.row,v+1)):(E=C.charAt(v-1)+C.charAt(v-2),T=new s(u.row,v-2,u.row,v)),this.session.replace(T,E),this.session.selection.moveToPosition(T.end)}}},g.prototype.toLowerCase=function(){var u=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var v=this.getSelectionRange(),C=this.session.getTextRange(v);this.session.replace(v,C.toLowerCase()),this.selection.setSelectionRange(u)},g.prototype.toUpperCase=function(){var u=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var v=this.getSelectionRange(),C=this.session.getTextRange(v);this.session.replace(v,C.toUpperCase()),this.selection.setSelectionRange(u)},g.prototype.indent=function(){var u=this.session,v=this.getSelectionRange();if(v.start.row<v.end.row){var C=this.$getSelectedRows();u.indentRows(C.first,C.last," ");return}else if(v.start.column<v.end.column){var E=u.getTextRange(v);if(!/^\s+$/.test(E)){var C=this.$getSelectedRows();u.indentRows(C.first,C.last," ");return}}var T=u.getLine(v.start.row),_=v.start,I=u.getTabSize(),F=u.documentToScreenColumn(_.row,_.column);if(this.session.getUseSoftTabs())var H=I-F%I,D=a.stringRepeat(" ",H);else{for(var H=F%I;T[v.start.column-1]==" "&&H;)v.start.column--,H--;this.selection.setSelectionRange(v),D=" "}return this.insert(D)},g.prototype.blockIndent=function(){var u=this.$getSelectedRows();this.session.indentRows(u.first,u.last," ")},g.prototype.blockOutdent=function(){var u=this.session.getSelection();this.session.outdentRows(u.getRange())},g.prototype.sortLines=function(){for(var u=this.$getSelectedRows(),v=this.session,C=[],E=u.first;E<=u.last;E++)C.push(v.getLine(E));C.sort(function(I,F){return I.toLowerCase()<F.toLowerCase()?-1:I.toLowerCase()>F.toLowerCase()?1:0});for(var T=new s(0,0,0,0),E=u.first;E<=u.last;E++){var _=v.getLine(E);T.start.row=E,T.end.row=E,T.end.column=_.length,v.replace(T,C[E-u.first])}},g.prototype.toggleCommentLines=function(){var u=this.session.getState(this.getCursorPosition().row),v=this.$getSelectedRows();this.session.getMode().toggleCommentLines(u,this.session,v.first,v.last)},g.prototype.toggleBlockComment=function(){var u=this.getCursorPosition(),v=this.session.getState(u.row),C=this.getSelectionRange();this.session.getMode().toggleBlockComment(v,this.session,C,u)},g.prototype.getNumberAt=function(u,v){var C=/[\-]?[0-9]+(?:\.[0-9]+)?/g;C.lastIndex=0;for(var E=this.session.getLine(u);C.lastIndex<v;){var T=C.exec(E);if(T.index<=v&&T.index+T[0].length>=v){var _={value:T[0],start:T.index,end:T.index+T[0].length};return _}}return null},g.prototype.modifyNumber=function(u){var v=this.selection.getCursor().row,C=this.selection.getCursor().column,E=new s(v,C-1,v,C),T=this.session.getTextRange(E);if(!isNaN(parseFloat(T))&&isFinite(T)){var _=this.getNumberAt(v,C);if(_){var I=_.value.indexOf(".")>=0?_.start+_.value.indexOf(".")+1:_.end,F=_.start+_.value.length-I,H=parseFloat(_.value);H*=Math.pow(10,F),I!==_.end&&C<I?u*=Math.pow(10,_.end-C-1):u*=Math.pow(10,_.end-C),H+=u,H/=Math.pow(10,F);var D=H.toFixed(F),O=new s(v,_.start,v,_.end);this.session.replace(O,D),this.moveCursorTo(v,Math.max(_.start+1,C+D.length-_.value.length))}}else this.toggleWord()},g.prototype.toggleWord=function(){var u=this.selection.getCursor().row,v=this.selection.getCursor().column;this.selection.selectWord();var C=this.getSelectedText(),E=this.selection.getWordRange().start.column,T=C.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),_=v-E-1;_<0&&(_=0);var I=0,F=0,H=this;C.match(/[A-Za-z0-9_]+/)&&T.forEach(function(Y,J){F=I+Y.length,_>=I&&_<=F&&(C=Y,H.selection.clearSelection(),H.moveCursorTo(u,I+E),H.selection.selectTo(u,F+E)),I=F});for(var D=this.$toggleWordPairs,O,W=0;W<D.length;W++)for(var B=D[W],z=0;z<=1;z++){var V=+!z,U=C.match(new RegExp("^\\s?_?("+a.escapeRegExp(B[z])+")\\s?$","i"));if(U){var G=C.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(U[1])+")($|\\s)","g"));G&&(O=C.replace(new RegExp(a.escapeRegExp(B[z]),"i"),function(Y){var J=B[V];return Y.toUpperCase()==Y?J=J.toUpperCase():Y.charAt(0).toUpperCase()==Y.charAt(0)&&(J=J.substr(0,0)+B[V].charAt(0).toUpperCase()+J.substr(1)),J}),this.insert(O),O="")}}},g.prototype.findLinkAt=function(u,v){var C,E,T=this.session.getLine(u),_=T.split(/((?:https?|ftp):\/\/[\S]+)/),I=v;I<0&&(I=0);var F=0,H=0,D;try{for(var O=x(_),W=O.next();!W.done;W=O.next()){var B=W.value;if(H=F+B.length,I>=F&&I<=H&&B.match(/((?:https?|ftp):\/\/[\S]+)/)){D=B.replace(/[\s:.,'";}\]]+$/,"");break}F=H}}catch(z){C={error:z}}finally{try{W&&!W.done&&(E=O.return)&&E.call(O)}finally{if(C)throw C.error}}return D},g.prototype.openLink=function(){var u=this.selection.getCursor(),v=this.findLinkAt(u.row,u.column);return v&&window.open(v,"_blank"),v!=null},g.prototype.removeLines=function(){var u=this.$getSelectedRows();this.session.removeFullLines(u.first,u.last),this.clearSelection()},g.prototype.duplicateSelection=function(){var u=this.selection,v=this.session,C=u.getRange(),E=u.isBackwards();if(C.isEmpty()){var T=C.start.row;v.duplicateLines(T,T)}else{var _=E?C.start:C.end,I=v.insert(_,v.getTextRange(C));C.start=_,C.end=I,u.setSelectionRange(C,E)}},g.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},g.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},g.prototype.moveText=function(u,v,C){return this.session.moveText(u,v,C)},g.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},g.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},g.prototype.$moveLines=function(u,v){var C,E,T=this.selection;if(!T.inMultiSelectMode||this.inVirtualSelectionMode){var _=T.toOrientedRange();C=this.$getSelectedRows(_),E=this.session.$moveLines(C.first,C.last,v?0:u),v&&u==-1&&(E=0),_.moveBy(E,0),T.fromOrientedRange(_)}else{var I=T.rangeList.ranges;T.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var F=0,H=0,D=I.length,O=0;O<D;O++){var W=O;I[O].moveBy(F,0),C=this.$getSelectedRows(I[O]);for(var B=C.first,z=C.last;++O<D;){H&&I[O].moveBy(H,0);var V=this.$getSelectedRows(I[O]);if(v&&V.first!=z)break;if(!v&&V.first>z+1)break;z=V.last}for(O--,F=this.session.$moveLines(B,z,v?0:u),v&&u==-1&&(W=O+1);W<=O;)I[W].moveBy(F,0),W++;v||(F=0),H+=F}T.fromOrientedRange(T.ranges[0]),T.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},g.prototype.$getSelectedRows=function(u){return u=(u||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(u.start.row),last:this.session.getRowFoldEnd(u.end.row)}},g.prototype.onCompositionStart=function(u){this.renderer.showComposition(u)},g.prototype.onCompositionUpdate=function(u){this.renderer.setCompositionText(u)},g.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},g.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},g.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},g.prototype.isRowVisible=function(u){return u>=this.getFirstVisibleRow()&&u<=this.getLastVisibleRow()},g.prototype.isRowFullyVisible=function(u){return u>=this.renderer.getFirstFullyVisibleRow()&&u<=this.renderer.getLastFullyVisibleRow()},g.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},g.prototype.$moveByPage=function(u,v){var C=this.renderer,E=this.renderer.layerConfig,T=u*Math.floor(E.height/E.lineHeight);v===!0?this.selection.$moveSelection(function(){this.moveCursorBy(T,0)}):v===!1&&(this.selection.moveCursorBy(T,0),this.selection.clearSelection());var _=C.scrollTop;C.scrollBy(0,T*E.lineHeight),v!=null&&C.scrollCursorIntoView(null,.5),C.animateScrolling(_)},g.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},g.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},g.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},g.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},g.prototype.scrollPageDown=function(){this.$moveByPage(1)},g.prototype.scrollPageUp=function(){this.$moveByPage(-1)},g.prototype.scrollToRow=function(u){this.renderer.scrollToRow(u)},g.prototype.scrollToLine=function(u,v,C,E){this.renderer.scrollToLine(u,v,C,E)},g.prototype.centerSelection=function(){var u=this.getSelectionRange(),v={row:Math.floor(u.start.row+(u.end.row-u.start.row)/2),column:Math.floor(u.start.column+(u.end.column-u.start.column)/2)};this.renderer.alignCursor(v,.5)},g.prototype.getCursorPosition=function(){return this.selection.getCursor()},g.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},g.prototype.getSelectionRange=function(){return this.selection.getRange()},g.prototype.selectAll=function(){this.selection.selectAll()},g.prototype.clearSelection=function(){this.selection.clearSelection()},g.prototype.moveCursorTo=function(u,v){this.selection.moveCursorTo(u,v)},g.prototype.moveCursorToPosition=function(u){this.selection.moveCursorToPosition(u)},g.prototype.jumpToMatching=function(u,v){var C=this.getCursorPosition(),E=new f(this.session,C.row,C.column),T=E.getCurrentToken(),_=0;T&&T.type.indexOf("tag-name")!==-1&&(T=E.stepBackward());var I=T||E.stepForward();if(I){var F,H=!1,D={},O=C.column-I.start,W,B={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(I.value.match(/[{}()\[\]]/g)){for(;O<I.value.length&&!H;O++)if(B[I.value[O]])switch(W=B[I.value[O]]+"."+I.type.replace("rparen","lparen"),isNaN(D[W])&&(D[W]=0),I.value[O]){case"(":case"[":case"{":D[W]++;break;case")":case"]":case"}":D[W]--,D[W]===-1&&(F="bracket",H=!0);break}}else I.type.indexOf("tag-name")!==-1&&(isNaN(D[I.value])&&(D[I.value]=0),T.value==="<"&&_>1?D[I.value]++:T.value==="</"&&D[I.value]--,D[I.value]===-1&&(F="tag",H=!0));H||(T=I,_++,I=E.stepForward(),O=0)}while(I&&!H);if(F){var z,V;if(F==="bracket")z=this.session.getBracketRange(C),z||(z=new s(E.getCurrentTokenRow(),E.getCurrentTokenColumn()+O-1,E.getCurrentTokenRow(),E.getCurrentTokenColumn()+O-1),V=z.start,(v||V.row===C.row&&Math.abs(V.column-C.column)<2)&&(z=this.session.getBracketRange(V)));else if(F==="tag"){if(!I||I.type.indexOf("tag-name")===-1)return;if(z=new s(E.getCurrentTokenRow(),E.getCurrentTokenColumn()-2,E.getCurrentTokenRow(),E.getCurrentTokenColumn()-2),z.compare(C.row,C.column)===0){var U=this.session.getMatchingTags(C);U&&(U.openTag.contains(C.row,C.column)?(z=U.closeTag,V=z.start):(z=U.openTag,U.closeTag.start.row===C.row&&U.closeTag.start.column===C.column?V=z.end:V=z.start))}V=V||z.start}V=z&&z.cursor||V,V&&(u?z&&v?this.selection.setRange(z):z&&z.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(V.row,V.column):this.selection.moveTo(V.row,V.column))}}},g.prototype.gotoLine=function(u,v,C){this.selection.clearSelection(),this.session.unfold({row:u-1,column:v||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(u-1,v||0),this.isRowFullyVisible(u-1)||this.scrollToLine(u-1,!0,C)},g.prototype.navigateTo=function(u,v){this.selection.moveTo(u,v)},g.prototype.navigateUp=function(u){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var v=this.selection.anchor.getPosition();return this.moveCursorToPosition(v)}this.selection.clearSelection(),this.selection.moveCursorBy(-u||-1,0)},g.prototype.navigateDown=function(u){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var v=this.selection.anchor.getPosition();return this.moveCursorToPosition(v)}this.selection.clearSelection(),this.selection.moveCursorBy(u||1,0)},g.prototype.navigateLeft=function(u){if(this.selection.isEmpty())for(u=u||1;u--;)this.selection.moveCursorLeft();else{var v=this.getSelectionRange().start;this.moveCursorToPosition(v)}this.clearSelection()},g.prototype.navigateRight=function(u){if(this.selection.isEmpty())for(u=u||1;u--;)this.selection.moveCursorRight();else{var v=this.getSelectionRange().end;this.moveCursorToPosition(v)}this.clearSelection()},g.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},g.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},g.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},g.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},g.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},g.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},g.prototype.replace=function(u,v){v&&this.$search.set(v);var C=this.$search.find(this.session),E=0;return C&&(this.$tryReplace(C,u)&&(E=1),this.selection.setSelectionRange(C),this.renderer.scrollSelectionIntoView(C.start,C.end)),E},g.prototype.replaceAll=function(u,v){v&&this.$search.set(v);var C=this.$search.findAll(this.session),E=0;if(!C.length)return E;var T=this.getSelectionRange();this.selection.moveTo(0,0);for(var _=C.length-1;_>=0;--_)this.$tryReplace(C[_],u)&&E++;return this.selection.setSelectionRange(T),E},g.prototype.$tryReplace=function(u,v){var C=this.session.getTextRange(u);return v=this.$search.replace(C,v),v!==null?(u.end=this.session.replace(u,v),u):null},g.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},g.prototype.find=function(u,v,C){v||(v={}),typeof u=="string"||u instanceof RegExp?v.needle=u:typeof u=="object"&&L.mixin(v,u);var E=this.selection.getRange();v.needle==null&&(u=this.session.getTextRange(E)||this.$search.$options.needle,u||(E=this.session.getWordRange(E.start.row,E.start.column),u=this.session.getTextRange(E)),this.$search.set({needle:u})),this.$search.set(v),v.start||this.$search.set({start:E});var T=this.$search.find(this.session);if(v.preventScroll)return T;if(T)return this.revealRange(T,C),T;v.backwards?E.start=E.end:E.end=E.start,this.selection.setRange(E)},g.prototype.findNext=function(u,v){this.find({skipCurrent:!0,backwards:!1},u,v)},g.prototype.findPrevious=function(u,v){this.find(u,{skipCurrent:!0,backwards:!0},v)},g.prototype.revealRange=function(u,v){this.session.unfold(u),this.selection.setSelectionRange(u);var C=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(u.start,u.end,.5),v!==!1&&this.renderer.animateScrolling(C)},g.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},g.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},g.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(u){u.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},g.prototype.setAutoScrollEditorIntoView=function(u){if(u){var v,C=this,E=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var T=this.$scrollAnchor;T.style.cssText="position:absolute",this.container.insertBefore(T,this.container.firstChild);var _=this.on("changeSelection",function(){E=!0}),I=this.renderer.on("beforeRender",function(){E&&(v=C.renderer.container.getBoundingClientRect())}),F=this.renderer.on("afterRender",function(){if(E&&v&&(C.isFocused()||C.searchBox&&C.searchBox.isFocused())){var H=C.renderer,D=H.$cursorLayer.$pixelPos,O=H.layerConfig,W=D.top-O.offset;D.top>=0&&W+v.top<0?E=!0:D.top<O.height&&D.top+v.top+O.lineHeight>window.innerHeight?E=!1:E=null,E!=null&&(T.style.top=W+"px",T.style.left=D.left+"px",T.style.height=O.lineHeight+"px",T.scrollIntoView(E)),E=v=null}});this.setAutoScrollEditorIntoView=function(H){H||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",_),this.renderer.off("afterRender",F),this.renderer.off("beforeRender",I))}}},g.prototype.$resetCursorStyle=function(){var u=this.$cursorStyle||"ace",v=this.renderer.$cursorLayer;v&&(v.setSmoothBlinking(/smooth/.test(u)),v.isBlinking=!this.$readOnly&&u!="wide",b.setCssClass(v.element,"ace_slim-cursors",/slim/.test(u)))},g.prototype.prompt=function(u,v,C){var E=this;p.loadModule("ace/ext/prompt",function(T){T.prompt(E,u,v,C)})},g}();y.$uid=0,y.prototype.curOp=null,y.prototype.prevOp={},y.prototype.$mergeableCommands=["backspace","del","insertstring"],y.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],L.implement(y.prototype,l),p.defineOptions(y.prototype,"editor",{selectionStyle:{set:function(g){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:g})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(g){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(g){this.textInput.setReadOnly(g),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(g){this.textInput.setCopyWithEmptySelection(g)},initialValue:!1},cursorStyle:{set:function(g){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(g){this.setAutoScrollEditorIntoView(g)}},keyboardHandler:{set:function(g){this.setKeyboardHandler(g)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(g){this.session.setValue(g)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(g){this.setSession(g)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(g){this.renderer.$gutterLayer.setShowLineNumbers(g),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),g&&this.$relativeLineNumbers?m.attach(this):m.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(g){this.$showLineNumbers&&g?m.attach(this):m.detach(this)}},placeholder:{set:function(g){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var u=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(u&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),b.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!u&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),b.addCssClass(this.container,"ace_hasPlaceholder");var v=b.createElement("div");v.className="ace_placeholder",v.textContent=this.$placeholder||"",this.renderer.placeholderNode=v,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!u&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(g){var u={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(E){E.blur(),E.renderer.scroller.focus()},readOnly:!0},v=function(E){if(E.target==this.renderer.scroller&&E.keyCode===k.enter){E.preventDefault();var T=this.getCursorPosition().row;this.isRowVisible(T)||this.scrollToLine(T,!0,!0),this.focus()}},C;g?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(c.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",A("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",A("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",v.bind(this)),this.commands.addCommand(u),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",A("editor")),this.renderer.$gutter.setAttribute("aria-label",A("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),C||(C=new $(this)),C.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",v.bind(this)),this.commands.removeCommand(u),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),C&&C.removeListener())},initialValue:!1},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var m={getText:function(g,u){return(Math.abs(g.selection.lead.row-u)||u+1+(u<9?"·":""))+""},getWidth:function(g,u,v){return Math.max(u.toString().length,(v.lastRow+1).toString().length,2)*v.characterWidth},update:function(g,u){u.renderer.$loop.schedule(u.renderer.CHANGE_GUTTER)},attach:function(g){g.renderer.$gutterLayer.$renderer=this,g.on("changeSelection",this.update),this.update(null,g)},detach:function(g){g.renderer.$gutterLayer.$renderer==this&&(g.renderer.$gutterLayer.$renderer=null),g.off("changeSelection",this.update),this.update(null,g)}};M.Editor=y}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(R,M,P){var x=R("../lib/dom"),L=function(){function b(a,c){this.element=a,this.canvasHeight=c||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return b.prototype.moveContainer=function(a){x.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},b.prototype.pageChanged=function(a,c){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)},b.prototype.computeLineTop=function(a,c,r){var n=c.firstRowScreen*c.lineHeight,i=Math.floor(n/this.canvasHeight),t=r.documentToScreenRow(a,0)*c.lineHeight;return t-i*this.canvasHeight},b.prototype.computeLineHeight=function(a,c,r){return c.lineHeight*r.getRowLineCount(a)},b.prototype.getLength=function(){return this.cells.length},b.prototype.get=function(a){return this.cells[a]},b.prototype.shift=function(){this.$cacheCell(this.cells.shift())},b.prototype.pop=function(){this.$cacheCell(this.cells.pop())},b.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var c=x.createFragment(this.element),r=0;r<a.length;r++)c.appendChild(a[r].element);this.element.appendChild(c)}else this.cells.push(a),this.element.appendChild(a.element)},b.prototype.unshift=function(a){if(Array.isArray(a)){this.cells.unshift.apply(this.cells,a);for(var c=x.createFragment(this.element),r=0;r<a.length;r++)c.appendChild(a[r].element);this.element.firstChild?this.element.insertBefore(c,this.element.firstChild):this.element.appendChild(c)}else this.cells.unshift(a),this.element.insertAdjacentElement("afterbegin",a.element)},b.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},b.prototype.$cacheCell=function(a){a&&(a.element.remove(),this.cellCache.push(a))},b.prototype.createCell=function(a,c,r,n){var i=this.cellCache.pop();if(!i){var t=x.createElement("div");n&&n(t),this.element.appendChild(t),i={element:t,text:"",row:a}}return i.row=a,i},b}();M.Lines=L}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(R,M,P){var x=R("../lib/dom"),L=R("../lib/oop"),b=R("../lib/lang"),a=R("../lib/event_emitter").EventEmitter,c=R("./lines").Lines,r=R("../config").nls,n=function(){function t(e){this.element=x.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new c(this.element),this.$lines.$offsetCoefficient=1}return t.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},t.prototype.addGutterDecoration=function(e,o){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,o)},t.prototype.removeGutterDecoration=function(e,o){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,o)},t.prototype.setAnnotations=function(e){this.$annotations=[];for(var o=0;o<e.length;o++){var s=e[o],l=s.row,h=this.$annotations[l];h||(h=this.$annotations[l]={text:[],type:[]});var S=s.text,p=s.type;S=S?b.escapeHTML(S):s.html||"",h.text.indexOf(S)===-1&&(h.text.push(S),h.type.push(p));var f=s.className;f?h.className=f:p=="error"?h.className=" ace_error":p=="warning"&&h.className!=" ace_error"?h.className=" ace_warning":p=="info"&&!h.className&&(h.className=" ace_info")}},t.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var o=e.start.row,s=e.end.row-o;if(s!==0)if(e.action=="remove")this.$annotations.splice(o,s+1,null);else{var l=new Array(s+1);l.unshift(o,1),this.$annotations.splice.apply(this.$annotations,l)}}},t.prototype.update=function(e){this.config=e;var o=this.session,s=e.firstRow,l=Math.min(e.lastRow+e.gutterOffset,o.getLength()-1);this.oldLastRow=l,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var h=o.getNextFoldLine(s),S=h?h.start.row:1/0,p=null,f=-1,d=s;;){if(d>S&&(d=h.end.row+1,h=o.getNextFoldLine(d,h),S=h?h.start.row:1/0),d>l){for(;this.$lines.getLength()>f+1;)this.$lines.pop();break}p=this.$lines.get(++f),p?p.row=d:(p=this.$lines.createCell(d,e,this.session,i),this.$lines.push(p)),this.$renderCell(p,e,h,d),d++}this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$updateGutterWidth=function(e){var o=this.session,s=o.gutterRenderer||this.$renderer,l=o.$firstLineNumber,h=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||o.$useWrapMode)&&(h=o.getLength()+l-1);var S=s?s.getWidth(o,h,e):h.toString().length*e.characterWidth,p=this.$padding||this.$computePadding();S+=p.left+p.right,S!==this.gutterWidth&&!isNaN(S)&&(this.gutterWidth=S,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",S))},t.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},t.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!(this.$cursorCell&&this.$cursorCell.row==e)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var o=this.$lines.cells;this.$cursorCell=null;for(var s=0;s<o.length;s++){var l=o[s];if(l.row>=this.$cursorRow){if(l.row>this.$cursorRow){var h=this.session.getFoldLine(this.$cursorRow);if(s>0&&h&&h.start.row==o[s-1].row)l=o[s-1];else break}l.element.className="ace_gutter-active-line "+l.element.className,this.$cursorCell=l;break}}}}},t.prototype.scrollLines=function(e){var o=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(o,e))return this.update(e);this.$lines.moveContainer(e);var s=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),l=this.oldLastRow;if(this.oldLastRow=s,!o||l<e.firstRow)return this.update(e);if(s<o.firstRow)return this.update(e);if(o.firstRow<e.firstRow)for(var h=this.session.getFoldedRowCount(o.firstRow,e.firstRow-1);h>0;h--)this.$lines.shift();if(l>s)for(var h=this.session.getFoldedRowCount(s+1,l);h>0;h--)this.$lines.pop();e.firstRow<o.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,o.firstRow-1)),s>l&&this.$lines.push(this.$renderLines(e,l+1,s)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$renderLines=function(e,o,s){for(var l=[],h=o,S=this.session.getNextFoldLine(h),p=S?S.start.row:1/0;h>p&&(h=S.end.row+1,S=this.session.getNextFoldLine(h,S),p=S?S.start.row:1/0),!(h>s);){var f=this.$lines.createCell(h,e,this.session,i);this.$renderCell(f,e,S,h),l.push(f),h++}return l},t.prototype.$renderCell=function(e,o,s,l){var h=e.element,S=this.session,p=h.childNodes[0],f=h.childNodes[1],d=h.childNodes[2],$=d.firstChild,A=S.$firstLineNumber,w=S.$breakpoints,k=S.$decorations,y=S.gutterRenderer||this.$renderer,m=this.$showFoldWidgets&&S.foldWidgets,g=s?s.start.row:Number.MAX_VALUE,u=o.lineHeight+"px",v=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",C=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",E=(y?y.getText(S,l):l+A).toString();if(this.$highlightGutterLine&&(l==this.$cursorRow||s&&l<this.$cursorRow&&l>=g&&this.$cursorRow<=s.end.row)&&(v+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),w[l]&&(v+=w[l]),k[l]&&(v+=k[l]),this.$annotations[l]&&l!==g&&(v+=this.$annotations[l].className),m){var T=m[l];T==null&&(T=m[l]=S.getFoldWidget(l))}if(T){var _="ace_fold-widget ace_"+T,I=T=="start"&&l==g&&l<s.end.row;if(I){_+=" ace_closed";for(var F="",H=!1,D=l+1;D<=s.end.row;D++)if(this.$annotations[D]){if(this.$annotations[D].className===" ace_error"){H=!0,F=" ace_error_fold";break}if(this.$annotations[D].className===" ace_warning"){H=!0,F=" ace_warning_fold";continue}}v+=F}else _+=" ace_open";f.className!=_&&(f.className=_),x.setStyle(f.style,"height",u),x.setStyle(f.style,"display","inline-block"),f.setAttribute("role","button"),f.setAttribute("tabindex","-1");var O=S.getFoldWidgetRange(l);O?f.setAttribute("aria-label",r("Toggle code folding, rows $0 through $1",[O.start.row+1,O.end.row+1])):s?f.setAttribute("aria-label",r("Toggle code folding, rows $0 through $1",[s.start.row+1,s.end.row+1])):f.setAttribute("aria-label",r("Toggle code folding, row $0",[l+1])),I?(f.setAttribute("aria-expanded","false"),f.setAttribute("title",r("Unfold code"))):(f.setAttribute("aria-expanded","true"),f.setAttribute("title",r("Fold code")))}else f&&(x.setStyle(f.style,"display","none"),f.setAttribute("tabindex","0"),f.removeAttribute("role"),f.removeAttribute("aria-label"));return H&&this.$showFoldedAnnotations?(d.className="ace_gutter_annotation",$.className=C,$.className+=F,x.setStyle($.style,"height",u),x.setStyle(d.style,"display","block"),x.setStyle(d.style,"height",u),d.setAttribute("aria-label",r("Read annotations row $0",[E])),d.setAttribute("tabindex","-1"),d.setAttribute("role","button")):this.$annotations[l]?(d.className="ace_gutter_annotation",$.className=C,this.$useSvgGutterIcons?$.className+=this.$annotations[l].className:h.classList.add(this.$annotations[l].className.replace(" ","")),x.setStyle($.style,"height",u),x.setStyle(d.style,"display","block"),x.setStyle(d.style,"height",u),d.setAttribute("aria-label",r("Read annotations row $0",[E])),d.setAttribute("tabindex","-1"),d.setAttribute("role","button")):(x.setStyle(d.style,"display","none"),d.removeAttribute("aria-label"),d.removeAttribute("role"),d.setAttribute("tabindex","0")),E!==p.data&&(p.data=E),h.className!=v&&(h.className=v),x.setStyle(e.element.style,"height",this.$lines.computeLineHeight(l,o,S)+"px"),x.setStyle(e.element.style,"top",this.$lines.computeLineTop(l,o,S)+"px"),e.text=E,d.style.display==="none"&&f.style.display==="none"?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},t.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},t.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},t.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},t.prototype.setShowFoldWidgets=function(e){e?x.addCssClass(this.element,"ace_folding-enabled"):x.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},t.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},t.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=x.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},t.prototype.getRegion=function(e){var o=this.$padding||this.$computePadding(),s=this.element.getBoundingClientRect();if(e.x<o.left+s.left)return"markers";if(this.$showFoldWidgets&&e.x>s.right-o.right)return"foldWidgets"},t}();n.prototype.$fixedWidth=!1,n.prototype.$highlightGutterLine=!0,n.prototype.$renderer="",n.prototype.$showLineNumbers=!0,n.prototype.$showFoldWidgets=!0,L.implement(n.prototype,a);function i(t){var e=document.createTextNode("");t.appendChild(e);var o=x.createElement("span");t.appendChild(o);var s=x.createElement("span");t.appendChild(s);var l=x.createElement("span");return s.appendChild(l),t}M.Gutter=n}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(R,M,P){var x=R("../range").Range,L=R("../lib/dom"),b=function(){function c(r){this.element=L.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element)}return c.prototype.setPadding=function(r){this.$padding=r},c.prototype.setSession=function(r){this.session=r},c.prototype.setMarkers=function(r){this.markers=r},c.prototype.elt=function(r,n){var i=this.i!=-1&&this.element.childNodes[this.i];i?this.i++:(i=document.createElement("div"),this.element.appendChild(i),this.i=-1),i.style.cssText=n,i.className=r},c.prototype.update=function(r){if(r){this.config=r,this.i=0;var n;for(var i in this.markers){var t=this.markers[i];if(!t.range){t.update(n,this,this.session,r);continue}var e=t.range.clipRows(r.firstRow,r.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),t.renderer){var o=this.$getTop(e.start.row,r),s=this.$padding+e.start.column*r.characterWidth;t.renderer(n,e,s,o,r)}else t.type=="fullLine"?this.drawFullLineMarker(n,e,t.clazz,r):t.type=="screenLine"?this.drawScreenLineMarker(n,e,t.clazz,r):e.isMultiLine()?t.type=="text"?this.drawTextMarker(n,e,t.clazz,r):this.drawMultiLineMarker(n,e,t.clazz,r):this.drawSingleLineMarker(n,e,t.clazz+" ace_start ace_br15",r)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},c.prototype.$getTop=function(r,n){return(r-n.firstRowScreen)*n.lineHeight},c.prototype.drawTextMarker=function(r,n,i,t,e){for(var o=this.session,s=n.start.row,l=n.end.row,h=s,S=0,p=0,f=o.getScreenLastRowColumn(h),d=new x(h,n.start.column,h,p);h<=l;h++)d.start.row=d.end.row=h,d.start.column=h==s?n.start.column:o.getRowWrapIndent(h),d.end.column=f,S=p,p=f,f=h+1<l?o.getScreenLastRowColumn(h+1):h==l?0:n.end.column,this.drawSingleLineMarker(r,d,i+(h==s?" ace_start":"")+" ace_br"+a(h==s||h==s+1&&n.start.column,S<p,p>f,h==l),t,h==l?0:1,e)},c.prototype.drawMultiLineMarker=function(r,n,i,t,e){var o=this.$padding,s=t.lineHeight,l=this.$getTop(n.start.row,t),h=o+n.start.column*t.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(n.start.row)){var S=n.clone();S.end.row=S.start.row,S.end.column=this.session.getLine(S.start.row).length,this.drawBidiSingleLineMarker(r,S,i+" ace_br1 ace_start",t,null,e)}else this.elt(i+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+l+"px;left:"+h+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(n.end.row)){var S=n.clone();S.start.row=S.end.row,S.start.column=0,this.drawBidiSingleLineMarker(r,S,i+" ace_br12",t,null,e)}else{l=this.$getTop(n.end.row,t);var p=n.end.column*t.characterWidth;this.elt(i+" ace_br12","height:"+s+"px;width:"+p+"px;top:"+l+"px;left:"+o+"px;"+(e||""))}if(s=(n.end.row-n.start.row-1)*t.lineHeight,!(s<=0)){l=this.$getTop(n.start.row+1,t);var f=(n.start.column?1:0)|(n.end.column?0:8);this.elt(i+(f?" ace_br"+f:""),"height:"+s+"px;right:0;top:"+l+"px;left:"+o+"px;"+(e||""))}},c.prototype.drawSingleLineMarker=function(r,n,i,t,e,o){if(this.session.$bidiHandler.isBidiRow(n.start.row))return this.drawBidiSingleLineMarker(r,n,i,t,e,o);var s=t.lineHeight,l=(n.end.column+(e||0)-n.start.column)*t.characterWidth,h=this.$getTop(n.start.row,t),S=this.$padding+n.start.column*t.characterWidth;this.elt(i,"height:"+s+"px;width:"+l+"px;top:"+h+"px;left:"+S+"px;"+(o||""))},c.prototype.drawBidiSingleLineMarker=function(r,n,i,t,e,o){var s=t.lineHeight,l=this.$getTop(n.start.row,t),h=this.$padding,S=this.session.$bidiHandler.getSelections(n.start.column,n.end.column);S.forEach(function(p){this.elt(i,"height:"+s+"px;width:"+(p.width+(e||0))+"px;top:"+l+"px;left:"+(h+p.left)+"px;"+(o||""))},this)},c.prototype.drawFullLineMarker=function(r,n,i,t,e){var o=this.$getTop(n.start.row,t),s=t.lineHeight;n.start.row!=n.end.row&&(s+=this.$getTop(n.end.row,t)-o),this.elt(i,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(e||""))},c.prototype.drawScreenLineMarker=function(r,n,i,t,e){var o=this.$getTop(n.start.row,t),s=t.lineHeight;this.elt(i,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(e||""))},c}();b.prototype.$padding=0;function a(c,r,n,i){return(c?1:0)|(r?2:0)|(n?4:0)|(i?8:0)}M.Marker=b}),ace.define("ace/layer/text_util",["require","exports","module"],function(R,M,P){var x=new Set(["text","rparen","lparen"]);M.isTextToken=function(L){return x.has(L)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(R,M,P){var x=R("../lib/oop"),L=R("../lib/dom"),b=R("../lib/lang"),a=R("./lines").Lines,c=R("../lib/event_emitter").EventEmitter,r=R("../config").nls,n=R("./text_util").isTextToken,i=function(){function t(e){this.dom=L,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return t.prototype.$updateEolChar=function(){var e=this.session.doc,o=e.getNewLineCharacter()==` |
| 237 |
`&&e.getNewLineMode()!="windows",s=o?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=s)return this.EOL_CHAR=s,!0},t.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},t.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},t.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},t.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(o){this._signal("changeCharacterSize",o)}.bind(this)),this.$pollSizeChanges()},t.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},t.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},t.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},t.prototype.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,typeof e=="string"?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},t.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},t.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},t.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var o=this.$tabStrings=[0],s=1;s<e+1;s++)if(this.showTabs){var l=this.dom.createElement("span");l.className="ace_invisible ace_invisible_tab",l.textContent=b.stringRepeat(this.TAB_CHAR,s),o.push(l)}else o.push(this.dom.createTextNode(b.stringRepeat(" ",s),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var h="ace_indent-guide",S=this.showSpaces?" ace_invisible ace_invisible_space":"",p=this.showSpaces?b.stringRepeat(this.SPACE_CHAR,this.tabSize):b.stringRepeat(" ",this.tabSize),f=this.showTabs?" ace_invisible ace_invisible_tab":"",d=this.showTabs?b.stringRepeat(this.TAB_CHAR,this.tabSize):p,l=this.dom.createElement("span");l.className=h+S,l.textContent=p,this.$tabStrings[" "]=l;var l=this.dom.createElement("span");l.className=h+f,l.textContent=d,this.$tabStrings[" "]=l}},t.prototype.updateLines=function(e,o,s){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var l=Math.max(o,e.firstRow),h=Math.min(s,e.lastRow),S=this.element.childNodes,p=0,d=e.firstRow;d<l;d++){var $=this.session.getFoldLine(d);if($)if($.containsRow(l)){l=$.start.row;break}else d=$.end.row;p++}for(var f=!1,d=l,$=this.session.getNextFoldLine(d),A=$?$.start.row:1/0;d>A&&(d=$.end.row+1,$=this.session.getNextFoldLine(d,$),A=$?$.start.row:1/0),!(d>h);){var w=S[p++];if(w){this.dom.removeChildren(w),this.$renderLine(w,d,d==A?$:!1),f&&(w.style.top=this.$lines.computeLineTop(d,e,this.session)+"px");var k=e.lineHeight*this.session.getRowLength(d)+"px";w.style.height!=k&&(f=!0,w.style.height=k)}d++}if(f)for(;p<this.$lines.cells.length;){var y=this.$lines.cells[p++];y.element.style.top=this.$lines.computeLineTop(y.row,e,this.session)+"px"}},t.prototype.scrollLines=function(e){var o=this.config;if(this.config=e,this.$lines.pageChanged(o,e))return this.update(e);this.$lines.moveContainer(e);var s=e.lastRow,l=o?o.lastRow:-1;if(!o||l<e.firstRow)return this.update(e);if(s<o.firstRow)return this.update(e);if(!o||o.lastRow<e.firstRow)return this.update(e);if(e.lastRow<o.firstRow)return this.update(e);if(o.firstRow<e.firstRow)for(var h=this.session.getFoldedRowCount(o.firstRow,e.firstRow-1);h>0;h--)this.$lines.shift();if(o.lastRow>e.lastRow)for(var h=this.session.getFoldedRowCount(e.lastRow+1,o.lastRow);h>0;h--)this.$lines.pop();e.firstRow<o.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,o.firstRow-1)),e.lastRow>o.lastRow&&this.$lines.push(this.$renderLinesFragment(e,o.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},t.prototype.$renderLinesFragment=function(e,o,s){for(var l=[],h=o,S=this.session.getNextFoldLine(h),p=S?S.start.row:1/0;h>p&&(h=S.end.row+1,S=this.session.getNextFoldLine(h,S),p=S?S.start.row:1/0),!(h>s);){var f=this.$lines.createCell(h,e,this.session),d=f.element;this.dom.removeChildren(d),L.setStyle(d.style,"height",this.$lines.computeLineHeight(h,e,this.session)+"px"),L.setStyle(d.style,"top",this.$lines.computeLineTop(h,e,this.session)+"px"),this.$renderLine(d,h,h==p?S:!1),this.$useLineGroups()?d.className="ace_line_group":d.className="ace_line",l.push(f),h++}return l},t.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var o=e.firstRow,s=e.lastRow,l=this.$lines;l.getLength();)l.pop();l.push(this.$renderLinesFragment(e,o,s))},t.prototype.$renderToken=function(e,o,s,l){for(var h=this,S=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,p=this.dom.createFragment(this.element),f,d=0;f=S.exec(l);){var $=f[1],A=f[2],w=f[3],k=f[4],y=f[5];if(!(!h.showSpaces&&A)){var m=d!=f.index?l.slice(d,f.index):"";if(d=f.index+f[0].length,m&&p.appendChild(this.dom.createTextNode(m,this.element)),$){var g=h.session.getScreenTabSize(o+f.index);p.appendChild(h.$tabStrings[g].cloneNode(!0)),o+=g-1}else if(A)if(h.showSpaces){var u=this.dom.createElement("span");u.className="ace_invisible ace_invisible_space",u.textContent=b.stringRepeat(h.SPACE_CHAR,A.length),p.appendChild(u)}else p.appendChild(this.dom.createTextNode(A,this.element));else if(w){var u=this.dom.createElement("span");u.className="ace_invisible ace_invisible_space ace_invalid",u.textContent=b.stringRepeat(h.SPACE_CHAR,w.length),p.appendChild(u)}else if(k){o+=1;var u=this.dom.createElement("span");u.style.width=h.config.characterWidth*2+"px",u.className=h.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",u.textContent=h.showSpaces?h.SPACE_CHAR:k,p.appendChild(u)}else if(y){o+=1;var u=this.dom.createElement("span");u.style.width=h.config.characterWidth*2+"px",u.className="ace_cjk",u.textContent=y,p.appendChild(u)}}}if(p.appendChild(this.dom.createTextNode(d?l.slice(d):l,this.element)),n(s.type))e.appendChild(p);else{var v="ace_"+s.type.replace(/\./g," ace_"),u=this.dom.createElement("span");s.type=="fold"&&(u.style.width=s.value.length*this.config.characterWidth+"px",u.setAttribute("title",r("Unfold code"))),u.className=v,u.appendChild(p),e.appendChild(u)}return o+l.length},t.prototype.renderIndentGuide=function(e,o,s){var l=o.search(this.$indentGuideRe);if(l<=0||l>=s)return o;if(o[0]==" "){l-=l%this.tabSize;for(var h=l/this.tabSize,S=0;S<h;S++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),o.substr(l)}else if(o[0]==" "){for(var S=0;S<l;S++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),o.substr(l)}return this.$highlightIndentGuide(),o},t.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var o=this.session.selection.getCursor(),s=/^\s*/.exec(this.session.doc.getLine(o.row))[0].length,l=Math.floor(s/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:l,start:o.row};var h=this.session.$bracketHighlight;if(h){for(var S=this.session.$bracketHighlight.ranges,p=0;p<S.length;p++)if(o.row!==S[p].start.row){this.$highlightIndentGuideMarker.end=S[p].start.row,o.row>S[p].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[o.row]!==""&&o.column===e[o.row].length){this.$highlightIndentGuideMarker.dir=1;for(var p=o.row+1;p<e.length;p++){var f=e[p],d=/^\s*/.exec(f)[0].length;if(f!==""&&(this.$highlightIndentGuideMarker.end=p,d<=s))break}}this.$renderHighlightIndentGuide()}}},t.prototype.$clearActiveIndentGuide=function(){for(var e=this.$lines.cells,o=0;o<e.length;o++){var s=e[o],l=s.element.childNodes;if(l.length>0){for(var h=0;h<l.length;h++)if(l[h].classList&&l[h].classList.contains("ace_indent-guide-active")){l[h].classList.remove("ace_indent-guide-active");break}}}},t.prototype.$setIndentGuideActive=function(e,o){var s=this.session.doc.getLine(e.row);if(s!==""){var l=e.element.childNodes;if(l){var h=l[o-1];h&&h.classList&&h.classList.contains("ace_indent-guide")&&h.classList.add("ace_indent-guide-active")}}},t.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var o=this.$highlightIndentGuideMarker.indentLevel;if(o!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var s=0;s<e.length;s++){var l=e[s];if(this.$highlightIndentGuideMarker.end&&l.row>=this.$highlightIndentGuideMarker.start+1){if(l.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(l,o)}}else for(var s=e.length-1;s>=0;s--){var l=e[s];if(this.$highlightIndentGuideMarker.end&&l.row<this.$highlightIndentGuideMarker.start){if(l.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(l,o)}}}},t.prototype.$createLineElement=function(e){var o=this.dom.createElement("div");return o.className="ace_line",o.style.height=this.config.lineHeight+"px",o},t.prototype.$renderWrappedLine=function(e,o,s){var l=0,h=0,S=s[0],p=0,f=this.$createLineElement();e.appendChild(f);for(var d=0;d<o.length;d++){var $=o[d],A=$.value;if(d==0&&this.displayIndentGuides){if(l=A.length,A=this.renderIndentGuide(f,A,S),!A)continue;l-=A.length}if(l+A.length<S)p=this.$renderToken(f,p,$,A),l+=A.length;else{for(;l+A.length>=S;)p=this.$renderToken(f,p,$,A.substring(0,S-l)),A=A.substring(S-l),l=S,f=this.$createLineElement(),e.appendChild(f),f.appendChild(this.dom.createTextNode(b.stringRepeat(" ",s.indent),this.element)),h++,p=0,S=s[h]||Number.MAX_VALUE;A.length!=0&&(l+=A.length,p=this.$renderToken(f,p,$,A))}}s[s.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(f,p,null,"",!0)},t.prototype.$renderSimpleLine=function(e,o){for(var s=0,l=0;l<o.length;l++){var h=o[l],S=h.value;if(!(l==0&&this.displayIndentGuides&&(S=this.renderIndentGuide(e,S),!S))){if(s+S.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,s,h,S);s=this.$renderToken(e,s,h,S)}}},t.prototype.$renderOverflowMessage=function(e,o,s,l,h){s&&this.$renderToken(e,o,s,l.slice(0,this.MAX_LINE_LENGTH-o));var S=this.dom.createElement("span");S.className="ace_inline_button ace_keyword ace_toggle_wrap",S.textContent=h?"<hide>":"<click to see more...>",e.appendChild(S)},t.prototype.$renderLine=function(e,o,s){if(!s&&s!=!1&&(s=this.session.getFoldLine(o)),s)var l=this.$getFoldLineTokens(o,s);else var l=this.session.getTokens(o);var h=e;if(l.length){var S=this.session.getRowSplitData(o);if(S&&S.length){this.$renderWrappedLine(e,l,S);var h=e.lastChild}else{var h=e;this.$useLineGroups()&&(h=this.$createLineElement(),e.appendChild(h)),this.$renderSimpleLine(h,l)}}else this.$useLineGroups()&&(h=this.$createLineElement(),e.appendChild(h));if(this.showEOL&&h){s&&(o=s.end.row);var p=this.dom.createElement("span");p.className="ace_invisible ace_invisible_eol",p.textContent=o==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,h.appendChild(p)}},t.prototype.$getFoldLineTokens=function(e,o){var s=this.session,l=[];function h(p,f,d){for(var $=0,A=0;A+p[$].value.length<f;)if(A+=p[$].value.length,$++,$==p.length)return;if(A!=f){var w=p[$].value.substring(f-A);w.length>d-f&&(w=w.substring(0,d-f)),l.push({type:p[$].type,value:w}),A=f+w.length,$+=1}for(;A<d&&$<p.length;){var w=p[$].value;w.length+A>d?l.push({type:p[$].type,value:w.substring(0,d-A)}):l.push(p[$]),A+=w.length,$+=1}}var S=s.getTokens(e);return o.walk(function(p,f,d,$,A){p!=null?l.push({type:"fold",value:p}):(A&&(S=s.getTokens(f)),S.length&&h(S,$,d))},o.end.row,this.session.getLine(o.end.row).length),l},t.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},t}();i.prototype.EOF_CHAR="¶",i.prototype.EOL_CHAR_LF="¬",i.prototype.EOL_CHAR_CRLF="¤",i.prototype.EOL_CHAR=i.prototype.EOL_CHAR_LF,i.prototype.TAB_CHAR="—",i.prototype.SPACE_CHAR="·",i.prototype.$padding=0,i.prototype.MAX_LINE_LENGTH=1e4,i.prototype.showInvisibles=!1,i.prototype.showSpaces=!1,i.prototype.showTabs=!1,i.prototype.showEOL=!1,i.prototype.displayIndentGuides=!0,i.prototype.$highlightIndentGuides=!0,i.prototype.$tabStrings=[],i.prototype.destroy={},i.prototype.onChangeTabSize=i.prototype.$computeTabString,x.implement(i.prototype,c),M.Text=i}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(R,M,P){var x=R("../lib/dom"),L=function(){function b(a){this.element=x.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),x.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return b.prototype.$updateOpacity=function(a){for(var c=this.cursors,r=c.length;r--;)x.setStyle(c[r].style,"opacity",a?"":"0")},b.prototype.$startCssAnimation=function(){for(var a=this.cursors,c=a.length;c--;)a[c].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&x.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},b.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,x.removeCssClass(this.element,"ace_animate-blinking")},b.prototype.setPadding=function(a){this.$padding=a},b.prototype.setSession=function(a){this.session=a},b.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},b.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},b.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,x.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},b.prototype.addCursor=function(){var a=x.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},b.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},b.prototype.hideCursor=function(){this.isVisible=!1,x.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},b.prototype.showCursor=function(){this.isVisible=!0,x.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},b.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,x.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&x.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),x.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var c=function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){a(!0),c()},this.blinkInterval),c()}},b.prototype.getPixelPosition=function(a,c){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var r=this.session.documentToScreenPosition(a),n=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,a.row)?this.session.$bidiHandler.getPosLeft(r.column):r.column*this.config.characterWidth),i=(r.row-(c?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:n,top:i}},b.prototype.isCursorInView=function(a,c){return a.top>=0&&a.top<c.maxHeight},b.prototype.update=function(a){this.config=a;var c=this.session.$selectionMarkers,r=0,n=0;(c===void 0||c.length===0)&&(c=[{cursor:null}]);for(var r=0,i=c.length;r<i;r++){var t=this.getPixelPosition(c[r].cursor,!0);if(!((t.top>a.height+a.offset||t.top<0)&&r>1)){var e=this.cursors[n++]||this.addCursor(),o=e.style;this.drawCursor?this.drawCursor(e,t,a,c[r],this.session):this.isCursorInView(t,a)?(x.setStyle(o,"display","block"),x.translate(e,t.left,t.top),x.setStyle(o,"width",Math.round(a.characterWidth)+"px"),x.setStyle(o,"height",a.lineHeight+"px")):x.setStyle(o,"display","none")}}for(;this.cursors.length>n;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=t,this.restartTimer()},b.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?x.addCssClass(this.element,"ace_overwrite-cursors"):x.removeCssClass(this.element,"ace_overwrite-cursors"))},b.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},b}();L.prototype.$padding=0,L.prototype.drawCursor=null,M.Cursor=L}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(R,M,P){var x=this&&this.__extends||function(){var e=function(o,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,h){l.__proto__=h}||function(l,h){for(var S in h)Object.prototype.hasOwnProperty.call(h,S)&&(l[S]=h[S])},e(o,s)};return function(o,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(o,s);function l(){this.constructor=o}o.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}}(),L=R("./lib/oop"),b=R("./lib/dom"),a=R("./lib/event"),c=R("./lib/event_emitter").EventEmitter,r=32768,n=function(){function e(o,s){this.element=b.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+s,this.inner=b.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),o.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return e.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},e}();L.implement(n.prototype,c);var i=function(e){x(o,e);function o(s,l){var h=e.call(this,s,"-v")||this;return h.scrollTop=0,h.scrollHeight=0,l.$scrollbarWidth=h.width=b.scrollbarWidth(s.ownerDocument),h.inner.style.width=h.element.style.width=(h.width||15)+5+"px",h.$minWidth=0,h}return o.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var s=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-s)/(this.coeff-s)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(s){this.element.style.height=s+"px"},o.prototype.setScrollHeight=function(s){this.scrollHeight=s,s>r?(this.coeff=r/s,s=r):this.coeff!=1&&(this.coeff=1),this.inner.style.height=s+"px"},o.prototype.setScrollTop=function(s){this.scrollTop!=s&&(this.skipEvent=!0,this.scrollTop=s,this.element.scrollTop=s*this.coeff)},o}(n);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var t=function(e){x(o,e);function o(s,l){var h=e.call(this,s,"-h")||this;return h.scrollLeft=0,h.height=l.$scrollbarWidth,h.inner.style.height=h.element.style.height=(h.height||15)+5+"px",h}return o.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.setWidth=function(s){this.element.style.width=s+"px"},o.prototype.setInnerWidth=function(s){this.inner.style.width=s+"px"},o.prototype.setScrollWidth=function(s){this.inner.style.width=s+"px"},o.prototype.setScrollLeft=function(s){this.scrollLeft!=s&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=s)},o}(n);M.ScrollBar=i,M.ScrollBarV=i,M.ScrollBarH=t,M.VScrollBar=i,M.HScrollBar=t}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(R,M,P){var x=this&&this.__extends||function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var h in l)Object.prototype.hasOwnProperty.call(l,h)&&(s[h]=l[h])},t(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(e,o);function s(){this.constructor=e}e.prototype=o===null?Object.create(o):(s.prototype=o.prototype,new s)}}(),L=R("./lib/oop"),b=R("./lib/dom"),a=R("./lib/event"),c=R("./lib/event_emitter").EventEmitter;b.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ |
| 238 |
position: absolute; |
| 239 |
background: rgba(128, 128, 128, 0.6); |
| 240 |
-moz-box-sizing: border-box; |
| 241 |
box-sizing: border-box; |
| 242 |
border: 1px solid #bbb; |
| 243 |
border-radius: 2px; |
| 244 |
z-index: 8; |
| 245 |
} |
| 246 |
.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h { |
| 247 |
position: absolute; |
| 248 |
z-index: 6; |
| 249 |
background: none; |
| 250 |
overflow: hidden!important; |
| 251 |
} |
| 252 |
.ace_editor>.ace_sb-v { |
| 253 |
z-index: 6; |
| 254 |
right: 0; |
| 255 |
top: 0; |
| 256 |
width: 12px; |
| 257 |
} |
| 258 |
.ace_editor>.ace_sb-v div { |
| 259 |
z-index: 8; |
| 260 |
right: 0; |
| 261 |
width: 100%; |
| 262 |
} |
| 263 |
.ace_editor>.ace_sb-h { |
| 264 |
bottom: 0; |
| 265 |
left: 0; |
| 266 |
height: 12px; |
| 267 |
} |
| 268 |
.ace_editor>.ace_sb-h div { |
| 269 |
bottom: 0; |
| 270 |
height: 100%; |
| 271 |
} |
| 272 |
.ace_editor>.ace_sb_grabbed { |
| 273 |
z-index: 8; |
| 274 |
background: #000; |
| 275 |
}`,"ace_scrollbar.css",!1);var r=function(){function t(e,o){this.element=b.createElement("div"),this.element.className="ace_sb"+o,this.inner=b.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return t.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},t}();L.implement(r.prototype,c);var n=function(t){x(e,t);function e(o,s){var l=t.call(this,o,"-v")||this;return l.scrollTop=0,l.scrollHeight=0,l.parent=o,l.width=l.VScrollWidth,l.renderer=s,l.inner.style.width=l.element.style.width=(l.width||15)+"px",l.$minWidth=0,l}return e.prototype.onMouseDown=function(o,s){if(o==="mousedown"&&!(a.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var l=this,h=s.clientY,S=function(k){h=k.clientY},p=function(){clearInterval(A)},f=s.clientY,d=this.thumbTop,$=function(){if(h!==void 0){var k=l.scrollTopFromThumbTop(d+h-f);k!==l.scrollTop&&l._emit("scroll",{data:k})}};a.capture(this.inner,S,p);var A=setInterval($,20);return a.preventDefault(s)}var w=s.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(w)}),a.preventDefault(s)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(o){var s=o*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return s=s>>0,s<0?s=0:s>this.pageHeight-this.viewHeight&&(s=this.pageHeight-this.viewHeight),s},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(o){this.height=Math.max(0,o),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(o,s){this.pageHeight===o&&!s||(this.pageHeight=o,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},e.prototype.setScrollTop=function(o){this.scrollTop=o,o<0&&(o=0),this.thumbTop=o*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e}(r);n.prototype.setInnerHeight=n.prototype.setScrollHeight;var i=function(t){x(e,t);function e(o,s){var l=t.call(this,o,"-h")||this;return l.scrollLeft=0,l.scrollWidth=0,l.height=l.HScrollHeight,l.inner.style.height=l.element.style.height=(l.height||12)+"px",l.renderer=s,l}return e.prototype.onMouseDown=function(o,s){if(o==="mousedown"&&!(a.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var l=this,h=s.clientX,S=function(k){h=k.clientX},p=function(){clearInterval(A)},f=s.clientX,d=this.thumbLeft,$=function(){if(h!==void 0){var k=l.scrollLeftFromThumbLeft(d+h-f);k!==l.scrollLeft&&l._emit("scroll",{data:k})}};a.capture(this.inner,S,p);var A=setInterval($,20);return a.preventDefault(s)}var w=s.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(w)}),a.preventDefault(s)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(o){var s=o*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return s=s>>0,s<0?s=0:s>this.pageWidth-this.viewWidth&&(s=this.pageWidth-this.viewWidth),s},e.prototype.setWidth=function(o){this.width=Math.max(0,o),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(o,s){this.pageWidth===o&&!s||(this.pageWidth=o,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},e.prototype.setScrollLeft=function(o){this.scrollLeft=o,o<0&&(o=0),this.thumbLeft=o*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e}(r);i.prototype.setInnerWidth=i.prototype.setScrollWidth,M.ScrollBar=n,M.ScrollBarV=n,M.ScrollBarH=i,M.VScrollBar=n,M.HScrollBar=i}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(R,M,P){var x=R("./lib/event"),L=function(){function b(a,c){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=c||window;var r=this;this._flush=function(n){r.pending=!1;var i=r.changes;if(i&&(x.blockIdle(100),r.changes=0,r.onRender(i)),r.changes){if(r.$recursionLimit--<0)return;r.schedule()}else r.$recursionLimit=2}}return b.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(x.nextFrame(this._flush),this.pending=!0)},b.prototype.clear=function(a){var c=this.changes;return this.changes=0,c},b}();M.RenderLoop=L}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(R,M,P){var x=R("../lib/oop"),L=R("../lib/dom"),b=R("../lib/lang"),a=R("../lib/event"),c=R("../lib/useragent"),r=R("../lib/event_emitter").EventEmitter,n=512,i=typeof ResizeObserver=="function",t=200,e=function(){function o(s){this.el=L.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=L.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=L.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),s.appendChild(this.el),this.$measureNode.textContent=b.stringRepeat("X",n),this.$characterSize={width:0,height:0},i?this.$addObserver():this.checkForSizeChanges()}return o.prototype.$setMeasureNodeStyles=function(s,l){s.width=s.height="auto",s.left=s.top="0px",s.visibility="hidden",s.position="absolute",s.whiteSpace="pre",c.isIE<8?s["font-family"]="inherit":s.font="inherit",s.overflow=l?"hidden":"visible"},o.prototype.checkForSizeChanges=function(s){if(s===void 0&&(s=this.$measureSizes()),s&&(this.$characterSize.width!==s.width||this.$characterSize.height!==s.height)){this.$measureNode.style.fontWeight="bold";var l=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=s,this.charSizes=Object.create(null),this.allowBoldFonts=l&&l.width===s.width&&l.height===s.height,this._emit("changeCharacterSize",{data:s})}},o.prototype.$addObserver=function(){var s=this;this.$observer=new window.ResizeObserver(function(l){s.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},o.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var s=this;return this.$pollSizeChangesTimer=a.onIdle(function l(){s.checkForSizeChanges(),a.onIdle(l,500)},500)},o.prototype.setPolling=function(s){s?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},o.prototype.$measureSizes=function(s){var l={height:(s||this.$measureNode).clientHeight,width:(s||this.$measureNode).clientWidth/n};return l.width===0||l.height===0?null:l},o.prototype.$measureCharWidth=function(s){this.$main.textContent=b.stringRepeat(s,n);var l=this.$main.getBoundingClientRect();return l.width/n},o.prototype.getCharacterWidth=function(s){var l=this.charSizes[s];return l===void 0&&(l=this.charSizes[s]=this.$measureCharWidth(s)/this.$characterSize.width),l},o.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},o.prototype.$getZoom=function(s){return!s||!s.parentElement?1:(window.getComputedStyle(s).zoom||1)*this.$getZoom(s.parentElement)},o.prototype.$initTransformMeasureNodes=function(){var s=function(l,h){return["div",{style:"position: absolute;top:"+l+"px;left:"+h+"px;"}]};this.els=L.buildDom([s(0,0),s(t,0),s(0,t),s(t,t)],this.el)},o.prototype.transformCoordinates=function(s,l){if(s){var h=this.$getZoom(this.el);s=d(1/h,s)}function S(I,F,H){var D=I[1]*F[0]-I[0]*F[1];return[(-F[1]*H[0]+F[0]*H[1])/D,(+I[1]*H[0]-I[0]*H[1])/D]}function p(I,F){return[I[0]-F[0],I[1]-F[1]]}function f(I,F){return[I[0]+F[0],I[1]+F[1]]}function d(I,F){return[I*F[0],I*F[1]]}this.els||this.$initTransformMeasureNodes();function $(I){var F=I.getBoundingClientRect();return[F.left,F.top]}var A=$(this.els[0]),w=$(this.els[1]),k=$(this.els[2]),y=$(this.els[3]),m=S(p(y,w),p(y,k),p(f(w,k),f(y,A))),g=d(1+m[0],p(w,A)),u=d(1+m[1],p(k,A));if(l){var v=l,C=m[0]*v[0]/t+m[1]*v[1]/t+1,E=f(d(v[0],g),d(v[1],u));return f(d(1/C/t,E),A)}var T=p(s,A),_=S(p(g,d(m[0],T)),p(u,d(m[1],T)),T);return d(t,_)},o}();e.prototype.$characterSize={width:0,height:0},x.implement(e.prototype,r),M.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(R,M,P){P.exports=` |
| 276 |
.ace_br1 {border-top-left-radius : 3px;} |
| 277 |
.ace_br2 {border-top-right-radius : 3px;} |
| 278 |
.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;} |
| 279 |
.ace_br4 {border-bottom-right-radius: 3px;} |
| 280 |
.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;} |
| 281 |
.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;} |
| 282 |
.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;} |
| 283 |
.ace_br8 {border-bottom-left-radius : 3px;} |
| 284 |
.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;} |
| 285 |
.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;} |
| 286 |
.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;} |
| 287 |
.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} |
| 288 |
.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} |
| 289 |
.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} |
| 290 |
.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} |
| 291 |
|
| 292 |
|
| 293 |
.ace_editor { |
| 294 |
position: relative; |
| 295 |
overflow: hidden; |
| 296 |
padding: 0; |
| 297 |
font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace; |
| 298 |
direction: ltr; |
| 299 |
text-align: left; |
| 300 |
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); |
| 301 |
} |
| 302 |
|
| 303 |
.ace_scroller { |
| 304 |
position: absolute; |
| 305 |
overflow: hidden; |
| 306 |
top: 0; |
| 307 |
bottom: 0; |
| 308 |
background-color: inherit; |
| 309 |
-ms-user-select: none; |
| 310 |
-moz-user-select: none; |
| 311 |
-webkit-user-select: none; |
| 312 |
user-select: none; |
| 313 |
cursor: text; |
| 314 |
} |
| 315 |
|
| 316 |
.ace_content { |
| 317 |
position: absolute; |
| 318 |
box-sizing: border-box; |
| 319 |
min-width: 100%; |
| 320 |
contain: style size layout; |
| 321 |
font-variant-ligatures: no-common-ligatures; |
| 322 |
} |
| 323 |
|
| 324 |
.ace_keyboard-focus:focus { |
| 325 |
box-shadow: inset 0 0 0 2px #5E9ED6; |
| 326 |
outline: none; |
| 327 |
} |
| 328 |
|
| 329 |
.ace_dragging .ace_scroller:before{ |
| 330 |
position: absolute; |
| 331 |
top: 0; |
| 332 |
left: 0; |
| 333 |
right: 0; |
| 334 |
bottom: 0; |
| 335 |
content: ''; |
| 336 |
background: rgba(250, 250, 250, 0.01); |
| 337 |
z-index: 1000; |
| 338 |
} |
| 339 |
.ace_dragging.ace_dark .ace_scroller:before{ |
| 340 |
background: rgba(0, 0, 0, 0.01); |
| 341 |
} |
| 342 |
|
| 343 |
.ace_gutter { |
| 344 |
position: absolute; |
| 345 |
overflow : hidden; |
| 346 |
width: auto; |
| 347 |
top: 0; |
| 348 |
bottom: 0; |
| 349 |
left: 0; |
| 350 |
cursor: default; |
| 351 |
z-index: 4; |
| 352 |
-ms-user-select: none; |
| 353 |
-moz-user-select: none; |
| 354 |
-webkit-user-select: none; |
| 355 |
user-select: none; |
| 356 |
contain: style size layout; |
| 357 |
} |
| 358 |
|
| 359 |
.ace_gutter-active-line { |
| 360 |
position: absolute; |
| 361 |
left: 0; |
| 362 |
right: 0; |
| 363 |
} |
| 364 |
|
| 365 |
.ace_scroller.ace_scroll-left:after { |
| 366 |
content: ""; |
| 367 |
position: absolute; |
| 368 |
top: 0; |
| 369 |
right: 0; |
| 370 |
bottom: 0; |
| 371 |
left: 0; |
| 372 |
box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset; |
| 373 |
pointer-events: none; |
| 374 |
} |
| 375 |
|
| 376 |
.ace_gutter-cell, .ace_gutter-cell_svg-icons { |
| 377 |
position: absolute; |
| 378 |
top: 0; |
| 379 |
left: 0; |
| 380 |
right: 0; |
| 381 |
padding-left: 19px; |
| 382 |
padding-right: 6px; |
| 383 |
background-repeat: no-repeat; |
| 384 |
} |
| 385 |
|
| 386 |
.ace_gutter-cell_svg-icons .ace_gutter_annotation { |
| 387 |
margin-left: -14px; |
| 388 |
float: left; |
| 389 |
} |
| 390 |
|
| 391 |
.ace_gutter-cell .ace_gutter_annotation { |
| 392 |
margin-left: -19px; |
| 393 |
float: left; |
| 394 |
} |
| 395 |
|
| 396 |
.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold { |
| 397 |
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg=="); |
| 398 |
background-repeat: no-repeat; |
| 399 |
background-position: 2px center; |
| 400 |
} |
| 401 |
|
| 402 |
.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold { |
| 403 |
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg=="); |
| 404 |
background-repeat: no-repeat; |
| 405 |
background-position: 2px center; |
| 406 |
} |
| 407 |
|
| 408 |
.ace_gutter-cell.ace_info, .ace_icon.ace_info { |
| 409 |
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII="); |
| 410 |
background-repeat: no-repeat; |
| 411 |
background-position: 2px center; |
| 412 |
} |
| 413 |
.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info { |
| 414 |
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC"); |
| 415 |
} |
| 416 |
|
| 417 |
.ace_icon_svg.ace_error { |
| 418 |
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+"); |
| 419 |
background-color: crimson; |
| 420 |
} |
| 421 |
.ace_icon_svg.ace_warning { |
| 422 |
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg=="); |
| 423 |
background-color: darkorange; |
| 424 |
} |
| 425 |
.ace_icon_svg.ace_info { |
| 426 |
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg=="); |
| 427 |
background-color: royalblue; |
| 428 |
} |
| 429 |
|
| 430 |
.ace_icon_svg.ace_error_fold { |
| 431 |
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); |
| 432 |
background-color: crimson; |
| 433 |
} |
| 434 |
.ace_icon_svg.ace_warning_fold { |
| 435 |
-webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4="); |
| 436 |
background-color: darkorange; |
| 437 |
} |
| 438 |
|
| 439 |
.ace_scrollbar { |
| 440 |
contain: strict; |
| 441 |
position: absolute; |
| 442 |
right: 0; |
| 443 |
bottom: 0; |
| 444 |
z-index: 6; |
| 445 |
} |
| 446 |
|
| 447 |
.ace_scrollbar-inner { |
| 448 |
position: absolute; |
| 449 |
cursor: text; |
| 450 |
left: 0; |
| 451 |
top: 0; |
| 452 |
} |
| 453 |
|
| 454 |
.ace_scrollbar-v{ |
| 455 |
overflow-x: hidden; |
| 456 |
overflow-y: scroll; |
| 457 |
top: 0; |
| 458 |
} |
| 459 |
|
| 460 |
.ace_scrollbar-h { |
| 461 |
overflow-x: scroll; |
| 462 |
overflow-y: hidden; |
| 463 |
left: 0; |
| 464 |
} |
| 465 |
|
| 466 |
.ace_print-margin { |
| 467 |
position: absolute; |
| 468 |
height: 100%; |
| 469 |
} |
| 470 |
|
| 471 |
.ace_text-input { |
| 472 |
position: absolute; |
| 473 |
z-index: 0; |
| 474 |
width: 0.5em; |
| 475 |
height: 1em; |
| 476 |
opacity: 0; |
| 477 |
background: transparent; |
| 478 |
-moz-appearance: none; |
| 479 |
appearance: none; |
| 480 |
border: none; |
| 481 |
resize: none; |
| 482 |
outline: none; |
| 483 |
overflow: hidden; |
| 484 |
font: inherit; |
| 485 |
padding: 0 1px; |
| 486 |
margin: 0 -1px; |
| 487 |
contain: strict; |
| 488 |
-ms-user-select: text; |
| 489 |
-moz-user-select: text; |
| 490 |
-webkit-user-select: text; |
| 491 |
user-select: text; |
| 492 |
/*with \`pre-line\` chrome inserts instead of space*/ |
| 493 |
white-space: pre!important; |
| 494 |
} |
| 495 |
.ace_text-input.ace_composition { |
| 496 |
background: transparent; |
| 497 |
color: inherit; |
| 498 |
z-index: 1000; |
| 499 |
opacity: 1; |
| 500 |
} |
| 501 |
.ace_composition_placeholder { color: transparent } |
| 502 |
.ace_composition_marker { |
| 503 |
border-bottom: 1px solid; |
| 504 |
position: absolute; |
| 505 |
border-radius: 0; |
| 506 |
margin-top: 1px; |
| 507 |
} |
| 508 |
|
| 509 |
[ace_nocontext=true] { |
| 510 |
transform: none!important; |
| 511 |
filter: none!important; |
| 512 |
clip-path: none!important; |
| 513 |
mask : none!important; |
| 514 |
contain: none!important; |
| 515 |
perspective: none!important; |
| 516 |
mix-blend-mode: initial!important; |
| 517 |
z-index: auto; |
| 518 |
} |
| 519 |
|
| 520 |
.ace_layer { |
| 521 |
z-index: 1; |
| 522 |
position: absolute; |
| 523 |
overflow: hidden; |
| 524 |
/* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/ |
| 525 |
word-wrap: normal; |
| 526 |
white-space: pre; |
| 527 |
height: 100%; |
| 528 |
width: 100%; |
| 529 |
box-sizing: border-box; |
| 530 |
/* setting pointer-events: auto; on node under the mouse, which changes |
| 531 |
during scroll, will break mouse wheel scrolling in Safari */ |
| 532 |
pointer-events: none; |
| 533 |
} |
| 534 |
|
| 535 |
.ace_gutter-layer { |
| 536 |
position: relative; |
| 537 |
width: auto; |
| 538 |
text-align: right; |
| 539 |
pointer-events: auto; |
| 540 |
height: 1000000px; |
| 541 |
contain: style size layout; |
| 542 |
} |
| 543 |
|
| 544 |
.ace_text-layer { |
| 545 |
font: inherit !important; |
| 546 |
position: absolute; |
| 547 |
height: 1000000px; |
| 548 |
width: 1000000px; |
| 549 |
contain: style size layout; |
| 550 |
} |
| 551 |
|
| 552 |
.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group { |
| 553 |
contain: style size layout; |
| 554 |
position: absolute; |
| 555 |
top: 0; |
| 556 |
left: 0; |
| 557 |
right: 0; |
| 558 |
} |
| 559 |
|
| 560 |
.ace_hidpi .ace_text-layer, |
| 561 |
.ace_hidpi .ace_gutter-layer, |
| 562 |
.ace_hidpi .ace_content, |
| 563 |
.ace_hidpi .ace_gutter { |
| 564 |
contain: strict; |
| 565 |
} |
| 566 |
.ace_hidpi .ace_text-layer > .ace_line, |
| 567 |
.ace_hidpi .ace_text-layer > .ace_line_group { |
| 568 |
contain: strict; |
| 569 |
} |
| 570 |
|
| 571 |
.ace_cjk { |
| 572 |
display: inline-block; |
| 573 |
text-align: center; |
| 574 |
} |
| 575 |
|
| 576 |
.ace_cursor-layer { |
| 577 |
z-index: 4; |
| 578 |
} |
| 579 |
|
| 580 |
.ace_cursor { |
| 581 |
z-index: 4; |
| 582 |
position: absolute; |
| 583 |
box-sizing: border-box; |
| 584 |
border-left: 2px solid; |
| 585 |
/* workaround for smooth cursor repaintng whole screen in chrome */ |
| 586 |
transform: translatez(0); |
| 587 |
} |
| 588 |
|
| 589 |
.ace_multiselect .ace_cursor { |
| 590 |
border-left-width: 1px; |
| 591 |
} |
| 592 |
|
| 593 |
.ace_slim-cursors .ace_cursor { |
| 594 |
border-left-width: 1px; |
| 595 |
} |
| 596 |
|
| 597 |
.ace_overwrite-cursors .ace_cursor { |
| 598 |
border-left-width: 0; |
| 599 |
border-bottom: 1px solid; |
| 600 |
} |
| 601 |
|
| 602 |
.ace_hidden-cursors .ace_cursor { |
| 603 |
opacity: 0.2; |
| 604 |
} |
| 605 |
|
| 606 |
.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor { |
| 607 |
opacity: 0; |
| 608 |
} |
| 609 |
|
| 610 |
.ace_smooth-blinking .ace_cursor { |
| 611 |
transition: opacity 0.18s; |
| 612 |
} |
| 613 |
|
| 614 |
.ace_animate-blinking .ace_cursor { |
| 615 |
animation-duration: 1000ms; |
| 616 |
animation-timing-function: step-end; |
| 617 |
animation-name: blink-ace-animate; |
| 618 |
animation-iteration-count: infinite; |
| 619 |
} |
| 620 |
|
| 621 |
.ace_animate-blinking.ace_smooth-blinking .ace_cursor { |
| 622 |
animation-duration: 1000ms; |
| 623 |
animation-timing-function: ease-in-out; |
| 624 |
animation-name: blink-ace-animate-smooth; |
| 625 |
} |
| 626 |
|
| 627 |
@keyframes blink-ace-animate { |
| 628 |
from, to { opacity: 1; } |
| 629 |
60% { opacity: 0; } |
| 630 |
} |
| 631 |
|
| 632 |
@keyframes blink-ace-animate-smooth { |
| 633 |
from, to { opacity: 1; } |
| 634 |
45% { opacity: 1; } |
| 635 |
60% { opacity: 0; } |
| 636 |
85% { opacity: 0; } |
| 637 |
} |
| 638 |
|
| 639 |
.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack { |
| 640 |
position: absolute; |
| 641 |
z-index: 3; |
| 642 |
} |
| 643 |
|
| 644 |
.ace_marker-layer .ace_selection { |
| 645 |
position: absolute; |
| 646 |
z-index: 5; |
| 647 |
} |
| 648 |
|
| 649 |
.ace_marker-layer .ace_bracket { |
| 650 |
position: absolute; |
| 651 |
z-index: 6; |
| 652 |
} |
| 653 |
|
| 654 |
.ace_marker-layer .ace_error_bracket { |
| 655 |
position: absolute; |
| 656 |
border-bottom: 1px solid #DE5555; |
| 657 |
border-radius: 0; |
| 658 |
} |
| 659 |
|
| 660 |
.ace_marker-layer .ace_active-line { |
| 661 |
position: absolute; |
| 662 |
z-index: 2; |
| 663 |
} |
| 664 |
|
| 665 |
.ace_marker-layer .ace_selected-word { |
| 666 |
position: absolute; |
| 667 |
z-index: 4; |
| 668 |
box-sizing: border-box; |
| 669 |
} |
| 670 |
|
| 671 |
.ace_line .ace_fold { |
| 672 |
box-sizing: border-box; |
| 673 |
|
| 674 |
display: inline-block; |
| 675 |
height: 11px; |
| 676 |
margin-top: -2px; |
| 677 |
vertical-align: middle; |
| 678 |
|
| 679 |
background-image: |
| 680 |
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), |
| 681 |
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII="); |
| 682 |
background-repeat: no-repeat, repeat-x; |
| 683 |
background-position: center center, top left; |
| 684 |
color: transparent; |
| 685 |
|
| 686 |
border: 1px solid black; |
| 687 |
border-radius: 2px; |
| 688 |
|
| 689 |
cursor: pointer; |
| 690 |
pointer-events: auto; |
| 691 |
} |
| 692 |
|
| 693 |
.ace_dark .ace_fold { |
| 694 |
} |
| 695 |
|
| 696 |
.ace_fold:hover{ |
| 697 |
background-image: |
| 698 |
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), |
| 699 |
url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC"); |
| 700 |
} |
| 701 |
|
| 702 |
.ace_tooltip { |
| 703 |
background-color: #f5f5f5; |
| 704 |
border: 1px solid gray; |
| 705 |
border-radius: 1px; |
| 706 |
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); |
| 707 |
color: black; |
| 708 |
max-width: 100%; |
| 709 |
padding: 3px 4px; |
| 710 |
position: fixed; |
| 711 |
z-index: 999999; |
| 712 |
box-sizing: border-box; |
| 713 |
cursor: default; |
| 714 |
white-space: pre-wrap; |
| 715 |
word-wrap: break-word; |
| 716 |
line-height: normal; |
| 717 |
font-style: normal; |
| 718 |
font-weight: normal; |
| 719 |
letter-spacing: normal; |
| 720 |
pointer-events: none; |
| 721 |
overflow: auto; |
| 722 |
max-width: min(60em, 66vw); |
| 723 |
overscroll-behavior: contain; |
| 724 |
} |
| 725 |
.ace_tooltip pre { |
| 726 |
white-space: pre-wrap; |
| 727 |
} |
| 728 |
|
| 729 |
.ace_tooltip.ace_dark { |
| 730 |
background-color: #636363; |
| 731 |
color: #fff; |
| 732 |
} |
| 733 |
|
| 734 |
.ace_tooltip:focus { |
| 735 |
outline: 1px solid #5E9ED6; |
| 736 |
} |
| 737 |
|
| 738 |
.ace_icon { |
| 739 |
display: inline-block; |
| 740 |
width: 18px; |
| 741 |
vertical-align: top; |
| 742 |
} |
| 743 |
|
| 744 |
.ace_icon_svg { |
| 745 |
display: inline-block; |
| 746 |
width: 12px; |
| 747 |
vertical-align: top; |
| 748 |
-webkit-mask-repeat: no-repeat; |
| 749 |
-webkit-mask-size: 12px; |
| 750 |
-webkit-mask-position: center; |
| 751 |
} |
| 752 |
|
| 753 |
.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons { |
| 754 |
padding-right: 13px; |
| 755 |
} |
| 756 |
|
| 757 |
.ace_fold-widget { |
| 758 |
box-sizing: border-box; |
| 759 |
|
| 760 |
margin: 0 -12px 0 1px; |
| 761 |
display: none; |
| 762 |
width: 11px; |
| 763 |
vertical-align: top; |
| 764 |
|
| 765 |
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg=="); |
| 766 |
background-repeat: no-repeat; |
| 767 |
background-position: center; |
| 768 |
|
| 769 |
border-radius: 3px; |
| 770 |
|
| 771 |
border: 1px solid transparent; |
| 772 |
cursor: pointer; |
| 773 |
} |
| 774 |
|
| 775 |
.ace_folding-enabled .ace_fold-widget { |
| 776 |
display: inline-block; |
| 777 |
} |
| 778 |
|
| 779 |
.ace_fold-widget.ace_end { |
| 780 |
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg=="); |
| 781 |
} |
| 782 |
|
| 783 |
.ace_fold-widget.ace_closed { |
| 784 |
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA=="); |
| 785 |
} |
| 786 |
|
| 787 |
.ace_fold-widget:hover { |
| 788 |
border: 1px solid rgba(0, 0, 0, 0.3); |
| 789 |
background-color: rgba(255, 255, 255, 0.2); |
| 790 |
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); |
| 791 |
} |
| 792 |
|
| 793 |
.ace_fold-widget:active { |
| 794 |
border: 1px solid rgba(0, 0, 0, 0.4); |
| 795 |
background-color: rgba(0, 0, 0, 0.05); |
| 796 |
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); |
| 797 |
} |
| 798 |
/** |
| 799 |
* Dark version for fold widgets |
| 800 |
*/ |
| 801 |
.ace_dark .ace_fold-widget { |
| 802 |
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC"); |
| 803 |
} |
| 804 |
.ace_dark .ace_fold-widget.ace_end { |
| 805 |
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg=="); |
| 806 |
} |
| 807 |
.ace_dark .ace_fold-widget.ace_closed { |
| 808 |
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg=="); |
| 809 |
} |
| 810 |
.ace_dark .ace_fold-widget:hover { |
| 811 |
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); |
| 812 |
background-color: rgba(255, 255, 255, 0.1); |
| 813 |
} |
| 814 |
.ace_dark .ace_fold-widget:active { |
| 815 |
box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); |
| 816 |
} |
| 817 |
|
| 818 |
.ace_inline_button { |
| 819 |
border: 1px solid lightgray; |
| 820 |
display: inline-block; |
| 821 |
margin: -1px 8px; |
| 822 |
padding: 0 5px; |
| 823 |
pointer-events: auto; |
| 824 |
cursor: pointer; |
| 825 |
} |
| 826 |
.ace_inline_button:hover { |
| 827 |
border-color: gray; |
| 828 |
background: rgba(200,200,200,0.2); |
| 829 |
display: inline-block; |
| 830 |
pointer-events: auto; |
| 831 |
} |
| 832 |
|
| 833 |
.ace_fold-widget.ace_invalid { |
| 834 |
background-color: #FFB4B4; |
| 835 |
border-color: #DE5555; |
| 836 |
} |
| 837 |
|
| 838 |
.ace_fade-fold-widgets .ace_fold-widget { |
| 839 |
transition: opacity 0.4s ease 0.05s; |
| 840 |
opacity: 0; |
| 841 |
} |
| 842 |
|
| 843 |
.ace_fade-fold-widgets:hover .ace_fold-widget { |
| 844 |
transition: opacity 0.05s ease 0.05s; |
| 845 |
opacity:1; |
| 846 |
} |
| 847 |
|
| 848 |
.ace_underline { |
| 849 |
text-decoration: underline; |
| 850 |
} |
| 851 |
|
| 852 |
.ace_bold { |
| 853 |
font-weight: bold; |
| 854 |
} |
| 855 |
|
| 856 |
.ace_nobold .ace_bold { |
| 857 |
font-weight: normal; |
| 858 |
} |
| 859 |
|
| 860 |
.ace_italic { |
| 861 |
font-style: italic; |
| 862 |
} |
| 863 |
|
| 864 |
|
| 865 |
.ace_error-marker { |
| 866 |
background-color: rgba(255, 0, 0,0.2); |
| 867 |
position: absolute; |
| 868 |
z-index: 9; |
| 869 |
} |
| 870 |
|
| 871 |
.ace_highlight-marker { |
| 872 |
background-color: rgba(255, 255, 0,0.2); |
| 873 |
position: absolute; |
| 874 |
z-index: 8; |
| 875 |
} |
| 876 |
|
| 877 |
.ace_mobile-menu { |
| 878 |
position: absolute; |
| 879 |
line-height: 1.5; |
| 880 |
border-radius: 4px; |
| 881 |
-ms-user-select: none; |
| 882 |
-moz-user-select: none; |
| 883 |
-webkit-user-select: none; |
| 884 |
user-select: none; |
| 885 |
background: white; |
| 886 |
box-shadow: 1px 3px 2px grey; |
| 887 |
border: 1px solid #dcdcdc; |
| 888 |
color: black; |
| 889 |
} |
| 890 |
.ace_dark > .ace_mobile-menu { |
| 891 |
background: #333; |
| 892 |
color: #ccc; |
| 893 |
box-shadow: 1px 3px 2px grey; |
| 894 |
border: 1px solid #444; |
| 895 |
|
| 896 |
} |
| 897 |
.ace_mobile-button { |
| 898 |
padding: 2px; |
| 899 |
cursor: pointer; |
| 900 |
overflow: hidden; |
| 901 |
} |
| 902 |
.ace_mobile-button:hover { |
| 903 |
background-color: #eee; |
| 904 |
opacity:1; |
| 905 |
} |
| 906 |
.ace_mobile-button:active { |
| 907 |
background-color: #ddd; |
| 908 |
} |
| 909 |
|
| 910 |
.ace_placeholder { |
| 911 |
font-family: arial; |
| 912 |
transform: scale(0.9); |
| 913 |
transform-origin: left; |
| 914 |
white-space: pre; |
| 915 |
opacity: 0.7; |
| 916 |
margin: 0 10px; |
| 917 |
} |
| 918 |
|
| 919 |
.ace_ghost_text { |
| 920 |
opacity: 0.5; |
| 921 |
font-style: italic; |
| 922 |
white-space: pre; |
| 923 |
} |
| 924 |
|
| 925 |
.ace_screenreader-only { |
| 926 |
position:absolute; |
| 927 |
left:-10000px; |
| 928 |
top:auto; |
| 929 |
width:1px; |
| 930 |
height:1px; |
| 931 |
overflow:hidden; |
| 932 |
}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(R,M,P){var x=R("../lib/dom"),L=R("../lib/oop"),b=R("../lib/event_emitter").EventEmitter,a=function(){function c(r,n){this.canvas=x.createElement("canvas"),this.renderer=n,this.pixelRatio=1,this.maxHeight=n.layerConfig.maxHeight,this.lineHeight=n.layerConfig.lineHeight,this.canvasHeight=r.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=r.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},r.element.appendChild(this.canvas)}return c.prototype.$updateDecorators=function(r){var n=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(r){this.maxHeight=r.maxHeight,this.lineHeight=r.lineHeight,this.canvasHeight=r.height;var i=(r.lastRow+1)*this.lineHeight;i<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var t=this.canvas.getContext("2d");function e(y,m){return y.priority<m.priority?-1:y.priority>m.priority?1:0}var o=this.renderer.session.$annotations;if(t.clearRect(0,0,this.canvas.width,this.canvas.height),o){var s={info:1,warning:2,error:3};o.forEach(function(y){y.priority=s[y.type]||null}),o=o.sort(e);for(var l=this.renderer.session.$foldData,h=0;h<o.length;h++){var S=o[h].row,p=this.compensateFoldRows(S,l),f=Math.round((S-p)*this.lineHeight*this.heightRatio),d=Math.round((S-p)*this.lineHeight*this.heightRatio),$=Math.round(((S-p)*this.lineHeight+this.lineHeight)*this.heightRatio),A=$-d;if(A<this.minDecorationHeight){var w=(d+$)/2|0;w<this.halfMinDecorationHeight?w=this.halfMinDecorationHeight:w+this.halfMinDecorationHeight>this.canvasHeight&&(w=this.canvasHeight-this.halfMinDecorationHeight),d=Math.round(w-this.halfMinDecorationHeight),$=Math.round(w+this.halfMinDecorationHeight)}t.fillStyle=n[o[h].type]||null,t.fillRect(0,f,this.canvasWidth,$-d)}}var k=this.renderer.session.selection.getCursor();if(k){var p=this.compensateFoldRows(k.row,l),f=Math.round((k.row-p)*this.lineHeight*this.heightRatio);t.fillStyle="rgba(0, 0, 0, 0.5)",t.fillRect(0,f,this.canvasWidth,2)}},c.prototype.compensateFoldRows=function(r,n){var i=0;if(n&&n.length>0)for(var t=0;t<n.length;t++)r>n[t].start.row&&r<n[t].end.row?i+=r-n[t].start.row:r>=n[t].end.row&&(i+=n[t].end.row-n[t].start.row);return i},c}();L.implement(a.prototype,b),M.Decorator=a}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent"],function(R,M,P){var x=R("./lib/oop"),L=R("./lib/dom"),b=R("./lib/lang"),a=R("./config"),c=R("./layer/gutter").Gutter,r=R("./layer/marker").Marker,n=R("./layer/text").Text,i=R("./layer/cursor").Cursor,t=R("./scrollbar").HScrollBar,e=R("./scrollbar").VScrollBar,o=R("./scrollbar_custom").HScrollBar,s=R("./scrollbar_custom").VScrollBar,l=R("./renderloop").RenderLoop,h=R("./layer/font_metrics").FontMetrics,S=R("./lib/event_emitter").EventEmitter,p=R("./css/editor-css"),f=R("./layer/decorators").Decorator,d=R("./lib/useragent");L.importCssString(p,"ace_editor.css",!1);var $=function(){function A(w,k){var y=this;this.container=w||L.createElement("div"),L.addCssClass(this.container,"ace_editor"),L.HI_DPI&&L.addCssClass(this.container,"ace_hidpi"),this.setTheme(k),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=L.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=L.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=L.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new c(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new r(this.content);var m=this.$textLayer=new n(this.content);this.canvas=m.element,this.$markerFront=new r(this.content),this.$cursorLayer=new i(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new e(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.on("scroll",function(g){y.$scrollAnimation||y.session.setScrollTop(g.data-y.scrollMargin.top)}),this.scrollBarH.on("scroll",function(g){y.$scrollAnimation||y.session.setScrollLeft(g.data-y.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new h(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(g){y.updateCharacterSize(),y.onResize(!0,y.gutterWidth,y.$size.width,y.$size.height),y._signal("changeCharacterSize",g)}),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.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!d.isIOS,this.$loop=new l(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return A.prototype.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(),L.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},A.prototype.setSession=function(w){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=w,w&&this.scrollMargin.top&&w.getScrollTop()<=0&&w.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(w),this.$markerBack.setSession(w),this.$markerFront.setSession(w),this.$gutterLayer.setSession(w),this.$textLayer.setSession(w),w&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},A.prototype.updateLines=function(w,k,y){if(k===void 0&&(k=1/0),this.$changedLines?(this.$changedLines.firstRow>w&&(this.$changedLines.firstRow=w),this.$changedLines.lastRow<k&&(this.$changedLines.lastRow=k)):this.$changedLines={firstRow:w,lastRow:k},this.$changedLines.lastRow<this.layerConfig.firstRow)if(y)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},A.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},A.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},A.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},A.prototype.updateFull=function(w){w?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},A.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},A.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},A.prototype.onResize=function(w,k,y,m){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=w?1:0;var g=this.container;m||(m=g.clientHeight||g.scrollHeight),y||(y=g.clientWidth||g.scrollWidth);var u=this.$updateCachedSize(w,k,y,m);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!y&&!m)return this.resizing=0;w&&(this.$gutterLayer.$padding=null),w?this.$renderChanges(u|this.$changes,!0):this.$loop.schedule(u|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},A.prototype.$updateCachedSize=function(w,k,y,m){m-=this.$extraHeight||0;var g=0,u=this.$size,v={width:u.width,height:u.height,scrollerHeight:u.scrollerHeight,scrollerWidth:u.scrollerWidth};if(m&&(w||u.height!=m)&&(u.height=m,g|=this.CHANGE_SIZE,u.scrollerHeight=u.height,this.$horizScroll&&(u.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(u.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",g=g|this.CHANGE_SCROLL),y&&(w||u.width!=y)){g|=this.CHANGE_SIZE,u.width=y,k==null&&(k=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=k,L.setStyle(this.scrollBarH.element.style,"left",k+"px"),L.setStyle(this.scroller.style,"left",k+this.margin.left+"px"),u.scrollerWidth=Math.max(0,y-k-this.scrollBarV.getWidth()-this.margin.h),L.setStyle(this.$gutter.style,"left",this.margin.left+"px");var C=this.scrollBarV.getWidth()+"px";L.setStyle(this.scrollBarH.element.style,"right",C),L.setStyle(this.scroller.style,"right",C),L.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(u.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||w)&&(g|=this.CHANGE_FULL)}return u.$dirty=!y||!m,g&&this._signal("resize",v),g},A.prototype.onGutterResize=function(w){var k=this.$showGutter?w:0;k!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,k,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},A.prototype.adjustWrapLimit=function(){var w=this.$size.scrollerWidth-this.$padding*2,k=Math.floor(w/this.characterWidth);return this.session.adjustWrapLimit(k,this.$showPrintMargin&&this.$printMarginColumn)},A.prototype.setAnimatedScroll=function(w){this.setOption("animatedScroll",w)},A.prototype.getAnimatedScroll=function(){return this.$animatedScroll},A.prototype.setShowInvisibles=function(w){this.setOption("showInvisibles",w),this.session.$bidiHandler.setShowInvisibles(w)},A.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},A.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},A.prototype.setDisplayIndentGuides=function(w){this.setOption("displayIndentGuides",w)},A.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},A.prototype.setHighlightIndentGuides=function(w){this.setOption("highlightIndentGuides",w)},A.prototype.setShowPrintMargin=function(w){this.setOption("showPrintMargin",w)},A.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},A.prototype.setPrintMarginColumn=function(w){this.setOption("printMarginColumn",w)},A.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},A.prototype.getShowGutter=function(){return this.getOption("showGutter")},A.prototype.setShowGutter=function(w){return this.setOption("showGutter",w)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.setFadeFoldWidgets=function(w){this.setOption("fadeFoldWidgets",w)},A.prototype.setHighlightGutterLine=function(w){this.setOption("highlightGutterLine",w)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var w=L.createElement("div");w.className="ace_layer ace_print-margin-layer",this.$printMarginEl=L.createElement("div"),this.$printMarginEl.className="ace_print-margin",w.appendChild(this.$printMarginEl),this.content.insertBefore(w,this.content.firstChild)}var k=this.$printMarginEl.style;k.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",k.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},A.prototype.getContainerElement=function(){return this.container},A.prototype.getMouseEventTarget=function(){return this.scroller},A.prototype.getTextAreaContainer=function(){return this.container},A.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var w=this.textarea.style,k=this.$composition;if(!this.$keepTextAreaAtCursor&&!k){L.translate(this.textarea,-100,0);return}var y=this.$cursorLayer.$pixelPos;if(y){k&&k.markerRange&&(y=this.$cursorLayer.getPixelPosition(k.markerRange.start,!0));var m=this.layerConfig,g=y.top,u=y.left;g-=m.offset;var v=k&&k.useTextareaForIME||d.isMobile?this.lineHeight:1;if(g<0||g>m.height-v){L.translate(this.textarea,0,0);return}var C=1,E=this.$size.height-v;if(!k)g+=this.lineHeight;else if(k.useTextareaForIME){var T=this.textarea.value;C=this.characterWidth*this.session.$getStringScreenWidth(T)[0]}else g+=this.lineHeight+2;u-=this.scrollLeft,u>this.$size.scrollerWidth-C&&(u=this.$size.scrollerWidth-C),u+=this.gutterWidth+this.margin.left,L.setStyle(w,"height",v+"px"),L.setStyle(w,"width",C+"px"),L.translate(this.textarea,Math.min(u,this.$size.scrollerWidth-C),Math.min(g,E))}}},A.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},A.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},A.prototype.getLastFullyVisibleRow=function(){var w=this.layerConfig,k=w.lastRow,y=this.session.documentToScreenRow(k,0)*w.lineHeight;return y-this.session.getScrollTop()>w.height-w.lineHeight?k-1:k},A.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},A.prototype.setPadding=function(w){this.$padding=w,this.$textLayer.setPadding(w),this.$cursorLayer.setPadding(w),this.$markerFront.setPadding(w),this.$markerBack.setPadding(w),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},A.prototype.setScrollMargin=function(w,k,y,m){var g=this.scrollMargin;g.top=w|0,g.bottom=k|0,g.right=m|0,g.left=y|0,g.v=g.top+g.bottom,g.h=g.left+g.right,g.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-g.top),this.updateFull()},A.prototype.setMargin=function(w,k,y,m){var g=this.margin;g.top=w|0,g.bottom=k|0,g.right=m|0,g.left=y|0,g.v=g.top+g.bottom,g.h=g.left+g.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},A.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},A.prototype.setHScrollBarAlwaysVisible=function(w){this.setOption("hScrollBarAlwaysVisible",w)},A.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},A.prototype.setVScrollBarAlwaysVisible=function(w){this.setOption("vScrollBarAlwaysVisible",w)},A.prototype.$updateScrollBarV=function(){var w=this.layerConfig.maxHeight,k=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(w-=(k-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>w-k&&(w=this.scrollTop+k,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(w+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},A.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},A.prototype.freeze=function(){this.$frozen=!0},A.prototype.unfreeze=function(){this.$frozen=!1},A.prototype.$renderChanges=function(w,k){if(this.$changes&&(w|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!w&&!k){this.$changes|=w;return}if(this.$size.$dirty)return this.$changes|=w,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",w),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var y=this.layerConfig;if(w&this.CHANGE_FULL||w&this.CHANGE_SIZE||w&this.CHANGE_TEXT||w&this.CHANGE_LINES||w&this.CHANGE_SCROLL||w&this.CHANGE_H_SCROLL){if(w|=this.$computeLayerConfig()|this.$loop.clear(),y.firstRow!=this.layerConfig.firstRow&&y.firstRowScreen==this.layerConfig.firstRowScreen){var m=this.scrollTop+(y.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;m>0&&(this.scrollTop=m,w=w|this.CHANGE_SCROLL,w|=this.$computeLayerConfig()|this.$loop.clear())}y=this.layerConfig,this.$updateScrollBarV(),w&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),L.translate(this.content,-this.scrollLeft,-y.offset);var g=y.width+2*this.$padding+"px",u=y.minHeight+"px";L.setStyle(this.content.style,"width",g),L.setStyle(this.content.style,"height",u)}if(w&this.CHANGE_H_SCROLL&&(L.translate(this.content,-this.scrollLeft,-y.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),w&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(y),this.$showGutter&&this.$gutterLayer.update(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y),this.$markerBack.update(y),this.$markerFront.update(y),this.$cursorLayer.update(y),this.$moveTextAreaToCursor(),this._signal("afterRender",w);return}if(w&this.CHANGE_SCROLL){this.$changedLines=null,w&this.CHANGE_TEXT||w&this.CHANGE_LINES?this.$textLayer.update(y):this.$textLayer.scrollLines(y),this.$showGutter&&(w&this.CHANGE_GUTTER||w&this.CHANGE_LINES?this.$gutterLayer.update(y):this.$gutterLayer.scrollLines(y)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y),this.$markerBack.update(y),this.$markerFront.update(y),this.$cursorLayer.update(y),this.$moveTextAreaToCursor(),this._signal("afterRender",w);return}w&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(y),this.$showGutter&&this.$gutterLayer.update(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y)):w&this.CHANGE_LINES?((this.$updateLines()||w&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y)):w&this.CHANGE_TEXT||w&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y)):w&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y)),w&this.CHANGE_CURSOR&&(this.$cursorLayer.update(y),this.$moveTextAreaToCursor()),w&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(y),w&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(y),this._signal("afterRender",w)},A.prototype.$autosize=function(){var w=this.session.getScreenLength()*this.lineHeight,k=this.$maxLines*this.lineHeight,y=Math.min(k,Math.max((this.$minLines||1)*this.lineHeight,w))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(y+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&y>this.$maxPixelHeight&&(y=this.$maxPixelHeight);var m=y<=2*this.lineHeight,g=!m&&w>k;if(y!=this.desiredHeight||this.$size.height!=this.desiredHeight||g!=this.$vScroll){g!=this.$vScroll&&(this.$vScroll=g,this.scrollBarV.setVisible(g));var u=this.container.clientWidth;this.container.style.height=y+"px",this.$updateCachedSize(!0,this.$gutterWidth,u,y),this.desiredHeight=y,this._signal("autosize")}},A.prototype.$computeLayerConfig=function(){var w=this.session,k=this.$size,y=k.height<=2*this.lineHeight,m=this.session.getScreenLength(),g=m*this.lineHeight,u=this.$getLongestLine(),v=!y&&(this.$hScrollBarAlwaysVisible||k.scrollerWidth-u-2*this.$padding<0),C=this.$horizScroll!==v;C&&(this.$horizScroll=v,this.scrollBarH.setVisible(v));var E=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var T=k.scrollerHeight+this.lineHeight,_=!this.$maxLines&&this.$scrollPastEnd?(k.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;g+=_;var I=this.scrollMargin;this.session.setScrollTop(Math.max(-I.top,Math.min(this.scrollTop,g-k.scrollerHeight+I.bottom))),this.session.setScrollLeft(Math.max(-I.left,Math.min(this.scrollLeft,u+2*this.$padding-k.scrollerWidth+I.right)));var F=!y&&(this.$vScrollBarAlwaysVisible||k.scrollerHeight-g+_<0||this.scrollTop>I.top),H=E!==F;H&&(this.$vScroll=F,this.scrollBarV.setVisible(F));var D=this.scrollTop%this.lineHeight,O=Math.ceil(T/this.lineHeight)-1,W=Math.max(0,Math.round((this.scrollTop-D)/this.lineHeight)),B=W+O,z,V,U=this.lineHeight;W=w.screenToDocumentRow(W,0);var G=w.getFoldLine(W);G&&(W=G.start.row),z=w.documentToScreenRow(W,0),V=w.getRowLength(W)*U,B=Math.min(w.screenToDocumentRow(B,0),w.getLength()-1),T=k.scrollerHeight+w.getRowLength(B)*U+V,D=this.scrollTop-z*U;var Y=0;return(this.layerConfig.width!=u||C)&&(Y=this.CHANGE_H_SCROLL),(C||H)&&(Y|=this.$updateCachedSize(!0,this.gutterWidth,k.width,k.height),this._signal("scrollbarVisibilityChanged"),H&&(u=this.$getLongestLine())),this.layerConfig={width:u,padding:this.$padding,firstRow:W,firstRowScreen:z,lastRow:B,lineHeight:U,characterWidth:this.characterWidth,minHeight:T,maxHeight:g,offset:D,gutterOffset:U?Math.max(0,Math.ceil((D+k.height-k.scrollerHeight)/U)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(u-this.$padding),Y},A.prototype.$updateLines=function(){if(this.$changedLines){var w=this.$changedLines.firstRow,k=this.$changedLines.lastRow;this.$changedLines=null;var y=this.layerConfig;if(!(w>y.lastRow+1)&&!(k<y.firstRow)){if(k===1/0){this.$showGutter&&this.$gutterLayer.update(y),this.$textLayer.update(y);return}return this.$textLayer.updateLines(y,w,k),!0}}},A.prototype.$getLongestLine=function(){var w=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(w+=1),this.$textLayer&&w>this.$textLayer.MAX_LINE_LENGTH&&(w=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(w*this.characterWidth))},A.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},A.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},A.prototype.addGutterDecoration=function(w,k){this.$gutterLayer.addGutterDecoration(w,k)},A.prototype.removeGutterDecoration=function(w,k){this.$gutterLayer.removeGutterDecoration(w,k)},A.prototype.updateBreakpoints=function(w){this._rows=w,this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.setAnnotations=function(w){this.$gutterLayer.setAnnotations(w),this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},A.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},A.prototype.showCursor=function(){this.$cursorLayer.showCursor()},A.prototype.scrollSelectionIntoView=function(w,k,y){this.scrollCursorIntoView(w,y),this.scrollCursorIntoView(k,y)},A.prototype.scrollCursorIntoView=function(w,k,y){if(this.$size.scrollerHeight!==0){var m=this.$cursorLayer.getPixelPosition(w),g=m.left,u=m.top,v=y&&y.top||0,C=y&&y.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var E=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;E+v>u?(k&&E+v>u+this.lineHeight&&(u-=k*this.$size.scrollerHeight),u===0&&(u=-this.scrollMargin.top),this.session.setScrollTop(u)):E+this.$size.scrollerHeight-C<u+this.lineHeight&&(k&&E+this.$size.scrollerHeight-C<u-this.lineHeight&&(u+=k*this.$size.scrollerHeight),this.session.setScrollTop(u+this.lineHeight+C-this.$size.scrollerHeight));var T=this.scrollLeft,_=2*this.layerConfig.characterWidth;g-_<T?(g-=_,g<this.$padding+_&&(g=-this.scrollMargin.left),this.session.setScrollLeft(g)):(g+=_,T+this.$size.scrollerWidth<g+this.characterWidth?this.session.setScrollLeft(Math.round(g+this.characterWidth-this.$size.scrollerWidth)):T<=this.$padding&&g-T<this.characterWidth&&this.session.setScrollLeft(0))}},A.prototype.getScrollTop=function(){return this.session.getScrollTop()},A.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},A.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},A.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},A.prototype.scrollToRow=function(w){this.session.setScrollTop(w*this.lineHeight)},A.prototype.alignCursor=function(w,k){typeof w=="number"&&(w={row:w,column:0});var y=this.$cursorLayer.getPixelPosition(w),m=this.$size.scrollerHeight-this.lineHeight,g=y.top-m*(k||0);return this.session.setScrollTop(g),g},A.prototype.$calcSteps=function(w,k){var y=0,m=this.STEPS,g=[],u=function(v,C,E){return E*(Math.pow(v-1,3)+1)+C};for(y=0;y<m;++y)g.push(u(y/this.STEPS,w,k-w));return g},A.prototype.scrollToLine=function(w,k,y,m){var g=this.$cursorLayer.getPixelPosition({row:w,column:0}),u=g.top;k&&(u-=this.$size.scrollerHeight/2);var v=this.scrollTop;this.session.setScrollTop(u),y!==!1&&this.animateScrolling(v,m)},A.prototype.animateScrolling=function(w,k){var y=this.scrollTop;if(!this.$animatedScroll)return;var m=this;if(w==y)return;if(this.$scrollAnimation){var g=this.$scrollAnimation.steps;if(g.length&&(w=g[0],w==y))return}var u=m.$calcSteps(w,y);this.$scrollAnimation={from:w,to:y,steps:u},clearInterval(this.$timer),m.session.setScrollTop(u.shift()),m.session.$scrollTop=y;function v(){m.$timer=clearInterval(m.$timer),m.$scrollAnimation=null,m.$stopAnimation=!1,k&&k()}this.$timer=setInterval(function(){if(m.$stopAnimation){v();return}if(!m.session)return clearInterval(m.$timer);u.length?(m.session.setScrollTop(u.shift()),m.session.$scrollTop=y):y!=null?(m.session.$scrollTop=-1,m.session.setScrollTop(y),y=null):v()},10)},A.prototype.scrollToY=function(w){this.scrollTop!==w&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=w)},A.prototype.scrollToX=function(w){this.scrollLeft!==w&&(this.scrollLeft=w),this.$loop.schedule(this.CHANGE_H_SCROLL)},A.prototype.scrollTo=function(w,k){this.session.setScrollTop(k),this.session.setScrollLeft(w)},A.prototype.scrollBy=function(w,k){k&&this.session.setScrollTop(this.session.getScrollTop()+k),w&&this.session.setScrollLeft(this.session.getScrollLeft()+w)},A.prototype.isScrollableBy=function(w,k){if(k<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||k>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||w<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||w>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},A.prototype.pixelToScreenCoordinates=function(w,k){var y;if(this.$hasCssTransforms){y={top:0,left:0};var m=this.$fontMetrics.transformCoordinates([w,k]);w=m[1]-this.gutterWidth-this.margin.left,k=m[0]}else y=this.scroller.getBoundingClientRect();var g=w+this.scrollLeft-y.left-this.$padding,u=g/this.characterWidth,v=Math.floor((k+this.scrollTop-y.top)/this.lineHeight),C=this.$blockCursor?Math.floor(u):Math.round(u);return{row:v,column:C,side:u-C>0?1:-1,offsetX:g}},A.prototype.screenToTextCoordinates=function(w,k){var y;if(this.$hasCssTransforms){y={top:0,left:0};var m=this.$fontMetrics.transformCoordinates([w,k]);w=m[1]-this.gutterWidth-this.margin.left,k=m[0]}else y=this.scroller.getBoundingClientRect();var g=w+this.scrollLeft-y.left-this.$padding,u=g/this.characterWidth,v=this.$blockCursor?Math.floor(u):Math.round(u),C=Math.floor((k+this.scrollTop-y.top)/this.lineHeight);return this.session.screenToDocumentPosition(C,Math.max(v,0),g)},A.prototype.textToScreenCoordinates=function(w,k){var y=this.scroller.getBoundingClientRect(),m=this.session.documentToScreenPosition(w,k),g=this.$padding+(this.session.$bidiHandler.isBidiRow(m.row,w)?this.session.$bidiHandler.getPosLeft(m.column):Math.round(m.column*this.characterWidth)),u=m.row*this.lineHeight;return{pageX:y.left+g-this.scrollLeft,pageY:y.top+u-this.scrollTop}},A.prototype.visualizeFocus=function(){L.addCssClass(this.container,"ace_focus")},A.prototype.visualizeBlur=function(){L.removeCssClass(this.container,"ace_focus")},A.prototype.showComposition=function(w){this.$composition=w,w.cssText||(w.cssText=this.textarea.style.cssText),w.useTextareaForIME==null&&(w.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(L.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):w.markerId=this.session.addMarker(w.markerRange,"ace_composition_marker","text")},A.prototype.setCompositionText=function(w){var k=this.session.selection.cursor;this.addToken(w,"composition_placeholder",k.row,k.column),this.$moveTextAreaToCursor()},A.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),L.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var w=this.session.selection.cursor;this.removeExtraToken(w.row,w.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},A.prototype.setGhostText=function(w,k){var y=this.session.selection.cursor,m=k||{row:y.row,column:y.column};this.removeGhostText();var g=w.split(` |
| 933 |
`);if(this.addToken(g[0],"ghost_text",m.row,m.column),this.$ghostText={text:w,position:{row:m.row,column:m.column}},g.length>1){this.$ghostTextWidget={text:g.slice(1).join(` |
| 934 |
`),row:m.row,column:m.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var u=this.$cursorLayer.getPixelPosition(m,!0),v=this.container,C=v.getBoundingClientRect().height,E=g.length*this.lineHeight,T=E<C-u.top;if(T)return;E<C?this.scrollBy(0,(g.length-1)*this.lineHeight):this.scrollBy(0,u.top)}},A.prototype.removeGhostText=function(){if(this.$ghostText){var w=this.$ghostText.position;this.removeExtraToken(w.row,w.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},A.prototype.addToken=function(w,k,y,m){var g=this.session;g.bgTokenizer.lines[y]=null;var u={type:k,value:w},v=g.getTokens(y);if(m==null||!v.length)v.push(u);else for(var C=0,E=0;E<v.length;E++){var T=v[E];if(C+=T.value.length,m<=C){var _=T.value.length-(C-m),I=T.value.slice(0,_),F=T.value.slice(_);v.splice(E,1,{type:T.type,value:I},u,{type:T.type,value:F});break}}this.updateLines(y,y)},A.prototype.removeExtraToken=function(w,k){this.session.bgTokenizer.lines[w]=null,this.updateLines(w,w)},A.prototype.setTheme=function(w,k){var y=this;if(this.$themeId=w,y._dispatchEvent("themeChange",{theme:w}),!w||typeof w=="string"){var m=w||this.$options.theme.initialValue;a.loadModule(["theme",m],g)}else g(w);function g(u){if(y.$themeId!=w)return k&&k();if(!u||!u.cssClass)throw new Error("couldn't load module "+w+" or it didn't call define");u.$id&&(y.$themeId=u.$id),L.importCssString(u.cssText,u.cssClass,y.container),y.theme&&L.removeCssClass(y.container,y.theme.cssClass);var v="padding"in u?u.padding:"padding"in(y.theme||{})?4:y.$padding;y.$padding&&v!=y.$padding&&y.setPadding(v),y.$theme=u.cssClass,y.theme=u,L.addCssClass(y.container,u.cssClass),L.setCssClass(y.container,"ace_dark",u.isDark),y.$size&&(y.$size.width=0,y.$updateSizeAsync()),y._dispatchEvent("themeLoaded",{theme:u}),k&&k()}},A.prototype.getTheme=function(){return this.$themeId},A.prototype.setStyle=function(w,k){L.setCssClass(this.container,w,k!==!1)},A.prototype.unsetStyle=function(w){L.removeCssClass(this.container,w)},A.prototype.setCursorStyle=function(w){L.setStyle(this.scroller.style,"cursor",w)},A.prototype.setMouseCursor=function(w){L.setStyle(this.scroller.style,"cursor",w)},A.prototype.attachToShadowRoot=function(){L.importCssString(p,"ace_editor.css",this.container)},A.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},A.prototype.$updateCustomScrollbar=function(w){var k=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,w===!0?(this.scrollBarV=new s(this.container,this),this.scrollBarH=new o(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(y){k.$scrollAnimation||k.session.setScrollTop(y.data-k.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(y){k.$scrollAnimation||k.session.setScrollLeft(y.data-k.scrollMargin.left)}),this.$scrollDecorator=new f(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new e(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.addEventListener("scroll",function(y){k.$scrollAnimation||k.session.setScrollTop(y.data-k.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(y){k.$scrollAnimation||k.session.setScrollLeft(y.data-k.scrollMargin.left)}))},A.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var w=this;this.$resizeTimer=b.delayedCall(function(){w.destroyed||w.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(k){var y=k[0].contentRect.width,m=k[0].contentRect.height;Math.abs(w.$size.width-y)>1||Math.abs(w.$size.height-m)>1?w.$resizeTimer.delay():w.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},A}();$.prototype.CHANGE_CURSOR=1,$.prototype.CHANGE_MARKER=2,$.prototype.CHANGE_GUTTER=4,$.prototype.CHANGE_SCROLL=8,$.prototype.CHANGE_LINES=16,$.prototype.CHANGE_TEXT=32,$.prototype.CHANGE_SIZE=64,$.prototype.CHANGE_MARKER_BACK=128,$.prototype.CHANGE_MARKER_FRONT=256,$.prototype.CHANGE_FULL=512,$.prototype.CHANGE_H_SCROLL=1024,$.prototype.$changes=0,$.prototype.$padding=null,$.prototype.$frozen=!1,$.prototype.STEPS=8,x.implement($.prototype,S),a.defineOptions($.prototype,"renderer",{useResizeObserver:{set:function(A){!A&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):A&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(A){this.$textLayer.setShowInvisibles(A)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(A){typeof A=="number"&&(this.$printMarginColumn=A),this.$showPrintMargin=!!A,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(A){this.$gutter.style.display=A?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(A){this.$gutterLayer.$useSvgGutterIcons=A},initialValue:!1},showFoldedAnnotations:{set:function(A){this.$gutterLayer.$showFoldedAnnotations=A},initialValue:!1},fadeFoldWidgets:{set:function(A){L.setCssClass(this.$gutter,"ace_fade-fold-widgets",A)},initialValue:!1},showFoldWidgets:{set:function(A){this.$gutterLayer.setShowFoldWidgets(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(A){this.$textLayer.setDisplayIndentGuides(A)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(A){this.$textLayer.setHighlightIndentGuides(A)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(A){this.$gutterLayer.setHighlightGutterLine(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(A){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(A){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(A){typeof A=="number"&&(A=A+"px"),this.container.style.fontSize=A,this.updateFontSize()},initialValue:12},fontFamily:{set:function(A){this.container.style.fontFamily=A,this.updateFontSize()}},maxLines:{set:function(A){this.updateFull()}},minLines:{set:function(A){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(A){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(A){A=+A||0,this.$scrollPastEnd!=A&&(this.$scrollPastEnd=A,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(A){this.$gutterLayer.$fixedWidth=!!A,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(A){this.$updateCustomScrollbar(A)},initialValue:!1},theme:{set:function(A){this.setTheme(A)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!d.isMobile&&!d.isIE}}),M.VirtualRenderer=$}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(R,M,P){var x=R("../lib/oop"),L=R("../lib/net"),b=R("../lib/event_emitter").EventEmitter,a=R("../config");function c(t){var e="importScripts('"+L.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch(l){var o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,s=new o;return s.append(e),s.getBlob("application/javascript")}}function r(t){if(typeof Worker=="undefined")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var e=c(t),o=window.URL||window.webkitURL,s=o.createObjectURL(e);return new Worker(s)}return new Worker(t)}var n=function(t){t.postMessage||(t=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=t,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){x.implement(this,b),this.$createWorkerFromOldConfig=function(t,e,o,s,l){if(R.nameToUrl&&!R.toUrl&&(R.toUrl=R.nameToUrl),a.get("packaged")||!R.toUrl)s=s||a.moduleUrl(e,"worker");else{var h=this.$normalizePath;s=s||h(R.toUrl("ace/worker/worker.js",null,"_"));var S={};t.forEach(function(p){S[p]=h(R.toUrl(p,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=r(s),l&&this.send("importScripts",l),this.$worker.postMessage({init:!0,tlns:S,module:e,classname:o}),this.$worker},this.onMessage=function(t){var e=t.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var o=this.callbacks[e.id];o&&(o(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data);break}},this.reportError=function(t){window.console&&console.error&&console.error(t)},this.$normalizePath=function(t){return L.qualifyURL(t)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(t){t.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(t,e){this.$worker.postMessage({command:t,args:e})},this.call=function(t,e,o){if(o){var s=this.callbackId++;this.callbacks[s]=o,e.push(s)}this.send(t,e)},this.emit=function(t,e){try{e.data&&e.data.err&&(e.data.err={message:e.data.err.message,stack:e.data.err.stack,code:e.data.err.code}),this.$worker&&this.$worker.postMessage({event:t,data:{data:e.data}})}catch(o){console.error(o.stack)}},this.attachToDocument=function(t){this.$doc&&this.terminate(),this.$doc=t,this.call("setValue",[t.getValue()]),t.on("change",this.changeListener,!0)},this.changeListener=function(t){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),t.action=="insert"?this.deltaQueue.push(t.start,t.lines):this.deltaQueue.push(t.start,t.end)},this.$sendDeltaQueue=function(){var t=this.deltaQueue;t&&(this.deltaQueue=null,t.length>50&&t.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:t}))}}).call(n.prototype);var i=function(t,e,o){var s=null,l=!1,h=Object.create(b),S=[],p=new n({messageBuffer:S,terminate:function(){},postMessage:function(d){S.push(d),s&&(l?setTimeout(f):f())}});p.setEmitSync=function(d){l=d};var f=function(){var d=S.shift();d.command?s[d.command].apply(s,d.args):d.event&&h._signal(d.event,d.data)};return h.postMessage=function(d){p.onMessage({data:d})},h.callback=function(d,$){this.postMessage({type:"call",id:$,data:d})},h.emit=function(d,$){this.postMessage({type:"event",name:d,data:$})},a.loadModule(["worker",e],function(d){for(s=new d[o](h);S.length;)f()}),p};M.UIWorkerClient=i,M.WorkerClient=n,M.createWorker=r}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(R,M,P){var x=R("./range").Range,L=R("./lib/event_emitter").EventEmitter,b=R("./lib/oop"),a=function(){function c(r,n,i,t,e,o){var s=this;this.length=n,this.session=r,this.doc=r.getDocument(),this.mainClass=e,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=t,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=i;var l=r.getUndoManager().$undoStack||r.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=l.length,this.setup(),r.selection.on("changeCursor",this.$onCursorChange)}return c.prototype.setup=function(){var r=this,n=this.doc,i=this.session;this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=n.createAnchor(this.$pos.row,this.$pos.column);var t=this.pos;t.$insertRight=!0,t.detach(),t.markerId=i.addMarker(new x(t.row,t.column,t.row,t.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var o=n.createAnchor(e.row,e.column);o.$insertRight=!0,o.detach(),r.others.push(o)}),i.setUndoSelect(!1)},c.prototype.showOtherMarkers=function(){if(!this.othersActive){var r=this.session,n=this;this.othersActive=!0,this.others.forEach(function(i){i.markerId=r.addMarker(new x(i.row,i.column,i.row,i.column+n.length),n.othersClass,null,!1)})}},c.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var r=0;r<this.others.length;r++)this.session.removeMarker(this.others[r].markerId)}},c.prototype.onUpdate=function(r){if(this.$updating)return this.updateAnchors(r);var n=r;if(n.start.row===n.end.row&&n.start.row===this.pos.row){this.$updating=!0;var i=r.action==="insert"?n.end.column-n.start.column:n.start.column-n.end.column,t=n.start.column>=this.pos.column&&n.start.column<=this.pos.column+this.length+1,e=n.start.column-this.pos.column;if(this.updateAnchors(r),t&&(this.length+=i),t&&!this.session.$fromUndo){if(r.action==="insert")for(var o=this.others.length-1;o>=0;o--){var s=this.others[o],l={row:s.row,column:s.column+e};this.doc.insertMergedLines(l,r.lines)}else if(r.action==="remove")for(var o=this.others.length-1;o>=0;o--){var s=this.others[o],l={row:s.row,column:s.column+e};this.doc.remove(new x(l.row,l.column,l.row,l.column-i))}}this.$updating=!1,this.updateMarkers()}},c.prototype.updateAnchors=function(r){this.pos.onChange(r);for(var n=this.others.length;n--;)this.others[n].onChange(r);this.updateMarkers()},c.prototype.updateMarkers=function(){if(!this.$updating){var r=this,n=this.session,i=function(e,o){n.removeMarker(e.markerId),e.markerId=n.addMarker(new x(e.row,e.column,e.row,e.column+r.length),o,null,!1)};i(this.pos,this.mainClass);for(var t=this.others.length;t--;)i(this.others[t],this.othersClass)}},c.prototype.onCursorChange=function(r){if(!(this.$updating||!this.session)){var n=this.session.selection.getCursor();n.row===this.pos.row&&n.column>=this.pos.column&&n.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",r)):(this.hideOtherMarkers(),this._emit("cursorLeave",r))}},c.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},c.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var r=this.session.getUndoManager(),n=(r.$undoStack||r.$undostack).length-this.$undoStackDepth,i=0;i<n;i++)r.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},c}();b.implement(a.prototype,L),M.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(R,M,P){var x=R("../lib/event"),L=R("../lib/useragent");function b(c,r){return c.row==r.row&&c.column==r.column}function a(c){var r=c.domEvent,n=r.altKey,i=r.shiftKey,t=r.ctrlKey,e=c.getAccelKey(),o=c.getButton();if(t&&L.isMac&&(o=r.button),c.editor.inMultiSelectMode&&o==2){c.editor.textInput.onContextMenu(c.domEvent);return}if(!t&&!n&&!e){o===0&&c.editor.inMultiSelectMode&&c.editor.exitMultiSelectMode();return}if(o===0){var s=c.editor,l=s.selection,h=s.inMultiSelectMode,S=c.getDocumentPosition(),p=l.getCursor(),f=c.inSelection()||l.isEmpty()&&b(S,p),d=c.x,$=c.y,A=function(F){d=F.clientX,$=F.clientY},w=s.session,k=s.renderer.pixelToScreenCoordinates(d,$),y=k,m;if(s.$mouseHandler.$enableJumpToDef)t&&n||e&&n?m=i?"block":"add":n&&s.$blockSelectEnabled&&(m="block");else if(e&&!n){if(m="add",!h&&i)return}else n&&s.$blockSelectEnabled&&(m="block");if(m&&L.isMac&&r.ctrlKey&&s.$mouseHandler.cancelContextMenu(),m=="add"){if(!h&&f)return;if(!h){var g=l.toOrientedRange();s.addSelectionMarker(g)}var u=l.rangeList.rangeAtPoint(S);s.inVirtualSelectionMode=!0,i&&(u=null,g=l.ranges[0]||g,s.removeSelectionMarker(g)),s.once("mouseup",function(){var F=l.toOrientedRange();u&&F.isEmpty()&&b(u.cursor,F.cursor)?l.substractPoint(F.cursor):(i?l.substractPoint(g.cursor):g&&(s.removeSelectionMarker(g),l.addRange(g)),l.addRange(F)),s.inVirtualSelectionMode=!1})}else if(m=="block"){c.stop(),s.inVirtualSelectionMode=!0;var v,C=[],E=function(){var F=s.renderer.pixelToScreenCoordinates(d,$),H=w.screenToDocumentPosition(F.row,F.column,F.offsetX);b(y,F)&&b(H,l.lead)||(y=F,s.selection.moveToPosition(H),s.renderer.scrollCursorIntoView(),s.removeSelectionMarkers(C),C=l.rectangularRangeBlock(y,k),s.$mouseHandler.$clickSelection&&C.length==1&&C[0].isEmpty()&&(C[0]=s.$mouseHandler.$clickSelection.clone()),C.forEach(s.addSelectionMarker,s),s.updateSelectionMarkers())};h&&!e?l.toSingleRange():!h&&e&&(v=l.toOrientedRange(),s.addSelectionMarker(v)),i?k=w.documentToScreenPosition(l.lead):l.moveToPosition(S),y={row:-1,column:-1};var T=function(F){E(),clearInterval(I),s.removeSelectionMarkers(C),C.length||(C=[l.toOrientedRange()]),v&&(s.removeSelectionMarker(v),l.toSingleRange(v));for(var H=0;H<C.length;H++)l.addRange(C[H]);s.inVirtualSelectionMode=!1,s.$mouseHandler.$clickSelection=null},_=E;x.capture(s.container,A,T);var I=setInterval(function(){_()},20);return c.preventDefault()}}}M.onMouseDown=a}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(R,M,P){M.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(L){L.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(L){L.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(L){L.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(L){L.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(L){L.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(L){L.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(L){L.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(L){L.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(L){L.multiSelect.rangeCount>1?L.multiSelect.joinSelections():L.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(L){L.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(L){L.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(L){L.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],M.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(L){L.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(L){return L&&L.inMultiSelectMode}}];var x=R("../keyboard/hash_handler").HashHandler;M.keyboardHandler=new x(M.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(R,M,P){var x=R("./range_list").RangeList,L=R("./range").Range,b=R("./selection").Selection,a=R("./mouse/multi_select_handler").onMouseDown,c=R("./lib/event"),r=R("./lib/lang"),n=R("./commands/multi_select_commands");M.commands=n.defaultCommands.concat(n.multiSelectCommands);var i=R("./search").Search,t=new i;function e(p,f,d){return t.$options.wrap=!0,t.$options.needle=f,t.$options.backwards=d==-1,t.find(p)}var o=R("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(o.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(p,f){if(p){if(!this.inMultiSelectMode&&this.rangeCount===0){var d=this.toOrientedRange();if(this.rangeList.add(d),this.rangeList.add(p),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),f||this.fromOrientedRange(p);this.rangeList.removeAll(),this.rangeList.add(d),this.$onAddRange(d)}p.cursor||(p.cursor=p.end);var $=this.rangeList.add(p);return this.$onAddRange(p),$.length&&this.$onRemoveRange($),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),f||this.fromOrientedRange(p)}},this.toSingleRange=function(p){p=p||this.ranges[0];var f=this.rangeList.removeAll();f.length&&this.$onRemoveRange(f),p&&this.fromOrientedRange(p)},this.substractPoint=function(p){var f=this.rangeList.substractPoint(p);if(f)return this.$onRemoveRange(f),f[0]},this.mergeOverlappingRanges=function(){var p=this.rangeList.merge();p.length&&this.$onRemoveRange(p)},this.$onAddRange=function(p){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(p),this._signal("addRange",{range:p})},this.$onRemoveRange=function(p){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var f=this.rangeList.ranges.pop();p.push(f),this.rangeCount=0}for(var d=p.length;d--;){var $=this.ranges.indexOf(p[d]);this.ranges.splice($,1)}this._signal("removeRange",{ranges:p}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),f=f||this.ranges[0],f&&!f.isEqual(this.getRange())&&this.fromOrientedRange(f)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new x,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var p=this.ranges.length?this.ranges:[this.getRange()],f=[],d=0;d<p.length;d++){var $=p[d],A=$.start.row,w=$.end.row;if(A===w)f.push($.clone());else{for(f.push(new L(A,$.start.column,A,this.session.getLine(A).length));++A<w;)f.push(this.getLineRange(A,!0));f.push(new L(w,0,w,$.end.column))}d==0&&!this.isBackwards()&&(f=f.reverse())}this.toSingleRange();for(var d=f.length;d--;)this.addRange(f[d])},this.joinSelections=function(){var p=this.rangeList.ranges,f=p[p.length-1],d=L.fromPoints(p[0].start,f.end);this.toSingleRange(),this.setSelectionRange(d,f.cursor==f.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var p=this.rangeList.ranges,f=p[p.length-1],d=L.fromPoints(p[0].start,f.end);this.toSingleRange(),this.setSelectionRange(d,f.cursor==f.start)}else{var $=this.session.documentToScreenPosition(this.cursor),A=this.session.documentToScreenPosition(this.anchor),w=this.rectangularRangeBlock($,A);w.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(p,f,d){var $=[],A=p.column<f.column;if(A)var w=p.column,k=f.column,y=p.offsetX,m=f.offsetX;else var w=f.column,k=p.column,y=f.offsetX,m=p.offsetX;var g=p.row<f.row;if(g)var u=p.row,v=f.row;else var u=f.row,v=p.row;w<0&&(w=0),u<0&&(u=0),u==v&&(d=!0);for(var C,E=u;E<=v;E++){var T=L.fromPoints(this.session.screenToDocumentPosition(E,w,y),this.session.screenToDocumentPosition(E,k,m));if(T.isEmpty()){if(C&&l(T.end,C))break;C=T.end}T.cursor=A?T.start:T.end,$.push(T)}if(g&&$.reverse(),!d){for(var _=$.length-1;$[_].isEmpty()&&_>0;)_--;if(_>0)for(var I=0;$[I].isEmpty();)I++;for(var F=_;F>=I;F--)$[F].isEmpty()&&$.splice(F,1)}return $}}.call(b.prototype);var s=R("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(p){p.cursor||(p.cursor=p.end);var f=this.getSelectionStyle();return p.marker=this.session.addMarker(p,"ace_selection",f),this.session.$selectionMarkers.push(p),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,p},this.removeSelectionMarker=function(p){if(p.marker){this.session.removeMarker(p.marker);var f=this.session.$selectionMarkers.indexOf(p);f!=-1&&this.session.$selectionMarkers.splice(f,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(p){for(var f=this.session.$selectionMarkers,d=p.length;d--;){var $=p[d];if($.marker){this.session.removeMarker($.marker);var A=f.indexOf($);A!=-1&&f.splice(A,1)}}this.session.selectionMarkerCount=f.length},this.$onAddRange=function(p){this.addSelectionMarker(p.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(p){this.removeSelectionMarkers(p.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(p){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(n.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(p){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(n.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(p){var f=p.command,d=p.editor;if(d.multiSelect){if(f.multiSelectAction)f.multiSelectAction=="forEach"?$=d.forEachSelection(f,p.args):f.multiSelectAction=="forEachLine"?$=d.forEachSelection(f,p.args,!0):f.multiSelectAction=="single"?(d.exitMultiSelectMode(),$=f.exec(d,p.args||{})):$=f.multiSelectAction(d,p.args||{});else{var $=f.exec(d,p.args||{});d.multiSelect.addRange(d.multiSelect.toOrientedRange()),d.multiSelect.mergeOverlappingRanges()}return $}},this.forEachSelection=function(p,f,d){if(!this.inVirtualSelectionMode){var $=d&&d.keepOrder,A=d==!0||d&&d.$byLines,w=this.session,k=this.selection,y=k.rangeList,m=($?k:y).ranges,g;if(!m.length)return p.exec?p.exec(this,f||{}):p(this,f||{});var u=k._eventRegistry;k._eventRegistry={};var v=new b(w);this.inVirtualSelectionMode=!0;for(var C=m.length;C--;){if(A)for(;C>0&&m[C].start.row==m[C-1].end.row;)C--;v.fromOrientedRange(m[C]),v.index=C,this.selection=w.selection=v;var E=p.exec?p.exec(this,f||{}):p(this,f||{});!g&&E!==void 0&&(g=E),v.toOrientedRange(m[C])}v.detach(),this.selection=w.selection=k,this.inVirtualSelectionMode=!1,k._eventRegistry=u,k.mergeOverlappingRanges(),k.ranges[0]&&k.fromOrientedRange(k.ranges[0]);var T=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),T&&T.from==T.to&&this.renderer.animateScrolling(T.from),g}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var p="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var f=this.multiSelect.rangeList.ranges,d=[],$=0;$<f.length;$++)d.push(this.session.getTextRange(f[$]));var A=this.session.getDocument().getNewLineCharacter();p=d.join(A),p.length==(d.length-1)*A.length&&(p="")}else this.selection.isEmpty()||(p=this.session.getTextRange(this.getSelectionRange()));return p},this.$checkMultiselectChange=function(p,f){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var d=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&f==this.multiSelect.anchor)return;var $=f==this.multiSelect.anchor?d.cursor==d.start?d.end:d.start:d.cursor;$.row!=f.row||this.session.$clipPositionToDocument($.row,$.column).column!=f.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(p,f,d){if(f=f||{},f.needle=p||f.needle,f.needle==null){var $=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();f.needle=this.session.getTextRange($)}this.$search.set(f);var A=this.$search.findAll(this.session);if(!A.length)return 0;var w=this.multiSelect;d||w.toSingleRange(A[0]);for(var k=A.length;k--;)w.addRange(A[k],!0);return $&&w.rangeList.rangeAtPoint($.start)&&w.addRange($,!0),A.length},this.selectMoreLines=function(p,f){var d=this.selection.toOrientedRange(),$=d.cursor==d.end,A=this.session.documentToScreenPosition(d.cursor);this.selection.$desiredColumn&&(A.column=this.selection.$desiredColumn);var w=this.session.screenToDocumentPosition(A.row+p,A.column);if(d.isEmpty())var y=w;else var k=this.session.documentToScreenPosition($?d.end:d.start),y=this.session.screenToDocumentPosition(k.row+p,k.column);if($){var m=L.fromPoints(w,y);m.cursor=m.start}else{var m=L.fromPoints(y,w);m.cursor=m.end}if(m.desiredColumn=A.column,!this.selection.inMultiSelectMode)this.selection.addRange(d);else if(f)var g=d.cursor;this.selection.addRange(m),g&&this.selection.substractPoint(g)},this.transposeSelections=function(p){for(var f=this.session,d=f.multiSelect,$=d.ranges,A=$.length;A--;){var w=$[A];if(w.isEmpty()){var k=f.getWordRange(w.start.row,w.start.column);w.start.row=k.start.row,w.start.column=k.start.column,w.end.row=k.end.row,w.end.column=k.end.column}}d.mergeOverlappingRanges();for(var y=[],A=$.length;A--;){var w=$[A];y.unshift(f.getTextRange(w))}p<0?y.unshift(y.pop()):y.push(y.shift());for(var A=$.length;A--;){var w=$[A],m=w.clone();f.replace(w,y[A]),w.start.row=m.start.row,w.start.column=m.start.column}d.fromOrientedRange(d.ranges[0])},this.selectMore=function(p,f,d){var $=this.session,A=$.multiSelect,w=A.toOrientedRange();if(!(w.isEmpty()&&(w=$.getWordRange(w.start.row,w.start.column),w.cursor=p==-1?w.start:w.end,this.multiSelect.addRange(w),d))){var k=$.getTextRange(w),y=e($,k,p);y&&(y.cursor=p==-1?y.start:y.end,this.session.unfold(y),this.multiSelect.addRange(y),this.renderer.scrollCursorIntoView(null,.5)),f&&this.multiSelect.substractPoint(w.cursor)}},this.alignCursors=function(){var p=this.session,f=p.multiSelect,d=f.ranges,$=-1,A=d.filter(function(_){if(_.cursor.row==$)return!0;$=_.cursor.row});if(!d.length||A.length==d.length-1){var w=this.selection.getRange(),k=w.start.row,y=w.end.row,m=k==y;if(m){var g=this.session.getLength(),u;do u=this.session.getLine(y);while(/[=:]/.test(u)&&++y<g);do u=this.session.getLine(k);while(/[=:]/.test(u)&&--k>0);k<0&&(k=0),y>=g&&(y=g-1)}var v=this.session.removeFullLines(k,y);v=this.$reAlignText(v,m),this.session.insert({row:k,column:0},v.join(` |
| 935 |
`)+` |
| 936 |
`),m||(w.start.column=0,w.end.column=v[v.length-1].length),this.selection.setRange(w)}else{A.forEach(function(_){f.substractPoint(_.cursor)});var C=0,E=1/0,T=d.map(function(_){var I=_.cursor,F=p.getLine(I.row),H=F.substr(I.column).search(/\S/g);return H==-1&&(H=0),I.column>C&&(C=I.column),H<E&&(E=H),H});d.forEach(function(_,I){var F=_.cursor,H=C-F.column,D=T[I]-E;H>D?p.insert(F,r.stringRepeat(" ",H-D)):p.remove(new L(F.row,F.column,F.row,F.column-H+D)),_.start.column=_.end.column=C,_.start.row=_.end.row=F.row,_.cursor=_.end}),f.fromOrientedRange(d[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(p,f){var d=!0,$=!0,A,w,k;return p.map(function(v){var C=v.match(/(\s*)(.*?)(\s*)([=:].*)/);return C?A==null?(A=C[1].length,w=C[2].length,k=C[3].length,C):(A+w+k!=C[1].length+C[2].length+C[3].length&&($=!1),A!=C[1].length&&(d=!1),A>C[1].length&&(A=C[1].length),w<C[2].length&&(w=C[2].length),k>C[3].length&&(k=C[3].length),C):[v]}).map(f?m:d?$?g:m:u);function y(v){return r.stringRepeat(" ",v)}function m(v){return v[2]?y(A)+v[2]+y(w-v[2].length+k)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}function g(v){return v[2]?y(A+w-v[2].length)+v[2]+y(k)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}function u(v){return v[2]?y(A)+v[2]+y(k)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}}}).call(s.prototype);function l(p,f){return p.row==f.row&&p.column==f.column}M.onSessionChange=function(p){var f=p.session;f&&!f.multiSelect&&(f.$selectionMarkers=[],f.selection.$initRangeList(),f.multiSelect=f.selection),this.multiSelect=f&&f.multiSelect;var d=p.oldSession;d&&(d.multiSelect.off("addRange",this.$onAddRange),d.multiSelect.off("removeRange",this.$onRemoveRange),d.multiSelect.off("multiSelect",this.$onMultiSelect),d.multiSelect.off("singleSelect",this.$onSingleSelect),d.multiSelect.lead.off("change",this.$checkMultiselectChange),d.multiSelect.anchor.off("change",this.$checkMultiselectChange)),f&&(f.multiSelect.on("addRange",this.$onAddRange),f.multiSelect.on("removeRange",this.$onRemoveRange),f.multiSelect.on("multiSelect",this.$onMultiSelect),f.multiSelect.on("singleSelect",this.$onSingleSelect),f.multiSelect.lead.on("change",this.$checkMultiselectChange),f.multiSelect.anchor.on("change",this.$checkMultiselectChange)),f&&this.inMultiSelectMode!=f.selection.inMultiSelectMode&&(f.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function h(p){p.$multiselectOnSessionChange||(p.$onAddRange=p.$onAddRange.bind(p),p.$onRemoveRange=p.$onRemoveRange.bind(p),p.$onMultiSelect=p.$onMultiSelect.bind(p),p.$onSingleSelect=p.$onSingleSelect.bind(p),p.$multiselectOnSessionChange=M.onSessionChange.bind(p),p.$checkMultiselectChange=p.$checkMultiselectChange.bind(p),p.$multiselectOnSessionChange(p),p.on("changeSession",p.$multiselectOnSessionChange),p.on("mousedown",a),p.commands.addCommands(n.defaultCommands),S(p))}function S(p){if(!p.textInput)return;var f=p.textInput.getElement(),d=!1;c.addListener(f,"keydown",function(A){var w=A.keyCode==18&&!(A.ctrlKey||A.shiftKey||A.metaKey);p.$blockSelectEnabled&&w?d||(p.renderer.setMouseCursor("crosshair"),d=!0):d&&$()},p),c.addListener(f,"keyup",$,p),c.addListener(f,"blur",$,p);function $(A){d&&(p.renderer.setMouseCursor(""),d=!1)}}M.MultiSelect=h,R("./config").defineOptions(s.prototype,"editor",{enableMultiselect:{set:function(p){h(this),p?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(p){this.$blockSelectEnabled=p},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(R,M,P){var x=R("../../range").Range,L=M.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(b,a,c){var r=b.getLine(c);return this.foldingStartMarker.test(r)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(b,a,c){return null},this.indentationBlock=function(b,a,c){var r=/\S/,n=b.getLine(a),i=n.search(r);if(i!=-1){for(var t=c||n.length,e=b.getLength(),o=a,s=a;++a<e;){var l=b.getLine(a).search(r);if(l!=-1){if(l<=i){var h=b.getTokenAt(a,0);if(!h||h.type!=="string")break}s=a}}if(s>o){var S=b.getLine(s).length;return new x(o,t,s,S)}}},this.openingBracketBlock=function(b,a,c,r,n){var i={row:c,column:r+1},t=b.$findClosingBracket(a,i,n);if(t){var e=b.foldWidgets[t.row];return e==null&&(e=b.getFoldWidget(t.row)),e=="start"&&t.row>i.row&&(t.row--,t.column=b.getLine(t.row).length),x.fromPoints(i,t)}},this.closingBracketBlock=function(b,a,c,r,n){var i={row:c,column:r},t=b.$findOpeningBracket(a,i);if(t)return t.column++,i.column--,x.fromPoints(t,i)}}).call(L.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(R,M,P){var x=R("../line_widgets").LineWidgets,L=R("../lib/dom"),b=R("../range").Range,a=R("../config").nls;function c(n,i,t){for(var e=0,o=n.length-1;e<=o;){var s=e+o>>1,l=t(i,n[s]);if(l>0)e=s+1;else if(l<0)o=s-1;else return s}return-(e+1)}function r(n,i,t){var e=n.getAnnotations().sort(b.comparePoints);if(e.length){var o=c(e,{row:i,column:-1},b.comparePoints);o<0&&(o=-o-1),o>=e.length?o=t>0?0:e.length-1:o===0&&t<0&&(o=e.length-1);var s=e[o];if(!(!s||!t)){if(s.row===i){do s=e[o+=t];while(s&&s.row===i);if(!s)return e.slice()}var l=[];i=s.row;do l[t<0?"unshift":"push"](s),s=e[o+=t];while(s&&s.row==i);return l.length&&l}}}M.showErrorMarker=function(n,i){var t=n.session;t.widgetManager||(t.widgetManager=new x(t),t.widgetManager.attach(n));var e=n.getCursorPosition(),o=e.row,s=t.widgetManager.getWidgetsAtRow(o).filter(function(w){return w.type=="errorMarker"})[0];s?s.destroy():o-=i;var l=r(t,o,i),h;if(l){var S=l[0];e.column=(S.pos&&typeof S.column!="number"?S.pos.sc:S.column)||0,e.row=S.row,h=n.renderer.$gutterLayer.$annotations[e.row]}else{if(s)return;h={text:[a("Looks good!")],className:"ace_ok"}}n.session.unfold(e.row),n.selection.moveToPosition(e);var p={row:e.row,fixedWidth:!0,coverGutter:!0,el:L.createElement("div"),type:"errorMarker"},f=p.el.appendChild(L.createElement("div")),d=p.el.appendChild(L.createElement("div"));d.className="error_widget_arrow "+h.className;var $=n.renderer.$cursorLayer.getPixelPosition(e).left;d.style.left=$+n.renderer.gutterWidth-5+"px",p.el.className="error_widget_wrapper",f.className="error_widget "+h.className,f.innerHTML=h.text.join("<br>"),f.appendChild(L.createElement("div"));var A=function(w,k,y){if(k===0&&(y==="esc"||y==="return"))return p.destroy(),{command:"null"}};p.destroy=function(){n.$mouseHandler.isMousePressed||(n.keyBinding.removeKeyboardHandler(A),t.widgetManager.removeLineWidget(p),n.off("changeSelection",p.destroy),n.off("changeSession",p.destroy),n.off("mouseup",p.destroy),n.off("change",p.destroy))},n.keyBinding.addKeyboardHandler(A),n.on("changeSelection",p.destroy),n.on("changeSession",p.destroy),n.on("mouseup",p.destroy),n.on("change",p.destroy),n.session.widgetManager.addLineWidget(p),p.el.onmousedown=n.focus.bind(n),n.renderer.scrollCursorIntoView(null,.5,{bottom:p.el.offsetHeight})},L.importCssString(` |
| 937 |
.error_widget_wrapper { |
| 938 |
background: inherit; |
| 939 |
color: inherit; |
| 940 |
border:none |
| 941 |
} |
| 942 |
.error_widget { |
| 943 |
border-top: solid 2px; |
| 944 |
border-bottom: solid 2px; |
| 945 |
margin: 5px 0; |
| 946 |
padding: 10px 40px; |
| 947 |
white-space: pre-wrap; |
| 948 |
} |
| 949 |
.error_widget.ace_error, .error_widget_arrow.ace_error{ |
| 950 |
border-color: #ff5a5a |
| 951 |
} |
| 952 |
.error_widget.ace_warning, .error_widget_arrow.ace_warning{ |
| 953 |
border-color: #F1D817 |
| 954 |
} |
| 955 |
.error_widget.ace_info, .error_widget_arrow.ace_info{ |
| 956 |
border-color: #5a5a5a |
| 957 |
} |
| 958 |
.error_widget.ace_ok, .error_widget_arrow.ace_ok{ |
| 959 |
border-color: #5aaa5a |
| 960 |
} |
| 961 |
.error_widget_arrow { |
| 962 |
position: absolute; |
| 963 |
border: solid 5px; |
| 964 |
border-top-color: transparent!important; |
| 965 |
border-right-color: transparent!important; |
| 966 |
border-left-color: transparent!important; |
| 967 |
top: -5px; |
| 968 |
} |
| 969 |
`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","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","ace/loader_build"],function(R,M,P){R("./loader_build")(M);var x=R("./lib/dom"),L=R("./range").Range,b=R("./editor").Editor,a=R("./edit_session").EditSession,c=R("./undomanager").UndoManager,r=R("./virtual_renderer").VirtualRenderer;R("./worker/worker_client"),R("./keyboard/hash_handler"),R("./placeholder"),R("./multi_select"),R("./mode/folding/fold_mode"),R("./theme/textmate"),R("./ext/error_marker"),M.config=R("./config"),M.edit=function(n,i){if(typeof n=="string"){var t=n;if(n=document.getElementById(t),!n)throw new Error("ace.edit can't find div #"+t)}if(n&&n.env&&n.env.editor instanceof b)return n.env.editor;var e="";if(n&&/input|textarea/i.test(n.tagName)){var o=n;e=o.value,n=x.createElement("pre"),o.parentNode.replaceChild(n,o)}else n&&(e=n.textContent,n.innerHTML="");var s=M.createEditSession(e),l=new b(new r(n),s,i),h={document:s,editor:l,onResize:l.resize.bind(l,null)};return o&&(h.textarea=o),l.on("destroy",function(){h.editor.container.env=null}),l.container.env=l.env=h,l},M.createEditSession=function(n,i){var t=new a(n,i);return t.setUndoManager(new c),t},M.Range=L,M.Editor=b,M.EditSession=a,M.UndoManager=c,M.VirtualRenderer=r,M.version=M.config.version}),function(){ace.require(["ace/ace"],function(R){R&&(R.config.init(!0),R.define=ace.define);var M=function(){return this}();!M&&typeof window!="undefined"&&(M=window),!M&&typeof self!="undefined"&&(M=self),M.ace||(M.ace=R);for(var P in R)R.hasOwnProperty(P)&&(M.ace[P]=R[P]);M.ace.default=M.ace,pe&&(pe.exports=M.ace)})}()})(ye);var Se=ye.exports;export{Se as a}; |
| 970 |
|