var Re=Object.defineProperty;var we=Object.getOwnPropertySymbols;var Ee=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable;var be=(Y,ee,M)=>ee in Y?Re(Y,ee,{enumerable:!0,configurable:!0,writable:!0,value:M}):Y[ee]=M,$e=(Y,ee)=>{for(var M in ee||(ee={}))Ee.call(ee,M)&&be(Y,M,ee[M]);if(we)for(var M of we(ee))_e.call(ee,M)&&be(Y,M,ee[M]);return Y};import{U as Ie,w as Oe}from"./entry/index-C7JiT1GB.js";import{b as Fe,y as De,l as We}from"./antd-FjOLgRLC.js";import{d as xe,l as Ne,a6 as He,ap as Be,f as Pe,r as ze,w as Ce,Z as Ue,a7 as Ve,u as Se,H as Ge,ag as Ke}from"./vue-ByATgq5d.js";var Le={exports:{}};(function(Y,ee){(function(){var M="ace",k=function(){return this}();!k&&typeof window!="undefined"&&(k=window);var B=function(r,i,n){if(typeof r!="string"){B.original&&B.original.apply(this,arguments);return}arguments.length==2&&(n=i),B.modules[r]||(B.payloads[r]=n,B.modules[r]=null)};B.modules={},B.payloads={};var R=function(r,i,n){if(typeof i=="string"){var t=a(r,i);if(t!=null)return n&&n(),t}else if(Object.prototype.toString.call(i)==="[object Array]"){for(var e=[],o=0,s=i.length;oa.length)&&(A=a.length),A-=L.length;var u=a.indexOf(L,A);return u!==-1&&u===A}),String.prototype.repeat||R(String.prototype,"repeat",function(L){for(var A="",a=this;L>0;)L&1&&(A+=a),(L>>=1)&&(a+=a);return A}),String.prototype.includes||R(String.prototype,"includes",function(L,A){return this.indexOf(L,A)!=-1}),Object.assign||(Object.assign=function(L){if(L==null)throw new TypeError("Cannot convert undefined or null to object");for(var A=Object(L),a=1;a>>0,u=arguments[1],r=u>>0,i=r<0?Math.max(a+r,0):Math.min(r,a),n=arguments[2],t=n===void 0?a:n>>0,e=t<0?Math.max(a+t,0):Math.min(t,a);i0;)a&1&&(u+=A),(a>>=1)&&(A+=A);return u};var R=/^\s\s*/,L=/\s\s*$/;k.stringTrimLeft=function(A){return A.replace(R,"")},k.stringTrimRight=function(A){return A.replace(L,"")},k.copyObject=function(A){var a={};for(var u in A)a[u]=A[u];return a},k.copyArray=function(A){for(var a=[],u=0,r=A.length;u65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(M,k,B){k.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},k.getOS=function(){return k.isMac?k.OS.MAC:k.isLinux?k.OS.LINUX:k.OS.WINDOWS};var R=typeof navigator=="object"?navigator:{},L=(/mac|win|linux/i.exec(R.platform)||["other"])[0].toLowerCase(),A=R.userAgent||"",a=R.appName||"";k.isWin=L=="win",k.isMac=L=="mac",k.isLinux=L=="linux",k.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((A.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((A.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),k.isOldIE=k.isIE&&k.isIE<9,k.isGecko=k.isMozilla=A.match(/ Gecko\/\d+/),k.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",k.isWebKit=parseFloat(A.split("WebKit/")[1])||void 0,k.isChrome=parseFloat(A.split(" Chrome/")[1])||void 0,k.isSafari=parseFloat(A.split(" Safari/")[1])&&!k.isChrome||void 0,k.isEdge=parseFloat(A.split(" Edge/")[1])||void 0,k.isAIR=A.indexOf("AdobeAIR")>=0,k.isAndroid=A.indexOf("Android")>=0,k.isChromeOS=A.indexOf(" CrOS ")>=0,k.isIOS=/iPad|iPhone|iPod/.test(A)&&!window.MSStream,k.isIOS&&(k.isMac=!0),k.isMobile=k.isIOS||k.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(M,k,B){var R=M("./useragent"),L="http://www.w3.org/1999/xhtml";k.buildDom=function n(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 h=[],f=0;f=1.5:!0,R.isChromeOS&&(k.HI_DPI=!1),typeof document!="undefined"){var i=document.createElement("div");k.HI_DPI&&i.style.transform!==void 0&&(k.HAS_CSS_TRANSFORMS=!0),!R.isEdge&&typeof i.style.animationName!="undefined"&&(k.HAS_CSS_ANIMATION=!0),i=null}k.HAS_CSS_TRANSFORMS?k.translate=function(n,t,e){n.style.transform="translate("+Math.round(t)+"px, "+Math.round(e)+"px)"}:k.translate=function(n,t,e){n.style.top=Math.round(e)+"px",n.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(M,k,B){/* * based on code from: * * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/jrburke/requirejs for details */var R=M("./dom");k.get=function(L,A){var a=new XMLHttpRequest;a.open("GET",L,!0),a.onreadystatechange=function(){a.readyState===4&&A(a.responseText)},a.send(null)},k.loadScript=function(L,A){var a=R.getDocumentHead(),u=document.createElement("script");u.src=L,a.appendChild(u),u.onload=u.onreadystatechange=function(r,i){(i||!u.readyState||u.readyState=="loaded"||u.readyState=="complete")&&(u=u.onload=u.onreadystatechange=null,i||A())}},k.qualifyURL=function(L){var A=document.createElement("a");return A.href=L,A.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(M,k,B){k.inherits=function(R,L){R.super_=L,R.prototype=Object.create(L.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}})},k.mixin=function(R,L){for(var A in L)R[A]=L[A];return R},k.implement=function(R,L){k.mixin(R,L)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(M,k,B){var R={},L=function(){this.propagationStopped=!0},A=function(){this.defaultPrevented=!0};R._emit=R._dispatchEvent=function(a,u){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._eventRegistry[a]||[],i=this._defaultHandlers[a];if(!(!r.length&&!i)){(typeof u!="object"||!u)&&(u={}),u.type||(u.type=a),u.stopPropagation||(u.stopPropagation=L),u.preventDefault||(u.preventDefault=A),r=r.slice();for(var n=0;n1&&(h=o[o.length-2]);var x=u[e+"Path"];return x==null?x=u.basePath:s=="/"&&(e=s=""),x&&x.slice(-1)!="/"&&(x+="/"),x+e+s+h+this.get("suffix")},k.setModuleUrl=function(t,e){return u.$moduleUrls[t]=e};var r=function(t,e){if(t==="ace/theme/textmate"||t==="./theme/textmate")return e(null,M("./theme/textmate"));if(i)return i(t,e)},i;k.setLoader=function(t){i=t},k.dynamicModules=Object.create(null),k.$loading={},k.$loaded={},k.loadModule=function(t,e){var o;if(Array.isArray(t))var s=t[0],h=t[1];else if(typeof t=="string")var h=t;var f=function(x){if(x&&!k.$loading[h])return e&&e(x);if(k.$loading[h]||(k.$loading[h]=[]),k.$loading[h].push(e),!(k.$loading[h].length>1)){var y=function(){r(h,function(d,l){l&&(k.$loaded[h]=l),k._emit("load.module",{name:h,module:l});var v=k.$loading[h];k.$loading[h]=null,v.forEach(function(C){C&&C(l)})})};if(!k.get("packaged"))return y();L.loadScript(k.moduleUrl(h,s),y),n()}};if(k.dynamicModules[h])k.dynamicModules[h]().then(function(x){x.default?f(x.default):f(x)});else{try{o=this.$require(h)}catch(x){}f(o||k.$loaded[h])}},k.$require=function(t){if(typeof B.require=="function"){var e="require";return B[e](t)}},k.setModuleLoader=function(t,e){k.dynamicModules[t]=e};var n=function(){!u.basePath&&!u.workerPath&&!u.modePath&&!u.themePath&&!Object.keys(u.$moduleUrls).length&&(n=function(){})};k.version="1.35.4"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(M,k,B){M("./lib/fixoldbrowsers");var R=M("./config");R.setLoader(function(u,r){M([u],function(i){r(null,i)})});var L=function(){return this||typeof window!="undefined"&&window}();B.exports=function(u){R.init=A,R.$require=M,u.require=M},A(!0);function A(u){if(!(!L||!L.document)){R.set("packaged",u||M.packaged||B.packaged||L.define&&(void 0).packaged);var r={},i="",n=document.currentScript||document._currentScript,t=n&&n.ownerDocument||document;n&&n.src&&(i=n.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=t.getElementsByTagName("script"),o=0;o ["+this.end.row+"/"+this.end.column+"]"},L.prototype.contains=function(A,a){return this.compare(A,a)==0},L.prototype.compareRange=function(A){var a,u=A.end,r=A.start;return a=this.compare(u.row,u.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(A){return this.compare(A.row,A.column)},L.prototype.containsRange=function(A){return this.comparePoint(A.start)==0&&this.comparePoint(A.end)==0},L.prototype.intersects=function(A){var a=this.compareRange(A);return a==-1||a==0||a==1},L.prototype.isEnd=function(A,a){return this.end.row==A&&this.end.column==a},L.prototype.isStart=function(A,a){return this.start.row==A&&this.start.column==a},L.prototype.setStart=function(A,a){typeof A=="object"?(this.start.column=A.column,this.start.row=A.row):(this.start.row=A,this.start.column=a)},L.prototype.setEnd=function(A,a){typeof A=="object"?(this.end.column=A.column,this.end.row=A.row):(this.end.row=A,this.end.column=a)},L.prototype.inside=function(A,a){return this.compare(A,a)==0?!(this.isEnd(A,a)||this.isStart(A,a)):!1},L.prototype.insideStart=function(A,a){return this.compare(A,a)==0?!this.isEnd(A,a):!1},L.prototype.insideEnd=function(A,a){return this.compare(A,a)==0?!this.isStart(A,a):!1},L.prototype.compare=function(A,a){return!this.isMultiLine()&&A===this.start.row?athis.end.column?1:0:Athis.end.row?1:this.start.row===A?a>=this.start.column?0:-1:this.end.row===A?a<=this.end.column?0:1:0},L.prototype.compareStart=function(A,a){return this.start.row==A&&this.start.column==a?-1:this.compare(A,a)},L.prototype.compareEnd=function(A,a){return this.end.row==A&&this.end.column==a?1:this.compare(A,a)},L.prototype.compareInside=function(A,a){return this.end.row==A&&this.end.column==a?1:this.start.row==A&&this.start.column==a?-1:this.compare(A,a)},L.prototype.clipRows=function(A,a){if(this.end.row>a)var u={row:a+1,column:0};else if(this.end.rowa)var r={row:a+1,column:0};else if(this.start.row1?(C++,C>4&&(C=1)):C=1,L.isIE){var m=Math.abs(c.clientX-$)>5||Math.abs(c.clientY-w)>5;(!b||m)&&(C=1),b&&clearTimeout(b),b=setTimeout(function(){b=null},y[C-1]||600),C==1&&($=c.clientX,w=c.clientY)}if(c._clicks=C,d[l]("mousedown",c),C>4)C=0;else if(C>1)return d[l](g[C],c)}Array.isArray(x)||(x=[x]),x.forEach(function(c){t(c,"mousedown",p,v)})};function o(x){return 0|(x.ctrlKey?1:0)|(x.altKey?2:0)|(x.shiftKey?4:0)|(x.metaKey?8:0)}k.getModifierString=function(x){return R.KEY_MODS[o(x)]};function s(x,y,d){var l=o(y);if(!d&&y.code&&(d=R.$codeToKeyCode[y.code]||d),!L.isMac&&A){if(y.getModifierState&&(y.getModifierState("OS")||y.getModifierState("Win"))&&(l|=8),A.altGr)if((3&l)!=3)A.altGr=0;else return;if(d===18||d===17){var v=y.location;if(d===17&&v===1)A[d]==1&&(a=y.timeStamp);else if(d===18&&l===3&&v===2){var C=y.timeStamp-a;C<50&&(A.altGr=!0)}}}if(d in R.MODIFIER_KEYS&&(d=-1),!(!l&&d===13&&y.location===3&&(x(y,l,-d),y.defaultPrevented))){if(L.isChromeOS&&l&8){if(x(y,l,d),y.defaultPrevented)return;l&=-9}return!l&&!(d in R.FUNCTION_KEYS)&&!(d in R.PRINTABLE_KEYS)?!1:x(y,l,d)}}k.addCommandKeyListener=function(x,y,d){var l=null;t(x,"keydown",function(v){A[v.keyCode]=(A[v.keyCode]||0)+1;var C=s(y,v,v.keyCode);return l=v.defaultPrevented,C},d),t(x,"keypress",function(v){l&&(v.ctrlKey||v.altKey||v.shiftKey||v.metaKey)&&(k.stopEvent(v),l=null)},d),t(x,"keyup",function(v){A[v.keyCode]=null},d),A||(h(),t(window,"focus",h))};function h(){A=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!L.isOldIE){var f=1;k.nextTick=function(x,y){y=y||window;var d="zero-timeout-message-"+f++,l=function(v){v.data==d&&(k.stopPropagation(v),e(y,"message",l),x())};t(y,"message",l),y.postMessage(d,"*")}}k.$idleBlocked=!1,k.onIdle=function(x,y){return setTimeout(function d(){k.$idleBlocked?setTimeout(d,100):x()},y)},k.$idleBlockId=null,k.blockIdle=function(x){k.$idleBlockId&&clearTimeout(k.$idleBlockId),k.$idleBlocked=!0,k.$idleBlockId=setTimeout(function(){k.$idleBlocked=!1},x||100)},k.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),k.nextFrame?k.nextFrame=k.nextFrame.bind(window):k.nextFrame=function(x){setTimeout(x,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(M,k,B){var R;B.exports={lineMode:!1,pasteCancelled:function(){return R&&R>Date.now()-50?!0:R=!1},cancel:function(){R=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(M,k,B){var R=M("../lib/event"),L=M("../config").nls,A=M("../lib/useragent"),a=M("../lib/dom"),u=M("../lib/lang"),r=M("../clipboard"),i=A.isChrome<18,n=A.isIE,t=A.isChrome>63,e=400,o=M("../lib/keys"),s=o.KEY_MODS,h=A.isIOS,f=h?/\s/:/\n/,x=A.isMobile,y;y=function(d,l){var v=a.createElement("textarea");v.className="ace_text-input",v.setAttribute("wrap","off"),v.setAttribute("autocorrect","off"),v.setAttribute("autocapitalize","off"),v.setAttribute("spellcheck","false"),v.style.opacity="0",d.insertBefore(v,d.firstChild);var C=!1,$=!1,w=!1,b=!1,g="";x||(v.style.fontSize="1px");var p=!1,c=!1,m="",S=0,T=0,E=0,_=Number.MAX_SAFE_INTEGER,I=Number.MIN_SAFE_INTEGER,F=0;try{var N=document.activeElement===v}catch(z){}this.setNumberOfExtraLines=function(z){if(_=Number.MAX_SAFE_INTEGER,I=Number.MIN_SAFE_INTEGER,z<0){F=0;return}F=z},this.setAriaOptions=function(z){if(z.activeDescendant?(v.setAttribute("aria-haspopup","true"),v.setAttribute("aria-autocomplete",z.inline?"both":"list"),v.setAttribute("aria-activedescendant",z.activeDescendant)):(v.setAttribute("aria-haspopup","false"),v.setAttribute("aria-autocomplete","both"),v.removeAttribute("aria-activedescendant")),z.role&&v.setAttribute("role",z.role),z.setLabel){v.setAttribute("aria-roledescription",L("text-input.aria-roledescription","editor"));var K="";if(l.$textInputAriaLabel&&(K+="".concat(l.$textInputAriaLabel,", ")),l.session){var j=l.session.selection.cursor.row;K+=L("text-input.aria-label","Cursor at row $0",[j+1])}v.setAttribute("aria-label",K)}},this.setAriaOptions({role:"textbox"}),R.addListener(v,"blur",function(z){c||(l.onBlur(z),N=!1)},l),R.addListener(v,"focus",function(z){if(!c){if(N=!0,A.isEdge)try{if(!document.hasFocus())return}catch(K){}l.onFocus(z),A.isEdge?setTimeout(O):O()}},l),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:l.renderer.enableKeyboardAccessibility}),g||t||this.$focusScroll=="browser")return v.focus({preventScroll:!0});var z=v.style.top;v.style.position="fixed",v.style.top="0px";try{var K=v.getBoundingClientRect().top!=0}catch(J){return}var j=[];if(K)for(var Q=v.parentElement;Q&&Q.nodeType==1;)j.push(Q),Q.setAttribute("ace_nocontext","true"),!Q.parentElement&&Q.getRootNode?Q=Q.getRootNode().host:Q=Q.parentElement;v.focus({preventScroll:!0}),K&&j.forEach(function(J){J.removeAttribute("ace_nocontext")}),setTimeout(function(){v.style.position="",v.style.top=="0px"&&(v.style.top=z)},0)},this.blur=function(){v.blur()},this.isFocused=function(){return N},l.on("beforeEndOperation",function(){var z=l.curOp,K=z&&z.command&&z.command.name;if(K!="insertstring"){var j=K&&(z.docChanged||z.selectionChanged);w&&j&&(m=v.value="",ue()),O()}});var D=function(z,K){for(var j=K,Q=1;Q<=z-_&&Q<2*F+1;Q++)j+=l.session.getLine(z-Q).length+1;return j},O=h?function(z){if(!(!N||C&&!z||b)){z||(z="");var K=` ab`+z+`cde fg `;K!=v.value&&(v.value=m=K);var j=4,Q=4+(z.length||(l.selection.isEmpty()?0:1));(S!=j||T!=Q)&&v.setSelectionRange(j,Q),S=j,T=Q}}:function(){if(!(w||b)&&!(!N&&!U)){w=!0;var z=0,K=0,j="";if(l.session){var Q=l.selection,J=Q.getRange(),ne=Q.cursor.row;ne===I+1?(_=I+1,I=_+2*F):ne===_-1?(I=_-1,_=I-2*F):(ne<_-1||ne>I+1)&&(_=ne>F?ne-F:0,I=ne>F?ne+F:2*F);for(var oe=[],re=_;re<=I;re++)oe.push(l.session.getLine(re));if(j=oe.join(` `),z=D(J.start.row,J.start.column),K=D(J.end.row,J.end.column),J.start.row<_){var ie=l.session.getLine(_-1);z=J.start.row<_-1?0:z,K+=ie.length+1,j=ie+` `+j}else if(J.end.row>I){var q=l.session.getLine(I+1);K=J.end.row>I+1?q.length:J.end.column,K+=j.length+1,j=j+` `+q}else x&&ne>0&&(j=` `+j,K+=1,z+=1);j.length>e&&(z=m.length&&z.value===m&&m&&z.selectionEnd!==T},H=function(z){w||(C?C=!1:W(v)?(l.selectAll(),O()):x&&v.selectionStart!=S&&O())},P=null;this.setInputHandler=function(z){P=z},this.getInputHandler=function(){return P};var U=!1,V=function(z,K){if(U&&(U=!1),$)return O(),z&&l.onPaste(z),$=!1,"";for(var j=v.selectionStart,Q=v.selectionEnd,J=S,ne=m.length-T,oe=z,re=z.length-j,ie=z.length-Q,q=0;J>0&&m[q]==z[q];)q++,J--;for(oe=oe.slice(q),q=1;ne>0&&m.length-q>S-1&&m[m.length-q]==z[z.length-q];)q++,ne--;re-=q-1,ie-=q-1;var le=oe.length-q+1;if(le<0&&(J=-le,le=0),oe=oe.slice(0,le),!K&&!oe&&!re&&!J&&!ne&&!ie)return"";b=!0;var de=!1;return A.isAndroid&&oe==". "&&(oe=" ",de=!0),oe&&!J&&!ne&&!re&&!ie||p?l.onTextInput(oe):l.onTextInput(oe,{extendLeft:J,extendRight:ne,restoreStart:re,restoreEnd:ie}),b=!1,m=z,S=j,T=Q,E=ie,de?` `:oe},G=function(z){if(w)return he();if(z&&z.inputType){if(z.inputType=="historyUndo")return l.execCommand("undo");if(z.inputType=="historyRedo")return l.execCommand("redo")}var K=v.value,j=V(K,!0);(K.length>e+100||f.test(j)||x&&S<1&&S==T)&&O()},X=function(z,K,j){var Q=z.clipboardData||window.clipboardData;if(!(!Q||i)){var J=n||j?"Text":"text/plain";try{return K?Q.setData(J,K)!==!1:Q.getData(J)}catch(ne){if(!j)return X(ne,K,!0)}}},Z=function(z,K){var j=l.getCopyText();if(!j)return R.preventDefault(z);X(z,j)?(h&&(O(j),C=j,setTimeout(function(){C=!1},10)),K?l.onCut():l.onCopy(),R.preventDefault(z)):(C=!0,v.value=j,v.select(),setTimeout(function(){C=!1,O(),K?l.onCut():l.onCopy()}))},ae=function(z){Z(z,!0)},se=function(z){Z(z,!1)},te=function(z){var K=X(z);r.pasteCancelled()||(typeof K=="string"?(K&&l.onPaste(K,z),A.isIE&&setTimeout(O),R.preventDefault(z)):(v.value="",$=!0))};R.addCommandKeyListener(v,function(z,K,j){if(!w)return l.onCommandKey(z,K,j)},l),R.addListener(v,"select",H,l),R.addListener(v,"input",G,l),R.addListener(v,"cut",ae,l),R.addListener(v,"copy",se,l),R.addListener(v,"paste",te,l),(!("oncut"in v)||!("oncopy"in v)||!("onpaste"in v))&&R.addListener(d,"keydown",function(z){if(!(A.isMac&&!z.metaKey||!z.ctrlKey))switch(z.keyCode){case 67:se(z);break;case 86:te(z);break;case 88:ae(z);break}},l);var ce=function(z){if(!(w||!l.onCompositionStart||l.$readOnly)&&(w={},!p)){z.data&&(w.useTextareaForIME=!1),setTimeout(he,0),l._signal("compositionStart"),l.on("mousedown",pe);var K=l.getSelectionRange();K.end.row=K.start.row,K.end.column=K.start.column,w.markerRange=K,w.selectionStart=S,l.onCompositionStart(w),w.useTextareaForIME?(m=v.value="",S=0,T=0):(v.msGetInputContext&&(w.context=v.msGetInputContext()),v.getInputContext&&(w.context=v.getInputContext()))}},he=function(){if(!(!w||!l.onCompositionUpdate||l.$readOnly)){if(p)return pe();if(w.useTextareaForIME)l.onCompositionUpdate(v.value);else{var z=v.value;V(z),w.markerRange&&(w.context&&(w.markerRange.start.column=w.selectionStart=w.context.compositionStartOffset),w.markerRange.end.column=w.markerRange.start.column+T-w.selectionStart+E)}}},ue=function(z){!l.onCompositionEnd||l.$readOnly||(w=!1,l.onCompositionEnd(),l.off("mousedown",pe),z&&G())};function pe(){c=!0,v.blur(),v.focus(),c=!1}var ve=u.delayedCall(he,50).schedule.bind(null,null);function Me(z){z.keyCode==27&&v.value.lengthT&&m[ie]==` `?q=o.end:reT&&m.slice(0,ie).split(` `).length>2?q=o.down:ie>T&&m[ie-1]==" "?(q=o.right,le=s.option):(ie>T||ie==T&&T!=S&&re==ie)&&(q=o.right),re!==ie&&(le|=s.shift),q){var de=K.onCommandKey({},le,q);if(!de&&K.commands){q=o.keyCodeToString(q);var ye=K.commands.findKeyCommand(le,q);ye&&K.execCommand(ye)}S=re,T=ie,O("")}}};document.addEventListener("selectionchange",ne),K.on("destroy",function(){document.removeEventListener("selectionchange",ne)})}this.destroy=function(){v.parentElement&&v.parentElement.removeChild(v)}},k.TextInput=y,k.$setUserAgentForTests=function(d,l){x=d,h=l}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(M,k,B){var R=M("../lib/useragent"),L=0,A=550,a=function(){function i(n){n.$clickSelection=null;var t=n.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(n)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(n)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(n)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(n)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(n));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(o){n[o]=this[o]},this),n.selectByLines=this.extendSelectionBy.bind(n,"getLineRange"),n.selectByWords=this.extendSelectionBy.bind(n,"getWordRange")}return i.prototype.onMouseDown=function(n){var t=n.inSelection(),e=n.getDocumentPosition();this.mousedownEvent=n;var o=this.editor,s=n.getButton();if(s!==0){var h=o.getSelectionRange(),f=h.isEmpty();(f||s==1)&&o.selection.moveToPosition(e),s==2&&(o.textInput.onContextMenu(n.domEvent),R.isMozilla||n.preventDefault());return}if(this.mousedownEvent.time=Date.now(),t&&!o.isFocused()&&(o.focus(),this.$focusTimeout&&!this.$clickSelection&&!o.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(n);return}return this.captureMouse(n),this.startSelect(e,n.domEvent._clicks>1),n.preventDefault()},i.prototype.startSelect=function(n,t){n=n||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(n):t||e.selection.moveToPosition(n),t||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},i.prototype.select=function(){var n,t=this.editor,e=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var o=this.$clickSelection.comparePoint(e);if(o==-1)n=this.$clickSelection.end;else if(o==1)n=this.$clickSelection.start;else{var s=r(this.$clickSelection,e);e=s.cursor,n=s.anchor}t.selection.setSelectionAnchor(n.row,n.column)}t.selection.selectToPosition(e),t.renderer.scrollCursorIntoView()},i.prototype.extendSelectionBy=function(n){var t,e=this.editor,o=e.renderer.screenToTextCoordinates(this.x,this.y),s=e.selection[n](o.row,o.column);if(this.$clickSelection){var h=this.$clickSelection.comparePoint(s.start),f=this.$clickSelection.comparePoint(s.end);if(h==-1&&f<=0)t=this.$clickSelection.end,(s.end.row!=o.row||s.end.column!=o.column)&&(o=s.start);else if(f==1&&h>=0)t=this.$clickSelection.start,(s.start.row!=o.row||s.start.column!=o.column)&&(o=s.end);else if(h==-1&&f==1)o=s.end,t=s.start;else{var x=r(this.$clickSelection,o);o=x.cursor,t=x.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(o),e.renderer.scrollCursorIntoView()},i.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},i.prototype.focusWait=function(){var n=u(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(n>L||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},i.prototype.onDoubleClick=function(n){var t=n.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()},i.prototype.onTripleClick=function(n){var t=n.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()},i.prototype.onQuadClick=function(n){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},i.prototype.onMouseWheel=function(n){if(!n.getAccelKey()){n.getShiftKey()&&n.wheelY&&!n.wheelX&&(n.wheelX=n.wheelY,n.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,o=n.domEvent.timeStamp,s=o-e.t,h=s?n.wheelX/s:e.vx,f=s?n.wheelY/s:e.vy;s=1&&t.renderer.isScrollableBy(n.wheelX*n.speed,0)&&(y=!0),x<=1&&t.renderer.isScrollableBy(0,n.wheelY*n.speed)&&(y=!0),y)e.allowed=o;else if(o-e.allowedA.clientHeight;a||L.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(M,k,B){var R=this&&this.__extends||function(){var o=function(s,h){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,x){f.__proto__=x}||function(f,x){for(var y in x)Object.prototype.hasOwnProperty.call(x,y)&&(f[y]=x[y])},o(s,h)};return function(s,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");o(s,h);function f(){this.constructor=s}s.prototype=h===null?Object.create(h):(f.prototype=h.prototype,new f)}}(),L=this&&this.__values||function(o){var s=typeof Symbol=="function"&&Symbol.iterator,h=s&&o[s],f=0;if(h)return h.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&f>=o.length&&(o=void 0),{value:o&&o[f++],done:!o}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},A=M("./lib/dom");M("./lib/event");var a=M("./range").Range,u=M("./lib/scroll").preventParentScroll,r="ace_tooltip",i=function(){function o(s){this.isOpen=!1,this.$element=null,this.$parentNode=s}return o.prototype.$init=function(){return this.$element=A.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,h){this.getElement().style.left=s+"px",this.getElement().style.top=h+"px"},o.prototype.setClassName=function(s){A.addCssClass(this.getElement(),s)},o.prototype.setTheme=function(s){this.$element.className=r+" "+(s.isDark?"ace_dark ":"")+(s.cssClass||"")},o.prototype.show=function(s,h,f){s!=null&&this.setText(s),h!=null&&f!=null&&this.setPosition(h,f),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}(),n=function(){function o(){this.popups=[]}return o.prototype.addPopup=function(s){this.popups.push(s),this.updatePopups()},o.prototype.removePopup=function(s){var h=this.popups.indexOf(s);h!==-1&&(this.popups.splice(h,1),this.updatePopups())},o.prototype.updatePopups=function(){var s,h,f,x;this.popups.sort(function(g,p){return p.priority-g.priority});var y=[];try{for(var d=L(this.popups),l=d.next();!l.done;l=d.next()){var v=l.value,C=!0;try{for(var $=(f=void 0,L(y)),w=$.next();!w.done;w=$.next()){var b=w.value;if(this.doPopupsOverlap(b,v)){C=!1;break}}}catch(g){f={error:g}}finally{try{w&&!w.done&&(x=$.return)&&x.call($)}finally{if(f)throw f.error}}C?y.push(v):v.hide()}}catch(g){s={error:g}}finally{try{l&&!l.done&&(h=d.return)&&h.call(d)}finally{if(s)throw s.error}}},o.prototype.doPopupsOverlap=function(s,h){var f=s.getElement().getBoundingClientRect(),x=h.getElement().getBoundingClientRect();return f.leftx.left&&f.topx.top},o}(),t=new n;k.popupManager=t,k.Tooltip=i;var e=function(o){R(s,o);function s(h){h===void 0&&(h=document.body);var f=o.call(this,h)||this;f.timeout=void 0,f.lastT=0,f.idleTime=350,f.lastEvent=void 0,f.onMouseOut=f.onMouseOut.bind(f),f.onMouseMove=f.onMouseMove.bind(f),f.waitForHover=f.waitForHover.bind(f),f.hide=f.hide.bind(f);var x=f.getElement();return x.style.whiteSpace="pre-wrap",x.style.pointerEvents="auto",x.addEventListener("mouseout",f.onMouseOut),x.tabIndex=-1,x.addEventListener("blur",function(){x.contains(document.activeElement)||this.hide()}.bind(f)),x.addEventListener("wheel",u),f}return s.prototype.addToEditor=function(h){h.on("mousemove",this.onMouseMove),h.on("mousedown",this.hide),h.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},s.prototype.removeFromEditor=function(h){h.off("mousemove",this.onMouseMove),h.off("mousedown",this.hide),h.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},s.prototype.onMouseMove=function(h,f){this.lastEvent=h,this.lastT=Date.now();var x=f.$mouseHandler.isMousePressed;if(this.isOpen){var y=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(y.row,y.column)||x||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||x||(this.lastEvent=h,this.timeout=setTimeout(this.waitForHover,this.idleTime))},s.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var h=Date.now()-this.lastT;if(this.idleTime-h>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-h);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},s.prototype.isOutsideOfText=function(h){var f=h.editor,x=h.getDocumentPosition(),y=f.session.getLine(x.row);if(x.column==y.length){var d=f.renderer.pixelToScreenCoordinates(h.clientX,h.clientY),l=f.session.documentToScreenPosition(x.row,x.column);if(l.column!=d.column||l.row!=d.row)return!0}return!1},s.prototype.setDataProvider=function(h){this.$gatherData=h},s.prototype.showForRange=function(h,f,x,y){var d=10;if(!(y&&y!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var l=h.renderer;this.isOpen||(t.addPopup(this),this.$registerCloseEvents(),this.setTheme(l.theme)),this.isOpen=!0,this.addMarker(f,h.session),this.range=a.fromPoints(f.start,f.end);var v=l.textToScreenCoordinates(f.start.row,f.start.column),C=l.scroller.getBoundingClientRect();v.pageX=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},A=M("../lib/dom"),a=M("../lib/event"),u=M("../tooltip").Tooltip,r=M("../config").nls;M("../lib/lang");function i(t){var e=t.editor,o=e.renderer.$gutterLayer,s=new n(e);t.editor.setDefaultHandler("guttermousedown",function(l){if(!(!e.isFocused()||l.getButton()!=0)){var v=o.getRegion(l);if(v!="foldWidgets"){var C=l.getDocumentPosition().row,$=e.session.selection;if(l.getShiftKey())$.selectTo(C,0);else{if(l.domEvent.detail==2)return e.selectAll(),l.preventDefault();t.$clickSelection=e.selection.getLineRange(C)}return t.setState("selectByLines"),t.captureMouse(l),l.preventDefault()}}});var h,f;function x(){var l=f.getDocumentPosition().row,v=e.session.getLength();if(l==v){var C=e.renderer.pixelToScreenCoordinates(0,f.y).row,$=f.$pos;if(C>e.session.documentToScreenRow($.row,$.column))return y()}if(s.showTooltip(l),!!s.isOpen)if(e.on("mousewheel",y),t.$tooltipFollowsMouse)d(f);else{var w=f.getGutterRow(),b=o.$lines.get(w);if(b){var g=b.element.querySelector(".ace_gutter_annotation"),p=g.getBoundingClientRect(),c=s.getElement().style;c.left=p.right+"px",c.top=p.bottom+"px"}else d(f)}}function y(){h&&(h=clearTimeout(h)),s.isOpen&&(s.hideTooltip(),e.off("mousewheel",y))}function d(l){s.setPosition(l.x,l.y)}t.editor.setDefaultHandler("guttermousemove",function(l){var v=l.domEvent.target||l.domEvent.srcElement;if(A.hasCssClass(v,"ace_fold-widget"))return y();s.isOpen&&t.$tooltipFollowsMouse&&d(l),f=l,!h&&(h=setTimeout(function(){h=null,f&&!t.isMousePressed?x():y()},50))}),a.addListener(e.renderer.$gutter,"mouseout",function(l){f=null,!(!s.isOpen||h)&&(h=setTimeout(function(){h=null,y()},50))},e),e.on("changeSession",y),e.on("input",y)}k.GutterHandler=i;var n=function(t){R(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 h=window.innerWidth||document.documentElement.clientWidth,f=window.innerHeight||document.documentElement.clientHeight,x=this.getWidth(),y=this.getHeight();o+=15,s+=15,o+x>h&&(o-=o+x-h),s+y>f&&(s-=20+y),u.prototype.setPosition.call(this,o,s)},Object.defineProperty(e,"annotationLabels",{get:function(){return{error:{singular:r("gutter-tooltip.aria-label.error.singular","error"),plural:r("gutter-tooltip.aria-label.error.plural","errors")},warning:{singular:r("gutter-tooltip.aria-label.warning.singular","warning"),plural:r("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:r("gutter-tooltip.aria-label.info.singular","information message"),plural:r("gutter-tooltip.aria-label.info.plural","information messages")}}},enumerable:!1,configurable:!0}),e.prototype.showTooltip=function(o){var s,h=this.editor.renderer.$gutterLayer,f=h.$annotations[o],x;f?x={displayText:Array.from(f.displayText),type:Array.from(f.type)}:x={displayText:[],type:[]};var y=h.session.getFoldLine(o);if(y&&h.$showFoldedAnnotations){for(var d={error:[],warning:[],info:[]},l,v=o+1;v<=y.end.row;v++)if(h.$annotations[v])for(var C=0;Cr?g=null:W-g>=u&&(e.renderer.scrollCursorIntoView(),g=null)}}function m(D,O){var W=Date.now(),H=e.renderer.layerConfig.lineHeight,P=e.renderer.layerConfig.characterWidth,U=e.renderer.scroller.getBoundingClientRect(),V={x:{left:x-U.left,right:U.right-x},y:{top:y-U.top,bottom:U.bottom-y}},G=Math.min(V.x.left,V.x.right),X=Math.min(V.y.top,V.y.bottom),Z={row:D.row,column:D.column};G/P<=2&&(Z.column+=V.x.left=a&&e.renderer.scrollCursorIntoView(Z):b=W:b=null}function S(){var D=v;v=e.renderer.screenToTextCoordinates(x,y),c(v,D),m(v,D)}function T(){l=e.selection.toOrientedRange(),f=e.session.addMarker(l,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(d),S(),d=setInterval(S,20),C=0,L.addListener(document,"mousemove",I)}function E(){clearInterval(d),e.session.removeMarker(f),f=null,e.selection.fromOrientedRange(l),e.isFocused()&&!w&&e.$resetCursorStyle(),l=null,v=null,C=0,b=null,g=null,L.removeListener(document,"mousemove",I)}var _=null;function I(){_==null&&(_=setTimeout(function(){_!=null&&f&&E()},20))}function F(D){var O=D.types;return!O||Array.prototype.some.call(O,function(W){return W=="text/plain"||W=="Text"})}function N(D){var O=["copy","copymove","all","uninitialized"],W=["move","copymove","linkmove","all","uninitialized"],H=A.isMac?D.altKey:D.ctrlKey,P="uninitialized";try{P=D.dataTransfer.effectAllowed.toLowerCase()}catch(V){}var U="none";return H&&O.indexOf(P)>=0?U="copy":W.indexOf(P)>=0?U="move":O.indexOf(P)>=0&&(U="copy"),U}}(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=A.isWin?"default":"move";t.renderer.setCursorStyle(o),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if(A.isIE&&this.state=="dragReady"){var o=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);o>3&&e.dragDrop()}if(this.state==="dragWait"){var o=n(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(),h=t.domEvent.detail||1;if(h===1&&s===0&&o){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var f=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in f&&(f.unselectable="on"),e.getDragDelay()){if(A.isWebKit){this.cancelDrag=!0;var x=e.container;x.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(i.prototype);function n(t,e,o,s){return Math.sqrt(Math.pow(o-t,2)+Math.pow(s-e,2))}k.DragdropHandler=i}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(M,k,B){var R=M("./mouse_event").MouseEvent,L=M("../lib/event"),A=M("../lib/dom");k.addTouchListeners=function(a,u){var r="scroll",i,n,t,e,o,s,h=0,f,x=0,y=0,d=0,l,v;function C(){var c=window.navigator&&window.navigator.clipboard,m=!1,S=function(){var _=u.getCopyText(),I=u.session.getUndoManager().hasUndo();v.replaceChild(A.buildDom(m?["span",!_&&T("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],_&&T("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],_&&T("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],c&&T("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],I&&T("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],T("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],T("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),v.firstChild)},T=function(_){return u.commands.canExecute(_,u)},E=function(_){var I=_.target.getAttribute("action");if(I=="more"||!m)return m=!m,S();I=="paste"?c.readText().then(function(F){u.execCommand(I,F)}):I&&((I=="cut"||I=="copy")&&(c?c.writeText(u.getCopyText()):document.execCommand("copy")),u.execCommand(I)),v.firstChild.style.display="none",m=!1,I!="openCommandPalette"&&u.focus()};v=A.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(_){r="menu",_.stopPropagation(),_.preventDefault(),u.textInput.focus()},ontouchend:function(_){_.stopPropagation(),_.preventDefault(),E(_)},onclick:E},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],u.container)}function $(){if(!u.getOption("enableMobileMenu")){v&&w();return}v||C();var c=u.selection.cursor,m=u.renderer.textToScreenCoordinates(c.row,c.column),S=u.renderer.textToScreenCoordinates(0,0).pageX,T=u.renderer.scrollLeft,E=u.container.getBoundingClientRect();v.style.top=m.pageY-E.top-3+"px",m.pageX-E.left=2?u.selection.getLineRange(f.row):u.session.getBracketRange(f);c&&!c.isEmpty()?u.selection.setRange(c):u.selection.selectWord(),r="wait"}L.addListener(a,"contextmenu",function(c){if(l){var m=u.textInput.getElement();m.focus()}},u),L.addListener(a,"touchstart",function(c){var m=c.touches;if(o||m.length>1){clearTimeout(o),o=null,t=-1,r="zoom";return}l=u.$mouseHandler.isMousePressed=!0;var S=u.renderer.layerConfig.lineHeight,T=u.renderer.layerConfig.lineHeight,E=c.timeStamp;e=E;var _=m[0],I=_.clientX,F=_.clientY;Math.abs(i-I)+Math.abs(n-F)>S&&(t=-1),i=c.clientX=I,n=c.clientY=F,y=d=0;var N=new R(c,u);if(f=N.getDocumentPosition(),E-t<500&&m.length==1&&!h)x++,c.preventDefault(),c.button=0,g();else{x=0;var D=u.selection.cursor,O=u.selection.isEmpty()?D:u.selection.anchor,W=u.renderer.$cursorLayer.getPixelPosition(D,!0),H=u.renderer.$cursorLayer.getPixelPosition(O,!0),P=u.renderer.scroller.getBoundingClientRect(),U=u.renderer.layerConfig.offset,V=u.renderer.scrollLeft,G=function(ae,se){return ae=ae/T,se=se/S-.75,ae*ae+se*se};if(c.clientXZ?"cursor":"anchor"),Z<3.5?r="anchor":X<3.5?r="cursor":r="scroll",o=setTimeout(b,450)}t=E},u),L.addListener(a,"touchend",function(c){l=u.$mouseHandler.isMousePressed=!1,s&&clearInterval(s),r=="zoom"?(r="",h=0):o?(u.selection.moveToPosition(f),h=0,$()):r=="scroll"?(p(),w()):$(),clearTimeout(o),o=null},u),L.addListener(a,"touchmove",function(c){o&&(clearTimeout(o),o=null);var m=c.touches;if(!(m.length>1||r=="zoom")){var S=m[0],T=i-S.clientX,E=n-S.clientY;if(r=="wait")if(T*T+E*E>4)r="cursor";else return c.preventDefault();i=S.clientX,n=S.clientY,c.clientX=S.clientX,c.clientY=S.clientY;var _=c.timeStamp,I=_-e;if(e=_,r=="scroll"){var F=new R(c,u);F.speed=1,F.wheelX=T,F.wheelY=E,10*Math.abs(T)0)if(Z==16){for(te=se;te-1){for(te=se;te=0&&H[ue]==l;ue--)O[ue]=R}}}function I(D,O,W){if(!(L=D){for(U=P+1;U=D;)U++;for(V=P,G=U-1;V=O.length||(U=W[H-1])!=s&&U!=h||(V=O[H+1])!=s&&V!=h?f:(A&&(V=h),V==U?V:f);case C:return U=H>0?W[H-1]:x,U==s&&H+10&&W[H-1]==s)return s;if(A)return f;for(X=H+1,G=O.length;X=1425&&Z<=2303||Z==64286;if(U=O[X],ae&&(U==o||U==d))return o}return H<1||(U=O[H-1])==x?f:W[H-1];case x:return A=!1,a=!0,R;case y:return u=!0,f;case b:case g:case c:case m:case p:A=!1;case S:return f}}function N(D){var O=D.charCodeAt(0),W=O>>8;return W==0?O>191?e:T[O]:W==5?/[\u0591-\u05f4]/.test(D)?o:e:W==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(D)?w:/[\u0660-\u0669\u066b-\u066c]/.test(D)?h:O==1642?$:/[\u06f0-\u06f9]/.test(D)?s:d:W==32&&O<=8287?E[O&255]:W==254&&O>=65136?d:f}k.L=e,k.R=o,k.EN=s,k.ON_R=3,k.AN=4,k.R_H=5,k.B=6,k.RLE=7,k.DOT="·",k.doBidiReorder=function(D,O,W){if(D.length<2)return{};var H=D.split(""),P=new Array(H.length),U=new Array(H.length),V=[];R=W?t:n,_(H,V,H.length,O);for(var G=0;Gd&&O[G]0&&H[G-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(H[G])&&(V[G-1]=V[G]=k.R_H,G++);H[H.length-1]===k.DOT&&(V[H.length-1]=k.B),H[0]==="‫"&&(V[0]=k.RLE);for(var G=0;G=0&&(r=this.session.$docRowCache[n])}return r},u.prototype.getSplitIndex=function(){var r=0,i=this.session.$screenRowCache;if(i.length)for(var n,t=this.session.$getRowCacheIndex(i,this.currentRow);this.currentRow-r>0&&(n=this.session.$getRowCacheIndex(i,this.currentRow-r-1),n===t);)t=n,r++;else r=this.currentRow;return r},u.prototype.updateRowLine=function(r,i){r===void 0&&(r=this.getDocumentRow());var n=r===this.session.getLength()-1,t=n?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&&(i===void 0&&(i=this.getSplitIndex()),i>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[R.L],this.line=ii?this.session.getOverwrite()?r:r-1:i,t=R.getVisualFromLogicalIdx(n,this.bidiMap),e=this.bidiMap.bidiLevels,o=0;!this.session.getOverwrite()&&r<=i&&e[t]%2!==0&&t++;for(var s=0;si&&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},u.prototype.getSelections=function(r,i){var n=this.bidiMap,t=n.bidiLevels,e,o=[],s=0,h=Math.min(r,i)-this.wrapIndent,f=Math.max(r,i)-this.wrapIndent,x=!1,y=!1,d=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var l,v=0;v=h&&lt+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?(n0&&o[e-1]%2===0&&o[e]%2!==0?i=1+(n>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?i=1+this.bidiMap.logicalFromVisual[e]:(e>0&&o[e-1]%2!==0&&s!==0&&e--,i=this.bidiMap.logicalFromVisual[e]),i===0&&this.isRtlDir&&i++,i+this.wrapIndent},u}();k.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(M,k,B){var R=M("./lib/oop"),L=M("./lib/lang"),A=M("./lib/event_emitter").EventEmitter,a=M("./range").Range,u=function(){function r(i){this.session=i,this.doc=i.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var n=this;this.cursor.on("change",function(t){n.$cursorChanged=!0,n.$silent||n._emit("changeCursor"),!n.$isEmpty&&!n.$silent&&n._emit("changeSelection"),!n.$keepDesiredColumnOnChange&&t.old.column!=t.value.column&&(n.$desiredColumn=null)}),this.anchor.on("change",function(){n.$anchorChanged=!0,!n.$isEmpty&&!n.$silent&&n._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(i,n){this.$isEmpty=!1,this.anchor.setPosition(i,n)},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 i=this.anchor,n=this.lead;return i.row>n.row||i.row==n.row&&i.column>n.column},r.prototype.getRange=function(){var i=this.anchor,n=this.lead;return this.$isEmpty?a.fromPoints(n,n):this.isBackwards()?a.fromPoints(n,i):a.fromPoints(i,n)},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(i,n){var t=n?i.end:i.start,e=n?i.start:i.end;this.$setSelection(t.row,t.column,e.row,e.column)},r.prototype.$setSelection=function(i,n,t,e){if(!this.$silent){var o=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(i,n),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(i){var n=this.lead;this.$isEmpty&&this.setSelectionAnchor(n.row,n.column),i.call(this)},r.prototype.selectTo=function(i,n){this.$moveSelection(function(){this.moveCursorTo(i,n)})},r.prototype.selectToPosition=function(i){this.$moveSelection(function(){this.moveCursorToPosition(i)})},r.prototype.moveTo=function(i,n){this.clearSelection(),this.moveCursorTo(i,n)},r.prototype.moveToPosition=function(i){this.clearSelection(),this.moveCursorToPosition(i)},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(i,n){if(typeof n=="undefined"){var t=i||this.lead;i=t.row,n=t.column}return this.session.getWordRange(i,n)},r.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},r.prototype.selectAWord=function(){var i=this.getCursor(),n=this.session.getAWordRange(i.row,i.column);this.setSelectionRange(n)},r.prototype.getLineRange=function(i,n){var t=typeof i=="number"?i:this.lead.row,e,o=this.session.getFoldLine(t);return o?(t=o.start.row,e=o.end.row):e=t,n===!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(i,n,t){var e=i.column,o=i.column+n;return t<0&&(e=i.column-n,o=i.column),this.session.isTabStop(i)&&this.doc.getLine(i.row).slice(e,o).split(" ").length-1==n},r.prototype.moveCursorLeft=function(){var i=this.lead.getPosition(),n;if(n=this.session.getFoldAt(i.row,i.column,-1))this.moveCursorTo(n.start.row,n.start.column);else if(i.column===0)i.row>0&&this.moveCursorTo(i.row-1,this.doc.getLine(i.row-1).length);else{var t=this.session.getTabSize();this.wouldMoveIntoSoftTab(i,t,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-t):this.moveCursorBy(0,-1)}},r.prototype.moveCursorRight=function(){var i=this.lead.getPosition(),n;if(n=this.session.getFoldAt(i.row,i.column,1))this.moveCursorTo(n.end.row,n.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(n.column=e)}}this.moveCursorTo(n.row,n.column)},r.prototype.moveCursorFileEnd=function(){var i=this.doc.getLength()-1,n=this.doc.getLine(i).length;this.moveCursorTo(i,n)},r.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},r.prototype.moveCursorLongWordRight=function(){var i=this.lead.row,n=this.lead.column,t=this.doc.getLine(i),e=t.substring(n);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(i,n,1);if(o){this.moveCursorTo(o.end.row,o.end.column);return}if(this.session.nonTokenRe.exec(e)&&(n+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=t.substring(n)),n>=t.length){this.moveCursorTo(i,t.length),this.moveCursorRight(),i0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,n)},r.prototype.$shortWordEndIndex=function(i){var n=0,t,e=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(i))n=this.session.tokenRe.lastIndex;else{for(;(t=i[n])&&e.test(t);)n++;if(n<1){for(o.lastIndex=0;(t=i[n])&&!o.test(t);)if(o.lastIndex=0,n++,e.test(t))if(n>2){n--;break}else{for(;(t=i[n])&&e.test(t);)n++;if(n>2)break}}}return o.lastIndex=0,n},r.prototype.moveCursorShortWordRight=function(){var i=this.lead.row,n=this.lead.column,t=this.doc.getLine(i),e=t.substring(n),o=this.session.getFoldAt(i,n,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(n==t.length){var s=this.doc.getLength();do i++,e=this.doc.getLine(i);while(i0&&/^\s*$/.test(e));n=e.length,/\s+$/.test(e)||(e="")}var o=L.stringReverse(e),s=this.$shortWordEndIndex(o);return this.moveCursorTo(i,n-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(i,n){var t=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(n===0&&(i!==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),i!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var o=this.session.lineWidgets[this.lead.row];i<0?i-=o.rowsAbove||0:i>0&&(i+=o.rowCount-(o.rowsAbove||0))}var s=this.session.screenToDocumentPosition(t.row+i,t.column,e);i!==0&&n===0&&s.row===this.lead.row&&(s.column,this.lead.column),this.moveCursorTo(s.row,s.column+n,n===0)},r.prototype.moveCursorToPosition=function(i){this.moveCursorTo(i.row,i.column)},r.prototype.moveCursorTo=function(i,n,t){var e=this.session.getFoldAt(i,n,1);e&&(i=e.start.row,n=e.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(i);/[\uDC00-\uDFFF]/.test(o.charAt(n))&&o.charAt(n-1)&&(this.lead.row==i&&this.lead.column==n+1?n=n-1:n=n+1),this.lead.setPosition(i,n),this.$keepDesiredColumnOnChange=!1,t||(this.$desiredColumn=null)},r.prototype.moveCursorToScreen=function(i,n,t){var e=this.session.screenToDocumentPosition(i,n);this.moveCursorTo(e.row,e.column,t)},r.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},r.prototype.fromOrientedRange=function(i){this.setSelectionRange(i,i.cursor==i.start),this.$desiredColumn=i.desiredColumn||this.$desiredColumn},r.prototype.toOrientedRange=function(i){var n=this.getRange();return i?(i.start.column=n.start.column,i.start.row=n.start.row,i.end.column=n.end.column,i.end.row=n.end.row):i=n,i.cursor=this.isBackwards()?i.start:i.end,i.desiredColumn=this.$desiredColumn,i},r.prototype.getRangeOfMovements=function(i){var n=this.getCursor();try{i(this);var t=this.getCursor();return a.fromPoints(n,t)}catch(e){return a.fromPoints(n,n)}finally{this.moveCursorToPosition(n)}},r.prototype.toJSON=function(){if(this.rangeCount)var i=this.ranges.map(function(n){var t=n.clone();return t.isBackwards=n.cursor==n.start,t});else{var i=this.getRange();i.isBackwards=this.isBackwards()}return i},r.prototype.fromJSON=function(i){if(i.start==null)if(this.rangeList&&i.length>1){this.toSingleRange(i[0]);for(var n=i.length;n--;){var t=a.fromPoints(i[n].start,i[n].end);i[n].isBackwards&&(t.cursor=t.start),this.addRange(t,!0)}return}else i=i[0];this.rangeList&&this.toSingleRange(i),this.setSelectionRange(i,i.isBackwards)},r.prototype.isEqual=function(i){if((i.length||this.rangeCount)&&i.length!=this.rangeCount)return!1;if(!i.length||!this.ranges)return this.getRange().isEqual(i);for(var n=this.ranges.length;n--;)if(!this.ranges[n].isEqual(i[n]))return!1;return!0},r}();u.prototype.setSelectionAnchor=u.prototype.setAnchor,u.prototype.getSelectionAnchor=u.prototype.getAnchor,u.prototype.setSelectionRange=u.prototype.setRange,R.implement(u.prototype,A),k.Selection=u}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(M,k,B){var R=M("./lib/report_error").reportError,L=2e3,A=function(){function a(u){this.splitRegex,this.states=u,this.regExps={},this.matchMappings={};for(var r in this.states){for(var i=this.states[r],n=[],t=0,e=this.matchMappings[r]={defaultToken:"text"},o="g",s=[],h=0;h1?f.onMatch=this.$applyToken:f.onMatch=f.token),y>1&&(/\\\d/.test(f.regex)?x=f.regex.replace(/\\([0-9]+)/g,function(d,l){return"\\"+(parseInt(l,10)+t+1)}):(y=1,x=this.removeCapturingGroups(f.regex)),!f.splitRegex&&typeof f.token!="string"&&s.push(f)),e[t]=h,t+=y,n.push(x),f.onMatch||(f.onMatch=null)}}n.length||(e[0]=0,n.push("$")),s.forEach(function(d){d.splitRegex=this.createSplitterRegexp(d.regex,o)},this),this.regExps[r]=new RegExp("("+n.join(")|(")+")|($)",o)}}return a.prototype.$setMaxTokenCount=function(u){L=u|0},a.prototype.$applyToken=function(u){var r=this.splitRegex.exec(u).slice(1),i=this.token.apply(this,r);if(typeof i=="string")return[{type:i,value:u}];for(var n=[],t=0,e=i.length;tf){var $=u.substring(f,C-v.length);y.type==d?y.value+=$:(y.type&&h.push(y),y={type:d,value:$})}for(var w=0;wL){for(x>2*u.length&&this.reportError("infinite loop with in ace tokenizer",{startState:r,line:u});f1&&i[0]!==n&&i.unshift("#tmp",n),{tokens:h,state:i.length?i:n}},a}();A.prototype.reportError=R,k.Tokenizer=A}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(M,k,B){var R=M("../lib/deep_copy").deepCopy,L;L=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},function(){this.addRules=function(u,r){if(!r){for(var i in u)this.$rules[i]=u[i];return}for(var i in u){for(var n=u[i],t=0;t=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]},A.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},A.prototype.getCurrentTokenRow=function(){return this.$row},A.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,u=this.$tokenIndex,r=a[u].start;if(r!==void 0)return r;for(r=0;u>0;)u-=1,r+=a[u].value.length;return r},A.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},A.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],u=this.getCurrentTokenColumn();return new R(this.$row,u,this.$row,u+a.value.length)},A}();k.TokenIterator=L}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(M,k,B){var R=M("../../lib/oop"),L=M("../behaviour").Behaviour,A=M("../../token_iterator").TokenIterator,a=M("../../lib/lang"),u=["text","paren.rparen","rparen","paren","punctuation.operator"],r=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],i,n={},t={'"':'"',"'":"'"},e=function(h){var f=-1;if(h.multiSelect&&(f=h.selection.index,n.rangeCount!=h.multiSelect.rangeCount&&(n={rangeCount:h.multiSelect.rangeCount})),n[f])return i=n[f];i=n[f]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},o=function(h,f,x,y){var d=h.end.row-h.start.row;return{text:x+f+y,selection:[0,h.start.column+1,d,h.end.column+(d?0:1)]}},s;s=function(h){h=h||{},this.add("braces","insertion",function(f,x,y,d,l){var v=y.getCursorPosition(),C=d.doc.getLine(v.row);if(l=="{"){e(y);var $=y.getSelectionRange(),w=d.doc.getTextRange($),b=d.getTokenAt(v.row,v.column);if(w!==""&&w!=="{"&&y.getWrapBehavioursEnabled())return o($,w,"{","}");if(b&&/(?:string)\.quasi|\.xml/.test(b.type)){var g=[/tag\-(?:open|name)/,/attribute\-name/];return g.some(function(_){return _.test(b.type)})||/(string)\.quasi/.test(b.type)&&b.value[v.column-b.start-1]!=="$"?void 0:(s.recordAutoInsert(y,d,"}"),{text:"{}",selection:[1,1]})}else if(s.isSaneInsertion(y,d))return/[\]\}\)]/.test(C[v.column])||y.inMultiSelectMode||h.braces?(s.recordAutoInsert(y,d,"}"),{text:"{}",selection:[1,1]}):(s.recordMaybeInsert(y,d,"{"),{text:"{",selection:[1,1]})}else if(l=="}"){e(y);var p=C.substring(v.column,v.column+1);if(p=="}"){var c=d.$findOpeningBracket("}",{column:v.column+1,row:v.row});if(c!==null&&s.isAutoInsertedClosing(v,C,l))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(l==` `||l==`\r `){e(y);var m="";s.isMaybeInsertedClosing(v,C)&&(m=a.stringRepeat("}",i.maybeInsertedBrackets),s.clearMaybeInsertedClosing());var p=C.substring(v.column,v.column+1);if(p==="}"){var S=d.findMatchingBracket({row:v.row,column:v.column+1},"}");if(!S)return null;var T=this.$getIndent(d.getLine(S.row))}else if(m)var T=this.$getIndent(C);else{s.clearMaybeInsertedClosing();return}var E=T+d.getTabString();return{text:` `+E+` `+T+m,selection:[1,E.length,1,E.length]}}else s.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(f,x,y,d,l){var v=d.doc.getTextRange(l);if(!l.isMultiLine()&&v=="{"){e(y);var C=d.doc.getLine(l.start.row),$=C.substring(l.end.column,l.end.column+1);if($=="}")return l.end.column++,l;i.maybeInsertedBrackets--}}),this.add("parens","insertion",function(f,x,y,d,l){if(l=="("){e(y);var v=y.getSelectionRange(),C=d.doc.getTextRange(v);if(C!==""&&y.getWrapBehavioursEnabled())return o(v,C,"(",")");if(s.isSaneInsertion(y,d))return s.recordAutoInsert(y,d,")"),{text:"()",selection:[1,1]}}else if(l==")"){e(y);var $=y.getCursorPosition(),w=d.doc.getLine($.row),b=w.substring($.column,$.column+1);if(b==")"){var g=d.$findOpeningBracket(")",{column:$.column+1,row:$.row});if(g!==null&&s.isAutoInsertedClosing($,w,l))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(f,x,y,d,l){var v=d.doc.getTextRange(l);if(!l.isMultiLine()&&v=="("){e(y);var C=d.doc.getLine(l.start.row),$=C.substring(l.start.column+1,l.start.column+2);if($==")")return l.end.column++,l}}),this.add("brackets","insertion",function(f,x,y,d,l){if(l=="["){e(y);var v=y.getSelectionRange(),C=d.doc.getTextRange(v);if(C!==""&&y.getWrapBehavioursEnabled())return o(v,C,"[","]");if(s.isSaneInsertion(y,d))return s.recordAutoInsert(y,d,"]"),{text:"[]",selection:[1,1]}}else if(l=="]"){e(y);var $=y.getCursorPosition(),w=d.doc.getLine($.row),b=w.substring($.column,$.column+1);if(b=="]"){var g=d.$findOpeningBracket("]",{column:$.column+1,row:$.row});if(g!==null&&s.isAutoInsertedClosing($,w,l))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(f,x,y,d,l){var v=d.doc.getTextRange(l);if(!l.isMultiLine()&&v=="["){e(y);var C=d.doc.getLine(l.start.row),$=C.substring(l.start.column+1,l.start.column+2);if($=="]")return l.end.column++,l}}),this.add("string_dquotes","insertion",function(f,x,y,d,l){var v=d.$mode.$quotes||t;if(l.length==1&&v[l]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(l)!=-1)return;e(y);var C=l,$=y.getSelectionRange(),w=d.doc.getTextRange($);if(w!==""&&(w.length!=1||!v[w])&&y.getWrapBehavioursEnabled())return o($,w,C,C);if(!w){var b=y.getCursorPosition(),g=d.doc.getLine(b.row),p=g.substring(b.column-1,b.column),c=g.substring(b.column,b.column+1),m=d.getTokenAt(b.row,b.column),S=d.getTokenAt(b.row,b.column+1);if(p=="\\"&&m&&/escape/.test(m.type))return null;var T=m&&/string|escape/.test(m.type),E=!S||/string|escape/.test(S.type),_;if(c==C)_=T!==E,_&&/string\.end/.test(S.type)&&(_=!1);else{if(T&&!E||T&&E)return null;var I=d.$mode.tokenRe;I.lastIndex=0;var F=I.test(p);I.lastIndex=0;var N=I.test(c),D=d.$mode.$pairQuotesAfter,O=D&&D[C]&&D[C].test(p);if(!O&&F||N||c&&!/[\s;,.})\]\\]/.test(c))return null;var W=g[b.column-2];if(p==C&&(W==C||I.test(W)))return null;_=!0}return{text:_?C+C:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(f,x,y,d,l){var v=d.$mode.$quotes||t,C=d.doc.getTextRange(l);if(!l.isMultiLine()&&v.hasOwnProperty(C)){e(y);var $=d.doc.getLine(l.start.row),w=$.substring(l.start.column+1,l.start.column+2);if(w==C)return l.end.column++,l}}),h.closeDocComment!==!1&&this.add("doc comment end","insertion",function(f,x,y,d,l){if(f==="doc-start"&&(l===` `||l===`\r `)&&y.selection.isEmpty()){var v=y.getCursorPosition();if(v.column===0)return;for(var C=d.doc.getLine(v.row),$=d.doc.getLine(v.row+1),w=d.getTokens(v.row),b=0,g=0;g=v.column){if(b===v.column){if(!/\.doc/.test(p.type))return;if(/\*\//.test(p.value)){var c=w[g+1];if(!c||!/\.doc/.test(c.type))return}}var m=v.column-(b-p.value.length),S=p.value.indexOf("*/"),T=p.value.indexOf("/**",S>-1?S+2:0);if(T!==-1&&m>T&&m=S&&m<=T||!/\.doc/.test(p.type))return;break}}var E=this.$getIndent(C);if(/\s*\*/.test($))return/^\s*\*/.test(C)?{text:l+E+"* ",selection:[1,2+E.length,1,2+E.length]}:{text:l+E+" * ",selection:[1,3+E.length,1,3+E.length]};if(/\/\*\*/.test(C.substring(0,v.column)))return{text:l+E+" * "+l+" "+E+"*/",selection:[1,4+E.length,1,4+E.length]}}})},s.isSaneInsertion=function(h,f){var x=h.getCursorPosition(),y=new A(f,x.row,x.column);if(!this.$matchTokenType(y.getCurrentToken()||"text",u)){if(/[)}\]]/.test(h.session.getLine(x.row)[x.column]))return!0;var d=new A(f,x.row,x.column+1);if(!this.$matchTokenType(d.getCurrentToken()||"text",u))return!1}return y.stepForward(),y.getCurrentTokenRow()!==x.row||this.$matchTokenType(y.getCurrentToken()||"text",r)},s.$matchTokenType=function(h,f){return f.indexOf(h.type||h)>-1},s.recordAutoInsert=function(h,f,x){var y=h.getCursorPosition(),d=f.doc.getLine(y.row);this.isAutoInsertedClosing(y,d,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=y.row,i.autoInsertedLineEnd=x+d.substr(y.column),i.autoInsertedBrackets++},s.recordMaybeInsert=function(h,f,x){var y=h.getCursorPosition(),d=f.doc.getLine(y.row);this.isMaybeInsertedClosing(y,d)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=y.row,i.maybeInsertedLineStart=d.substr(0,y.column)+x,i.maybeInsertedLineEnd=d.substr(y.column),i.maybeInsertedBrackets++},s.isAutoInsertedClosing=function(h,f,x){return i.autoInsertedBrackets>0&&h.row===i.autoInsertedRow&&x===i.autoInsertedLineEnd[0]&&f.substr(h.column)===i.autoInsertedLineEnd},s.isMaybeInsertedClosing=function(h,f){return i.maybeInsertedBrackets>0&&h.row===i.maybeInsertedRow&&f.substr(h.column)===i.maybeInsertedLineEnd&&f.substr(0,h.column)==i.maybeInsertedLineStart},s.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},s.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},R.inherits(s,L),k.CstyleBehaviour=s}),ace.define("ace/unicode",["require","exports","module"],function(M,k,B){for(var R=[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,A=[],a=0;a2?W%l!=l-1:W%l==0}}else{if(!this.blockComment)return!1;var C=this.blockComment.start,$=this.blockComment.end,w=new RegExp("^(\\s*)(?:"+r.escapeRegExp(C)+")"),b=new RegExp("(?:"+r.escapeRegExp($)+")\\s*$"),g=function(_,I){c(_,I)||(!x||/\S/.test(_))&&(f.insertInLine({row:I,column:_.length},$),f.insertInLine({row:I,column:d},C))},p=function(_,I){var F;(F=_.match(b))&&f.removeInLine(I,_.length-F[0].length,_.length),(F=_.match(w))&&f.removeInLine(I,F[1].length,F[0].length)},c=function(_,I){if(w.test(_))return!0;for(var F=o.getTokens(I),N=0;N_.length&&(E=_.length)}),d==1/0&&(d=E,x=!1,y=!1),v&&d%l!=0&&(d=Math.floor(d/l)*l),T(y?p:g)},this.toggleBlockComment=function(e,o,s,h){var f=this.blockComment;if(f){!f.start&&f[0]&&(f=f[0]);var x=new i(o,h.row,h.column),y=x.getCurrentToken();o.selection;var d=o.selection.toOrientedRange(),l,v;if(y&&/comment/.test(y.type)){for(var C,$;y&&/comment/.test(y.type);){var w=y.value.indexOf(f.start);if(w!=-1){var b=x.getCurrentTokenRow(),g=x.getCurrentTokenColumn()+w;C=new n(b,g,b,g+f.start.length);break}y=x.stepBackward()}for(var x=new i(o,h.row,h.column),y=x.getCurrentToken();y&&/comment/.test(y.type);){var w=y.value.indexOf(f.end);if(w!=-1){var b=x.getCurrentTokenRow(),g=x.getCurrentTokenColumn()+w;$=new n(b,g,b,g+f.end.length);break}y=x.stepForward()}$&&o.remove($),C&&(o.remove(C),l=C.start.row,v=-f.start.length)}else v=f.start.length,l=s.start.row,o.insert(s.end,f.end),o.insert(s.start,f.start);d.start.row==l&&(d.start.column+=v),d.end.row==l&&(d.end.column+=v),o.selection.fromOrientedRange(d)}},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],h=s.prototype.$id,f=R.$modes[h];f||(R.$modes[h]=f=new s),R.$modes[o]||(R.$modes[o]=f),this.$embeds.push(o),this.$modes[o]=f}for(var x=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],y=function(l){(function(v){var C=x[l],$=v[C];v[x[l]]=function(){return this.$delegator(C,arguments,$)}})(d)},d=this,o=0;othis.row)){var n=u(i,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},r.prototype.setPosition=function(i,n,t){var e;if(t?e={row:i,column:n}:e=this.$clipPositionToDocument(i,n),!(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(i){this.document=i||this.document,this.document.on("change",this.$onChange)},r.prototype.$clipPositionToDocument=function(i,n){var t={};return i>=this.document.getLength()?(t.row=Math.max(0,this.document.getLength()-1),t.column=this.document.getLine(t.row).length):i<0?(t.row=0,t.column=0):(t.row=i,t.column=Math.min(this.document.getLine(t.row).length,Math.max(0,n))),n<0&&(t.column=0),t},r}();A.prototype.$insertRight=!1,R.implement(A.prototype,L);function a(r,i,n){var t=n?r.column<=i.column:r.column=e&&(n=e-1,t=void 0);var o=this.getLine(n);return t==null&&(t=o.length),t=Math.min(Math.max(t,0),o.length),{row:n,column:t}},i.prototype.clonePos=function(n){return{row:n.row,column:n.column}},i.prototype.pos=function(n,t){return{row:n,column:t}},i.prototype.$clipPosition=function(n){var t=this.getLength();return n.row>=t?(n.row=Math.max(0,t-1),n.column=this.getLine(t-1).length):(n.row=Math.max(0,n.row),n.column=Math.min(Math.max(n.column,0),this.getLine(n.row).length)),n},i.prototype.insertFullLines=function(n,t){n=Math.min(Math.max(n,0),this.getLength());var e=0;n0,o=t=0&&this.applyDelta({start:this.pos(n,this.getLine(n).length),end:this.pos(n+1,0),action:"remove",lines:["",""]})},i.prototype.replace=function(n,t){if(n instanceof a||(n=a.fromPoints(n.start,n.end)),t.length===0&&n.isEmpty())return n.start;if(t==this.getTextRange(n))return n.end;this.remove(n);var e;return t?e=this.insert(n.start,t):e=n.start,e},i.prototype.applyDeltas=function(n){for(var t=0;t=0;t--)this.revertDelta(n[t])},i.prototype.applyDelta=function(n,t){var e=n.action=="insert";(e?n.lines.length<=1&&!n.lines[0]:!a.comparePoints(n.start,n.end))||(e&&n.lines.length>2e4?this.$splitAndapplyLargeDelta(n,2e4):(L(this.$lines,n,t),this._signal("change",n)))},i.prototype.$safeApplyDelta=function(n){var t=this.$lines.length;(n.action=="remove"&&n.start.row20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=t,e==-1&&(e=t),s<=e&&i.fireUpdateEvent(s,e)}}}return a.prototype.setTokenizer=function(u){this.tokenizer=u,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(u){this.doc=u,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(u,r){var i={first:u,last:r};this._signal("update",{data:i})},a.prototype.start=function(u){this.currentLine=Math.min(u||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(u){var r=u.start.row,i=u.end.row-r;if(i===0)this.lines[r]=null;else if(u.action=="remove")this.lines.splice(r,i+1,null),this.states.splice(r,i+1,null);else{var n=Array(i+1);n.unshift(r,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}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(u){return this.lines[u]||this.$tokenizeRow(u)},a.prototype.getState=function(u){return this.currentLine==u&&this.$tokenizeRow(u),this.states[u]||"start"},a.prototype.$tokenizeRow=function(u){var r=this.doc.getLine(u),i=this.states[u-1],n=this.tokenizer.getLineTokens(r,i,u);return this.states[u]+""!=n.state+""?(this.states[u]=n.state,this.lines[u+1]=null,this.currentLine>u+1&&(this.currentLine=u+1)):this.currentLine==u&&(this.currentLine=u+1),this.lines[u]=n.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a}();R.implement(A.prototype,L),k.BackgroundTokenizer=A}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(M,k,B){var R=M("./lib/lang"),L=M("./range").Range,A=function(){function a(u,r,i){i===void 0&&(i="text"),this.setRegexp(u),this.clazz=r,this.type=i}return a.prototype.setRegexp=function(u){this.regExp+""!=u+""&&(this.regExp=u,this.cache=[])},a.prototype.update=function(u,r,i,n){if(this.regExp)for(var t=n.firstRow,e=n.lastRow,o={},s=t;s<=e;s++){var h=this.cache[s];h==null&&(h=R.getMatchOffsets(i.getLine(s),this.regExp),h.length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES)),h=h.map(function(d){return new L(s,d.offset,s,d.offset+d.length)}),this.cache[s]=h.length?h:"");for(var f=h.length;f--;){var x=h[f].toScreenRange(i),y=x.toString();o[y]||(o[y]=!0,r.drawSingleLineMarker(u,x,this.clazz,n))}}},a}();A.prototype.MAX_RANGES=500,k.SearchHighlight=A}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(M,k,B){var R=function(){function d(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return d.prototype.addSession=function(l){this.$session=l},d.prototype.add=function(l,v,C){if(!this.$fromUndo&&l!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),v===!1||!this.lastDeltas){this.lastDeltas=[];var $=this.$undoStack.length;$>this.$undoDepth-1&&this.$undoStack.splice(0,$-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),l.id=this.$rev=++this.$maxRev}(l.action=="remove"||l.action=="insert")&&(this.$lastDelta=l),this.lastDeltas.push(l)}},d.prototype.addSelection=function(l,v){this.selections.push({value:l,rev:v||this.$rev})},d.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},d.prototype.markIgnored=function(l,v){v==null&&(v=this.$rev+1);for(var C=this.$undoStack,$=C.length;$--;){var w=C[$][0];if(w.id<=l)break;w.id0},d.prototype.canRedo=function(){return this.$redoStack.length>0},d.prototype.bookmark=function(l){l==null&&(l=this.$rev),this.mark=l},d.prototype.isAtBookmark=function(){return this.$rev===this.mark},d.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},d.prototype.fromJSON=function(l){this.reset(),this.$undoStack=l.$undoStack,this.$redoStack=l.$redoStack},d.prototype.$prettyPrint=function(l){return l?i(l):i(this.$undoStack)+` --- `+i(this.$redoStack)},d}();R.prototype.hasUndo=R.prototype.canUndo,R.prototype.hasRedo=R.prototype.canRedo,R.prototype.isClean=R.prototype.isAtBookmark,R.prototype.markClean=R.prototype.bookmark;function L(d,l){for(var v=l;v--;){var C=d[v];if(C&&!C[0].ignore){for(;v"+d.end.row+":"+d.end.column}function t(d,l){var v=d.action=="insert",C=l.action=="insert";if(v&&C)if(a(l.start,d.end)>=0)s(l,d,-1);else if(a(l.start,d.start)<=0)s(d,l,1);else return null;else if(v&&!C)if(a(l.start,d.end)>=0)s(l,d,-1);else if(a(l.end,d.start)<=0)s(d,l,-1);else return null;else if(!v&&C)if(a(l.start,d.start)>=0)s(l,d,1);else if(a(l.start,d.start)<=0)s(d,l,1);else return null;else if(!v&&!C)if(a(l.start,d.start)>=0)s(l,d,1);else if(a(l.end,d.start)<=0)s(d,l,-1);else return null;return[l,d]}function e(d,l){for(var v=d.length;v--;)for(var C=0;C=0?s(d,l,-1):(a(d.start,l.start)<=0||s(d,A.fromPoints(l.start,d.start),-1),s(l,d,1));else if(!v&&C)a(l.start,d.end)>=0?s(l,d,-1):(a(l.start,d.start)<=0||s(l,A.fromPoints(d.start,l.start),-1),s(d,l,1));else if(!v&&!C)if(a(l.start,d.end)>=0)s(l,d,-1);else if(a(l.end,d.start)<=0)s(d,l,-1);else{var $,w;return a(d.start,l.start)<0&&($=d,d=f(d,l.start)),a(d.end,l.end)>0&&(w=f(d,l.end)),h(l.end,d.start,d.end,-1),w&&!$&&(d.lines=w.lines,d.start=w.start,d.end=w.end,w=d),[l,$,w].filter(Boolean)}return[l,d]}function s(d,l,v){h(d.start,l.start,l.end,v),h(d.end,l.start,l.end,v)}function h(d,l,v,C){d.row==(C==1?l:v).row&&(d.column+=C*(v.column-l.column)),d.row+=C*(v.row-l.row)}function f(d,l){var v=d.lines,C=d.end;d.end=u(l);var $=d.end.row-d.start.row,w=v.splice($,v.length),b=$?l.column:l.column-d.start.column;v.push(w[0].substring(0,b)),w[0]=w[0].substr(b);var g={start:u(l),end:C,lines:w,action:d.action};return g}function x(d,l){l=r(l);for(var v=d.length;v--;){for(var C=d[v],$=0;$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(u,r){return-u.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},A.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},A.prototype.walk=function(a,u,r){var i=0,n=this.folds,t,e,o,s=!0;u==null&&(u=this.end.row,r=this.end.column);for(var h=0;h0)){var s=L(u,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(u){var r=!u.isEmpty(),i=this.pointIndex(u.start,r);i<0&&(i=-i-1);var n=this.pointIndex(u.end,r,i);return n<0?n=-n-1:n++,this.ranges.splice(i,n-i,u)},a.prototype.addList=function(u){for(var r=[],i=u.length;i--;)r.push.apply(r,this.add(u[i]));return r},a.prototype.substractPoint=function(u){var r=this.pointIndex(u);if(r>=0)return this.ranges.splice(r,1)},a.prototype.merge=function(){var u=[],r=this.ranges;r=r.sort(function(o,s){return L(o.start,s.start)});for(var i=r[0],n,t=1;t=0},a.prototype.containsPoint=function(u){return this.pointIndex(u)>=0},a.prototype.rangeAtPoint=function(u){var r=this.pointIndex(u);if(r>=0)return this.ranges[r]},a.prototype.clipRows=function(u,r){var i=this.ranges;if(i[0].start.row>r||i[i.length-1].start.row=n)break}if(u.action=="insert")for(var f=t-n,x=-r.column+i.column;on)break;if(h.start.row==n&&h.start.column>=r.column&&(h.start.column==r.column&&this.$bias<=0||(h.start.column+=x,h.start.row+=f)),h.end.row==n&&h.end.column>=r.column){if(h.end.column==r.column&&this.$bias<0)continue;h.end.column==r.column&&x>0&&oh.start.column&&h.end.column==e[o+1].start.column&&(h.end.column-=x),h.end.column+=x,h.end.row+=f}}else for(var f=n-t,x=r.column-i.column;ot)break;h.end.rowr.column)&&(h.end.column=r.column,h.end.row=r.row):(h.end.column+=x,h.end.row+=f):h.end.row>t&&(h.end.row+=f),h.start.rowr.column)&&(h.start.column=r.column,h.start.row=r.row):(h.start.column+=x,h.start.row+=f):h.start.row>t&&(h.start.row+=f)}if(f!=0&&o=i)return o;if(o.end.row>i)return null}return null},this.getNextFoldLine=function(i,n){var t=this.$foldData,e=0;for(n&&(e=t.indexOf(n)),e==-1&&(e=0),e;e=i)return o}return null},this.getFoldedRowCount=function(i,n){for(var t=this.$foldData,e=n-i+1,o=0;o=n){f=i?e-=n-f:e=0);break}else h>=i&&(f>=i?e-=h-f:e-=h-i+1)}return e},this.$addFoldLine=function(i){return this.$foldData.push(i),this.$foldData.sort(function(n,t){return n.start.row-t.start.row}),i},this.addFold=function(i,n){var t=this.$foldData,e=!1,o;i instanceof A?o=i:(o=new A(n,i),o.collapseChildren=n.collapseChildren),this.$clipRangeToDocument(o.range);var s=o.start.row,h=o.start.column,f=o.end.row,x=o.end.column,y=this.getFoldAt(s,h,1),d=this.getFoldAt(f,x,-1);if(y&&d==y)return y.addSubFold(o);y&&!y.range.isStart(s,h)&&this.removeFold(y),d&&!d.range.isEnd(f,x)&&this.removeFold(d);var l=this.getFoldsInRange(o.range);l.length>0&&(this.removeFolds(l),o.collapseChildren||l.forEach(function(w){o.addSubFold(w)}));for(var v=0;v0&&this.foldAll(i.start.row+1,i.end.row,i.collapseChildren-1),i.subFolds=[]},this.expandFolds=function(i){i.forEach(function(n){this.expandFold(n)},this)},this.unfold=function(i,n){var t,e;if(i==null)t=new R(0,0,this.getLength(),0),n==null&&(n=!0);else if(typeof i=="number")t=new R(i,0,i,this.getLine(i).length);else if("row"in i)t=R.fromPoints(i,i);else{if(Array.isArray(i))return e=[],i.forEach(function(s){e=e.concat(this.unfold(s))},this),e;t=i}e=this.getFoldsInRangeList(t);for(var o=e;e.length==1&&R.comparePoints(e[0].start,t.start)<0&&R.comparePoints(e[0].end,t.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(t);if(n!=!1?this.removeFolds(e):this.expandFolds(e),o.length)return o},this.isRowFolded=function(i,n){return!!this.getFoldLine(i,n)},this.getRowFoldEnd=function(i,n){var t=this.getFoldLine(i,n);return t?t.end.row:i},this.getRowFoldStart=function(i,n){var t=this.getFoldLine(i,n);return t?t.start.row:i},this.getFoldDisplayLine=function(i,n,t,e,o){e==null&&(e=i.start.row),o==null&&(o=0),n==null&&(n=i.end.row),t==null&&(t=this.getLine(n).length);var s=this.doc,h="";return i.walk(function(f,x,y,d){if(!(xy)break;while(o&&h.test(o.type));o=e.stepBackward()}else o=e.getCurrentToken();return f.end.row=e.getCurrentTokenRow(),f.end.column=e.getCurrentTokenColumn(),f}},this.foldAll=function(i,n,t,e){t==null&&(t=1e5);var o=this.foldWidgets;if(o){n=n||this.getLength(),i=i||0;for(var s=i;s=i&&(s=h.end.row,h.collapseChildren=t,this.addFold("...",h))}}},this.foldToLevel=function(i){for(this.foldAll();i-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var i=this;this.foldAll(null,null,null,function(n){for(var t=i.getTokens(n),e=0;e=0;){var s=t[e];if(s==null&&(s=t[e]=this.getFoldWidget(e)),s=="start"){var h=this.getFoldWidgetRange(e);if(o||(o=h),h&&h.end.row>=i)break}e--}return{range:e!==-1&&h,firstRange:o}},this.onFoldWidgetClick=function(i,n){n instanceof u&&(n=n.domEvent);var t={children:n.shiftKey,all:n.ctrlKey||n.metaKey,siblings:n.altKey},e=this.$toggleFoldWidget(i,t);if(!e){var o=n.target||n.srcElement;o&&/ace_fold-widget/.test(o.className)&&(o.className+=" ace_invalid")}},this.$toggleFoldWidget=function(i,n){if(this.getFoldWidget){var t=this.getFoldWidget(i),e=this.getLine(i),o=t==="end"?-1:1,s=this.getFoldAt(i,o===-1?0:e.length,o);if(s)return n.children||n.all?this.removeFold(s):this.expandFold(s),s;var h=this.getFoldWidgetRange(i,!0);if(h&&!h.isMultiLine()&&(s=this.getFoldAt(h.start.row,h.start.column,1),s&&h.isEqual(s.range)))return this.removeFold(s),s;if(n.siblings){var f=this.getParentFoldRangeData(i);if(f.range)var x=f.range.start.row+1,y=f.range.end.row;this.foldAll(x,y,n.all?1e4:0)}else n.children?(y=h?h.end.row:this.getLength(),this.foldAll(i+1,y,n.all?1e4:0)):h&&(n.all&&(h.collapseChildren=1e4),this.addFold("...",h));return h}},this.toggleFoldWidget=function(i){var n=this.selection.getCursor().row;n=this.getRowFoldStart(n);var t=this.$toggleFoldWidget(n,{});if(!t){var e=this.getParentFoldRangeData(n,!0);if(t=e.range||e.firstRange,t){n=t.start.row;var o=this.getFoldAt(n,this.getLine(n).length,1);o?this.removeFold(o):this.addFold("...",t)}}},this.updateFoldWidgets=function(i){var n=i.start.row,t=i.end.row-n;if(t===0)this.foldWidgets[n]=null;else if(i.action=="remove")this.foldWidgets.splice(n,t+1,null);else{var e=Array(t+1);e.unshift(n,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(i){var n=i.data;n.first!=n.last&&this.foldWidgets.length>n.first&&this.foldWidgets.splice(n.first,this.foldWidgets.length)}}k.Folding=r}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(M,k,B){var R=M("../token_iterator").TokenIterator,L=M("../range").Range;function A(){this.findMatchingBracket=function(a,u){if(a.column==0)return null;var r=u||this.getLine(a.row).charAt(a.column-1);if(r=="")return null;var i=r.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],a):this.$findOpeningBracket(i[2],a):null},this.getBracketRange=function(a){var u=this.getLine(a.row),r=!0,i,n=u.charAt(a.column-1),t=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(t||(n=u.charAt(a.column),a={row:a.row,column:a.column+1},t=n&&n.match(/([\(\[\{])|([\)\]\}])/),r=!1),!t)return null;if(t[1]){var e=this.$findClosingBracket(t[1],a);if(!e)return null;i=L.fromPoints(a,e),r||(i.end.column++,i.start.column--),i.cursor=i.end}else{var e=this.$findOpeningBracket(t[2],a);if(!e)return null;i=L.fromPoints(e,a),r||(i.start.column++,i.end.column--),i.cursor=i.start}return i},this.getMatchingBracketRanges=function(a,u){var r=this.getLine(a.row),i=/([\(\[\{])|([\)\]\}])/,n=!u&&r.charAt(a.column-1),t=n&&n.match(i);if(t||(n=(u===void 0||u)&&r.charAt(a.column),a={row:a.row,column:a.column+1},t=n&&n.match(i)),!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,u,r){var i=this.$brackets[a],n=1,t=new R(this,u.row,u.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=u.column-t.getCurrentTokenColumn()-2,s=e.value;;){for(;o>=0;){var h=s.charAt(o);if(h==i){if(n-=1,n==0)return{row:t.getCurrentTokenRow(),column:o+t.getCurrentTokenColumn()}}else h==a&&(n+=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,u,r){var i=this.$brackets[a],n=1,t=new R(this,u.row,u.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=u.column-t.getCurrentTokenColumn();;){for(var s=e.value,h=s.length;o"?i=!0:u.type.indexOf("tag-name")!==-1&&(r=!0));while(u&&!r);return u},this.$findClosingTag=function(a,u){var r,i=u.value,n=u.value,t=0,e=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);u=a.stepForward();var o=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length),s=!1;do{if(r=u,r.type.indexOf("tag-close")!==-1&&!s){var h=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(u=a.stepForward(),u){if(u.value===">"&&!s){var h=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(u.type.indexOf("tag-name")!==-1){if(i=u.value,n===i){if(r.value==="<")t++;else if(r.value==="")var y=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(n===i&&u.value==="/>"&&(t--,t<0))var f=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),x=f,y=x,h=new L(o.end.row,o.end.column,o.end.row,o.end.column+1)}}while(u&&t>=0);if(e&&h&&f&&y&&o&&x)return{openTag:new L(e.start.row,e.start.column,h.end.row,h.end.column),closeTag:new L(f.start.row,f.start.column,y.end.row,y.end.column),openTagName:o,closeTagName:x}},this.$findOpeningTag=function(a,u){var r=a.getCurrentToken(),i=u.value,n=0,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),o=e+2,s=new L(t,e,t,o);a.stepForward();var h=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+u.value.length);if(u.type.indexOf("tag-close")===-1&&(u=a.stepForward()),!(!u||u.value!==">")){var f=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(u=r,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),o=e+u.value.length,r=a.stepBackward(),u){if(u.type.indexOf("tag-name")!==-1){if(i===u.value)if(r.value==="<"){if(n++,n>0){var x=new L(t,e,t,o),y=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do u=a.stepForward();while(u&&u.value!==">");var d=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else r.value===""){for(var l=0,v=r;v;){if(v.type.indexOf("tag-name")!==-1&&v.value===i){n--;break}else if(v.value==="<")break;v=a.stepBackward(),l++}for(var C=0;Cc&&(this.$docRowCache.splice(c,p),this.$screenRowCache.splice(c,p))},b.prototype.$getRowCacheIndex=function(g,p){for(var c=0,m=g.length-1;c<=m;){var S=c+m>>1,T=g[S];if(p>T)c=S+1;else if(p=p));T++);return m=c[T],m?(m.index=T,m.start=S-m.value.length,m):null},b.prototype.setUndoManager=function(g){if(this.$undoManager=g,this.$informUndoManager&&this.$informUndoManager.cancel(),g){var p=this;g.addSession(this),this.$syncInformUndoManager=function(){p.$informUndoManager.cancel(),p.mergeUndoDeltas=!1},this.$informUndoManager=L.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},b.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},b.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},b.prototype.getTabString=function(){return this.getUseSoftTabs()?L.stringRepeat(" ",this.getTabSize()):" "},b.prototype.setUseSoftTabs=function(g){this.setOption("useSoftTabs",g)},b.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},b.prototype.setTabSize=function(g){this.setOption("tabSize",g)},b.prototype.getTabSize=function(){return this.$tabSize},b.prototype.isTabStop=function(g){return this.$useSoftTabs&&g.column%this.$tabSize===0},b.prototype.setNavigateWithinSoftTabs=function(g){this.setOption("navigateWithinSoftTabs",g)},b.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},b.prototype.setOverwrite=function(g){this.setOption("overwrite",g)},b.prototype.getOverwrite=function(){return this.$overwrite},b.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},b.prototype.addGutterDecoration=function(g,p){this.$decorations[g]||(this.$decorations[g]=""),this.$decorations[g]+=" "+p,this._signal("changeBreakpoint",{})},b.prototype.removeGutterDecoration=function(g,p){this.$decorations[g]=(this.$decorations[g]||"").replace(" "+p,""),this._signal("changeBreakpoint",{})},b.prototype.getBreakpoints=function(){return this.$breakpoints},b.prototype.setBreakpoints=function(g){this.$breakpoints=[];for(var p=0;p0&&(m=!!c.charAt(p-1).match(this.tokenRe)),m||(m=!!c.charAt(p).match(this.tokenRe)),m)var S=this.tokenRe;else if(/^\s+$/.test(c.slice(p-1,p+1)))var S=/\s/;else var S=this.nonTokenRe;var T=p;if(T>0){do T--;while(T>=0&&c.charAt(T).match(S));T++}for(var E=p;Eg&&(g=p.screenWidth)}),this.lineWidgetWidth=g},b.prototype.$computeWidth=function(g){if(this.$modified||g){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var p=this.doc.getAllLines(),c=this.$rowLengthCache,m=0,S=0,T=this.$foldData[S],E=T?T.start.row:1/0,_=p.length,I=0;I<_;I++){if(I>E){if(I=T.end.row+1,I>=_)break;T=this.$foldData[S++],E=T?T.start.row:1/0}c[I]==null&&(c[I]=this.$getStringScreenWidth(p[I])[0]),c[I]>m&&(m=c[I])}this.screenWidth=m}},b.prototype.getLine=function(g){return this.doc.getLine(g)},b.prototype.getLines=function(g,p){return this.doc.getLines(g,p)},b.prototype.getLength=function(){return this.doc.getLength()},b.prototype.getTextRange=function(g){return this.doc.getTextRange(g||this.selection.getRange())},b.prototype.insert=function(g,p){return this.doc.insert(g,p)},b.prototype.remove=function(g){return this.doc.remove(g)},b.prototype.removeFullLines=function(g,p){return this.doc.removeFullLines(g,p)},b.prototype.undoChanges=function(g,p){if(g.length){this.$fromUndo=!0;for(var c=g.length-1;c!=-1;c--){var m=g[c];m.action=="insert"||m.action=="remove"?this.doc.revertDelta(m):m.folds&&this.addFolds(m.folds)}!p&&this.$undoSelect&&(g.selectionBefore?this.selection.fromJSON(g.selectionBefore):this.selection.setRange(this.$getUndoSelection(g,!0))),this.$fromUndo=!1}},b.prototype.redoChanges=function(g,p){if(g.length){this.$fromUndo=!0;for(var c=0;cg.end.column&&(T.start.column+=_),T.end.row==g.end.row&&T.end.column>g.end.column&&(T.end.column+=_)),E&&T.start.row>=g.end.row&&(T.start.row+=E,T.end.row+=E)}if(T.end=this.insert(T.start,m),S.length){var I=g.start,F=T.start,E=F.row-I.row,_=F.column-I.column;this.addFolds(S.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+=E,O.end.row+=E,O}))}return T},b.prototype.indentRows=function(g,p,c){c=c.replace(/\t/g,this.getTabString());for(var m=g;m<=p;m++)this.doc.insertInLine({row:m,column:0},c)},b.prototype.outdentRows=function(g){for(var p=g.collapseRows(),c=new n(0,0,0,0),m=this.getTabSize(),S=p.start.row;S<=p.end.row;++S){var T=this.getLine(S);c.start.row=S,c.end.row=S;for(var E=0;E0){var m=this.getRowFoldEnd(p+c);if(m>this.doc.getLength()-1)return 0;var S=m-p}else{g=this.$clipRowToDocument(g),p=this.$clipRowToDocument(p);var S=p-g+1}var T=new n(g,0,p,Number.MAX_VALUE),E=this.getFoldsInRange(T).map(function(I){return I=I.clone(),I.start.row+=S,I.end.row+=S,I}),_=c==0?this.doc.getLines(g,p):this.doc.removeFullLines(g,p);return this.doc.insertFullLines(g+S,_),E.length&&this.addFolds(E),S},b.prototype.moveLinesUp=function(g,p){return this.$moveLines(g,p,-1)},b.prototype.moveLinesDown=function(g,p){return this.$moveLines(g,p,1)},b.prototype.duplicateLines=function(g,p){return this.$moveLines(g,p,0)},b.prototype.$clipRowToDocument=function(g){return Math.max(0,Math.min(g,this.doc.getLength()-1))},b.prototype.$clipColumnToRow=function(g,p){return p<0?0:Math.min(this.doc.getLine(g).length,p)},b.prototype.$clipPositionToDocument=function(g,p){if(p=Math.max(0,p),g<0)g=0,p=0;else{var c=this.doc.getLength();g>=c?(g=c-1,p=this.doc.getLine(c-1).length):p=Math.min(this.doc.getLine(g).length,p)}return{row:g,column:p}},b.prototype.$clipRangeToDocument=function(g){g.start.row<0?(g.start.row=0,g.start.column=0):g.start.column=this.$clipColumnToRow(g.start.row,g.start.column);var p=this.doc.getLength()-1;return g.end.row>p?(g.end.row=p,g.end.column=this.doc.getLine(p).length):g.end.column=this.$clipColumnToRow(g.end.row,g.end.column),g},b.prototype.setUseWrapMode=function(g){if(g!=this.$useWrapMode){if(this.$useWrapMode=g,this.$modified=!0,this.$resetRowCache(0),g){var p=this.getLength();this.$wrapData=Array(p),this.$updateWrapData(0,p-1)}this._signal("changeWrapMode")}},b.prototype.getUseWrapMode=function(){return this.$useWrapMode},b.prototype.setWrapLimitRange=function(g,p){(this.$wrapLimitRange.min!==g||this.$wrapLimitRange.max!==p)&&(this.$wrapLimitRange={min:g,max:p},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},b.prototype.adjustWrapLimit=function(g,p){var c=this.$wrapLimitRange;c.max<0&&(c={min:p,max:p});var m=this.$constrainWrapLimit(g,c.min,c.max);return m!=this.$wrapLimit&&m>1?(this.$wrapLimit=m,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},b.prototype.$constrainWrapLimit=function(g,p,c){return p&&(g=Math.max(p,g)),c&&(g=Math.min(c,g)),g},b.prototype.getWrapLimit=function(){return this.$wrapLimit},b.prototype.setWrapLimit=function(g){this.setWrapLimitRange(g,g)},b.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},b.prototype.$updateInternalDataOnChange=function(g){var p=this.$useWrapMode,c=g.action,m=g.start,S=g.end,T=m.row,E=S.row,_=E-T,I=null;if(this.$updating=!0,_!=0)if(c==="remove"){this[p?"$wrapData":"$rowLengthCache"].splice(T,_);var F=this.$foldData;I=this.getFoldsInRange(g),this.removeFolds(I);var N=this.getFoldLine(S.row),D=0;if(N){N.addRemoveChars(S.row,S.column,m.column-S.column),N.shiftRow(-_);var O=this.getFoldLine(T);O&&O!==N&&(O.merge(N),N=O),D=F.indexOf(N)+1}for(D;D=S.row&&N.shiftRow(-_)}E=T}else{var W=Array(_);W.unshift(T,0);var H=p?this.$wrapData:this.$rowLengthCache;H.splice.apply(H,W);var F=this.$foldData,N=this.getFoldLine(T),D=0;if(N){var P=N.range.compareInside(m.row,m.column);P==0?(N=N.split(m.row,m.column),N&&(N.shiftRow(_),N.addRemoveChars(E,0,S.column-m.column))):P==-1&&(N.addRemoveChars(T,0,S.column-m.column),N.shiftRow(_)),D=F.indexOf(N)+1}for(D;D=T&&N.shiftRow(_)}}else{_=Math.abs(g.start.column-g.end.column),c==="remove"&&(I=this.getFoldsInRange(g),this.removeFolds(I),_=-_);var N=this.getFoldLine(T);N&&N.addRemoveChars(T,m.column,_)}return p&&this.$wrapData.length!=this.doc.getLength(),this.$updating=!1,p?this.$updateWrapData(T,E):this.$updateRowLengthCache(T,E),I},b.prototype.$updateRowLengthCache=function(g,p){this.$rowLengthCache[g]=null,this.$rowLengthCache[p]=null},b.prototype.$updateWrapData=function(g,p){var c=this.doc.getAllLines(),m=this.getTabSize(),S=this.$wrapData,T=this.$wrapLimit,E,_,I=g;for(p=Math.min(p,c.length-1);I<=p;)_=this.getFoldLine(I,_),_?(E=[],_.walk(function(F,N,D,O){var W;if(F!=null){W=this.$getDisplayTokens(F,E.length),W[0]=y;for(var H=1;Hp-O;){var W=T+p-O;if(g[W-1]>=v&&g[W]>=v){D(W);continue}if(g[W]==y||g[W]==d){for(W;W!=T-1&&g[W]!=y;W--);if(W>T){D(W);continue}for(W=T+p,W;W>2)),T-1);W>H&&g[W]H&&g[W]H&&g[W]==l;)W--}else for(;W>H&&g[W]H){D(++W);continue}W=T+p,g[W]==x&&W--,D(W-O)}return m},b.prototype.$getDisplayTokens=function(g,p){var c=[],m;p=p||0;for(var S=0;S39&&T<48||T>57&&T<64?c.push(l):T>=4352&&w(T)?c.push(f,x):c.push(f)}return c},b.prototype.$getStringScreenWidth=function(g,p,c){if(p==0)return[0,0];p==null&&(p=1/0),c=c||0;var m,S;for(S=0;S=4352&&w(m)?c+=2:c+=1,!(c>p));S++);return[c,S]},b.prototype.getRowLength=function(g){var p=1;return this.lineWidgets&&(p+=this.lineWidgets[g]&&this.lineWidgets[g].rowCount||0),!this.$useWrapMode||!this.$wrapData[g]?p:this.$wrapData[g].length+p},b.prototype.getRowLineCount=function(g){return!this.$useWrapMode||!this.$wrapData[g]?1:this.$wrapData[g].length+1},b.prototype.getRowWrapIndent=function(g){if(this.$useWrapMode){var p=this.screenToDocumentPosition(g,Number.MAX_VALUE),c=this.$wrapData[p.row];return c.length&&c[0]=0)var _=F[N],S=this.$docRowCache[N],O=g>F[D-1];else var O=!D;for(var W=this.getLength()-1,H=this.getNextFoldLine(S),P=H?H.start.row:1/0;_<=g&&(I=this.getRowLength(S),!(_+I>g||S>=W));)_+=I,S++,S>P&&(S=H.end.row+1,H=this.getNextFoldLine(S,H),P=H?H.start.row:1/0),O&&(this.$docRowCache.push(S),this.$screenRowCache.push(_));if(H&&H.start.row<=S)m=this.getFoldDisplayLine(H),S=H.start.row;else{if(_+I<=g||S>W)return{row:W,column:this.getLine(W).length};m=this.getLine(S),H=null}var U=0,V=Math.floor(g-_);if(this.$useWrapMode){var G=this.$wrapData[S];G&&(E=G[V],V>0&&G.length&&(U=G.indent,T=G[V-1]||G[G.length-1],m=m.substring(T)))}return c!==void 0&&this.$bidiHandler.isBidiRow(_+V,S,V)&&(p=this.$bidiHandler.offsetToCol(c)),T+=this.$getStringScreenWidth(m,p-U)[1],this.$useWrapMode&&T>=E&&(T=E-1),H?H.idxToPosition(T):{row:S,column:T}},b.prototype.documentToScreenPosition=function(g,p){if(typeof p=="undefined")var c=this.$clipPositionToDocument(g.row,g.column);else c=this.$clipPositionToDocument(g,p);g=c.row,p=c.column;var m=0,S=null,T=null;T=this.getFoldAt(g,p,1),T&&(g=T.start.row,p=T.start.column);var E,_=0,I=this.$docRowCache,F=this.$getRowCacheIndex(I,g),N=I.length;if(N&&F>=0)var _=I[F],m=this.$screenRowCache[F],D=g>I[N-1];else var D=!N;for(var O=this.getNextFoldLine(_),W=O?O.start.row:1/0;_=W){if(E=O.end.row+1,E>g)break;O=this.getNextFoldLine(E,O),W=O?O.start.row:1/0}else E=_+1;m+=this.getRowLength(_),_=E,D&&(this.$docRowCache.push(_),this.$screenRowCache.push(m))}var H="";O&&_>=W?(H=this.getFoldDisplayLine(O,g,p),S=O.start.row):(H=this.getLine(g).substring(0,p),S=g);var P=0;if(this.$useWrapMode){var U=this.$wrapData[S];if(U){for(var V=0;H.length>=U[V];)m++,V++;H=H.substring(U[V-1]||0,H.length),P=V>0?U.indent:0}}return this.lineWidgets&&this.lineWidgets[_]&&this.lineWidgets[_].rowsAbove&&(m+=this.lineWidgets[_].rowsAbove),{row:m,column:P+this.$getStringScreenWidth(H)[0]}},b.prototype.documentToScreenColumn=function(g,p){return this.documentToScreenPosition(g,p).column},b.prototype.documentToScreenRow=function(g,p){return this.documentToScreenPosition(g,p).row},b.prototype.getScreenLength=function(){var g=0,p=null;if(this.$useWrapMode)for(var S=this.$wrapData.length,T=0,m=0,p=this.$foldData[m++],E=p?p.start.row:1/0;TE&&(T=p.end.row+1,p=this.$foldData[m++],E=p?p.start.row:1/0)}else{g=this.getLength();for(var c=this.$foldData,m=0;mc));T++);return[m,T]})},b.prototype.getPrecedingCharacter=function(){var g=this.selection.getCursor();if(g.column===0)return g.row===0?"":this.doc.getNewLineCharacter();var p=this.getLine(g.row);return p[g.column-1]},b.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()},b}();h.$uid=0,h.prototype.$modes=a.$modes,h.prototype.getValue=h.prototype.toString,h.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},h.prototype.$overwrite=!1,h.prototype.$mode=null,h.prototype.$modeId=null,h.prototype.$scrollTop=0,h.prototype.$scrollLeft=0,h.prototype.$wrapLimit=80,h.prototype.$useWrapMode=!1,h.prototype.$wrapLimitRange={min:null,max:null},h.prototype.lineWidgets=null,h.prototype.isFullWidth=w,R.implement(h.prototype,u);var f=1,x=2,y=3,d=4,l=9,v=10,C=11,$=12;function w(b){return b<4352?!1:b>=4352&&b<=4447||b>=4515&&b<=4519||b>=4602&&b<=4607||b>=9001&&b<=9002||b>=11904&&b<=11929||b>=11931&&b<=12019||b>=12032&&b<=12245||b>=12272&&b<=12283||b>=12288&&b<=12350||b>=12353&&b<=12438||b>=12441&&b<=12543||b>=12549&&b<=12589||b>=12593&&b<=12686||b>=12688&&b<=12730||b>=12736&&b<=12771||b>=12784&&b<=12830||b>=12832&&b<=12871||b>=12880&&b<=13054||b>=13056&&b<=19903||b>=19968&&b<=42124||b>=42128&&b<=42182||b>=43360&&b<=43388||b>=44032&&b<=55203||b>=55216&&b<=55238||b>=55243&&b<=55291||b>=63744&&b<=64255||b>=65040&&b<=65049||b>=65072&&b<=65106||b>=65108&&b<=65126||b>=65128&&b<=65131||b>=65281&&b<=65376||b>=65504&&b<=65510}M("./edit_session/folding").Folding.call(h.prototype),M("./edit_session/bracket_match").BracketMatch.call(h.prototype),a.defineOptions(h.prototype,"session",{wrap:{set:function(b){if(!b||b=="off"?b=!1:b=="free"?b=!0:b=="printMargin"?b=-1:typeof b=="string"&&(b=parseInt(b,10)||!1),this.$wrap!=b)if(this.$wrap=b,!b)this.setUseWrapMode(!1);else{var g=typeof b=="number"?b:null;this.setWrapLimitRange(g,g),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(b){b=b=="auto"?this.$mode.type!="text":b!="text",b!=this.$wrapAsCode&&(this.$wrapAsCode=b,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(b){this.$useWorker=b,this.$stopWorker(),b&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(b){b=parseInt(b),b>0&&this.$tabSize!==b&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=b,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(b){this.setFoldStyle(b)},handlesSet:!0},overwrite:{set:function(b){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(b){this.doc.setNewLineMode(b)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(b){this.setMode(b)},get:function(){return this.$modeId},handlesSet:!0}}),k.EditSession=h}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(M,k,B){var R=M("./lib/lang"),L=M("./lib/oop"),A=M("./range").Range,a=function(){function r(){this.$options={}}return r.prototype.set=function(i){return L.mixin(this.$options,i),this},r.prototype.getOptions=function(){return R.copyObject(this.$options)},r.prototype.setOptions=function(i){this.$options=i},r.prototype.find=function(i){var n=this.$options,t=this.$matchIterator(i,n);if(!t)return!1;var e=null;return t.forEach(function(o,s,h,f){return e=new A(o,s,h,f),s==f&&n.start&&n.start.start&&n.skipCurrent!=!1&&e.isEqual(n.start)?(e=null,!1):!0}),e},r.prototype.findAll=function(i){var n=this.$options;if(!n.needle)return[];this.$assembleRegExp(n);var t=n.range,e=t?i.getLines(t.start.row,t.end.row):i.doc.getAllLines(),o=[],s=n.re;if(n.$isMultiLine){var h=s.length,f=e.length-h,x;e:for(var y=s.offset||0;y<=f;y++){for(var d=0;dC||(o.push(x=new A(y,C,y+h-1,$)),h>2&&(y=y+h-2))}}else for(var w=0;wc&&o[d].end.row==m;)d--;for(o=o.slice(w,d+1),w=0,d=o.length;w=x;$--)if(v($,Number.MAX_VALUE,C))return;if(n.wrap!=!1){for($=y,x=f.row;$>=x;$--)if(v($,Number.MAX_VALUE,C))return}}};else var d=function($){var w=f.row;if(!v(w,f.column,$)){for(w=w+1;w<=y;w++)if(v(w,0,$))return;if(n.wrap!=!1){for(w=x,y=f.row;w<=y;w++)if(v(w,0,$))return}}};if(n.$isMultiLine)var l=t.length,v=function(C,$,w){var b=e?C-l+1:C;if(!(b<0||b+l>i.getLength())){var g=i.getLine(b),p=g.search(t[0]);if(!(!e&&p<$||p===-1)){for(var c=1;c$)&&w(b,p,b+l-1,m))return!0}}};else if(e)var v=function($,w,b){var g=i.getLine($),p=[],c,m=0;for(t.lastIndex=0;c=t.exec(g);){var S=c[0].length;if(m=c.index,!S){if(m>=g.length)break;t.lastIndex=m+=R.skipEmptyMatch(g,m,s)}if(c.index+S>w)break;p.push(c.index,S)}for(var T=p.length-1;T>=0;T-=2){var E=p[T-1],S=p[T];if(b($,E,$,E+S))return!0}};else var v=function($,w,b){var g=i.getLine($),p,c;for(t.lastIndex=w;c=t.exec(g);){var m=c[0].length;if(p=c.index,b($,p,$,p+m))return!0;if(!m&&(t.lastIndex=p+=R.skipEmptyMatch(g,p,s),p>=g.length))return!1}};return{forEach:d}},r}();function u(r,i){var n=R.supportsLookbehind();function t(h,f){f===void 0&&(f=!0);var x=n&&i.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return x.test(h)||i.regExp?n&&i.$supportsUnicodeFlag?f?"(?<=^|[^\\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)}k.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(M,k,B){var R=this&&this.__extends||function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var h in s)Object.prototype.hasOwnProperty.call(s,h)&&(o[h]=s[h])},n(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");n(t,e);function o(){this.constructor=t}t.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)}}(),L=M("../lib/keys"),A=M("../lib/useragent"),a=L.KEY_MODS,u=function(){function n(t,e){this.$init(t,e,!1)}return n.prototype.$init=function(t,e,o){this.platform=e||(A.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=o},n.prototype.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},n.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 h in s){var f=s[h];if(f==t)delete s[h];else if(Array.isArray(f)){var x=f.indexOf(t);x!=-1&&(f.splice(x,1),f.length==1&&(s[h]=f[0]))}}},n.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 h="";if(s.indexOf(" ")!=-1){var f=s.split(/\s+/);s=f.pop(),f.forEach(function(d){var l=this.parseKeys(d),v=a[l.hashId]+l.key;h+=(h?" ":"")+v,this._addCommandToBinding(h,"chainKeys")},this),h+=" "}var x=this.parseKeys(s),y=a[x.hashId]+x.key;this._addCommandToBinding(h+y,e,o)},this)}},n.prototype._addCommandToBinding=function(t,e,o){var s=this.commandKeyBinding,h;if(!e)delete s[t];else if(!s[t]||this.$singleCommand)s[t]=e;else{Array.isArray(s[t])?(h=s[t].indexOf(e))!=-1&&s[t].splice(h,1):s[t]=[s[t]],typeof o!="number"&&(o=r(e));var f=s[t];for(h=0;ho)break}f.splice(h,0,e)}},n.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)},n.prototype.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},n.prototype.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},n.prototype._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},n.prototype.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(y){return y}),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 h=0,f=e.length;f--;){var x=L.KEY_MODS[e[f]];if(x==null)return!1;h|=x}return{key:o,hashId:h}},n.prototype.findKeyCommand=function(t,e){var o=a[t]+e;return this.commandKeyBinding[o]},n.prototype.handleKeyboard=function(t,e,o,s){if(!(s<0)){var h=a[e]+o,f=this.commandKeyBinding[h];return t.$keyChain&&(t.$keyChain+=" "+h,f=this.commandKeyBinding[t.$keyChain]||f),f&&(f=="chainKeys"||f[f.length-1]=="chainKeys")?(t.$keyChain=t.$keyChain||h,{command:"null"}):(t.$keyChain&&((!e||e==4)&&o.length==1?t.$keyChain=t.$keyChain.slice(0,-h.length-1):(e==-1||s>0)&&(t.$keyChain="")),{command:f})}},n.prototype.getStatusText=function(t,e){return e.$keyChain||""},n}();function r(n){return typeof n=="object"&&n.bindKey&&n.bindKey.position||(n.isDefault?-100:0)}var i=function(n){R(t,n);function t(e,o){var s=n.call(this,e,o)||this;return s.$singleCommand=!0,s}return t}(u);i.call=function(n,t,e){u.prototype.$init.call(n,t,e,!0)},u.call=function(n,t,e){u.prototype.$init.call(n,t,e,!1)},k.HashHandler=i,k.MultiHashHandler=u}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(M,k,B){var R=this&&this.__extends||function(){var r=function(i,n){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(i,n)};return function(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");r(i,n);function t(){this.constructor=i}i.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}}(),L=M("../lib/oop"),A=M("../keyboard/hash_handler").MultiHashHandler,a=M("../lib/event_emitter").EventEmitter,u=function(r){R(i,r);function i(n,t){var e=r.call(this,t,n)||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 i.prototype.exec=function(n,t,e){if(Array.isArray(n)){for(var o=n.length;o--;)if(this.exec(n[o],t,e))return!0;return!1}if(typeof n=="string"&&(n=this.commands[n]),!this.canExecute(n,t))return!1;var s={editor:t,command:n,args:e};return s.returnValue=this._emit("exec",s),this._signal("afterExec",s),s.returnValue!==!1},i.prototype.canExecute=function(n,t){return typeof n=="string"&&(n=this.commands[n]),!(!n||t&&t.$readOnly&&!n.readOnly||this.$checkCommandState!=!1&&n.isAvailable&&!n.isAvailable(t))},i.prototype.toggleRecording=function(n){if(!this.$inReplay)return n&&n._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)},i.prototype.replay=function(n){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(n);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,n):this.exec(t[0],n,t[1])},this)}finally{this.$inReplay=!1}}},i.prototype.trimMacro=function(n){return n.map(function(t){return typeof t[0]!="string"&&(t[0]=t[0].name),t[1]||(t=t[0]),t})},i}(A);L.implement(u.prototype,a),k.CommandManager=u}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(M,k,B){var R=M("../lib/lang"),L=M("../config"),A=M("../range").Range;function a(r,i){return{win:r,mac:i}}k.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(r){L.loadModule("ace/ext/settings_menu",function(i){i.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(i){i.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(i){i.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,i){typeof i=="number"&&!isNaN(i)&&r.gotoLine(i),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(i){i.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,i){r.navigateUp(i.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,i){r.navigateDown(i.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,i){r.navigateLeft(i.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,i){r.navigateRight(i.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 i=r.$copyWithEmptySelection&&r.selection.isEmpty(),n=i?r.selection.getLineRange():r.selection.getRange();r._emit("cut",n),n.isEmpty()||r.session.remove(n),r.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(r,i){r.$handlePaste(i)},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(i){i.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 i=r.selection.getRange();i.start.column=0,r.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(r){var i=r.selection.getRange();i.end.column=Number.MAX_VALUE,r.session.remove(i)},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,i){r.insert(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(r,i){r.insert(R.stringRepeat(i.text||"",i.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 i=r.selection.getRange();i.start.column=i.end.column=0,i.end.row++,r.selection.setRange(i,!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 i=r.selection.isBackwards(),n=i?r.selection.getSelectionLead():r.selection.getSelectionAnchor(),t=i?r.selection.getSelectionAnchor():r.selection.getSelectionLead(),e=r.session.doc.getLine(n.row).length,o=r.session.doc.getTextRange(r.selection.getRange()),s=o.replace(/\n\s*/," ").length,h=r.session.doc.getLine(n.row),f=n.row+1;f<=t.row+1;f++){var x=R.stringTrimLeft(R.stringTrimRight(r.session.doc.getLine(f)));x.length!==0&&(x=" "+x),h+=x}t.row+10?(r.selection.moveCursorTo(n.row,n.column),r.selection.selectTo(n.row,n.column+s)):(e=r.session.doc.getLine(n.row).length>e?e+1:e,r.selection.moveCursorTo(n.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(r){var i=r.session.doc.getLength()-1,n=r.session.doc.getLine(i).length,t=r.selection.rangeList.ranges,e=[];t.length<1&&(t=[r.selection.getRange()]);for(var o=0;ou[r].column&&r++,t.unshift(r,0),u.splice.apply(u,t),this.$updateRows()}}},A.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var u=!0;a.forEach(function(r,i){if(r)for(u=!1,r.row=i;r.$oldWidget;)r.$oldWidget.row=i,r=r.$oldWidget}),u&&(this.session.lineWidgets=null)}},A.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var u=this.session.lineWidgets[a.row];return u&&(a.$oldWidget=u,u.el&&u.el.parentNode&&(u.el.parentNode.removeChild(u.el),u._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},A.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var u=this.editor.renderer;a.html&&!a.el&&(a.el=R.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=R.createElement("div"),a.el.textContent=a.text),a.el&&(R.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&R.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex="5",u.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/u.layerConfig.lineHeight);var r=this.session.getFoldAt(a.row,0);if(a.$fold=r,r){var i=this.session.lineWidgets;a.row==r.end.row&&!i[r.start.row]?i[r.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,u),this.onWidgetChanged(a),a},A.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 u=this.session.lineWidgets[a.row];if(u==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;u;){if(u.$oldWidget==a){u.$oldWidget=a.$oldWidget;break}u=u.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},A.prototype.getWidgetsAtRow=function(a){for(var u=this.session.lineWidgets,r=u&&u[a],i=[];r;)i.push(r),r=r.$oldWidget;return i},A.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},A.prototype.measureWidgets=function(a,u){var r=this.session._changedWidgets,i=u.layerConfig;if(!(!r||!r.length)){for(var n=1/0,t=0;t0&&!i[n];)n--;this.firstRow=r.firstRow,this.lastRow=r.lastRow,u.$cursorLayer.config=r;for(var e=n;e<=t;e++){var o=i[e];if(!(!o||!o.el)){if(o.hidden){o.el.style.top=-100-(o.pixelHeight||0)+"px";continue}o._inDocument||(o._inDocument=!0,u.container.appendChild(o.el));var s=u.$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 h=o.coverGutter?0:u.gutterWidth;o.fixedWidth||(h-=u.scrollLeft),o.el.style.left=h+"px",o.fullWidth&&o.screenWidth&&(o.el.style.minWidth=r.width+2*r.padding+"px"),o.fixedWidth?o.el.style.right=u.scrollBar.getWidth()+"px":o.el.style.right=""}}}},A}();k.LineWidgets=L}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(M,k,B){var R=M("../lib/keys"),L=M("../mouse/default_gutter_handler").GutterTooltip,A=function(){function u(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 u.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))},u.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))},u.prototype.$onGutterKeyDown=function(r){if(this.annotationTooltip.isOpen){r.preventDefault(),r.keyCode===R.escape&&this.annotationTooltip.hideTooltip();return}if(r.target===this.element){if(r.keyCode!=R.enter)return;r.preventDefault();var i=this.editor.getCursorPosition().row;this.editor.isRowVisible(i)||this.editor.scrollToLine(i,!0,!0),setTimeout(function(){var n=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldWidget(n),e=this.$findNearestAnnotation(n);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-n)0||r+i=0&&this.$isFoldWidgetVisible(r-i))return r-i;if(r+i<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(r+i))return r+i}return null},u.prototype.$findNearestAnnotation=function(r){if(this.$isAnnotationVisible(r))return r;for(var i=0;r-i>0||r+i=0&&this.$isAnnotationVisible(r-i))return r-i;if(r+i<=this.lines.getLength()-1&&this.$isAnnotationVisible(r+i))return r+i}return null},u.prototype.$focusFoldWidget=function(r){if(r!=null){var i=this.$getFoldWidget(r);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},u.prototype.$focusAnnotation=function(r){if(r!=null){var i=this.$getAnnotation(r);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},u.prototype.$blurFoldWidget=function(r){var i=this.$getFoldWidget(r);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},u.prototype.$blurAnnotation=function(r){var i=this.$getAnnotation(r);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},u.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}},u.prototype.$moveFoldWidgetDown=function(){for(var r=this.activeRowIndex;r0;)if(r--,this.$isAnnotationVisible(r)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);return}},u.prototype.$moveAnnotationDown=function(){for(var r=this.activeRowIndex;r=p.length&&(p=void 0),{value:p&&p[S++],done:!p}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")},L=M("./lib/oop"),A=M("./lib/dom"),a=M("./lib/lang"),u=M("./lib/useragent"),r=M("./keyboard/textinput").TextInput,i=M("./mouse/mouse_handler").MouseHandler,n=M("./mouse/fold_handler").FoldHandler,t=M("./keyboard/keybinding").KeyBinding,e=M("./edit_session").EditSession,o=M("./search").Search,s=M("./range").Range,h=M("./lib/event_emitter").EventEmitter,f=M("./commands/command_manager").CommandManager,x=M("./commands/default_commands").commands,y=M("./config"),d=M("./token_iterator").TokenIterator,l=M("./line_widgets").LineWidgets,v=M("./keyboard/gutter_handler").GutterKeyboardHandler,C=M("./config").nls,$=M("./clipboard"),w=M("./lib/keys"),b=function(){function p(c,m,S){this.session,this.$toDestroy=[];var T=c.getContainerElement();this.container=T,this.renderer=c,this.id="editor"+ ++p.$uid,this.commands=new f(u.isMac?"mac":"win",x),typeof document=="object"&&(this.textInput=new r(c.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new i(this),new n(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(E,_){_._$emitInputEvent.schedule(31)}),this.setSession(m||S&&S.session||new e("")),y.resetOptions(this),S&&this.setOptions(S),y._signal("editor",this)}return p.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)},p.prototype.startOperation=function(c){if(this.curOp){if(!c||this.curOp.command)return;this.prevOp=this.curOp}c||(this.previousCommand=null,c={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:c.command||{},args:c.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},p.prototype.endOperation=function(c){if(this.curOp&&this.session){if(c&&c.returnValue===!1||!this.session)return this.curOp=null;if(c==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var m=this.curOp.command,S=m&&m.scrollIntoView;if(S){switch(S){case"center-animate":S="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var T=this.selection.getRange(),E=this.renderer.layerConfig;(T.start.row>=E.lastRow||T.end.row<=E.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}S=="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}},p.prototype.$historyTracker=function(c){if(this.$mergeUndoDeltas){var m=this.prevOp,S=this.$mergeableCommands,T=m.command&&c.command.name==m.command.name;if(c.command.name=="insertstring"){var E=c.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),T=T&&this.mergeNextCommand&&(!/\s/.test(E)||/\s/.test(m.args)),this.mergeNextCommand=!0}else T=T&&S.indexOf(c.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(T=!1),T?this.session.mergeUndoDeltas=!0:S.indexOf(c.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},p.prototype.setKeyboardHandler=function(c,m){if(c&&typeof c=="string"&&c!="ace"){this.$keybindingId=c;var S=this;y.loadModule(["keybinding",c],function(T){S.$keybindingId==c&&S.keyBinding.setKeyboardHandler(T&&T.handler),m&&m()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(c),m&&m()},p.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},p.prototype.setSession=function(c){if(this.session!=c){this.curOp&&this.endOperation(),this.curOp={};var m=this.session;if(m){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 S=this.session.getSelection();S.off("changeCursor",this.$onCursorChange),S.off("changeSelection",this.$onSelectionChange)}this.session=c,c?(this.$onDocumentChange=this.onDocumentChange.bind(this),c.on("change",this.$onDocumentChange),this.renderer.setSession(c),this.$onChangeMode=this.onChangeMode.bind(this),c.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),c.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),c.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),c.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),c.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),c.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=c.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(c)),this._signal("changeSession",{session:c,oldSession:m}),this.curOp=null,m&&m._signal("changeEditor",{oldEditor:this}),c&&c._signal("changeEditor",{editor:this}),c&&!c.destroyed&&c.bgTokenizer.scheduleStart()}},p.prototype.getSession=function(){return this.session},p.prototype.setValue=function(c,m){return this.session.doc.setValue(c),m?m==1?this.navigateFileEnd():m==-1&&this.navigateFileStart():this.selectAll(),c},p.prototype.getValue=function(){return this.session.getValue()},p.prototype.getSelection=function(){return this.selection},p.prototype.resize=function(c){this.renderer.onResize(c)},p.prototype.setTheme=function(c,m){this.renderer.setTheme(c,m)},p.prototype.getTheme=function(){return this.renderer.getTheme()},p.prototype.setStyle=function(c){this.renderer.setStyle(c)},p.prototype.unsetStyle=function(c){this.renderer.unsetStyle(c)},p.prototype.getFontSize=function(){return this.getOption("fontSize")||A.computedStyle(this.container).fontSize},p.prototype.setFontSize=function(c){this.setOption("fontSize",c)},p.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var c=this;this.$highlightPending=!0,setTimeout(function(){c.$highlightPending=!1;var m=c.session;if(!(!m||m.destroyed)){m.$bracketHighlight&&(m.$bracketHighlight.markerIds.forEach(function(O){m.removeMarker(O)}),m.$bracketHighlight=null);var S=c.getCursorPosition(),T=c.getKeyboardHandler(),E=T&&T.$getDirectionForHighlight&&T.$getDirectionForHighlight(c),_=m.getMatchingBracketRanges(S,E);if(!_){var I=new d(m,S.row,S.column),F=I.getCurrentToken();if(F&&/\b(?:tag-open|tag-name)/.test(F.type)){var N=m.getMatchingTags(S);N&&(_=[N.openTagName.isEmpty()?N.openTag:N.openTagName,N.closeTagName.isEmpty()?N.closeTag:N.closeTagName])}}if(!_&&m.$mode.getMatching&&(_=m.$mode.getMatching(c.session)),!_){c.getHighlightIndentGuides()&&c.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)])),m.$bracketHighlight={ranges:_,markerIds:_.map(function(O){return m.addMarker(O,D,"text")})},c.getHighlightIndentGuides()&&c.renderer.$textLayer.$highlightIndentGuide()}},50)}},p.prototype.focus=function(){this.textInput.focus()},p.prototype.isFocused=function(){return this.textInput.isFocused()},p.prototype.blur=function(){this.textInput.blur()},p.prototype.onFocus=function(c){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",c))},p.prototype.onBlur=function(c){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",c))},p.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},p.prototype.onDocumentChange=function(c){var m=this.session.$useWrapMode,S=c.start.row==c.end.row?c.end.row:1/0;this.renderer.updateLines(c.start.row,S,m),this._signal("change",c),this.$cursorChange()},p.prototype.onTokenizerUpdate=function(c){var m=c.data;this.renderer.updateLines(m.first,m.last)},p.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},p.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},p.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},p.prototype.$updateHighlightActiveLine=function(){var c=this.getSession(),m;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(m=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(m=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(m=!1)),c.$highlightLineMarker&&!m)c.removeMarker(c.$highlightLineMarker.id),c.$highlightLineMarker=null;else if(!c.$highlightLineMarker&&m){var S=new s(m.row,m.column,m.row,1/0);S.id=c.addMarker(S,"ace_active-line","screenLine"),c.$highlightLineMarker=S}else m&&(c.$highlightLineMarker.start.row=m.row,c.$highlightLineMarker.end.row=m.row,c.$highlightLineMarker.start.column=m.column,c._signal("changeBackMarker"))},p.prototype.onSelectionChange=function(c){var m=this.session;if(m.$selectionMarker&&m.removeMarker(m.$selectionMarker),m.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var S=this.selection.getRange(),T=this.getSelectionStyle();m.$selectionMarker=m.addMarker(S,"ace_selection",T)}var E=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(E),this._signal("changeSelection")},p.prototype.$getSelectionHighLightRegexp=function(){var c=this.session,m=this.getSelectionRange();if(!(m.isEmpty()||m.isMultiLine())){var S=m.start.column,T=m.end.column,E=c.getLine(m.start.row),_=E.substring(S,T);if(!(_.length>5e3||!/[\w\d]/.test(_))){var I=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:_}),F=E.substring(S-1,T+1);if(I.test(F))return I}}},p.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},p.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},p.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},p.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},p.prototype.onChangeMode=function(c){this.renderer.updateText(),this._emit("changeMode",c)},p.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},p.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},p.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},p.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},p.prototype.getCopyText=function(){var c=this.getSelectedText(),m=this.session.doc.getNewLineCharacter(),S=!1;if(!c&&this.$copyWithEmptySelection){S=!0;for(var T=this.selection.getAllRanges(),E=0;EO.search(/\S|$/)){var F=O.substr(E.column).search(/\S|$/);S.doc.removeInLine(E.row,E.column,E.column+F)}}this.clearSelection();var N=E.column,D=S.getState(E.row),O=S.getLine(E.row),W=T.checkOutdent(D,O,c);if(S.insert(E,c),_&&_.selection&&(_.selection.length==2?this.selection.setSelectionRange(new s(E.row,N+_.selection[0],E.row,N+_.selection[1])):this.selection.setSelectionRange(new s(E.row+_.selection[0],_.selection[1],E.row+_.selection[2],_.selection[3]))),this.$enableAutoIndent){if(S.getDocument().isNewLine(c)){var H=T.getNextLineIndent(D,O.slice(0,E.column),S.getTabString());S.insert({row:E.row+1,column:0},H)}W&&T.autoOutdent(D,S,E.row)}},p.prototype.autoIndent=function(){for(var c=this.session,m=c.getMode(),S=this.selection.isEmpty()?[new s(0,0,c.doc.getLength()-1,0)]:this.selection.getAllRanges(),T="",E="",_="",I=c.getTabString(),F=0;F0&&(T=c.getState(O-1),E=c.getLine(O-1),_=m.getNextLineIndent(T,E,I));var W=c.getLine(O),H=m.$getIndent(W);if(_!==H){if(H.length>0){var P=new s(O,0,O,H.length);c.remove(P)}_.length>0&&c.insert({row:O,column:0},_)}m.autoOutdent(T,c,O)}},p.prototype.onTextInput=function(c,m){if(!m)return this.keyBinding.onTextInput(c);this.startOperation({command:{name:"insertstring"}});var S=this.applyComposition.bind(this,c,m);this.selection.rangeCount?this.forEachSelection(S):S(),this.endOperation()},p.prototype.applyComposition=function(c,m){if(m.extendLeft||m.extendRight){var S=this.selection.getRange();S.start.column-=m.extendLeft,S.end.column+=m.extendRight,S.start.column<0&&(S.start.row--,S.start.column+=this.session.getLine(S.start.row).length+1),this.selection.setRange(S),!c&&!S.isEmpty()&&this.remove()}if((c||!this.selection.isEmpty())&&this.insert(c,!0),m.restoreStart||m.restoreEnd){var S=this.selection.getRange();S.start.column-=m.restoreStart,S.end.column-=m.restoreEnd,this.selection.setRange(S)}},p.prototype.onCommandKey=function(c,m,S){return this.keyBinding.onCommandKey(c,m,S)},p.prototype.setOverwrite=function(c){this.session.setOverwrite(c)},p.prototype.getOverwrite=function(){return this.session.getOverwrite()},p.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},p.prototype.setScrollSpeed=function(c){this.setOption("scrollSpeed",c)},p.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},p.prototype.setDragDelay=function(c){this.setOption("dragDelay",c)},p.prototype.getDragDelay=function(){return this.getOption("dragDelay")},p.prototype.setSelectionStyle=function(c){this.setOption("selectionStyle",c)},p.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},p.prototype.setHighlightActiveLine=function(c){this.setOption("highlightActiveLine",c)},p.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},p.prototype.setHighlightGutterLine=function(c){this.setOption("highlightGutterLine",c)},p.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},p.prototype.setHighlightSelectedWord=function(c){this.setOption("highlightSelectedWord",c)},p.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},p.prototype.setAnimatedScroll=function(c){this.renderer.setAnimatedScroll(c)},p.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},p.prototype.setShowInvisibles=function(c){this.renderer.setShowInvisibles(c)},p.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},p.prototype.setDisplayIndentGuides=function(c){this.renderer.setDisplayIndentGuides(c)},p.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},p.prototype.setHighlightIndentGuides=function(c){this.renderer.setHighlightIndentGuides(c)},p.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},p.prototype.setShowPrintMargin=function(c){this.renderer.setShowPrintMargin(c)},p.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},p.prototype.setPrintMarginColumn=function(c){this.renderer.setPrintMarginColumn(c)},p.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},p.prototype.setReadOnly=function(c){this.setOption("readOnly",c)},p.prototype.getReadOnly=function(){return this.getOption("readOnly")},p.prototype.setBehavioursEnabled=function(c){this.setOption("behavioursEnabled",c)},p.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},p.prototype.setWrapBehavioursEnabled=function(c){this.setOption("wrapBehavioursEnabled",c)},p.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},p.prototype.setShowFoldWidgets=function(c){this.setOption("showFoldWidgets",c)},p.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},p.prototype.setFadeFoldWidgets=function(c){this.setOption("fadeFoldWidgets",c)},p.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},p.prototype.remove=function(c){this.selection.isEmpty()&&(c=="left"?this.selection.selectLeft():this.selection.selectRight());var m=this.getSelectionRange();if(this.getBehavioursEnabled()){var S=this.session,T=S.getState(m.start.row),E=S.getMode().transformAction(T,"deletion",this,S,m);if(m.end.column===0){var _=S.getTextRange(m);if(_[_.length-1]==` `){var I=S.getLine(m.end.row);/^\s+$/.test(I)&&(m.end.column=I.length)}}E&&(m=E)}this.session.remove(m),this.clearSelection()},p.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},p.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},p.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},p.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var c=this.getSelectionRange();c.start.column==c.end.column&&c.start.row==c.end.row&&(c.end.column=0,c.end.row++),this.session.remove(c),this.clearSelection()},p.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var c=this.getCursorPosition();this.insert(` `),this.moveCursorToPosition(c)},p.prototype.setGhostText=function(c,m){this.session.widgetManager||(this.session.widgetManager=new l(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(c,m)},p.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},p.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var c=this.getCursorPosition(),m=c.column;if(m!==0){var S=this.session.getLine(c.row),T,E;mF.toLowerCase()?1:0});for(var E=new s(0,0,0,0),T=c.first;T<=c.last;T++){var _=m.getLine(T);E.start.row=T,E.end.row=T,E.end.column=_.length,m.replace(E,S[T-c.first])}},p.prototype.toggleCommentLines=function(){var c=this.session.getState(this.getCursorPosition().row),m=this.$getSelectedRows();this.session.getMode().toggleCommentLines(c,this.session,m.first,m.last)},p.prototype.toggleBlockComment=function(){var c=this.getCursorPosition(),m=this.session.getState(c.row),S=this.getSelectionRange();this.session.getMode().toggleBlockComment(m,this.session,S,c)},p.prototype.getNumberAt=function(c,m){var S=/[\-]?[0-9]+(?:\.[0-9]+)?/g;S.lastIndex=0;for(var T=this.session.getLine(c);S.lastIndex=m){var _={value:E[0],start:E.index,end:E.index+E[0].length};return _}}return null},p.prototype.modifyNumber=function(c){var m=this.selection.getCursor().row,S=this.selection.getCursor().column,T=new s(m,S-1,m,S),E=this.session.getTextRange(T);if(!isNaN(parseFloat(E))&&isFinite(E)){var _=this.getNumberAt(m,S);if(_){var I=_.value.indexOf(".")>=0?_.start+_.value.indexOf(".")+1:_.end,F=_.start+_.value.length-I,N=parseFloat(_.value);N*=Math.pow(10,F),I!==_.end&&S=I&&_<=F&&(S=X,N.selection.clearSelection(),N.moveCursorTo(c,I+T),N.selection.selectTo(c,F+T)),I=F});for(var D=this.$toggleWordPairs,O,W=0;W=F&&I<=N&&H.match(/((?:https?|ftp):\/\/[\S]+)/)){D=H.replace(/[\s:.,'";}\]]+$/,"");break}F=N}}catch(P){S={error:P}}finally{try{W&&!W.done&&(T=O.return)&&T.call(O)}finally{if(S)throw S.error}}return D},p.prototype.openLink=function(){var c=this.selection.getCursor(),m=this.findLinkAt(c.row,c.column);return m&&window.open(m,"_blank"),m!=null},p.prototype.removeLines=function(){var c=this.$getSelectedRows();this.session.removeFullLines(c.first,c.last),this.clearSelection()},p.prototype.duplicateSelection=function(){var c=this.selection,m=this.session,S=c.getRange(),T=c.isBackwards();if(S.isEmpty()){var E=S.start.row;m.duplicateLines(E,E)}else{var _=T?S.start:S.end,I=m.insert(_,m.getTextRange(S));S.start=_,S.end=I,c.setSelectionRange(S,T)}},p.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},p.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},p.prototype.moveText=function(c,m,S){return this.session.moveText(c,m,S)},p.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},p.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},p.prototype.$moveLines=function(c,m){var S,T,E=this.selection;if(!E.inMultiSelectMode||this.inVirtualSelectionMode){var _=E.toOrientedRange();S=this.$getSelectedRows(_),T=this.session.$moveLines(S.first,S.last,m?0:c),m&&c==-1&&(T=0),_.moveBy(T,0),E.fromOrientedRange(_)}else{var I=E.rangeList.ranges;E.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var F=0,N=0,D=I.length,O=0;OP+1)break;P=U.last}for(O--,F=this.session.$moveLines(H,P,m?0:c),m&&c==-1&&(W=O+1);W<=O;)I[W].moveBy(F,0),W++;m||(F=0),N+=F}E.fromOrientedRange(E.ranges[0]),E.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},p.prototype.$getSelectedRows=function(c){return c=(c||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(c.start.row),last:this.session.getRowFoldEnd(c.end.row)}},p.prototype.onCompositionStart=function(c){this.renderer.showComposition(c)},p.prototype.onCompositionUpdate=function(c){this.renderer.setCompositionText(c)},p.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},p.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},p.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},p.prototype.isRowVisible=function(c){return c>=this.getFirstVisibleRow()&&c<=this.getLastVisibleRow()},p.prototype.isRowFullyVisible=function(c){return c>=this.renderer.getFirstFullyVisibleRow()&&c<=this.renderer.getLastFullyVisibleRow()},p.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},p.prototype.$moveByPage=function(c,m){var S=this.renderer,T=this.renderer.layerConfig,E=c*Math.floor(T.height/T.lineHeight);m===!0?this.selection.$moveSelection(function(){this.moveCursorBy(E,0)}):m===!1&&(this.selection.moveCursorBy(E,0),this.selection.clearSelection());var _=S.scrollTop;S.scrollBy(0,E*T.lineHeight),m!=null&&S.scrollCursorIntoView(null,.5),S.animateScrolling(_)},p.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},p.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},p.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},p.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},p.prototype.scrollPageDown=function(){this.$moveByPage(1)},p.prototype.scrollPageUp=function(){this.$moveByPage(-1)},p.prototype.scrollToRow=function(c){this.renderer.scrollToRow(c)},p.prototype.scrollToLine=function(c,m,S,T){this.renderer.scrollToLine(c,m,S,T)},p.prototype.centerSelection=function(){var c=this.getSelectionRange(),m={row:Math.floor(c.start.row+(c.end.row-c.start.row)/2),column:Math.floor(c.start.column+(c.end.column-c.start.column)/2)};this.renderer.alignCursor(m,.5)},p.prototype.getCursorPosition=function(){return this.selection.getCursor()},p.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},p.prototype.getSelectionRange=function(){return this.selection.getRange()},p.prototype.selectAll=function(){this.selection.selectAll()},p.prototype.clearSelection=function(){this.selection.clearSelection()},p.prototype.moveCursorTo=function(c,m){this.selection.moveCursorTo(c,m)},p.prototype.moveCursorToPosition=function(c){this.selection.moveCursorToPosition(c)},p.prototype.jumpToMatching=function(c,m){var S=this.getCursorPosition(),T=new d(this.session,S.row,S.column),E=T.getCurrentToken(),_=0;E&&E.type.indexOf("tag-name")!==-1&&(E=T.stepBackward());var I=E||T.stepForward();if(I){var F,N=!1,D={},O=S.column-I.start,W,H={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(I.value.match(/[{}()\[\]]/g)){for(;O1?D[I.value]++:E.value==="=0;--_)this.$tryReplace(S[_],c)&&T++;return this.selection.setSelectionRange(E),T},p.prototype.$tryReplace=function(c,m){var S=this.session.getTextRange(c);return m=this.$search.replace(S,m),m!==null?(c.end=this.session.replace(c,m),c):null},p.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},p.prototype.find=function(c,m,S){m||(m={}),typeof c=="string"||c instanceof RegExp?m.needle=c:typeof c=="object"&&L.mixin(m,c);var T=this.selection.getRange();m.needle==null&&(c=this.session.getTextRange(T)||this.$search.$options.needle,c||(T=this.session.getWordRange(T.start.row,T.start.column),c=this.session.getTextRange(T)),this.$search.set({needle:c})),this.$search.set(m),m.start||this.$search.set({start:T});var E=this.$search.find(this.session);if(m.preventScroll)return E;if(E)return this.revealRange(E,S),E;m.backwards?T.start=T.end:T.end=T.start,this.selection.setRange(T)},p.prototype.findNext=function(c,m){this.find({skipCurrent:!0,backwards:!1},c,m)},p.prototype.findPrevious=function(c,m){this.find(c,{skipCurrent:!0,backwards:!0},m)},p.prototype.revealRange=function(c,m){this.session.unfold(c),this.selection.setSelectionRange(c);var S=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(c.start,c.end,.5),m!==!1&&this.renderer.animateScrolling(S)},p.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},p.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},p.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(c){c.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()},p.prototype.setAutoScrollEditorIntoView=function(c){if(c){var m,S=this,T=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var E=this.$scrollAnchor;E.style.cssText="position:absolute",this.container.insertBefore(E,this.container.firstChild);var _=this.on("changeSelection",function(){T=!0}),I=this.renderer.on("beforeRender",function(){T&&(m=S.renderer.container.getBoundingClientRect())}),F=this.renderer.on("afterRender",function(){if(T&&m&&(S.isFocused()||S.searchBox&&S.searchBox.isFocused())){var N=S.renderer,D=N.$cursorLayer.$pixelPos,O=N.layerConfig,W=D.top-O.offset;D.top>=0&&W+m.top<0?T=!0:D.topwindow.innerHeight?T=!1:T=null,T!=null&&(E.style.top=W+"px",E.style.left=D.left+"px",E.style.height=O.lineHeight+"px",E.scrollIntoView(T)),T=m=null}});this.setAutoScrollEditorIntoView=function(N){N||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",_),this.renderer.off("afterRender",F),this.renderer.off("beforeRender",I))}}},p.prototype.$resetCursorStyle=function(){var c=this.$cursorStyle||"ace",m=this.renderer.$cursorLayer;m&&(m.setSmoothBlinking(/smooth/.test(c)),m.isBlinking=!this.$readOnly&&c!="wide",A.setCssClass(m.element,"ace_slim-cursors",/slim/.test(c)))},p.prototype.prompt=function(c,m,S){var T=this;y.loadModule("ace/ext/prompt",function(E){E.prompt(T,c,m,S)})},p}();b.$uid=0,b.prototype.curOp=null,b.prototype.prevOp={},b.prototype.$mergeableCommands=["backspace","del","insertstring"],b.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(b.prototype,h),y.defineOptions(b.prototype,"editor",{selectionStyle:{set:function(p){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:p})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(p){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(p){this.textInput.setReadOnly(p),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(p){this.textInput.setCopyWithEmptySelection(p)},initialValue:!1},cursorStyle:{set:function(p){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(p){this.setAutoScrollEditorIntoView(p)}},keyboardHandler:{set:function(p){this.setKeyboardHandler(p)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(p){this.session.setValue(p)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(p){this.setSession(p)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(p){this.renderer.$gutterLayer.setShowLineNumbers(p),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),p&&this.$relativeLineNumbers?g.attach(this):g.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(p){this.$showLineNumbers&&p?g.attach(this):g.detach(this)}},placeholder:{set:function(p){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var c=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(c&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),A.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!c&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),A.addCssClass(this.container,"ace_hasPlaceholder");var m=A.createElement("div");m.className="ace_placeholder",m.textContent=this.$placeholder||"",this.renderer.placeholderNode=m,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!c&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(p){var c={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(T){T.blur(),T.renderer.scroller.focus()},readOnly:!0},m=function(T){if(T.target==this.renderer.scroller&&T.keyCode===w.enter){T.preventDefault();var E=this.getCursorPosition().row;this.isRowVisible(E)||this.scrollToLine(E,!0,!0),this.focus()}},S;p?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(u.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",C("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",C("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",m.bind(this)),this.commands.addCommand(c),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",C("editor.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",C("editor.gutter.aria-label","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),S||(S=new v(this)),S.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(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",m.bind(this)),this.commands.removeCommand(c),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),S&&S.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(p){this.$textInputAriaLabel=p},initialValue:""},enableMobileMenu:{set:function(p){this.$enableMobileMenu=p},initialValue:!0},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 g={getText:function(p,c){return(Math.abs(p.selection.lead.row-c)||c+1+(c<9?"·":""))+""},getWidth:function(p,c,m){return Math.max(c.toString().length,(m.lastRow+1).toString().length,2)*m.characterWidth},update:function(p,c){c.renderer.$loop.schedule(c.renderer.CHANGE_GUTTER)},attach:function(p){p.renderer.$gutterLayer.$renderer=this,p.on("changeSelection",this.update),this.update(null,p)},detach:function(p){p.renderer.$gutterLayer.$renderer==this&&(p.renderer.$gutterLayer.$renderer=null),p.off("changeSelection",this.update),this.update(null,p)}};k.Editor=b}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(M,k,B){var R=M("../lib/dom"),L=function(){function A(a,u){this.element=a,this.canvasHeight=u||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return A.prototype.moveContainer=function(a){R.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},A.prototype.pageChanged=function(a,u){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(u.firstRowScreen*u.lineHeight/this.canvasHeight)},A.prototype.computeLineTop=function(a,u,r){var i=u.firstRowScreen*u.lineHeight,n=Math.floor(i/this.canvasHeight),t=r.documentToScreenRow(a,0)*u.lineHeight;return t-n*this.canvasHeight},A.prototype.computeLineHeight=function(a,u,r){return u.lineHeight*r.getRowLineCount(a)},A.prototype.getLength=function(){return this.cells.length},A.prototype.get=function(a){return this.cells[a]},A.prototype.shift=function(){this.$cacheCell(this.cells.shift())},A.prototype.pop=function(){this.$cacheCell(this.cells.pop())},A.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var u=R.createFragment(this.element),r=0;rx&&(l=f.end.row+1,f=o.getNextFoldLine(l,f),x=f?f.start.row:1/0),l>h){for(;this.$lines.getLength()>d+1;)this.$lines.pop();break}y=this.$lines.get(++d),y?y.row=l:(y=this.$lines.createCell(l,e,this.session,n),this.$lines.push(y)),this.$renderCell(y,e,f,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$updateGutterWidth=function(e){var o=this.session,s=o.gutterRenderer||this.$renderer,h=o.$firstLineNumber,f=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||o.$useWrapMode)&&(f=o.getLength()+h-1);var x=s?s.getWidth(o,f,e):f.toString().length*e.characterWidth,y=this.$padding||this.$computePadding();x+=y.left+y.right,x!==this.gutterWidth&&!isNaN(x)&&(this.gutterWidth=x,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",x))},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=this.$cursorRow){if(h.row>this.$cursorRow){var f=this.session.getFoldLine(this.$cursorRow);if(s>0&&f&&f.start.row==o[s-1].row)h=o[s-1];else break}h.element.className="ace_gutter-active-line "+h.element.className,this.$cursorCell=h;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),h=this.oldLastRow;if(this.oldLastRow=s,!o||h0;f--)this.$lines.shift();if(h>s)for(var f=this.session.getFoldedRowCount(s+1,h);f>0;f--)this.$lines.pop();e.firstRowh&&this.$lines.push(this.$renderLines(e,h+1,s)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$renderLines=function(e,o,s){for(var h=[],f=o,x=this.session.getNextFoldLine(f),y=x?x.start.row:1/0;f>y&&(f=x.end.row+1,x=this.session.getNextFoldLine(f,x),y=x?x.start.row:1/0),!(f>s);){var d=this.$lines.createCell(f,e,this.session,n);this.$renderCell(d,e,x,f),h.push(d),f++}return h},t.prototype.$renderCell=function(e,o,s,h){var f=e.element,x=this.session,y=f.childNodes[0],d=f.childNodes[1],l=f.childNodes[2],v=l.firstChild,C=x.$firstLineNumber,$=x.$breakpoints,w=x.$decorations,b=x.gutterRenderer||this.$renderer,g=this.$showFoldWidgets&&x.foldWidgets,p=s?s.start.row:Number.MAX_VALUE,c=o.lineHeight+"px",m=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",S=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",T=(b?b.getText(x,h):h+C).toString();if(this.$highlightGutterLine&&(h==this.$cursorRow||s&&h=p&&this.$cursorRow<=s.end.row)&&(m+="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)),$[h]&&(m+=$[h]),w[h]&&(m+=w[h]),this.$annotations[h]&&h!==p&&(m+=this.$annotations[h].className),g){var E=g[h];E==null&&(E=g[h]=x.getFoldWidget(h))}if(E){var _="ace_fold-widget ace_"+E,I=E=="start"&&h==p&&hs.right-o.right)return"foldWidgets"},t}();i.prototype.$fixedWidth=!1,i.prototype.$highlightGutterLine=!0,i.prototype.$renderer="",i.prototype.$showLineNumbers=!0,i.prototype.$showFoldWidgets=!0,L.implement(i.prototype,a);function n(t){var e=document.createTextNode("");t.appendChild(e);var o=R.createElement("span");t.appendChild(o);var s=R.createElement("span");t.appendChild(s);var h=R.createElement("span");return s.appendChild(h),t}k.Gutter=i}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(M,k,B){var R=M("../range").Range,L=M("../lib/dom"),A=function(){function u(r){this.element=L.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element)}return u.prototype.setPadding=function(r){this.$padding=r},u.prototype.setSession=function(r){this.session=r},u.prototype.setMarkers=function(r){this.markers=r},u.prototype.elt=function(r,i){var n=this.i!=-1&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=i,n.className=r},u.prototype.update=function(r){if(r){this.config=r,this.i=0;var i;for(var n in this.markers){var t=this.markers[n];if(!t.range){t.update(i,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(i,e,s,o,r)}else t.type=="fullLine"?this.drawFullLineMarker(i,e,t.clazz,r):t.type=="screenLine"?this.drawScreenLineMarker(i,e,t.clazz,r):e.isMultiLine()?t.type=="text"?this.drawTextMarker(i,e,t.clazz,r):this.drawMultiLineMarker(i,e,t.clazz,r):this.drawSingleLineMarker(i,e,t.clazz+" ace_start ace_br15",r)}if(this.i!=-1)for(;this.id,f==h),t,f==h?0:1,e)},u.prototype.drawMultiLineMarker=function(r,i,n,t,e){var o=this.$padding,s=t.lineHeight,h=this.$getTop(i.start.row,t),f=o+i.start.column*t.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(i.start.row)){var x=i.clone();x.end.row=x.start.row,x.end.column=this.session.getLine(x.start.row).length,this.drawBidiSingleLineMarker(r,x,n+" ace_br1 ace_start",t,null,e)}else this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+h+"px;left:"+f+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(i.end.row)){var x=i.clone();x.start.row=x.end.row,x.start.column=0,this.drawBidiSingleLineMarker(r,x,n+" ace_br12",t,null,e)}else{h=this.$getTop(i.end.row,t);var y=i.end.column*t.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+y+"px;top:"+h+"px;left:"+o+"px;"+(e||""))}if(s=(i.end.row-i.start.row-1)*t.lineHeight,!(s<=0)){h=this.$getTop(i.start.row+1,t);var d=(i.start.column?1:0)|(i.end.column?0:8);this.elt(n+(d?" ace_br"+d:""),"height:"+s+"px;right:0;top:"+h+"px;left:"+o+"px;"+(e||""))}},u.prototype.drawSingleLineMarker=function(r,i,n,t,e,o){if(this.session.$bidiHandler.isBidiRow(i.start.row))return this.drawBidiSingleLineMarker(r,i,n,t,e,o);var s=t.lineHeight,h=(i.end.column+(e||0)-i.start.column)*t.characterWidth,f=this.$getTop(i.start.row,t),x=this.$padding+i.start.column*t.characterWidth;this.elt(n,"height:"+s+"px;width:"+h+"px;top:"+f+"px;left:"+x+"px;"+(o||""))},u.prototype.drawBidiSingleLineMarker=function(r,i,n,t,e,o){var s=t.lineHeight,h=this.$getTop(i.start.row,t),f=this.$padding,x=this.session.$bidiHandler.getSelections(i.start.column,i.end.column);x.forEach(function(y){this.elt(n,"height:"+s+"px;width:"+(y.width+(e||0))+"px;top:"+h+"px;left:"+(f+y.left)+"px;"+(o||""))},this)},u.prototype.drawFullLineMarker=function(r,i,n,t,e){var o=this.$getTop(i.start.row,t),s=t.lineHeight;i.start.row!=i.end.row&&(s+=this.$getTop(i.end.row,t)-o),this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(e||""))},u.prototype.drawScreenLineMarker=function(r,i,n,t,e){var o=this.$getTop(i.start.row,t),s=t.lineHeight;this.elt(n,"height:"+s+"px;top:"+o+"px;left:0;right:0;"+(e||""))},u}();A.prototype.$padding=0;function a(u,r,i,n){return(u?1:0)|(r?2:0)|(i?4:0)|(n?8:0)}k.Marker=A}),ace.define("ace/layer/text_util",["require","exports","module"],function(M,k,B){var R=new Set(["text","rparen","lparen"]);k.isTextToken=function(L){return R.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(M,k,B){var R=M("../lib/oop"),L=M("../lib/dom"),A=M("../lib/lang"),a=M("./lines").Lines,u=M("../lib/event_emitter").EventEmitter,r=M("../config").nls,i=M("./text_util").isTextToken,n=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()==` `&&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;sC&&(l=v.end.row+1,v=this.session.getNextFoldLine(l,v),C=v?v.start.row:1/0),!(l>f);){var $=x[y++];if($){this.dom.removeChildren($),this.$renderLine($,l,l==C?v:!1),d&&($.style.top=this.$lines.computeLineTop(l,e,this.session)+"px");var w=e.lineHeight*this.session.getRowLength(l)+"px";$.style.height!=w&&(d=!0,$.style.height=w)}l++}if(d)for(;y0;f--)this.$lines.shift();if(o.lastRow>e.lastRow)for(var f=this.session.getFoldedRowCount(e.lastRow+1,o.lastRow);f>0;f--)this.$lines.pop();e.firstRowo.lastRow&&this.$lines.push(this.$renderLinesFragment(e,o.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},t.prototype.$renderLinesFragment=function(e,o,s){for(var h=[],f=o,x=this.session.getNextFoldLine(f),y=x?x.start.row:1/0;f>y&&(f=x.end.row+1,x=this.session.getNextFoldLine(f,x),y=x?x.start.row:1/0),!(f>s);){var d=this.$lines.createCell(f,e,this.session),l=d.element;this.dom.removeChildren(l),L.setStyle(l.style,"height",this.$lines.computeLineHeight(f,e,this.session)+"px"),L.setStyle(l.style,"top",this.$lines.computeLineTop(f,e,this.session)+"px"),this.$renderLine(l,f,f==y?x:!1),this.$useLineGroups()?l.className="ace_line_group":l.className="ace_line",h.push(d),f++}return h},t.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var o=e.firstRow,s=e.lastRow,h=this.$lines;h.getLength();)h.pop();h.push(this.$renderLinesFragment(e,o,s))},t.prototype.$renderToken=function(e,o,s,h){for(var f=this,x=/(\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,y=this.dom.createFragment(this.element),d,l=0;d=x.exec(h);){var v=d[1],C=d[2],$=d[3],w=d[4],b=d[5];if(!(!f.showSpaces&&C)){var g=l!=d.index?h.slice(l,d.index):"";if(l=d.index+d[0].length,g&&y.appendChild(this.dom.createTextNode(g,this.element)),v){var p=f.session.getScreenTabSize(o+d.index);y.appendChild(f.$tabStrings[p].cloneNode(!0)),o+=p-1}else if(C)if(f.showSpaces){var c=this.dom.createElement("span");c.className="ace_invisible ace_invisible_space",c.textContent=A.stringRepeat(f.SPACE_CHAR,C.length),y.appendChild(c)}else y.appendChild(this.dom.createTextNode(C,this.element));else if($){var c=this.dom.createElement("span");c.className="ace_invisible ace_invisible_space ace_invalid",c.textContent=A.stringRepeat(f.SPACE_CHAR,$.length),y.appendChild(c)}else if(w){o+=1;var c=this.dom.createElement("span");c.style.width=f.config.characterWidth*2+"px",c.className=f.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",c.textContent=f.showSpaces?f.SPACE_CHAR:w,y.appendChild(c)}else if(b){o+=1;var c=this.dom.createElement("span");c.style.width=f.config.characterWidth*2+"px",c.className="ace_cjk",c.textContent=b,y.appendChild(c)}}}if(y.appendChild(this.dom.createTextNode(l?h.slice(l):h,this.element)),i(s.type))e.appendChild(y);else{var m="ace_"+s.type.replace(/\./g," ace_"),c=this.dom.createElement("span");s.type=="fold"&&(c.style.width=s.value.length*this.config.characterWidth+"px",c.setAttribute("title",r("inline-fold.closed.title","Unfold code"))),c.className=m,c.appendChild(y),e.appendChild(c)}return o+h.length},t.prototype.renderIndentGuide=function(e,o,s){var h=o.search(this.$indentGuideRe);if(h<=0||h>=s)return o;if(o[0]==" "){h-=h%this.tabSize;for(var f=h/this.tabSize,x=0;xx[y].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 y=o.row+1;y0){for(var f=0;f=this.$highlightIndentGuideMarker.start+1){if(h.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(h,o)}}else for(var s=e.length-1;s>=0;s--){var h=e[s];if(this.$highlightIndentGuideMarker.end&&h.row=x;)y=this.$renderToken(d,y,v,C.substring(0,x-h)),C=C.substring(x-h),h=x,d=this.$createLineElement(),e.appendChild(d),d.appendChild(this.dom.createTextNode(A.stringRepeat(" ",s.indent),this.element)),f++,y=0,x=s[f]||Number.MAX_VALUE;C.length!=0&&(h+=C.length,y=this.$renderToken(d,y,v,C))}}s[s.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(d,y,null,"",!0)},t.prototype.$renderSimpleLine=function(e,o){for(var s=0,h=0;hthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,s,f,x);s=this.$renderToken(e,s,f,x)}}},t.prototype.$renderOverflowMessage=function(e,o,s,h,f){s&&this.$renderToken(e,o,s,h.slice(0,this.MAX_LINE_LENGTH-o));var x=this.dom.createElement("span");x.className="ace_inline_button ace_keyword ace_toggle_wrap",x.textContent=f?"":"",e.appendChild(x)},t.prototype.$renderLine=function(e,o,s){if(!s&&s!=!1&&(s=this.session.getFoldLine(o)),s)var h=this.$getFoldLineTokens(o,s);else var h=this.session.getTokens(o);var f=e;if(h.length){var x=this.session.getRowSplitData(o);if(x&&x.length){this.$renderWrappedLine(e,h,x);var f=e.lastChild}else{var f=e;this.$useLineGroups()&&(f=this.$createLineElement(),e.appendChild(f)),this.$renderSimpleLine(f,h)}}else this.$useLineGroups()&&(f=this.$createLineElement(),e.appendChild(f));if(this.showEOL&&f){s&&(o=s.end.row);var y=this.dom.createElement("span");y.className="ace_invisible ace_invisible_eol",y.textContent=o==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,f.appendChild(y)}},t.prototype.$getFoldLineTokens=function(e,o){var s=this.session,h=[];function f(y,d,l){for(var v=0,C=0;C+y[v].value.lengthl-d&&($=$.substring(0,l-d)),h.push({type:y[v].type,value:$}),C=d+$.length,v+=1}for(;Cl?h.push({type:y[v].type,value:$.substring(0,l-C)}):h.push(y[v]),C+=$.length,v+=1}}var x=s.getTokens(e);return o.walk(function(y,d,l,v,C){y!=null?h.push({type:"fold",value:y}):(C&&(x=s.getTokens(d)),x.length&&f(x,v,l))},o.end.row,this.session.getLine(o.end.row).length),h},t.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},t}();n.prototype.EOF_CHAR="¶",n.prototype.EOL_CHAR_LF="¬",n.prototype.EOL_CHAR_CRLF="¤",n.prototype.EOL_CHAR=n.prototype.EOL_CHAR_LF,n.prototype.TAB_CHAR="—",n.prototype.SPACE_CHAR="·",n.prototype.$padding=0,n.prototype.MAX_LINE_LENGTH=1e4,n.prototype.showInvisibles=!1,n.prototype.showSpaces=!1,n.prototype.showTabs=!1,n.prototype.showEOL=!1,n.prototype.displayIndentGuides=!0,n.prototype.$highlightIndentGuides=!0,n.prototype.$tabStrings=[],n.prototype.destroy={},n.prototype.onChangeTabSize=n.prototype.$computeTabString,R.implement(n.prototype,u),k.Text=n}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(M,k,B){var R=M("../lib/dom"),L=function(){function A(a){this.element=R.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(),R.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return A.prototype.$updateOpacity=function(a){for(var u=this.cursors,r=u.length;r--;)R.setStyle(u[r].style,"opacity",a?"":"0")},A.prototype.$startCssAnimation=function(){for(var a=this.cursors,u=a.length;u--;)a[u].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&R.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},A.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,R.removeCssClass(this.element,"ace_animate-blinking")},A.prototype.setPadding=function(a){this.$padding=a},A.prototype.setSession=function(a){this.session=a},A.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},A.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},A.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,R.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},A.prototype.addCursor=function(){var a=R.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},A.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},A.prototype.hideCursor=function(){this.isVisible=!1,R.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},A.prototype.showCursor=function(){this.isVisible=!0,R.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},A.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,R.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&&R.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),R.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var u=function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){a(!0),u()},this.blinkInterval),u()}},A.prototype.getPixelPosition=function(a,u){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var r=this.session.documentToScreenPosition(a),i=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,a.row)?this.session.$bidiHandler.getPosLeft(r.column):r.column*this.config.characterWidth),n=(r.row-(u?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:n}},A.prototype.isCursorInView=function(a,u){return a.top>=0&&a.topa.height+a.offset||t.top<0)&&r>1)){var e=this.cursors[i++]||this.addCursor(),o=e.style;this.drawCursor?this.drawCursor(e,t,a,u[r],this.session):this.isCursorInView(t,a)?(R.setStyle(o,"display","block"),R.translate(e,t.left,t.top),R.setStyle(o,"width",Math.round(a.characterWidth)+"px"),R.setStyle(o,"height",a.lineHeight+"px")):R.setStyle(o,"display","none")}}for(;this.cursors.length>i;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=t,this.restartTimer()},A.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?R.addCssClass(this.element,"ace_overwrite-cursors"):R.removeCssClass(this.element,"ace_overwrite-cursors"))},A.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},A}();L.prototype.$padding=0,L.prototype.drawCursor=null,k.Cursor=L}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(M,k,B){var R=this&&this.__extends||function(){var e=function(o,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,f){h.__proto__=f}||function(h,f){for(var x in f)Object.prototype.hasOwnProperty.call(f,x)&&(h[x]=f[x])},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 h(){this.constructor=o}o.prototype=s===null?Object.create(s):(h.prototype=s.prototype,new h)}}(),L=M("./lib/oop"),A=M("./lib/dom"),a=M("./lib/event"),u=M("./lib/event_emitter").EventEmitter,r=32768,i=function(){function e(o,s){this.element=A.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+s,this.inner=A.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(i.prototype,u);var n=function(e){R(o,e);function o(s,h){var f=e.call(this,s,"-v")||this;return f.scrollTop=0,f.scrollHeight=0,h.$scrollbarWidth=f.width=A.scrollbarWidth(s.ownerDocument),f.inner.style.width=f.element.style.width=(f.width||15)+5+"px",f.$minWidth=0,f}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}(i);n.prototype.setInnerHeight=n.prototype.setScrollHeight;var t=function(e){R(o,e);function o(s,h){var f=e.call(this,s,"-h")||this;return f.scrollLeft=0,f.height=h.$scrollbarWidth,f.inner.style.height=f.element.style.height=(f.height||15)+5+"px",f}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}(i);k.ScrollBar=n,k.ScrollBarV=n,k.ScrollBarH=t,k.VScrollBar=n,k.HScrollBar=t}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(M,k,B){var R=this&&this.__extends||function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,h){s.__proto__=h}||function(s,h){for(var f in h)Object.prototype.hasOwnProperty.call(h,f)&&(s[f]=h[f])},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=M("./lib/oop"),A=M("./lib/dom"),a=M("./lib/event"),u=M("./lib/event_emitter").EventEmitter;A.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ position: absolute; background: rgba(128, 128, 128, 0.6); -moz-box-sizing: border-box; box-sizing: border-box; border: 1px solid #bbb; border-radius: 2px; z-index: 8; } .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h { position: absolute; z-index: 6; background: none; overflow: hidden!important; } .ace_editor>.ace_sb-v { z-index: 6; right: 0; top: 0; width: 12px; } .ace_editor>.ace_sb-v div { z-index: 8; right: 0; width: 100%; } .ace_editor>.ace_sb-h { bottom: 0; left: 0; height: 12px; } .ace_editor>.ace_sb-h div { bottom: 0; height: 100%; } .ace_editor>.ace_sb_grabbed { z-index: 8; background: #000; }`,"ace_scrollbar.css",!1);var r=function(){function t(e,o){this.element=A.createElement("div"),this.element.className="ace_sb"+o,this.inner=A.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,u);var i=function(t){R(e,t);function e(o,s){var h=t.call(this,o,"-v")||this;return h.scrollTop=0,h.scrollHeight=0,h.parent=o,h.width=h.VScrollWidth,h.renderer=s,h.inner.style.width=h.element.style.width=(h.width||15)+"px",h.$minWidth=0,h}return e.prototype.onMouseDown=function(o,s){if(o==="mousedown"&&!(a.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var h=this,f=s.clientY,x=function(w){f=w.clientY},y=function(){clearInterval(C)},d=s.clientY,l=this.thumbTop,v=function(){if(f!==void 0){var w=h.scrollTopFromThumbTop(l+f-d);w!==h.scrollTop&&h._emit("scroll",{data:w})}};a.capture(this.inner,x,y);var C=setInterval(v,20);return a.preventDefault(s)}var $=s.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop($)}),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);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var n=function(t){R(e,t);function e(o,s){var h=t.call(this,o,"-h")||this;return h.scrollLeft=0,h.scrollWidth=0,h.height=h.HScrollHeight,h.inner.style.height=h.element.style.height=(h.height||12)+"px",h.renderer=s,h}return e.prototype.onMouseDown=function(o,s){if(o==="mousedown"&&!(a.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var h=this,f=s.clientX,x=function(w){f=w.clientX},y=function(){clearInterval(C)},d=s.clientX,l=this.thumbLeft,v=function(){if(f!==void 0){var w=h.scrollLeftFromThumbLeft(l+f-d);w!==h.scrollLeft&&h._emit("scroll",{data:w})}};a.capture(this.inner,x,y);var C=setInterval(v,20);return a.preventDefault(s)}var $=s.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft($)}),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);n.prototype.setInnerWidth=n.prototype.setScrollWidth,k.ScrollBar=i,k.ScrollBarV=i,k.ScrollBarH=n,k.VScrollBar=i,k.HScrollBar=n}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(M,k,B){var R=M("./lib/event"),L=function(){function A(a,u){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=u||window;var r=this;this._flush=function(i){r.pending=!1;var n=r.changes;if(n&&(R.blockIdle(100),r.changes=0,r.onRender(n)),r.changes){if(r.$recursionLimit--<0)return;r.schedule()}else r.$recursionLimit=2}}return A.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(R.nextFrame(this._flush),this.pending=!0)},A.prototype.clear=function(a){var u=this.changes;return this.changes=0,u},A}();k.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(M,k,B){var R=M("../lib/oop"),L=M("../lib/dom"),A=M("../lib/lang"),a=M("../lib/event"),u=M("../lib/useragent"),r=M("../lib/event_emitter").EventEmitter,i=512,n=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=A.stringRepeat("X",i),this.$characterSize={width:0,height:0},n?this.$addObserver():this.checkForSizeChanges()}return o.prototype.$setMeasureNodeStyles=function(s,h){s.width=s.height="auto",s.left=s.top="0px",s.visibility="hidden",s.position="absolute",s.whiteSpace="pre",u.isIE<8?s["font-family"]="inherit":s.font="inherit",s.overflow=h?"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 h=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=s,this.charSizes=Object.create(null),this.allowBoldFonts=h&&h.width===s.width&&h.height===s.height,this._emit("changeCharacterSize",{data:s})}},o.prototype.$addObserver=function(){var s=this;this.$observer=new window.ResizeObserver(function(h){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 h(){s.checkForSizeChanges(),a.onIdle(h,500)},500)},o.prototype.setPolling=function(s){s?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},o.prototype.$measureSizes=function(s){var h={height:(s||this.$measureNode).clientHeight,width:(s||this.$measureNode).clientWidth/i};return h.width===0||h.height===0?null:h},o.prototype.$measureCharWidth=function(s){this.$main.textContent=A.stringRepeat(s,i);var h=this.$main.getBoundingClientRect();return h.width/i},o.prototype.getCharacterWidth=function(s){var h=this.charSizes[s];return h===void 0&&(h=this.charSizes[s]=this.$measureCharWidth(s)/this.$characterSize.width),h},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:(Number(window.getComputedStyle(s).zoom)||1)*this.$getZoom(s.parentElement)},o.prototype.$initTransformMeasureNodes=function(){var s=function(h,f){return["div",{style:"position: absolute;top:"+h+"px;left:"+f+"px;"}]};this.els=L.buildDom([s(0,0),s(t,0),s(0,t),s(t,t)],this.el)},o.prototype.transformCoordinates=function(s,h){if(s){var f=this.$getZoom(this.el);s=l(1/f,s)}function x(I,F,N){var D=I[1]*F[0]-I[0]*F[1];return[(-F[1]*N[0]+F[0]*N[1])/D,(+I[1]*N[0]-I[0]*N[1])/D]}function y(I,F){return[I[0]-F[0],I[1]-F[1]]}function d(I,F){return[I[0]+F[0],I[1]+F[1]]}function l(I,F){return[I*F[0],I*F[1]]}this.els||this.$initTransformMeasureNodes();function v(I){var F=I.getBoundingClientRect();return[F.left,F.top]}var C=v(this.els[0]),$=v(this.els[1]),w=v(this.els[2]),b=v(this.els[3]),g=x(y(b,$),y(b,w),y(d($,w),d(b,C))),p=l(1+g[0],y($,C)),c=l(1+g[1],y(w,C));if(h){var m=h,S=g[0]*m[0]/t+g[1]*m[1]/t+1,T=d(l(m[0],p),l(m[1],c));return d(l(1/S/t,T),C)}var E=y(s,C),_=x(y(p,l(g[0],E)),y(c,l(g[1],E)),E);return l(t,_)},o}();e.prototype.$characterSize={width:0,height:0},R.implement(e.prototype,r),k.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(M,k,B){B.exports=` .ace_br1 {border-top-left-radius : 3px;} .ace_br2 {border-top-right-radius : 3px;} .ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;} .ace_br4 {border-bottom-right-radius: 3px;} .ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;} .ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;} .ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;} .ace_br8 {border-bottom-left-radius : 3px;} .ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;} .ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;} .ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;} .ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} .ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} .ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} .ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} .ace_editor { position: relative; overflow: hidden; padding: 0; font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace; direction: ltr; text-align: left; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } .ace_scroller { position: absolute; overflow: hidden; top: 0; bottom: 0; background-color: inherit; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; cursor: text; } .ace_content { position: absolute; box-sizing: border-box; min-width: 100%; contain: style size layout; font-variant-ligatures: no-common-ligatures; } .ace_keyboard-focus:focus { box-shadow: inset 0 0 0 2px #5E9ED6; outline: none; } .ace_dragging .ace_scroller:before{ position: absolute; top: 0; left: 0; right: 0; bottom: 0; content: ''; background: rgba(250, 250, 250, 0.01); z-index: 1000; } .ace_dragging.ace_dark .ace_scroller:before{ background: rgba(0, 0, 0, 0.01); } .ace_gutter { position: absolute; overflow : hidden; width: auto; top: 0; bottom: 0; left: 0; cursor: default; z-index: 4; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; contain: style size layout; } .ace_gutter-active-line { position: absolute; left: 0; right: 0; } .ace_scroller.ace_scroll-left:after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset; pointer-events: none; } .ace_gutter-cell, .ace_gutter-cell_svg-icons { position: absolute; top: 0; left: 0; right: 0; padding-left: 19px; padding-right: 6px; background-repeat: no-repeat; } .ace_gutter-cell_svg-icons .ace_gutter_annotation { margin-left: -14px; float: left; } .ace_gutter-cell .ace_gutter_annotation { margin-left: -19px; float: left; } .ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold { 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=="); background-repeat: no-repeat; background-position: 2px center; } .ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold { 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=="); background-repeat: no-repeat; background-position: 2px center; } .ace_gutter-cell.ace_info, .ace_icon.ace_info { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII="); background-repeat: no-repeat; background-position: 2px center; } .ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC"); } .ace_icon_svg.ace_error { -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+"); background-color: crimson; } .ace_icon_svg.ace_warning { -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg=="); background-color: darkorange; } .ace_icon_svg.ace_info { -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg=="); background-color: royalblue; } .ace_icon_svg.ace_error_fold { -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); background-color: crimson; } .ace_icon_svg.ace_warning_fold { -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4="); background-color: darkorange; } .ace_scrollbar { contain: strict; position: absolute; right: 0; bottom: 0; z-index: 6; } .ace_scrollbar-inner { position: absolute; cursor: text; left: 0; top: 0; } .ace_scrollbar-v{ overflow-x: hidden; overflow-y: scroll; top: 0; } .ace_scrollbar-h { overflow-x: scroll; overflow-y: hidden; left: 0; } .ace_print-margin { position: absolute; height: 100%; } .ace_text-input { position: absolute; z-index: 0; width: 0.5em; height: 1em; opacity: 0; background: transparent; -moz-appearance: none; appearance: none; border: none; resize: none; outline: none; overflow: hidden; font: inherit; padding: 0 1px; margin: 0 -1px; contain: strict; -ms-user-select: text; -moz-user-select: text; -webkit-user-select: text; user-select: text; /*with \`pre-line\` chrome inserts   instead of space*/ white-space: pre!important; } .ace_text-input.ace_composition { background: transparent; color: inherit; z-index: 1000; opacity: 1; } .ace_composition_placeholder { color: transparent } .ace_composition_marker { border-bottom: 1px solid; position: absolute; border-radius: 0; margin-top: 1px; } [ace_nocontext=true] { transform: none!important; filter: none!important; clip-path: none!important; mask : none!important; contain: none!important; perspective: none!important; mix-blend-mode: initial!important; z-index: auto; } .ace_layer { z-index: 1; position: absolute; overflow: hidden; /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/ word-wrap: normal; white-space: pre; height: 100%; width: 100%; box-sizing: border-box; /* setting pointer-events: auto; on node under the mouse, which changes during scroll, will break mouse wheel scrolling in Safari */ pointer-events: none; } .ace_gutter-layer { position: relative; width: auto; text-align: right; pointer-events: auto; height: 1000000px; contain: style size layout; } .ace_text-layer { font: inherit !important; position: absolute; height: 1000000px; width: 1000000px; contain: style size layout; } .ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group { contain: style size layout; position: absolute; top: 0; left: 0; right: 0; } .ace_hidpi .ace_text-layer, .ace_hidpi .ace_gutter-layer, .ace_hidpi .ace_content, .ace_hidpi .ace_gutter { contain: strict; } .ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group { contain: strict; } .ace_cjk { display: inline-block; text-align: center; } .ace_cursor-layer { z-index: 4; } .ace_cursor { z-index: 4; position: absolute; box-sizing: border-box; border-left: 2px solid; /* workaround for smooth cursor repaintng whole screen in chrome */ transform: translatez(0); } .ace_multiselect .ace_cursor { border-left-width: 1px; } .ace_slim-cursors .ace_cursor { border-left-width: 1px; } .ace_overwrite-cursors .ace_cursor { border-left-width: 0; border-bottom: 1px solid; } .ace_hidden-cursors .ace_cursor { opacity: 0.2; } .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor { opacity: 0; } .ace_smooth-blinking .ace_cursor { transition: opacity 0.18s; } .ace_animate-blinking .ace_cursor { animation-duration: 1000ms; animation-timing-function: step-end; animation-name: blink-ace-animate; animation-iteration-count: infinite; } .ace_animate-blinking.ace_smooth-blinking .ace_cursor { animation-duration: 1000ms; animation-timing-function: ease-in-out; animation-name: blink-ace-animate-smooth; } @keyframes blink-ace-animate { from, to { opacity: 1; } 60% { opacity: 0; } } @keyframes blink-ace-animate-smooth { from, to { opacity: 1; } 45% { opacity: 1; } 60% { opacity: 0; } 85% { opacity: 0; } } .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack { position: absolute; z-index: 3; } .ace_marker-layer .ace_selection { position: absolute; z-index: 5; } .ace_marker-layer .ace_bracket { position: absolute; z-index: 6; } .ace_marker-layer .ace_error_bracket { position: absolute; border-bottom: 1px solid #DE5555; border-radius: 0; } .ace_marker-layer .ace_active-line { position: absolute; z-index: 2; } .ace_marker-layer .ace_selected-word { position: absolute; z-index: 4; box-sizing: border-box; } .ace_line .ace_fold { box-sizing: border-box; display: inline-block; height: 11px; margin-top: -2px; vertical-align: middle; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII="); background-repeat: no-repeat, repeat-x; background-position: center center, top left; color: transparent; border: 1px solid black; border-radius: 2px; cursor: pointer; pointer-events: auto; } .ace_dark .ace_fold { } .ace_fold:hover{ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC"); } .ace_tooltip { background-color: #f5f5f5; border: 1px solid gray; border-radius: 1px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); color: black; max-width: 100%; padding: 3px 4px; position: fixed; z-index: 999999; box-sizing: border-box; cursor: default; white-space: pre-wrap; word-wrap: break-word; line-height: normal; font-style: normal; font-weight: normal; letter-spacing: normal; pointer-events: none; overflow: auto; max-width: min(60em, 66vw); overscroll-behavior: contain; } .ace_tooltip pre { white-space: pre-wrap; } .ace_tooltip.ace_dark { background-color: #636363; color: #fff; } .ace_tooltip:focus { outline: 1px solid #5E9ED6; } .ace_icon { display: inline-block; width: 18px; vertical-align: top; } .ace_icon_svg { display: inline-block; width: 12px; vertical-align: top; -webkit-mask-repeat: no-repeat; -webkit-mask-size: 12px; -webkit-mask-position: center; } .ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons { padding-right: 13px; } .ace_fold-widget { box-sizing: border-box; margin: 0 -12px 0 1px; display: none; width: 11px; vertical-align: top; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg=="); background-repeat: no-repeat; background-position: center; border-radius: 3px; border: 1px solid transparent; cursor: pointer; } .ace_folding-enabled .ace_fold-widget { display: inline-block; } .ace_fold-widget.ace_end { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg=="); } .ace_fold-widget.ace_closed { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA=="); } .ace_fold-widget:hover { border: 1px solid rgba(0, 0, 0, 0.3); background-color: rgba(255, 255, 255, 0.2); box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); } .ace_fold-widget:active { border: 1px solid rgba(0, 0, 0, 0.4); background-color: rgba(0, 0, 0, 0.05); box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); } /** * Dark version for fold widgets */ .ace_dark .ace_fold-widget { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC"); } .ace_dark .ace_fold-widget.ace_end { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg=="); } .ace_dark .ace_fold-widget.ace_closed { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg=="); } .ace_dark .ace_fold-widget:hover { box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); background-color: rgba(255, 255, 255, 0.1); } .ace_dark .ace_fold-widget:active { box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); } .ace_inline_button { border: 1px solid lightgray; display: inline-block; margin: -1px 8px; padding: 0 5px; pointer-events: auto; cursor: pointer; } .ace_inline_button:hover { border-color: gray; background: rgba(200,200,200,0.2); display: inline-block; pointer-events: auto; } .ace_fold-widget.ace_invalid { background-color: #FFB4B4; border-color: #DE5555; } .ace_fade-fold-widgets .ace_fold-widget { transition: opacity 0.4s ease 0.05s; opacity: 0; } .ace_fade-fold-widgets:hover .ace_fold-widget { transition: opacity 0.05s ease 0.05s; opacity:1; } .ace_underline { text-decoration: underline; } .ace_bold { font-weight: bold; } .ace_nobold .ace_bold { font-weight: normal; } .ace_italic { font-style: italic; } .ace_error-marker { background-color: rgba(255, 0, 0,0.2); position: absolute; z-index: 9; } .ace_highlight-marker { background-color: rgba(255, 255, 0,0.2); position: absolute; z-index: 8; } .ace_mobile-menu { position: absolute; line-height: 1.5; border-radius: 4px; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; background: white; box-shadow: 1px 3px 2px grey; border: 1px solid #dcdcdc; color: black; } .ace_dark > .ace_mobile-menu { background: #333; color: #ccc; box-shadow: 1px 3px 2px grey; border: 1px solid #444; } .ace_mobile-button { padding: 2px; cursor: pointer; overflow: hidden; } .ace_mobile-button:hover { background-color: #eee; opacity:1; } .ace_mobile-button:active { background-color: #ddd; } .ace_placeholder { position: relative; font-family: arial; transform: scale(0.9); transform-origin: left; white-space: pre; opacity: 0.7; margin: 0 10px; z-index: 1; } .ace_ghost_text { opacity: 0.5; font-style: italic; } .ace_ghost_text_container > div { white-space: pre; } .ghost_text_line_wrapped::after { content: "↩"; position: absolute; } .ace_lineWidgetContainer.ace_ghost_text { margin: 0px 4px } .ace_screenreader-only { position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; } .ace_hidden_token { display: none; }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(M,k,B){var R=M("../lib/dom"),L=M("../lib/oop"),A=M("../lib/event_emitter").EventEmitter,a=function(){function u(r,i){this.canvas=R.createElement("canvas"),this.renderer=i,this.pixelRatio=1,this.maxHeight=i.layerConfig.maxHeight,this.lineHeight=i.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 u.prototype.$updateDecorators=function(r){var i=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 n=(r.lastRow+1)*this.lineHeight;ng.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(b){b.priority=s[b.type]||null}),o=o.sort(e);for(var h=this.renderer.session.$foldData,f=0;fthis.canvasHeight&&($=this.canvasHeight-this.halfMinDecorationHeight),l=Math.round($-this.halfMinDecorationHeight),v=Math.round($+this.halfMinDecorationHeight)}t.fillStyle=i[o[f].type]||null,t.fillRect(0,d,this.canvasWidth,v-l)}}var w=this.renderer.session.selection.getCursor();if(w){var y=this.compensateFoldRows(w.row,h),d=Math.round((w.row-y)*this.lineHeight*this.heightRatio);t.fillStyle="rgba(0, 0, 0, 0.5)",t.fillRect(0,d,this.canvasWidth,2)}},u.prototype.compensateFoldRows=function(r,i){var n=0;if(i&&i.length>0)for(var t=0;ti[t].start.row&&r=i[t].end.row&&(n+=i[t].end.row-i[t].start.row);return n},u}();L.implement(a.prototype,A),k.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","ace/layer/text_util"],function(M,k,B){var R=M("./lib/oop"),L=M("./lib/dom"),A=M("./lib/lang"),a=M("./config"),u=M("./layer/gutter").Gutter,r=M("./layer/marker").Marker,i=M("./layer/text").Text,n=M("./layer/cursor").Cursor,t=M("./scrollbar").HScrollBar,e=M("./scrollbar").VScrollBar,o=M("./scrollbar_custom").HScrollBar,s=M("./scrollbar_custom").VScrollBar,h=M("./renderloop").RenderLoop,f=M("./layer/font_metrics").FontMetrics,x=M("./lib/event_emitter").EventEmitter,y=M("./css/editor-css"),d=M("./layer/decorators").Decorator,l=M("./lib/useragent"),v=M("./layer/text_util").isTextToken;L.importCssString(y,"ace_editor.css",!1);var C=function(){function $(w,b){var g=this;this.container=w||L.createElement("div"),L.addCssClass(this.container,"ace_editor"),L.HI_DPI&&L.addCssClass(this.container,"ace_hidpi"),this.setTheme(b),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 u(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new r(this.content);var p=this.$textLayer=new i(this.content);this.canvas=p.element,this.$markerFront=new r(this.content),this.$cursorLayer=new n(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(c){g.$scrollAnimation||g.session.setScrollTop(c.data-g.scrollMargin.top)}),this.scrollBarH.on("scroll",function(c){g.$scrollAnimation||g.session.setScrollLeft(c.data-g.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(c){g.updateCharacterSize(),g.onResize(!0,g.gutterWidth,g.$size.width,g.$size.height),g._signal("changeCharacterSize",c)}),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=!l.isIOS,this.$loop=new h(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 $.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")},$.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))},$.prototype.updateLines=function(w,b,g){if(b===void 0&&(b=1/0),this.$changedLines?(this.$changedLines.firstRow>w&&(this.$changedLines.firstRow=w),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},$.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},$.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},$.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},$.prototype.updateFull=function(w){w?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},$.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},$.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},$.prototype.onResize=function(w,b,g,p){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=w?1:0;var c=this.container;p||(p=c.clientHeight||c.scrollHeight),!p&&this.$maxLines&&this.lineHeight>1&&(!c.style.height||c.style.height=="0px")&&(c.style.height="1px",p=c.clientHeight||c.scrollHeight),g||(g=c.clientWidth||c.scrollWidth);var m=this.$updateCachedSize(w,b,g,p);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!g&&!p)return this.resizing=0;w&&(this.$gutterLayer.$padding=null),w?this.$renderChanges(m|this.$changes,!0):this.$loop.schedule(m|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},$.prototype.$updateCachedSize=function(w,b,g,p){p-=this.$extraHeight||0;var c=0,m=this.$size,S={width:m.width,height:m.height,scrollerHeight:m.scrollerHeight,scrollerWidth:m.scrollerWidth};if(p&&(w||m.height!=p)&&(m.height=p,c|=this.CHANGE_SIZE,m.scrollerHeight=m.height,this.$horizScroll&&(m.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(m.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",c=c|this.CHANGE_SCROLL),g&&(w||m.width!=g)){c|=this.CHANGE_SIZE,m.width=g,b==null&&(b=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=b,L.setStyle(this.scrollBarH.element.style,"left",b+"px"),L.setStyle(this.scroller.style,"left",b+this.margin.left+"px"),m.scrollerWidth=Math.max(0,g-b-this.scrollBarV.getWidth()-this.margin.h),L.setStyle(this.$gutter.style,"left",this.margin.left+"px");var T=this.scrollBarV.getWidth()+"px";L.setStyle(this.scrollBarH.element.style,"right",T),L.setStyle(this.scroller.style,"right",T),L.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(m.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||w)&&(c|=this.CHANGE_FULL)}return m.$dirty=!g||!p,c&&this._signal("resize",S),c},$.prototype.onGutterResize=function(w){var b=this.$showGutter?w:0;b!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,b,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()},$.prototype.adjustWrapLimit=function(){var w=this.$size.scrollerWidth-this.$padding*2,b=Math.floor(w/this.characterWidth);return this.session.adjustWrapLimit(b,this.$showPrintMargin&&this.$printMarginColumn)},$.prototype.setAnimatedScroll=function(w){this.setOption("animatedScroll",w)},$.prototype.getAnimatedScroll=function(){return this.$animatedScroll},$.prototype.setShowInvisibles=function(w){this.setOption("showInvisibles",w),this.session.$bidiHandler.setShowInvisibles(w)},$.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},$.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},$.prototype.setDisplayIndentGuides=function(w){this.setOption("displayIndentGuides",w)},$.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},$.prototype.setHighlightIndentGuides=function(w){this.setOption("highlightIndentGuides",w)},$.prototype.setShowPrintMargin=function(w){this.setOption("showPrintMargin",w)},$.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},$.prototype.setPrintMarginColumn=function(w){this.setOption("printMarginColumn",w)},$.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},$.prototype.getShowGutter=function(){return this.getOption("showGutter")},$.prototype.setShowGutter=function(w){return this.setOption("showGutter",w)},$.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},$.prototype.setFadeFoldWidgets=function(w){this.setOption("fadeFoldWidgets",w)},$.prototype.setHighlightGutterLine=function(w){this.setOption("highlightGutterLine",w)},$.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},$.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 b=this.$printMarginEl.style;b.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",b.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},$.prototype.getContainerElement=function(){return this.container},$.prototype.getMouseEventTarget=function(){return this.scroller},$.prototype.getTextAreaContainer=function(){return this.container},$.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var w=this.textarea.style,b=this.$composition;if(!this.$keepTextAreaAtCursor&&!b){L.translate(this.textarea,-100,0);return}var g=this.$cursorLayer.$pixelPos;if(g){b&&b.markerRange&&(g=this.$cursorLayer.getPixelPosition(b.markerRange.start,!0));var p=this.layerConfig,c=g.top,m=g.left;c-=p.offset;var S=b&&b.useTextareaForIME||l.isMobile?this.lineHeight:1;if(c<0||c>p.height-S){L.translate(this.textarea,0,0);return}var T=1,E=this.$size.height-S;if(!b)c+=this.lineHeight;else if(b.useTextareaForIME){var _=this.textarea.value;T=this.characterWidth*this.session.$getStringScreenWidth(_)[0]}else c+=this.lineHeight+2;m-=this.scrollLeft,m>this.$size.scrollerWidth-T&&(m=this.$size.scrollerWidth-T),m+=this.gutterWidth+this.margin.left,L.setStyle(w,"height",S+"px"),L.setStyle(w,"width",T+"px"),L.translate(this.textarea,Math.min(m,this.$size.scrollerWidth-T),Math.min(c,E))}}},$.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},$.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},$.prototype.getLastFullyVisibleRow=function(){var w=this.layerConfig,b=w.lastRow,g=this.session.documentToScreenRow(b,0)*w.lineHeight;return g-this.session.getScrollTop()>w.height-w.lineHeight?b-1:b},$.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},$.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()},$.prototype.setScrollMargin=function(w,b,g,p){var c=this.scrollMargin;c.top=w|0,c.bottom=b|0,c.right=p|0,c.left=g|0,c.v=c.top+c.bottom,c.h=c.left+c.right,c.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-c.top),this.updateFull()},$.prototype.setMargin=function(w,b,g,p){var c=this.margin;c.top=w|0,c.bottom=b|0,c.right=p|0,c.left=g|0,c.v=c.top+c.bottom,c.h=c.left+c.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},$.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},$.prototype.setHScrollBarAlwaysVisible=function(w){this.setOption("hScrollBarAlwaysVisible",w)},$.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},$.prototype.setVScrollBarAlwaysVisible=function(w){this.setOption("vScrollBarAlwaysVisible",w)},$.prototype.$updateScrollBarV=function(){var w=this.layerConfig.maxHeight,b=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(w-=(b-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>w-b&&(w=this.scrollTop+b,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(w+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},$.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},$.prototype.freeze=function(){this.$frozen=!0},$.prototype.unfreeze=function(){this.$frozen=!1},$.prototype.$renderChanges=function(w,b){if(this.$changes&&(w|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!w&&!b){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 g=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(),g.firstRow!=this.layerConfig.firstRow&&g.firstRowScreen==this.layerConfig.firstRowScreen){var p=this.scrollTop+(g.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;p>0&&(this.scrollTop=p,w=w|this.CHANGE_SCROLL,w|=this.$computeLayerConfig()|this.$loop.clear())}g=this.layerConfig,this.$updateScrollBarV(),w&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),L.translate(this.content,-this.scrollLeft,-g.offset);var c=g.width+2*this.$padding+"px",m=g.minHeight+"px";L.setStyle(this.content.style,"width",c),L.setStyle(this.content.style,"height",m)}if(w&this.CHANGE_H_SCROLL&&(L.translate(this.content,-this.scrollLeft,-g.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(g),this.$showGutter&&this.$gutterLayer.update(g),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(g),this.$markerBack.update(g),this.$markerFront.update(g),this.$cursorLayer.update(g),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(g):this.$textLayer.scrollLines(g),this.$showGutter&&(w&this.CHANGE_GUTTER||w&this.CHANGE_LINES?this.$gutterLayer.update(g):this.$gutterLayer.scrollLines(g)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(g),this.$markerBack.update(g),this.$markerFront.update(g),this.$cursorLayer.update(g),this.$moveTextAreaToCursor(),this._signal("afterRender",w);return}w&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(g),this.$showGutter&&this.$gutterLayer.update(g),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(g)):w&this.CHANGE_LINES?((this.$updateLines()||w&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(g),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(g)):w&this.CHANGE_TEXT||w&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(g),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(g)):w&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(g),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(g)),w&this.CHANGE_CURSOR&&(this.$cursorLayer.update(g),this.$moveTextAreaToCursor()),w&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(g),w&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(g),this._signal("afterRender",w)},$.prototype.$autosize=function(){var w=this.session.getScreenLength()*this.lineHeight,b=this.$maxLines*this.lineHeight,g=Math.min(b,Math.max((this.$minLines||1)*this.lineHeight,w))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(g+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&g>this.$maxPixelHeight&&(g=this.$maxPixelHeight);var p=g<=2*this.lineHeight,c=!p&&w>b;if(g!=this.desiredHeight||this.$size.height!=this.desiredHeight||c!=this.$vScroll){c!=this.$vScroll&&(this.$vScroll=c,this.scrollBarV.setVisible(c));var m=this.container.clientWidth;this.container.style.height=g+"px",this.$updateCachedSize(!0,this.$gutterWidth,m,g),this.desiredHeight=g,this._signal("autosize")}},$.prototype.$computeLayerConfig=function(){var w=this.session,b=this.$size,g=b.height<=2*this.lineHeight,p=this.session.getScreenLength(),c=p*this.lineHeight,m=this.$getLongestLine(),S=!g&&(this.$hScrollBarAlwaysVisible||b.scrollerWidth-m-2*this.$padding<0),T=this.$horizScroll!==S;T&&(this.$horizScroll=S,this.scrollBarH.setVisible(S));var E=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var _=b.scrollerHeight+this.lineHeight,I=!this.$maxLines&&this.$scrollPastEnd?(b.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;c+=I;var F=this.scrollMargin;this.session.setScrollTop(Math.max(-F.top,Math.min(this.scrollTop,c-b.scrollerHeight+F.bottom))),this.session.setScrollLeft(Math.max(-F.left,Math.min(this.scrollLeft,m+2*this.$padding-b.scrollerWidth+F.right)));var N=!g&&(this.$vScrollBarAlwaysVisible||b.scrollerHeight-c+I<0||this.scrollTop>F.top),D=E!==N;D&&(this.$vScroll=N,this.scrollBarV.setVisible(N));var O=this.scrollTop%this.lineHeight,W=Math.ceil(_/this.lineHeight)-1,H=Math.max(0,Math.round((this.scrollTop-O)/this.lineHeight)),P=H+W,U,V,G=this.lineHeight;H=w.screenToDocumentRow(H,0);var X=w.getFoldLine(H);X&&(H=X.start.row),U=w.documentToScreenRow(H,0),V=w.getRowLength(H)*G,P=Math.min(w.screenToDocumentRow(P,0),w.getLength()-1),_=b.scrollerHeight+w.getRowLength(P)*G+V,O=this.scrollTop-U*G;var Z=0;return(this.layerConfig.width!=m||T)&&(Z=this.CHANGE_H_SCROLL),(T||D)&&(Z|=this.$updateCachedSize(!0,this.gutterWidth,b.width,b.height),this._signal("scrollbarVisibilityChanged"),D&&(m=this.$getLongestLine())),this.layerConfig={width:m,padding:this.$padding,firstRow:H,firstRowScreen:U,lastRow:P,lineHeight:G,characterWidth:this.characterWidth,minHeight:_,maxHeight:c,offset:O,gutterOffset:G?Math.max(0,Math.ceil((O+b.height-b.scrollerHeight)/G)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(m-this.$padding),Z},$.prototype.$updateLines=function(){if(this.$changedLines){var w=this.$changedLines.firstRow,b=this.$changedLines.lastRow;this.$changedLines=null;var g=this.layerConfig;if(!(w>g.lastRow+1)&&!(bthis.$textLayer.MAX_LINE_LENGTH&&(w=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(w*this.characterWidth))},$.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},$.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},$.prototype.addGutterDecoration=function(w,b){this.$gutterLayer.addGutterDecoration(w,b)},$.prototype.removeGutterDecoration=function(w,b){this.$gutterLayer.removeGutterDecoration(w,b)},$.prototype.updateBreakpoints=function(w){this._rows=w,this.$loop.schedule(this.CHANGE_GUTTER)},$.prototype.setAnnotations=function(w){this.$gutterLayer.setAnnotations(w),this.$loop.schedule(this.CHANGE_GUTTER)},$.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},$.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},$.prototype.showCursor=function(){this.$cursorLayer.showCursor()},$.prototype.scrollSelectionIntoView=function(w,b,g){this.scrollCursorIntoView(w,g),this.scrollCursorIntoView(b,g)},$.prototype.scrollCursorIntoView=function(w,b,g){if(this.$size.scrollerHeight!==0){var p=this.$cursorLayer.getPixelPosition(w),c=p.left,m=p.top,S=g&&g.top||0,T=g&&g.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var E=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;E+S>m?(b&&E+S>m+this.lineHeight&&(m-=b*this.$size.scrollerHeight),m===0&&(m=-this.scrollMargin.top),this.session.setScrollTop(m)):E+this.$size.scrollerHeight-T=1-this.scrollMargin.top||b>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},$.prototype.pixelToScreenCoordinates=function(w,b){var g;if(this.$hasCssTransforms){g={top:0,left:0};var p=this.$fontMetrics.transformCoordinates([w,b]);w=p[1]-this.gutterWidth-this.margin.left,b=p[0]}else g=this.scroller.getBoundingClientRect();var c=w+this.scrollLeft-g.left-this.$padding,m=c/this.characterWidth,S=Math.floor((b+this.scrollTop-g.top)/this.lineHeight),T=this.$blockCursor?Math.floor(m):Math.round(m);return{row:S,column:T,side:m-T>0?1:-1,offsetX:c}},$.prototype.screenToTextCoordinates=function(w,b){var g;if(this.$hasCssTransforms){g={top:0,left:0};var p=this.$fontMetrics.transformCoordinates([w,b]);w=p[1]-this.gutterWidth-this.margin.left,b=p[0]}else g=this.scroller.getBoundingClientRect();var c=w+this.scrollLeft-g.left-this.$padding,m=c/this.characterWidth,S=this.$blockCursor?Math.floor(m):Math.round(m),T=Math.floor((b+this.scrollTop-g.top)/this.lineHeight);return this.session.screenToDocumentPosition(T,Math.max(S,0),c)},$.prototype.textToScreenCoordinates=function(w,b){var g=this.scroller.getBoundingClientRect(),p=this.session.documentToScreenPosition(w,b),c=this.$padding+(this.session.$bidiHandler.isBidiRow(p.row,w)?this.session.$bidiHandler.getPosLeft(p.column):Math.round(p.column*this.characterWidth)),m=p.row*this.lineHeight;return{pageX:g.left+c-this.scrollLeft,pageY:g.top+m-this.scrollTop}},$.prototype.visualizeFocus=function(){L.addCssClass(this.container,"ace_focus")},$.prototype.visualizeBlur=function(){L.removeCssClass(this.container,"ace_focus")},$.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")},$.prototype.setCompositionText=function(w){var b=this.session.selection.cursor;this.addToken(w,"composition_placeholder",b.row,b.column),this.$moveTextAreaToCursor()},$.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=""}},$.prototype.setGhostText=function(w,b){var g=this.session.selection.cursor,p=b||{row:g.row,column:g.column};this.removeGhostText();var c=this.$calculateWrappedTextChunks(w,p);this.addToken(c[0].text,"ghost_text",p.row,p.column),this.$ghostText={text:w,position:{row:p.row,column:p.column}};var m=L.createElement("div");if(c.length>1){var S=this.hideTokensAfterPosition(p.row,p.column),T;c.slice(1).forEach(function(D){var O=L.createElement("div"),W=L.createElement("span");W.className="ace_ghost_text",D.wrapped&&(O.className="ghost_text_line_wrapped"),D.text.length===0&&(D.text=" "),W.appendChild(L.createTextNode(D.text)),O.appendChild(W),m.appendChild(O),T=O}),S.forEach(function(D){var O=L.createElement("span");v(D.type)||(O.className="ace_"+D.type.replace(/\./g," ace_")),O.appendChild(L.createTextNode(D.value)),T.appendChild(O)}),this.$ghostTextWidget={el:m,row:p.row,column:p.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var E=this.$cursorLayer.getPixelPosition(p,!0),_=this.container,I=_.getBoundingClientRect().height,F=c.length*this.lineHeight,N=F0){var _=0;E.push(c[S].length);for(var I=0;I1||Math.abs(w.$size.height-p)>1?w.$resizeTimer.delay():w.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},$}();C.prototype.CHANGE_CURSOR=1,C.prototype.CHANGE_MARKER=2,C.prototype.CHANGE_GUTTER=4,C.prototype.CHANGE_SCROLL=8,C.prototype.CHANGE_LINES=16,C.prototype.CHANGE_TEXT=32,C.prototype.CHANGE_SIZE=64,C.prototype.CHANGE_MARKER_BACK=128,C.prototype.CHANGE_MARKER_FRONT=256,C.prototype.CHANGE_FULL=512,C.prototype.CHANGE_H_SCROLL=1024,C.prototype.$changes=0,C.prototype.$padding=null,C.prototype.$frozen=!1,C.prototype.STEPS=8,R.implement(C.prototype,x),a.defineOptions(C.prototype,"renderer",{useResizeObserver:{set:function($){!$&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):$&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function($){this.$textLayer.setShowInvisibles($)&&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($){typeof $=="number"&&(this.$printMarginColumn=$),this.$showPrintMargin=!!$,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function($){this.$gutter.style.display=$?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function($){this.$gutterLayer.$useSvgGutterIcons=$},initialValue:!1},showFoldedAnnotations:{set:function($){this.$gutterLayer.$showFoldedAnnotations=$},initialValue:!1},fadeFoldWidgets:{set:function($){L.setCssClass(this.$gutter,"ace_fade-fold-widgets",$)},initialValue:!1},showFoldWidgets:{set:function($){this.$gutterLayer.setShowFoldWidgets($),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function($){this.$textLayer.setDisplayIndentGuides($)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function($){this.$textLayer.setHighlightIndentGuides($)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function($){this.$gutterLayer.setHighlightGutterLine($),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function($){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function($){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function($){typeof $=="number"&&($=$+"px"),this.container.style.fontSize=$,this.updateFontSize()},initialValue:12},fontFamily:{set:function($){this.container.style.fontFamily=$,this.updateFontSize()}},maxLines:{set:function($){this.updateFull()}},minLines:{set:function($){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function($){this.updateFull()},initialValue:0},scrollPastEnd:{set:function($){$=+$||0,this.$scrollPastEnd!=$&&(this.$scrollPastEnd=$,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function($){this.$gutterLayer.$fixedWidth=!!$,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function($){this.$updateCustomScrollbar($)},initialValue:!1},theme:{set:function($){this.setTheme($)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!l.isMobile&&!l.isIE}}),k.VirtualRenderer=C}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(M,k,B){var R=M("../lib/oop"),L=M("../lib/net"),A=M("../lib/event_emitter").EventEmitter,a=M("../config");function u(t){var e="importScripts('"+L.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch(h){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=u(t),o=window.URL||window.webkitURL,s=o.createObjectURL(e);return new Worker(s)}return new Worker(t)}var i=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(){R.implement(this,A),this.$createWorkerFromOldConfig=function(t,e,o,s,h){if(M.nameToUrl&&!M.toUrl&&(M.toUrl=M.nameToUrl),a.get("packaged")||!M.toUrl)s=s||a.moduleUrl(e,"worker");else{var f=this.$normalizePath;s=s||f(M.toUrl("ace/worker/worker.js",null,"_"));var x={};t.forEach(function(y){x[y]=f(M.toUrl(y,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=r(s),h&&this.send("importScripts",h),this.$worker.postMessage({init:!0,tlns:x,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;break}},this.reportError=function(t){window.console},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){}},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(i.prototype);var n=function(t,e,o){var s=null,h=!1,f=Object.create(A),x=[],y=new i({messageBuffer:x,terminate:function(){},postMessage:function(l){x.push(l),s&&(h?setTimeout(d):d())}});y.setEmitSync=function(l){h=l};var d=function(){var l=x.shift();l.command?s[l.command].apply(s,l.args):l.event&&f._signal(l.event,l.data)};return f.postMessage=function(l){y.onMessage({data:l})},f.callback=function(l,v){this.postMessage({type:"call",id:v,data:l})},f.emit=function(l,v){this.postMessage({type:"event",name:l,data:v})},a.loadModule(["worker",e],function(l){for(s=new l[o](f);x.length;)d()}),y};k.UIWorkerClient=n,k.WorkerClient=i,k.createWorker=r}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(M,k,B){var R=M("./range").Range,L=M("./lib/event_emitter").EventEmitter,A=M("./lib/oop"),a=function(){function u(r,i,n,t,e,o){var s=this;this.length=i,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=n;var h=r.getUndoManager().$undoStack||r.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=h.length,this.setup(),r.selection.on("changeCursor",this.$onCursorChange)}return u.prototype.setup=function(){var r=this,i=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=i.createAnchor(this.$pos.row,this.$pos.column);var t=this.pos;t.$insertRight=!0,t.detach(),t.markerId=n.addMarker(new R(t.row,t.column,t.row,t.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var o=i.createAnchor(e.row,e.column);o.$insertRight=!0,o.detach(),r.others.push(o)}),n.setUndoSelect(!1)},u.prototype.showOtherMarkers=function(){if(!this.othersActive){var r=this.session,i=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=r.addMarker(new R(n.row,n.column,n.row,n.column+i.length),i.othersClass,null,!1)})}},u.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var r=0;r=this.pos.column&&i.start.column<=this.pos.column+this.length+1,e=i.start.column-this.pos.column;if(this.updateAnchors(r),t&&(this.length+=n),t&&!this.session.$fromUndo){if(r.action==="insert")for(var o=this.others.length-1;o>=0;o--){var s=this.others[o],h={row:s.row,column:s.column+e};this.doc.insertMergedLines(h,r.lines)}else if(r.action==="remove")for(var o=this.others.length-1;o>=0;o--){var s=this.others[o],h={row:s.row,column:s.column+e};this.doc.remove(new R(h.row,h.column,h.row,h.column-n))}}this.$updating=!1,this.updateMarkers()}},u.prototype.updateAnchors=function(r){this.pos.onChange(r);for(var i=this.others.length;i--;)this.others[i].onChange(r);this.updateMarkers()},u.prototype.updateMarkers=function(){if(!this.$updating){var r=this,i=this.session,n=function(e,o){i.removeMarker(e.markerId),e.markerId=i.addMarker(new R(e.row,e.column,e.row,e.column+r.length),o,null,!1)};n(this.pos,this.mainClass);for(var t=this.others.length;t--;)n(this.others[t],this.othersClass)}},u.prototype.onCursorChange=function(r){if(!(this.$updating||!this.session)){var i=this.session.selection.getCursor();i.row===this.pos.row&&i.column>=this.pos.column&&i.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",r)):(this.hideOtherMarkers(),this._emit("cursorLeave",r))}},u.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},u.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var r=this.session.getUndoManager(),i=(r.$undoStack||r.$undostack).length-this.$undoStackDepth,n=0;n1?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}],k.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 R=M("../keyboard/hash_handler").HashHandler;k.keyboardHandler=new R(k.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(M,k,B){var R=M("./range_list").RangeList,L=M("./range").Range,A=M("./selection").Selection,a=M("./mouse/multi_select_handler").onMouseDown,u=M("./lib/event"),r=M("./lib/lang"),i=M("./commands/multi_select_commands");k.commands=i.defaultCommands.concat(i.multiSelectCommands);var n=M("./search").Search,t=new n;function e(y,d,l){return t.$options.wrap=!0,t.$options.needle=d,t.$options.backwards=l==-1,t.find(y)}var o=M("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(o.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(y,d){if(y){if(!this.inMultiSelectMode&&this.rangeCount===0){var l=this.toOrientedRange();if(this.rangeList.add(l),this.rangeList.add(y),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),d||this.fromOrientedRange(y);this.rangeList.removeAll(),this.rangeList.add(l),this.$onAddRange(l)}y.cursor||(y.cursor=y.end);var v=this.rangeList.add(y);return this.$onAddRange(y),v.length&&this.$onRemoveRange(v),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),d||this.fromOrientedRange(y)}},this.toSingleRange=function(y){y=y||this.ranges[0];var d=this.rangeList.removeAll();d.length&&this.$onRemoveRange(d),y&&this.fromOrientedRange(y)},this.substractPoint=function(y){var d=this.rangeList.substractPoint(y);if(d)return this.$onRemoveRange(d),d[0]},this.mergeOverlappingRanges=function(){var y=this.rangeList.merge();y.length&&this.$onRemoveRange(y)},this.$onAddRange=function(y){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(y),this._signal("addRange",{range:y})},this.$onRemoveRange=function(y){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var d=this.rangeList.ranges.pop();y.push(d),this.rangeCount=0}for(var l=y.length;l--;){var v=this.ranges.indexOf(y[l]);this.ranges.splice(v,1)}this._signal("removeRange",{ranges:y}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),d=d||this.ranges[0],d&&!d.isEqual(this.getRange())&&this.fromOrientedRange(d)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new R,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var y=this.ranges.length?this.ranges:[this.getRange()],d=[],l=0;l1){var y=this.rangeList.ranges,d=y[y.length-1],l=L.fromPoints(y[0].start,d.end);this.toSingleRange(),this.setSelectionRange(l,d.cursor==d.start)}else{var v=this.session.documentToScreenPosition(this.cursor),C=this.session.documentToScreenPosition(this.anchor),$=this.rectangularRangeBlock(v,C);$.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(y,d,l){var v=[],C=y.column0;)_--;if(_>0)for(var I=0;v[I].isEmpty();)I++;for(var F=_;F>=I;F--)v[F].isEmpty()&&v.splice(F,1)}return v}}.call(A.prototype);var s=M("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(y){y.cursor||(y.cursor=y.end);var d=this.getSelectionStyle();return y.marker=this.session.addMarker(y,"ace_selection",d),this.session.$selectionMarkers.push(y),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,y},this.removeSelectionMarker=function(y){if(y.marker){this.session.removeMarker(y.marker);var d=this.session.$selectionMarkers.indexOf(y);d!=-1&&this.session.$selectionMarkers.splice(d,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(y){for(var d=this.session.$selectionMarkers,l=y.length;l--;){var v=y[l];if(v.marker){this.session.removeMarker(v.marker);var C=d.indexOf(v);C!=-1&&d.splice(C,1)}}this.session.selectionMarkerCount=d.length},this.$onAddRange=function(y){this.addSelectionMarker(y.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(y){this.removeSelectionMarkers(y.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(y){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(i.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(y){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(i.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(y){var d=y.command,l=y.editor;if(l.multiSelect){if(d.multiSelectAction)d.multiSelectAction=="forEach"?v=l.forEachSelection(d,y.args):d.multiSelectAction=="forEachLine"?v=l.forEachSelection(d,y.args,!0):d.multiSelectAction=="single"?(l.exitMultiSelectMode(),v=d.exec(l,y.args||{})):v=d.multiSelectAction(l,y.args||{});else{var v=d.exec(l,y.args||{});l.multiSelect.addRange(l.multiSelect.toOrientedRange()),l.multiSelect.mergeOverlappingRanges()}return v}},this.forEachSelection=function(y,d,l){if(!this.inVirtualSelectionMode){var v=l&&l.keepOrder,C=l==!0||l&&l.$byLines,$=this.session,w=this.selection,b=w.rangeList,g=(v?w:b).ranges,p;if(!g.length)return y.exec?y.exec(this,d||{}):y(this,d||{});var c=w._eventRegistry;w._eventRegistry={};var m=new A($);this.inVirtualSelectionMode=!0;for(var S=g.length;S--;){if(C)for(;S>0&&g[S].start.row==g[S-1].end.row;)S--;m.fromOrientedRange(g[S]),m.index=S,this.selection=$.selection=m;var T=y.exec?y.exec(this,d||{}):y(this,d||{});!p&&T!==void 0&&(p=T),m.toOrientedRange(g[S])}m.detach(),this.selection=$.selection=w,this.inVirtualSelectionMode=!1,w._eventRegistry=c,w.mergeOverlappingRanges(),w.ranges[0]&&w.fromOrientedRange(w.ranges[0]);var E=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),E&&E.from==E.to&&this.renderer.animateScrolling(E.from),p}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var y="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var d=this.multiSelect.rangeList.ranges,l=[],v=0;v0);w<0&&(w=0),b>=p&&(b=p-1)}var m=this.session.removeFullLines(w,b);m=this.$reAlignText(m,g),this.session.insert({row:w,column:0},m.join(` `)+` `),g||($.start.column=0,$.end.column=m[m.length-1].length),this.selection.setRange($)}else{C.forEach(function(_){d.substractPoint(_.cursor)});var S=0,T=1/0,E=l.map(function(_){var I=_.cursor,F=y.getLine(I.row),N=F.substr(I.column).search(/\S/g);return N==-1&&(N=0),I.column>S&&(S=I.column),ND?y.insert(F,r.stringRepeat(" ",N-D)):y.remove(new L(F.row,F.column,F.row,F.column-N+D)),_.start.column=_.end.column=S,_.start.row=_.end.row=F.row,_.cursor=_.end}),d.fromOrientedRange(l[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(y,d){var l=!0,v=!0,C,$,w;return y.map(function(m){var S=m.match(/(\s*)(.*?)(\s*)([=:].*)/);return S?C==null?(C=S[1].length,$=S[2].length,w=S[3].length,S):(C+$+w!=S[1].length+S[2].length+S[3].length&&(v=!1),C!=S[1].length&&(l=!1),C>S[1].length&&(C=S[1].length),$S[3].length&&(w=S[3].length),S):[m]}).map(d?g:l?v?p:g:c);function b(m){return r.stringRepeat(" ",m)}function g(m){return m[2]?b(C)+m[2]+b($-m[2].length+w)+m[4].replace(/^([=:])\s+/,"$1 "):m[0]}function p(m){return m[2]?b(C+$-m[2].length)+m[2]+b(w)+m[4].replace(/^([=:])\s+/,"$1 "):m[0]}function c(m){return m[2]?b(C)+m[2]+b(w)+m[4].replace(/^([=:])\s+/,"$1 "):m[0]}}}).call(s.prototype);function h(y,d){return y.row==d.row&&y.column==d.column}k.onSessionChange=function(y){var d=y.session;d&&!d.multiSelect&&(d.$selectionMarkers=[],d.selection.$initRangeList(),d.multiSelect=d.selection),this.multiSelect=d&&d.multiSelect;var l=y.oldSession;l&&(l.multiSelect.off("addRange",this.$onAddRange),l.multiSelect.off("removeRange",this.$onRemoveRange),l.multiSelect.off("multiSelect",this.$onMultiSelect),l.multiSelect.off("singleSelect",this.$onSingleSelect),l.multiSelect.lead.off("change",this.$checkMultiselectChange),l.multiSelect.anchor.off("change",this.$checkMultiselectChange)),d&&(d.multiSelect.on("addRange",this.$onAddRange),d.multiSelect.on("removeRange",this.$onRemoveRange),d.multiSelect.on("multiSelect",this.$onMultiSelect),d.multiSelect.on("singleSelect",this.$onSingleSelect),d.multiSelect.lead.on("change",this.$checkMultiselectChange),d.multiSelect.anchor.on("change",this.$checkMultiselectChange)),d&&this.inMultiSelectMode!=d.selection.inMultiSelectMode&&(d.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function f(y){y.$multiselectOnSessionChange||(y.$onAddRange=y.$onAddRange.bind(y),y.$onRemoveRange=y.$onRemoveRange.bind(y),y.$onMultiSelect=y.$onMultiSelect.bind(y),y.$onSingleSelect=y.$onSingleSelect.bind(y),y.$multiselectOnSessionChange=k.onSessionChange.bind(y),y.$checkMultiselectChange=y.$checkMultiselectChange.bind(y),y.$multiselectOnSessionChange(y),y.on("changeSession",y.$multiselectOnSessionChange),y.on("mousedown",a),y.commands.addCommands(i.defaultCommands),x(y))}function x(y){if(!y.textInput)return;var d=y.textInput.getElement(),l=!1;u.addListener(d,"keydown",function(C){var $=C.keyCode==18&&!(C.ctrlKey||C.shiftKey||C.metaKey);y.$blockSelectEnabled&&$?l||(y.renderer.setMouseCursor("crosshair"),l=!0):l&&v()},y),u.addListener(d,"keyup",v,y),u.addListener(d,"blur",v,y);function v(C){l&&(y.renderer.setMouseCursor(""),l=!1)}}k.MultiSelect=f,M("./config").defineOptions(s.prototype,"editor",{enableMultiselect:{set:function(y){f(this),y?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(y){this.$blockSelectEnabled=y},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(M,k,B){var R=M("../../range").Range,L=k.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(A,a,u){var r=A.getLine(u);return this.foldingStartMarker.test(r)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(A,a,u){return null},this.indentationBlock=function(A,a,u){var r=/\S/,i=A.getLine(a),n=i.search(r);if(n!=-1){for(var t=u||i.length,e=A.getLength(),o=a,s=a;++ao){var x=A.getLine(s).length;return new R(o,t,s,x)}}},this.openingBracketBlock=function(A,a,u,r,i){var n={row:u,column:r+1},t=A.$findClosingBracket(a,n,i);if(t){var e=A.foldWidgets[t.row];return e==null&&(e=A.getFoldWidget(t.row)),e=="start"&&t.row>n.row&&(t.row--,t.column=A.getLine(t.row).length),R.fromPoints(n,t)}},this.closingBracketBlock=function(A,a,u,r,i){var n={row:u,column:r},t=A.$findOpeningBracket(a,n);if(t)return t.column++,n.column--,R.fromPoints(t,n)}}).call(L.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(M,k,B){var R=M("../line_widgets").LineWidgets,L=M("../lib/dom"),A=M("../range").Range,a=M("../config").nls;function u(i,n,t){for(var e=0,o=i.length-1;e<=o;){var s=e+o>>1,h=t(n,i[s]);if(h>0)e=s+1;else if(h<0)o=s-1;else return s}return-(e+1)}function r(i,n,t){var e=i.getAnnotations().sort(A.comparePoints);if(e.length){var o=u(e,{row:n,column:-1},A.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===n){do s=e[o+=t];while(s&&s.row===n);if(!s)return e.slice()}var h=[];n=s.row;do h[t<0?"unshift":"push"](s),s=e[o+=t];while(s&&s.row==n);return h.length&&h}}}k.showErrorMarker=function(i,n){var t=i.session;t.widgetManager||(t.widgetManager=new R(t),t.widgetManager.attach(i));var e=i.getCursorPosition(),o=e.row,s=t.widgetManager.getWidgetsAtRow(o).filter(function($){return $.type=="errorMarker"})[0];s?s.destroy():o-=n;var h=r(t,o,n),f;if(h){var x=h[0];e.column=(x.pos&&typeof x.column!="number"?x.pos.sc:x.column)||0,e.row=x.row,f=i.renderer.$gutterLayer.$annotations[e.row]}else{if(s)return;f={displayText:[a("error-marker.good-state","Looks good!")],className:"ace_ok"}}i.session.unfold(e.row),i.selection.moveToPosition(e);var y={row:e.row,fixedWidth:!0,coverGutter:!0,el:L.createElement("div"),type:"errorMarker"},d=y.el.appendChild(L.createElement("div")),l=y.el.appendChild(L.createElement("div"));l.className="error_widget_arrow "+f.className;var v=i.renderer.$cursorLayer.getPixelPosition(e).left;l.style.left=v+i.renderer.gutterWidth-5+"px",y.el.className="error_widget_wrapper",d.className="error_widget "+f.className,f.displayText.forEach(function($,w){d.appendChild(L.createTextNode($)),w{if(this._isSettingContent)return;const ee=Y.getValue();this._contentBackup=ee,this.$emit("update:value",ee)}),Ae.forEach(ee=>{const M="on"+Be(ee);typeof this.$.vnode.props[M]=="function"&&Y.on(ee,this.$emit.bind(this,ee))}),this._ro=new De(()=>Y.resize()),this._ro.observe(this.$el),this.$emit("init",Y)},beforeUnmount(){var Y,ee;(Y=this._ro)===null||Y===void 0||Y.disconnect(),(ee=this._editor)===null||ee===void 0||ee.destroy()},methods:{focus(){this._editor.focus()},blur(){this._editor.blur()},selectAll(){this._editor.selectAll()},getAceInstance(){return this._editor}},watch:{value(Y){if(this._contentBackup!==Y){try{this._isSettingContent=!0,this._editor.setValue(Y,1)}finally{this._isSettingContent=!1}this._contentBackup=Y}},theme(Y){this._editor.setTheme("ace/theme/"+Y)},options(Y){this._editor.setOptions(Y)},readonly(Y){this._editor.setReadOnly(Y)},placeholder(Y){this._editor.setOption("placeholder",Y)},wrap(Y){this._editor.setWrapBehavioursEnabled(Y)},printMargin(Y){this._editor.setOption("printMargin",Y)},lang(Y){this._editor.setOption("mode","ace/mode/"+Y)},minLines(Y){this._editor.setOption("minLines",Y)},maxLines(Y){this._editor.setOption("maxLines",Y)}}});var Xe={exports:{}};(function(Y,ee){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(M,k,B){var R=M("../lib/oop"),L=M("./text_highlight_rules").TextHighlightRules,A=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};R.inherits(A,L),k.JsonHighlightRules=A}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(M,k,B){var R=M("../range").Range,L=function(){};(function(){this.checkOutdent=function(A,a){return/^\s+$/.test(A)?/^\s*\}/.test(a):!1},this.autoOutdent=function(A,a){var u=A.getLine(a),r=u.match(/^(\s*\})/);if(!r)return 0;var i=r[1].length,n=A.findMatchingBracket({row:a,column:i});if(!n||n.row==a)return 0;var t=this.$getIndent(A.getLine(n.row));A.replace(new R(a,0,a,i-1),t)},this.$getIndent=function(A){return A.match(/^\s*/)[0]}}).call(L.prototype),k.MatchingBraceOutdent=L}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(M,k,B){var R=M("../../lib/oop"),L=M("../../range").Range,A=M("./fold_mode").FoldMode,a=k.FoldMode=function(u){u&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+u.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+u.end)))};R.inherits(a,A),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(u,r,i){var n=u.getLine(i);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var t=this._getFoldWidgetBase(u,r,i);return!t&&this.startRegionRe.test(n)?"start":t},this.getFoldWidgetRange=function(u,r,i,n){var t=u.getLine(i);if(this.startRegionRe.test(t))return this.getCommentRegionBlock(u,t,i);var s=t.match(this.foldingStartMarker);if(s){var e=s.index;if(s[1])return this.openingBracketBlock(u,s[1],i,e);var o=u.getCommentFoldRange(i,e+s[0].length,1);return o&&!o.isMultiLine()&&(n?o=this.getSectionRange(u,i):r!="all"&&(o=null)),o}if(r!=="markbegin"){var s=t.match(this.foldingStopMarker);if(s){var e=s.index+s[0].length;return s[1]?this.closingBracketBlock(u,s[1],i,e):u.getCommentFoldRange(i,e,-1)}}},this.getSectionRange=function(u,r){var i=u.getLine(r),n=i.search(/\S/),t=r,e=i.length;r=r+1;for(var o=r,s=u.getLength();++rh)break;var f=this.getFoldWidgetRange(u,"all",r);if(f){if(f.start.row<=t)break;if(f.isMultiLine())r=f.end.row;else if(n==h)break}o=r}}return new L(t,e,o,u.getLine(o).length)},this.getCommentRegionBlock=function(u,r,i){for(var n=r.search(/\s*$/),t=u.getLength(),e=i,o=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,s=1;++ie)return new L(e,n,f,r.length)}}.call(a.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(M,k,B){var R=M("../lib/oop"),L=M("./text").Mode,A=M("./json_highlight_rules").JsonHighlightRules,a=M("./matching_brace_outdent").MatchingBraceOutdent,u=M("./folding/cstyle").FoldMode,r=M("../worker/worker_client").WorkerClient,i=function(){this.HighlightRules=A,this.$outdent=new a,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new u};R.inherits(i,L),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(n,t,e){var o=this.$getIndent(t);if(n=="start"){var s=t.match(/^.*[\{\(\[]\s*$/);s&&(o+=e)}return o},this.checkOutdent=function(n,t,e){return this.$outdent.checkOutdent(t,e)},this.autoOutdent=function(n,t,e){this.$outdent.autoOutdent(t,e)},this.createWorker=function(n){var t=new r(["ace"],"ace/mode/json_worker","JsonWorker");return t.attachToDocument(n.getDocument()),t.on("annotate",function(e){n.setAnnotations(e.data)}),t.on("terminate",function(){n.clearAnnotations()}),t},this.$id="ace/mode/json"}.call(i.prototype),k.Mode=i}),function(){ace.require(["ace/mode/json"],function(M){Y&&(Y.exports=M)})}()})(Xe);var Qe={exports:{}};(function(Y,ee){ace.define("ace/theme/chrome-css",["require","exports","module"],function(M,k,B){B.exports=`.ace-chrome .ace_gutter { background: #ebebeb; color: #333; overflow : hidden; } .ace-chrome .ace_print-margin { width: 1px; background: #e8e8e8; } .ace-chrome { background-color: #FFFFFF; color: black; } .ace-chrome .ace_cursor { color: black; } .ace-chrome .ace_invisible { color: rgb(191, 191, 191); } .ace-chrome .ace_constant.ace_buildin { color: rgb(88, 72, 246); } .ace-chrome .ace_constant.ace_language { color: rgb(88, 92, 246); } .ace-chrome .ace_constant.ace_library { color: rgb(6, 150, 14); } .ace-chrome .ace_invalid { background-color: rgb(153, 0, 0); color: white; } .ace-chrome .ace_fold { } .ace-chrome .ace_support.ace_function { color: rgb(60, 76, 114); } .ace-chrome .ace_support.ace_constant { color: rgb(6, 150, 14); } .ace-chrome .ace_support.ace_type, .ace-chrome .ace_support.ace_class .ace-chrome .ace_support.ace_other { color: rgb(109, 121, 222); } .ace-chrome .ace_variable.ace_parameter { font-style:italic; color:#FD971F; } .ace-chrome .ace_keyword.ace_operator { color: rgb(104, 118, 135); } .ace-chrome .ace_comment { color: #236e24; } .ace-chrome .ace_comment.ace_doc { color: #236e24; } .ace-chrome .ace_comment.ace_doc.ace_tag { color: #236e24; } .ace-chrome .ace_constant.ace_numeric { color: rgb(0, 0, 205); } .ace-chrome .ace_variable { color: rgb(49, 132, 149); } .ace-chrome .ace_xml-pe { color: rgb(104, 104, 91); } .ace-chrome .ace_entity.ace_name.ace_function { color: #0000A2; } .ace-chrome .ace_heading { color: rgb(12, 7, 255); } .ace-chrome .ace_list { color:rgb(185, 6, 144); } .ace-chrome .ace_marker-layer .ace_selection { background: rgb(181, 213, 255); } .ace-chrome .ace_marker-layer .ace_step { background: rgb(252, 255, 0); } .ace-chrome .ace_marker-layer .ace_stack { background: rgb(164, 229, 101); } .ace-chrome .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192); } .ace-chrome .ace_marker-layer .ace_active-line { background: rgba(0, 0, 0, 0.07); } .ace-chrome .ace_gutter-active-line { background-color : #dcdcdc; } .ace-chrome .ace_marker-layer .ace_selected-word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250); } .ace-chrome .ace_storage, .ace-chrome .ace_keyword, .ace-chrome .ace_meta.ace_tag { color: rgb(147, 15, 128); } .ace-chrome .ace_string.ace_regex { color: rgb(255, 0, 0) } .ace-chrome .ace_string { color: #1A1AA6; } .ace-chrome .ace_entity.ace_other.ace_attribute-name { color: #994409; } .ace-chrome .ace_indent-guide { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y; } .ace-chrome .ace_indent-guide-active { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y; } `}),ace.define("ace/theme/chrome",["require","exports","module","ace/theme/chrome-css","ace/lib/dom"],function(M,k,B){k.isDark=!1,k.cssClass="ace-chrome",k.cssText=M("./chrome-css");var R=M("../lib/dom");R.importCssString(k.cssText,k.cssClass,!1)}),function(){ace.require(["ace/theme/chrome"],function(M){Y&&(Y.exports=M)})}()})(Qe);var Ze={exports:{}};(function(Y,ee){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(M,k,B){var R=M("./lib/dom"),L=M("./lib/oop"),A=M("./lib/event_emitter").EventEmitter,a=M("./lib/lang"),u=M("./range").Range,r=M("./range_list").RangeList,i=M("./keyboard/hash_handler").HashHandler,n=M("./tokenizer").Tokenizer,t=M("./clipboard"),e={CURRENT_WORD:function(l){return l.session.getTextRange(l.session.getWordRange())},SELECTION:function(l,v,C){var $=l.session.getTextRange();return C?$.replace(/\n\r?([ \t]*\S)/g,` `+C+"$1"):$},CURRENT_LINE:function(l){return l.session.getLine(l.getCursorPosition().row)},PREV_LINE:function(l){return l.session.getLine(l.getCursorPosition().row-1)},LINE_INDEX:function(l){return l.getCursorPosition().row},LINE_NUMBER:function(l){return l.getCursorPosition().row+1},SOFT_TABS:function(l){return l.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(l){return l.session.getTabSize()},CLIPBOARD:function(l){return t.getText&&t.getText()},FILENAME:function(l){return/[^/\\]*$/.exec(this.FILEPATH(l))[0]},FILENAME_BASE:function(l){return/[^/\\]*$/.exec(this.FILEPATH(l))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(l){return this.FILEPATH(l).replace(/[^/\\]*$/,"")},FILEPATH:function(l){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(l){var v=l.session.$mode||{};return v.blockComment&&v.blockComment.start||""},BLOCK_COMMENT_END:function(l){var v=l.session.$mode||{};return v.blockComment&&v.blockComment.end||""},LINE_COMMENT:function(l){var v=l.session.$mode||{};return v.lineCommentStart||""},CURRENT_YEAR:o.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:o.bind(null,{year:"2-digit"}),CURRENT_MONTH:o.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:o.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:o.bind(null,{month:"short"}),CURRENT_DATE:o.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:o.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:o.bind(null,{weekday:"short"}),CURRENT_HOUR:o.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:o.bind(null,{minute:"2-digit"}),CURRENT_SECOND:o.bind(null,{second:"2-digit"})};e.SELECTED_TEXT=e.SELECTION;function o(l){var v=new Date().toLocaleString("en-us",l);return v.length==1?"0"+v:v}var s=function(){function l(){this.snippetMap={},this.snippetNameMap={},this.variables=e}return l.prototype.getTokenizer=function(){return l.$tokenizer||this.createTokenizer()},l.prototype.createTokenizer=function(){function v(w){return w=w.substr(1),/^\d+$/.test(w)?[{tabstopId:parseInt(w,10)}]:[{text:w}]}function C(w){return"(?:[^\\\\"+w+"]|\\\\.)"}var $={regex:"/("+C("/")+"+)/",onMatch:function(w,b,g){var p=g[0];return p.fmtString=!0,p.guard=w.slice(1,-1),p.flag="",""},next:"formatString"};return l.$tokenizer=new n({start:[{regex:/\\./,onMatch:function(w,b,g){var p=w[1];return(p=="}"&&g.length||"`$\\".indexOf(p)!=-1)&&(w=p),[w]}},{regex:/}/,onMatch:function(w,b,g){return[g.length?g.shift():w]}},{regex:/\$(?:\d+|\w+)/,onMatch:v},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(w,b,g){var p=v(w.substr(1));return g.unshift(p[0]),p},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+C("\\|")+"*\\|",onMatch:function(w,b,g){var p=w.slice(1,-1).replace(/\\[,|\\]|,/g,function(c){return c.length==2?c[1]:"\0"}).split("\0").map(function(c){return{value:c}});return g[0].choices=p,[p[0]]},next:"start"},$,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(w,b,g){return g.length&&g[0].expectElse?(g[0].expectElse=!1,g[0].ifEnd={elseEnd:g[0]},[g[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(w,b,g){var p=w[1];return p=="}"&&g.length||"`$\\".indexOf(p)!=-1?w=p:p=="n"?w=` `:p=="t"?w=" ":"ulULE".indexOf(p)!=-1&&(w={changeCase:p,local:p>"a"}),[w]}},{regex:"/\\w*}",onMatch:function(w,b,g){var p=g.shift();return p&&(p.flag=w.slice(1,-1)),this.next=p&&p.tabstopId?"start":"",[p||w]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(w,b,g){return[{text:w.slice(1)}]}},{regex:/\${\w+/,onMatch:function(w,b,g){var p={text:w.slice(2)};return g.unshift(p),[p]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(w,b,g){var p=g.shift();return this.next=p&&p.tabstopId?"start":"",[p||w]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(w,b,g){var p=g[0];return p.formatFunction=w.slice(2,-1),[g.shift()]},next:"formatString"},$,{regex:/:[\?\-+]?/,onMatch:function(w,b,g){w[1]=="+"&&(g[0].ifEnd=g[0]),w[1]=="?"&&(g[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),l.$tokenizer},l.prototype.tokenizeTmSnippet=function(v,C){return this.getTokenizer().getLineTokens(v,C).tokens.map(function($){return $.value||$})},l.prototype.getVariableValue=function(v,C,$){if(/^\d+$/.test(C))return(this.variables.__||{})[C]||"";if(/^[A-Z]\d+$/.test(C))return(this.variables[C[0]+"__"]||{})[C.substr(1)]||"";if(C=C.replace(/^TM_/,""),!this.variables.hasOwnProperty(C))return"";var w=this.variables[C];return typeof w=="function"&&(w=this.variables[C](v,C,$)),w==null?"":w},l.prototype.tmStrFormat=function(v,C,$){if(!C.fmt)return v;var w=C.flag||"",b=C.guard;b=new RegExp(b,w.replace(/[^gim]/g,""));var g=typeof C.fmt=="string"?this.tokenizeTmSnippet(C.fmt,"formatString"):C.fmt,p=this,c=v.replace(b,function(){var m=p.variables.__;p.variables.__=[].slice.call(arguments);for(var S=p.resolveVariables(g,$),T="E",E=0;E=0&&c.splice(m,1)}}v.content?b(v):Array.isArray(v)&&v.forEach(b)},l.prototype.parseSnippetFile=function(v){v=v.replace(/\r/g,"");for(var C=[],$={},w=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,b;b=w.exec(v);){if(b[1])try{$=JSON.parse(b[1]),C.push($)}catch(m){}if(b[4])$.content=b[4].replace(/^\t/gm,""),C.push($),$={};else{var g=b[2],p=b[3];if(g=="regex"){var c=/\/((?:[^\/\\]|\\.)*)|$/g;$.guard=c.exec(p)[1],$.trigger=c.exec(p)[1],$.endTrigger=c.exec(p)[1],$.endGuard=c.exec(p)[1]}else g=="snippet"?($.tabTrigger=p.match(/^\S*/)[0],$.name||($.name=p)):g&&($[g]=p)}}return C},l.prototype.getSnippetByName=function(v,C){var $=this.snippetNameMap,w;return this.getActiveScopes(C).some(function(b){var g=$[b];return g&&(w=g[v]),!!w},this),w},l}();L.implement(s.prototype,A);var h=function(l,v,C){C===void 0&&(C={});var $=l.getCursorPosition(),w=l.session.getLine($.row),b=l.session.getTabString(),g=w.match(/^\s*/)[0];$.column1?(O=P[P.length-1].length,D+=P.length-1):O+=H.length,W+=H}else H&&(H.start?H.end={row:D,column:O}:H.start={row:D,column:O})}),{text:W,tabstops:c,tokens:p}},f=function(){function l(v){if(this.index=0,this.ranges=[],this.tabstops=[],v.tabstopManager)return v.tabstopManager;v.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=a.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(v)}return l.prototype.attach=function(v){this.$openTabstops=null,this.selectedTabstop=null,this.editor=v,this.session=v.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},l.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},l.prototype.onChange=function(v){for(var C=v.action[0]=="r",$=this.selectedTabstop||{},w=$.parents||{},b=this.tabstops.slice(),g=0;g2&&(this.tabstops.length&&p.push(p.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,p))},l.prototype.addTabstopMarkers=function(v){var C=this.session;v.forEach(function($){$.markerId||($.markerId=C.addMarker($,"ace_snippet-marker","text"))})},l.prototype.removeTabstopMarkers=function(v){var C=this.session;v.forEach(function($){C.removeMarker($.markerId),$.markerId=null})},l.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var v=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&v--,this.tabstops.forEach(function(C){C.snippetId===v?this.addTabstopMarkers(C):this.removeTabstopMarkers(C)},this)}},l.prototype.removeRange=function(v){var C=v.tabstop.indexOf(v);C!=-1&&v.tabstop.splice(C,1),C=this.ranges.indexOf(v),C!=-1&&this.ranges.splice(C,1),C=v.tabstop.rangeList.ranges.indexOf(v),C!=-1&&v.tabstop.splice(C,1),this.session.removeMarker(v.markerId),v.tabstop.length||(C=this.tabstops.indexOf(v.tabstop),C!=-1&&this.tabstops.splice(C,1),this.tabstops.length||this.detach())},l}();f.prototype.keyboardHandler=new i,f.prototype.keyboardHandler.bindKeys({Tab:function(l){k.snippetManager&&k.snippetManager.expandWithTab(l)||(l.tabstopManager.tabNext(1),l.renderer.scrollCursorIntoView())},"Shift-Tab":function(l){l.tabstopManager.tabNext(-1),l.renderer.scrollCursorIntoView()},Esc:function(l){l.tabstopManager.detach()}});var x=function(l,v){l.row==0&&(l.column+=v.column),l.row+=v.row},y=function(l,v){l.row==v.row&&(l.column-=v.column),l.row-=v.row};R.importCssString(` .ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute; }`,"snippets.css",!1),k.snippetManager=new s;var d=M("./editor").Editor;(function(){this.insertSnippet=function(l,v){return k.snippetManager.insertSnippet(this,l,v)},this.expandSnippet=function(l){return k.snippetManager.expandWithTab(this,l)}}).call(d.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config","ace/lib/useragent"],function(M,k,B){var R=M("../virtual_renderer").VirtualRenderer,L=M("../editor").Editor,A=M("../range").Range,a=M("../lib/event"),u=M("../lib/lang"),r=M("../lib/dom"),i=M("../config").nls,n=M("./../lib/useragent"),t=function(x){return"suggest-aria-id:".concat(x)},e=n.isSafari?"menu":"listbox",o=n.isSafari?"menuitem":"option",s=n.isSafari?"aria-current":"aria-selected",h=function(x){var y=new R(x);y.$maxLines=4;var d=new L(y);return d.setHighlightActiveLine(!1),d.setShowPrintMargin(!1),d.renderer.setShowGutter(!1),d.renderer.setHighlightGutterLine(!1),d.$mouseHandler.$focusTimeout=0,d.$highlightTagPending=!0,d},f=function(){function x(y){var d=r.createElement("div"),l=h(d);y&&y.appendChild(d),d.style.display="none",l.renderer.content.style.cursor="default",l.renderer.setStyle("ace_autocomplete"),l.renderer.$textLayer.element.setAttribute("role",e),l.renderer.$textLayer.element.setAttribute("aria-roledescription",i("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),l.renderer.$textLayer.element.setAttribute("aria-label",i("autocomplete.popup.aria-label","Autocomplete suggestions")),l.renderer.textarea.setAttribute("aria-hidden","true"),l.setOption("displayIndentGuides",!1),l.setOption("dragDelay",150);var v=function(){};l.focus=v,l.$isFocused=!0,l.renderer.$cursorLayer.restartTimer=v,l.renderer.$cursorLayer.element.style.opacity="0",l.renderer.$maxLines=8,l.renderer.$keepTextAreaAtCursor=!1,l.setHighlightActiveLine(!1),l.session.highlight(""),l.session.$searchHighlight.clazz="ace_highlight-marker",l.on("mousedown",function(c){var m=c.getDocumentPosition();l.selection.moveToPosition(m),w.start.row=w.end.row=m.row,c.stop()});var C,$=new A(-1,0,-1,1/0),w=new A(-1,0,-1,1/0);w.id=l.session.addMarker(w,"ace_active-line","fullLine"),l.setSelectOnHover=function(c){c?$.id&&(l.session.removeMarker($.id),$.id=null):$.id=l.session.addMarker($,"ace_line-hover","fullLine")},l.setSelectOnHover(!1),l.on("mousemove",function(c){if(!C){C=c;return}if(!(C.x==c.x&&C.y==c.y)){C=c,C.scrollTop=l.renderer.scrollTop,l.isMouseOver=!0;var m=C.getDocumentPosition().row;$.start.row!=m&&($.id||l.setRow(m),g(m))}}),l.renderer.on("beforeRender",function(){if(C&&$.start.row!=-1){C.$pos=null;var c=C.getDocumentPosition().row;$.id||l.setRow(c),g(c,!0)}}),l.renderer.on("afterRender",function(){var c=l.getRow(),m=l.renderer.$textLayer,S=m.element.childNodes[c-m.config.firstRow],T=document.activeElement;if(S!==l.selectedNode&&l.selectedNode&&(r.removeCssClass(l.selectedNode,"ace_selected"),T.removeAttribute("aria-activedescendant"),l.selectedNode.removeAttribute(s),l.selectedNode.removeAttribute("id")),l.selectedNode=S,S){r.addCssClass(S,"ace_selected");var E=t(c);S.id=E,m.element.setAttribute("aria-activedescendant",E),T.setAttribute("aria-activedescendant",E),S.setAttribute("role",o),S.setAttribute("aria-roledescription",i("autocomplete.popup.item.aria-roledescription","item")),S.setAttribute("aria-label",l.getData(c).caption||l.getData(c).value),S.setAttribute("aria-setsize",l.data.length),S.setAttribute("aria-posinset",c+1),S.setAttribute("aria-describedby","doc-tooltip"),S.setAttribute(s,"true")}});var b=function(){g(-1)},g=function(c,m){c!==$.start.row&&($.start.row=$.end.row=c,m||l.session._emit("changeBackMarker"),l._emit("changeHoverMarker"))};l.getHoveredRow=function(){return $.start.row},a.addListener(l.container,"mouseout",function(){l.isMouseOver=!1,b()}),l.on("hide",b),l.on("changeSelection",b),l.session.doc.getLength=function(){return l.data.length},l.session.doc.getLine=function(c){var m=l.data[c];return typeof m=="string"?m:m&&m.value||""};var p=l.session.bgTokenizer;return p.$tokenizeRow=function(c){var m=l.data[c],S=[];if(!m)return S;typeof m=="string"&&(m={value:m});var T=m.caption||m.value||m.name;function E(H,P){H&&S.push({type:(m.className||"")+(P||""),value:H})}for(var _=T.toLowerCase(),I=(l.filterText||"").toLowerCase(),F=0,N=0,D=0;D<=I.length;D++)if(D!=N&&(m.matchMask&1<=N?S="bottom":S="top"),S==="top"?(D.bottom=c.top-this.$borderSize,D.top=D.bottom-N):S==="bottom"&&(D.top=c.top+m+this.$borderSize,D.bottom=D.top+N);var H=D.top>=0&&D.bottom<=_;if(!T&&!H)return!1;H?F.$maxPixelHeight=null:S==="top"?F.$maxPixelHeight=W:F.$maxPixelHeight=O,S==="top"?(E.style.top="",E.style.bottom=_-D.bottom+"px",l.isTopdown=!1):(E.style.top=D.top+"px",E.style.bottom="",l.isTopdown=!0),E.style.display="";var P=c.left;return P+E.offsetWidth>I&&(P=I-E.offsetWidth),E.style.left=P+"px",E.style.right="",l.isOpen||(l.isOpen=!0,this._signal("show"),C=null),l.anchorPos=c,l.anchor=S,!0},l.show=function(c,m,S){this.tryShow(c,m,S?"bottom":void 0,!0)},l.goTo=function(c){var m=this.getRow(),S=this.session.getLength()-1;switch(c){case"up":m=m<=0?S:m-1;break;case"down":m=m>=S?-1:m+1;break;case"start":m=0;break;case"end":m=S;break}this.setRow(m)},l.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},l.$imageSize=0,l.$borderSize=1,l}return x}();r.importCssString(` .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1; } .ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #3a674e; } .ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid #abbffe; margin-top: -1px; background: rgba(233,233,253,0.4); position: absolute; z-index: 2; } .ace_dark.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid rgba(109, 150, 13, 0.8); background: rgba(58, 103, 78, 0.62); } .ace_completion-meta { opacity: 0.5; margin-left: 0.9em; } .ace_completion-message { margin-left: 0.9em; color: blue; } .ace_editor.ace_autocomplete .ace_completion-highlight{ color: #2d69c7; } .ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #93ca12; } .ace_editor.ace_autocomplete { width: 300px; z-index: 200000; border: 1px lightgray solid; position: fixed; box-shadow: 2px 3px 5px rgba(0,0,0,.2); line-height: 1.4; background: #fefefe; color: #111; } .ace_dark.ace_editor.ace_autocomplete { border: 1px #484747 solid; box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51); line-height: 1.4; background: #25282c; color: #c1c1c1; } .ace_autocomplete .ace_text-layer { width: calc(100% - 8px); } .ace_autocomplete .ace_line { display: flex; align-items: center; } .ace_autocomplete .ace_line > * { min-width: 0; flex: 0 0 auto; } .ace_autocomplete .ace_line .ace_ { flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; } .ace_autocomplete .ace_completion-spacer { flex: 1; } .ace_autocomplete.ace_loading:after { content: ""; position: absolute; top: 0px; height: 2px; width: 8%; background: blue; z-index: 100; animation: ace_progress 3s infinite linear; animation-delay: 300ms; transform: translateX(-100%) scaleX(1); } @keyframes ace_progress { 0% { transform: translateX(-100%) scaleX(1) } 50% { transform: translateX(625%) scaleX(2) } 100% { transform: translateX(1500%) scaleX(3) } } @media (prefers-reduced-motion) { .ace_autocomplete.ace_loading:after { transform: translateX(625%) scaleX(2); animation: none; } } `,"autocompletion.css",!1),k.AcePopup=f,k.$singleLineEditor=h,k.getAriaId=t}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(M,k,B){var R=function(){function L(A){this.editor=A,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return L.prototype.setScreenReaderContent=function(A){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var u=this.popup.getRow(),r=this.popup.renderer.$textLayer,i=r.element.childNodes[u-r.config.firstRow];if(i){for(var n="doc-tooltip ",t=0;t=0&&a.test(L[r]);r--)u.push(L[r]);return u.reverse().join("")},k.retrieveFollowingIdentifier=function(L,A,a){a=a||R;for(var u=[],r=A;r0)for(var l=this.popup.getFirstVisibleRow();l<=this.popup.getLastVisibleRow();l++){var v=this.popup.getData(l);v&&(!d||v.hideInlinePreview)&&this.$seen(v)}},y.prototype.$onPopupShow=function(d){this.$onPopupChange(d),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},y.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var d=this.editor.container.parentNode,l=[];d;)l.push(d),d.addEventListener("scroll",this.onLayoutChange,{passive:!0}),d=d.parentNode;this.$elements=l}},y.prototype.unObserveLayoutChanges=function(){var d=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(l){l.removeEventListener("scroll",d.onLayoutChange,{passive:!0})}),this.$elements=null},y.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},y.prototype.$updatePopupPosition=function(){var d=this.editor,l=d.renderer,v=l.layerConfig.lineHeight,C=l.$cursorLayer.getPixelPosition(this.base,!0);C.left-=this.popup.getTextLeftOffset();var $=d.container.getBoundingClientRect();C.top+=$.top-l.layerConfig.offset,C.left+=$.left-d.renderer.scrollLeft,C.left+=l.gutterWidth;var w={top:C.top,left:C.left};l.$ghostText&&l.$ghostTextWidget&&this.base.row===l.$ghostText.position.row&&(w.top+=l.$ghostTextWidget.el.offsetHeight);var b=d.container.getBoundingClientRect().bottom-v,g=bthis.filterText&&d.lastIndexOf(this.filterText,0)===0)var l=this.filtered;else var l=this.all;this.filterText=d,l=this.filterCompletions(l,this.filterText),l=l.sort(function(C,$){return $.exactMatch-C.exactMatch||$.$score-C.$score||(C.caption||C.value).localeCompare($.caption||$.value)});var v=null;l=l.filter(function(C){var $=C.snippet||C.caption||C.value;return $===v?!1:(v=$,!0)}),this.filtered=l},y.prototype.filterCompletions=function(d,l){var v=[],C=l.toUpperCase(),$=l.toLowerCase();e:for(var w=0,b;b=d[w];w++){var g=!this.ignoreCaption&&b.caption||b.value||b.snippet;if(g){var p=-1,c=0,m=0,S,T;if(this.exactMatch){if(l!==g.substr(0,l.length))continue e}else{var E=g.toLowerCase().indexOf($);if(E>-1)m=E;else for(var _=0;_=0&&(F<0||I0&&(p===-1&&(m+=10),m+=T,c=c|1<<_),p=S}}b.matchMask=c,b.exactMatch=m?0:1,b.$score=(b.score||0)-m,v.push(b)}}return v},y}();k.Autocomplete=h,k.CompletionProvider=f,k.FilteredList=x}),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],function(M,k,B){var R=M("../range").Range,L=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;function A(u,r){var i=u.getTextRange(R.fromPoints({row:0,column:0},r));return i.split(L).length-1}function a(u,r){var i=A(u,r),n=u.getValue().split(L),t=Object.create(null),e=n[i];return n.forEach(function(o,s){if(!(!o||o===e)){var h=Math.abs(i-s),f=n.length-h;t[o]?t[o]=Math.max(f,t[o]):t[o]=f}}),t}k.getCompletions=function(u,r,i,n,t){var e=a(r,i),o=Object.keys(e);t(null,o.map(function(s){return{caption:s,value:s,score:e[s],meta:"local"}}))}}),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"],function(M,k,B){var R=M("../snippets").snippetManager,L=M("../autocomplete").Autocomplete,A=M("../config"),a=M("../lib/lang"),u=M("../autocomplete/util"),r=M("../autocomplete/text_completer"),i={getCompletions:function(C,$,w,b,g){if($.$mode.completer)return $.$mode.completer.getCompletions(C,$,w,b,g);var p=C.session.getState(w.row),c=$.$mode.getCompletions(p,$,w,b);c=c.map(function(m){return m.completerId=i.id,m}),g(null,c)},id:"keywordCompleter"},n=function(C){var $={};return C.replace(/\${(\d+)(:(.*?))?}/g,function(w,b,g,p){return $[b]=p||""}).replace(/\$(\d+?)/g,function(w,b){return $[b]})},t={getCompletions:function(C,$,w,b,g){var p=[],c=$.getTokenAt(w.row,w.column);c&&c.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?p.push("html-tag"):p=R.getActiveScopes(C);var m=R.snippetMap,S=[];p.forEach(function(T){for(var E=m[T]||[],_=E.length;_--;){var I=E[_],F=I.name||I.tabTrigger;F&&S.push({caption:F,snippet:I.content,meta:I.tabTrigger&&!I.name?I.tabTrigger+"⇥ ":"snippet",completerId:t.id})}},this),g(null,S)},getDocTooltip:function(C){C.snippet&&!C.docHTML&&(C.docHTML=["",a.escapeHTML(C.caption),"","
",a.escapeHTML(n(C.snippet))].join(""))},id:"snippetCompleter"},e=[t,r,i];k.setCompleters=function(C){e.length=0,C&&e.push.apply(e,C)},k.addCompleter=function(C){e.push(C)},k.textCompleter=r,k.keyWordCompleter=i,k.snippetCompleter=t;var o={name:"expandSnippet",exec:function(C){return R.expandWithTab(C)},bindKey:"Tab"},s=function(C,$){h($.session.$mode)},h=function(C){typeof C=="string"&&(C=A.$modes[C]),C&&(R.files||(R.files={}),f(C.$id,C.snippetFileId),C.modes&&C.modes.forEach(h))},f=function(C,$){!$||!C||R.files[C]||(R.files[C]={},A.loadModule($,function(w){w&&(R.files[C]=w,!w.snippets&&w.snippetText&&(w.snippets=R.parseSnippetFile(w.snippetText)),R.register(w.snippets||[],w.scope),w.includeScopes&&(R.snippetMap[w.scope].includeScopes=w.includeScopes,w.includeScopes.forEach(function(b){h("ace/mode/"+b)})))}))},x=function(C){var $=C.editor,w=$.completer&&$.completer.activated;if(C.command.name==="backspace")w&&!u.getCompletionPrefix($)&&$.completer.detach();else if(C.command.name==="insertstring"&&!w){y=C;var b=C.editor.$liveAutocompletionDelay;b?d.delay(b):l(C)}},y,d=a.delayedCall(function(){l(y)},0),l=function(C){var $=C.editor,w=u.getCompletionPrefix($),b=C.args,g=u.triggerAutocomplete($,b);if(w&&w.length>=$.$liveAutocompletionThreshold||g){var p=L.for($);p.autoShown=!0,p.showPopup($)}},v=M("../editor").Editor;M("../config").defineOptions(v.prototype,"editor",{enableBasicAutocompletion:{set:function(C){C?(this.completers||(this.completers=Array.isArray(C)?C:e),this.commands.addCommand(L.startCommand)):this.commands.removeCommand(L.startCommand)},value:!1},enableLiveAutocompletion:{set:function(C){C?(this.completers||(this.completers=Array.isArray(C)?C:e),this.commands.on("afterExec",x)):this.commands.off("afterExec",x)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(C){C?(this.commands.addCommand(o),this.on("changeMode",s),s(null,this)):(this.commands.removeCommand(o),this.off("changeMode",s))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(M){Y&&(Y.exports=M)})}()})(Ze);const Je="/newadmin/assets/worker-json-DgwNIOck.js",qe=xe({__name:"CodeEditor",props:{value:{type:[String,Object],default:""},readonly:{type:Boolean,default:!1},width:{type:String,default:"100%"},height:{type:String,default:"300px"},theme:{type:String,default:"chrome"}},emits:["update:value","format-error"],setup(Y,{emit:ee}){ke.config.setModuleUrl("ace/mode/json_worker",Je);const M=ee;let k=Pe(""),B=Y;const R=ze({lang:"json",theme:"chrome",readOnly:!1,width:"100%",height:"300px",options:{enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0,tabSize:2,showPrintMargin:!1,fontSize:13,useWorker:"true"}});Ce(B,()=>{const{value:A,readonly:a,width:u,height:r}=B;if(We(A))try{k.value=JSON.stringify(JSON.parse(A),null,2)}catch(i){M("format-error",A),k.value=A}else Ie(A)&&(k.value=JSON.stringify(A,null,2));u&&(R.width=u),r&&(R.height=r),a&&(R.readOnly=a)}),Ce(k,()=>{M("update:value",k.value)});const L=()=>{};return(A,a)=>(Ue(),Ve(Se(Ye),{value:Se(k),"onUpdate:value":a[0]||(a[0]=u=>Ge(k)?k.value=u:k=u),onInit:L,lang:"json",theme:R.theme,options:R.options,readonly:R.readOnly,style:Ke({height:R.height,width:R.width}),class:"ace-editor"},null,8,["value","theme","options","readonly","style"]))}}),rt=Oe(qe);export{rt as C};