1import{fc as Xe,fd as Re,fe as Qe,ff as Je,dZ as qe,aR as Me,c2 as et,fg as tt,bo as it,cC as Ie,cD as _e,cv as De,cr as nt,cE as be,cx as $e,bm as rt,aU as Oe,a_ as ae,bc as oe,dK as ot,cy as st,cT as at,fh as lt,cU as ht,fi as ct,c9 as Ne,ca as de,aV as Z,aW as J,b1 as G,bg as K,bR as ie,bh as ee,b3 as Q,bt as se,c1 as ge,b2 as ce,b6 as he,aZ as ue,bq as Fe,cF as We,cf as Be,c7 as ut,bb as ve,d$ as ke}from"./c-index-C7aDQtMU.js";import{E as He}from"./c-el-checkbox-yCtUXoWo.js";import{E as ze}from"./c-index-uU8wUeO9.js";import{k as Ve,l as Pe}from"./c-el-form-item-lGG0C5Mp.js";/* empty css */import{S as Ue}from"./c-SingleUploaderWithActions-D2-pHZJp.js";import{t as dt}from"./c-toInteger-D4xaUtYr.js";import{P as ft}from"./c-ParentTreeSelect-0hMk39FX.js";function gt(I){return function(O,E,k){var H=Object(O);if(!Xe(O)){var x=Re(E);O=Qe(O),E=function($){return x(H[$],$,H)}}var A=I(O,E,k);return A>-1?H[x?O[A]:A]:void 0}}var pt=Math.max;function mt(I,O,E){var k=I==null?0:I.length;if(!k)return-1;var H=E==null?0:dt(E);return H<0&&(H=pt(k+H,0)),Je(I,Re(O),H)}var vt=gt(mt),Se={exports:{}},Ee;function yt(){return Ee||(Ee=1,(function(I,O){(function(){var E="ace",k=(function(){return this})();!k&&typeof window<"u"&&(k=window);var H=function(r,o,n){if(typeof r!="string"){H.original&&H.original.apply(this,arguments);return}arguments.length==2&&(n=o),H.modules[r]||(H.payloads[r]=n,H.modules[r]=null)};H.modules={},H.payloads={};var x=function(r,o,n){if(typeof o=="string"){var t=a(r,o);if(t!=null)return n&&n(),t}else if(Object.prototype.toString.call(o)==="[object Array]"){for(var e=[],i=0,s=o.length;i<s;++i){var h=a(r,o[i]);if(h==null&&A.original)return;e.push(h)}return n&&n.apply(null,e)||!0}},A=function(r,o){var n=x("",r,o);return n==null&&A.original?A.original.apply(this,arguments):n},$=function(r,o){if(o.indexOf("!")!==-1){var n=o.split("!");return $(r,n[0])+"!"+$(r,n[1])}if(o.charAt(0)=="."){var t=r.split("/").slice(0,-1).join("/");for(o=t+"/"+o;o.indexOf(".")!==-1&&e!=o;){var e=o;o=o.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return o},a=function(r,o){o=$(r,o);var n=H.modules[o];if(!n){if(n=H.payloads[o],typeof n=="function"){var t={},e={id:o,uri:"",exports:t,packaged:!0},i=function(h,c){return x(o,h,c)},s=n(i,t,e);t=s||e.exports,H.modules[o]=t,delete H.payloads[o]}n=H.modules[o]=t||n}return n};function l(r){var o=k;k[r]||(k[r]={}),o=k[r],(!o.define||!o.define.packaged)&&(H.original=o.define,o.define=H,o.define.packaged=!0),(!o.require||!o.require.packaged)&&(A.original=o.require,o.require=A,o.require.packaged=!0)}l(E)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(E,k,H){function x(A,$,a){Object.defineProperty(A,$,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||x(String.prototype,"startsWith",function(A,$){return $=$||0,this.lastIndexOf(A,$)===$}),String.prototype.endsWith||x(String.prototype,"endsWith",function(A,$){var a=this;($===void 0||$>a.length)&&($=a.length),$-=A.length;var l=a.indexOf(A,$);return l!==-1&&l===$}),String.prototype.repeat||x(String.prototype,"repeat",function(A){for(var $="",a=this;A>0;)A&1&&($+=a),(A>>=1)&&(a+=a);return $}),String.prototype.includes||x(String.prototype,"includes",function(A,$){return this.indexOf(A,$)!=-1}),Object.assign||(Object.assign=function(A){if(A==null)throw new TypeError("Cannot convert undefined or null to object");for(var $=Object(A),a=1;a<arguments.length;a++){var l=arguments[a];l!=null&&Object.keys(l).forEach(function(r){$[r]=l[r]})}return $}),Object.values||(Object.values=function(A){return Object.keys(A).map(function($){return A[$]})}),Array.prototype.find||x(Array.prototype,"find",function(A){for(var $=this.length,a=arguments[1],l=0;l<$;l++){var r=this[l];if(A.call(a,r,l,this))return r}}),Array.prototype.findIndex||x(Array.prototype,"findIndex",function(A){for(var $=this.length,a=arguments[1],l=0;l<$;l++){var r=this[l];if(A.call(a,r,l,this))return l}}),Array.prototype.includes||x(Array.prototype,"includes",function(A,$){return this.indexOf(A,$)!=-1}),Array.prototype.fill||x(Array.prototype,"fill",function(A){for(var $=this,a=$.length>>>0,l=arguments[1],r=l>>0,o=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);o<e;
1)$[o]=A,o++;return $}),Array.of||x(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(E,k,H){E("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(E,k,H){k.deepCopy=function x(A){if(typeof A!="object"||!A)return A;var $;if(Array.isArray(A)){$=[];for(var a=0;a<A.length;a++)$[a]=x(A[a]);return $}if(Object.prototype.toString.call(A)!=="[object Object]")return A;$={};for(var a in A)$[a]=x(A[a]);return $}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(E,k,H){k.last=function($){return $[$.length-1]},k.stringReverse=function($){return $.split("").reverse().join("")},k.stringRepeat=function($,a){for(var l="";a>0;)a&1&&(l+=$),(a>>=1)&&($+=$);return l};var x=/^\s\s*/,A=/\s\s*$/;k.stringTrimLeft=function($){return $.replace(x,"")},k.stringTrimRight=function($){return $.replace(A,"")},k.copyObject=function($){var a={};for(var l in $)a[l]=$[l];return a},k.copyArray=function($){for(var a=[],l=0,r=$.length;l<r;l++)$[l]&&typeof $[l]=="object"?a[l]=this.copyObject($[l]):a[l]=$[l];return a},k.deepCopy=E("./deep_copy").deepCopy,k.arrayToMap=function($){for(var a={},l=0;l<$.length;l++)a[$[l]]=1;return a},k.createMap=function($){var a=Object.create(null);for(var l in $)a[l]=$[l];return a},k.arrayRemove=function($,a){for(var l=0;l<=$.length;l++)a===$[l]&&$.splice(l,1)},k.escapeRegExp=function($){return $.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},k.escapeHTML=function($){return(""+$).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},k.getMatchOffsets=function($,a){var l=[];return $.replace(a,function(r){l.push({offset:arguments[arguments.length-2],length:r.length})}),l},k.deferredCall=function($){var a=null,l=function(){a=null,$()},r=function(o){return r.cancel(),a=setTimeout(l,o||0),r};return r.schedule=r,r.call=function(){return this.cancel(),$(),r},r.cancel=function(){return clearTimeout(a),a=null,r},r.isPending=function(){return a},r},k.delayedCall=function($,a){var l=null,r=function(){l=null,$()},o=function(n){l==null&&(l=setTimeout(r,n||a))};return o.delay=function(n){l&&clearTimeout(l),l=setTimeout(r,n||a)},o.schedule=o,o.call=function(){this.cancel(),$()},o.cancel=function(){l&&clearTimeout(l),l=null},o.isPending=function(){return l},o},k.sleep=function($){return new Promise(function(a){setTimeout(a,$)})},k.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},k.skipEmptyMatch=function($,a,l){return l&&$.codePointAt(a)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(E,k,H){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 x=typeof navigator=="object"?navigator:{},A=(/mac|win|linux/i.exec(x.platform)||["other"])[0].toLowerCase(),$=x.userAgent||"",a=x.appName||"";k.isWin=A=="win",k.isMac=A=="mac",k.isLinux=A=="linux",k.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat(($.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat(($.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),k.isOldIE=k.isIE&&k.isIE<9,k.isGecko=k.isMozilla=$.match(/ Gecko\/\d+/),k.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",k.isWebKit=parseFloat($.split("WebKit/")[1])||void 0,k.isChrome=parseFloat($.split(" Chrome/")[1])||void 0,k.isSafari=parseFloat($.split(" Safari/")[1])&&!k.isChrome||void 0,k.isEdge=parseFloat($.split(" Edge/")[1])||void 0,k.isAIR=$.indexOf("AdobeAIR")>=0,k.isAndroid=$.indexOf("Android")>=0,k.isChromeOS=$.indexOf(" CrOS ")>=0,k.isIOS=/iPad|iPhone|iPod/.test($)&&!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(E,k,H){var x=E("./useragent"),A="http://www.w3.org/1999/xhtml";k.buildDom=function n(t,e,i){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;
1if(typeof t[0]!="string"||!t[0]){for(var h=[],c=0;c<t.length;c++){var m=n(t[c],e,i);m&&h.push(m)}return h}var p=document.createElement(t[0]),g=t[1],f=1;g&&typeof g=="object"&&!Array.isArray(g)&&(f=2);for(var c=f;c<t.length;c++)n(t[c],p,i);return f==2&&Object.keys(g).forEach(function(b){var M=g[b];b==="class"?p.className=Array.isArray(M)?M.join(" "):M:typeof M=="function"||b=="value"||b[0]=="$"?p[b]=M:b==="ref"?i&&(i[M]=p):b==="style"?typeof M=="string"&&(p.style.cssText=M):M!=null&&p.setAttribute(b,M)}),e&&e.appendChild(p),p},k.getDocumentHead=function(n){return n||(n=document),n.head||n.getElementsByTagName("head")[0]||n.documentElement},k.createElement=function(n,t){return document.createElementNS?document.createElementNS(t||A,n):document.createElement(n)},k.removeChildren=function(n){n.innerHTML=""},k.createTextNode=function(n,t){var e=t?t.ownerDocument:document;return e.createTextNode(n)},k.createFragment=function(n){var t=n?n.ownerDocument:document;return t.createDocumentFragment()},k.hasCssClass=function(n,t){var e=(n.className+"").split(/\s+/g);return e.indexOf(t)!==-1},k.addCssClass=function(n,t){k.hasCssClass(n,t)||(n.className+=" "+t)},k.removeCssClass=function(n,t){for(var e=n.className.split(/\s+/g);;){var i=e.indexOf(t);if(i==-1)break;e.splice(i,1)}n.className=e.join(" ")},k.toggleCssClass=function(n,t){for(var e=n.className.split(/\s+/g),i=!0;;){var s=e.indexOf(t);if(s==-1)break;i=!1,e.splice(s,1)}return i&&e.push(t),n.className=e.join(" "),i},k.setCssClass=function(n,t,e){e?k.addCssClass(n,t):k.removeCssClass(n,t)},k.hasCssString=function(n,t){var e=0,i;if(t=t||document,i=t.querySelectorAll("style")){for(;e<i.length;)if(i[e++].id===n)return!0}},k.removeElementById=function(n,t){t=t||document,t.getElementById(n)&&t.getElementById(n).remove()};var $,a=[];k.useStrictCSP=function(n){$=n,n==!1?l():a||(a=[])};function l(){var n=a;a=null,n&&n.forEach(function(t){r(t[0],t[1])})}function r(n,t,e){if(!(typeof document>"u")){if(a){if(e)l();else if(e===!1)return a.push([n,t])}if(!$){var i=e;!e||!e.getRootNode?i=document:(i=e.getRootNode(),(!i||i==e)&&(i=document));var s=i.ownerDocument||i;if(t&&k.hasCssString(t,i))return null;t&&(n+=` 2/*# sourceURL=ace/css/`+t+" */");var h=k.createElement("style");h.appendChild(s.createTextNode(n)),t&&(h.id=t),i==s&&(i=k.getDocumentHead(s)),i.insertBefore(h,i.firstChild)}}}if(k.importCssString=r,k.importCssStylsheet=function(n,t){k.buildDom(["link",{rel:"stylesheet",href:n}],k.getDocumentHead(t))},k.$fixPositionBug=function(n){var t=n.getBoundingClientRect();if(n.style.left){var e=parseFloat(n.style.left),i=+t.left;Math.abs(e-i)>1&&(n.style.left=2*e-i+"px")}if(n.style.right){var e=parseFloat(n.style.right),i=window.innerWidth-t.right;Math.abs(e-i)>1&&(n.style.right=2*e-i+"px")}if(n.style.top){var e=parseFloat(n.style.top),i=+t.top;Math.abs(e-i)>1&&(n.style.top=2*e-i+"px")}if(n.style.bottom){var e=parseFloat(n.style.bottom),i=window.innerHeight-t.bottom;Math.abs(e-i)>1&&(n.style.bottom=2*e-i+"px")}},k.scrollbarWidth=function(n){var t=k.createElement("ace_inner");t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block";var e=k.createElement("ace_outer"),i=e.style;i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",e.appendChild(t);var s=n&&n.documentElement||document&&document.documentElement;if(!s)return 0;s.appendChild(e);var h=t.offsetWidth;i.overflow="scroll";var c=t.offsetWidth;return h===c&&(c=e.clientWidth),s.removeChild(e),h-c},k.computedStyle=function(n,t){return window.getComputedStyle(n,"")||{}},k.setStyle=function(n,t,e){n[t]!==e&&(n[t]=e)},k.HAS_CSS_ANIMATION=!1,k.HAS_CSS_TRANSFORMS=!1,k.HI_DPI=x.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,x.isChromeOS&&(k.HI_DPI=!1),typeof document<"u"){var o=document.createElement("div");k.HI_DPI&&o.style.transform!==void 0&&(k.HAS_CSS_TRANSFORMS=!0),!x.isEdge&&typeof o.style.animationName<"u"&&(k.HAS_CSS_ANIMATION=!0),o=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(E,k,H){var x=E("./dom");k.get=function(A,$){var a=new XMLHttpRequest;a.open("GET",A,!0),a.onreadystatechange=function(){a.readyState===4&&$(a.responseText)},a.send(null)},k.loadScript=function(A,$){var a=x.getDocumentHead(),l=document.createElement("script");l.src=A,a.appendChild(l),l.onload=l.onreadystatechange=function(r,o){(o||!l.readyState||l.readyState=="loaded"||l.readyState=="complete")&&(l=l.onload=l.onreadystatechange=null,o||$())}},k.qualifyURL=function(A){var $=document.createElement("a");return $.href=A,$.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(E,k,H){k.inherits=function(x,A){x.super_=A,x.prototype=Object.create(A.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}})},k.mixin=function(x,A){for(var $ in A)x[$]=A[$];return x},k.implement=function(x,A){k.mixin(x,A)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(E,k,H){var x={}
2,A=function(){this.propagationStopped=!0},$=function(){this.defaultPrevented=!0};x._emit=x._dispatchEvent=function(a,l){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._eventRegistry[a]||[],o=this._defaultHandlers[a];if(!(!r.length&&!o)){(typeof l!="object"||!l)&&(l={}),l.type||(l.type=a),l.stopPropagation||(l.stopPropagation=A),l.preventDefault||(l.preventDefault=$),r=r.slice();for(var n=0;n<r.length&&(r[n](l,this),!l.propagationStopped);n++);if(o&&!l.defaultPrevented)return o(l,this)}},x._signal=function(a,l){var r=(this._eventRegistry||{})[a];if(r){r=r.slice();for(var o=0;o<r.length;o++)r[o](l,this)}},x.once=function(a,l){var r=this;if(this.on(a,function o(){r.off(a,o),l.apply(null,arguments)}),!l)return new Promise(function(o){l=o})},x.setDefaultHandler=function(a,l){var r=this._defaultHandlers;if(r||(r=this._defaultHandlers={_disabled_:{}}),r[a]){var o=r[a],n=r._disabled_[a];n||(r._disabled_[a]=n=[]),n.push(o);var t=n.indexOf(l);t!=-1&&n.splice(t,1)}r[a]=l},x.removeDefaultHandler=function(a,l){var r=this._defaultHandlers;if(r){var o=r._disabled_[a];if(r[a]==l)o&&this.setDefaultHandler(a,o.pop());else if(o){var n=o.indexOf(l);n!=-1&&o.splice(n,1)}}},x.on=x.addEventListener=function(a,l,r){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[a];return o||(o=this._eventRegistry[a]=[]),o.indexOf(l)==-1&&o[r?"unshift":"push"](l),l},x.off=x.removeListener=x.removeEventListener=function(a,l){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[a];if(r){var o=r.indexOf(l);o!==-1&&r.splice(o,1)}},x.removeAllListeners=function(a){a||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[a]=void 0),this._defaultHandlers&&(this._defaultHandlers[a]=void 0)},k.EventEmitter=x}),ace.define("ace/lib/report_error",["require","exports","module"],function(E,k,H){k.reportError=function(A,$){var a=new Error(A);a.data=$,setTimeout(function(){throw a})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(E,k,H){var x={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor gutter","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural"
2:"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions","editor.tooltip.disable-editing":"Editing is disabled"};k.defaultEnglishMessages=x}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(E,k,H){"no use strict";var x=E("./oop"),A=E("./event_emitter").EventEmitter,$=E("./report_error").reportError,a=E("./default_english_messages").defaultEnglishMessages,l={setOptions:function(e){Object.keys(e).forEach(function(i){this.setOption(i,e[i])},this)},getOptions:function(e){var i={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var s=this.$options;e=Object.keys(s).filter(function(h){return!s[h].hidden})}return e.forEach(function(h){i[h]=this.getOption(h)},this),i},setOption:function(e,i){if(this["$"+e]!==i){var s=this.$options[e];if(!s)return""+e,void 0;if(s.forwardTo)return this[s.forwardTo]&&this[s.forwardTo].setOption(e,i);s.handlesSet||(this["$"+e]=i),s&&s.set&&s.set.call(this,i)}},getOption:function(e){var i=this.$options[e];return i?i.forwardTo?this[i.forwardTo]&&this[i.forwardTo].getOption(e):i&&i.get?i.get.call(this):this["$"+e]:(""+e,void 0)}};function r(e){}var o,n,t=(function(){function e(){this.$defaultOptions={},o=a,n="dollarSigns"}return e.prototype.defineOptions=function(i,s,h){return i.$options||(this.$defaultOptions[s]=i.$options={}),Object.keys(h).forEach(function(c){var m=h[c];typeof m=="string"&&(m={forwardTo:m}),m.name||(m.name=c),i.$options[m.name]=m,"initialValue"in m&&(i["$"+m.name]=m.initialValue)}),x.implement(i,l),this},e.prototype.resetOptions=function(i){Object.keys(i.$options).forEach(function(s){var h=i.$options[s];"value"in h&&i.setOption(s,h.value)})},e.prototype.setDefaultValue=function(i,s,h){if(!i){for(i in this.$defaultOptions)if(this.$defaultOptions[i][s])break;if(!this.$defaultOptions[i][s])return!1}var c=this.$defaultOptions[i]||(this.$defaultOptions[i]={});c[s]&&(c.forwardTo?this.setDefaultValue(c.forwardTo,s,h):c[s].value=h)},e.prototype.setDefaultValues=function(i,s){Object.keys(s).forEach(function(h){this.setDefaultValue(i,h,s[h])},this)},e.prototype.setMessages=function(i,s){o=i,s&&s.placeholders&&(n=s.placeholders)},e.prototype.nls=function(i,s,h){o[i]||(""+i+o.$id+s,o[s]||(""+s,void 0));var c=o[i]||o[s]||s;return h&&(n==="dollarSigns"&&(c=c.replace(/\$(\$|[\d]+)/g,function(m,p){return p=="$"?"$":h[p]})),n==="curlyBrackets"&&(c=c.replace(/\{([^\}]+)\}/g,function(m,p){return h[p]}))),c},e})();t.prototype.warn=r,t.prototype.reportError=$,x.implement(t.prototype,A),k.AppConfig=t}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(E,k,H){H.exports=`.ace-tm .ace_gutter { 3 background: #f0f0f0; 4 color: #333; 5} 6 7.ace-tm .ace_print-margin { 8 width: 1px; 9 background: #e8e8e8; 10} 11 12.ace-tm .ace_fold { 13 background-color: #6B72E6; 14} 15 16.ace-tm { 17 background-color: #FFFFFF; 18 color: black; 19} 20 21.ace-tm .ace_cursor { 22 color: black; 23} 24 25.ace-tm .ace_invisible { 26 color: rgb(191, 191, 191); 27} 28 29.ace-tm .ace_storage, 30.ace-tm .ace_keyword { 31 color: blue; 32} 33 34.ace-tm .ace_constant { 35 color: rgb(197, 6, 11); 36} 37 38.ace-tm .ace_constant.ace_buildin { 39 color: rgb(88, 72, 246); 40} 41 42.ace-tm .ace_constant.ace_language { 43 color: rgb(88, 92, 246); 44} 45 46.ace-tm .ace_constant.ace_library { 47 color: rgb(6, 150, 14); 48} 49 50.ace-tm .ace_invalid { 51 background-color: rgba(255, 0, 0, 0.1); 52 color: red; 53} 54 55.ace-tm .ace_support.ace_function { 56 color: rgb(60, 76, 114); 57} 58 59.ace-tm .ace_support.ace_constant { 60 color: rgb(6, 150, 14); 61} 62 63.ace-tm .ace_support.ace_type, 64.ace-tm .ace_support.ace_class { 65 color: rgb(109, 121, 222); 66} 67 68.ace-tm .ace_keyword.ace_operator { 69 color: rgb(104, 118, 135); 70} 71 72.ace-tm .ace_string { 73 color: rgb(3, 106, 7); 74} 75 76.ace-tm .ace_comment {
77 color: rgb(76, 136, 107); 78} 79 80.ace-tm .ace_comment.ace_doc { 81 color: rgb(0, 102, 255); 82} 83 84.ace-tm .ace_comment.ace_doc.ace_tag { 85 color: rgb(128, 159, 191); 86} 87 88.ace-tm .ace_constant.ace_numeric { 89 color: rgb(0, 0, 205); 90} 91 92.ace-tm .ace_variable { 93 color: rgb(49, 132, 149); 94} 95 96.ace-tm .ace_xml-pe { 97 color: rgb(104, 104, 91); 98} 99 100.ace-tm .ace_entity.ace_name.ace_function { 101 color: #0000A2; 102} 103 104 105.ace-tm .ace_heading { 106 color: rgb(12, 7, 255); 107} 108 109.ace-tm .ace_list { 110 color:rgb(185, 6, 144); 111} 112 113.ace-tm .ace_meta.ace_tag { 114 color:rgb(0, 22, 142); 115} 116 117.ace-tm .ace_string.ace_regex { 118 color: rgb(255, 0, 0) 119} 120 121.ace-tm .ace_marker-layer .ace_selection { 122 background: rgb(181, 213, 255); 123} 124.ace-tm.ace_multiselect .ace_selection.ace_start { 125 box-shadow: 0 0 3px 0px white; 126} 127.ace-tm .ace_marker-layer .ace_step { 128 background: rgb(252, 255, 0); 129} 130 131.ace-tm .ace_marker-layer .ace_stack { 132 background: rgb(164, 229, 101); 133} 134 135.ace-tm .ace_marker-layer .ace_bracket { 136 margin: -1px 0 0 -1px; 137 border: 1px solid rgb(192, 192, 192); 138} 139 140.ace-tm .ace_marker-layer .ace_active-line { 141 background: rgba(0, 0, 0, 0.07); 142} 143 144.ace-tm .ace_gutter-active-line { 145 background-color : #dcdcdc; 146} 147 148.ace-tm .ace_marker-layer .ace_selected-word { 149 background: rgb(250, 250, 255); 150 border: 1px solid rgb(200, 200, 250); 151} 152 153.ace-tm .ace_indent-guide { 154 background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y; 155} 156 157.ace-tm .ace_indent-guide-active { 158 background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y; 159} 160`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(E,k,H){k.isDark=!1,k.cssClass="ace-tm",k.cssText=E("./textmate-css"),k.$id="ace/theme/textmate";var x=E("../lib/dom");x.importCssString(k.cssText,k.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(E,k,H){"no use strict";var x=E("./lib/lang"),A=E("./lib/net"),$=E("./lib/dom"),a=E("./lib/app_config").AppConfig;H.exports=k=new a;var l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};k.get=function(t){if(!l.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return l[t]},k.set=function(t,e){if(l.hasOwnProperty(t))l[t]=e;else if(this.setDefaultValue("",t,e)==!1)throw new Error("Unknown config key: "+t);t=="useStrictCSP"&&$.useStrictCSP(e)},k.all=function(){return x.copyObject(l)},k.$modes={},k.moduleUrl=function(t,e){if(l.$moduleUrls[t])return l.$moduleUrls[t];var i=t.split("/");e=e||i[i.length-2]||"";var s=e=="snippets"?"/":"-",h=i[i.length-1];if(e=="worker"&&s=="-"){var c=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");h=h.replace(c,"")}(!h||h==e)&&i.length>1&&(h=i[i.length-2]);var m=l[e+"Path"];return m==null?m=l.basePath:s=="/"&&(e=s=""),m&&m.slice(-1)!="/"&&(m+="/"),m+e+s+h+this.get("suffix")},k.setModuleUrl=function(t,e){return l.$moduleUrls[t]=e};var r=function(t,e){if(t==="ace/theme/textmate"||t==="./theme/textmate")return e(null,E("./theme/textmate"));if(o)return o(t,e)},o;
160k.setLoader=function(t){o=t},k.dynamicModules=Object.create(null),k.$loading={},k.$loaded={},k.loadModule=function(t,e){var i;if(Array.isArray(t))var s=t[0],h=t[1];else if(typeof t=="string")var h=t;var c=function(m){if(m&&!k.$loading[h])return e&&e(m);if(k.$loading[h]||(k.$loading[h]=[]),k.$loading[h].push(e),!(k.$loading[h].length>1)){var p=function(){r(h,function(g,f){f&&(k.$loaded[h]=f),k._emit("load.module",{name:h,module:f});var b=k.$loading[h];k.$loading[h]=null,b.forEach(function(M){M&&M(f)})})};if(!k.get("packaged"))return p();A.loadScript(k.moduleUrl(h,s),p),n()}};if(k.dynamicModules[h])k.dynamicModules[h]().then(function(m){m.default?c(m.default):c(m)});else{try{i=this.$require(h)}catch{}c(i||k.$loaded[h])}},k.$require=function(t){if(typeof H.require=="function"){var e="require";return H[e](t)}},k.setModuleLoader=function(t,e){k.dynamicModules[t]=e};var n=function(){!l.basePath&&!l.workerPath&&!l.modePath&&!l.themePath&&!Object.keys(l.$moduleUrls).length&&(n=function(){})};k.version="1.44.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(E,k,H){E("./lib/fixoldbrowsers");var x=E("./config");x.setLoader(function(l,r){E([l],function(o){r(null,o)})});var A=(function(){return this||typeof window<"u"&&window})();H.exports=function(l){x.init=$,x.$require=E,l.require=E},$(!0);function $(l){if(!(!A||!A.document)){x.set("packaged",l||E.packaged||H.packaged||A.define&&(void 0).packaged);var r={},o="",n=document.currentScript||document._currentScript,t=n&&n.ownerDocument||document;n&&n.src&&(o=n.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=t.getElementsByTagName("script"),i=0;i<e.length;i++){var s=e[i],h=s.src||s.getAttribute("src");if(h){for(var c=s.attributes,m=0,p=c.length;m<p;m++){var g=c[m];g.name.indexOf("data-ace-")===0&&(r[a(g.name.replace(/^data-ace-/,""))]=g.value)}var f=h.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);f&&(o=f[1])}}o&&(r.base=r.base||o,r.packaged=!0),r.basePath=r.base,r.workerPath=r.workerPath||r.base,r.modePath=r.modePath||r.base,r.themePath=r.themePath||r.base,delete r.base;for(var b in r)typeof r[b]<"u"&&x.set(b,r[b])}}function a(l){return l.replace(/-(.)/g,function(r,o){return o.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(E,k,H){var x=(function(){function A($,a,l,r){this.start={row:$,column:a},this.end={row:l,column:r}}return A.prototype.isEqual=function($){return this.start.row===$.start.row&&this.end.row===$.end.row&&this.start.column===$.start.column&&this.end.column===$.end.column},A.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},A.prototype.contains=function($,a){return this.compare($,a)==0},A.prototype.compareRange=function($){var a,l=$.end,r=$.start;return a=this.compare(l.row,l.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)},A.prototype.comparePoint=function($){return this.compare($.row,$.column)},A.prototype.containsRange=function($){return this.comparePoint($.start)==0&&this.comparePoint($.end)==0},A.prototype.intersects=function($){var a=this.compareRange($);return a==-1||a==0||a==1},A.prototype.isEnd=function($,a){return this.end.row==$&&this.end.column==a},A.prototype.isStart=function($,a){return this.start.row==$&&this.start.column==a},A.prototype.setStart=function($,a){typeof $=="object"?(this.start.column=$.column,this.start.row=$.row):(this.start.row=$,this.start.column=a)},A.prototype.setEnd=function($,a){typeof $=="object"?(this.end.column=$.column,this.end.row=$.row):(this.end.row=$,this.end.column=a)},A.prototype.inside=function($,a){return this.compare($,a)==0?!(this.isEnd($,a)||this.isStart($,a)):!1},A.prototype.insideStart=function($,a){return this.compare($,a)==0?!this.isEnd($,a):!1},A.prototype.insideEnd=function($,a){return this.compare($,a)==0?!this.isStart($,a):!1},A.prototype.compare=function($,a){return!this.isMultiLine()&&$===this.start.row?a<this.start.column?-1:a>this.end.column?1:0:$<this.start.row?-1:$>this.end.row?1:this.start.row===$?a>=this.start.column?0:-1:this.end.row===$?a<=this.end.column?0:1:0},A.prototype.compareStart=function($,a){return this.start.row==$&&this.start.column==a?-1:this.compare($,a)},A.prototype.compareEnd=function($,a){return this.end.row==$&&this.end.column==a?1:this.compare($,a)},A.prototype.compareInside=function($,a){return this.end.row==$&&this.end.column==a?1:this.start.row==$&&this.start.column==a?-1:this.compare($,a)},A.prototype.clipRows=function($,a){if(this.end.row>a)var l={row:a+1,column:0};else if(this.end.row<$)var l={row:$,column:0};if(this.start.row>a)var r={row:a+1,column:0};else if(this.start.row<$)var r={row:$,column:0};return A.fromPoints(r||this.start,l||this.end)},A.prototype.extend=function($,a){var l=this.compare($,a);if(l==0)return this;
160if(l==-1)var r={row:$,column:a};else var o={row:$,column:a};return A.fromPoints(r||this.start,o||this.end)},A.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},A.prototype.isMultiLine=function(){return this.start.row!==this.end.row},A.prototype.clone=function(){return A.fromPoints(this.start,this.end)},A.prototype.collapseRows=function(){return this.end.column==0?new A(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new A(this.start.row,0,this.end.row,0)},A.prototype.toScreenRange=function($){var a=$.documentToScreenPosition(this.start),l=$.documentToScreenPosition(this.end);return new A(a.row,a.column,l.row,l.column)},A.prototype.moveBy=function($,a){this.start.row+=$,this.start.column+=a,this.end.row+=$,this.end.column+=a},A})();x.fromPoints=function(A,$){return new x(A.row,A.column,$.row,$.column)},x.comparePoints=function(A,$){return A.row-$.row||A.column-$.column},k.Range=x}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(E,k,H){for(var x=E("./oop"),A={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},$={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},a=0;a<10;a++)$["Digit"+a]=48+a,$["Numpad"+a]=96+a,A.PRINTABLE_KEYS[48+a]=""+a,A.FUNCTION_KEYS[96+a]="Numpad"+a;for(var a=65;a<91;a++){var l=String.fromCharCode(a+32);$["Key"+l.toUpperCase()]=a,A.PRINTABLE_KEYS[a]=l}for(var a=1;a<13;a++)$["F"+a]=111+a,A.FUNCTION_KEYS[111+a]="F"+a;var r={Shift:16,Control:17,Alt:18,Meta:224};for(var o in r)$[o]=$[o+"Left"]=$[o+"Right"]=r[o];k.$codeToKeyCode=$,A.PRINTABLE_KEYS[173]="-";for(var n in A.FUNCTION_KEYS){var t=A.FUNCTION_KEYS[n].toLowerCase();A[t]=parseInt(n,10)}for(var n in A.PRINTABLE_KEYS){var t=A.PRINTABLE_KEYS[n].toLowerCase();A[t]=parseInt(n,10)}x.mixin(A,A.MODIFIER_KEYS),x.mixin(A,A.PRINTABLE_KEYS),x.mixin(A,A.FUNCTION_KEYS),A.enter=A.return,A.escape=A.esc,A.del=A.delete,(function(){for(var e=["cmd","ctrl","alt","shift"],i=Math.pow(2,e.length);i--;)A.KEY_MODS[i]=e.filter(function(s){return i&A.KEY_MODS[s]}).join("-")+"-"})(),A.KEY_MODS[0]="",A.KEY_MODS[-1]="input-",x.mixin(k,A),k.default=k,k.keyCodeToString=function(e){var i=A[e];return typeof i!="string"&&(i=String.fromCharCode(e)),i.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(E,k,H){var x=E("./keys"),A=E("./useragent"),$=null,a=0,l;function r(){l=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return l={passive:!1},!0}})}catch{}}function o(){return l==null&&r(),l}function n(m,p,g){this.elem=m,this.type=p,this.callback=g}n.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var t=k.addListener=function(m,p,g,f){m.addEventListener(p,g,o()),f&&f.$toDestroy.push(new n(m,p,g))},e=k.removeListener=function(m,p,g){m.removeEventListener(p,g,o())};k.stopEvent=function(m){return k.stopPropagation(m),k.preventDefault(m),!1},k.stopPropagation=function(m){m.stopPropagation&&m.stopPropagation()},k.preventDefault=function(m){m.preventDefault&&m.preventDefault()},k.getButton=function(m){return m.type=="dblclick"?0:m.type=="contextmenu"||A.isMac&&m.ctrlKey&&!m.altKey&&!m.shiftKey?2:m.button},k.capture=function(m,p,g){var f=m&&m.ownerDocument||document;function b(M){p&&p(M),g&&g(M),e(f,"mousemove",p),e(f,"mouseup",b),e(f,"dragstart",b)}return t(f,"mousemove",p),t(f,"mouseup",b),t(f,"dragstart",b),b},k.addMouseWheelListener=function(m,p,g){t(m,"wheel",function(f){var b=.15,M=f.deltaX||0,C=f.deltaY||0;switch(f.deltaMode){case f.DOM_DELTA_PIXEL:f.wheelX=M*b,f.wheelY=C*b;break;case f.DOM_DELTA_LINE:var S=15;f.wheelX=M*S,f.wheelY=C*S;break;case f.DOM_DELTA_PAGE:var R=150;f.wheelX=M*R,f.wheelY=C*R;break}p(f)},g)},k.addMultiMouseDownListener=function(m,p,g,f,b){var M=0,C,S,R,y={2:"dblclick",3:"tripleclick",4:"quadclick"};function w(d){if(k.getButton(d)!==0?M=0:d.detail>1?(M++,M>4&&(M=1)):M=1,A.isIE){var u=Math.abs(d.clientX-C)>5||Math.abs(d.clientY-S)>5;(!R||u)&&(M=1),R&&clearTimeout(R),R=setTimeout(function(){R=null},p[M-1]||600),M==1&&(C=d.clientX,S=d.clientY)}if(d._clicks=M,g[f]("mousedown",d),M>4)M=0;else if(M>1)return g[f](y[M],d)}Array.isArray(m)||(m=[m]),m.forEach(function(d){t(d,"mousedown",w,b)})};function i(m){return 0|(m.ctrlKey?1:0)|(m.altKey?2:0)|(m.shiftKey?4:0)|(m.metaKey?8:0)}k.getModifierString=function(m){return x.KEY_MODS[i(m)]};function s(m,p,g){var f=i(p);
160if(!g&&p.code&&(g=x.$codeToKeyCode[p.code]||g),!A.isMac&&$){if(p.getModifierState&&(p.getModifierState("OS")||p.getModifierState("Win"))&&(f|=8),$.altGr)if((3&f)!=3)$.altGr=0;else return;if(g===18||g===17){var b=p.location;if(g===17&&b===1)$[g]==1&&(a=p.timeStamp);else if(g===18&&f===3&&b===2){var M=p.timeStamp-a;M<50&&($.altGr=!0)}}}if(g in x.MODIFIER_KEYS&&(g=-1),!(!f&&g===13&&p.location===3&&(m(p,f,-g),p.defaultPrevented))){if(A.isChromeOS&&f&8){if(m(p,f,g),p.defaultPrevented)return;f&=-9}return!f&&!(g in x.FUNCTION_KEYS)&&!(g in x.PRINTABLE_KEYS)?!1:m(p,f,g)}}k.addCommandKeyListener=function(m,p,g){var f=null;t(m,"keydown",function(b){$[b.keyCode]=($[b.keyCode]||0)+1;var M=s(p,b,b.keyCode);return f=b.defaultPrevented,M},g),t(m,"keypress",function(b){f&&(b.ctrlKey||b.altKey||b.shiftKey||b.metaKey)&&(k.stopEvent(b),f=null)},g),t(m,"keyup",function(b){$[b.keyCode]=null},g),$||(h(),t(window,"focus",h))};function h(){$=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!A.isOldIE){var c=1;k.nextTick=function(m,p){p=p||window;var g="zero-timeout-message-"+c++,f=function(b){b.data==g&&(k.stopPropagation(b),e(p,"message",f),m())};t(p,"message",f),p.postMessage(g,"*")}}k.$idleBlocked=!1,k.onIdle=function(m,p){return setTimeout(function g(){k.$idleBlocked?setTimeout(g,100):m()},p)},k.$idleBlockId=null,k.blockIdle=function(m){k.$idleBlockId&&clearTimeout(k.$idleBlockId),k.$idleBlocked=!0,k.$idleBlockId=setTimeout(function(){k.$idleBlocked=!1},m||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(m){setTimeout(m,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(E,k,H){var x;H.exports={lineMode:!1,pasteCancelled:function(){return x&&x>Date.now()-50?!0:x=!1},cancel:function(){x=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(E,k,H){var x=E("../lib/event"),A=E("../config").nls,$=E("../lib/useragent"),a=E("../lib/dom"),l=E("../lib/lang"),r=E("../clipboard"),o=$.isChrome<18,n=$.isIE,t=$.isChrome>63,e=400,i=E("../lib/keys"),s=i.KEY_MODS,h=$.isIOS,c=h?/\s/:/\n/,m=$.isMobile,p=(function(){function g(f,b){var M=this;this.host=b,this.text=a.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",f.insertBefore(this.text,f.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",m||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),x.addListener(this.text,"blur",function(C){M.ignoreFocusEvents||(b.onBlur(C),M.$isFocused=!1)},b),x.addListener(this.text,"focus",function(C){if(!M.ignoreFocusEvents){if(M.$isFocused=!0,$.isEdge)try{if(!document.hasFocus())return}catch{}b.onFocus(C),$.isEdge?setTimeout(M.resetSelection.bind(M)):M.resetSelection()}},b),this.$focusScroll=!1,b.on("beforeEndOperation",function(){var C=b.curOp,S=C&&C.command&&C.command.name;if(S!="insertstring"){var R=S&&(C.docChanged||C.selectionChanged);M.inComposition&&R&&(M.lastValue=M.text.value="",M.onCompositionEnd()),M.resetSelection()}}),b.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=h?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&b.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,x.addCommandKeyListener(this.text,function(C,S,R){if(!M.inComposition)return b.onCommandKey(C,S,R)},b),x.addListener(this.text,"select",this.onSelect.bind(this),b),x.addListener(this.text,"input",this.onInput.bind(this),b),x.addListener(this.text,"cut",this.onCut.bind(this),b),x.addListener(this.text,"copy",this.onCopy.bind(this),b),x.addListener(this.text,"paste",this.onPaste.bind(this),b),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&x.addListener(f,"keydown",function(C){if(!($.isMac&&!C.metaKey||!C.ctrlKey))switch(C.keyCode){case 67:M.onCopy(C);break;case 86:M.onPaste(C);break;case 88:M.onCut(C);break}},b),this.syncComposition=l.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),x.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),b),x.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),b),x.addListener(this.text,"keyup",this.onKeyup.bind(this),b),x.addListener(this.text,"keydown",this.syncComposition.bind(this),b),x.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),b),this.closeTimeout,x.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),b),x.addListener(this.text,"mousedown",function(C){C.preventDefault(),M.onContextMenuClose()},b),x.addListener(b.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),b),x.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),b),h&&this.addIosSelectionHandler(f,b,this.text)}return g.prototype.addIosSelectionHandler=function(f,b,M){var C=this,S=null,R=!1;M.addEventListener("keydown",function(w){S&&clearTimeout(S),R=!0},!0),M.addEventListener("keyup",function(w){S=setTimeout(function(){R=!1},100)},!0);var y=function(w){if(document.activeElement===M&&!(R||C.inComposition||b.$mouseHandler.isMousePressed)&&!C.copied){var d=M.selectionStart,u=M.selectionEnd,v=null,L=0;if(d==0?v=i.up:d==1?v=i.home:u>
160C.lastSelectionEnd&&C.lastValue[u]==` 161`?v=i.end:d<C.lastSelectionStart&&C.lastValue[d-1]==" "?(v=i.left,L=s.option):d<C.lastSelectionStart||d==C.lastSelectionStart&&C.lastSelectionEnd!=C.lastSelectionStart&&d==u?v=i.left:u>C.lastSelectionEnd&&C.lastValue.slice(0,u).split(` 162`).length>2?v=i.down:u>C.lastSelectionEnd&&C.lastValue[u-1]==" "?(v=i.right,L=s.option):(u>C.lastSelectionEnd||u==C.lastSelectionEnd&&C.lastSelectionEnd!=C.lastSelectionStart&&d==u)&&(v=i.right),d!==u&&(L|=s.shift),v){var T=b.onCommandKey({},L,v);if(!T&&b.commands){v=i.keyCodeToString(v);var _=b.commands.findKeyCommand(L,v);_&&b.execCommand(_)}C.lastSelectionStart=d,C.lastSelectionEnd=u,C.resetSelection("")}}};document.addEventListener("selectionchange",y),b.on("destroy",function(){document.removeEventListener("selectionchange",y)})},g.prototype.onContextMenuClose=function(){var f=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){f.tempStyle&&(f.text.style.cssText=f.tempStyle,f.tempStyle=""),f.host.renderer.$isMousePressed=!1,f.host.renderer.$keepTextAreaAtCursor&&f.host.renderer.$moveTextAreaToCursor()},0)},g.prototype.$onContextMenu=function(f){this.host.textInput.onContextMenu(f),this.onContextMenuClose()},g.prototype.onKeyup=function(f){f.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},g.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},g.prototype.onCompositionStart=function(f){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){f.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var b=this.host.getSelectionRange();b.end.row=b.start.row,b.end.column=b.start.column,this.inComposition.markerRange=b,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},g.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var f=this.text.value;this.sendText(f),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},g.prototype.onCompositionEnd=function(f){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),f&&this.onInput())},g.prototype.onCut=function(f){this.doCopy(f,!0)},g.prototype.onCopy=function(f){this.doCopy(f,!1)},g.prototype.onPaste=function(f){var b=this.handleClipboardData(f);r.pasteCancelled()||(typeof b=="string"?(b&&this.host.onPaste(b,f),$.isIE&&setTimeout(this.resetSelection),x.preventDefault(f)):(this.text.value="",this.pasted=!0))},g.prototype.doCopy=function(f,b){var M=this,C=this.host.getCopyText();if(!C)return x.preventDefault(f);this.handleClipboardData(f,C)?(h&&(this.resetSelection(C),this.copied=C,setTimeout(function(){M.copied=!1},10)),b?this.host.onCut():this.host.onCopy(),x.preventDefault(f)):(this.copied=!0,this.text.value=C,this.text.select(),setTimeout(function(){M.copied=!1,M.resetSelection(),b?M.host.onCut():M.host.onCopy()}))},g.prototype.handleClipboardData=function(f,b,M){var C=f.clipboardData||window.clipboardData;if(!(!C||o)){var S=n||M?"Text":"text/plain";
162try{return b?C.setData(S,b)!==!1:C.getData(S)}catch(R){if(!M)return this.handleClipboardData(R,b,!0)}}},g.prototype.onInput=function(f){if(this.inComposition)return this.onCompositionUpdate();if(f&&f.inputType){if(f.inputType=="historyUndo")return this.host.execCommand("undo");if(f.inputType=="historyRedo")return this.host.execCommand("redo")}var b=this.text.value,M=this.sendText(b,!0);(b.length>e+100||c.test(M)||m&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},g.prototype.sendText=function(f,b){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),f&&this.host.onPaste(f),this.pasted=!1,"";for(var M=this.text.selectionStart,C=this.text.selectionEnd,S=this.lastSelectionStart,R=this.lastValue.length-this.lastSelectionEnd,y=f,w=f.length-M,d=f.length-C,u=0;S>0&&this.lastValue[u]==f[u];)u++,S--;for(y=y.slice(u),u=1;R>0&&this.lastValue.length-u>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-u]==f[f.length-u];)u++,R--;w-=u-1,d-=u-1;var v=y.length-u+1;if(v<0&&(S=-v,v=0),y=y.slice(0,v),!b&&!y&&!w&&!S&&!R&&!d)return"";this.sendingText=!0;var L=!1;return $.isAndroid&&y==". "&&(y=" ",L=!0),y&&!S&&!R&&!w&&!d||this.commandMode?this.host.onTextInput(y):this.host.onTextInput(y,{extendLeft:S,extendRight:R,restoreStart:w,restoreEnd:d}),this.sendingText=!1,this.lastValue=f,this.lastSelectionStart=M,this.lastSelectionEnd=C,this.lastRestoreEnd=d,L?` 163`:y},g.prototype.onSelect=function(f){var b=this;if(!this.inComposition){var M=function(C){return C.selectionStart===0&&C.selectionEnd>=b.lastValue.length&&C.value===b.lastValue&&b.lastValue&&C.selectionEnd!==b.lastSelectionEnd};this.copied?this.copied=!1:M(this.text)?(this.host.selectAll(),this.resetSelection()):m&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},g.prototype.$resetSelectionIOS=function(f){if(!(!this.$isFocused||this.copied&&!f||this.sendingText)){f||(f="");var b=` 164 ab`+f+`cde fg 165`;b!=this.text.value&&(this.text.value=this.lastValue=b);var M=4,C=4+(f.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=M||this.lastSelectionEnd!=C)&&this.text.setSelectionRange(M,C),this.lastSelectionStart=M,this.lastSelectionEnd=C}},g.prototype.$resetSelection=function(){var f=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var b=0,M=0,C="",S=function(_,D){for(var N=D,V=1;V<=_-f.rowStart&&V<2*f.numberOfExtraLines+1;V++)N+=f.host.session.getLine(_-V).length+1;return N};if(this.host.session){var R=this.host.selection,y=R.getRange(),w=R.cursor.row;w===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):w===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(w<this.rowStart-1||w>this.rowEnd+1)&&(this.rowStart=w>this.numberOfExtraLines?w-this.numberOfExtraLines:0,this.rowEnd=w>this.numberOfExtraLines?w+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var d=[],u=this.rowStart;u<=this.rowEnd;u++)d.push(this.host.session.getLine(u));if(C=d.join(` 166`),b=S(y.start.row,y.start.column),M=S(y.end.row,y.end.column),y.start.row<this.rowStart){var v=this.host.session.getLine(this.rowStart-1);b=y.start.row<this.rowStart-1?0:b,M+=v.length+1,C=v+` 167`+C}else if(y.end.row>this.rowEnd){var L=this.host.session.getLine(this.rowEnd+1);M=y.end.row>this.rowEnd+1?L.length:y.end.column,M+=C.length+1,C=C+` 168`+L}else m&&w>0&&(C=` 169`+C,M+=1,b+=1);C.length>e&&(b<e&&M<e?C=C.slice(0,e):(C=` 170`,b==M?b=M=0:(b=0,M=1)));var T=C+` 171 172`;T!=this.lastValue&&(this.text.value=this.lastValue=T,this.lastSelectionStart=this.lastSelectionEnd=T.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=M||this.lastSelectionStart!=b||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(b,M),this.lastSelectionStart=b,this.lastSelectionEnd=M}catch{}this.inComposition=!1}},g.prototype.setHost=function(f){this.host=f},g.prototype.setNumberOfExtraLines=function(f){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,f<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=f},g.prototype.setAriaLabel=function(){var f="";if(this.host.$textInputAriaLabel&&(f+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var b=this.host.session.selection.cursor.row;f+=A("text-input.aria-label","Cursor at row $0",[b+1])}this.text.setAttribute("aria-label",f)},g.prototype.setAriaOptions=function(f){f.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",f.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",f.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),f.role&&this.text.setAttribute("role",f.role),f.setLabel&&(this.text.setAttribute("aria-roledescription",A("text-input.aria-roledescription","editor")),this.setAriaLabel())}
172,g.prototype.focus=function(){var f=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||t||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var b=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var M=this.text.getBoundingClientRect().top!=0}catch{return}var C=[];if(M)for(var S=this.text.parentElement;S&&S.nodeType==1;)C.push(S),S.setAttribute("ace_nocontext","true"),!S.parentElement&&S.getRootNode?S=S.getRootNode().host:S=S.parentElement;this.text.focus({preventScroll:!0}),M&&C.forEach(function(R){R.removeAttribute("ace_nocontext")}),setTimeout(function(){f.text.style.position="",f.text.style.top=="0px"&&(f.text.style.top=b)},0)},g.prototype.blur=function(){this.text.blur()},g.prototype.isFocused=function(){return this.$isFocused},g.prototype.setInputHandler=function(f){this.inputHandler=f},g.prototype.getInputHandler=function(){return this.inputHandler},g.prototype.getElement=function(){return this.text},g.prototype.setCommandMode=function(f){this.commandMode=f,this.text.readOnly=!1},g.prototype.setReadOnly=function(f){this.commandMode||(this.text.readOnly=f)},g.prototype.setCopyWithEmptySelection=function(f){},g.prototype.onContextMenu=function(f){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:f}),this.moveToMouse(f,!0)},g.prototype.moveToMouse=function(f,b){var M=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(b?"z-index:100000;":"")+($.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var C=this.host.container.getBoundingClientRect(),S=a.computedStyle(this.host.container),R=C.top+(parseInt(S.borderTopWidth)||0),y=C.left+(parseInt(S.borderLeftWidth)||0),w=C.bottom-R-this.text.clientHeight-2,d=function(u){a.translate(M.text,u.clientX-y-2,Math.min(u.clientY-R-2,w))};d(f),f.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),$.isWin&&x.capture(this.host.container,d,this.onContextMenuClose.bind(this)))},g.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},g})();k.TextInput=p,k.$setUserAgentForTests=function(g,f){m=g,h=f}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(E,k,H){var x=E("../lib/useragent"),A=0,$=550,a=(function(){function o(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(i){n[i]=this[i]},this),n.selectByLines=this.extendSelectionBy.bind(n,"getLineRange"),n.selectByWords=this.extendSelectionBy.bind(n,"getWordRange")}return o.prototype.onMouseDown=function(n){var t=n.inSelection(),e=n.getDocumentPosition();this.mousedownEvent=n;var i=this.editor,s=n.getButton();
172if(s!==0){var h=i.getSelectionRange(),c=h.isEmpty();(c||s==1)&&i.selection.moveToPosition(e),s==2&&(i.textInput.onContextMenu(n.domEvent),x.isMozilla||n.preventDefault());return}if(this.mousedownEvent.time=Date.now(),t&&!i.isFocused()&&(i.focus(),this.$focusTimeout&&!this.$clickSelection&&!i.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(n);return}return this.captureMouse(n),this.startSelect(e,n.domEvent._clicks>1),n.preventDefault()},o.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"))},o.prototype.select=function(){var n,t=this.editor,e=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(e);if(i==-1)n=this.$clickSelection.end;else if(i==1)n=this.$clickSelection.start;else{var s=r(this.$clickSelection,e,t.session);e=s.cursor,n=s.anchor}t.selection.setSelectionAnchor(n.row,n.column)}t.selection.selectToPosition(e),t.renderer.scrollCursorIntoView()},o.prototype.extendSelectionBy=function(n){var t,e=this.editor,i=e.renderer.screenToTextCoordinates(this.x,this.y),s=e.selection[n](i.row,i.column);if(this.$clickSelection){var h=this.$clickSelection.comparePoint(s.start),c=this.$clickSelection.comparePoint(s.end);if(h==-1&&c<=0)t=this.$clickSelection.end,(s.end.row!=i.row||s.end.column!=i.column)&&(i=s.start);else if(c==1&&h>=0)t=this.$clickSelection.start,(s.start.row!=i.row||s.start.column!=i.column)&&(i=s.end);else if(h==-1&&c==1)i=s.end,t=s.start;else{var m=r(this.$clickSelection,i,e.session);
172i=m.cursor,t=m.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(i),e.renderer.scrollCursorIntoView()},o.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},o.prototype.focusWait=function(){var n=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(n>A||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},o.prototype.onDoubleClick=function(n){var t=n.getDocumentPosition(),e=this.editor,i=e.session,s=i.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()},o.prototype.onTripleClick=function(n){var t=n.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var i=e.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=e.selection.getLineRange(i.start.row),this.$clickSelection.end=e.selection.getLineRange(i.end.row).end):this.$clickSelection=e.selection.getLineRange(t.row),this.select()},o.prototype.onQuadClick=function(n){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},o.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,i=n.domEvent.timeStamp,s=i-e.t,h=s?n.wheelX/s:e.vx,c=s?n.wheelY/s:e.vy;s<$&&(h=(h+e.vx)/2,c=(c+e.vy)/2);var m=Math.abs(h/c),p=!1;if(m>=1&&t.renderer.isScrollableBy(n.wheelX*n.speed,0)&&(p=!0),m<=1&&t.renderer.isScrollableBy(0,n.wheelY*n.speed)&&(p=!0),p)e.allowed=i;else if(i-e.allowed<$){var g=Math.abs(h)<=1.5*Math.abs(e.vx)&&Math.abs(c)<=1.5*Math.abs(e.vy);g?(p=!0,e.allowed=i):e.allowed=0}if(e.t=i,e.vx=h,e.vy=c,p)return t.renderer.scrollBy(n.wheelX*n.speed,n.wheelY*n.speed),n.stop()}},o})();a.prototype.selectEnd=a.prototype.selectByLinesEnd,a.prototype.selectAllEnd=a.prototype.selectByLinesEnd,a.prototype.selectByWordsEnd=a.prototype.selectByLinesEnd,
172k.DefaultHandlers=a;function l(o,n,t,e){return Math.sqrt(Math.pow(t-o,2)+Math.pow(e-n,2))}function r(o,n,t){if(o.start.row==o.end.row)var e=2*n.column-o.start.column-o.end.column;else if(o.start.row==o.end.row-1&&!o.start.column&&!o.end.column)var e=3*n.column-2*t.getLine(o.start.row).length;else var e=2*n.row-o.start.row-o.end.row;return e<0?{cursor:o.start,anchor:o.end}:{cursor:o.end,anchor:o.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(E,k,H){var x=E("../lib/event"),A=E("../lib/useragent"),$=(function(){function a(l,r){this.speed,this.wheelX,this.wheelY,this.domEvent=l,this.editor=r,this.x=this.clientX=l.clientX,this.y=this.clientY=l.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){x.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){x.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.getGutterRow=function(){var l=this.getDocumentPosition().row,r=this.editor.session.documentToScreenRow(l,0),o=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return r-o},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var l=this.editor,r=l.getSelectionRange();if(r.isEmpty())this.$inSelection=!1;else{var o=this.getDocumentPosition();this.$inSelection=r.contains(o.row,o.column)}return this.$inSelection},a.prototype.getButton=function(){return x.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return A.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a})();k.MouseEvent=$}),ace.define("ace/lib/scroll",["require","exports","module"],function(E,k,H){k.preventParentScroll=function(A){A.stopPropagation();var $=A.currentTarget,a=$.scrollHeight>$.clientHeight;a||A.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(E,k,H){var x=this&&this.__extends||(function(){var i=function(s,h){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,m){c.__proto__=m}||function(c,m){for(var p in m)Object.prototype.hasOwnProperty.call(m,p)&&(c[p]=m[p])},i(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");i(s,h);function c(){this.constructor=s}s.prototype=h===null?Object.create(h):(c.prototype=h.prototype,new c)}})(),A=this&&this.__values||function(i){var s=typeof Symbol=="function"&&Symbol.iterator,h=s&&i[s],c=0;if(h)return h.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&c>=i.length&&(i=void 0),{value:i&&i[c++],done:!i}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},$=E("./lib/dom");E("./lib/event");var a=E("./range").Range,l=E("./lib/scroll").preventParentScroll,r="ace_tooltip",o=(function(){function i(s){this.isOpen=!1,this.$element=null,this.$parentNode=s}return i.prototype.$init=function(){return this.$element=$.createElement("div"),this.$element.className=r,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},i.prototype.getElement=function(){return this.$element||this.$init()},i.prototype.setText=function(s){this.getElement().textContent=s},i.prototype.setHtml=function(s){this.getElement().innerHTML=s},i.prototype.setPosition=function(s,h){this.getElement().style.left=s+"px",this.getElement().style.top=h+"px"},i.prototype.setClassName=function(s){$.addCssClass(this.getElement(),s)},i.prototype.setTheme=function(s){this.theme&&(this.theme.isDark&&$.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&$.removeCssClass(this.getElement(),this.theme.cssClass)),s.isDark&&$.addCssClass(this.getElement(),"ace_dark"),s.cssClass&&$.addCssClass(this.getElement(),s.cssClass),this.theme={
172isDark:s.isDark,cssClass:s.cssClass}},i.prototype.show=function(s,h,c){s!=null&&this.setText(s),h!=null&&c!=null&&this.setPosition(h,c),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},i.prototype.hide=function(s){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=r,this.isOpen=!1)},i.prototype.getHeight=function(){return this.getElement().offsetHeight},i.prototype.getWidth=function(){return this.getElement().offsetWidth},i.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},i})(),n=(function(){function i(){this.popups=[]}return i.prototype.addPopup=function(s){this.popups.push(s),this.updatePopups()},i.prototype.removePopup=function(s){var h=this.popups.indexOf(s);h!==-1&&(this.popups.splice(h,1),this.updatePopups())},i.prototype.updatePopups=function(){var s,h,c,m;this.popups.sort(function(y,w){return w.priority-y.priority});var p=[];try{for(var g=A(this.popups),f=g.next();!f.done;f=g.next()){var b=f.value,M=!0;try{for(var C=(c=void 0,A(p)),S=C.next();!S.done;S=C.next()){var R=S.value;if(this.doPopupsOverlap(R,b)){M=!1;break}}}catch(y){c={error:y}}finally{try{S&&!S.done&&(m=C.return)&&m.call(C)}finally{if(c)throw c.error}}M?p.push(b):b.hide()}}catch(y){s={error:y}}finally{try{f&&!f.done&&(h=g.return)&&h.call(g)}finally{if(s)throw s.error}}},i.prototype.doPopupsOverlap=function(s,h){var c=s.getElement().getBoundingClientRect(),m=h.getElement().getBoundingClientRect();return c.left<m.right&&c.right>m.left&&c.top<m.bottom&&c.bottom>m.top},i})(),t=new n;k.popupManager=t,k.Tooltip=o;var e=(function(i){x(s,i);function s(h){h===void 0&&(h=document.body);var c=i.call(this,h)||this;c.timeout=void 0,c.lastT=0,c.idleTime=350,c.lastEvent=void 0,c.onMouseOut=c.onMouseOut.bind(c),c.onMouseMove=c.onMouseMove.bind(c),c.waitForHover=c.waitForHover.bind(c),c.hide=c.hide.bind(c);var m=c.getElement();return m.style.whiteSpace="pre-wrap",m.style.pointerEvents="auto",m.addEventListener("mouseout",c.onMouseOut),m.tabIndex=-1,m.addEventListener("blur",(function(){m.contains(document.activeElement)||this.hide()}).bind(c)),m.addEventListener("wheel",l),c}return s.prototype.addToEditor=function(h){h.on("mousemove",this.onMouseMove),h.on("mousedown",this.hide);var c=h.renderer.getMouseEventTarget();c&&typeof c.removeEventListener=="function"&&c.addEventListener("mouseout",this.onMouseOut,!0)},s.prototype.removeFromEditor=function(h){h.off("mousemove",this.onMouseMove),h.off("mousedown",this.hide);var c=h.renderer.getMouseEventTarget();c&&typeof c.removeEventListener=="function"&&c.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},s.prototype.onMouseMove=function(h,c){this.lastEvent=h,this.lastT=Date.now();var m=c.$mouseHandler.isMousePressed;if(this.isOpen){var p=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(p.row,p.column)||m||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||m||(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 c=h.editor,m=h.getDocumentPosition(),p=c.session.getLine(m.row);if(m.column==p.length){var g=c.renderer.pixelToScreenCoordinates(h.clientX,h.clientY),f=c.session.documentToScreenPosition(m.row,m.column);if(f.column!=g.column||f.row!=g.row)return!0}return!1},s.prototype.setDataProvider=function(h){this.$gatherData=h},s.prototype.showForRange=function(h,c,m,p){if(!(p&&p!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var g=h.renderer;this.isOpen||(t.addPopup(this),this.$registerCloseEvents(),this.setTheme(g.theme)),this.isOpen=!0,this.range=a.fromPoints(c.start,c.end);var f=g.textToScreenCoordinates(c.start.row,c.start.column),b=g.scroller.getBoundingClientRect();f.pageX<b.left&&(f.pageX=b.left);var M=this.getElement();M.innerHTML="",M.appendChild(m),M.style.maxHeight="",M.style.display="block",this.$setPosition(h,f,!0,c),$.$fixPositionBug(M)}},s.prototype.$setPosition=function(h,c,m,p){var g=10;m&&this.addMarker(p,h.session);var f=h.renderer,b=this.getElement(),M=b.offsetHeight,C=b.offsetWidth,S=c.pageY,R=c.pageX,y=window.innerHeight-S-f.lineHeight,w=this.$shouldPlaceAbove(M,S,y-g);b.style.maxHeight=(w?S:y)-g+"px",b.style.top=w?"":S+f.lineHeight+"px",b.style.bottom=w?window.innerHeight-S+"px":"",b.style.left=Math.min(R,window.innerWidth-C-g)+"px"},s.prototype.$shouldPlaceAbove=function(h,c,m){return!(c-h<0&&c<m)},s.prototype.addMarker=function(h,c){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=c,this.marker=c&&c.addMarker(h,"ace_highlight-marker","text")},s.prototype.hide=function(h){h&&this.$fromKeyboard&&h.type=="keydown"&&h.co
172de=="Escape"||!h&&document.activeElement==this.getElement()||h&&h.target&&(h.type!="keydown"||h.ctrlKey||h.metaKey)&&this.$element.contains(h.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,t.removePopup(this)))},s.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},s.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},s.prototype.onMouseOut=function(h){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!h.relatedTarget||this.getElement().contains(h.relatedTarget)||h&&h.currentTarget.contains(h.relatedTarget)||h.relatedTarget.classList.contains("ace_content")||this.hide())},s})(o);k.HoverTooltip=e}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(E,k,H){var x=this&&this.__extends||(function(){var e=function(i,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,c){h.__proto__=c}||function(h,c){for(var m in c)Object.prototype.hasOwnProperty.call(c,m)&&(h[m]=c[m])},e(i,s)};return function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(i,s);function h(){this.constructor=i}i.prototype=s===null?Object.create(s):(h.prototype=s.prototype,new h)}})(),A=this&&this.__values||function(e){var i=typeof Symbol=="function"&&Symbol.iterator,s=i&&e[i],h=0;if(s)return s.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&h>=e.length&&(e=void 0),{value:e&&e[h++],done:!e}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},$=E("../lib/dom"),a=E("./mouse_event").MouseEvent,l=E("../tooltip").HoverTooltip,r=E("../config").nls,o=E("../range").Range;function n(e){var i=e.editor,s=i.renderer.$gutterLayer;e.$tooltip=new t(i),e.$tooltip.addToEditor(i),e.$tooltip.setDataProvider(function(h,c){var m=h.getDocumentPosition().row;e.$tooltip.showTooltip(m)}),e.editor.setDefaultHandler("guttermousedown",function(h){if(!(!i.isFocused()||h.getButton()!=0)){var c=s.getRegion(h);if(c!="foldWidgets"){var m=h.getDocumentPosition().row,p=i.session.selection;if(h.getShiftKey())p.selectTo(m,0);else{if(h.domEvent.detail==2)return i.selectAll(),h.preventDefault();e.$clickSelection=i.selection.getLineRange(m)}return e.setState("selectByLines"),e.captureMouse(h),h.preventDefault()}}})}k.GutterHandler=n;var t=(function(e){x(i,e);function i(s){var h=e.call(this,s.container)||this;h.id="gt"+ ++i.$uid,h.editor=s,h.visibleTooltipRow;var c=h.getElement();return c.setAttribute("role","tooltip"),c.setAttribute("id",h.id),c.style.pointerEvents="auto",h.idleTime=50,h.onDomMouseMove=h.onDomMouseMove.bind(h),h.onDomMouseOut=h.onDomMouseOut.bind(h),h.setClassName("ace_gutter-tooltip"),h}return i.prototype.onDomMouseMove=function(s){var h=new a(s,this.editor);this.onMouseMove(h,this.editor)},i.prototype.onDomMouseOut=function(s){var h=new a(s,this.editor);this.onMouseOut(h)},i.prototype.addToEditor=function(s){var h=s.renderer.$gutter;h.addEventListener("mousemove",this.onDomMouseMove),h.addEventListener("mouseout",this.onDomMouseOut),e.prototype.addToEditor.call(this,s)},i.prototype.removeFromEditor=function(s){var h=s.renderer.$gutter;h.removeEventListener("mousemove",this.onDomMouseMove),h.removeEventListener("mouseout",this.onDomMouseOut),e.prototype.removeFromEditor.call(this,s)},i.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),e.prototype.destroy.call(this)},Object.defineProperty(i,"annotationLabels",{get:function(){return{error:{singular:r("gutter-tooltip.aria-label.error.singular","error"),plural:r("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:r("gutter-tooltip.aria-label.security.singular","security finding"),plural:r("gutter-tooltip.aria-label.security.plural","security findings")},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")},hint:{singular:r("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:r("gutter-tooltip.aria-label.hint.plural","suggestions")}}}
172,enumerable:!1,configurable:!0}),i.prototype.showTooltip=function(s){var h,c=this.editor.renderer.$gutterLayer,m=c.$annotations[s],p;m?p={displayText:Array.from(m.displayText),type:Array.from(m.type)}:p={displayText:[],type:[]};var g=c.session.getFoldLine(s);if(g&&c.$showFoldedAnnotations){for(var f={error:[],security:[],warning:[],info:[],hint:[]},b={error:1,security:2,warning:3,info:4,hint:5},M,C=s+1;C<=g.end.row;C++)if(c.$annotations[C])for(var S=0;S<c.$annotations[C].text.length;S++){var R=c.$annotations[C].type[S];f[R].push(c.$annotations[C].text[S]),(!M||b[R]<b[M])&&(M=R)}if(["error","security","warning"].includes(M)){var y="".concat(i.annotationsToSummaryString(f)," in folded code.");p.displayText.push(y),p.type.push(M+"_fold")}}if(p.displayText.length===0)return this.hide();for(var w={error:[],security:[],warning:[],info:[],hint:[]},d=c.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",C=0;C<p.displayText.length;C++){var u=$.createElement("span"),v=$.createElement("span");(h=v.classList).add.apply(h,["ace_".concat(p.type[C]),d]),v.setAttribute("aria-label","".concat(i.annotationLabels[p.type[C].replace("_fold","")].singular)),v.setAttribute("role","img"),v.appendChild($.createTextNode(" ")),u.appendChild(v),u.appendChild($.createTextNode(p.displayText[C])),u.appendChild($.createElement("br")),w[p.type[C].replace("_fold","")].push(u)}var L=$.createElement("span");w.error.forEach(function(D){return L.appendChild(D)}),w.security.forEach(function(D){return L.appendChild(D)}),w.warning.forEach(function(D){return L.appendChild(D)}),w.info.forEach(function(D){return L.appendChild(D)}),w.hint.forEach(function(D){return L.appendChild(D)}),L.setAttribute("aria-live","polite");var T=this.$findLinkedAnnotationNode(s);T&&T.setAttribute("aria-describedby",this.id);var _=o.fromPoints({row:s,column:0},{row:s,column:0});this.showForRange(this.editor,_,L),this.visibleTooltipRow=s,this.editor._signal("showGutterTooltip",this)},i.prototype.$setPosition=function(s,h,c,m){var p=this.$findCellByRow(m.start.row);if(p){var g=p&&p.element,f=g&&g.querySelector(".ace_gutter_annotation");if(f){var b=f.getBoundingClientRect();if(b){var M={pageX:b.right,pageY:b.top};return e.prototype.$setPosition.call(this,s,M,!1,m)}}}},i.prototype.$shouldPlaceAbove=function(s,h,c){return c<s},i.prototype.$findLinkedAnnotationNode=function(s){var h=this.$findCellByRow(s);if(h){var c=h.element;if(c.childNodes.length>2)return c.childNodes[2]}},i.prototype.$findCellByRow=function(s){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(h){return h.row===s})},i.prototype.hide=function(s){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var h=this.$findLinkedAnnotationNode(this.visibleTooltipRow);h&&h.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),e.prototype.hide.call(this,s)}},i.annotationsToSummaryString=function(s){var h,c,m=[],p=["error","security","warning","info","hint"];try{for(var g=A(p),f=g.next();!f.done;f=g.next()){var b=f.value;if(s[b].length){var M=s[b].length===1?i.annotationLabels[b].singular:i.annotationLabels[b].plural;m.push("".concat(s[b].length," ").concat(M))}}}catch(C){h={error:C}}finally{try{f&&!f.done&&(c=g.return)&&c.call(g)}finally{if(h)throw h.error}}return m.join(", ")},i.prototype.isOutsideOfText=function(s){var h=s.editor,c=h.renderer.$gutter.getBoundingClientRect();return!(s.clientX>=c.left&&s.clientX<=c.right&&s.clientY>=c.top&&s.clientY<=c.bottom)},i})(l);t.$uid=0,k.GutterTooltip=t}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(E,k,H){var x=E("../lib/dom"),A=E("../lib/event"),$=E("../lib/useragent"),a=200,l=200,r=5;function o(t){var e=t.editor,i=x.createElement("div");i.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",i.textContent="Â ";var s=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];s.forEach(function(F){t[F]=this[F]},this),e.on("mousedown",this.onMouseDown.bind(t));var h=e.container,c,m,p,g,f,b,M=0,C,S,R,y,w;this.onDragStart=function(F){if(this.cancelDrag||!h.draggable){var W=this;return setTimeout(function(){W.startSelect(),W.captureMouse(F)}
172,0),F.preventDefault()}f=e.getSelectionRange();var B=F.dataTransfer;B.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(i),B.setDragImage&&B.setDragImage(i,0,0),setTimeout(function(){e.container.removeChild(i)}),B.clearData(),B.setData("Text",e.session.getTextRange()),S=!0,this.setState("drag")},this.onDragEnd=function(F){if(h.draggable=!1,S=!1,this.setState(null),!e.getReadOnly()){var W=F.dataTransfer.dropEffect;!C&&W=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(F){if(!(e.getReadOnly()||!N(F.dataTransfer)))return m=F.clientX,p=F.clientY,c||L(),M++,F.dataTransfer.dropEffect=C=V(F),A.preventDefault(F)},this.onDragOver=function(F){if(!(e.getReadOnly()||!N(F.dataTransfer)))return m=F.clientX,p=F.clientY,c||(L(),M++),_!==null&&(_=null),F.dataTransfer.dropEffect=C=V(F),A.preventDefault(F)},this.onDragLeave=function(F){if(M--,M<=0&&c)return T(),C=null,A.preventDefault(F)},this.onDrop=function(F){if(b){var W=F.dataTransfer;if(S)switch(C){case"move":f.contains(b.row,b.column)?f={start:b,end:b}:f=e.moveText(f,b);break;case"copy":f=e.moveText(f,b,!0);break}else{var B=W.getData("Text");f={start:b,end:e.session.insert(b,B)},e.focus(),C=null}return T(),A.preventDefault(F)}},A.addListener(h,"dragstart",this.onDragStart.bind(t),e),A.addListener(h,"dragend",this.onDragEnd.bind(t),e),A.addListener(h,"dragenter",this.onDragEnter.bind(t),e),A.addListener(h,"dragover",this.onDragOver.bind(t),e),A.addListener(h,"dragleave",this.onDragLeave.bind(t),e),A.addListener(h,"drop",this.onDrop.bind(t),e);function d(F,W){var B=Date.now(),z=!W||F.row!=W.row,P=!W||F.column!=W.column;if(!y||z||P)e.moveCursorToPosition(F),y=B,w={x:m,y:p};else{var U=n(w.x,w.y,m,p);U>r?y=null:B-y>=l&&(e.renderer.scrollCursorIntoView(),y=null)}}function u(F,W){var B=Date.now(),z=e.renderer.layerConfig.lineHeight,P=e.renderer.layerConfig.characterWidth,U=e.renderer.scroller.getBoundingClientRect(),Y={x:{left:m-U.left,right:U.right-m},y:{top:p-U.top,bottom:U.bottom-p}},j=Math.min(Y.x.left,Y.x.right),X=Math.min(Y.y.top,Y.y.bottom),q={row:F.row,column:F.column};j/P<=2&&(q.column+=Y.x.left<Y.x.right?-3:2),X/z<=1&&(q.row+=Y.y.top<Y.y.bottom?-1:1);var ne=F.row!=q.row,re=F.column!=q.column,te=!W||F.row!=W.row;ne||re&&!te?R?B-R>=a&&e.renderer.scrollCursorIntoView(q):R=B:R=null}function v(){var F=b;b=e.renderer.screenToTextCoordinates(m,p),d(b,F),u(b,F)}function L(){f=e.selection.toOrientedRange(),c=e.session.addMarker(f,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(g),v(),g=setInterval(v,20),M=0,A.addListener(document,"mousemove",D)}function T(){clearInterval(g),e.session.removeMarker(c),c=null,e.selection.fromOrientedRange(f),e.isFocused()&&!S&&e.$resetCursorStyle(),f=null,b=null,M=0,R=null,y=null,A.removeListener(document,"mousemove",D)}var _=null;function D(){_==null&&(_=setTimeout(function(){_!=null&&c&&T()},20))}function N(F){var W=F.types;return!W||Array.prototype.some.call(W,function(B){return B=="text/plain"||B=="Text"})}function V(F){var W=["copy","copymove","all","uninitialized"],B=["move","copymove","linkmove","all","uninitialized"],z=$.isMac?F.altKey:F.ctrlKey,P="uninitialized";try{P=F.dataTransfer.effectAllowed.toLowerCase()}catch{}var U="none";return z&&W.indexOf(P)>=0?U="copy":B.indexOf(P)>=0?U="move":W.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 i=$.isWin?"default":"move";t.renderer.setCursorStyle(i),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if($.isIE&&this.state=="dragReady"){var i=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>3&&e.dragDrop()}if(this.state==="dragWait"){var i=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;
172var e=this.editor,i=t.inSelection(),s=t.getButton(),h=t.domEvent.detail||1;if(h===1&&s===0&&i){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var c=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in c&&(c.unselectable="on"),e.getDragDelay()){if($.isWebKit){this.cancelDrag=!0;var m=e.container;m.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(o.prototype);function n(t,e,i,s){return Math.sqrt(Math.pow(i-t,2)+Math.pow(s-e,2))}k.DragdropHandler=o}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(E,k,H){var x=E("./mouse_event").MouseEvent,A=E("../lib/event"),$=E("../lib/dom");k.addTouchListeners=function(a,l){var r="scroll",o,n,t,e,i,s,h=0,c,m=0,p=0,g=0,f,b;function M(){var d=window.navigator&&window.navigator.clipboard,u=!1,v=function(){var _=l.getCopyText(),D=l.session.getUndoManager().hasUndo();b.replaceChild($.buildDom(u?["span",!_&&L("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],_&&L("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],_&&L("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],d&&L("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],D&&L("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],L("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],L("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),b.firstChild)},L=function(_){return l.commands.canExecute(_,l)},T=function(_){var D=_.target.getAttribute("action");if(D=="more"||!u)return u=!u,v();D=="paste"?d.readText().then(function(N){l.execCommand(D,N)}):D&&((D=="cut"||D=="copy")&&(d?d.writeText(l.getCopyText()):document.execCommand("copy")),l.execCommand(D)),b.firstChild.style.display="none",u=!1,D!="openCommandPalette"&&l.focus()};b=$.buildDom(["div",{class:"ace_mobile-menu",onclick:T},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],l.container),b.addEventListener("touchstart",function(_){r="menu",_.stopPropagation(),_.preventDefault(),l.textInput.focus()}),b.addEventListener("touchend",function(_){_.stopPropagation(),_.preventDefault(),T(_)})}function C(){if(!l.getOption("enableMobileMenu")){b&&S();return}b||M();var d=l.selection.cursor,u=l.renderer.textToScreenCoordinates(d.row,d.column),v=l.renderer.textToScreenCoordinates(0,0).pageX,L=l.renderer.scrollLeft,T=l.container.getBoundingClientRect();b.style.top=u.pageY-T.top-3+"px",u.pageX-T.left<T.width-70?(b.style.left="",b.style.right="10px"):(b.style.right="",b.style.left=v+L-T.left+"px"),b.style.display="",b.firstChild.style.display="none",l.on("input",S)}function S(d){b&&(b.style.display="none"),l.off("input",S)}function R(){i=null,clearTimeout(i);var d=l.selection.getRange(),u=d.contains(c.row,c.column);(d.isEmpty()||!u)&&(l.selection.moveToPosition(c),l.selection.selectWord()),r="wait",C()}function y(){i=null,clearTimeout(i),l.selection.moveToPosition(c);var d=m>=2?l.selection.getLineRange(c.row):l.session.getBracketRange(c);d&&!d.isEmpty()?l.selection.setRange(d):l.selection.selectWord(),r="wait"}A.addListener(a,"contextmenu",function(d){if(f){var u=l.textInput.getElement();u.focus()}},l),A.addListener(a,"touchstart",function(d){var u=d.touches;if(i||u.length>1){clearTimeout(i),i=null,t=-1,r="zoom";return}f=l.$mouseHandler.isMousePressed=!0;var v=l.renderer.layerConfig.lineHeight,L=l.renderer.layerConfig.lineHeight,T=d.timeStamp;e=T;var _=u[0],D=_.clientX,N=_.clientY;Math.abs(o-D)+Math.abs(n-N)>v&&(t=-1),o=d.clientX=D,n=d.clientY=N,p=g=0;var V=new x(d,l);if(c=V.getDocumentPosition(),T-t<500&&u.length==1&&!h)m++,d.preventDefault(),d.button=0,y();else{m=0;var F=l.selection.cursor,W=l.selection.isEmpty()?F:l.selection.anchor,B=l.renderer.$cursorLayer.getPixelPosition(F,!0),z=l.renderer.$cursorLayer.getPixelPosition(W,!0),P=l.renderer.scroller.getBoundingClientRect(),U=l.renderer.layerConfig.offset,Y=l.renderer.scrollLeft,j=function(ne,re){return ne=ne/L,re=re/v-.75,ne*ne+re*re};if(d.clientX<P.left){r="zoom";return}var X=j(d.clientX-P.left-B.left+Y,d.clientY-P.top-B.top+U),q=j(d.clientX-P.left-z.left+Y,d.clientY-P.top-z.to
172p+U);X<3.5&&q<3.5&&(r=X>q?"cursor":"anchor"),q<3.5?r="anchor":X<3.5?r="cursor":r="scroll",i=setTimeout(R,450)}t=T},l),A.addListener(a,"touchend",function(d){f=l.$mouseHandler.isMousePressed=!1,s&&clearInterval(s),r=="zoom"?(r="",h=0):i?(l.selection.moveToPosition(c),h=0,C()):r=="scroll"?(w(),S()):C(),clearTimeout(i),i=null},l),A.addListener(a,"touchmove",function(d){i&&(clearTimeout(i),i=null);var u=d.touches;if(!(u.length>1||r=="zoom")){var v=u[0],L=o-v.clientX,T=n-v.clientY;if(r=="wait")if(L*L+T*T>4)r="cursor";else return d.preventDefault();o=v.clientX,n=v.clientY,d.clientX=v.clientX,d.clientY=v.clientY;var _=d.timeStamp,D=_-e;if(e=_,r=="scroll"){var N=new x(d,l);N.speed=1,N.wheelX=L,N.wheelY=T,10*Math.abs(L)<Math.abs(T)&&(L=0),10*Math.abs(T)<Math.abs(L)&&(T=0),D!=0&&(p=L/D,g=T/D),l._emit("mousewheel",N),N.propagationStopped||(p=g=0)}else{var V=new x(d,l),F=V.getDocumentPosition();r=="cursor"?l.selection.moveCursorToPosition(F):r=="anchor"&&l.selection.setSelectionAnchor(F.row,F.column),l.renderer.scrollCursorIntoView(F),d.preventDefault()}}},l);function w(){h+=60,s=setInterval(function(){h--<=0&&(clearInterval(s),s=null),Math.abs(p)<.01&&(p=0),Math.abs(g)<.01&&(g=0),h<20&&(p=.9*p),h<20&&(g=.9*g);var d=l.session.getScrollTop();l.renderer.scrollBy(10*p,10*g),d==l.session.getScrollTop()&&(h=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(E,k,H){var x=E("../lib/event"),A=E("../lib/useragent"),$=E("./default_handlers").DefaultHandlers,a=E("./default_gutter_handler").GutterHandler,l=E("./mouse_event").MouseEvent,r=E("./dragdrop_handler").DragdropHandler,o=E("./touch_handler").addTouchListeners,n=E("../config"),t=(function(){function e(i){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var s=this;this.editor=i,new $(this),new a(this),new r(this);var h=function(p){var g=!document.hasFocus||!document.hasFocus()||!i.isFocused()&&document.activeElement==(i.textInput&&i.textInput.getElement());g&&window.focus(),i.focus(),setTimeout(function(){i.isFocused()||i.focus()})},c=i.renderer.getMouseEventTarget();x.addListener(c,"click",this.onMouseEvent.bind(this,"click"),i),x.addListener(c,"mousemove",this.onMouseMove.bind(this,"mousemove"),i),x.addMultiMouseDownListener([c,i.renderer.scrollBarV&&i.renderer.scrollBarV.inner,i.renderer.scrollBarH&&i.renderer.scrollBarH.inner,i.textInput&&i.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",i),x.addMouseWheelListener(i.container,this.onMouseWheel.bind(this,"mousewheel"),i),o(i.container,i);var m=i.renderer.$gutter;x.addListener(m,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),i),x.addListener(m,"click",this.onMouseEvent.bind(this,"gutterclick"),i),x.addListener(m,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),i),x.addListener(m,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),i),x.addListener(c,"mousedown",h,i),x.addListener(m,"mousedown",h,i),A.isIE&&i.renderer.scrollBarV&&(x.addListener(i.renderer.scrollBarV.element,"mousedown",h,i),x.addListener(i.renderer.scrollBarH.element,"mousedown",h,i)),i.on("mousemove",function(p){if(!(s.state||s.$dragDelay||!s.$dragEnabled)){var g=i.renderer.screenToTextCoordinates(p.x,p.y),f=i.session.selection.getRange(),b=i.renderer;!f.isEmpty()&&f.insideStart(g.row,g.column)?b.setCursorStyle("default"):b.setCursorStyle("")}},i)}return e.prototype.onMouseEvent=function(i,s){this.editor.session&&this.editor._emit(i,new l(s,this.editor))},e.prototype.onMouseMove=function(i,s){var h=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!h||!h.length||this.editor._emit(i,new l(s,this.editor))},e.prototype.onMouseWheel=function(i,s){var h=new l(s,this.editor);h.speed=this.$scrollSpeed*2,h.wheelX=s.wheelX,h.wheelY=s.wheelY,this.editor._emit(i,h)},e.prototype.setState=function(i){this.state=i},e.prototype.captureMouse=function(i,s){this.x=i.x,this.y=i.y,this.isMousePressed=!0;var h=this.editor,c=this.editor.renderer;c.$isMousePressed=!0;var m=this,p=!0,g=function(S){if(S){if(A.isWebKit&&!S.which&&m.releaseMouse)return m.releaseMouse();
172m.x=S.clientX,m.y=S.clientY,s&&s(S),m.mouseEvent=new l(S,m.editor),m.$mouseMoved=!0}},f=function(S){h.off("beforeEndOperation",C),p=!1,h.session&&b(),m[m.state+"End"]&&m[m.state+"End"](S),m.state="",m.isMousePressed=c.$isMousePressed=!1,c.$keepTextAreaAtCursor&&c.$moveTextAreaToCursor(),m.$onCaptureMouseMove=m.releaseMouse=null,S&&m.onMouseEvent("mouseup",S),h.endOperation()},b=function(){m[m.state]&&m[m.state](),m.$mouseMoved=!1},M=function(){p&&(b(),x.nextFrame(M))};if(A.isOldIE&&i.domEvent.type=="dblclick")return setTimeout(function(){f(i)});var C=function(S){m.releaseMouse&&h.curOp.command.name&&h.curOp.selectionChanged&&(m[m.state+"End"]&&m[m.state+"End"](),m.state="",m.releaseMouse())};h.on("beforeEndOperation",C),h.startOperation({command:{name:"mouse"}}),m.$onCaptureMouseMove=g,m.releaseMouse=x.capture(this.editor.container,g,f),M()},e.prototype.cancelContextMenu=function(){var i=(function(s){s&&s.domEvent&&s.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",i),s&&s.domEvent&&x.stopEvent(s.domEvent))}).bind(this);setTimeout(i,10),this.editor.on("nativecontextmenu",i)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},e})();t.prototype.releaseMouse=null,n.defineOptions(t.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:A.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),k.MouseHandler=t}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(E,k,H){var x=E("../lib/dom"),A=(function(){function $(a){a.on("click",function(l){var r=l.getDocumentPosition(),o=a.session,n=o.getFoldAt(r.row,r.column,1);n&&(l.getAccelKey()?o.removeFold(n):o.expandFold(n),l.stop());var t=l.domEvent&&l.domEvent.target;t&&x.hasCssClass(t,"ace_inline_button")&&x.hasCssClass(t,"ace_toggle_wrap")&&(o.setOption("wrap",!o.getUseWrapMode()),a.renderer.scrollCursorIntoView())}),a.on("gutterclick",function(l){var r=a.renderer.$gutterLayer.getRegion(l);if(r=="foldWidgets"){var o=l.getDocumentPosition().row,n=a.session;n.foldWidgets&&n.foldWidgets[o]&&a.session.onFoldWidgetClick(o,l),a.isFocused()||a.focus(),l.stop()}}),a.on("gutterdblclick",function(l){var r=a.renderer.$gutterLayer.getRegion(l);if(r=="foldWidgets"){var o=l.getDocumentPosition().row,n=a.session,t=n.getParentFoldRangeData(o,!0),e=t.range||t.firstRange;if(e){o=e.start.row;var i=n.getFoldAt(o,n.getLine(o).length,1);i?n.removeFold(i):(n.addFold("...",e),a.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}l.stop()}})}return $})();k.FoldHandler=A}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(E,k,H){var x=E("../lib/keys"),A=E("../lib/event"),$=(function(){function a(l){this.$editor=l,this.$data={editor:l},this.$handlers=[],this.setDefaultHandler(l.commands)}return a.prototype.setDefaultHandler=function(l){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=l,this.addKeyboardHandler(l,0)},a.prototype.setKeyboardHandler=function(l){var r=this.$handlers;if(r[r.length-1]!=l){for(;r[r.length-1]&&r[r.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(r[r.length-1]);this.addKeyboardHandler(l,1)}},a.prototype.addKeyboardHandler=function(l,r){if(l){typeof l=="function"&&!l.handleKeyboard&&(l.handleKeyboard=l);var o=this.$handlers.indexOf(l);o!=-1&&this.$handlers.splice(o,1),r==null?this.$handlers.push(l):this.$handlers.splice(r,0,l),o==-1&&l.attach&&l.attach(this.$editor)}},a.prototype.removeKeyboardHandler=function(l){var r=this.$handlers.indexOf(l);return r==-1?!1:(this.$handlers.splice(r,1),l.detach&&l.detach(this.$editor),!0)},a.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},a.prototype.getStatusText=function(){var l=this.$data,r=l.editor;return this.$handlers.map(function(o){return o.getStatusText&&o.getStatusText(r,l)||""}).filter(Boolean).join(" ")},a.prototype.$callKeyboardHandlers=function(l,r,o,n){for(var t,e=!1,i=this.$editor.commands,s=this.$handlers.length;s--&&(t=this.$handlers[s].handleKeyboard(this.$data,l,r,o,n),!(!(!t||!t.command)&&(t.command=="null"?e=!0:e=i.exec(t.command,this.$editor,t.args,n),e&&n&&l!=-1&&t.passEvent!=!0&&t.command.passEvent!=!0&&A.stopEvent(n),e))););return!e&&l==-1&&(t={command:"insertstring"},e=i.exec("insertstring",this.$editor,r)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",t),e},a.prototype.onCommandKey=function(l,r,o){var n=x.keyCodeToString(o);return this.$callKeyboardHandlers(r,n,o,l)},a.prototype.onTextInput=function(l){return this.$callKeyboardHandlers(-1,l)},a})();k.KeyBinding=$}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(E,k,H){var x=0,A=0,$=!1,a=!1,l=!1,r=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],o=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],n=0,t=1,e=0,i=1,s=2,h=3,c=4,m=5,p=6,g=7,f=8,b=9,M=10,C=11,S=12,R=13,y=14,w=15,d=16,u=17,v=18,L=[v,v,v,v,v,v,v,v,v,p,m,p,f,m,v,v,v,v,v,v,v,v,v,v,v,v,v,v,m,m,m,p,f,c,c,C,C,C,c,c,c,c,c,M,b,M,b,b,s,s,s,s,s,s,s,s,s,s,b,c,c,c,c,c,c,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,c,c,c,c,c,c,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,c,c,c,c,v,v,v,v,v,v,m,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,b,c,C,
172C,C,C,c,c,c,c,e,c,c,v,c,c,C,C,s,s,c,e,c,c,c,s,e,c,c,c,c,c],T=[f,f,f,f,f,f,f,f,f,f,f,v,v,v,e,i,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,f,m,R,y,w,d,u,b,C,C,C,C,C,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,b,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,f];function _(F,W,B,z){var P=x?o:r,U=null,Y=null,j=null,X=0,q=null,ne=null,re=-1,te=null,le=null,Le=[];if(!z)for(te=0,z=[];te<B;te++)z[te]=V(F[te]);for(A=x,$=!1,a=!1,l=!1,le=0;le<B;le++){if(U=X,Le[le]=Y=N(F,z,Le,le),X=P[U][Y],q=X&240,X&=15,W[le]=j=P[X][5],q>0)if(q==16){for(te=re;te<le;te++)W[te]=1;re=-1}else re=-1;if(ne=P[X][6],ne)re==-1&&(re=le);else if(re>-1){for(te=re;te<le;te++)W[te]=j;re=-1}z[le]==m&&(W[le]=0),A|=j}if(l){for(te=0;te<B;te++)if(z[te]==p){W[te]=x;for(var me=te-1;me>=0&&z[me]==f;me--)W[me]=x}}}function D(F,W,B){if(!(A<F)){if(F==1&&x==t&&!a){B.reverse();return}for(var z=B.length,P=0,U,Y,j,X;P<z;){if(W[P]>=F){for(U=P+1;U<z&&W[U]>=F;)U++;for(Y=P,j=U-1;Y<j;Y++,j--)X=B[Y],B[Y]=B[j],B[j]=X;P=U}P++}}}function N(F,W,B,z){var P=W[z],U,Y,j,X;switch(P){case e:case i:$=!1;case c:case h:return P;case s:return $?h:s;case g:return $=!0,i;case f:return c;case b:return z<1||z+1>=W.length||(U=B[z-1])!=s&&U!=h||(Y=W[z+1])!=s&&Y!=h?c:($&&(Y=h),Y==U?Y:c);case M:return U=z>0?B[z-1]:m,U==s&&z+1<W.length&&W[z+1]==s?s:c;case C:if(z>0&&B[z-1]==s)return s;if($)return c;for(X=z+1,j=W.length;X<j&&W[X]==C;)X++;return X<j&&W[X]==s?s:c;case S:for(j=W.length,X=z+1;X<j&&W[X]==S;)X++;if(X<j){var q=F[z],ne=q>=1425&&q<=2303||q==64286;if(U=W[X],ne&&(U==i||U==g))return i}return z<1||(U=W[z-1])==m?c:B[z-1];case m:return $=!1,a=!0,x;case p:return l=!0,c;case R:case y:case d:case u:case w:$=!1;case v:return c}}function V(F){var W=F.charCodeAt(0),B=W>>8;return B==0?W>191?e:L[W]:B==5?/[\u0591-\u05f4]/.test(F)?i:e:B==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(F)?S:/[\u0660-\u0669\u066b-\u066c]/.test(F)?h:W==1642?C:/[\u06f0-\u06f9]/.test(F)?s:g:B==32&&W<=8287?T[W&255]:B==254&&W>=65136?g:c}k.L=e,k.R=i,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(F,W,B){if(F.length<2)return{};var z=F.split(""),P=new Array(z.length),U=new Array(z.length),Y=[];x=B?t:n,_(z,Y,z.length,W);for(var j=0;j<P.length;P[j]=j,j++);D(2,Y,P),D(1,Y,P);for(var j=0;j<P.length-1;j++)W[j]===h?Y[j]=k.AN:Y[j]===i&&(W[j]>g&&W[j]<R||W[j]===c||W[j]===v)?Y[j]=k.ON_R:j>0&&z[j-1]==="Ù"&&/\u0622|\u0623|\u0625|\u0627/.test(z[j])&&(Y[j-1]=Y[j]=k.R_H,j++);z[z.length-1]===k.DOT&&(Y[z.length-1]=k.B),z[0]==="â«"&&(Y[0]=k.RLE);for(var j=0;j<P.length;j++)U[j]=Y[P[j]];return{logicalFromVisual:P,bidiLevels:U}},k.hasBidiCharacters=function(F,W){for(var B=!1,z=0;z<F.length;z++)W[z]=V(F.charAt(z)),!B&&(W[z]==i||W[z]==g||W[z]==h)&&(B=!0);return B},k.getVisualFromLogicalIdx=function(F,W){for(var B=0;B<W.logicalFromVisual.length;B++)if(W.logicalFromVisual[B]==F)return B;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(E,k,H){var x=E("./lib/bidiutil"),A=E("./lib/lang"),$=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=(function(){function l(r){this.session=r,this.bidiMap={},this.currentRow=null,this.bidiUtil=x,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="â«",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=$.test(r.getValue())}return l.prototype.isBidiRow=function(r,o,n){return this.seenBidi?(r!==this.currentRow&&(this.currentRow=r,this.updateRowLine(o,n),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},l.prototype.onChange=function(r){this.seenBidi?this.currentRow=null:r.action=="insert"&&$.test(r.lines.join(` 173`))&&(this.seenBidi=!0,this.currentRow=null)},l.prototype.getDocumentRow=function(){var r=0,o=this.session.$screenRowCache;if(o.length){var n=this.session.$getRowCacheIndex(o,this.currentRow);n>=0&&(r=this.session.$docRowCache[n])}return r},l.prototype.getSplitIndex=function(){var r=0,o=this.session.$screenRowCache;if(o.length)for(var n,t=this.session.$getRowCacheIndex(o,this.currentRow);this.currentRow-r>0&&(n=this.session.$getRowCacheIndex(o,this.currentRow-r-1),n===t);)t=n,r++;else r=this.currentRow;return r},l.prototype.updateRowLine=function(r,o){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&&(o===void 0&&(o=this.getSplitIndex()),o>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[x.L],this.line=o<e.length?this.line.substring(e[o-1],e[o]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[o]),o==e.length&&(this.line+=this.showInvisibles?t:x.DOT))}else this.line+=this.showInvisibles?t:x.DOT;var i=this.session,s=0,h;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(c,m){return c===" "||i.isFullWidth(c.charCodeAt(0))?(h=c===" "?i.getScreenTabSize(m+s):2,s+=h-1,A.stringRepeat(x.DOT,h)):c}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==x.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},l.prototype.updateBidiMap=function(){var r=[];x.hasBidiCharacters(this.line,r)||this.isRtlDir?this.bidiMap=x.doBidiReorder(this.line,r,this.isRtlDir):this.bidiMap={}},l.prototype.markAsDirty=function(){this.currentRow=null},l.prototype.updateCharacterWidths=function(r){if(this.characterWidth!==r.$characterSize.width){this.fontMetrics=r;var o=this.characterWidth=r.$characterSize.width,n=r.$measureCharWidth("×");this.charWidths[x.L]=this.charWidths[x.EN]=this.charWidths[x.ON_R]=o,this.charWidths[x.R]=this.charWidths[x.AN]=n,this.charWidths[x.R_H]=n*.45,this.charWidths[x.B]=this.charWidths[x.RLE]=0,this.currentRow=null}},l.prototype.setShowInvisibles=function(r){this.showInvisibles=r,this.currentRow=null},l.prototype.setEolChar=function(r){this.EOL=r},l.prototype.setContentWidth=function(r){this.contentWidth=r},l.prototype.isRtlLine=function(r){return this.$isRtl?!0:r!=null?this.session.getLine(r).charAt(0)==this.RLE:this.isRtlDir},l.prototype.setRtlDirection=function(r,o){for(var n=r.getCursorPosition(),t=r.selection.getSelectionAnchor().row;t<=n.row;t++)!o&&r.session.getLine(t).charAt(0)===r.session.$bidiHandler.RLE?r.session.doc.removeInLine(t,0,1):o&&r.session.getLine(t).charAt(0)!==r.session.$bidiHandler.RLE&&r.session.doc.insert({column:0,row:t},r.session.$bidiHandler.RLE)},l.prototype.getPosLeft=function(r){r-=this.wrapIndent;var o=this.line.charAt(0)===this.RLE?1:0,n=r>o?this.session.getOverwrite()?r:r-1:o,t=x.getVisualFromLogicalIdx(n,this.bidiMap),e=this.bidiMap.bidiLevels,i=0;!this.session.getOverwrite()&&r<=o&&e[t]%2!==0&&t++;for(var s=0;s<t;s++)i+=this.charWidths[e[s]];return!this.session.getOverwrite()&&r>o&&e[t]%2===0&&(i+=this.charWidths[e[t]]),this.wrapIndent&&(i+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(i+=this.rtlLineOffset),i},l.prototype.getSelections=function(r,o){var n=this.bidiMap,t=n.bidiLevels,e,i=[],s=0,h=Math.min(r,o)-this.wrapIndent,c=Math.max(r,o)-this.wrapIndent,m=!1,p=!1,g=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var f,b=0;b<t.length;b++)f=n.logicalFromVisual[b],e=t[b],m=f>=h&&f<c,m&&!p?g=s:!m&&p&&i.push({left:g,width:s-g}),s+=this.charWidths[e],p=m;if(m&&b===t.length&&i.push({left:g,width:s-g}),this.isRtlDir)for(var M=0;M<i.length;M++)i[M].left+=this.rtlLineOffset;return i},l.prototype.offsetToCol=function(n){this.isRtlDir&&(n-=this.rtlLineOffset);var o=0,n=Math.max(n,0),t=0,e=0,i=this.bidiMap.bidiLevels,s=this.charWidths[i[e]];for(this.wrapIndent&&(n-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);n>t+s/2;){if(t+=s,e===i.length-1){s=0;break}s=this.charWidths[i[++e]]}return e>0&&i[e-1]%2!==0&&i[e]%2===0?(n<t&&e--,o=this.bidiMap.logicalFromVisual[e]):e>0&&i[e-1]%2===0&&i[e]%2!==0?o=1+(n>t?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===i.length-1&&s===0&&i[e-1]%2===0||!this.isRtlDir&&e===0&&i[e]%2!==0?o=1+this.bidiMap.logicalFromVisual[e]:(e>0&&i[e-1]%2!==0&&s!==0&&e--,o=this.bidiMap.logicalFromVisual[e]),o===0&&this.isRtlDir&&o++,o+this.wrapIndent},l})();k.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(E,k,H){var x=E("./lib/oop"),A=E("./lib/lang"),$=E("./lib/event_emitter").EventEmitter,a=E("./range").Range,l=(function(){function r(o){this.session=o,this.doc=o.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(o,n){this.$isEmpty=!1,this.anchor.setPosition(o,n)}
173,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 o=this.anchor,n=this.lead;return o.row>n.row||o.row==n.row&&o.column>n.column},r.prototype.getRange=function(){var o=this.anchor,n=this.lead;return this.$isEmpty?a.fromPoints(n,n):this.isBackwards()?a.fromPoints(n,o):a.fromPoints(o,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(o,n){var t=n?o.end:o.start,e=n?o.start:o.end;this.$setSelection(t.row,t.column,e.row,e.column)},r.prototype.$setSelection=function(o,n,t,e){if(!this.$silent){var i=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(o,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||i!=this.$isEmpty||s)&&this._emit("changeSelection")}},r.prototype.$moveSelection=function(o){var n=this.lead;this.$isEmpty&&this.setSelectionAnchor(n.row,n.column),o.call(this)},r.prototype.selectTo=function(o,n){this.$moveSelection(function(){this.moveCursorTo(o,n)})},r.prototype.selectToPosition=function(o){this.$moveSelection(function(){this.moveCursorToPosition(o)})},r.prototype.moveTo=function(o,n){this.clearSelection(),this.moveCursorTo(o,n)},r.prototype.moveToPosition=function(o){this.clearSelection(),this.moveCursorToPosition(o)},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(o,n){if(typeof n>"u"){var t=o||this.lead;o=t.row,n=t.column}return this.session.getWordRange(o,n)},r.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},r.prototype.selectAWord=function(){var o=this.getCursor(),n=this.session.getAWordRange(o.row,o.column);this.setSelectionRange(n)},r.prototype.getLineRange=function(o,n){var t=typeof o=="number"?o:this.lead.row,e,i=this.session.getFoldLine(t);return i?(t=i.start.row,e=i.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(o,n,t){var e=o.column,i=o.column+n;return t<0&&(e=o.column-n,i=o.column),this.session.isTabStop(o)&&this.doc.getLine(o.row).slice(e,i).split(" ").length-1==n},r.prototype.moveCursorLeft=function(){var o=this.lead.getPosition(),n;if(n=this.session.getFoldAt(o.row,o.column,-1))this.moveCursorTo(n.start.row,n.start.column);else if(o.column===0)o.row>0&&this.moveCursorTo(o.row-1,this.doc.getLine(o.row-1).length);else{var t=this.session.getTabSize();this.wouldMoveIntoSoftTab(o,t,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-t):this.moveCursorBy(0,-1)}},r.prototype.moveCursorRight=function(){var o=this.lead.getPosition(),n;if(n=this.session.getFoldAt(o.row,o.column,1))this.moveCursorTo(n.end.row,n.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var t=this.session.getTabSize(),o=this.lead;this.wouldMoveIntoSoftTab(o,t,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,t):this.moveCursorBy(0,1)}},r.prototype.moveCursorLineStart=function(){var o=this.lead.row,n=this.lead.column,t=this.session.documentToScreenRow(o,n),e=this.session.screenToDocumentPosition(t,0),i=this.session.getDisplayLine(o,null,e.row,e.column),s=i.match(/^\s*/);s[0].length!=n&&!this.session.$useEmacsStyleLineStart&&(e.column+=s[0].length),this.moveCursorToPosition(e)},r.prototype.moveCursorLineEnd=function(){var o=this.lead,n=this.session.getDocumentLastRowColumnPosition(o.row,o.column);if(this.lead.column==n.column){var t=this.session.getLine(n.row);if(n.column==t.length){var e=t.search(/\s+$/);e>0&&(n.column=e)}}this.moveCursorTo(n.row,n.column)},r.prototype.moveCursorFileEnd=function(){var o=this.doc.getLength()-1,n=this.doc.getLine(o).length;this.moveCursorTo(o,n)},r.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},r.prototype.moveCursorLongWordRight=function(){var o=this.lead.row,n=this.lead.column,t=this.doc.getLine(o),e=t.substring(n);
173this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var i=this.session.getFoldAt(o,n,1);if(i){this.moveCursorTo(i.end.row,i.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(o,t.length),this.moveCursorRight(),o<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(n+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,n)},r.prototype.moveCursorLongWordLeft=function(){var o=this.lead.row,n=this.lead.column,t;if(t=this.session.getFoldAt(o,n,-1)){this.moveCursorTo(t.start.row,t.start.column);return}var e=this.session.getFoldStringAt(o,n,-1);e==null&&(e=this.doc.getLine(o).substring(0,n));var i=A.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(i)&&(n-=this.session.nonTokenRe.lastIndex,i=i.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0){this.moveCursorTo(o,0),this.moveCursorLeft(),o>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(i)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,n)},r.prototype.$shortWordEndIndex=function(o){var n=0,t,e=/\s/,i=this.session.tokenRe;if(i.lastIndex=0,this.session.tokenRe.exec(o))n=this.session.tokenRe.lastIndex;else{for(;(t=o[n])&&e.test(t);)n++;if(n<1){for(i.lastIndex=0;(t=o[n])&&!i.test(t);)if(i.lastIndex=0,n++,e.test(t))if(n>2){n--;break}else{for(;(t=o[n])&&e.test(t);)n++;if(n>2)break}}}return i.lastIndex=0,n},r.prototype.moveCursorShortWordRight=function(){var o=this.lead.row,n=this.lead.column,t=this.doc.getLine(o),e=t.substring(n),i=this.session.getFoldAt(o,n,1);if(i)return this.moveCursorTo(i.end.row,i.end.column);if(n==t.length){var s=this.doc.getLength();do o++,e=this.doc.getLine(o);while(o<s&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),n=0}var h=this.$shortWordEndIndex(e);this.moveCursorTo(o,n+h)},r.prototype.moveCursorShortWordLeft=function(){var o=this.lead.row,n=this.lead.column,t;if(t=this.session.getFoldAt(o,n,-1))return this.moveCursorTo(t.start.row,t.start.column);var e=this.session.getLine(o).substring(0,n);if(n===0){do o--,e=this.doc.getLine(o);while(o>0&&/^\s*$/.test(e));n=e.length,/\s+$/.test(e)||(e="")}var i=A.stringReverse(e),s=this.$shortWordEndIndex(i);return this.moveCursorTo(o,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(o,n){var t=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(n===0&&(o!==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),o!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var i=this.session.lineWidgets[this.lead.row];o<0?o-=i.rowsAbove||0:o>0&&(o+=i.rowCount-(i.rowsAbove||0))}var s=this.session.screenToDocumentPosition(t.row+o,t.column,e);o!==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(o){this.moveCursorTo(o.row,o.column)},r.prototype.moveCursorTo=function(o,n,t){var e=this.session.getFoldAt(o,n,1);e&&(o=e.start.row,n=e.start.column),this.$keepDesiredColumnOnChange=!0;var i=this.session.getLine(o);/[\uDC00-\uDFFF]/.test(i.charAt(n))&&i.charAt(n-1)&&(this.lead.row==o&&this.lead.column==n+1?n=n-1:n=n+1),this.lead.setPosition(o,n),this.$keepDesiredColumnOnChange=!1,t||(this.$desiredColumn=null)},r.prototype.moveCursorToScreen=function(o,n,t){var e=this.session.screenToDocumentPosition(o,n);this.moveCursorTo(e.row,e.column,t)},r.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},r.prototype.fromOrientedRange=function(o){this.setSelectionRange(o,o.cursor==o.start),this.$desiredColumn=o.desiredColumn||this.$desiredColumn},r.prototype.toOrientedRange=function(o){var n=this.getRange();return o?(o.start.column=n.start.column,o.start.row=n.start.row,o.end.column=n.end.column,o.end.row=n.end.row):o=n,o.cursor=this.isBackwards()?o.start:o.end,o.desiredColumn=this.$desiredColumn,o},r.prototype.getRangeOfMovements=function(o){var n=this.getCursor();try{o(this);var t=this.getCursor();return a.fromPoints(n,t)}catch{return a.fromPoints(n,n)}finally{this.moveCursorToPosition(n)}},r.prototype.toJSON=function(){if(this.rangeCount)var o=this.ranges.map(function(n){var t=n.clone();return t.isBackwards=n.cursor==n.start,t});else{var o=this.getRange();o.isBackwards=this.isBackwards()}return o}
173,r.prototype.fromJSON=function(o){if(o.start==null)if(this.rangeList&&o.length>1){this.toSingleRange(o[0]);for(var n=o.length;n--;){var t=a.fromPoints(o[n].start,o[n].end);o[n].isBackwards&&(t.cursor=t.start),this.addRange(t,!0)}return}else o=o[0];this.rangeList&&this.toSingleRange(o),this.setSelectionRange(o,o.isBackwards)},r.prototype.isEqual=function(o){if((o.length||this.rangeCount)&&o.length!=this.rangeCount)return!1;if(!o.length||!this.ranges)return this.getRange().isEqual(o);for(var n=this.ranges.length;n--;)if(!this.ranges[n].isEqual(o[n]))return!1;return!0},r})();l.prototype.setSelectionAnchor=l.prototype.setAnchor,l.prototype.getSelectionAnchor=l.prototype.getAnchor,l.prototype.setSelectionRange=l.prototype.setRange,x.implement(l.prototype,$),k.Selection=l}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(E,k,H){var x=E("./lib/report_error").reportError,A=2e3,$=(function(){function a(l){this.splitRegex,this.states=l,this.regExps={},this.matchMappings={};for(var r in this.states){for(var o=this.states[r],n=[],t=0,e=this.matchMappings[r]={defaultToken:"text"},i="g",s=[],h=0;h<o.length;h++){var c=o[h];if(c.defaultToken&&(e.defaultToken=c.defaultToken),c.caseInsensitive&&i.indexOf("i")===-1&&(i+="i"),c.unicode&&i.indexOf("u")===-1&&(i+="u"),c.regex!=null){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var m=c.regex,p=new RegExp("(?:("+m+")|(.))").exec("a").length-2;Array.isArray(c.token)?c.token.length==1||p==1?c.token=c.token[0]:p-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:p-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):typeof c.token=="function"&&!c.onMatch&&(p>1?c.onMatch=this.$applyToken:c.onMatch=c.token),p>1&&(/\\\d/.test(c.regex)?m=c.regex.replace(/\\([0-9]+)/g,function(g,f){return"\\"+(parseInt(f,10)+t+1)}):(p=1,m=this.removeCapturingGroups(c.regex)),!c.splitRegex&&typeof c.token!="string"&&s.push(c)),e[t]=h,t+=p,n.push(m),c.onMatch||(c.onMatch=null)}}
173n.length||(e[0]=0,n.push("$")),s.forEach(function(g){g.splitRegex=this.createSplitterRegexp(g.regex,i)},this),this.regExps[r]=new RegExp("("+n.join(")|(")+")|($)",i)}}return a.prototype.$setMaxTokenCount=function(l){A=l|0},a.prototype.$applyToken=function(l){var r=this.splitRegex.exec(l).slice(1),o=this.token.apply(this,r);if(typeof o=="string")return[{type:o,value:l}];for(var n=[],t=0,e=o.length;t<e;t++)r[t]&&(n[n.length]={type:o[t],value:r[t]});return n},a.prototype.$arrayTokens=function(l){if(!l)return[];var r=this.splitRegex.exec(l);if(!r)return"text";for(var o=[],n=this.tokenArray,t=0,e=n.length;t<e;t++)r[t+1]&&(o[o.length]={type:n[t],value:r[t+1]});return o},a.prototype.removeCapturingGroups=function(l){var r=l.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(o,n){return n?"(?:":o});return r},a.prototype.createSplitterRegexp=function(l,r){if(l.indexOf("(?=")!=-1){var o=0,n=!1,t={};l.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,i,s,h,c,m){return n?n=c!="]":c?n=!0:h?(o==t.stack&&(t.end=m+1,t.stack=-1),o--):s&&(o++,s.length!=1&&(t.stack=o,t.start=m)),e}),t.end!=null&&/^\)*$/.test(l.substr(t.end))&&(l=l.substring(0,t.start)+l.substr(t.end))}return l.charAt(0)!="^"&&(l="^"+l),l.charAt(l.length-1)!="$"&&(l+="$"),new RegExp(l,(r||"").replace("g",""))},a.prototype.getLineTokens=function(l,r){if(r&&typeof r!="string"){var o=r.slice(0);r=o[0],r==="#tmp"&&(o.shift(),r=o.shift())}else var o=[];var n=r||"start",t=this.states[n];t||(n="start",t=this.states[n]);var e=this.matchMappings[n],i=this.regExps[n];i.lastIndex=0;for(var s,h=[],c=0,m=0,p={type:null,value:""};s=i.exec(l);){var g=e.defaultToken,f=null,b=s[0],M=i.lastIndex;if(M-b.length>c){var C=l.substring(c,M-b.length);p.type==g?p.value+=C:(p.type&&h.push(p),p={type:g,value:C})}for(var S=0;S<s.length-2;S++)if(s[S+1]!==void 0){f=t[e[S]],f.onMatch?g=f.onMatch(b,n,o,l):g=f.token,f.next&&(typeof f.next=="string"?n=f.next:n=f.next(n,o),t=this.states[n],t||(this.reportError("state doesn't exist",n),n="start",t=this.states[n]),e=this.matchMappings[n],c=M,i=this.regExps[n],i.lastIndex=M),f.consumeLineEnd&&(c=M);break}if(b){if(typeof g=="string")(!f||f.merge!==!1)&&p.type===g?p.value+=b:(p.type&&h.push(p),p={type:g,value:b});else if(g){p.type&&h.push(p),p={type:null,value:""};for(var S=0;S<g.length;S++)h.push(g[S])}}if(c==l.length)break;if(c=M,m++>A){for(m>2*l.length&&this.reportError("infinite loop with in ace tokenizer",{startState:r,line:l});c<l.length;)p.type&&h.push(p),p={value:l.substring(c,c+=500),type:"overflow"};n="start",o=[];break}}return p.type&&h.push(p),o.length>1&&o[0]!==n&&o.unshift("#tmp",n),{tokens:h,state:o.length?o:n}},a})();$.prototype.reportError=x,k.Tokenizer=$}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(E,k,H){var x=E("../lib/deep_copy").deepCopy,A;A=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(l,r){if(!r){for(var o in l)this.$rules[o]=l[o];return}for(var o in l){for(var n=l[o],t=0;t<n.length;t++){var e=n[t];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(r)!==0&&(e.next=r+e.next),e.nextState&&e.nextState.indexOf(r)!==0&&(e.nextState=r+e.nextState))}this.$rules[r+o]=n}},this.getRules=function(){return this.$rules},this.embedRules=function(l,r,o,n,t){var e=typeof l=="function"?new l().getRules():l;if(n)for(var i=0;i<n.length;i++)n[i]=r+n[i];else{n=[];for(var s in e)n.push(r+s)}if(this.addRules(e,r),o)for(var h=Array.prototype[t?"push":"unshift"],i=0;i<n.length;i++)h.apply(this.$rules[n[i]],x(o));this.$embeds||(this.$embeds=[]),this.$embeds.push(r)},this.getEmbeds=function(){return this.$embeds};var $=function(l,r){return(l!="start"||r.length)&&r.unshift(this.nextState,l),this.nextState},a=function(l,r){return r.shift(),r.shift()||"start"};this.normalizeRules=function(){var l=0,r=this.$rules;function o(n){var t=r[n];t.processed=!0;for(var e=0;e<t.length;e++){var i=t[e],s=null;Array.isArray(i)&&(s=i,i={}),!i.regex&&i.start&&(i.regex=i.start,i.next||(i.next=[]),i.next.push({defaultToken:i.token},{token:i.token+".end",regex:i.end||i.start,next:"pop"}),i.token=i.token+".start",i.push=!0);var h=i.next||i.push;if(h&&Array.isArray(h)){var c=i.stateName;c||(c=i.token,typeof c!="string"&&(c=c[0]||""),r[c]&&(c+=l++)),r[c]=h,i.next=c,o(c)}else h=="pop"&&(i.next=a);if(i.push&&(i.nextState=i.next||i.push,i.next=$,delete i.push),i.rules)for(var m in i.rules)r[m]?r[m].push&&r[m].push.apply(r[m],i.rules[m]):r[m]=i.rules[m];var p=typeof i=="string"?i:i.include;if(p&&(p==="$self"&&(p="start"),Array.isArray(p)?s=p.map(function(f){return r[f]}):s=r[p]),s){var g=[e,1].concat(s);i.noEscape&&(g=g.filter(function(f){return!f.next})),t.splice.apply(t,g),e--}i.keywordMap&&(i.token=this.createKeywordMapper(i.keywordMap,i.defaultToken||"text",i.caseInsensitive),delete i.defaultToken)}}Object.keys(r).forEach(o,this)},this.createKeywordMapper=function(l,r,o,n){var t=Object.create(null);return this.$keywordList=[],Object.keys(l).forEach(function(e){for(var i=l[e],s=i.split(n||"|"),h=s.length;h--;){var c=s[h];this.$keywordList.push(c),o&&(c=c.toLowerCase()),t[c]=e}},this),l=null,o?function(e){return t[e.toLowerCase()]||r}:function(e){return t[e]||r}},this.getKeywords=function(){return this.$keywords}}).call(A.prototype),k.TextHighlightRules=A}),ace.define("ace/mode/behaviour",["require","exports","module"],function(E,k,H){var x;x=function(){this.$behaviours={}},(function(){this.add=function(A,$,a){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[A]:this.$behaviours[A]={}}this.$behaviours[A][$]=a},this.addBehaviours=function(A){for(var $ in A)for(var a in A[$])this.add($,a,A[$][a])},this.remove=function(A){this.$behaviours&&this.$behaviours[A]&&delete this.$behaviours[A]},this.inherit=function(A,$){if(typeof A=="function")var a=new A().getBehaviours($);else var a=A.getBehaviours($);this.addBehaviours(a)},this.getBehaviours=function(A){if(A){for(var $={},a=0;a<A.length;a++)this.$behaviours[A[a]]&&($[A[a]]=this.$behaviours[A[a]]);return $}else return this.$behaviours}}).call(x.prototype),k.Behaviour=x}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(E,k,H){var x=E("./range").Range,A=(function(){function $(a,l,r){this.$session=a,this.$row=l,this.$rowTokens=a.getTokens(l);var o=a.getTokenAt(l,r);this.$tokenIndex=o?o.index:-1}return $.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},$.prototype.stepForward=function(){this.$tokenIndex+=1;for(var a;this.$tokenIndex>
173=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]},$.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},$.prototype.getCurrentTokenRow=function(){return this.$row},$.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,l=this.$tokenIndex,r=a[l].start;if(r!==void 0)return r;for(r=0;l>0;)l-=1,r+=a[l].value.length;return r},$.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},$.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],l=this.getCurrentTokenColumn();return new x(this.$row,l,this.$row,l+a.value.length)},$})();k.TokenIterator=A}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(E,k,H){var x=E("../../lib/oop"),A=E("../behaviour").Behaviour,$=E("../../token_iterator").TokenIterator,a=E("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],r=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],o,n={},t={'"':'"',"'":"'"},e=function(h){var c=-1;if(h.multiSelect&&(c=h.selection.index,n.rangeCount!=h.multiSelect.rangeCount&&(n={rangeCount:h.multiSelect.rangeCount})),n[c])return o=n[c];o=n[c]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},i=function(h,c,m,p){var g=h.end.row-h.start.row;return{text:m+c+p,selection:[0,h.start.column+1,g,h.end.column+(g?0:1)]}},s;s=function(h){h=h||{},this.add("braces","insertion",function(c,m,p,g,f){var b=p.getCursorPosition(),M=g.doc.getLine(b.row);if(f=="{"){e(p);var C=p.getSelectionRange(),S=g.doc.getTextRange(C),R=g.getTokenAt(b.row,b.column);if(S!==""&&S!=="{"&&p.getWrapBehavioursEnabled())return i(C,S,"{","}");if(R&&/(?:string)\.quasi|\.xml/.test(R.type)){var y=[/tag\-(?:open|name)/,/attribute\-name/];return y.some(function(_){return _.test(R.type)})||/(string)\.quasi/.test(R.type)&&R.value[b.column-R.start-1]!=="$"?void 0:(s.recordAutoInsert(p,g,"}"),{text:"{}",selection:[1,1]})}else if(s.isSaneInsertion(p,g))return/[\]\}\)]/.test(M[b.column])||p.inMultiSelectMode||h.braces?(s.recordAutoInsert(p,g,"}"),{text:"{}",selection:[1,1]}):(s.recordMaybeInsert(p,g,"{"),{text:"{",selection:[1,1]})}else if(f=="}"){e(p);var w=M.substring(b.column,b.column+1);if(w=="}"){var d=g.$findOpeningBracket("}",{column:b.column+1,row:b.row});if(d!==null&&s.isAutoInsertedClosing(b,M,f))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(f==` 174`||f==`\r 175`){e(p);var u="";s.isMaybeInsertedClosing(b,M)&&(u=a.stringRepeat("}",o.maybeInsertedBrackets),s.clearMaybeInsertedClosing());var w=M.substring(b.column,b.column+1);if(w==="}"){var v=g.findMatchingBracket({row:b.row,column:b.column+1},"}");if(!v)return null;var L=this.$getIndent(g.getLine(v.row))}else if(u)var L=this.$getIndent(M);else{s.clearMaybeInsertedClosing();return}var T=L+g.getTabString();return{text:` 176`+T+` 177`+L+u,selection:[1,T.length,1,T.length]}}else s.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(c,m,p,g,f){var b=g.doc.getTextRange(f);if(!f.isMultiLine()&&b=="{"){e(p);var M=g.doc.getLine(f.start.row),C=M.substring(f.end.column,f.end.column+1);if(C=="}")return f.end.column++,f;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(c,m,p,g,f){if(f=="("){e(p);var b=p.getSelectionRange(),M=g.doc.getTextRange(b);if(M!==""&&p.getWrapBehavioursEnabled())return i(b,M,"(",")");if(s.isSaneInsertion(p,g))return s.recordAutoInsert(p,g,")"),{text:"()",selection:[1,1]}}else if(f==")"){e(p);var C=p.getCursorPosition(),S=g.doc.getLine(C.row),R=S.substring(C.column,C.column+1);if(R==")"){var y=g.$findOpeningBracket(")",{column:C.column+1,row:C.row});if(y!==null&&s.isAutoInsertedClosing(C,S,f))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(c,m,p,g,f){var b=g.doc.getTextRange(f);if(!f.isMultiLine()&&b=="("){e(p);var M=g.doc.getLine(f.start.row),C=M.substring(f.start.column+1,f.start.column+2);if(C==")")return f.end.column++,f}}),this.add("brackets","insertion",function(c,m,p,g,f){if(f=="["){e(p);var b=p.getSelectionRange(),M=g.doc.getTextRange(b);if(M!==""&&p.getWrapBehavioursEnabled())return i(b,M,"[","]");if(s.isSaneInsertion(p,g))return s.recordAutoInsert(p,g,"]"),{text:"[]",selection:[1,1]}}else if(f=="]"){e(p);var C=p.getCursorPosition(),S=g.doc.getLine(C.row),R=S.substring(C.column,C.column+1);if(R=="]"){var y=g.$findOpeningBracket("]",{column:C.column+1,row:C.row});if(y!==null&&s.isAutoInsertedClosing(C,S,f))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(c,m,p,g,f){var b=g.doc.getTextRange(f);if(!f.isMultiLine()&&b=="["){e(p);var M=g.doc.getLine(f.start.row),C=M.substring(f.start.column+1,f.start.column+2);if(C=="]")return f.end.column++,f}}
177),this.add("string_dquotes","insertion",function(c,m,p,g,f){var b=g.$mode.$quotes||t;if(f.length==1&&b[f]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(f)!=-1)return;e(p);var M=f,C=p.getSelectionRange(),S=g.doc.getTextRange(C);if(S!==""&&(S.length!=1||!b[S])&&p.getWrapBehavioursEnabled())return i(C,S,M,M);if(!S){var R=p.getCursorPosition(),y=g.doc.getLine(R.row),w=y.substring(R.column-1,R.column),d=y.substring(R.column,R.column+1),u=g.getTokenAt(R.row,R.column),v=g.getTokenAt(R.row,R.column+1);if(w=="\\"&&u&&/escape/.test(u.type))return null;var L=u&&/string|escape/.test(u.type),T=!v||/string|escape/.test(v.type),_;if(d==M)_=L!==T,_&&/string\.end/.test(v.type)&&(_=!1);else{if(L&&!T||L&&T)return null;var D=g.$mode.tokenRe;D.lastIndex=0;var N=D.test(w);D.lastIndex=0;var V=D.test(d),F=g.$mode.$pairQuotesAfter,W=F&&F[M]&&F[M].test(w);if(!W&&N||V||d&&!/[\s;,.})\]\\]/.test(d))return null;var B=y[R.column-2];if(w==M&&(B==M||D.test(B)))return null;_=!0}return{text:_?M+M:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(c,m,p,g,f){var b=g.$mode.$quotes||t,M=g.doc.getTextRange(f);if(!f.isMultiLine()&&b.hasOwnProperty(M)){e(p);var C=g.doc.getLine(f.start.row),S=C.substring(f.start.column+1,f.start.column+2);if(S==M)return f.end.column++,f}}),h.closeDocComment!==!1&&this.add("doc comment end","insertion",function(c,m,p,g,f){if(c==="doc-start"&&(f===` 178`||f===`\r 179`)&&p.selection.isEmpty()){var b=p.getCursorPosition();if(b.column===0)return;for(var M=g.doc.getLine(b.row),C=g.doc.getLine(b.row+1),S=g.getTokens(b.row),R=0,y=0;y<S.length;y++){R+=S[y].value.length;var w=S[y];if(R>=b.column){if(R===b.column){if(!/\.doc/.test(w.type))return;if(/\*\//.test(w.value)){var d=S[y+1];if(!d||!/\.doc/.test(d.type))return}}var u=b.column-(R-w.value.length),v=w.value.indexOf("*/"),L=w.value.indexOf("/**",v>-1?v+2:0);if(L!==-1&&u>L&&u<L+3||v!==-1&&L!==-1&&u>=v&&u<=L||!/\.doc/.test(w.type))return;break}}var T=this.$getIndent(M);if(/\s*\*/.test(C))return/^\s*\*/.test(M)?{text:f+T+"* ",selection:[1,2+T.length,1,2+T.length]}:{text:f+T+" * ",selection:[1,3+T.length,1,3+T.length]};if(/\/\*\*/.test(M.substring(0,b.column)))return{text:f+T+" * "+f+" "+T+"*/",selection:[1,4+T.length,1,4+T.length]}}})},s.isSaneInsertion=function(h,c){var m=h.getCursorPosition(),p=new $(c,m.row,m.column);if(!this.$matchTokenType(p.getCurrentToken()||"text",l)){if(/[)}\]]/.test(h.session.getLine(m.row)[m.column]))return!0;var g=new $(c,m.row,m.column+1);if(!this.$matchTokenType(g.getCurrentToken()||"text",l))return!1}return p.stepForward(),p.getCurrentTokenRow()!==m.row||this.$matchTokenType(p.getCurrentToken()||"text",r)},s.$matchTokenType=function(h,c){return c.indexOf(h.type||h)>-1},s.recordAutoInsert=function(h,c,m){var p=h.getCursorPosition(),g=c.doc.getLine(p.row);this.isAutoInsertedClosing(p,g,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=p.row,o.autoInsertedLineEnd=m+g.substr(p.column),o.autoInsertedBrackets++},s.recordMaybeInsert=function(h,c,m){var p=h.getCursorPosition(),g=c.doc.getLine(p.row);this.isMaybeInsertedClosing(p,g)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=p.row,o.maybeInsertedLineStart=g.substr(0,p.column)+m,o.maybeInsertedLineEnd=g.substr(p.column),o.maybeInsertedBrackets++},s.isAutoInsertedClosing=function(h,c,m){return o.autoInsertedBrackets>0&&h.row===o.autoInsertedRow&&m===o.autoInsertedLineEnd[0]&&c.substr(h.column)===o.autoInsertedLineEnd},s.isMaybeInsertedClosing=function(h,c){return o.maybeInsertedBrackets>0&&h.row===o.maybeInsertedRow&&c.substr(h.column)===o.maybeInsertedLineEnd&&c.substr(0,h.column)==o.maybeInsertedLineStart},s.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},s.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},x.inherits(s,A),k.CstyleBehaviour=s}),ace.define("ace/unicode",["require","exports","module"],function(E,k,H){for(var x=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],A=0,$=[],a=0;a<x.length;
179a+=2)$.push(A+=x[a]),x[a+1]&&$.push(45,A+=x[a+1]);k.wordChars=String.fromCharCode.apply(null,$)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(E,k,H){var x=E("../config"),A=E("../tokenizer").Tokenizer,$=E("./text_highlight_rules").TextHighlightRules,a=E("./behaviour/cstyle").CstyleBehaviour,l=E("../unicode"),r=E("../lib/lang"),o=E("../token_iterator").TokenIterator,n=E("../range").Range,t;t=function(){this.HighlightRules=$},(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new A(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,i,s,h){var c=i.doc,m=!0,p=!0,g=1/0,f=i.getTabSize(),b=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var S=this.lineCommentStart.map(r.escapeRegExp).join("|"),M=this.lineCommentStart[0];else var S=r.escapeRegExp(this.lineCommentStart),M=this.lineCommentStart;S=new RegExp("^(\\s*)(?:"+S+") ?"),b=i.getUseSoftTabs();var w=function(V,F){var W=V.match(S);if(W){var B=W[1].length,z=W[0].length;!v(V,B,z)&&W[0][z-1]==" "&&z--,c.removeInLine(F,B,z)}},u=M+" ",y=function(V,F){(!m||/\S/.test(V))&&(v(V,g,g)?c.insertInLine({row:F,column:g},u):c.insertInLine({row:F,column:g},M))},d=function(V,F){return S.test(V)},v=function(V,F,W){for(var B=0;F--&&V.charAt(F)==" ";)B++;if(B%f!=0)return!1;for(var B=0;V.charAt(W++)==" ";)B++;return f>2?B%f!=f-1:B%f==0}}else{if(!this.blockComment)return!1;var M=this.blockComment.start,C=this.blockComment.end,S=new RegExp("^(\\s*)(?:"+r.escapeRegExp(M)+")"),R=new RegExp("(?:"+r.escapeRegExp(C)+")\\s*$"),y=function(_,D){d(_,D)||(!m||/\S/.test(_))&&(c.insertInLine({row:D,column:_.length},C),c.insertInLine({row:D,column:g},M))},w=function(_,D){var N;(N=_.match(R))&&c.removeInLine(D,_.length-N[0].length,_.length),(N=_.match(S))&&c.removeInLine(D,N[1].length,N[0].length)},d=function(_,D){if(S.test(_))return!0;for(var N=i.getTokens(D),V=0;V<N.length;V++)if(N[V].type==="comment")return!0}}function L(_){for(var D=s;D<=h;D++)_(c.getLine(D),D)}var T=1/0;L(function(_,D){var N=_.search(/\S/);N!==-1?(N<g&&(g=N),p&&!d(_,D)&&(p=!1)):T>_.length&&(T=_.length)}),g==1/0&&(g=T,m=!1,p=!1),b&&g%f!=0&&(g=Math.floor(g/f)*f),L(p?w:y)},this.toggleBlockComment=function(e,i,s,h){var c=this.blockComment;if(c){!c.start&&c[0]&&(c=c[0]);var m=new o(i,h.row,h.column),p=m.getCurrentToken();i.selection;var g=i.selection.toOrientedRange(),f,b;if(p&&/comment/.test(p.type)){for(var M,C;p&&/comment/.test(p.type);){var S=p.value.indexOf(c.start);if(S!=-1){var R=m.getCurrentTokenRow(),y=m.getCurrentTokenColumn()+S;M=new n(R,y,R,y+c.start.length);break}p=m.stepBackward()}for(var m=new o(i,h.row,h.column),p=m.getCurrentToken();p&&/comment/.test(p.type);){var S=p.value.indexOf(c.end);if(S!=-1){var R=m.getCurrentTokenRow(),y=m.getCurrentTokenColumn()+S;C=new n(R,y,R,y+c.end.length);break}p=m.stepForward()}C&&i.remove(C),M&&(i.remove(M),f=M.start.row,b=-c.start.length)}else b=c.start.length,f=s.start.row,i.insert(s.end,c.end),i.insert(s.start,c.start);g.start.row==f&&(g.start.column+=b),g.end.row==f&&(g.end.column+=b),i.selection.fromOrientedRange(g)}},this.getNextLineIndent=function(e,i,s){return this.$getIndent(i)},this.checkOutdent=function(e,i,s){return!1},this.autoOutdent=function(e,i,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 i in e)if(e[i]){var s=e[i],h=s.prototype.$id,c=x.$modes[h];c||(x.$modes[h]=c=new s),x.$modes[i]||(x.$modes[i]=c),this.$embeds.push(i),this.$modes[i]=c}for(var m=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],p=function(f){(function(b){var M=m[f],C=b[M];b[m[f]]=function(){return this.$delegator(M,arguments,C)}})(g)},g=this,i=0;i<m.length;i++)p(i)},this.$delegator=function(e,i,s){var h=i[0]||"start";if(typeof h!="string"){if(Array.isArray(h[2])){var c=h[2][h[2].length-1],m=this.$modes[c];if(m)return m[e].apply(m,[h[1]].concat([].slice.call(i,1)))}h=h[0]||"start"}for(var p=0;p<this.$embeds.length;p++)if(this.$modes[this.$embeds[p]]){var g=h.split(this.$embeds[p]);if(!g[0]&&g[1]){i[0]=g[1];var m=this.$modes[this.$embeds[p]];return m[e].apply(m,i)}}var f=s.apply(this,i);return s?f:void 0},this.transformAction=function(e,i,s,h,c){if(this.$behaviour){var m=this.$behaviour.getBehaviours();for(var p in m)if(m[p][i]){var g=m[p][i].apply(this,arguments);if(g)return g}}},this.getKeywords=function(e){if(!this.completionKeywords){var i=this.$tokenizer.rules,s=[];for(var h in i)for(var c=i[h],m=0,p=c.length;m<p;m++)if(typeof c[m].token=="string")/keyword|support|storage/.test(c[m].token)&&s.push(c[m].regex);else if(typeof c[m].token=="object"){for(var g=0,f=c[m].token.length;g<f;g++)if(/keyword|support|storage/.test(c[m].token[g])){var h=c[m].regex.match(/\(.+?\)/g)[g];s.push(h.substr(1,h.length-2))}}this.completionKeywords=s}return e?s.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,i,s,h){var c=this.$keywordList||this.$createKeywordList();return c.map(function(m){return{name:m,value:m,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(t.prototype),k.Mode=t}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(E,k,H){var x=E("./lib/dom"),A=(function(){function $(a){this.session=a,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return $.prototype.getRowLength=function(a){var l;return this.lineWidgets?l=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:l=0,
179!this.$useWrapMode||!this.$wrapData[a]?1+l:this.$wrapData[a].length+1+l},$.prototype.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(l){l&&l.rowCount&&!l.hidden&&(a+=l.rowCount)}),a},$.prototype.$onChangeEditor=function(a){this.attach(a.editor)},$.prototype.attach=function(a){a&&a.widgetManager&&a.widgetManager!=this&&a.widgetManager.detach(),this.editor!=a&&(this.detach(),this.editor=a,a&&(a.widgetManager=this,a.renderer.on("beforeRender",this.measureWidgets),a.renderer.on("afterRender",this.renderWidgets)))},$.prototype.detach=function(a){var l=this.editor;if(l){this.editor=null,l.widgetManager=null,l.renderer.off("beforeRender",this.measureWidgets),l.renderer.off("afterRender",this.renderWidgets);var r=this.session.lineWidgets;r&&r.forEach(function(o){o&&o.el&&o.el.parentNode&&(o._inDocument=!1,o.el.parentNode.removeChild(o.el))})}},$.prototype.updateOnFold=function(a,l){var r=l.lineWidgets;if(!(!r||!a.action)){for(var o=a.data,n=o.start.row,t=o.end.row,e=a.action=="add",i=n+1;i<t;i++)r[i]&&(r[i].hidden=e);r[t]&&(e?r[n]?r[t].hidden=e:r[n]=r[t]:(r[n]==r[t]&&(r[n]=void 0),r[t].hidden=e))}},$.prototype.updateOnChange=function(a){var l=this.session.lineWidgets;if(l){var r=a.start.row,o=a.end.row-r;if(o!==0)if(a.action=="remove"){var n=l.splice(r+1,o);!l[r]&&n[n.length-1]&&(l[r]=n.pop()),n.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var t=new Array(o);l[r]&&l[r].column!=null&&a.start.column>l[r].column&&r++,t.unshift(r,0),l.splice.apply(l,t),this.$updateRows()}}},$.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var l=!0;a.forEach(function(r,o){if(r)for(l=!1,r.row=o;r.$oldWidget;)r.$oldWidget.row=o,r=r.$oldWidget}),l&&(this.session.lineWidgets=null)}},$.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var l=this.session.lineWidgets[a.row];return l&&(a.$oldWidget=l,l.el&&l.el.parentNode&&(l.el.parentNode.removeChild(l.el),l._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},$.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var l=this.editor.renderer;a.html&&!a.el&&(a.el=x.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=x.createElement("div"),a.el.textContent=a.text),a.el&&(x.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&x.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex="5",l.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/l.layerConfig.lineHeight);var r=this.session.getFoldAt(a.row,0);if(a.$fold=r,r){var o=this.session.lineWidgets;a.row==r.end.row&&!o[r.start.row]?o[r.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,l),this.onWidgetChanged(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{}if(this.session.lineWidgets){var l=this.session.lineWidgets[a.row];if(l==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;l;){if(l.$oldWidget==a){l.$oldWidget=a.$oldWidget;break}l=l.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},$.prototype.getWidgetsAtRow=function(a){for(var l=this.session.lineWidgets,r=l&&l[a],o=[];r;)o.push(r),r=r.$oldWidget;return o},$.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},$.prototype.measureWidgets=function(a,l){var r=this.session._changedWidgets,o=l.layerConfig;if(!(!r||!r.length)){for(var n=1/0,t=0;t<r.length;t++){var e=r[t];if(!(!e||!e.el)&&e.session==this.session){if(!e._inDocument){if(this.session.lineWidgets[e.row]!=e)continue;e._inDocument=!0,l.container.appendChild(e.el)}e.h=e.el.offsetHeight,e.fixedWidth||(e.w=e.el.offsetWidth,e.screenWidth=Math.ceil(e.w/o.characterWidth));var i=e.h/o.lineHeight;e.coverLine&&(i-=this.session.getRowLineCount(e.row),i<0&&(i=0)),e.rowCount!=i&&(e.rowCount=i,e.row<n&&(n=e.row))}}n!=1/0&&(this.session._emit("changeFold",{data:{start:{row:n}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},$.prototype.renderWidgets=function(a,l){var r=l.layerConfig,o=this.session.lineWidgets;if(o){for(var n=Math.min(this.firstRow,r.firstRow),t=Math.max(this.lastRow,r.lastRow,o.length);n>0&&!o[n];)n--;this.firstRow=r.firstRow,this.lastRow=r.lastRow,l.$cursorLayer.config=r;for(var e=n;e<=t;e++){var i=o[e];if(!(!i||!i.el)){if(i.hidden){i.el.style.top=-100-(i.pixelHeight||0)+"px";continue}i._inDocument||(i._inDocument=!0,l.container.appendChild(i.el));var s=l.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;i.coverLine||(s+=r.lineHeight*this.session.getRowLineCount(i.row)),i.el.style.top=s-r.offset+"px";var h=i.coverGutter?0:l.gutterWidth;i.fixedWidth||(h-=l.scrollLeft),i.el.style.left=h+"px",i.fullWidth&&i.screenWidth&&(i.el.style.minWidth=r.width+2*r.padding+"px"),i.fixedWidth?i.el.style.right=l.scrollBar.getWidth()+"px":i.el.style.right=""}}}},$})();k.LineWidgets=A}),ace.define("ace/apply_delta",["require","exports","module"],function(E,k,H){k.applyDelta=function(x,A,$){var a=A.start.row,l=A.start.column,r=x[a]||"";switch(A.action){case"insert":var o=A.lines;if(o.length===1)x[a]=r.substring(0,l)+A.lines[0]+r.substring(l);else{var n=[a,1].concat(A.lines);x.splice.apply(x,n),x[a]=r.substring(0,l)+x[a],x[a+A.lines.length-1]+=r.substring(l)}break;case"remove":var t=A.end.column,e=A.end.row;a===e?x[a]=r.substring(0,l)+r.substring(t):x.splice(a,e-a+1,r.substring(0,l)+x[e].substring(t));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(E,k,H){var x=E("./lib/oop"),A=E("./lib/event_emitter").EventEmitter,$=(function(){function r(o,n,t){this.$onChange=this.onChange.bind(this),this.attach(o),typeof n!="number"?this.setPosition(n.row,n.column):this.setPosition(n,t)}return r.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},r.prototype.getDocument=function(){return this.document}
179,r.prototype.onChange=function(o){if(!(o.start.row==o.end.row&&o.start.row!=this.row)&&!(o.start.row>this.row)){var n=l(o,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},r.prototype.setPosition=function(o,n,t){var e;if(t?e={row:o,column:n}:e=this.$clipPositionToDocument(o,n),!(this.row==e.row&&this.column==e.column)){var i={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:i,value:e})}},r.prototype.detach=function(){this.document.off("change",this.$onChange)},r.prototype.attach=function(o){this.document=o||this.document,this.document.on("change",this.$onChange)},r.prototype.$clipPositionToDocument=function(o,n){var t={};return o>=this.document.getLength()?(t.row=Math.max(0,this.document.getLength()-1),t.column=this.document.getLine(t.row).length):o<0?(t.row=0,t.column=0):(t.row=o,t.column=Math.min(this.document.getLine(t.row).length,Math.max(0,n))),n<0&&(t.column=0),t},r})();$.prototype.$insertRight=!1,x.implement($.prototype,A);function a(r,o,n){var t=n?r.column<=o.column:r.column<o.column;return r.row<o.row||r.row==o.row&&t}function l(r,o,n){var t=r.action=="insert",e=(t?1:-1)*(r.end.row-r.start.row),i=(t?1:-1)*(r.end.column-r.start.column),s=r.start,h=t?s:r.end;return a(o,s,n)?{row:o.row,column:o.column}:a(h,o,!n)?{row:o.row+e,column:o.column+(o.row==h.row?i:0)}:{row:s.row,column:s.column}}k.Anchor=$}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(E,k,H){var x=E("./lib/oop"),A=E("./apply_delta").applyDelta,$=E("./lib/event_emitter").EventEmitter,a=E("./range").Range,l=E("./anchor").Anchor,r=(function(){function o(n){this.$lines=[""],n.length===0?this.$lines=[""]:Array.isArray(n)?this.insertMergedLines({row:0,column:0},n):this.insert({row:0,column:0},n)}return o.prototype.setValue=function(n){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},n||"")},o.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},o.prototype.createAnchor=function(n,t){return new l(this,n,t)},o.prototype.$detectNewLine=function(n){var t=n.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:` 180`,this._signal("changeNewLineMode")},o.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r 181`;case"unix":return` 182`;default:return this.$autoNewLine||` 183`}},o.prototype.setNewLineMode=function(n){this.$newLineMode!==n&&(this.$newLineMode=n,this._signal("changeNewLineMode"))},o.prototype.getNewLineMode=function(){return this.$newLineMode},o.prototype.isNewLine=function(n){return n==`\r 184`||n=="\r"||n==` 185`},o.prototype.getLine=function(n){return this.$lines[n]||""},o.prototype.getLines=function(n,t){return this.$lines.slice(n,t+1)},o.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},o.prototype.getLength=function(){return this.$lines.length},o.prototype.getTextRange=function(n){return this.getLinesForRange(n).join(this.getNewLineCharacter())},o.prototype.getLinesForRange=function(n){var t;if(n.start.row===n.end.row)t=[this.getLine(n.start.row).substring(n.start.column,n.end.column)];else{t=this.getLines(n.start.row,n.end.row),t[0]=(t[0]||"").substring(n.start.column);var e=t.length-1;n.end.row-n.start.row==e&&(t[e]=t[e].substring(0,n.end.column))}return t},o.prototype.insertLines=function(n,t){return this.insertFullLines(n,t)},o.prototype.removeLines=function(n,t){return this.removeFullLines(n,t)},o.prototype.insertNewLine=function(n){return this.insertMergedLines(n,["",""])},o.prototype.insert=function(n,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(n,this.$split(t))},o.prototype.insertInLine=function(n,t){var e=this.clippedPos(n.row,n.column),i=this.pos(n.row,n.column+t.length);return this.applyDelta({start:e,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)},o.prototype.clippedPos=function(n,t){var e=this.getLength();n===void 0?n=e:n<0?n=0:n>=e&&(n=e-1,t=void 0);var i=this.getLine(n);return t==null&&(t=i.length),t=Math.min(Math.max(t,0),i.length),{row:n,column:t}},o.prototype.clonePos=function(n){return{row:n.row,column:n.column}},o.prototype.pos=function(n,t){return{row:n,column:t}},o.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},o.prototype.insertFullLines=function(n,t){n=Math.min(Math.max(n,0),this.getLength());var e=0;n<this.getLength()?(t=t.concat([""]),e=0):(t=[""].concat(t),n--,e=this.$lines[n].length),this.insertMergedLines({row:n,column:e},t)},o.prototype.insertMergedLines=function(n,t){var e=this.clippedPos(n.row,n.column),i={row:e.row+t.length-1,column:(t.length==1?e.column:0)+t[t.length-1].length};return this.applyDelta({start:e,end:i,action:"insert",lines:t}),this.clonePos(i)},o.prototype.remove=function(n){var t=this.clippedPos(n.start.row,n.start.column),e=this.clippedPos(n.end.row,n.end.column);return this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})}),this.clonePos(t)},o.prototype.removeInLine=function(n,t,e){var i=this.clippedPos(n,t),s=this.clippedPos(n,e);return this.applyDelta({start:i,end:s,action:"remove",lines:this.getLinesForRange({start:i,end:s})},!0),this.clonePos(i)},o.prototype.removeFullLines=function(n,t){n=Math.min(Math.max(0,n),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var e=t==this.getLength()-1&&n>0,i=t<this.getLength()-1,s=e?n-1:n,h=e?this.getLine(s).length:0,c=i?t+1:t,m=i?0:this.getLine(c).length,p=new a(s,h,c,m),g=this.$lines.slice(n,t+1);return this.applyDelta({start:p.start,end:p.end,action:"remove",lines:this.getLinesForRange(p)}),g},o.prototype.removeNewLine=function(n){n<this.getLength()-1&&n>=0&&this.applyDelta({start:this.pos(n,this.getLine(n).length),end:this.pos(n+1,0),action:"remove",lines:["",""]})},o.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},o.prototype.applyDeltas=function(n){for(var t=0;t<n.length;t++)this.applyDelta(n[t])},o.prototype.revertDeltas=function(n){for(var t=n.length-1;t>=0;t--)this.revertDelta(n[t])},o.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):(A(this.$lines,n,t),this._signal("change",n)))},o.prototype.$safeApplyDelta=function(n){var t=this.$lines.length;(n.action=="remove"&&n.start.row<t&&n.end.row<t||n.action=="insert"&&n.start.row<=t)&&this.applyDelta(n)},o.prototype.$splitAndapplyLargeDelta=function(n,t){for(var e=n.lines,i=e.length-t+1,s=n.start.row,h=n.start.column,c=0,m=0;c<i;c=m){m+=t-1;var p=e.slice(c,m);p.push(""),this.applyDelta({start:this.pos(s+c,h),end:this.pos(s+m,h=0),action:n.action,lines:p},!0)}n.lines=e.slice(c),n.start.row=s+c,n.start.column=h,this.applyDelta(n,!0)},o.prototype.revertDelta=function(n){this.$safeApplyDelta({start:this.clonePos(n.start),end:this.clonePos(n.end),action:n.action=="insert"?"remove":"insert",lines:n.lines.slice()})},o.prototype.indexToPosition=function(n,t){for(var e=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,s=t||0,h=e.length;s<h;s++)if(n-=e[s].length+i,n<0)return{row:s,column:n+e[s].length+i};return{row:h-1,column:n+e[h-1].length+i}},o.prototype.positionToIndex=function(n,t){for(var e=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,s=0,h=Math.min(n.row,e.length),c=t||0;c<h;++c)s+=e[c].length+i;return s+n.column},o.prototype.$split=function(n){return n.split(/\r\n|\r|\n/)},o})();r.prototype.$autoNewLine="",r.prototype.$newLineMode="auto",x.implement(r.prototype,$),k.Document=r}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(E,k,H){var x=E("./lib/oop"),A=E("./lib/event_emitter").EventEmitter,$=(function(){function a(l,r){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=l;var o=this;this.$worker=function(){if(o.running){for(var n=new Date,t=o.currentLine,e=-1,i=o.doc,s=t;o.lines[t];)t++;var h=i.getLength(),c=0;for(o.running=!1;t<h;){o.$tokenizeRow(t),e=t;do t++;while(o.lines[t]);if(c++,c%5===0&&new Date-n>20){o.running=setTimeout(o.$worker,20);break}}o.currentLine=t,e==-1&&(e=t),s<=e&&o.fireUpdateEvent(s,e)}}}return a.prototype.setTokenizer=function(l){this.tokenizer=l,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(l){this.doc=l,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(l,r){var o={first:l,last:r};this._signal("update",{data:o})},a.prototype.start=function(l){this.currentLine=Math.min(l||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(l){var r=l.start.row,o=l.end.row-r;if(o===0)this.lines[r]=null;else if(l.action=="remove")this.lines.splice(r,o+1,null),this.states.splice(r,o+1,null);else{var n=Array(o+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(l){return this.lines[l]||this.$tokenizeRow(l)},a.prototype.getState=function(l){return this.currentLine==l&&this.$tokenizeRow(l),this.states[l]||"start"},a.prototype.$tokenizeRow=function(l){var r=this.doc.getLine(l),o=this.states[l-1],n=this.tokenizer.getLineTokens(r,o,l);return this.states[l]+""!=n.state+""?(this.states[l]=n.state,this.lines[l+1]=null,this.currentLine>l+1&&(this.currentLine=l+1)):this.currentLine==l&&(this.currentLine=l+1),this.lines[l]=n.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a})();
185x.implement($.prototype,A),k.BackgroundTokenizer=$}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(E,k,H){var x=E("./lib/lang"),A=E("./range").Range,$=(function(){function a(l,r,o){o===void 0&&(o="text"),this.setRegexp(l),this.clazz=r,this.type=o,this.docLen=0}return a.prototype.setRegexp=function(l){this.regExp+""!=l+""&&(this.regExp=l,this.cache=[])},a.prototype.update=function(l,r,o,n){if(this.regExp){for(var t=n.firstRow,e=n.lastRow,i={},s=o.$editor&&o.$editor.$search,h=s&&s.$isMultilineSearch(o.$editor.getLastSearchOptions()),c=t;c<=e;c++){var m=this.cache[c];if(m==null||o.getValue().length!=this.docLen){if(h){m=[];var p=s.$multiLineForward(o,this.regExp,c,e);if(p){var g=p.endRow<=e?p.endRow-1:e;g>c&&(c=g),m.push(new A(p.startRow,p.startCol,p.endRow,p.endCol))}m.length>this.MAX_RANGES&&(m=m.slice(0,this.MAX_RANGES))}else m=x.getMatchOffsets(o.getLine(c),this.regExp),m.length>this.MAX_RANGES&&(m=m.slice(0,this.MAX_RANGES)),m=m.map(function(C){return new A(c,C.offset,c,C.offset+C.length)});this.cache[c]=m.length?m:""}if(m.length!==0)for(var f=m.length;f--;){var b=m[f].toScreenRange(o),M=b.toString();i[M]||(i[M]=!0,r.drawSingleLineMarker(l,b,this.clazz,n))}}this.docLen=o.getValue().length}},a})();$.prototype.MAX_RANGES=500,k.SearchHighlight=$}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(E,k,H){var x=(function(){function g(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return g.prototype.addSession=function(f){this.$session=f},g.prototype.add=function(f,b,M){if(!this.$fromUndo&&f!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),b===!1||!this.lastDeltas){this.lastDeltas=[];var C=this.$undoStack.length;C>this.$undoDepth-1&&this.$undoStack.splice(0,C-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),f.id=this.$rev=++this.$maxRev}(f.action=="remove"||f.action=="insert")&&(this.$lastDelta=f),this.lastDeltas.push(f)}},g.prototype.addSelection=function(f,b){this.selections.push({value:f,rev:b||this.$rev})},g.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},g.prototype.markIgnored=function(f,b){b==null&&(b=this.$rev+1);for(var M=this.$undoStack,C=M.length;C--;){var S=M[C][0];if(S.id<=f)break;S.id<b&&(S.ignore=!0)}this.lastDeltas=null},g.prototype.getSelection=function(f,b){for(var M=this.selections,C=M.length;C--;){var S=M[C];if(S.rev<f)return b&&(S=M[C+1]),S}},g.prototype.getRevision=function(){return this.$rev},g.prototype.getDeltas=function(f,b){b==null&&(b=this.$rev+1);for(var M=this.$undoStack,C=null,S=0,R=M.length;R--;){var y=M[R][0];if(y.id<b&&!C&&(C=R+1),y.id<=f){S=R+1;break}}return M.slice(S,C)},g.prototype.getChangedRanges=function(f,b){b==null&&(b=this.$rev+1)},g.prototype.getChangedLines=function(f,b){b==null&&(b=this.$rev+1)},g.prototype.undo=function(f,b){this.lastDeltas=null;var M=this.$undoStack;if(A(M,M.length)){f||(f=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var C=M.pop(),S=null;return C&&(S=f.undoChanges(C,b),this.$redoStack.push(C),this.$syncRev()),this.$fromUndo=!1,S}},g.prototype.redo=function(f,b){if(this.lastDeltas=null,f||(f=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var M=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);p(this.$redoStack,M),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(R){R[0].id=++this.$maxRev},this)}var C=this.$redoStack.pop(),S=null;return C&&(S=f.redoChanges(C,b),this.$undoStack.push(C),this.$syncRev()),this.$fromUndo=!1,S},g.prototype.$syncRev=function(){var f=this.$undoStack,b=f[f.length-1],M=b&&b[0].id||0;this.$redoStackBaseRev=M,this.$rev=M},g.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},g.prototype.canUndo=function(){return this.$undoStack.length>0},g.prototype.canRedo=function(){return this.$redoStack.length>0},g.prototype.bookmark=function(f){f==null&&(f=this.$rev),this.mark=f},g.prototype.isAtBookmark=function(){return this.$rev===this.mark},g.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},g.prototype.fromJSON=function(f){this.reset(),this.$undoStack=f.$undoStack,this.$redoStack=f.$redoStack},g.prototype.$prettyPrint=function(f){return f?o(f):o(this.$undoStack)+` 186--- 187`+o(this.$redoStack)},g})();x.prototype.hasUndo=x.prototype.canUndo,x.prototype.hasRedo=x.prototype.canRedo,x.prototype.isClean=x.prototype.isAtBookmark,x.prototype.markClean=x.prototype.bookmark;function A(g,f){for(var b=f;b--;){var M=g[b];if(M&&!M[0].ignore){for(;b<f-1;
187){var C=e(g[b],g[b+1]);g[b]=C[0],g[b+1]=C[1],b++}return!0}}}var $=E("./range").Range,a=$.comparePoints;$.comparePoints;function l(g){return{row:g.row,column:g.column}}function r(g){return{start:l(g.start),end:l(g.end),action:g.action,lines:g.lines.slice()}}function o(g){if(g=g||this,Array.isArray(g))return g.map(o).join(` 188`);var f="";return g.action?(f=g.action=="insert"?"+":"-",f+="["+g.lines+"]"):g.value&&(Array.isArray(g.value)?f=g.value.map(n).join(` 189`):f=n(g.value)),g.start&&(f+=n(g)),(g.id||g.rev)&&(f+=" ("+(g.id||g.rev)+")"),f}function n(g){return g.start.row+":"+g.start.column+"=>"+g.end.row+":"+g.end.column}function t(g,f){var b=g.action=="insert",M=f.action=="insert";if(b&&M)if(a(f.start,g.end)>=0)s(f,g,-1);else if(a(f.start,g.start)<=0)s(g,f,1);else return null;else if(b&&!M)if(a(f.start,g.end)>=0)s(f,g,-1);else if(a(f.end,g.start)<=0)s(g,f,-1);else return null;else if(!b&&M)if(a(f.start,g.start)>=0)s(f,g,1);else if(a(f.start,g.start)<=0)s(g,f,1);else return null;else if(!b&&!M)if(a(f.start,g.start)>=0)s(f,g,1);else if(a(f.end,g.start)<=0)s(g,f,-1);else return null;return[f,g]}function e(g,f){for(var b=g.length;b--;)for(var M=0;M<f.length;M++)if(!t(g[b],f[M])){for(;b<g.length;){for(;M--;)t(f[M],g[b]);M=f.length,b++}return[g,f]}return g.selectionBefore=f.selectionBefore=g.selectionAfter=f.selectionAfter=null,[f,g]}function i(g,f){var b=g.action=="insert",M=f.action=="insert";if(b&&M)a(g.start,f.start)<0?s(f,g,1):s(g,f,1);else if(b&&!M)a(g.start,f.end)>=0?s(g,f,-1):(a(g.start,f.start)<=0||s(g,$.fromPoints(f.start,g.start),-1),s(f,g,1));else if(!b&&M)a(f.start,g.end)>=0?s(f,g,-1):(a(f.start,g.start)<=0||s(f,$.fromPoints(g.start,f.start),-1),s(g,f,1));else if(!b&&!M)if(a(f.start,g.end)>=0)s(f,g,-1);else if(a(f.end,g.start)<=0)s(g,f,-1);else{var C,S;return a(g.start,f.start)<0&&(C=g,g=c(g,f.start)),a(g.end,f.end)>0&&(S=c(g,f.end)),h(f.end,g.start,g.end,-1),S&&!C&&(g.lines=S.lines,g.start=S.start,g.end=S.end,S=g),[f,C,S].filter(Boolean)}return[f,g]}function s(g,f,b){h(g.start,f.start,f.end,b),h(g.end,f.start,f.end,b)}function h(g,f,b,M){g.row==(M==1?f:b).row&&(g.column+=M*(b.column-f.column)),g.row+=M*(b.row-f.row)}function c(g,f){var b=g.lines,M=g.end;g.end=l(f);var C=g.end.row-g.start.row,S=b.splice(C,b.length),R=C?f.column:f.column-g.start.column;b.push(S[0].substring(0,R)),S[0]=S[0].substr(R);var y={start:l(f),end:M,lines:S,action:g.action};return y}function m(g,f){f=r(f);for(var b=g.length;b--;){for(var M=g[b],C=0;C<M.length;C++){var S=M[C],R=i(S,f);f=R[0],R.length!=2&&(R[2]?(M.splice(C+1,1,R[1],R[2]),C++):R[1]||(M.splice(C,1),C--))}M.length||g.splice(b,1)}return g}function p(g,f){for(var b=0;b<f.length;b++)for(var M=f[b],C=0;C<M.length;C++)m(g,M[C])}k.UndoManager=x}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(E,k,H){var x=E("../range").Range,A=(function(){function $(a,l){this.foldData=a,Array.isArray(l)?this.folds=l:l=this.folds=[l];var r=l[l.length-1];this.range=new x(l[0].start.row,l[0].start.column,r.end.row,r.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(o){o.setFoldLine(this)},this)}return $.prototype.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(l){l.start.row+=a,l.end.row+=a})},$.prototype.addFold=function(a){if(a.sameRow){if(a.start.row<this.startRow||a.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(l,r){return-l.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},$.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},$.prototype.walk=function(a,l,r){var o=0,n=this.folds,t,e,i,s=!0;l==null&&(l=this.end.row,r=this.end.column);for(var h=0;h<n.length;h++){if(t=n[h],e=t.range.compareStart(l,r),e==-1){a(null,l,r,o,s);return}if(i=a(null,t.start.row,t.start.column,o,s),i=!i&&a(t.placeholder,t.start.row,t.start.column,o),i||e===0)return;s=!t.sameRow,o=t.end.column}a(null,l,r,o,s)},$.prototype.getNextFoldTo=function(a,l){for(var r,o,n=0;n<this.folds.length;n++){if(r=this.folds[n],o=r.range.compareEnd(a,l),o==-1)return{fold:r,kind:"after"};if(o===0)return{fold:r,kind:"inside"}}return null},$.prototype.addRemoveChars=function(a,l,r){var o=this.getNextFoldTo(a,l),n,t;if(o){if(n=o.fold,o.kind=="inside"&&n.start.column!=l&&n.start.row!=a)window.console&&window.console.log(a,l,n);else if(n.start.row==a){t=this.folds;var e=t.indexOf(n);for(e===0&&(this.start.column+=r),e;e<t.length;e++){if(n=t[e],n.start.column+=r,!n.sameRow)return;n.end.column+=r}this.end.column+=r}}},$.prototype.split=function(a,l){var r=this.getNextFoldTo(a,l);if(!r||r.kind=="inside")return null;var o=r.fold,n=this.folds,t=this.foldData,e=n.indexOf(o),i=n[e-1];this.end.row=i.end.row,this.end.column=i.end.column,n=n.splice(e,n.length-e);var s=new $(t,n);return t.splice(t.indexOf(this)+1,0,s),s},$.prototype.merge=function(a){for(var l=a.folds,r=0;r<l.length;r++)this.addFold(l[r]);var o=this.foldData;o.splice(o.indexOf(a),1)},$.prototype.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(l){a.push(" "+l.toString())}),a.push("]"),a.join(` 190`)},$.prototype.idxToPosition=function(a){for(var l=0,r=0;r<this.folds.length;r++){var o=this.folds[r];if(a-=o.start.column-l,a<0)return{row:o.start.row,column:o.start.column+a};if(a-=o.placeholder.length,a<0)return o.start;l=o.end.column}return{row:this.end.row,column:this.end.column+a}},$})();k.FoldLine=A}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(E,k,H){var x=E("./range").Range,A=x.comparePoints,$=(function(){function a(){this.ranges=[],this.$bias=1}return a.prototype.pointIndex=function(l,r,o){for(var n=this.ranges,t=o||0;t<n.length;t++){var e=n[t],i=A(l,e.end);if(!(i>0)){var s=A(l,e.start);return i===0?r&&s!==0?-t-2:t:s>0||s===0&&!r?t:-t-1}}return-t-1},a.prototype.add=function(l){var r=!l.isEmpty(),o=this.pointIndex(l.start,r);o<0&&(o=-o-1);var n=this.pointIndex(l.end,r,o);return n<0?n=-n-1:n++,this.ranges.splice(o,n-o,l)},a.prototype.addList=function(l){for(var r=[],o=l.length;o--;)r.push.apply(r,this.add(l[o]));return r},a.prototype.substractPoint=function(l){var r=this.pointIndex(l);if(r>=0)return this.ranges.splice(r,1)},a.prototype.merge=function(){var l=[],r=this.ranges;r=r.sort(function(i,s){return A(i.start,s.start)});for(var o=r[0],n,t=1;t<r.length;t++){n=o,o=r[t];var e=A(n.end,o.start);e<0||e==0&&!n.isEmpty()&&!o.isEmpty()||(A(n.end,o.end)<0&&(n.end.row=o.end.row,n.end.column=o.end.column),r.splice(t,1),l.push(o),o=n,t--)}return this.ranges=r,l},a.prototype.contains=function(l,r){return this.pointIndex({row:l,column:r})>=0},a.prototype.containsPoint=function(l){return this.pointIndex(l)>=0},a.prototype.rangeAtPoint=function(l){var r=this.pointIndex(l);if(r>=0)return this.ranges[r]},a.prototype.clipRows=function(l,r){var o=this.ranges;if(o[0].start.row>r||o[o.length-1].start.row<l)return[];var n=this.pointIndex({row:l,column:0});n<0&&(n=-n-1);var t=this.pointIndex({row:r,column:0},n);t<0&&(t=-t-1);for(var e=[],i=n;i<t;i++)e.push(o[i]);return e},a.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},a.prototype.attach=function(l){this.session&&this.detach(),this.session=l,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},a.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},a.prototype.$onChange=function(l){for(var r=l.start,o=l.end,n=r.row,t=o.row,e=this.ranges,i=0,s=e.length;i<s;i++){var h=e[i];if(h.end.row>=n)break}if(l.action=="insert")for(var c=t-n,m=-r.column+o.column;i<s;i++){var h=e[i];if(h.start.row>n)break;if(h.start.row==n&&h.start.column>=r.column&&(h.start.column==r.column&&this.$bias<=0||(h.start.column+=m,h.start.row+=c)),h.end.row==n&&h.end.column>=r.column){if(h.end.column==r.column&&this.$bias<0)continue;h.end.column==r.column&&m>0&&i<s-1&&h.end.column>h.start.column&&h.end.column==e[i+1].start.column&&(h.end.column-=m),h.end.column+=m,h.end.row+=c}}else for(var c=n-t,m=r.column-o.column;i<s;i++){var h=e[i];if(h.start.row>t)break;h.end.row<t&&(n<h.end.row||n==h.end.row&&r.column<h.end.column)?(h.end.row=n,h.end.column=r.column):h.end.row==t?h.end.column<=o.column?(c||h.end.column>r.column)&&(h.end.column=r.column,h.end.row=r.row):(h.end.column+=m,h.end.row+=c):h.end.row>t&&(h.end.row+=c),h.start.row<t&&(n<h.start.row||n==h.start.row&&r.column<h.start.column)?(h.start.row=n,h.start.column=r.column):h.start.row==t?h.start.column<=o.column?(c||h.start.column>r.column)&&(h.start.column=r.column,h.start.row=r.row):(h.start.column+=m,h.start.row+=c):h.start.row>t&&(h.start.row+=c)}if(c!=0&&i<s)for(;i<s;i++){var h=e[i];h.start.row+=c,h.end.row+=c}},a})();$.prototype.comparePoints=A,k.RangeList=$}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(E,k,H){var x=this&&this.__extends||(function(){var n=function(t,e){return n=Object.
190setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var h in s)Object.prototype.hasOwnProperty.call(s,h)&&(i[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 i(){this.constructor=t}t.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}})(),A=E("../range_list").RangeList,$=(function(n){x(t,n);function t(e,i){var s=n.call(this)||this;return s.foldLine=null,s.placeholder=i,s.range=e,s.start=e.start,s.end=e.end,s.sameRow=e.start.row==e.end.row,s.subFolds=s.ranges=[],s}return t.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(i){i.setFoldLine(e)})},t.prototype.clone=function(){var e=this.range.clone(),i=new t(e,this.placeholder);return this.subFolds.forEach(function(s){i.subFolds.push(s.clone())}),i.collapseChildren=this.collapseChildren,i},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){l(e,this.start);for(var m=e.start.row,p=e.start.column,i=0,s=-1;i<this.subFolds.length&&(s=this.subFolds[i].range.compare(m,p),s==1);i++);var h=this.subFolds[i],c=0;if(s==0){if(h.range.containsRange(e))return h.addSubFold(e);c=1}for(var m=e.range.end.row,p=e.range.end.column,g=i,s=-1;g<this.subFolds.length&&(s=this.subFolds[g].range.compare(m,p),s==1);g++);s==0&&g++;for(var f=this.subFolds.splice(i,g-i,e),b=s==0?f.length-1:f.length,M=c;M<b;M++)e.addSubFold(f[M]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return o(e,this.start)},t})(A);function a(n,t){n.row-=t.row,n.row==0&&(n.column-=t.column)}function l(n,t){a(n.start,t),a(n.end,t)}function r(n,t){n.row==0&&(n.column+=t.column),n.row+=t.row}function o(n,t){r(n.start,t),r(n.end,t)}k.Fold=$}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(E,k,H){var x=E("../range").Range,A=E("./fold_line").FoldLine,$=E("./fold").Fold,a=E("../token_iterator").TokenIterator,l=E("../mouse/mouse_event").MouseEvent;function r(){this.getFoldAt=function(o,n,t){var e=this.getFoldLine(o);if(!e)return null;for(var i=e.folds,s=0;s<i.length;s++){var h=i[s].range;if(h.contains(o,n)){if(t==1&&h.isEnd(o,n)&&!h.isEmpty())continue;if(t==-1&&h.isStart(o,n)&&!h.isEmpty())continue;return i[s]}}},this.getFoldsInRange=function(o){var n=o.start,t=o.end,e=this.$foldData,i=[];n.column+=1,t.column-=1;for(var s=0;s<e.length;s++){var h=e[s].range.compareRange(o);if(h!=2){if(h==-2)break;for(var c=e[s].folds,m=0;m<c.length;m++){var p=c[m];if(h=p.range.compareRange(o),h==-2)break;if(h==2)continue;if(h==42)break;i.push(p)}}}return n.column-=1,t.column+=1,i},this.getFoldsInRangeList=function(o){if(Array.isArray(o)){var n=[];o.forEach(function(t){n=n.concat(this.getFoldsInRange(t))},this)}else var n=this.getFoldsInRange(o);return n},this.getAllFolds=function(){for(var o=[],n=this.$foldData,t=0;t<n.length;t++)for(var e=0;e<n[t].folds.length;e++)o.push(n[t].folds[e]);return o},this.getFoldStringAt=function(o,n,t,e){if(e=e||this.getFoldLine(o),!e)return null;for(var i={end:{column:0}},s,h,c=0;c<e.folds.length;c++){h=e.folds[c];var m=h.range.compareEnd(o,n);if(m==-1){s=this.getLine(h.start.row).substring(i.end.column,h.start.column);break}else if(m===0)return null;i=h}return s||(s=this.getLine(h.start.row).substring(i.end.column)),t==-1?s.substring(0,n-i.end.column):t==1?s.substring(n-i.end.column):s},this.getFoldLine=function(o,n){var t=this.$foldData,e=0;for(n&&(e=t.indexOf(n)),e==-1&&(e=0),e;e<t.length;e++){var i=t[e];if(i.start.row<=o&&i.end.row>=o)return i;if(i.end.row>o)return null}return null},this.getNextFoldLine=function(o,n){var t=this.$foldData,e=0;for(n&&(e=t.indexOf(n)),e==-1&&(e=0),e;e<t.length;e++){var i=t[e];if(i.end.row>=o)return i}return null},this.getFoldedRowCount=function(o,n){for(var t=this.$foldData,e=n-o+1,i=0;i<t.length;i++){var s=t[i],h=s.end.row,c=s.start.row;if(h>=n){c<n&&(c>=o?e-=n-c:e=0);break}else h>=o&&(c>=o?e-=h-c:e-=h-o+1)}return e},this.$addFoldLine=function(o){return this.$foldData.push(o),this.$foldData.sort(function(n,t){return n.start.row-t.start.row}),o},this.addFold=function(o,n){var t=this.$foldData,e=!1,i;o instanceof $?i=o:(i=new $(n,o),i.collapseChildren=n.collapseChildren),this.$clipRangeToDocument(i.range);var s=i.start.row,h=i.start.column,c=i.end.row,m=i.end.column,p=this.getFoldAt(s,h,1),g=this.getFoldAt(c,m,-1);if(p&&g==p)return p.addSubFold(i);p&&!p.range.isStart(s,h)&&this.removeFold(p),g&&!g.range.isEnd(c,m)&&this.removeFold(g);var f=this.getFoldsInRange(i.range);f.length>0&&(this.removeFolds(f),i.collapseChildren||f.forEach(function(S){i.addSubFold(S)}));for(var b=0;b<t.length;b++){var M=t[b];if(c==M.start.row){M.addFold(i),e=!0;break}else if(s==M.end.row){if(M.addFold(i),e=!0,!i.sameRow){var C=t[b+1];
190if(C&&C.start.row==c){M.merge(C);break}}break}else if(c<=M.start.row)break}return e||(M=this.$addFoldLine(new A(this.$foldData,i))),this.$useWrapMode?this.$updateWrapData(M.start.row,M.start.row):this.$updateRowLengthCache(M.start.row,M.start.row),this.$modified=!0,this._signal("changeFold",{data:i,action:"add"}),i},this.addFolds=function(o){o.forEach(function(n){this.addFold(n)},this)},this.removeFold=function(o){var n=o.foldLine,t=n.start.row,e=n.end.row,i=this.$foldData,s=n.folds;if(s.length==1)i.splice(i.indexOf(n),1);else if(n.range.isEnd(o.end.row,o.end.column))s.pop(),n.end.row=s[s.length-1].end.row,n.end.column=s[s.length-1].end.column;else if(n.range.isStart(o.start.row,o.start.column))s.shift(),n.start.row=s[0].start.row,n.start.column=s[0].start.column;else if(o.sameRow)s.splice(s.indexOf(o),1);else{var h=n.split(o.start.row,o.start.column);s=h.folds,s.shift(),h.start.row=s[0].start.row,h.start.column=s[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(t,e):this.$updateRowLengthCache(t,e)),this.$modified=!0,this._signal("changeFold",{data:o,action:"remove"})},this.removeFolds=function(o){for(var n=[],t=0;t<o.length;t++)n.push(o[t]);n.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(o){this.removeFold(o),o.subFolds.forEach(function(n){o.restoreRange(n),this.addFold(n)},this),o.collapseChildren>0&&this.foldAll(o.start.row+1,o.end.row,o.collapseChildren-1),o.subFolds=[]},this.expandFolds=function(o){o.forEach(function(n){this.expandFold(n)},this)},this.unfold=function(o,n){var t,e;if(o==null)t=new x(0,0,this.getLength(),0),n==null&&(n=!0);else if(typeof o=="number")t=new x(o,0,o,this.getLine(o).length);else if("row"in o)t=x.fromPoints(o,o);else{if(Array.isArray(o))return e=[],o.forEach(function(s){e=e.concat(this.unfold(s))},this),e;t=o}e=this.getFoldsInRangeList(t);for(var i=e;e.length==1&&x.comparePoints(e[0].start,t.start)<0&&x.comparePoints(e[0].end,t.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(t);if(n!=!1?this.removeFolds(e):this.expandFolds(e),i.length)return i},this.isRowFolded=function(o,n){return!!this.getFoldLine(o,n)},this.getRowFoldEnd=function(o,n){var t=this.getFoldLine(o,n);return t?t.end.row:o},this.getRowFoldStart=function(o,n){var t=this.getFoldLine(o,n);return t?t.start.row:o},this.getFoldDisplayLine=function(o,n,t,e,i){e==null&&(e=o.start.row),i==null&&(i=0),n==null&&(n=o.end.row),t==null&&(t=this.getLine(n).length);var s=this.doc,h="";return o.walk(function(c,m,p,g){if(!(m<e)){if(m==e){if(p<i)return;g=Math.max(i,g)}c!=null?h+=c:h+=s.getLine(m).substring(g,p)}},n,t),h},this.getDisplayLine=function(o,n,t,e){var i=this.getFoldLine(o);if(i)return this.getFoldDisplayLine(i,o,n,t,e);var s;return s=this.doc.getLine(o),s.substring(e||0,n||s.length)},this.$cloneFoldData=function(){var o=[];return o=this.$foldData.map(function(n){var t=n.folds.map(function(e){return e.clone()});return new A(o,t)}),o},this.toggleFold=function(o){var n=this.selection,t=n.getRange(),e,i;if(t.isEmpty()){var s=t.start;if(e=this.getFoldAt(s.row,s.column),e){this.expandFold(e);return}else if(o){var h=this.getFoldLine(s.row);h&&this.expandFolds(h.folds);return}else(i=this.findMatchingBracket(s))?t.comparePoint(i)==1?t.end=i:(t.start=i,t.start.column++,t.end.column--):(i=this.findMatchingBracket({row:s.row,column:s.column+1}))?(t.comparePoint(i)==1?t.end=i:t.start=i,t.start.column++):t=this.getCommentFoldRange(s.row,s.column)||t}else{var c=this.getFoldsInRange(t);if(o&&c.length){this.expandFolds(c);return}else c.length==1&&(e=c[0])}if(e||(e=this.getFoldAt(t.start.row,t.start.column)),e&&e.range.toString()==t.toString()){this.expandFold(e);return}var m="...";if(!t.isMultiLine()){if(m=this.getTextRange(t),m.length<4)return;m=m.trim().substring(0,2)+".."}this.addFold(m,t)},this.getCommentFoldRange=function(o,n,t){var e=new a(this,o,n),i=e.getCurrentToken(),s=i&&i.type;if(i&&/^comment|string/.test(s)){s=s.match(/comment|string/)[0],s=="comment"&&(s+="|doc-start|\\.doc");var h=new RegExp(s),c=new x;if(t!=1){do i=e.stepBackward();while(i&&h.test(i.type));i=e.stepForward()}c.start.row=e.getCurrentTokenRow(),c.start.column=e.getCurrentTokenColumn()+i.value.length,e=new a(this,o,n);var m=this.getState(e.$row);if(t!=-1){var p=-1;do if(i=e.stepForward(),p==-1){var g=this.getState(e.$row);m.toString()!==g.toString()&&(p=e.$row)}else if(e.$row>p)break;while(i&&h.test(i.type));i=e.stepBackward()}else i=e.getCurrentToken();return c.end.row=e.getCurrentTokenRow(),c.end.column=e.getCurrentTokenColumn(),c.start.row==c.end.row&&c.start.column>c.end.column?void 0:c}},this.foldAll=function(o,n,t,e){t==null&&(t=1e5);var i=this.foldWidgets;if(i){n=n||this.getLength(),o=o||0;for(var s=o;s<n;s++)if(i[s]==null&&(i[s]=this.getFoldWidget(s)),i[s]=="start"&&!(e&&!e(s))){var h=this.getFoldWidgetRange(s);h&&h.isMultiLine()&&h.end.row<=n&&h.start.row>=o&&(s=h.end.row,h.collapseChildren=t,this.addFold("...",h))}}},this.foldToLevel=function(o){for(this.foldAll();o-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var o=this;this.foldAll(null,null,null,function(n){for(var t=o.getTokens(n),e=0;e<t.length;e++){var i=t[e];if(!(i.type=="text"&&/^\s+$/.test(i.value)))return!!/comment/.test(i.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1}
190,this.$foldStyle="markbegin",this.setFoldStyle=function(o){if(!this.$foldStyles[o])throw new Error("invalid fold style: "+o+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=o){this.$foldStyle=o,o=="manual"&&this.unfold();var n=this.$foldMode;this.$setFolding(null),this.$setFolding(n)}},this.$setFolding=function(o){if(this.$foldMode!=o){if(this.$foldMode=o,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!o||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=o.getFoldWidget.bind(o,this,this.$foldStyle),this.getFoldWidgetRange=o.getFoldWidgetRange.bind(o,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)}},this.getParentFoldRangeData=function(o,n){var t=this.foldWidgets;if(!t||n&&t[o])return{};for(var e=o-1,i;e>=0;){var s=t[e];if(s==null&&(s=t[e]=this.getFoldWidget(e)),s=="start"){var h=this.getFoldWidgetRange(e);if(i||(i=h),h&&h.end.row>=o)break}e--}return{range:e!==-1&&h,firstRange:i}},this.onFoldWidgetClick=function(o,n){n instanceof l&&(n=n.domEvent);var t={children:n.shiftKey,all:n.ctrlKey||n.metaKey,siblings:n.altKey},e=this.$toggleFoldWidget(o,t);if(!e){var i=n.target||n.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(o,n){if(this.getFoldWidget){var t=this.getFoldWidget(o),e=this.getLine(o),i=t==="end"?-1:1,s=this.getFoldAt(o,i===-1?0:e.length,i);if(s)return n.children||n.all?this.removeFold(s):this.expandFold(s),s;var h=this.getFoldWidgetRange(o,!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 c=this.getParentFoldRangeData(o);if(c.range)var m=c.range.start.row+1,p=c.range.end.row;this.foldAll(m,p,n.all?1e4:0)}else n.children?(p=h?h.end.row:this.getLength(),this.foldAll(o+1,p,n.all?1e4:0)):h&&(n.all&&(h.collapseChildren=1e4),this.addFold("...",h));return h}},this.toggleFoldWidget=function(o){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 i=this.getFoldAt(n,this.getLine(n).length,1);i?this.removeFold(i):this.addFold("...",t)}}},this.updateFoldWidgets=function(o){var n=o.start.row,t=o.end.row-n;if(t===0)this.foldWidgets[n]=null;else if(o.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(o){var n=o.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(E,k,H){var x=E("../token_iterator").TokenIterator,A=E("../range").Range;function $(){this.findMatchingBracket=function(a,l){if(a.column==0)return null;var r=l||this.getLine(a.row).charAt(a.column-1);if(r=="")return null;var o=r.match(/([\(\[\{])|([\)\]\}])/);return o?o[1]?this.$findClosingBracket(o[1],a):this.$findOpeningBracket(o[2],a):null},this.getBracketRange=function(a){var l=this.getLine(a.row),r=!0,o,n=l.charAt(a.column-1),t=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(t||(n=l.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;o=A.fromPoints(a,e),r||(o.end.column++,o.start.column--),o.cursor=o.end}else{var e=this.$findOpeningBracket(t[2],a);if(!e)return null;o=A.fromPoints(e,a),r||(o.start.column++,o.end.column--),o.cursor=o.start}return o},this.getMatchingBracketRanges=function(a,l){var r=this.getLine(a.row),o=/([\(\[\{])|([\)\]\}])/,n=!l&&r.charAt(a.column-1),t=n&&n.match(o);if(t||(n=(l===void 0||l)&&r.charAt(a.column),a={row:a.row,column:a.column+1}
190,t=n&&n.match(o)),!t)return null;var e=new A(a.row,a.column-1,a.row,a.column),i=t[1]?this.$findClosingBracket(t[1],a):this.$findOpeningBracket(t[2],a);if(!i)return[e];var s=new A(i.row,i.column,i.row,i.column+1);return[e,s]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,l,r){var o=this.$brackets[a],n=1,t=new x(this,l.row,l.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 i=l.column-t.getCurrentTokenColumn()-2,s=e.value;;){for(;i>=0;){var h=s.charAt(i);if(h==o){if(n-=1,n==0)return{row:t.getCurrentTokenRow(),column:i+t.getCurrentTokenColumn()}}else h==a&&(n+=1);i-=1}do e=t.stepBackward();while(e&&!r.test(e.type));if(e==null)break;s=e.value,i=s.length-1}return null}},this.$findClosingBracket=function(a,l,r){var o=this.$brackets[a],n=1,t=new x(this,l.row,l.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 i=l.column-t.getCurrentTokenColumn();;){for(var s=e.value,h=s.length;i<h;){var c=s.charAt(i);if(c==o){if(n-=1,n==0)return{row:t.getCurrentTokenRow(),column:i+t.getCurrentTokenColumn()}}else c==a&&(n+=1);i+=1}do e=t.stepForward();while(e&&!r.test(e.type));if(e==null)break;i=0}return null}},this.getMatchingTags=function(a){var l=new x(this,a.row,a.column),r=this.$findTagName(l);if(r){var o=l.stepBackward();return o.value==="<"?this.$findClosingTag(l,r):this.$findOpeningTag(l,r)}},this.$findTagName=function(a){var l=a.getCurrentToken(),r=!1,o=!1;if(l&&l.type.indexOf("tag-name")===-1)do o?l=a.stepBackward():l=a.stepForward(),l&&(l.value==="/>"?o=!0:l.type.indexOf("tag-name")!==-1&&(r=!0));while(l&&!r);return l},this.$findClosingTag=function(a,l){var r,o=l.value,n=l.value,t=0,e=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);l=a.stepForward();var i=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+l.value.length),s=!1;do{if(r=l,r.type.indexOf("tag-close")!==-1&&!s){var h=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(l=a.stepForward(),l){if(l.value===">"&&!s){var h=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(l.type.indexOf("tag-name")!==-1){if(o=l.value,n===o){if(r.value==="<")t++;else if(r.value==="</"&&(t--,t<0)){a.stepBackward();var c=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2);l=a.stepForward();var m=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+l.value.length);if(l.type.indexOf("tag-close")===-1&&(l=a.stepForward()),l&&l.value===">")var p=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(n===o&&l.value==="/>"&&(t--,t<0))var c=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),m=c,p=m,h=new A(i.end.row,i.end.column,i.end.row,i.end.column+1)}}while(l&&t>=0);if(e&&h&&c&&p&&i&&m)return{openTag:new A(e.start.row,e.start.column,h.end.row,h.end.column),closeTag:new A(c.start.row,c.start.column,p.end.row,p.end.column),openTagName:i,closeTagName:m}},this.$findOpeningTag=function(a,l){var r=a.getCurrentToken(),o=l.value,n=0,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),i=e+2,s=new A(t,e,t,i);a.stepForward();var h=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+l.value.length);if(l.type.indexOf("tag-close")===-1&&(l=a.stepForward()),!(!l||l.value!==">")){var c=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(l=r,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),i=e+l.value.length,r=a.stepBackward(),l){if(l.type.indexOf("tag-name")!==-1){if(o===l.value)if(r.value==="<"){if(n++,n>0){var m=new A(t,e,t,i),p=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do l=a.stepForward();while(l&&l.value!==">");var g=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else r.value==="</"&&n--}else if(l.value==="/>"){for(var f=0,b=r;b;){if(b.type.indexOf("tag-name")!==-1&&b.value===o){n--;break}else if(b.value==="<")break;b=a.stepBackward(),f++}for(var M=0;M<f;M++)a.stepForward()}}while(r&&n<=0);if(p&&g&&s&&c&&m&&h)return{openTag:new A(p.start.row,p.start.column,g.end.row,g.end.column),closeTag:new A(s.start.row,s.start.column,c.end.row,c.end.column),openTagName:m,closeTagName:h}}}}k.BracketMatch=$}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(E,k,H){var x=E("./lib/oop"),A=E("./lib/lang"),$=E("./bidihandler").BidiHandler,a=E("./config"),l=E("./lib/event_emitter").EventEmitter,r=E("./selection").Selection,o=E("./mode/text").Mode,n=E("./range").Range,t=E("./line_widgets").LineWidgets,e=E("./document").Document,i=E("./background_tokenizer").Backgroun
190dTokenizer,s=E("./search_highlight").SearchHighlight,h=E("./undomanager").UndoManager,c=(function(){function y(w,d){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++y.$uid,this.$foldData.toString=function(){return this.join(` 191`)},this.$gutterCustomWidgets={},this.bgTokenizer=new i(new o().getTokenizer(),this);var u=this;this.bgTokenizer.on("update",function(v){u._signal("tokenizerUpdate",v)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof w!="object"||!w.getLine)&&(w=new e(w)),this.setDocument(w),this.selection=new r(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new $(this),a.resetOptions(this),this.setMode(d),a._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return y.prototype.$initOperationListeners=function(){var w=this;this.curOp=null,this.on("change",function(){w.curOp||(w.startOperation(),w.curOp.selectionBefore=w.$lastSel),w.curOp.docChanged=!0},!0),this.on("changeSelection",function(){w.curOp||(w.startOperation(),w.curOp.selectionBefore=w.$lastSel),w.curOp.selectionChanged=!0},!0),this.$operationResetTimer=A.delayedCall(this.endOperation.bind(this,!0))},y.prototype.startOperation=function(w){if(this.curOp){if(!w||this.curOp.command)return;this.prevOp=this.curOp}w||(w={}),this.$operationResetTimer.schedule(),this.curOp={command:w.command||{},args:w.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",w)},y.prototype.endOperation=function(w){if(this.curOp){if(w&&w.returnValue===!1){this.curOp=null,this._signal("endOperation",w);return}if(w==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var d=this.selection.toJSON();this.curOp.selectionAfter=d,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(d),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",w)}},y.prototype.setDocument=function(w){this.doc&&this.doc.off("change",this.$onChange),this.doc=w,w.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},y.prototype.getDocument=function(){return this.doc},Object.defineProperty(y.prototype,"widgetManager",{get:function(){var w=new t(this);return this.widgetManager=w,this.$editor&&w.attach(this.$editor),w},set:function(w){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:w})},enumerable:!1,configurable:!0}),y.prototype.$resetRowCache=function(w){if(!w){this.$docRowCache=[],this.$screenRowCache=[];return}var d=this.$docRowCache.length,u=this.$getRowCacheIndex(this.$docRowCache,w)+1;d>u&&(this.$docRowCache.splice(u,d),this.$screenRowCache.splice(u,d))},y.prototype.$getRowCacheIndex=function(w,d){for(var u=0,v=w.length-1;u<=v;){var L=u+v>>1,T=w[L];if(d>T)u=L+1;else if(d<T)v=L-1;else return L}return u-1},y.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},y.prototype.onChangeFold=function(w){var d=w.data;this.$resetRowCache(d.start.row)},y.prototype.onChange=function(w){this.$modified=!0,this.$bidiHandler.onChange(w),this.$resetRowCache(w.start.row);var d=this.$updateInternalDataOnChange(w);!this.$fromUndo&&this.$undoManager&&(d&&d.length&&(this.$undoManager.add({action:"removeFolds",folds:d},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(w,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(w),this._signal("change",w)},y.prototype.onSelectionChange=function(){this._signal("changeSelection")},y.prototype.setValue=function(w){this.doc.setValue(w),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},y.fromJSON=function(w){typeof w=="string"&&(w=JSON.parse(w));var d=new h;d.$undoStack=w.history.$undoStack,d.$redoStack=w.history.$redoStack,d.mark=w.history.mark,d.$rev=w.history.rev;var u=new y(w.value);return w.folds.forEach(function(v){u.addFold("...",n.fromPoints(v.start,v.end))}),u.setAnnotations(w.annotations),u.setBreakpoints(w.breakpoints),u.setMode(w.mode),u.setScrollLeft(w.scrollLeft),u.setScrollTop(w.scrollTop),u.setUndoManager(d),u.selection.fromJSON(w.selection),u},y.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(w){return w.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},y.prototype.toString=function(){return this.doc.getValue()},y.prototype.getSelection=function(){return this.selection},y.prototype.getState=function(w){return this.bgTokenizer.getState(w)},y.prototype.getTokens=function(w){return this.bgTokenizer.getTokens(w)},y.prototype.getTokenAt=function(w,d){var u=this.bgTokenizer.getTokens(w),v,L=0;if(d==null){var T=u.length-1;L=this.getLine(w).length}else for(var T=0;T<u.length&&(L+=u[T].value.length,!(L>=d));T++);return v=u[T],v?(v.index=T,v.start=L-v.value.length,v):null}
191,y.prototype.setUndoManager=function(w){if(this.$undoManager=w,this.$informUndoManager&&this.$informUndoManager.cancel(),w){var d=this;w.addSession(this),this.$syncInformUndoManager=function(){d.$informUndoManager.cancel(),d.mergeUndoDeltas=!1},this.$informUndoManager=A.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},y.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},y.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},y.prototype.getTabString=function(){return this.getUseSoftTabs()?A.stringRepeat(" ",this.getTabSize()):" "},y.prototype.setUseSoftTabs=function(w){this.setOption("useSoftTabs",w)},y.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},y.prototype.setTabSize=function(w){this.setOption("tabSize",w)},y.prototype.getTabSize=function(){return this.$tabSize},y.prototype.isTabStop=function(w){return this.$useSoftTabs&&w.column%this.$tabSize===0},y.prototype.setNavigateWithinSoftTabs=function(w){this.setOption("navigateWithinSoftTabs",w)},y.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs}
191,y.prototype.setOverwrite=function(w){this.setOption("overwrite",w)},y.prototype.getOverwrite=function(){return this.$overwrite},y.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},y.prototype.addGutterDecoration=function(w,d){this.$decorations[w]||(this.$decorations[w]=""),this.$decorations[w]+=" "+d,this._signal("changeBreakpoint",{})},y.prototype.removeGutterCustomWidget=function(w){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(w)},y.prototype.addGutterCustomWidget=function(w,d){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(w,d)},y.prototype.removeGutterDecoration=function(w,d){this.$decorations[w]=(this.$decorations[w]||"").replace(" "+d,""),this._signal("changeBreakpoint",{})},y.prototype.getBreakpoints=function(){return this.$breakpoints},y.prototype.setBreakpoints=function(w){this.$breakpoints=[];for(var d=0;d<w.length;d++)this.$breakpoints[w[d]]="ace_breakpoint";this._signal("changeBreakpoint",{})},y.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},y.prototype.setBreakpoint=function(w,d){d===void 0&&(d="ace_breakpoint"),d?this.$breakpoints[w]=d:delete this.$breakpoints[w],this._signal("changeBreakpoint",{})},y.prototype.clearBreakpoint=function(w){delete this.$breakpoints[w],this._signal("changeBreakpoint",{})},y.prototype.addMarker=function(w,d,u,v){var L=this.$markerId++,T={range:w,type:u||"line",renderer:typeof u=="function"?u:null,clazz:d,inFront:!!v,id:L};return v?(this.$frontMarkers[L]=T,this._signal("changeFrontMarker")):(this.$backMarkers[L]=T,this._signal("changeBackMarker")),L},y.prototype.addDynamicMarker=function(w,d){if(w.update){var u=this.$markerId++;return w.id=u,w.inFront=!!d,d?(this.$frontMarkers[u]=w,this._signal("changeFrontMarker")):(this.$backMarkers[u]=w,this._signal("changeBackMarker")),w}},y.prototype.removeMarker=function(w){var d=this.$frontMarkers[w]||this.$backMarkers[w];if(d){var u=d.inFront?this.$frontMarkers:this.$backMarkers;delete u[w],this._signal(d.inFront?"changeFrontMarker":"changeBackMarker")}},y.prototype.getMarkers=function(w){return w?this.$frontMarkers:this.$backMarkers},y.prototype.highlight=function(w){if(!this.$searchHighlight){var d=new s(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(d)}this.$searchHighlight.setRegexp(w)},y.prototype.highlightLines=function(w,d,u,v){typeof d!="number"&&(u=d,d=w),u||(u="ace_step");var L=new n(w,0,d,1/0);return L.id=this.addMarker(L,u,"fullLine",v),L},y.prototype.setAnnotations=function(w){this.$annotations=w,this._signal("changeAnnotation",{})},y.prototype.getAnnotations=function(){return this.$annotations||[]},y.prototype.clearAnnotations=function(){this.setAnnotations([])},y.prototype.$detectNewLine=function(w){var d=w.match(/^.*?(\r?\n)/m);d?this.$autoNewLine=d[1]:this.$autoNewLine=` 192`},y.prototype.getWordRange=function(w,d){var u=this.getLine(w),v=!1;if(d>0&&(v=!!u.charAt(d-1).match(this.tokenRe)),v||(v=!!u.charAt(d).match(this.tokenRe)),v)var L=this.tokenRe;else if(/^\s+$/.test(u.slice(d-1,d+1)))var L=/\s/;else var L=this.nonTokenRe;var T=d;if(T>0){do T--;while(T>=0&&u.charAt(T).match(L));T++}for(var _=d;_<u.length&&u.charAt(_).match(L);)_++;return new n(w,T,w,_)},y.prototype.getAWordRange=function(w,d){for(var u=this.getWordRange(w,d),v=this.getLine(u.end.row);v.charAt(u.end.column).match(/[ \t]/);)u.end.column+=1;return u},y.prototype.setNewLineMode=function(w){this.doc.setNewLineMode(w)},y.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},y.prototype.setUseWorker=function(w){this.setOption("useWorker",w)},y.prototype.getUseWorker=function(){return this.$useWorker},y.prototype.onReloadTokenizer=function(w){var d=w.data;this.bgTokenizer.start(d.first),this._signal("tokenizerUpdate",w)},y.prototype.setMode=function(w,d){if(w&&typeof w=="object"){if(w.getTokenizer)return this.$onChangeMode(w);var u=w,v=u.path}else v=w||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new o),this.$modes[v]&&!u){this.$onChangeMode(this.$modes[v]),d&&d();return}this.$modeId=v,a.loadModule(["mode",v],(function(L){if(!this.destroyed){
192if(this.$modeId!==v)return d&&d();this.$modes[v]&&!u?this.$onChangeMode(this.$modes[v]):L&&L.Mode&&(L=new L.Mode(u),u||(this.$modes[v]=L,L.$id=v),this.$onChangeMode(L)),d&&d()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},y.prototype.$onChangeMode=function(w,d){if(d||(this.$modeId=w.$id),this.$mode!==w){var u=this.$mode;this.$mode=w,this.$stopWorker(),this.$useWorker&&this.$startWorker();var v=w.getTokenizer();if(v.on!==void 0){var L=this.onReloadTokenizer.bind(this);v.on("update",L)}this.bgTokenizer.setTokenizer(v),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=w.tokenRe,this.nonTokenRe=w.nonTokenRe,d||(w.attachToSession&&w.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(w.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:u,mode:w}))}},y.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},y.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(w){a.warn("Could not load worker",w),this.$worker=null}},y.prototype.getMode=function(){return this.$mode},y.prototype.setScrollTop=function(w){this.$scrollTop===w||isNaN(w)||(this.$scrollTop=w,this._signal("changeScrollTop",w))},y.prototype.getScrollTop=function(){return this.$scrollTop},y.prototype.setScrollLeft=function(w){this.$scrollLeft===w||isNaN(w)||(this.$scrollLeft=w,this._signal("changeScrollLeft",w))},y.prototype.getScrollLeft=function(){return this.$scrollLeft},y.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},y.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var w=0;return this.lineWidgets.forEach(function(d){d&&d.screenWidth>w&&(w=d.screenWidth)}),this.lineWidgetWidth=w},y.prototype.$computeWidth=function(w){if(this.$modified||w){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var d=this.doc.getAllLines(),u=this.$rowLengthCache,v=0,L=0,T=this.$foldData[L],_=T?T.start.row:1/0,D=d.length,N=0;N<D;N++){if(N>_){if(N=T.end.row+1,N>=D)break;T=this.$foldData[L++],_=T?T.start.row:1/0}u[N]==null&&(u[N]=this.$getStringScreenWidth(d[N])[0]),u[N]>v&&(v=u[N])}this.screenWidth=v}},y.prototype.getLine=function(w){return this.doc.getLine(w)},y.prototype.getLines=function(w,d){return this.doc.getLines(w,d)},y.prototype.getLength=function(){return this.doc.getLength()},y.prototype.getTextRange=function(w){return this.doc.getTextRange(w||this.selection.getRange())},y.prototype.insert=function(w,d){return this.doc.insert(w,d)},y.prototype.remove=function(w){return this.doc.remove(w)},y.prototype.removeFullLines=function(w,d){return this.doc.removeFullLines(w,d)},y.prototype.undoChanges=function(w,d){if(w.length){this.$fromUndo=!0;for(var u=w.length-1;u!=-1;u--){var v=w[u];v.action=="insert"||v.action=="remove"?this.doc.revertDelta(v):v.folds&&this.addFolds(v.folds)}!d&&this.$undoSelect&&(w.selectionBefore?this.selection.fromJSON(w.selectionBefore):this.selection.setRange(this.$getUndoSelection(w,!0))),this.$fromUndo=!1}},y.prototype.redoChanges=function(w,d){if(w.length){this.$fromUndo=!0;for(var u=0;u<w.length;u++){var v=w[u];(v.action=="insert"||v.action=="remove")&&this.doc.$safeApplyDelta(v)}!d&&this.$undoSelect&&(w.selectionAfter?this.selection.fromJSON(w.selectionAfter):this.selection.setRange(this.$getUndoSelection(w,!1))),this.$fromUndo=!1}},y.prototype.setUndoSelect=function(w){this.$undoSelect=w},y.prototype.$getUndoSelection=function(w,d){function u(D){return d?D.action!=="insert":D.action==="insert"}for(var v,L,T=0;T<w.length;T++){var _=w[T];if(_.start){if(!v){u(_)?v=n.fromPoints(_.start,_.end):v=n.fromPoints(_.start,_.start);continue}u(_)?(L=_.start,v.compare(L.row,L.column)==-1&&v.setStart(L),L=_.end,v.compare(L.row,L.column)==1&&v.setEnd(L)):(L=_.start,v.compare(L.row,L.column)==-1&&(v=n.fromPoints(_.start,_.start)))}}return v},y.prototype.replace=function(w,d){return this.doc.replace(w,d)},y.prototype.moveText=function(w,d,u){var v=this.getTextRange(w),L=this.getFoldsInRange(w),T=n.fromPoints(d,d);if(!u){this.remove(w);var _=w.start.row-w.end.row,D=_?-w.end.column:w.start.column-w.end.column;D&&(T.start.row==w.end.row&&T.start.column>w.end.column&&(T.start.column+=D),T.end.row==w.end.row&&T.end.column>w.end.column&&(T.end.column+=D)),_&&T.start.row>=w.end.row&&(T.start.row+=_,T.end.row+=_)}if(T.end=this.insert(T.start,v),L.length){var N=w.start,V=T.start,_=V.row-N.row,D=V.column-N.column;this.addFolds(L.map(function(B){return B=B.clone(),B.start.row==N.row&&(B.start.column+=D),B.end.row==N.row&&(B.end.column+=D),B.start.row+=_,B.end.row+=_,B}))}return T},y.prototype.indentRows=function(w,d,u){u=u.replace(/\t/g,this.getTabString());for(var v=w;v<=d;v++)this.doc.insertInLine({row:v,column:0},u)},y.prototype.outdentRows=function(w){for(var d=w.collapseRows(),u=new n(0,0,0,0),v=this.getTabSize(),L=d.start.row;L<=d.end.row;++L){var T=this.getLine(L);u.start.row=L,u.end.row=L;for(var _=0;_<v&&T.charAt(_)==" ";++_);_<v&&T.charAt(_)==" "?(u.start.column=_,u.end.column=_+1):(u.start.column=0,u.end.column=_),this.remove(u)}},y.prototype.$moveLines=function(w,d,u){if(w=this.getRowFoldStart(w),d=this.getRowFoldEnd(d),u<0){var v=this.getRowFoldStart(w+u);if(v<0)return 0;var L=v-w}else if(u>0){var v=this.getRowFoldEnd(d+u);if(v>this.doc.getLength()-1)return 0;var L=v-d}else{w=this.$clipRowToDocument(w),d=this.$clipRowToDocument(d);var L=d-w+1}var T=new n(w,0,d,Number.MAX_VALUE),_=this.getFoldsInRange(T).map(function(N){return N=N.clone(),N.start.row+=L,N.end.row+=L,N}),D=u==0?this.doc.getLines(w,d):this.doc.removeFullLines(w,d);return this.doc.insertFullLines(w+L,D),_.length&&this.addFolds(_),L},y.prototype.moveLinesUp=function(w,d){return this.$moveLines(w,d,-1)},y.prototype.moveLinesDown=function(w,d){return this.$moveLines(w,d,1)},y.prototype.duplicateLines=function(w,d){return this.$moveLines(w,d,0)},y.prototype.$clipRowToDocument=function(w){return Math.max(0,Math.min(w,this.doc.getLength()-1))},y.prototype.$clipColumnToRow=function(w,d){return d<0?0:Math.min(this.doc.getLine(w).length,d)},y.prototype.$clipPositionToDocument=function(w,d){if(d=Math.max(0,d),w<0)w=0,d=0;else{var u=this.doc.getLength();w>
192=u?(w=u-1,d=this.doc.getLine(u-1).length):d=Math.min(this.doc.getLine(w).length,d)}return{row:w,column:d}},y.prototype.$clipRangeToDocument=function(w){w.start.row<0?(w.start.row=0,w.start.column=0):w.start.column=this.$clipColumnToRow(w.start.row,w.start.column);var d=this.doc.getLength()-1;return w.end.row>d?(w.end.row=d,w.end.column=this.doc.getLine(d).length):w.end.column=this.$clipColumnToRow(w.end.row,w.end.column),w},y.prototype.setUseWrapMode=function(w){if(w!=this.$useWrapMode){if(this.$useWrapMode=w,this.$modified=!0,this.$resetRowCache(0),w){var d=this.getLength();this.$wrapData=Array(d),this.$updateWrapData(0,d-1)}this._signal("changeWrapMode")}},y.prototype.getUseWrapMode=function(){return this.$useWrapMode},y.prototype.setWrapLimitRange=function(w,d){(this.$wrapLimitRange.min!==w||this.$wrapLimitRange.max!==d)&&(this.$wrapLimitRange={min:w,max:d},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},y.prototype.adjustWrapLimit=function(w,d){var u=this.$wrapLimitRange;u.max<0&&(u={min:d,max:d});var v=this.$constrainWrapLimit(w,u.min,u.max);return v!=this.$wrapLimit&&v>1?(this.$wrapLimit=v,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},y.prototype.$constrainWrapLimit=function(w,d,u){return d&&(w=Math.max(d,w)),u&&(w=Math.min(u,w)),w},y.prototype.getWrapLimit=function(){return this.$wrapLimit},y.prototype.setWrapLimit=function(w){this.setWrapLimitRange(w,w)},y.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},y.prototype.$updateInternalDataOnChange=function(w){var d=this.$useWrapMode,u=w.action,v=w.start,L=w.end,T=v.row,_=L.row,D=_-T,N=null;if(this.$updating=!0,D!=0)if(u==="remove"){this[d?"$wrapData":"$rowLengthCache"].splice(T,D);var V=this.$foldData;N=this.getFoldsInRange(w),this.removeFolds(N);var F=this.getFoldLine(L.row),W=0;if(F){F.addRemoveChars(L.row,L.column,v.column-L.column),F.shiftRow(-D);var B=this.getFoldLine(T);B&&B!==F&&(B.merge(F),F=B),W=V.indexOf(F)+1}for(W;W<V.length;W++){var F=V[W];F.start.row>=L.row&&F.shiftRow(-D)}_=T}else{var z=Array(D);z.unshift(T,0);var P=d?this.$wrapData:this.$rowLengthCache;P.splice.apply(P,z);var V=this.$foldData,F=this.getFoldLine(T),W=0;if(F){var U=F.range.compareInside(v.row,v.column);U==0?(F=F.split(v.row,v.column),F&&(F.shiftRow(D),F.addRemoveChars(_,0,L.column-v.column))):U==-1&&(F.addRemoveChars(T,0,L.column-v.column),F.shiftRow(D)),W=V.indexOf(F)+1}for(W;W<V.length;W++){var F=V[W];F.start.row>=T&&F.shiftRow(D)}}else{D=Math.abs(w.start.column-w.end.column),u==="remove"&&(N=this.getFoldsInRange(w),this.removeFolds(N),D=-D);var F=this.getFoldLine(T);F&&F.addRemoveChars(T,v.column,D)}return d&&this.$wrapData.length!=this.doc.getLength(),this.$updating=!1,d?this.$updateWrapData(T,_):this.$updateRowLengthCache(T,_),N},y.prototype.$updateRowLengthCache=function(w,d){this.$rowLengthCache[w]=null,this.$rowLengthCache[d]=null},y.prototype.$updateWrapData=function(w,d){var u=this.doc.getAllLines(),v=this.getTabSize(),L=this.$wrapData,T=this.$wrapLimit,_,D,N=w;for(d=Math.min(d,u.length-1);N<=d;)D=this.getFoldLine(N,D),D?(_=[],D.walk((function(V,F,W,B){var z;if(V!=null){z=this.$getDisplayTokens(V,_.length),z[0]=g;for(var P=1;P<z.length;P++)z[P]=f}else z=this.$getDisplayTokens(u[F].substring(B,W),_.length);_=_.concat(z)}).bind(this),D.end.row,u[D.end.row].length+1),L[D.start.row]=this.$computeWrapSplits(_,T,v),N=D.end.row+1):(_=this.$getDisplayTokens(u[N]),L[N]=this.$computeWrapSplits(_,T,v),N++)},y.prototype.$computeWrapSplits=function(w,d,u){if(w.length==0)return[];var v=[],L=w.length,T=0,_=0,D=this.$wrapAsCode,N=this.$indentedSoftWrap,V=d<=Math.max(2*u,8)||N===!1?0:Math.floor(d/2);function F(){var U=0;if(V===0)return U;if(N)for(var Y=0;Y<w.length;Y++){var j=w[Y];if(j==M)U+=1;else if(j==C)U+=u;else{if(j==S)continue;break}}return D&&N!==!1&&(U+=u),Math.min(U,V)}function W(U){for(var Y=U-T,j=T;j<U;j++){var X=w[j];(X===12||X===2)&&(Y-=1)}v.length||(B=F(),v.indent=B),_+=Y,v.push(_),T=U}for(var B=0;L-T>d-B;){var z=T+d-B;if(w[z-1]>=M&&w[z]>=M){W(z);continue}if(w[z]==g||w[z]==f){for(z;z!=T-1&&w[z]!=g;z--);if(z>T){W(z);continue}for(z=T+d,z;z<w.length&&w[z]==f;z++);if(z==w.length)break;W(z);continue}for(var P=Math.max(z-(d-(d>>2)),T-1);z>P&&w[z]<g;)z--;if(D){for(;z>P&&w[z]<g;)z--;for(;z>P&&w[z]==b;)z--}else for(;z>P&&w[z]<M;)z--;if(z>P){W(++z);continue}z=T+d,w[z]==p&&z--,W(z-B)}return v},y.prototype.$getDisplayTokens=function(w,d){var u=[],v;d=d||0;for(var L=0;L<w.length;L++){var T=w.charCodeAt(L);if(T==9){v=this.getScreenTabSize(u.length+d),u.push(C);for(var _=1;_<v;_++)u.push(S)}else T==32?u.push(M):T>39&&T<48||T>57&&T<64?u.push(b):T>=4352&&R(T)?u.push(m,p):u.push(m)}return u},y.prototype.$getStringScreenWidth=function(w,d,u){if(d==0)return[0,0];d==null&&(d=1/0),u=u||0;var v,L;for(L=0;L<w.length&&(v=w.charCodeAt(L),v==9?u+=this.getScreenTabSize(u):v>=4352&&R(v)?u+=2:u+=1,!(u>d));L++);return[u,L]},y.prototype.getRowLength=function(w){var d=1;return this.lineWidgets&&(d+=this.lineWidgets[w]&&this.lineWidgets[w].rowCount||0),!this.$useWrapMode||!this.$wrapData[w]?d:this.$wrapData[w].length+d},y.prototype.getRowLineCount=function(w){return!this.$useWrapMode||!this.$wrapData[w]?1:this.$wrapData[w].length+1},y.prototype.getRowWrapIndent=function(w){if(this.$useWrapMode){var d=this.screenToDocumentPosition(w,Number.MAX_VALUE),u=this.$wrapData[d.row];return u.length&&u[0]<d.column?u.indent:0}else return 0},y.prototype.getScreenLastRowColumn=function(w){var d=this.screenToDocumentPosition(w,Number.MAX_VALUE);return this.documentToScreenColumn(d.row,d.column)},y.prototype.getDocumentLastRowColumn=function(w,d){var u=this.documentToScreenRow(w,d);
192return this.getScreenLastRowColumn(u)},y.prototype.getDocumentLastRowColumnPosition=function(w,d){var u=this.documentToScreenRow(w,d);return this.screenToDocumentPosition(u,Number.MAX_VALUE/10)},y.prototype.getRowSplitData=function(w){if(this.$useWrapMode)return this.$wrapData[w]},y.prototype.getScreenTabSize=function(w){return this.$tabSize-(w%this.$tabSize|0)},y.prototype.screenToDocumentRow=function(w,d){return this.screenToDocumentPosition(w,d).row},y.prototype.screenToDocumentColumn=function(w,d){return this.screenToDocumentPosition(w,d).column},y.prototype.screenToDocumentPosition=function(w,d,u){if(w<0)return{row:0,column:0};var v,L=0,T=0,_,D=0,N=0,V=this.$screenRowCache,F=this.$getRowCacheIndex(V,w),W=V.length;if(W&&F>=0)var D=V[F],L=this.$docRowCache[F],B=w>V[W-1];else var B=!W;for(var z=this.getLength()-1,P=this.getNextFoldLine(L),U=P?P.start.row:1/0;D<=w&&(N=this.getRowLength(L),!(D+N>w||L>=z));)D+=N,L++,L>U&&(L=P.end.row+1,P=this.getNextFoldLine(L,P),U=P?P.start.row:1/0),B&&(this.$docRowCache.push(L),this.$screenRowCache.push(D));if(P&&P.start.row<=L)v=this.getFoldDisplayLine(P),L=P.start.row;else{if(D+N<=w||L>z)return{row:z,column:this.getLine(z).length};v=this.getLine(L),P=null}var Y=0,j=Math.floor(w-D);if(this.$useWrapMode){var X=this.$wrapData[L];X&&(_=X[j],j>0&&X.length&&(Y=X.indent,T=X[j-1]||X[X.length-1],v=v.substring(T)))}return u!==void 0&&this.$bidiHandler.isBidiRow(D+j,L,j)&&(d=this.$bidiHandler.offsetToCol(u)),T+=this.$getStringScreenWidth(v,d-Y)[1],this.$useWrapMode&&T>=_&&(T=_-1),P?P.idxToPosition(T):{row:L,column:T}},y.prototype.documentToScreenPosition=function(w,d){if(typeof d>"u")var u=this.$clipPositionToDocument(w.row,w.column);else u=this.$clipPositionToDocument(w,d);w=u.row,d=u.column;var v=0,L=null,T=null;T=this.getFoldAt(w,d,1),T&&(w=T.start.row,d=T.start.column);var _,D=0,N=this.$docRowCache,V=this.$getRowCacheIndex(N,w),F=N.length;if(F&&V>=0)var D=N[V],v=this.$screenRowCache[V],W=w>N[F-1];else var W=!F;for(var B=this.getNextFoldLine(D),z=B?B.start.row:1/0;D<w;){if(D>=z){if(_=B.end.row+1,_>w)break;B=this.getNextFoldLine(_,B),z=B?B.start.row:1/0}else _=D+1;v+=this.getRowLength(D),D=_,W&&(this.$docRowCache.push(D),this.$screenRowCache.push(v))}var P="";B&&D>=z?(P=this.getFoldDisplayLine(B,w,d),L=B.start.row):(P=this.getLine(w).substring(0,d),L=w);var U=0;if(this.$useWrapMode){var Y=this.$wrapData[L];if(Y){for(var j=0;P.length>=Y[j];)v++,j++;P=P.substring(Y[j-1]||0,P.length),U=j>0?Y.indent:0}}return this.lineWidgets&&this.lineWidgets[D]&&this.lineWidgets[D].rowsAbove&&(v+=this.lineWidgets[D].rowsAbove),{row:v,column:U+this.$getStringScreenWidth(P)[0]}},y.prototype.documentToScreenColumn=function(w,d){return this.documentToScreenPosition(w,d).column},y.prototype.documentToScreenRow=function(w,d){return this.documentToScreenPosition(w,d).row},y.prototype.getScreenLength=function(){var w=0,d=null;if(this.$useWrapMode)for(var L=this.$wrapData.length,T=0,v=0,d=this.$foldData[v++],_=d?d.start.row:1/0;T<L;){var D=this.$wrapData[T];w+=D?D.length+1:1,T++,T>_&&(T=d.end.row+1,d=this.$foldData[v++],_=d?d.start.row:1/0)}else{w=this.getLength();for(var u=this.$foldData,v=0;v<u.length;v++)d=u[v],w-=d.end.row-d.start.row}return this.lineWidgets&&(w+=this.$getWidgetScreenLength()),w},y.prototype.$setFontMetrics=function(w){this.$enableVarChar&&(this.$getStringScreenWidth=function(d,u,v){if(u===0)return[0,0];u||(u=1/0),v=v||0;var L,T;for(T=0;T<d.length&&(L=d.charAt(T),L===" "?v+=this.getScreenTabSize(v):v+=w.getCharacterWidth(L),!(v>u));T++);return[v,T]})},y.prototype.getPrecedingCharacter=function(){var w=this.selection.getCursor();if(w.column===0)return w.row===0?"":this.doc.getNewLineCharacter();var d=this.getLine(w.row);return d[w.column-1]},y.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},y})();c.$uid=0,c.prototype.$modes=a.$modes,c.prototype.getValue=c.prototype.toString,c.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},c.prototype.$overwrite=!1,c.prototype.$mode=null,c.prototype.$modeId=null,c.prototype.$scrollTop=0,c.prototype.$scrollLeft=0,c.prototype.$wrapLimit=80,c.prototype.$useWrapMode=!1,c.prototype.$wrapLimitRange={min:null,max:null},c.prototype.lineWidgets=null,c.prototype.isFullWidth=R,x.implement(c.prototype,l);var m=1,p=2,g=3,f=4,b=9,M=10,C=11,S=12;function R(y){return y<4352?!1:y>=4352&&y<=4447||y>=4515&&y<=4519||y>=4602&&y<=4607||y>=9001&&y<=9002||y>=11904&&y<=11929||y>=11931&&y<=12019||y>=12032&&y<=12245||y>=12272&&y<=12283||y>=12288&&y<=12350||y>=12353&&y<=12438||y>=12441&&y<=12543||y>=12549&&y<=12589||y>=12593&&y<=12686||y>=12688&&y<=12730||y>=12736&&y<=12771||y>=12784&&y<=12830||y>=12832&&y<=12871||y>=12880&&y<=13054||y>=13056&&y<=19903||y>=19968&&y<=42124||y>=42128&&y<=42182||y>=43360&&y<=43388||y>=44032&&y<=55203||y>=55216&&y<=55238||y>=55243&&y<=55291||y>=63744&&y<=64255||y>=65040&&y<=65049||y>=65072&&y<=65106||y>=65108&&y<=65126||y>=65128&&y<=65131||y>=65281&&y<=65376||y>=65504&&y<=65510}E("./edit_session/folding").Folding.call(c.prototype),E("./edit_session/bracket_match").BracketMatch.call(c.prototype),a.defineOptions(c.prototype,"session",{wrap:{set:function(y){if(!y||y=="off"?y=!1:y=="free"?y=!0:y=="printMargin"?y=-1:typeof y=="string"&&(y=parseInt(y,10)||!1),this.$wrap!=y)if(this.$wrap=y,
192!y)this.setUseWrapMode(!1);else{var w=typeof y=="number"?y:null;this.setWrapLimitRange(w,w),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(y){y=y=="auto"?this.$mode.type!="text":y!="text",y!=this.$wrapAsCode&&(this.$wrapAsCode=y,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(y){this.$useWorker=y,this.$stopWorker(),y&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(y){y=parseInt(y),y>0&&this.$tabSize!==y&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=y,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(y){this.setFoldStyle(y)},handlesSet:!0},overwrite:{set:function(y){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(y){this.doc.setNewLineMode(y)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(y){this.setMode(y)},get:function(){return this.$modeId},handlesSet:!0}}),k.EditSession=c}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(E,k,H){var x=E("./lib/lang"),A=E("./lib/oop"),$=E("./range").Range,a=(function(){function n(){this.$options={}}return n.prototype.set=function(t){return A.mixin(this.$options,t),this},n.prototype.getOptions=function(){return x.copyObject(this.$options)},n.prototype.setOptions=function(t){this.$options=t},n.prototype.find=function(t){var e=this.$options,i=this.$matchIterator(t,e);if(!i)return!1;var s=null;return i.forEach(function(h,c,m,p){return s=new $(h,c,m,p),c==p&&e.start&&e.start.start&&e.skipCurrent!=!1&&s.isEqual(e.start)?(s=null,!1):!0}),s},n.prototype.findAll=function(t){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var i=e.range,s=i?t.getLines(i.start.row,i.end.row):t.doc.getAllLines(),h=[],c=e.re;if(e.$isMultiLine){var m=c.length,p=s.length-m,g;e:for(var f=c.offset||0;f<=p;f++){for(var b=0;b<m;b++)if(s[f+b].search(c[b])==-1)continue e;var M=s[f],C=s[f+m-1],S=M.length-M.match(c[0])[0].length,R=C.match(c[m-1])[0].length;g&&g.end.row===f&&g.end.column>S||(h.push(g=new $(f,S,f+m-1,R)),m>2&&(f=f+m-2))}}else for(var y,w=0;w<s.length;w++)if(this.$isMultilineSearch(e)){var d=s.length-1;if(y=this.$multiLineForward(t,c,w,d),y){var u=y.endRow<=d?y.endRow-1:d;u>w&&(w=u),h.push(new $(y.startRow,y.startCol,y.endRow,y.endCol))}}else{y=x.getMatchOffsets(s[w],c);for(var b=0;b<y.length;b++){var v=y[b];h.push(new $(w,v.offset,w,v.offset+v.length))}}if(i){for(var L=i.start.column,T=i.end.column,w=0,b=h.length-1;w<b&&h[w].start.column<L&&h[w].start.row==0;)w++;for(var _=i.end.row-i.start.row;w<b&&h[b].end.column>T&&h[b].end.row==_;)b--;for(h=h.slice(w,b+1),w=0,b=h.length;w<b;w++)h[w].start.row+=i.start.row,h[w].end.row+=i.start.row}return h},n.prototype.parseReplaceString=function(t){for(var e={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},i="",s=0,h=t.length;s<h;s++){var c=t.charCodeAt(s);if(c===e.Backslash){if(s++,s>=h){i+="\\";break}var m=t.charCodeAt(s);switch(m){case e.Backslash:i+="\\";break;case e.n:i+=` 193`;break;case e.t:i+=" ";break}continue}if(c===e.DollarSign){if(s++,s>=h){i+="$";break}var p=t.charCodeAt(s);if(p===e.DollarSign){i+="$$";continue}if(p===e.Digit0||p===e.Ampersand){i+="$&";continue}if(e.Digit1<=p&&p<=e.Digit9){i+="$"+t[s];continue}}i+=t[s]}return i||t},n.prototype.replace=function(t,e){var i=this.$options,s=this.$assembleRegExp(i);if(i.$isMultiLine)return e;if(s){var h=this.$isMultilineSearch(i);h&&(t=t.replace(/\r\n|\r|\n/g,` 194`));var c=s.exec(t);if(!c||!h&&c[0].length!=t.length)return null;if(e=i.regExp?this.parseReplaceString(e):e.replace(/\$/g,"$$$$"),e=t.replace(s,e),i.preserveCase){e=e.split("");for(var m=Math.min(t.length,t.length);m--;){var p=t[m];p&&p.toLowerCase()!=p?e[m]=e[m].toUpperCase():e[m]=e[m].toLowerCase()}e=e.join("")}return e}},n.prototype.$assembleRegExp=function(t,e){if(t.needle instanceof RegExp)return t.re=t.needle;var i=t.needle;if(!t.needle)return t.re=!1;t.regExp||(i=x.escapeRegExp(i));var s=t.caseSensitive?"gm":"gmi";
194try{new RegExp(i,"u"),t.$supportsUnicodeFlag=!0,s+="u"}catch{t.$supportsUnicodeFlag=!1}if(t.wholeWord&&(i=l(i,t)),t.$isMultiLine=!e&&/[\n\r]/.test(i),t.$isMultiLine)return t.re=this.$assembleMultilineRegExp(i,s);try{var h=new RegExp(i,s)}catch{h=!1}return t.re=h},n.prototype.$assembleMultilineRegExp=function(t,e){for(var i=t.replace(/\r\n|\r|\n/g,`$ 195^`).split(` 196`),s=[],h=0;h<i.length;h++)try{s.push(new RegExp(i[h],e))}catch{return!1}return s},n.prototype.$isMultilineSearch=function(t){return t.re&&/\\r\\n|\\r|\\n/.test(t.re.source)&&t.regExp&&!t.$isMultiLine},n.prototype.$multiLineForward=function(t,e,i,s){for(var h,c=o(t,i),m=i;m<=s;){for(var p=0;p<c&&!(m>s);p++){var g=t.getLine(m++);h=h==null?g:h+` 197`+g}var f=e.exec(h);if(e.lastIndex=0,f){var b=h.slice(0,f.index).split(` 198`),M=f[0].split(` 199`),C=i+b.length-1,S=b[b.length-1].length,R=C+M.length-1,y=M.length==1?S+M[0].length:M[M.length-1].length;return{startRow:C,startCol:S,endRow:R,endCol:y}}}return null},n.prototype.$multiLineBackward=function(t,e,i,s,h){for(var c,m=o(t,s),p=t.getLine(s).length-i,g=s;g>=h;){for(var f=0;f<m&&g>=h;f++){var b=t.getLine(g--);c=c==null?b:b+` 200`+c}var M=r(c,e,p);if(M){var C=c.slice(0,M.index).split(` 201`),S=M[0].split(` 202`),R=g+C.length,y=C[C.length-1].length,w=R+S.length-1,d=S.length==1?y+S[0].length:S[S.length-1].length;return{startRow:R,startCol:y,endRow:w,endCol:d}}}return null},n.prototype.$matchIterator=function(t,e){var i=this.$assembleRegExp(e);if(!i)return!1;var s=this.$isMultilineSearch(e),h=this.$multiLineForward,c=this.$multiLineBackward,m=e.backwards==!0,p=e.skipCurrent!=!1,g=i.unicode,f=e.range,b=e.start;b||(b=f?f[m?"end":"start"]:t.selection.getRange()),b.start&&(b=b[p!=m?"end":"start"]);var M=f?f.start.row:0,C=f?f.end.row:t.getLength()-1;if(m)var S=function(w){var d=b.row;if(!y(d,b.column,w)){for(d--;d>=M;d--)if(y(d,Number.MAX_VALUE,w))return;if(e.wrap!=!1){for(d=C,M=b.row;d>=M;d--)if(y(d,Number.MAX_VALUE,w))return}}};else var S=function(d){var u=b.row;if(!y(u,b.column,d)){for(u=u+1;u<=C;u++)if(y(u,0,d))return;if(e.wrap!=!1){for(u=M,C=b.row;u<=C;u++)if(y(u,0,d))return}}};if(e.$isMultiLine)var R=i.length,y=function(w,d,u){var v=m?w-R+1:w;if(!(v<0||v+R>t.getLength())){var L=t.getLine(v),T=L.search(i[0]);if(!(!m&&T<d||T===-1)){for(var _=1;_<R;_++)if(L=t.getLine(v+_),L.search(i[_])==-1)return;var D=L.match(i[R-1])[0].length;if(!(m&&D>d)&&u(v,T,v+R-1,D))return!0}}};else if(m)var y=function(d,u,v){if(s){var L=c(t,i,u,d,M);if(!L)return!1;if(v(L.startRow,L.startCol,L.endRow,L.endCol))return!0}else{var T=t.getLine(d),_=[],D,N=0;for(i.lastIndex=0;D=i.exec(T);){var V=D[0].length;if(N=D.index,!V){if(N>=T.length)break;i.lastIndex=N+=x.skipEmptyMatch(T,N,g)}if(D.index+V>u)break;_.push(D.index,V)}for(var F=_.length-1;F>=0;F-=2){var W=_[F-1],V=_[F];if(v(d,W,d,W+V))return!0}}};else var y=function(d,u,v){if(i.lastIndex=u,s){var L=h(t,i,d,C);if(L){var T=L.endRow<=C?L.endRow-1:C;T>d&&(d=T)}if(!L)return!1;if(v(L.startRow,L.startCol,L.endRow,L.endCol))return!0}else for(var _=t.getLine(d),D,N;N=i.exec(_);){var V=N[0].length;if(D=N.index,v(d,D,d,D+V))return!0;if(!V&&(i.lastIndex=D+=x.skipEmptyMatch(_,D,g),D>=_.length))return!1}};return{forEach:S}},n})();function l(n,t){var e=x.supportsLookbehind();function i(m,p){p===void 0&&(p=!0);var g=e&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return g.test(m)||t.regExp?e&&t.$supportsUnicodeFlag?p?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var s=Array.from(n),h=s[0],c=s[s.length-1];return i(h)+n+i(c,!1)}function r(n,t,e){for(var i=null,s=0;s<=n.length;){t.lastIndex=s;var h=t.exec(n);if(!h)break;var c=h.index+h[0].length;if(c>n.length-e)break;(!i||c>i.index+i[0].length)&&(i=h),s=h.index+1}return i}function o(n,t){var e=5e3,i={row:t,column:0},s=n.doc.positionToIndex(i),h=s+e,c=n.doc.indexToPosition(h),m=c.row;return m+1}k.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(E,k,H){var x=this&&this.__extends||(function(){var n=function(t,e){return n=Object.
202setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,s){i.__proto__=s}||function(i,s){for(var h in s)Object.prototype.hasOwnProperty.call(s,h)&&(i[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 i(){this.constructor=t}t.prototype=e===null?Object.create(e):(i.prototype=e.prototype,new i)}})(),A=E("../lib/keys"),$=E("../lib/useragent"),a=A.KEY_MODS,l=(function(){function n(t,e){this.$init(t,e,!1)}return n.prototype.$init=function(t,e,i){this.platform=e||($.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=i},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 i=t&&(typeof t=="string"?t:t.name);t=this.commands[i],e||delete this.commands[i];var s=this.commandKeyBinding;for(var h in s){var c=s[h];if(c==t)delete s[h];else if(Array.isArray(c)){var m=c.indexOf(t);m!=-1&&(c.splice(m,1),c.length==1&&(s[h]=c[0]))}}},n.prototype.bindKey=function(t,e,i){if(typeof t=="object"&&t&&(i==null&&(i=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 c=s.split(/\s+/);s=c.pop(),c.forEach(function(g){var f=this.parseKeys(g),b=a[f.hashId]+f.key;h+=(h?" ":"")+b,this._addCommandToBinding(h,"chainKeys")},this),h+=" "}var m=this.parseKeys(s),p=a[m.hashId]+m.key;this._addCommandToBinding(h+p,e,i)},this)}},n.prototype._addCommandToBinding=function(t,e,i){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 i!="number"&&(i=r(e));var c=s[t];for(h=0;h<c.length;h++){var m=c[h],p=r(m);if(p>i)break}c.splice(h,0,e)}},n.prototype.addCommands=function(t){t&&Object.keys(t).forEach(function(e){var i=t[e];if(i){if(typeof i=="string")return this.bindKey(i,e);typeof i=="function"&&(i={exec:i}),typeof i=="object"&&(i.name||(i.name=e),this.addCommand(i))}},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(p){return p}),i=e.pop(),s=A[i];if(A.FUNCTION_KEYS[s])i=A.FUNCTION_KEYS[s].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:i.toUpperCase(),hashId:-1}}else return{key:i,hashId:-1};for(var h=0,c=e.length;c--;){var m=A.KEY_MODS[e[c]];if(m==null)return!1;h|=m}return{key:i,hashId:h}},n.prototype.findKeyCommand=function(t,e){var i=a[t]+e;return this.commandKeyBinding[i]},n.prototype.handleKeyboard=function(t,e,i,s){if(!(s<0)){var h=a[e]+i,c=this.commandKeyBinding[h];return t.$keyChain&&(t.$keyChain+=" "+h,c=this.commandKeyBinding[t.$keyChain]||c),c&&(c=="chainKeys"||c[c.length-1]=="chainKeys")?(t.$keyChain=t.$keyChain||h,{command:"null"}):(t.$keyChain&&((!e||e==4)&&i.length==1?t.$keyChain=t.$keyChain.slice(0,-h.length-1):(e==-1||s>0)&&(t.$keyChain="")),{command:c})}},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 o=(function(n){x(t,n);function t(e,i){var s=n.call(this,e,i)||this;return s.$singleCommand=!0,s}return t})(l);o.call=function(n,t,e){l.prototype.$init.call(n,t,e,!0)},l.call=function(n,t,e){l.prototype.$init.call(n,t,e,!1)},k.HashHandler=o,k.MultiHashHandler=l}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(E,k,H){var x=this&&this.__extends||(function(){var r=function(o,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},r(o,n)};return function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");r(o,n);function t(){this.constructor=o}
202o.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}})(),A=E("../lib/oop"),$=E("../keyboard/hash_handler").MultiHashHandler,a=E("../lib/event_emitter").EventEmitter,l=(function(r){x(o,r);function o(n,t){var e=r.call(this,t,n)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(i){return i.args?i.command.exec(i.editor,i.args,i.event,!1):i.command.exec(i.editor,{},i.event,!0)}),e}return o.prototype.exec=function(n,t,e){if(Array.isArray(n)){for(var i=n.length;i--;)if(this.exec(n[i],t,e))return!0;return!1}typeof n=="string"&&(n=this.commands[n]);var s={editor:t,command:n,args:e};return this.canExecute(n,t)?(s.returnValue=this._emit("exec",s),this._signal("afterExec",s),s.returnValue!==!1):(this._signal("commandUnavailable",s),!1)},o.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))},o.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)},o.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}}},o.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})},o})($);A.implement(l.prototype,a),k.CommandManager=l}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(E,k,H){var x=E("../lib/lang"),A=E("../config"),$=E("../range").Range;function a(r,o){return{win:r,mac:o}}k.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(r){A.loadModule("ace/ext/settings_menu",function(o){o.init(r),r.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(r){A.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(r,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(r){A.loadModule("ace/ext/error_marker",function(o){o.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,o){typeof o=="number"&&!isNaN(o)&&r.gotoLine(o),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(
vendor: 8,214 bytes, line 202
202)},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){A.loadModule("ace/ext/searchbox",function(o){o.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,o){r.navigateUp(o.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,o){r.navigateDown(o.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,o){r.navigateLeft(o.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,o){r.navigateRight(o.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 o=r.$copyWithEmptySelection&&r.selection.isEmpty(),n=o?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,o){r.$handlePaste(o)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(r){r.removeLines()}
202,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){A.loadModule("ace/ext/searchbox",function(o){o.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 o=r.selection.getRange();o.start.column=0,r.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(r){var o=r.selection.getRange();o.end.column=Number.MAX_VALUE,r.session.remove(o)},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()}
202,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,o){r.insert(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(r,o){r.insert(x.stringRepeat(o.text||"",o.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 o=r.selection.getRange();o.start.column=o.end.column=0,o.end.row++,r.selection.setRange(o,!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 o=r.selection.isBackwards(),n=o?r.selection.getSelectionLead():r.selection.getSelectionAnchor(),t=o?r.selection.getSelectionAnchor():r.selection.getSelectionLead(),e=r.session.doc.getLine(n.row).length,i=r.session.doc.getTextRange(r.selection.getRange()),s=i.replace(/\n\s*/," ").length,h=r.session.doc.getLine(n.row),c=n.row+1;c<=t.row+1;c++){var m=x.stringTrimLeft(x.stringTrimRight(r.session.doc.getLine(c)));m.length!==0&&(m=" "+m),h+=m}t.row+1<r.session.doc.getLength()-1&&(h+=r.session.doc.getNewLineCharacter()),r.clearSelection(),r.session.doc.replace(new $(n.row,0,t.row+2,0),h),s>0?(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 o=r.session.doc.getLength()-1,n=r.session.doc.getLine(o).length,t=r.selection.rangeList.ranges,e=[];t.length<1&&(t=[r.selection.getRange()]);for(var i=0;i<t.length;i++)i==t.length-1&&(t[i].end.row===o&&t[i].end.column===n||e.push(new $(t[i].end.row,t[i].end.column,o,n))),i===0?t[i].start.row===0&&t[i].start.column===0||e.push(new $(0,0,t[i].start.row,t[i].start.column)):e.push(new $(t[i-1].end.row,t[i-1].end.column,t[i].start.row,t[i].start.column));r.exitMultiSelectMode(),r.clearSelection();for(var i=0;i<e.length;i++)r.selection.addRange(e[i],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(r){r.selection.clearSelection(),r.navigateLineEnd(),r.insert(` 203`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(r){r.selection.clearSelection();var o=r.getCursorPosition();r.selection.moveTo(o.row-1,Number.MAX_VALUE),r.insert(` 204`),o.row===0&&r.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(r){r.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:a("F1","F1"),exec:function(r){r.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(r){r.prompt({$type:"modes"})},readOnly:!0}];for(var l=1;l<9;l++)k.commands.push({name:"foldToLevel"+l,description:"Fold To Level "+l,level:l,exec:function(r){r.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(E,k,H){var x=E("../lib/keys"),A=(function(){function a(l){this.editor=l,this.gutterLayer=l.renderer.$gutterLayer,this.element=l.renderer.$gutter,this.lines=l.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return a.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))},a.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))},a.prototype.$onGutterKeyDown=function(l){if(this.annotationTooltip.isOpen){l.preventDefault(),l.keyCode===x.escape&&this.annotationTooltip.hide();return}if(l.target===this.element){if(l.keyCode!=x.enter)return;l.preventDefault();var r=this.editor.getCursorPosition().row;this.editor.isRowVisible(r)||this.editor.scrollToLine(r,!0,!0),setTimeout((function(){var o=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),n=this.$findNearestFoldLaneWidget(o),t=this.$findNearestAnnotation(o);if(!(n===null&&t===null)){var e=this.$findClosestNumber(n,t,o);if(e===n)if(this.activeLane="fold",this.activeRowIndex=n,this.$isCustomWidgetVisible(n)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=t,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(l),setTimeout((function(){this.editor._signal("gutterkeydown",new $(l,this))}).bind(this),10)},a.prototype.$handleGutterKeyboardInteraction=function(l){if(l.keyCode===x.tab){l.preventDefault();return}if(l.keyCode===x.escape){l.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(l.keyCode===x.up){switch(l.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(l.keyCode===x.down){switch(l.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(l.keyCode===x.left){l.preventDefault(),this.$switchLane("annotation");return}if(l.keyCode===x.right){l.preventDefault(),this.$switchLane("fold");return}if(l.keyCode===x.enter||l.keyCode===x.space){switch(l.preventDefault(),this.activeLane){case"fold":var r=this.$rowIndexToRow(this.activeRowIndex),o=this.editor.session.$gutterCustomWidgets[r];if(o)o.callbacks&&o.callbacks.onClick&&o.callbacks.onClick(l,r);else if(this.gutterLayer.session.foldWidgets[r]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),l),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==r&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(r),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0;break}return}},a.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},a.prototype.$isFoldWidgetVisible=function(l){var r=this.editor.isRowFullyVisible(this.$rowIndexToRow(l)),o=this.$getFoldWidget(l).style.display!=="none";return r&&o},a.prototype.$isCustomWidgetVisible=function(l){var r=this.editor.isRowFullyVisible(this.$rowIndexToRow(l)),o=!!this.$getCustomWidget(l);return r&&o},a.prototype.$isAnnotationVisible=function(l){var r=this.editor.isRowFullyVisible(this.$rowIndexToRow(l)),o=this.$getAnnotation(l).style.display!=="none";return r&&o},a.prototype.$getFoldWidget=function(l){var r=this.lines.get(l),o=r.element;return o.childNodes[1]},a.prototype.$getCustomWidget=function(l){var r=this.lines.get(l),o=r.element;return o.childNodes[3]},a.prototype.$getAnnotation=function(l){var r=this.lines.get(l),o=r.element;return o.childNodes[2]},a.prototype.$findNearestFoldLaneWidget=function(l){if(this.$isCustomWidgetVisible(l)||this.$isFoldWidgetVisible(l))return l;for(var r=0;l-r>0||l+r<this.lines.getLength()-1;){if(r++,l-r>
204=0&&this.$isCustomWidgetVisible(l-r))return l-r;if(l+r<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(l+r))return l+r;if(l-r>=0&&this.$isFoldWidgetVisible(l-r))return l-r;if(l+r<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(l+r))return l+r}return null},a.prototype.$findNearestAnnotation=function(l){if(this.$isAnnotationVisible(l))return l;for(var r=0;l-r>0||l+r<this.lines.getLength()-1;){if(r++,l-r>=0&&this.$isAnnotationVisible(l-r))return l-r;if(l+r<=this.lines.getLength()-1&&this.$isAnnotationVisible(l+r))return l+r}return null},a.prototype.$focusFoldWidget=function(l){if(l!=null){var r=this.$getFoldWidget(l);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},a.prototype.$focusCustomWidget=function(l){if(l!=null){var r=this.$getCustomWidget(l);r&&(r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus())}},a.prototype.$focusAnnotation=function(l){if(l!=null){var r=this.$getAnnotation(l);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},a.prototype.$blurFoldWidget=function(l){var r=this.$getFoldWidget(l);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},a.prototype.$blurCustomWidget=function(l){var r=this.$getCustomWidget(l);r&&(r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur())},a.prototype.$blurAnnotation=function(l){var r=this.$getAnnotation(l);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},a.prototype.$moveFoldWidgetUp=function(){for(var l=this.activeRowIndex;l>0;)if(l--,this.$isFoldWidgetVisible(l)||this.$isCustomWidgetVisible(l)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=l,this.$isFoldWidgetVisible(l)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},a.prototype.$moveFoldWidgetDown=function(){for(var l=this.activeRowIndex;l<this.lines.getLength()-1;)if(l++,this.$isFoldWidgetVisible(l)||this.$isCustomWidgetVisible(l)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=l,this.$isFoldWidgetVisible(l)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},a.prototype.$moveAnnotationUp=function(){for(var l=this.activeRowIndex;l>0;)if(l--,this.$isAnnotationVisible(l)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=l,this.$focusAnnotation(this.activeRowIndex);return}},a.prototype.$moveAnnotationDown=function(){for(var l=this.activeRowIndex;l<this.lines.getLength()-1;)if(l++,this.$isAnnotationVisible(l)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=l,this.$focusAnnotation(this.activeRowIndex);return}},a.prototype.$findClosestNumber=function(l,r,o){return l===null?r:r===null||Math.abs(o-l)<=Math.abs(o-r)?l:r},a.prototype.$switchLane=function(l){switch(l){case"annotation":if(this.activeLane==="annotation")break;var r=this.$findNearestAnnotation(this.activeRowIndex);if(r==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var o=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(o===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$isCustomWidgetVisible(o)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},a.prototype.$rowIndexToRow=function(l){var r=this.lines.get(l);return r?r.row:null},a.prototype.$rowToRowIndex=function(l){for(var r=0;r<this.lines.getLength();r++){var o=this.lines.get(r);if(o.row==l)return r}return null},a})();k.GutterKeyboardHandler=A;var $=(function(){function a(l,r){this.gutterKeyboardHandler=r,this.domEvent=l}return a.prototype.getKey=function(){return x.keyCodeToString(this.domEvent.keyCode)},a.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},a.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},a.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},a})();k.GutterKeyboardEvent=$}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(E,k,H){var x=this&&this.__values||function(d){var u=typeof Symbol=="function"&&Symbol.iterator,v=u&&d[u],L=0;if(v)return v.call(d);if(d&&typeof d.length=="number")return{next:function(){return d&&L>=d.length&&(d=void 0),{value:d&&d[L++],done:!d}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")},A=E("./lib/oop"),$=E("./lib/dom"),a=E("./lib/lang"),l=E("./lib/useragent"),r=E("./keyboard/textinput").TextInput,o=E("./mouse/mouse_handler").MouseHandler,n=E("./mouse/fold_handler").FoldHandler,t=E("./keyboard/keybinding").KeyBinding,e=E("./edit_session").EditSession,i=E("./search").Search,s=E("./range").Range,h=E("./lib/event_emitter").EventEmitter,c=E("./commands/command_manager").CommandManager,m=E("./commands/default_commands").commands,p=E("./config"),g=E("./token_iterator").TokenIterator,f=E("./keyboard/gutter_handler").GutterKeyboardHandler,b=E("./config").nls,M=E("./cl
204ipboard"),C=E("./lib/keys"),S=E("./lib/event"),R=E("./tooltip").HoverTooltip,y=(function(){function d(u,v,L){this.id="editor"+ ++d.$uid,this.session,this.$toDestroy=[];var T=u.getContainerElement();this.container=T,this.renderer=u,this.commands=new c(l.isMac?"mac":"win",m),typeof document=="object"&&(this.textInput=new r(u.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new o(this),new n(this)),this.keyBinding=new t(this),this.$search=new i().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(_,D){D._$emitInputEvent.schedule(31)}),this.setSession(v||L&&L.session||new e("")),p.resetOptions(this),L&&this.setOptions(L),p._signal("editor",this)}return d.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},d.prototype.startOperation=function(u){this.session.startOperation(u)},d.prototype.endOperation=function(u){this.session.endOperation(u)},d.prototype.onStartOperation=function(u){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,u||(this.previousCommand=null)},d.prototype.onEndOperation=function(u){if(this.curOp&&this.session){if(u&&u.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var v=this.curOp.command,L=v&&v.scrollIntoView;if(L){switch(L){case"center-animate":L="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var T=this.selection.getRange(),_=this.renderer.layerConfig;(T.start.row>=_.lastRow||T.end.row<=_.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}L=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},d.prototype.$historyTracker=function(u){if(this.$mergeUndoDeltas){var v=this.prevOp,L=this.$mergeableCommands,T=v.command&&u.command.name==v.command.name;if(u.command.name=="insertstring"){var _=u.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),T=T&&this.mergeNextCommand&&(!/\s/.test(_)||/\s/.test(v.args)),this.mergeNextCommand=!0}else T=T&&L.indexOf(u.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(T=!1),T?this.session.mergeUndoDeltas=!0:L.indexOf(u.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},d.prototype.setKeyboardHandler=function(u,v){if(u&&typeof u=="string"&&u!="ace"){this.$keybindingId=u;var L=this;p.loadModule(["keybinding",u],function(T){L.$keybindingId==u&&L.keyBinding.setKeyboardHandler(T&&T.handler),v&&v()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(u),v&&v()},d.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},d.prototype.setSession=function(u){if(this.session!=u){this.curOp&&this.endOperation(),this.curOp={};var v=this.session;if(v){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("
204changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var L=this.session.getSelection();L.off("changeCursor",this.$onCursorChange),L.off("changeSelection",this.$onSelectionChange)}this.session=u,u?(this.$onDocumentChange=this.onDocumentChange.bind(this),u.on("change",this.$onDocumentChange),this.renderer.setSession(u),this.$onChangeMode=this.onChangeMode.bind(this),u.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),u.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),u.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),u.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),u.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),u.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=u.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(u)),this._signal("changeSession",{session:u,oldSession:v}),this.curOp=null,v&&v._signal("changeEditor",{oldEditor:this}),v&&(v.$editor=null),u&&u._signal("changeEditor",{editor:this}),u&&(u.$editor=this),u&&!u.destroyed&&u.bgTokenizer.scheduleStart()}},d.prototype.getSession=function(){return this.session},d.prototype.setValue=function(u,v){return this.session.doc.setValue(u),v?v==1?this.navigateFileEnd():v==-1&&this.navigateFileStart():this.selectAll(),u},d.prototype.getValue=function(){return this.session.getValue()},d.prototype.getSelection=function(){return this.selection},d.prototype.resize=function(u){this.renderer.onResize(u)},d.prototype.setTheme=function(u,v){this.renderer.setTheme(u,v)},d.prototype.getTheme=function(){return this.renderer.getTheme()},d.prototype.setStyle=function(u,v){this.renderer.setStyle(u,v)},d.prototype.unsetStyle=function(u){this.renderer.unsetStyle(u)},d.prototype.getFontSize=function(){return this.getOption("fontSize")||$.computedStyle(this.container).fontSize},d.prototype.setFontSize=function(u){this.setOption("fontSize",u)},d.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var u=this;this.$highlightPending=!0,setTimeout(function(){u.$highlightPending=!1;var v=u.session;if(!(!v||v.destroyed)){v.$bracketHighlight&&(v.$bracketHighlight.markerIds.forEach(function(B){v.removeMarker(B)}),v.$bracketHighlight=null);var L=u.getCursorPosition(),T=u.getKeyboardHandler(),_=T&&T.$getDirectionForHighlight&&T.$getDirectionForHighlight(u),D=v.getMatchingBracketRanges(L,_);if(!D){var N=new g(v,L.row,L.column),V=N.getCurrentToken();
204if(V&&/\b(?:tag-open|tag-name)/.test(V.type)){var F=v.getMatchingTags(L);F&&(D=[F.openTagName.isEmpty()?F.openTag:F.openTagName,F.closeTagName.isEmpty()?F.closeTag:F.closeTagName])}}if(!D&&v.$mode.getMatching&&(D=v.$mode.getMatching(u.session)),!D){u.getHighlightIndentGuides()&&u.renderer.$textLayer.$highlightIndentGuide();return}var W="ace_bracket";Array.isArray(D)?D.length==1&&(W="ace_error_bracket"):D=[D],D.length==2&&(s.comparePoints(D[0].end,D[1].start)==0?D=[s.fromPoints(D[0].start,D[1].end)]:s.comparePoints(D[0].start,D[1].end)==0&&(D=[s.fromPoints(D[1].start,D[0].end)])),v.$bracketHighlight={ranges:D,markerIds:D.map(function(B){return v.addMarker(B,W,"text")})},u.getHighlightIndentGuides()&&u.renderer.$textLayer.$highlightIndentGuide()}},50)}},d.prototype.focus=function(){this.textInput.focus()},d.prototype.isFocused=function(){return this.textInput.isFocused()},d.prototype.blur=function(){this.textInput.blur()},d.prototype.onFocus=function(u){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",u))},d.prototype.onBlur=function(u){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",u))},d.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},d.prototype.onDocumentChange=function(u){var v=this.session.$useWrapMode,L=u.start.row==u.end.row?u.end.row:1/0;this.renderer.updateLines(u.start.row,L,v),this._signal("change",u),this.$cursorChange()},d.prototype.onTokenizerUpdate=function(u){var v=u.data;this.renderer.updateLines(v.first,v.last)},d.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},d.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},d.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},d.prototype.$updateHighlightActiveLine=function(){var u=this.getSession(),v;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(v=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(v=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(v=!1)),u.$highlightLineMarker&&!v)u.removeMarker(u.$highlightLineMarker.id),u.$highlightLineMarker=null;else if(!u.$highlightLineMarker&&v){var L=new s(v.row,v.column,v.row,1/0);L.id=u.addMarker(L,"ace_active-line","screenLine"),u.$highlightLineMarker=L}else v&&(u.$highlightLineMarker.start.row=v.row,u.$highlightLineMarker.end.row=v.row,u.$highlightLineMarker.start.column=v.column,u._signal("changeBackMarker"))},d.prototype.onSelectionChange=function(u){var v=this.session;if(v.$selectionMarker&&v.removeMarker(v.$selectionMarker),v.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var L=this.selection.getRange(),T=this.getSelectionStyle();v.$selectionMarker=v.addMarker(L,"ace_selection",T)}var _=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(_),this._signal("changeSelection")},d.prototype.$getSelectionHighLightRegexp=function(){var u=this.session,v=this.getSelectionRange();if(!(v.isEmpty()||v.isMultiLine())){var L=v.start.column,T=v.end.column,_=u.getLine(v.start.row),D=_.substring(L,T);if(!(D.length>5e3||!/[\w\d]/.test(D))){var N=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:D}),V=_.substring(L-1,T+1);if(N.test(V))return N}}},d.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},d.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},d.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},d.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},d.prototype.onChangeMode=function(u){this.renderer.updateText(),this._emit("changeMode",u)},d.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},d.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},d.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},d.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},d.prototype.getCopyText=function(){var u=this.getSelectedText(),v=this.session.doc.getNewLineCharacter(),L=!1;if(!u&&this.$copyWithEmptySelection){L=!0;for(var T=this.selection.getAllRanges(),_=0;_<T.length;_++){var D=T[_];_&&T[_-1].start.row==D.start.row||(u+=this.session.getLine(D.start.row)+v)}}var N={text:u};return this._signal("copy",N),M.lineMode=L?N.text:!1,N.text},d.prototype.onCopy=function(){this.commands.exec("copy",this)},d.prototype.onCut=function(){this.commands.exec("cut",this)},d.prototype.onPaste=function(u,v){var L={text:u,event:v};this.commands.exec("paste",this,L)},d.prototype.$handlePaste=function(u){typeof u=="string"&&(u={text:u}),this._signal("paste",u);var v=u.text,L=v===M.lineMode,T=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)L?T.insert({row:this.selection.lead.row,column:0},v):this.insert(v);
204else if(L)this.selection.rangeList.ranges.forEach(function(W){T.insert({row:W.start.row,column:0},v)});else{var _=v.split(/\r\n|\r|\n/),D=this.selection.rangeList.ranges,N=_.length==2&&(!_[0]||!_[1]);if(_.length!=D.length||N)return this.commands.exec("insertstring",this,v);for(var V=D.length;V--;){var F=D[V];F.isEmpty()||T.remove(F),T.insert(F.start,_[V])}}},d.prototype.execCommand=function(u,v){return this.commands.exec(u,this,v)},d.prototype.insert=function(u,v){var L=this.session,T=L.getMode(),_=this.getCursorPosition();if(this.getBehavioursEnabled()&&!v){var D=T.transformAction(L.getState(_.row),"insertion",this,L,u);D&&(u!==D.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),u=D.text)}if(u==" "&&(u=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&u.indexOf(` 205`)==-1){var N=s.fromPoints(_,_);N.end.column+=u.length,this.session.remove(N)}}else{var N=this.getSelectionRange();_=this.session.remove(N),this.clearSelection()}if(u==` 206`||u==`\r 207`){var B=L.getLine(_.row);if(_.column>B.search(/\S|$/)){var V=B.substr(_.column).search(/\S|$/);L.doc.removeInLine(_.row,_.column,_.column+V)}}this.clearSelection();var F=_.column,W=L.getState(_.row),B=L.getLine(_.row),z=T.checkOutdent(W,B,u);if(L.insert(_,u),D&&D.selection&&(D.selection.length==2?this.selection.setSelectionRange(new s(_.row,F+D.selection[0],_.row,F+D.selection[1])):this.selection.setSelectionRange(new s(_.row+D.selection[0],D.selection[1],_.row+D.selection[2],D.selection[3]))),this.$enableAutoIndent){if(L.getDocument().isNewLine(u)){var P=T.getNextLineIndent(W,B.slice(0,_.column),L.getTabString());L.insert({row:_.row+1,column:0},P)}z&&T.autoOutdent(W,L,_.row)}},d.prototype.autoIndent=function(){for(var u=this.session,v=u.getMode(),L=this.selection.isEmpty()?[new s(0,0,u.doc.getLength()-1,0)]:this.selection.getAllRanges(),T="",_="",D="",N=u.getTabString(),V=0;V<L.length;V++)for(var F=L[V].start.row,W=L[V].end.row,B=F;B<=W;B++){B>0&&(T=u.getState(B-1),_=u.getLine(B-1),D=v.getNextLineIndent(T,_,N));var z=u.getLine(B),P=v.$getIndent(z);if(D!==P){if(P.length>0){var U=new s(B,0,B,P.length);u.remove(U)}D.length>0&&u.insert({row:B,column:0},D)}v.autoOutdent(T,u,B)}},d.prototype.onTextInput=function(u,v){if(!v)return this.keyBinding.onTextInput(u);this.startOperation({command:{name:"insertstring"}});var L=this.applyComposition.bind(this,u,v);this.selection.rangeCount?this.forEachSelection(L):L(),this.endOperation()},d.prototype.applyComposition=function(u,v){if(v.extendLeft||v.extendRight){var L=this.selection.getRange();L.start.column-=v.extendLeft,L.end.column+=v.extendRight,L.start.column<0&&(L.start.row--,L.start.column+=this.session.getLine(L.start.row).length+1),this.selection.setRange(L),!u&&!L.isEmpty()&&this.remove()}if((u||!this.selection.isEmpty())&&this.insert(u,!0),v.restoreStart||v.restoreEnd){var L=this.selection.getRange();L.start.column-=v.restoreStart,L.end.column-=v.restoreEnd,this.selection.setRange(L)}},d.prototype.onCommandKey=function(u,v,L){return this.keyBinding.onCommandKey(u,v,L)},d.prototype.setOverwrite=function(u){this.session.setOverwrite(u)},d.prototype.getOverwrite=function(){return this.session.getOverwrite()},d.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},d.prototype.setScrollSpeed=function(u){this.setOption("scrollSpeed",u)},d.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},d.prototype.setDragDelay=function(u){this.setOption("dragDelay",u)},d.prototype.getDragDelay=function(){return this.getOption("dragDelay")},d.prototype.setSelectionStyle=function(u){this.setOption("selectionStyle",u)},d.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},d.prototype.setHighlightActiveLine=function(u){this.setOption("highlightActiveLine",u)},d.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},d.prototype.setHighlightGutterLine=function(u){this.setOption("highlightGutterLine",u)},d.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},d.prototype.setHighlightSelectedWord=function(u){this.setOption("highlightSelectedWord",u)},d.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},d.prototype.setAnimatedScroll=function(u){this.renderer.setAnimatedScroll(u)},d.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},d.prototype.setShowInvisibles=function(u){this.renderer.setShowInvisibles(u)},d.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},d.prototype.setDisplayIndentGuides=function(u){this.renderer.setDisplayIndentGuides(u)},d.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},d.prototype.setHighlightIndentGuides=function(u){this.renderer.setHighlightIndentGuides(u)},d.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},d.prototype.setShowPrintMargin=function(u){this.renderer.setShowPrintMargin(u)},d.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},d.prototype.setPrintMarginColumn=function(u){this.renderer.setPrintMarginColumn(u)},d.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},d.prototype.setReadOnly=function(u){this.setOption("readOnly",u)},d.prototype.getReadOnly=function(){return this.getOption("readOnly")},d.prototype.setBehavioursEnabled=function(u){this.setOption("behavioursEnabled",u)},d.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},d.prototype.setWrapBehavioursEnabled=function(u){this.setOption("wrapBehavioursEnabled",u)},d.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},d.prototype.setShowFoldWidgets=function(u){this.setOption("showFoldWidgets",u)},d.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},d.prototype.setFadeFoldWidgets=function(u){this.setOption("fadeFoldWidgets",u)},d.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},d.prototype.remove=function(u){this.selection.isEmpty()&&(u=="left"?this.selection.selectLeft():this.selection.selectRight());var v=this.getSelectionRange();if(this.getBehavioursEnabled()){var L=this.session,T=L.getState(v.start.row),_=L.getMode().transformAction(T,"deletion",this,L,v);if(v.end.column===0){var D=L.getTextRange(v);if(D[D.length-1]==` 208`){var N=L.getLine(v.end.row);/^\s+$/.test(N)&&(v.end.column=N.length)}}_&&(v=_)}this.session.remove(v),this.clearSelection()},d.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},d.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},d.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},d.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var u=this.getSelectionRange();u.start.column==u.end.column&&u.start.row==u.end.row&&(u.end.column=0,u.end.row++),this.session.remove(u),this.clearSelection()},d.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var u=this.getCursorPosition();this.insert(` 209`),this.moveCursorToPosition(u)},d.prototype.setGhostText=function(u,v){this.renderer.setGhostText(u,v)},d.prototype.removeGhostText=function(){this.renderer.removeGhostText()},d.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var u=this.getCursorPosition(),v=u.column;if(v!==0){var L=this.session.getLine(u.row),T,_;v<L.length?(T=L.charAt(v)+L.charAt(v-1),_=new s(u.row,v-1,u.row,v+1)):(T=L.charAt(v-1)+L.charAt(v-2),_=new s(u.row,v-2,u.row,v)),this.session.replace(_,T),this.session.selection.moveToPosition(_.end)}}},d.prototype.toLowerCase=function(){var u=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var v=this.getSelectionRange(),L=this.session.getTextRange(v);this.session.replace(v,L.toLowerCase()),this.selection.setSelectionRange(u)},d.prototype.toUpperCase=function(){var u=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var v=this.getSelectionRange(),L=this.session.getTextRange(v);this.session.replace(v,L.toUpperCase()),this.selection.setSelectionRange(u)},d.prototype.indent=function(){var u=this.session,v=this.getSelectionRange();if(v.start.row<v.end.row){var L=this.$getSelectedRows();u.indentRows(L.first,L.last," ");return}else if(v.start.column<v.end.column){var T=u.getTextRange(v);if(!/^\s+$/.test(T)){var L=this.$getSelectedRows();u.indentRows(L.first,L.last," ");return}}var _=u.getLine(v.start.row),D=v.start,N=u.getTabSize(),V=u.documentToScreenColumn(D.row,D.column);
209if(this.session.getUseSoftTabs())var F=N-V%N,W=a.stringRepeat(" ",F);else{for(var F=V%N;_[v.start.column-1]==" "&&F;)v.start.column--,F--;this.selection.setSelectionRange(v),W=" "}return this.insert(W)},d.prototype.blockIndent=function(){var u=this.$getSelectedRows();this.session.indentRows(u.first,u.last," ")},d.prototype.blockOutdent=function(){var u=this.session.getSelection();this.session.outdentRows(u.getRange())},d.prototype.sortLines=function(){for(var u=this.$getSelectedRows(),v=this.session,L=[],T=u.first;T<=u.last;T++)L.push(v.getLine(T));L.sort(function(N,V){return N.toLowerCase()<V.toLowerCase()?-1:N.toLowerCase()>V.toLowerCase()?1:0});for(var _=new s(0,0,0,0),T=u.first;T<=u.last;T++){var D=v.getLine(T);_.start.row=T,_.end.row=T,_.end.column=D.length,v.replace(_,L[T-u.first])}},d.prototype.toggleCommentLines=function(){var u=this.session.getState(this.getCursorPosition().row),v=this.$getSelectedRows();this.session.getMode().toggleCommentLines(u,this.session,v.first,v.last)},d.prototype.toggleBlockComment=function(){var u=this.getCursorPosition(),v=this.session.getState(u.row),L=this.getSelectionRange();this.session.getMode().toggleBlockComment(v,this.session,L,u)},d.prototype.getNumberAt=function(u,v){var L=/[\-]?[0-9]+(?:\.[0-9]+)?/g;L.lastIndex=0;for(var T=this.session.getLine(u);L.lastIndex<v;){var _=L.exec(T);if(_.index<=v&&_.index+_[0].length>=v){var D={value:_[0],start:_.index,end:_.index+_[0].length};return D}}return null},d.prototype.modifyNumber=function(u){var v=this.selection.getCursor().row,L=this.selection.getCursor().column,T=new s(v,L-1,v,L),_=this.session.getTextRange(T);if(!isNaN(parseFloat(_))&&isFinite(_)){var D=this.getNumberAt(v,L);if(D){var N=D.value.indexOf(".")>=0?D.start+D.value.indexOf(".")+1:D.end,V=D.start+D.value.length-N,F=parseFloat(D.value);F*=Math.pow(10,V),N!==D.end&&L<N?u*=Math.pow(10,D.end-L-1):u*=Math.pow(10,D.end-L),F+=u,F/=Math.pow(10,V);var W=F.toFixed(V),B=new s(v,D.start,v,D.end);this.session.replace(B,W),this.moveCursorTo(v,Math.max(D.start+1,L+W.length-D.value.length))}}else this.toggleWord()},d.prototype.toggleWord=function(){var u=this.selection.getCursor().row,v=this.selection.getCursor().column;this.selection.selectWord();var L=this.getSelectedText(),T=this.selection.getWordRange().start.column,_=L.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),D=v-T-1;D<0&&(D=0);var N=0,V=0,F=this;L.match(/[A-Za-z0-9_]+/)&&_.forEach(function(q,ne){V=N+q.length,D>=N&&D<=V&&(L=q,F.selection.clearSelection(),F.moveCursorTo(u,N+T),F.selection.selectTo(u,V+T)),N=V});for(var W=this.$toggleWordPairs,B,z=0;z<W.length;z++)for(var P=W[z],U=0;U<=1;U++){var Y=+!U,j=L.match(new RegExp("^\\s?_?("+a.escapeRegExp(P[U])+")\\s?$","i"));if(j){var X=L.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(j[1])+")($|\\s)","g"));X&&(B=L.replace(new RegExp(a.escapeRegExp(P[U]),"i"),function(q){var ne=P[Y];return q.toUpperCase()==q?ne=ne.toUpperCase():q.charAt(0).toUpperCase()==q.charAt(0)&&(ne=ne.substr(0,0)+P[Y].charAt(0).toUpperCase()+ne.substr(1)),ne}),this.insert(B),B="")}}},d.prototype.findLinkAt=function(u,v){var L,T,_=this.session.getLine(u),D=_.split(/((?:https?|ftp):\/\/[\S]+)/),N=v;N<0&&(N=0);var V=0,F=0,W;try{for(var B=x(D),z=B.next();!z.done;z=B.next()){var P=z.value;if(F=V+P.length,N>=V&&N<=F&&P.match(/((?:https?|ftp):\/\/[\S]+)/)){W=P.replace(/[\s:.,'";}\]]+$/,"");break}V=F}}catch(U){L={error:U}}finally{try{z&&!z.done&&(T=B.return)&&T.call(B)}finally{if(L)throw L.error}}return W},d.prototype.openLink=function(){var u=this.selection.getCursor(),v=this.findLinkAt(u.row,u.column);return v&&window.open(v,"_blank"),v!=null},d.prototype.removeLines=function(){var u=this.$getSelectedRows();this.session.removeFullLines(u.first,u.last),this.clearSelection()},d.prototype.duplicateSelection=function(){var u=this.selection,v=this.session,L=u.getRange(),T=u.isBackwards();if(L.isEmpty()){var _=L.start.row;v.duplicateLines(_,_)}else{var D=T?L.start:L.end,N=v.insert(D,v.getTextRange(L));L.start=D,L.end=N,u.setSelectionRange(L,T)}},d.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},d.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},d.prototype.moveText=function(u,v,L){return this.session.moveText(u,v,L)}
209,d.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},d.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},d.prototype.$moveLines=function(u,v){var L,T,_=this.selection;if(!_.inMultiSelectMode||this.inVirtualSelectionMode){var D=_.toOrientedRange();L=this.$getSelectedRows(D),T=this.session.$moveLines(L.first,L.last,v?0:u),v&&u==-1&&(T=0),D.moveBy(T,0),_.fromOrientedRange(D)}else{var N=_.rangeList.ranges;_.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var V=0,F=0,W=N.length,B=0;B<W;B++){var z=B;N[B].moveBy(V,0),L=this.$getSelectedRows(N[B]);for(var P=L.first,U=L.last;++B<W;){F&&N[B].moveBy(F,0);var Y=this.$getSelectedRows(N[B]);if(v&&Y.first!=U)break;if(!v&&Y.first>U+1)break;U=Y.last}for(B--,V=this.session.$moveLines(P,U,v?0:u),v&&u==-1&&(z=B+1);z<=B;)N[z].moveBy(V,0),z++;v||(V=0),F+=V}_.fromOrientedRange(_.ranges[0]),_.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},d.prototype.$getSelectedRows=function(u){return u=(u||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(u.start.row),last:this.session.getRowFoldEnd(u.end.row)}},d.prototype.onCompositionStart=function(u){this.renderer.showComposition(u)},d.prototype.onCompositionUpdate=function(u){this.renderer.setCompositionText(u)},d.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},d.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},d.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},d.prototype.isRowVisible=function(u){return u>=this.getFirstVisibleRow()&&u<=this.getLastVisibleRow()},d.prototype.isRowFullyVisible=function(u){return u>=this.renderer.getFirstFullyVisibleRow()&&u<=this.renderer.getLastFullyVisibleRow()},d.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},d.prototype.$moveByPage=function(u,v){var L=this.renderer,T=this.renderer.layerConfig,_=u*Math.floor(T.height/T.lineHeight);v===!0?this.selection.$moveSelection(function(){this.moveCursorBy(_,0)}):v===!1&&(this.selection.moveCursorBy(_,0),this.selection.clearSelection());var D=L.scrollTop;L.scrollBy(0,_*T.lineHeight),v!=null&&L.scrollCursorIntoView(null,.5),L.animateScrolling(D)},d.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},d.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},d.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},d.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},d.prototype.scrollPageDown=function(){this.$moveByPage(1)},d.prototype.scrollPageUp=function(){this.$moveByPage(-1)},d.prototype.scrollToRow=function(u){this.renderer.scrollToRow(u)},d.prototype.scrollToLine=function(u,v,L,T){this.renderer.scrollToLine(u,v,L,T)},d.prototype.centerSelection=function(){var u=this.getSelectionRange(),v={row:Math.floor(u.start.row+(u.end.row-u.start.row)/2),column:Math.floor(u.start.column+(u.end.column-u.start.column)/2)};this.renderer.alignCursor(v,.5)},d.prototype.getCursorPosition=function(){return this.selection.getCursor()},d.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},d.prototype.getSelectionRange=function(){return this.selection.getRange()},d.prototype.selectAll=function(){this.selection.selectAll()},d.prototype.clearSelection=function(){this.selection.clearSelection()},d.prototype.moveCursorTo=function(u,v){this.selection.moveCursorTo(u,v)},d.prototype.moveCursorToPosition=function(u){this.selection.moveCursorToPosition(u)},d.prototype.jumpToMatching=function(u,v){var L=this.getCursorPosition(),T=new g(this.session,L.row,L.column),_=T.getCurrentToken(),D=0;_&&_.type.indexOf("tag-name")!==-1&&(_=T.stepBackward());var N=_||T.stepForward();if(N){var V,F=!1,W={},B=L.column-N.start,z,P={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(N.value.match(/[{}()\[\]]/g)){for(;B<N.value.length&&!F;B++)if(P[N.value[B]])switch(z=P[N.value[B]]+"."+N.type.replace("rparen","lparen"),isNaN(W[z])&&(W[z]=0),N.value[B]){case"(":case"[":case"{":W[z]++;break;case")":case"]":case"}":W[z]--,W[z]===-1&&(V="bracket",F=!0);break}}else N.type.indexOf("tag-name")!==-1&&(isNaN(W[N.value])&&(W[N.value]=0),_.value==="<"&&D>1?W[N.value]++:_.value==="</"&&W[N.value]--,W[N.value]===-1&&(V="tag",F=!0));F||(_=N,D++,N=T.stepForward(),B=0)}while(N&&!F);if(V){var U,Y;if(V==="bracket")U=this.session.getBracketRange(L),U||(U=new s(T.getCurrentTokenRow(),T.getCurrentTokenColumn()+B-1,T.getCurrentTokenRow(),T.getCurrentTokenColumn()+B-1),Y=U.start,(v||Y.row===L.row&&Math.abs(Y.column-L.column)<2)&&(U=this.session.getBracketRange(Y)));else if(V==="tag"){if(!N||N.type.indexOf("tag-name")===-1)return;if(U=new s(T.getCurrentTokenRow(),T.getCurrentTokenColumn()-2,T.getCurrentTokenRow(),T.getCurrentTokenColumn()-2),U.compare(L.row,L.column)===0){var j=this.session.getMatchingTags(L);j&&(j.openTag.contains(L.row,L.column)?(U=j.closeTag,Y=U.start):(U=j.openTag,j.closeTag.start.row===L.row&&j.closeTag.start.column===L.column?Y=U.end:Y=U.start))}Y=Y||U.start}Y=U&&U.cursor||Y,Y&&(u?U&&v?this.selection.setRange(U):U&&U.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(Y.row,Y.column):this.selection.moveTo(Y.row,Y.column))}}},d.prototype.gotoLine=function(u,v,L){this.selection.clearSelection(),this.session.unfold({row:u-1,column:v||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(u-1,v||0),this.isRowFullyVisible(u-1)||this.scrollToLine(u-1,!0,L)},d.prototype.navigateTo=function(u,v){this.selection.moveTo(u,v)},d.prototype.navigateUp=function(u){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var v=this.selection.anchor.getPosition();return this.moveCursorToPosition(v)}this.selection.clearSelection(),this.selection.moveCursorBy(-u||-1,0)},d.prototype.navigateDown=function(u){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var v=this.selection.anchor.getPosition();return this.moveCursorToPosition(v)}this.selection.clearSelection(),this.selection.moveCursorBy(u||1,0)},d.prototype.navigateLeft=function(u){if(this.selection.isEmpty())for(u=u||1;u--;)this.selection.moveCursorLeft();else{var v=this.getSelectionRange().start;this.moveCursorToPosition(v)}this.clearSelection()},d.prototype.navigateRight=function(u){if(this.selection.isEmpty())for(u=u||1;u--;)this.selection.moveCursorRight();else{var v=this.getSelectionRange().end;this.moveCursorToPosition(v)}this.clearSelection()},d.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},d.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},d.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},d.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},d.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},d.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},d.prototype.replace=function(u,v){v&&this.$search.set(v);var L=this.$search.find(this.session),T=0;return L&&(this.$tryReplace(L,u)&&(T=1),this.selection.setSelectionRange(L),this.renderer.scrollSelectionIntoView(L.start,L.end)),T},d.prototype.replaceAll=function(u,v){v&&this.$search.set(v);var L=this.$search.findAll(this.session),T=0;if(!L.length)return T;var _=this.getSelectionRange();this.selection.moveTo(0,0);for(var D=L.length-1;D>=0;--D)this.$tryReplace(L[D],u)&&T++;return this.selection.setSelectionRange(_),T},d.prototype.$tryReplace=function(u,v){var L=this.session.getTextRange(u);return v=this.$search.replace(L,v),v!==null?(u.end=this.session.replace(u,v),u):null},d.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},d.prototype.find=function(u,v,L){v||(v={}),typeof u=="string"||u instanceof RegExp?v.needle=u:typeof u=="object"&&A.mixin(v,u);var T=this.selection.getRange();v.needle==null&&(u=this.session.getTextRange(T)||this.$search.$options.needle,u||(T=this.session.getWordRange(T.start.row,T.start.column),u=this.session.getTextRange(T)),this.$search.set({needle:u})),this.$search.set(v),v.start||this.$search.set({start:T});var _=this.$search.find(this.session);if(v.preventScroll)return _;if(_)return this.revealRange(_,L),_;v.backwards?T.start=T.end:T.end=T.start,this.selection.setRange(T)}
209,d.prototype.findNext=function(u,v){this.find({skipCurrent:!0,backwards:!1},u,v)},d.prototype.findPrevious=function(u,v){this.find(u,{skipCurrent:!0,backwards:!0},v)},d.prototype.revealRange=function(u,v){this.session.unfold(u),this.selection.setSelectionRange(u);var L=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(u.start,u.end,.5),v!==!1&&this.renderer.animateScrolling(L)},d.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},d.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},d.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(u){u.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},d.prototype.setAutoScrollEditorIntoView=function(u){if(u){var v,L=this,T=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var _=this.$scrollAnchor;_.style.cssText="position:absolute",this.container.insertBefore(_,this.container.firstChild);var D=this.on("changeSelection",function(){T=!0}),N=this.renderer.on("beforeRender",function(){T&&(v=L.renderer.container.getBoundingClientRect())}),V=this.renderer.on("afterRender",function(){if(T&&v&&(L.isFocused()||L.searchBox&&L.searchBox.isFocused())){var F=L.renderer,W=F.$cursorLayer.$pixelPos,B=F.layerConfig,z=W.top-B.offset;W.top>=0&&z+v.top<0?T=!0:W.top<B.height&&W.top+v.top+B.lineHeight>window.innerHeight?T=!1:T=null,T!=null&&(_.style.top=z+"px",_.style.left=W.left+"px",_.style.height=B.lineHeight+"px",_.scrollIntoView(T)),T=v=null}});this.setAutoScrollEditorIntoView=function(F){F||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",D),this.renderer.off("afterRender",V),this.renderer.off("beforeRender",N))}}},d.prototype.$resetCursorStyle=function(){var u=this.$cursorStyle||"ace",v=this.renderer.$cursorLayer;v&&(v.setSmoothBlinking(/smooth/.test(u)),v.isBlinking=!this.$readOnly&&u!="wide",$.setCssClass(v.element,"ace_slim-cursors",/slim/.test(u)))},d.prototype.prompt=function(u,v,L){var T=this;p.loadModule("ace/ext/prompt",function(_){_.prompt(T,u,v,L)})},Object.defineProperty(d.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new R(this.container))},set:function(u){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=u},enumerable:!1,configurable:!0}),d})();y.$uid=0,y.prototype.curOp=null,y.prototype.prevOp={},y.prototype.$mergeableCommands=["backspace","del","insertstring"],y.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],A.implement(y.prototype,h),p.defineOptions(y.prototype,"editor",{selectionStyle:{set:function(d){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:d})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(d){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(d){var u=this;if(this.textInput.setReadOnly(d),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(L){var T=!1;if(L&&L.type=="keydown"){if(L&&L.key&&!L.ctrlKey&&!L.metaKey&&(L.key==" "&&L.preventDefault(),T=L.key.length==1),!T)return}else L&&L.type!=="exec"&&(T=!0);if(T){var _=$.createElement("div");_.textContent=b("editor.tooltip.disable-editing","Editing is disabled"),u.hoverTooltip.isOpen||u.hoverTooltip.showForRange(u,u.getSelectionRange(),_)}else u.hoverTooltip&&u.hoverTooltip.isOpen&&u.hoverTooltip.hide()});var v=this.textInput.getElement();d?(S.addListener(v,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(S.removeListener(v,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("
209commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function(d){this.textInput.setCopyWithEmptySelection(d)},initialValue:!1},cursorStyle:{set:function(d){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(d){this.setAutoScrollEditorIntoView(d)}},keyboardHandler:{set:function(d){this.setKeyboardHandler(d)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(d){this.session.setValue(d)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(d){this.setSession(d)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(d){this.renderer.$gutterLayer.setShowLineNumbers(d),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),d&&this.$relativeLineNumbers?w.attach(this):w.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(d){this.$showLineNumbers&&d?w.attach(this):w.detach(this)}},placeholder:{set:function(d){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var u=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(u&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),$.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!u&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),$.addCssClass(this.container,"ace_hasPlaceholder");var v=$.createElement("div");v.className="ace_placeholder",v.textContent=this.$placeholder||"",this.renderer.placeholderNode=v,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!u&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(d){var u={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},v=function(T){if(T.target==this.renderer.scroller&&T.keyCode===C.enter){T.preventDefault();var _=this.getCursorPosition().row;this.isRowVisible(_)||this.scrollToLine(_,!0,!0),this.focus()}},L;d?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(l.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",b("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",b("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",v.bind(this)),this.commands.addCommand(u),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",b("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",b("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),L||(L=new f(this)),L.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",v.bind(this)),this.commands.removeCommand(u),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),L&&L.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(d){this.$textInputAriaLabel=d},initialValue:""},enableMobileMenu:{set:function(d){this.$enableMobileMenu=d},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",focu
209sTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var w={getText:function(d,u){return(Math.abs(d.selection.lead.row-u)||u+1+(u<9?"·":""))+""},getWidth:function(d,u,v){return Math.max(u.toString().length,(v.lastRow+1).toString().length,2)*v.characterWidth},update:function(d,u){u.renderer.$loop.schedule(u.renderer.CHANGE_GUTTER)},attach:function(d){d.renderer.$gutterLayer.$renderer=this,d.on("changeSelection",this.update),this.update(null,d)},detach:function(d){d.renderer.$gutterLayer.$renderer==this&&(d.renderer.$gutterLayer.$renderer=null),d.off("changeSelection",this.update),this.update(null,d)}};k.Editor=y}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(E,k,H){var x=E("../lib/dom"),A=(function(){function $(a,l){this.element=a,this.canvasHeight=l||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return $.prototype.moveContainer=function(a){x.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},$.prototype.pageChanged=function(a,l){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)},$.prototype.computeLineTop=function(a,l,r){var o=l.firstRowScreen*l.lineHeight,n=Math.floor(o/this.canvasHeight),t=r.documentToScreenRow(a,0)*l.lineHeight;return t-n*this.canvasHeight},$.prototype.computeLineHeight=function(a,l,r){return l.lineHeight*r.getRowLineCount(a)},$.prototype.getLength=function(){return this.cells.length},$.prototype.get=function(a){return this.cells[a]},$.prototype.shift=function(){this.$cacheCell(this.cells.shift())},$.prototype.pop=function(){this.$cacheCell(this.cells.pop())},$.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var l=x.createFragment(this.element),r=0;r<a.length;r++)l.appendChild(a[r].element);this.element.appendChild(l)}else this.cells.push(a),this.element.appendChild(a.element)},$.prototype.unshift=function(a){if(Array.isArray(a)){this.cells.unshift.apply(this.cells,a);for(var l=x.createFragment(this.element),r=0;r<a.length;r++)l.appendChild(a[r].element);this.element.firstChild?this.element.insertBefore(l,this.element.firstChild):this.element.appendChild(l)}else this.cells.unshift(a),this.element.insertAdjacentElement("afterbegin",a.element)},$.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},$.prototype.$cacheCell=function(a){a&&(a.element.remove(),this.cellCache.push(a))},$.prototype.createCell=function(a,l,r,o){var n=this.cellCache.pop();if(!n){var t=x.createElement("div");o&&o(t),this.element.appendChild(t),n={element:t,text:"",row:a}}return n.row=a,n},$})();k.Lines=A}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(E,k,H){var x=E("../lib/dom"),A=E("../lib/oop"),$=E("../lib/lang"),a=E("../lib/event_emitter").EventEmitter,l=E("./lines").Lines,r=E("../config").nls,o=(function(){function t(e){this.$showCursorMarker=null,this.element=x.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new l(this.element),this.$lines.$offsetCoefficient=1}return t.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},t.prototype.addGutterDecoration=function(e,i){window.console,this.session.addGutterDecoration(e,i)},t.prototype.removeGutterDecoration=function(e,i){window.console,this.session.removeGutterDecoration(e,i)},t.prototype.setAnnotations=function(e){this.$annotations=[];for(var i=0;i<e.length;i++){var s=e[i],h=s.row,c=this.$annotations[h];c||(c=this.$annotations[h]={text:[],type:[],displayText:[]});var m=s.text,p=s.text,g=s.type;m=m?$.escapeHTML(m):s.html||"",p=p||s.html||"",c.text.indexOf(m)===-1&&(c.text.push(m),c.type.pu
209sh(g),c.displayText.push(p));var f=s.className;f?c.className=f:g==="error"?c.className=" ace_error":g==="security"&&!/\bace_error\b/.test(c.className)?c.className=" ace_security":g==="warning"&&!/\bace_(error|security)\b/.test(c.className)?c.className=" ace_warning":g==="info"&&!c.className?c.className=" ace_info":g==="hint"&&!c.className&&(c.className=" ace_hint")}},t.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var i=e.start.row,s=e.end.row-i;if(s!==0)if(e.action=="remove")this.$annotations.splice(i,s+1,null);else{var h=new Array(s+1);h.unshift(i,1),this.$annotations.splice.apply(this.$annotations,h)}}},t.prototype.update=function(e){this.config=e;var i=this.session,s=e.firstRow,h=Math.min(e.lastRow+e.gutterOffset,i.getLength()-1);this.oldLastRow=h,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var c=i.getNextFoldLine(s),m=c?c.start.row:1/0,p=null,g=-1,f=s;;){if(f>m&&(f=c.end.row+1,c=i.getNextFoldLine(f,c),m=c?c.start.row:1/0),f>h){for(;this.$lines.getLength()>g+1;)this.$lines.pop();break}p=this.$lines.get(++g),p?p.row=f:(p=this.$lines.createCell(f,e,this.session,n),this.$lines.push(p)),this.$renderCell(p,e,c,f),f++}this._signal("afterRender"),this.$updateGutterWidth(e),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},t.prototype.$updateGutterWidth=function(e){var i=this.session,s=i.gutterRenderer||this.$renderer,h=i.$firstLineNumber,c=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||i.$useWrapMode)&&(c=i.getLength()+h-1);var m=s?s.getWidth(i,c,e):c.toString().length*e.characterWidth,p=this.$padding||this.$computePadding();m+=p.left+p.right,m!==this.gutterWidth&&!isNaN(m)&&(this.gutterWidth=m,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",m))},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.$showCursorMarker&&this.$updateCursorMarker(),!!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 i=this.$lines.cells;this.$cursorCell=null;for(var s=0;s<i.length;s++){var h=i[s];if(h.row>=this.$cursorRow){if(h.row>this.$cursorRow){var c=this.session.getFoldLine(this.$cursorRow);if(s>0&&c&&c.start.row==i[s-1].row)h=i[s-1];else break}h.element.className="ace_gutter-active-line "+h.element.className,this.$cursorCell=h;break}}}}},t.prototype.$updateCursorMarker=function(){if(this.session){var e=this.session;this.$highlightElement||(this.$highlightElement=x.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var i=e.selection.cursor,s=this.config,h=this.$lines,c=s.firstRowScreen*s.lineHeight,m=Math.floor(c/h.canvasHeight),p=e.documentToScreenRow(i)*s.lineHeight,g=p-m*h.canvasHeight;x.setStyle(this.$highlightElement.style,"height",s.lineHeight+"px"),x.setStyle(this.$highlightElement.style,"top",g+"px")}},t.prototype.scrollLines=function(e){var i=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(i,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,!i||h<e.firstRow)return this.update(e);if(s<i.firstRow)return this.update(e);if(i.firstRow<e.firstRow)for(var c=this.session.getFoldedRowCount(i.firstRow,e.firstRow-1);c>0;c--)this.$lines.shift();if(h>s)for(var c=this.session.getFoldedRowCount(s+1,h);c>0;c--)this.$lines.pop();e.firstRow<i.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,i.firstRow-1)),s>h&&this.$lines.push(this.$renderLines(e,h+1,s)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$renderLines=function(e,i,s){for(var h=[],c=i,m=this.session.getNextFoldLine(c),p=m?m.start.row:1/0;c>p&&(c=m.end.row+1,m=this.session.getNextFoldLine(c,m),p=m?m.start.row:1/0),!(c>s);){var g=this.$lines.createCell(c,e,this.session,n);this.$renderCell(g,e,m,c),h.push(g),c++}return h},t.prototype.$renderCell=function(e,i,s,h){var c=e.element,m=this.session,p=c.childNodes[0],g=c.childNodes[1],f=c.childNodes[2],b=c.childNodes[3],M=f.firstChild,C=m.$firstLineNumber,S=m.$breakpoints,R=m.$decorations,y=m.gutterRenderer||this.$renderer,w=this.$showFoldWidgets&&m.foldWidgets,d=s?s.start.row:Number.MAX_VALUE,u=i.lineHeight+"px",v=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",L=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",T=(y?y.getText(m,h):h+C).toString();
209if(this.$highlightGutterLine&&(h==this.$cursorRow||s&&h<this.$cursorRow&&h>=d&&this.$cursorRow<=s.end.row)&&(v+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),S[h]&&(v+=S[h]),R[h]&&(v+=R[h]),this.$annotations[h]&&h!==d&&(v+=this.$annotations[h].className),w){var _=w[h];_==null&&(_=w[h]=m.getFoldWidget(h))}if(_){var D="ace_fold-widget ace_"+_,N=_=="start"&&h==d&&h<s.end.row;if(N){D+=" ace_closed";for(var V="",F=!1,W=h+1;W<=s.end.row;W++)if(this.$annotations[W]){if(this.$annotations[W].className===" ace_error"){F=!0,V=" ace_error_fold";break}this.$annotations[W].className===" ace_security"?(F=!0,V=" ace_security_fold"):this.$annotations[W].className===" ace_warning"&&V!==" ace_security_fold"&&(F=!0,V=" ace_warning_fold")}v+=V}else D+=" ace_open";g.className!=D&&(g.className=D),x.setStyle(g.style,"height",u),x.setStyle(g.style,"display","inline-block"),g.setAttribute("role","button"),g.setAttribute("tabindex","-1");var B=m.getFoldWidgetRange(h);B?g.setAttribute("aria-label",r("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[B.start.row+1,B.end.row+1])):s?g.setAttribute("aria-label",r("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[s.start.row+1,s.end.row+1])):g.setAttribute("aria-label",r("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[h+1])),N?(g.setAttribute("aria-expanded","false"),g.setAttribute("title",r("gutter.code-folding.closed.title","Unfold code"))):(g.setAttribute("aria-expanded","true"),g.setAttribute("title",r("gutter.code-folding.open.title","Fold code")))}else g&&(x.setStyle(g.style,"display","none"),g.setAttribute("tabindex","0"),g.removeAttribute("role"),g.removeAttribute("aria-label"));var z=this.session.$gutterCustomWidgets[h];if(z?this.$addCustomWidget(h,z,e):b&&this.$removeCustomWidget(h,e),F&&this.$showFoldedAnnotations){f.className="ace_gutter_annotation",M.className=L,M.className+=V,x.setStyle(M.style,"height",u),x.setStyle(f.style,"display","block"),x.setStyle(f.style,"height",u);var P;switch(V){case" ace_error_fold":P=r("gutter.annotation.aria-label.error","Error, read annotations row $0",[T]);break;case" ace_security_fold":P=r("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[T]);break;case" ace_warning_fold":P=r("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[T]);break}f.setAttribute("aria-label",P),f.setAttribute("tabindex","-1"),f.setAttribute("role","button")}else if(this.$annotations[h]){f.className="ace_gutter_annotation",M.className=L,this.$useSvgGutterIcons?M.className+=this.$annotations[h].className:c.classList.add(this.$annotations[h].className.replace(" ","")),x.setStyle(M.style,"height",u),x.setStyle(f.style,"display","block"),x.setStyle(f.style,"height",u);var P;switch(this.$annotations[h].className){case" ace_error":P=r("gutter.annotation.aria-label.error","Error, read annotations row $0",[T]);break;case" ace_security":P=r("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[T]);break;case" ace_warning":P=r("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[T]);break;case" ace_info":P=r("gutter.annotation.aria-label.info","Info, read annotations row $0",[T]);break;case" ace_hint":P=r("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[T]);break}f.setAttribute("aria-label",P),f.setAttribute("tabindex","-1"),f.setAttribute("role","button")}else x.setStyle(f.style,"display","none"),f.removeAttribute("aria-label"),f.removeAttribute("role"),f.setAttribute("tabindex","0");return T!==p.data&&(p.data=T),c.className!=v&&(c.className=v),x.setStyle(e.element.style,"height",this.$lines.computeLineHeight(h,i,m)+"px"),x.setStyle(e.element.style,"top",this.$lines.computeLineTop(h,i,m)+"px"),e.text=T,f.style.display==="none"&&g.style.display==="none"&&!z?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},t.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e,!e&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},t.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},t.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},t.prototype.setShowFoldWidgets=function(e){e?x.addCssClass(this.element,"ace_folding-enabled"):x.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},t.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},t.prototype.$hideFoldWidget=function(e,i){var s=i||this.$getGutterCell(e);if(s&&s.element){var h=s.element.childNodes[1];h&&x.setStyle(h.style,"display","none")}},t.prototype.$showFoldWidget=function(e,i){var s=i||this.$getGutterCell(e);if(s&&s.element){var h=s.element.childNodes[1];h&&this.session.foldWidgets&&this.session.foldWidgets[s.row]&&x.setStyle(h.style,"display","inline-block")}},t.prototype.$getGutterCell=function(e){var i=this.$lines.cells,s=0,h=i.length-1;if(!(e<i[0].row||e>i[h].row)){for(;s<=h;
209){var c=Math.floor((s+h)/2),m=i[c];if(m.row>e)h=c-1;else if(m.row<e)s=c+1;else return m}return m}},t.prototype.$addCustomWidget=function(e,i,s){var h=i.className,c=i.label,m=i.title,p=i.callbacks;this.session.$gutterCustomWidgets[e]={className:h,label:c,title:m,callbacks:p},this.$hideFoldWidget(e,s);var g=s||this.$getGutterCell(e);if(g&&g.element){var f=g.element.querySelector(".ace_custom-widget");f&&f.remove(),f=x.createElement("span"),f.className="ace_custom-widget ".concat(h),f.setAttribute("tabindex","-1"),f.setAttribute("role","button"),f.setAttribute("aria-label",c),f.setAttribute("title",m),x.setStyle(f.style,"display","inline-block"),x.setStyle(f.style,"height","inherit"),p&&p.onClick&&f.addEventListener("click",function(b){p.onClick(b,e),b.stopPropagation()}),g.element.appendChild(f)}},t.prototype.$removeCustomWidget=function(e,i){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,i);var s=i||this.$getGutterCell(e);if(s&&s.element){var h=s.element.querySelector(".ace_custom-widget");h&&s.element.removeChild(h)}},t.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=x.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},t.prototype.getRegion=function(e){var i=this.$padding||this.$computePadding(),s=this.element.getBoundingClientRect();if(e.x<i.left+s.left)return"markers";if(this.$showFoldWidgets&&e.x>s.right-i.right)return"foldWidgets"},t})();o.prototype.$fixedWidth=!1,o.prototype.$highlightGutterLine=!0,o.prototype.$renderer=void 0,o.prototype.$showLineNumbers=!0,o.prototype.$showFoldWidgets=!0,A.implement(o.prototype,a);function n(t){var e=document.createTextNode("");t.appendChild(e);var i=x.createElement("span");t.appendChild(i);var s=x.createElement("span");t.appendChild(s);var h=x.createElement("span");return s.appendChild(h),t}k.Gutter=o}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(E,k,H){var x=E("../range").Range,A=E("../lib/dom"),$=(function(){function l(r){this.element=A.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element)}return l.prototype.setPadding=function(r){this.$padding=r},l.prototype.setSession=function(r){this.session=r},l.prototype.setMarkers=function(r){this.markers=r},l.prototype.elt=function(r,o){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=o,n.className=r},l.prototype.update=function(r){if(r){this.config=r,this.i=0;var o;for(var n in this.markers){var t=this.markers[n];if(!t.range){t.update(o,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 i=this.$getTop(e.start.row,r),s=this.$padding+e.start.column*r.characterWidth;t.renderer(o,e,s,i,r)}else t.type=="fullLine"?this.drawFullLineMarker(o,e,t.clazz,r):t.type=="screenLine"?this.drawScreenLineMarker(o,e,t.clazz,r):e.isMultiLine()?t.type=="text"?this.drawTextMarker(o,e,t.clazz,r):this.drawMultiLineMarker(o,e,t.clazz,r):this.drawSingleLineMarker(o,e,t.clazz+" ace_start ace_br15",r)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},l.prototype.$getTop=function(r,o){return(r-o.firstRowScreen)*o.lineHeight},l.prototype.drawTextMarker=function(r,o,n,t,e){for(var i=this.session,s=o.start.row,h=o.end.row,c=s,m=0,p=0,g=i.getScreenLastRowColumn(c),f=new x(c,o.start.column,c,p);c<=h;c++)f.start.row=f.end.row=c,f.start.column=c==s?o.start.column:i.getRowWrapIndent(c),f.end.column=g,m=p,p=g,g=c+1<h?i.getScreenLastRowColumn(c+1):c==h?0:o.end.column,this.drawSingleLineMarker(r,f,n+(c==s?" ace_start":"")+" ace_br"+a(c==s||c==s+1&&o.start.column,m<p,p>g,c==h),t,c==h?0:1,e)},l.prototype.drawMultiLineMarker=function(r,o,n,t,e){var i=this.$padding,s=t.lineHeight,h=this.$getTop(o.start.row,t),c=i+o.start.column*t.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(o.start.row)){var m=o.clone();m.end.row=m.start.row,m.end.column=this.session.getLine(m.start.row).length,this.drawBidiSingleLineMarker(r,m,n+" ace_br1 ace_start",t,null,e)}else this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:"+i+"px;top:"+h+"px;left:"+c+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(o.end.row)){var m=o.clone();m.start.row=m.end.row,m.start.column=0,this.drawBidiSingleLineMarker(r,m,n+" ace_br12",t,null,e)}else{h=this.$getTop(o.end.row,t);var p=o.end.column*t.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+p+"px;top:"+h+"px;left:"+i+"px;"+(e||""))}if(s=(o.end.row-o.start.row-1)*t.lineHeight,!(s<=0)){h=this.$getTop(o.start.row+1,t);var g=(o.start.column?1:0)|(o.end.column?0:8);this.elt(n+(g?" ace_br"+g:""),"height:"+s+"px;right:"+i+"px;top:"+h+"px;left:"+i+"px;"+(e||""))}},l.prototype.drawSingleLineMarker=function(r,o,n,t,e,i){if(this.session.$bidiHandler.isBidiRow(o.start.row))return this.drawBidiSingleLineMarker(r,o,n,t,e,i);var s=t.lineHeight,h=(o.end.column+(e||0)-o.start.column)*t.characterWidth,c=this.$getTop(o.start.row,t),m=this.$padding+o.start.column*t.characterWidth;this.elt(n,"height:"+s+"px;width:"+h+"px;top:"+c+"px;left:"+m+"px;"+(i||""))},l.prototype.drawBidiSingleLineMarker=function(r,o,n,t,e,i){var s=t.lineHeight,h=this.$getTop(o.start.row,t),c=this.$padding,m=this.session.$bidiHandler.getSelections(o.start.column,o.end.column);m.forEach(function(p){this.elt(n,"height:"+s+"px;width:"+(p.width+(e||0))+"px;top:"+h+"px;left:"+(c+p.left)+"px;"+(i||""))},this)},l.prototype.drawFullLineMarker=function(r,o,n,t,e){var i=this.$getTop(o.start.row,t),s=t.lineHeight;o.start.row!=o.end.row&&(s+=this.$getTop(o.end.row,t)-i),this.elt(n,"height:"+s+"px;top:"+i+"px;left:0;right:0;"+(e||""))},l.prototype.drawScreenLineMarker=function(r,o,n,t,e){var i=this.$getTop(o.start.row,t),s=t.lineHeight;this.elt(n,"height:"+s+"px;top:"+i+"px;left:0;right:0;"+(e||""))},l})();$.prototype.$padding=0;function a(l,r,o,n){return(l?1:0)|(r?2:0)|(o?4:0)|(n?8:0)}k.Marker=$}),ace.define("ace/layer/text_util",["require","exports","module"],function(E,k,H){var x=new Set(["text","rparen","lparen"]);k.isTextToken=function(A){return x.has(A)}}),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(E,k,H){var x=E("../lib/oop"),A=E("../lib/dom"),$=E("../lib/lang"),a=E("./lines").Lines,l=E("../lib/event_emitter").EventEmitter,r=E("../config").nls,o=E("./text_util").isTextToken,n=(function(){function t(e){this.dom=A,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,i=e.getNewLineCharacter()==` 210`&&e.getNewLineMode()!="windows",s=i?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(i){this._signal("changeCharacterSize",i
210)}).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 i=this.$tabStrings=[0],s=1;s<e+1;s++)if(this.showTabs){var h=this.dom.createElement("span");h.className="ace_invisible ace_invisible_tab",h.textContent=$.stringRepeat(this.TAB_CHAR,s),i.push(h)}else i.push(this.dom.createTextNode($.stringRepeat(" ",s),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var c="ace_indent-guide",m=this.showSpaces?" ace_invisible ace_invisible_space":"",p=this.showSpaces?$.stringRepeat(this.SPACE_CHAR,this.tabSize):$.stringRepeat(" ",this.tabSize),g=this.showTabs?" ace_invisible ace_invisible_tab":"",f=this.showTabs?$.stringRepeat(this.TAB_CHAR,this.tabSize):p,h=this.dom.createElement("span");h.className=c+m,h.textContent=p,this.$tabStrings[" "]=h;var h=this.dom.createElement("span");h.className=c+g,h.textContent=f,this.$tabStrings[" "]=h}},t.prototype.updateLines=function(e,i,s){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var h=Math.max(i,e.firstRow),c=Math.min(s,e.lastRow),m=this.element.childNodes,p=0,f=e.firstRow;f<h;f++){var b=this.session.getFoldLine(f);if(b)if(b.containsRow(h)){h=b.start.row;break}else f=b.end.row;p++}for(var g=!1,f=h,b=this.session.getNextFoldLine(f),M=b?b.start.row:1/0;f>M&&(f=b.end.row+1,b=this.session.getNextFoldLine(f,b),M=b?b.start.row:1/0),!(f>c);){var C=m[p++];if(C){this.dom.removeChildren(C),this.$renderLine(C,f,f==M?b:!1),g&&(C.style.top=this.$lines.computeLineTop(f,e,this.session)+"px");var S=e.lineHeight*this.session.getRowLength(f)+"px";C.style.height!=S&&(g=!0,C.style.height=S)}f++}if(g)for(;p<this.$lines.cells.length;){var R=this.$lines.cells[p++];R.element.style.top=this.$lines.computeLineTop(R.row,e,this.session)+"px"}},t.prototype.scrollLines=function(e){var i=this.config;if(this.config=e,this.$lines.pageChanged(i,e))return this.update(e);this.$lines.moveContainer(e);var s=e.lastRow,h=i?i.lastRow:-1;if(!i||h<e.firstRow)return this.update(e);if(s<i.firstRow)return this.update(e);if(!i||i.lastRow<e.firstRow)return this.update(e);if(e.lastRow<i.firstRow)return this.update(e);if(i.firstRow<e.firstRow)for(var c=this.session.getFoldedRowCount(i.firstRow,e.firstRow-1);c>0;c--)this.$lines.shift();if(i.lastRow>e.lastRow)for(var c=this.session.getFoldedRowCount(e.lastRow+1,i.lastRow);c>0;c--)this.$lines.pop();e.firstRow<i.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,i.firstRow-1)),e.lastRow>i.lastRow&&this.$lines.push(this.$renderLinesFragment(e,i.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},t.prototype.$renderLinesFragment=function(e,i,s){for(var h=[],c=i,m=this.session.getNextFoldLine(c),p=m?m.start.row:1/0;c>p&&(c=m.end.row+1,m=this.session.getNextFoldLine(c,m),p=m?m.start.row:1/0),!(c>s);){var g=this.$lines.createCell(c,e,this.session),f=g.element;this.dom.removeChildren(f),A.setStyle(f.style,"height",this.$lines.computeLineHeight(c,e,this.session)+"px"),A.setStyle(f.style,"top",this.$lines.computeLineTop(c,e,this.session)+"px"),this.$renderLine(f,c,c==p?m:!1),this.$useLineGroups()?f.className="ace_line_group":f.className="ace_line",h.push(g),c++}return h}
210,t.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var i=e.firstRow,s=e.lastRow,h=this.$lines;h.getLength();)h.pop();h.push(this.$renderLinesFragment(e,i,s))},t.prototype.$renderToken=function(e,i,s,h){for(var c=this,m=/(\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\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,p=this.dom.createFragment(this.element),g,f=0;g=m.exec(h);){var b=g[1],M=g[2],C=g[3],S=g[4],R=g[5];if(!(!c.showSpaces&&M)){var y=f!=g.index?h.slice(f,g.index):"";if(f=g.index+g[0].length,y&&p.appendChild(this.dom.createTextNode(y,this.element)),b){var w=c.session.getScreenTabSize(i+g.index),d=c.$tabStrings[w].cloneNode(!0);d.charCount=1,p.appendChild(d),i+=w-1}else if(M)if(c.showSpaces){var u=this.dom.createElement("span");u.className="ace_invisible ace_invisible_space",u.textContent=$.stringRepeat(c.SPACE_CHAR,M.length),p.appendChild(u)}else p.appendChild(this.dom.createTextNode(M,this.element));else if(C){var u=this.dom.createElement("span");u.className="ace_invisible ace_invisible_space ace_invalid",u.textContent=$.stringRepeat(c.SPACE_CHAR,C.length),p.appendChild(u)}else if(S){i+=1;var u=this.dom.createElement("span");u.style.width=c.config.characterWidth*2+"px",u.className=c.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",u.textContent=c.showSpaces?c.SPACE_CHAR:S,p.appendChild(u)}else if(R){i+=1;var u=this.dom.createElement("span");u.style.width=c.config.characterWidth*2+"px",u.className="ace_cjk",u.textContent=R,p.appendChild(u)}}}if(p.appendChild(this.dom.createTextNode(f?h.slice(f):h,this.element)),o(s.type))e.appendChild(p);else{var v="ace_"+s.type.replace(/\./g," ace_"),u=this.dom.createElement("span");s.type=="fold"&&(u.style.width=s.value.length*this.config.characterWidth+"px",u.setAttribute("title",r("inline-fold.closed.title","Unfold code"))),u.className=v,u.appendChild(p),e.appendChild(u)}return i+h.length},t.prototype.renderIndentGuide=function(e,i,s){var h=i.search(this.$indentGuideRe);if(h<=0||h>=s)return i;if(i[0]==" "){h-=h%this.tabSize;for(var c=h/this.tabSize,m=0;m<c;m++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),i.substr(h)}else if(i[0]==" "){for(var m=0;m<h;m++){var p=this.$tabStrings[" "].cloneNode(!0);p.charCount=1,e.appendChild(p)}return this.$highlightIndentGuide(),i.substr(h)}return this.$highlightIndentGuide(),i},t.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var i=this.session.selection.getCursor(),s=/^\s*/.exec(this.session.doc.getLine(i.row))[0].length,h=Math.floor(s/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:h,start:i.row};var c=this.session.$bracketHighlight;if(c){for(var m=this.session.$bracketHighlight.ranges,p=0;p<m.length;p++)if(i.row!==m[p].start.row){this.$highlightIndentGuideMarker.end=m[p].start.row+1,i.row>m[p].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[i.row]!==""&&i.column===e[i.row].length){this.$highlightIndentGuideMarker.dir=1;for(var p=i.row+1;p<e.length;p++){var g=e[p],f=/^\s*/.exec(g)[0].length;if(g!==""&&(this.$highlightIndentGuideMarker.end=p,f<=s))break}}this.$renderHighlightIndentGuide()}}},t.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(".ace_indent-guide-active"),i=0;i<e.length;i++)e[i].classList.remove("ace_indent-guide-active")},t.prototype.$setIndentGuideActive=function(e,i){var s=this.session.doc.getLine(e.row);if(s!==""){var h=e.element;if(e.element.classList&&e.element.classList.contains("ace_line_group"))if(e.element.childNodes.length>0)h=e.element.childNodes[0];else return;var c=h.childNodes;if(c){var m=c[i-1];m&&m.classList&&m.classList.contains("ace_indent-guide")&&m.classList.add("ace_indent-guide-active")}}},t.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var i=this.$highlightIndentGuideMarker.indentLevel;if(i!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var s=0;s<e.length;s++){var h=e[s];if(this.$highlightIndentGuideMarker.end&&h.row>=this.$highlightIndentGuideMarker.start+1){if(h.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(h,i)}}else for(var s=e.length-1;s>=0;s--){var h=e[s];if(this.$highlightIndentGuideMarker.end&&h.row<this.$highlightIndentGuideMarker.start){if(h.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(h,i)}}}},t.prototype.$createLineElement=function(e){var i=this.dom.createElement("div");return i.className="ace_line",i.style.height=this.config.lineHeight+"px",i},t.prototype.$renderWrappedLine=function(e,i,s){var h=0,c=0,m=s[0],p=0,g=this.$createLineElement();e.appendChild(g);for(var f=0;f<i.length;f++){var b=i[f],M=b.value;if(f==0&&this.displayIndentGuides){if(h=M.length,M=this.renderIndentGuide(g,M,m),!M)continue;h-=M.length}if(h+M.length<m)p=this.$renderToken(g,p,b,M),h+=M.length;else{for(;h+M.length>=m;){p=this.$renderToken(g,p,b,M.substring(0,m-h)),M=M.substring(m-h),h=m,g=this.$createLineElement(),e.appendChild(g);var C=this.dom.createTextNode($.stringRepeat("Â ",s.indent),this.element);C.charCount=0,g.appendChild(C),c++,p=0,m=s[c]||Number.MAX_VALUE}M.length!=0&&(h+=M.length,p=this.$renderToken(g,p,b,M))}}s[s.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(g,p,null,"",!0)}
210,t.prototype.$renderSimpleLine=function(e,i){for(var s=0,h=0;h<i.length;h++){var c=i[h],m=c.value;if(!(h==0&&this.displayIndentGuides&&(m=this.renderIndentGuide(e,m),!m))){if(s+m.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,s,c,m);s=this.$renderToken(e,s,c,m)}}},t.prototype.$renderOverflowMessage=function(e,i,s,h,c){s&&this.$renderToken(e,i,s,h.slice(0,this.MAX_LINE_LENGTH-i));var m=this.dom.createElement("span");m.className="ace_inline_button ace_keyword ace_toggle_wrap",m.textContent=c?"<hide>":"<click to see more...>",e.appendChild(m)},t.prototype.$renderLine=function(e,i,s){if(!s&&s!=!1&&(s=this.session.getFoldLine(i)),s)var h=this.$getFoldLineTokens(i,s);else var h=this.session.getTokens(i);var c=e;if(h.length){var m=this.session.getRowSplitData(i);if(m&&m.length){this.$renderWrappedLine(e,h,m);var c=e.lastChild}else{var c=e;this.$useLineGroups()&&(c=this.$createLineElement(),e.appendChild(c)),this.$renderSimpleLine(c,h)}}else this.$useLineGroups()&&(c=this.$createLineElement(),e.appendChild(c));if(this.showEOL&&c){s&&(i=s.end.row);var p=this.dom.createElement("span");p.className="ace_invisible ace_invisible_eol",p.textContent=i==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,c.appendChild(p)}},t.prototype.$getFoldLineTokens=function(e,i){var s=this.session,h=[];function c(p,g,f){for(var b=0,M=0;M+p[b].value.length<g;)if(M+=p[b].value.length,b++,b==p.length)return;if(M!=g){var C=p[b].value.substring(g-M);C.length>f-g&&(C=C.substring(0,f-g)),h.push({type:p[b].type,value:C}),M=g+C.length,b+=1}for(;M<f&&b<p.length;){var C=p[b].value;C.length+M>f?h.push({type:p[b].type,value:C.substring(0,f-M)}):h.push(p[b]),M+=C.length,b+=1}}var m=s.getTokens(e);return i.walk(function(p,g,f,b,M){p!=null?h.push({type:"fold",value:p}):(M&&(m=s.getTokens(g)),m.length&&c(m,b,f))},i.end.row,this.session.getLine(i.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,x.implement(n.prototype,l),k.Text=n}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(E,k,H){var x=E("../lib/dom"),A=(function(){function $(a){this.element=x.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),x.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return $.prototype.$updateOpacity=function(a){for(var l=this.cursors,r=l.length;r--;)x.setStyle(l[r].style,"opacity",a?"":"0")},$.prototype.$startCssAnimation=function(){for(var a=this.cursors,l=a.length;l--;)a[l].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&x.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},$.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,x.removeCssClass(this.element,"ace_animate-blinking")},$.prototype.setPadding=function(a){this.$padding=a},$.prototype.setSession=function(a){this.session=a},$.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},$.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},$.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,x.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},$.prototype.addCursor=function(){var a=x.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},$.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},$.prototype.hideCursor=function(){this.isVisible=!1,x.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},$.prototype.showCursor=function(){this.isVisible=!0,x.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},$.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,x.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&x.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),x.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var l=(function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){a(!0),l()},this.blinkInterval),l()}},$.prototype.getPixelPosition=function(a,l){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var r=this.session.documentToScreenPosition(a),o=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,a.row)?this.session.$bidiHandler.getPosLeft(r.column):r.column*this.config.characterWidth),n=(r.row-(l?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:o,top:n}},$.prototype.isCursorInView=function(a,l){return a.top>=0&&a.top<l.maxHeight},$.prototype.update=function(a){this.config=a;var l=this.session.$selectionMarkers,r=0,o=0;(l===void 0||l.length===0)&&(l=[{cursor:null}]);for(var r=0,n=l.length;r<n;r++){var t=this.getPixelPosition(l[r].cursor,!0);if(!((t.top>a.height+a.offset||t.top<0)&&r>1)){var e=this.cursors[o++]||this.addCursor(),i=e.style;this.drawCursor?this.drawCursor(e,t,a,l[r],this.session):this.isCursorInView(t,a)?(x.setStyle(i,"display","block"),x.translate(e,t.left,t.top),x.setStyle(i,"width",Math.round(a.characterWidth)+"px"),x.setStyle(i,"height",a.lineHeight+"px")):x.setStyle(i,"display","none")}}for(;this.cursors.length>o;
210)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=t,this.restartTimer()},$.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?x.addCssClass(this.element,"ace_overwrite-cursors"):x.removeCssClass(this.element,"ace_overwrite-cursors"))},$.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},$})();A.prototype.$padding=0,A.prototype.drawCursor=null,k.Cursor=A}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(E,k,H){var x=this&&this.__extends||(function(){var e=function(i,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,c){h.__proto__=c}||function(h,c){for(var m in c)Object.prototype.hasOwnProperty.call(c,m)&&(h[m]=c[m])},e(i,s)};return function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(i,s);function h(){this.constructor=i}i.prototype=s===null?Object.create(s):(h.prototype=s.prototype,new h)}})(),A=E("./lib/oop"),$=E("./lib/dom"),a=E("./lib/event"),l=E("./lib/event_emitter").EventEmitter,r=32768,o=(function(){function e(i,s){this.element=$.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+s,this.element.tabIndex=-1,this.inner=$.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="Â ",this.element.appendChild(this.inner),i.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(i){this.element.style.display=i?"":"none",this.isVisible=i,this.coeff=1},e})();A.implement(o.prototype,l);var n=(function(e){x(i,e);function i(s,h){var c=e.call(this,s,"-v")||this;return c.scrollTop=0,c.scrollHeight=0,h.$scrollbarWidth=c.width=$.scrollbarWidth(s.ownerDocument),c.inner.style.width=c.element.style.width=(c.width||15)+5+"px",c.$minWidth=0,c}return i.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},i.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},i.prototype.setHeight=function(s){this.element.style.height=s+"px"},i.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"},i.prototype.setScrollTop=function(s){this.scrollTop!=s&&(this.skipEvent=!0,this.scrollTop=s,this.element.scrollTop=s*this.coeff)},i})(o);n.prototype.setInnerHeight=n.prototype.setScrollHeight;var t=(function(e){x(i,e);function i(s,h){var c=e.call(this,s,"-h")||this;return c.scrollLeft=0,c.height=h.$scrollbarWidth,c.inner.style.height=c.element.style.height=(c.height||15)+5+"px",c}return i.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},i.prototype.getHeight=function(){return this.isVisible?this.height:0},i.prototype.setWidth=function(s){this.element.style.width=s+"px"},i.prototype.setInnerWidth=function(s){this.inner.style.width=s+"px"},i.prototype.setScrollWidth=function(s){this.inner.style.width=s+"px"},i.prototype.setScrollLeft=function(s){this.scrollLeft!=s&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=s)},i})(o);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(E,k,H){var x=this&&this.__extends||(function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,h){s.__proto__=h}||function(s,h){for(var c in h)Object.prototype.hasOwnProperty.call(h,c)&&(s[c]=h[c])},t(e,i)};return function(e,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");
210t(e,i);function s(){this.constructor=e}e.prototype=i===null?Object.create(i):(s.prototype=i.prototype,new s)}})(),A=E("./lib/oop"),$=E("./lib/dom"),a=E("./lib/event"),l=E("./lib/event_emitter").EventEmitter;$.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ 211 position: absolute; 212 background: rgba(128, 128, 128, 0.6); 213 -moz-box-sizing: border-box; 214 box-sizing: border-box; 215 border: 1px solid #bbb; 216 border-radius: 2px; 217 z-index: 8; 218} 219.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h { 220 position: absolute; 221 z-index: 6; 222 background: none; 223 overflow: hidden!important; 224} 225.ace_editor>.ace_sb-v { 226 z-index: 6; 227 right: 0; 228 top: 0; 229 width: 12px; 230} 231.ace_editor>.ace_sb-v div { 232 z-index: 8; 233 right: 0; 234 width: 100%; 235} 236.ace_editor>.ace_sb-h { 237 bottom: 0; 238 left: 0; 239 height: 12px; 240} 241.ace_editor>.ace_sb-h div { 242 bottom: 0; 243 height: 100%; 244} 245.ace_editor>.ace_sb_grabbed { 246 z-index: 8; 247 background: #000; 248}`,"ace_scrollbar.css",!1);var r=(function(){function t(e,i){this.element=$.createElement("div"),this.element.className="ace_sb"+i,this.inner=$.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})();A.implement(r.prototype,l);var o=(function(t){x(e,t);function e(i,s){var h=t.call(this,i,"-v")||this;return h.scrollTop=0,h.scrollHeight=0,h.parent=i,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(i,s){if(i==="mousedown"&&!(a.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var h=this,c=s.clientY,m=function(S){c=S.clientY},p=function(){clearInterval(M)},g=s.clientY,f=this.thumbTop,b=function(){if(c!==void 0){var S=h.scrollTopFromThumbTop(f+c-g);S!==h.scrollTop&&h._emit("scroll",{data:S})}};a.capture(this.inner,m,p);var M=setInterval(b,20);return a.preventDefault(s)}var C=s.clientY-this.element.getBoundingClientRect().top-this.thumbHe
248ight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(C)}),a.preventDefault(s)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(i){var s=i*(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(i){this.height=Math.max(0,i),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(i,s){this.pageHeight===i&&!s||(this.pageHeight=i,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(i){this.scrollTop=i,i<0&&(i=0),this.thumbTop=i*(this.slideHeight-this.thumbHe
248ight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e})(r);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var n=(function(t){x(e,t);function e(i,s){var h=t.call(this,i,"-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(i,s){if(i==="mousedown"&&!(a.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var h=this,c=s.clientX,m=function(S){c=S.clientX},p=function(){clearInterval(M)},g=s.clientX,f=this.thumbLeft,b=function(){if(c!==void 0){var S=h.scrollLeftFromThumbLeft(f+c-g);S!==h.scrollLeft&&h._emit("scroll",{data:S})}};a.capture(this.inner,m,p);var M=setInterval(b,20);return a.preventDefault(s)}var C=s.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(C)}),a.preventDefault(s)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(i){var s=i*(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(i){this.width=Math.max(0,i),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(i,s){this.pageWidth===i&&!s||(this.pageWidth=i,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(i){this.scrollLeft=i,i<0&&(i=0),this.thumbLeft=i*(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=o,k.ScrollBarV=o,k.ScrollBarH=n,k.VScrollBar=o,k.HScrollBar=n}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(E,k,H){var x=E("./lib/event"),A=(function(){function $(a,l){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=l||window;var r=this;this._flush=function(o){r.pending=!1;var n=r.changes;if(n&&(x.blockIdle(100),r.changes=0,r.onRender(n)),r.changes){if(r.$recursionLimit--<0)return;r.schedule()}else r.$recursionLimit=2}}return $.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(x.nextFrame(this._flush),this.pending=!0)},$.prototype.clear=function(a){var l=this.changes;return this.changes=0,l},$})();k.RenderLoop=A}),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(E,k,H){var x=E("../lib/oop"),A=E("../lib/dom"),$=E("../lib/lang"),a=E("../lib/event"),l=E("../lib/useragent"),r=E("../lib/event_emitter").EventEmitter,o=512,n=typeof ResizeObserver=="function",t=200,e=(function(){function i(s){this.el=A.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=A.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=A.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),s.appendChild(this.el),this.$measureNode.textContent=$.stringRepeat("X",o),this.$characterSize={width:0,height:0},n?this.$addObserver():this.checkForSizeChanges()}return i.prototype.$setMeasureNodeStyles=function(s,h){s.width=s.height="auto",s.left=s.top="0px",s.visibility="hidden",s.position="absolute",s.whiteSpace="pre",l.isIE<8?s["font-family"]="inherit":s.font="inherit",s.overflow=h?"hidden":"visible"},i.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})}},i.prototype.$addObserver=function(){var s=this;this.$observer=new window.ResizeObserver(function(h){s.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},i.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)},i.prototype.setPolling=function(s){s?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},i.prototype.$measureSizes=function(s){var h={height:(s||this.$measureNode).clientHeight,width:(s||this.$measureNode).clientWidth/o};return h.width===0||h.height===0?null:h},i.prototype.$measureCharWidth=function(s){this.$main.textContent=$.stringRepeat(s,o);var h=this.$main.getBoundingClientRect();return h.width/o},i.prototype.getCharacterWidth=function(s){var h=this.charSizes[s];return h===void 0&&(h=this.charSizes[s]=this.$measureCharWidth(s)/this.$characterSize.width),h},i.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},i.prototype.$getZoom=function(s){return!s||!s.parentElement?1:(Number(window.getComputedStyle(s).zoom)||1)*this.$getZoom(s.parentElement)},i.prototype.$initTransformMeasureNodes=function(){var s=function(h,c){return["div",{style:"position: absolute;top:"+h+"px;left:"+c+"px;"}]};this.els=A.buildDom([s(0,0),s(t,0),s(0,t),s(t,t)],this.el)},i.prototype.transformCoordinates=function(s,h){if(s){var c=this.$getZoom(this.el);s=f(1/c,s)}function m(D,N,V){var F=D[1]*N[0]-D[0]*N[1];return[(-N[1]*V[0]+N[0]*V[1])/F,(+D[1]*V[0]-D[0]*V[1])/F]}function p(D,N){return[D[0]-N[0],D[1]-N[1]]}function g(D,N){return[D[0]+N[0],D[1]+N[1]]}function f(D,N){return[D*N[0],D*N[1]]}this.els||this.$initTransformMeasureNodes();function b(D){var N=D.getBoundingClientRect();return[N.left,N.top]}var M=b(this.els[0]),C=b(this.els[1]),S=b(this.els[2]),R=b(this.els[3]),y=m(p(R,C),p(R,S),p(g(C,S),g(R,M))),w=f(1+y[0],p(C,M)),d=f(1+y[1],p(S,M));if(h){var u=h,v=y[0]*u[0]/t+y[1]*u[1]/t+1,L=g(f(u[0],w),f(u[1],d));return g(f(1/v/t,L),M)}var T=p(s,M),_=m(p(w,f(y[0],T)),p(d,f(y[1],T)),T);return f(t,_)},i})();e.prototype.$characterSize={width:0,height:0},x.implement(e.prototype,r),k.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(E,k,H){H.exports=` 249.ace_br1 {border-top-left-radius : 3px;} 250.ace_br2 {border-top-right-radius : 3px;} 251.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;} 252.ace_br4 {border-bottom-right-radius: 3px;} 253.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;} 254.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;} 255.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;} 256.ace_br8 {border-bottom-left-radius : 3px;} 257.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;} 258.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;} 259.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;} 260.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} 261.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} 262.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} 263.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} 264 265 266.ace_editor { 267 position: relative; 268 overflow: hidden; 269 padding: 0; 270 font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 's
270ource-code-pro', monospace; 271 direction: ltr; 272 text-align: left; 273 -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 274 forced-color-adjust: none; 275} 276 277.ace_scroller { 278 position: absolute; 279 overflow: hidden; 280 top: 0; 281 bottom: 0; 282 background-color: inherit; 283 -ms-user-select: none; 284 -moz-user-select: none; 285 -webkit-user-select: none; 286 user-select: none; 287 cursor: text; 288} 289 290.ace_content { 291 position: absolute; 292 box-sizing: border-box; 293 min-width: 100%; 294 contain: style size layout; 295 font-variant-ligatures: no-common-ligatures; 296} 297.ace_invisible { 298 font-variant-ligatures: none; 299} 300 301.ace_keyboard-focus:focus { 302 box-shadow: inset 0 0 0 2px #5E9ED6; 303 outline: none; 304} 305 306.ace_dragging .ace_scroller:before{ 307 position: absolute; 308 top: 0; 309 left: 0; 310 right: 0; 311 bottom: 0; 312 content: ''; 313 background: rgba(250, 250, 250, 0.01); 314 z-index: 1000; 315} 316.ace_dragging.ace_dark .ace_scroller:before{ 317 background: rgba(0, 0, 0, 0.01); 318} 319 320.ace_gutter { 321 position: absolute; 322 overflow : hidden; 323 width: auto; 324 top: 0; 325 bottom: 0; 326 left: 0; 327 cursor: default; 328 z-index: 4; 329 -ms-user-select: none; 330 -moz-user-select: none; 331 -webkit-user-select: none; 332 user-select: none; 333 contain: style size layout; 334} 335 336.ace_gutter-active-line { 337 position: absolute; 338 left: 0; 339 right: 0; 340} 341 342.ace_scroller.ace_scroll-left:after { 343 content: ""; 344 position: absolute; 345 top: 0; 346 right: 0; 347 bottom: 0; 348 left: 0; 349 box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset; 350 pointer-events: none; 351} 352 353.ace_gutter-cell, .ace_gutter-cell_svg-icons { 354 position: absolute; 355 top: 0; 356 left: 0; 357 right: 0; 358 padding-left: 19px; 359 padding-right: 6px; 360 background-repeat: no-repeat; 361} 362 363.ace_gutter-cell_svg-icons .ace_gutter_annotation { 364 margin-left: -14px; 365 float: left; 366} 367 368.ace_gutter-cell .ace_gutter_annotation { 369 margin-left: -19px; 370 float: left; 371} 372 373.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold { 374 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/XDsFgGIBhtDrshlitm
374k2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg=="); 375 background-repeat: no-repeat; 376 background-position: 2px center; 377} 378 379.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold { 380 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=="); 381 background-repeat: no-repeat; 382 background-position: 2px center; 383} 384 385.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint { 386 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII="); 387 background-repeat: no-repeat; 388 background-position: 2px center; 389} 390 391.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint { 392 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC"); 393} 394 395.ace_icon_svg.ace_error { 396 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+"); 397 background-color: crimson; 398} 399.ace_icon_svg.ace_security { 400 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+"); 401 background-color: crimson; 402} 403.ace_icon_svg.ace_warning { 404 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg=="); 405 background-color: darkorange; 406} 407.ace_icon_svg.ace_info { 408 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGx
408pbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg=="); 409 background-color: royalblue; 410} 411.ace_icon_svg.ace_hint { 412 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg=="); 413 background-color: silver; 414} 415 416.ace_icon_svg.ace_error_fold { 417 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); 418 background-color: crimson; 419} 420.ace_icon_svg.ace_security_fold { 421 -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyM
421DUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); 422 background-color: crimson; 423} 424.ace_icon_svg.ace_warning_fold { 425 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4="); 426 background-color: darkorange; 427} 428 429.ace_scrollbar { 430 contain: strict; 431 position: absolute; 432 right: 0; 433 bottom: 0; 434 z-index: 6; 435} 436 437.ace_scrollbar-inner { 438 position: absolute; 439 cursor: text; 440 left: 0; 441 top: 0; 442} 443 444.ace_scrollbar-v{ 445 overflow-x: hidden; 446 overflow-y: scroll; 447 top: 0; 448} 449 450.ace_scrollbar-h { 451 overflow-x: scroll; 452 overflow-y: hidden; 453 left: 0; 454} 455 456.ace_print-margin { 457 position: absolute; 458 height: 100%; 459} 460 461.ace_text-input { 462 position: absolute; 463 z-index: 0; 464 width: 0.5em; 465 height: 1em; 466 opacity: 0; 467 background: transparent; 468 -moz-appearance: none; 469 appearance: none; 470 border: none; 471 resize: none; 472 outline: none; 473 overflow: hidden; 474 font: inherit; 475 padding: 0 1px; 476 margin: 0 -1px; 477 contain: strict; 478 -ms-user-select: text; 479 -moz-user-select: text; 480 -webkit-user-select: text; 481 user-select: text; 482 /*with \`pre-line\` chrome inserts instead of space*/ 483 white-space: pre!important; 484} 485.ace_text-input.ace_composition { 486 background: transparent; 487 color: inherit; 488 z-index: 1000; 489 opacity: 1; 490} 491.ace_composition_placeholder { color: transparent } 492.ace_composition_marker { 493 border-bottom: 1px solid; 494 position: absolute; 495 border-radius: 0;
496 margin-top: 1px; 497} 498 499[ace_nocontext=true] { 500 transform: none!important; 501 filter: none!important; 502 clip-path: none!important; 503 mask : none!important; 504 contain: none!important; 505 perspective: none!important; 506 mix-blend-mode: initial!important; 507 z-index: auto; 508} 509 510.ace_layer { 511 z-index: 1; 512 position: absolute; 513 overflow: hidden; 514 /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/ 515 word-wrap: normal; 516 white-space: pre; 517 height: 100%; 518 width: 100%; 519 box-sizing: border-box; 520 /* setting pointer-events: auto; on node under the mouse, which changes 521 during scroll, will break mouse wheel scrolling in Safari */ 522 pointer-events: none; 523} 524 525.ace_gutter-layer { 526 position: relative; 527 width: auto; 528 text-align: right; 529 pointer-events: auto; 530 height: 1000000px; 531 contain: style size layout; 532} 533 534.ace_text-layer { 535 font: inherit !important; 536 position: absolute; 537 height: 1000000px; 538 width: 1000000px; 539 contain: style size layout; 540} 541 542.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group { 543 contain: style size layout; 544 position: absolute; 545 top: 0; 546 left: 0; 547 right: 0; 548} 549 550.ace_hidpi .ace_text-layer, 551.ace_hidpi .ace_gutter-layer, 552.ace_hidpi .ace_content, 553.ace_hidpi .ace_gutter { 554 contain: strict; 555} 556.ace_hidpi .ace_text-layer > .ace_line, 557.ace_hidpi .ace_text-layer > .ace_line_group { 558 contain: strict; 559} 560 561.ace_cjk { 562 display: inline-block; 563 text-align: center; 564} 565 566.ace_cursor-layer { 567 z-index: 4; 568} 569 570.ace_cursor { 571 z-index: 4; 572 position: absolute; 573 box-sizing: border-box; 574 border-left: 2px solid; 575 /* workaround for smooth cursor repaintng whole screen in chrome */ 576 transform: translatez(0); 577} 578 579.ace_multiselect .ace_cursor { 580 border-left-width: 1px; 581} 582 583.ace_slim-cursors .ace_cursor { 584 border-left-width: 1px; 585} 586 587.ace_overwrite-cursors .ace_cursor { 588 border-left-width: 0; 589 border-bottom: 1px solid; 590} 591 592.ace_hidden-cursors .ace_cursor { 593 opacity: 0.2; 594} 595 596.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor { 597 opacity: 0; 598} 599 600.ace_smooth-blinking .ace_cursor { 601 transition: opacity 0.18s; 602} 603 604.ace_animate-blinking .ace_cursor { 605 animation-duration: 1000ms; 606 animation-timing-function: step-end; 607 animation-name: blink-ace-animate; 608 animation-iteration-count: infinite; 609} 610 611.ace_animate-blinking.ace_smooth-blinking .ace_cursor { 612 animation-duration: 1000ms; 613 animation-timing-function: ease-in-out; 614 animation-name: blink-ace-animate-smooth; 615} 616 617@keyframes blink-ace-animate { 618 from, to { opacity: 1; } 619 60% { opacity: 0; } 620} 621 622@keyframes blink-ace-animate-smooth { 623 from, to { opacity: 1; } 624 45% { opacity: 1; } 625 60% { opacity: 0; } 626 85% { opacity: 0; } 627} 628 629.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack { 630 position: absolute; 631 z-index: 3; 632} 633 634.ace_marker-layer .ace_selection { 635 position: absolute; 636 z-index: 5; 637} 638 639.ace_marker-layer .ace_bracket { 640 position: absolute; 641 z-index: 6; 642} 643 644.ace_marker-layer .ace_error_bracket { 645 position: absolute; 646 border-bottom: 1px solid #DE5555; 647 border-radius: 0; 648} 649 650.ace_marker-layer .ace_active-line { 651 position: absolute; 652 z-index: 2; 653} 654 655.ace_marker-layer .ace_selected-word { 656 position: absolute; 657 z-index: 4; 658 box-sizing: border-box; 659} 660 661.ace_line .ace_fold { 662 box-sizing: border-box; 663 664 display: inline-block; 665 height: 11px; 666 margin-top: -2px; 667 vertical-align: middle; 668 669 background-image: 670 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), 671 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII="); 672 background-repeat: no-repeat, repeat-x; 673 background-position: center center, top left; 674 color: transparent; 675 676 border: 1px solid black; 677 border-radius: 2px; 678 679 cursor: pointer; 680 pointer-events: auto; 681} 682 683.ace_dark .ace_fold { 684} 685 686.ace_fold:hover{ 687 background-image: 688 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), 689 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC"); 690} 691 692.ace_tooltip { 693 background-color: #f5f5f5; 694 border: 1px solid gray; 695 border-radius: 1px; 696 box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); 697 color: black; 698 padding: 3px 4px; 699 position: fixed; 700 z-index: 999999; 701 box-sizing: border-box; 702 cursor: default; 703 white-space: pre-wrap; 704 word-wrap: break-word; 705 line-height: normal; 706 font-style: normal; 707 font-weight: normal; 708 letter-spacing: normal; 709 pointer-events: none; 710 overflow: auto; 711 max-width: min(33em, 66vw); 712 overscroll-behavior: contain; 713} 714.ace_tooltip pre { 715 white-space: pre-wrap; 716} 717 718.ace_tooltip.ace_dark { 719 background-color: #636363; 720 color: #fff; 721} 722 723.ace_tooltip:focus { 724 outline: 1px solid #5E9ED6; 725} 726 727.ace_icon { 728 display: inline-block; 729 width: 18px; 730 vertical-align: top; 731} 732 733.ace_icon_svg { 734 display: inline-block; 735 width: 12px; 736 vertical-align: top; 737 -webkit-mask-repeat: no-repeat; 738 -webkit-mask-size: 12px; 739 -webkit-mask-position: center; 740} 741 742.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons { 743 padding-right: 13px; 744} 745 746.ace_fold-widget, .ace_custom-widget { 747 box-sizing: border-box; 748 749 margin: 0 -12px 0 1px; 750 display: none; 751 width: 11px; 752 vertical-align: top; 753 754 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVo
754DBUxKAAAAABJRU5ErkJggg=="); 755 background-repeat: no-repeat; 756 background-position: center; 757 758 border-radius: 3px; 759 760 border: 1px solid transparent; 761 cursor: pointer; 762 pointer-events: auto; 763} 764 765.ace_custom-widget { 766 background: none; 767} 768 769.ace_folding-enabled .ace_fold-widget { 770 display: inline-block; 771} 772 773.ace_fold-widget.ace_end { 774 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg=="); 775} 776 777.ace_fold-widget.ace_closed { 778 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA=="); 779} 780 781.ace_fold-widget:hover { 782 border: 1px solid rgba(0, 0, 0, 0.3); 783 background-color: rgba(255, 255, 255, 0.2); 784 box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); 785} 786 787.ace_fold-widget:active { 788 border: 1px solid rgba(0, 0, 0, 0.4); 789 background-color: rgba(0, 0, 0, 0.05); 790 box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); 791} 792/** 793 * Dark version for fold widgets 794 */ 795.ace_dark .ace_fold-widget { 796 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC"); 797} 798.ace_dark .ace_fold-widget.ace_end { 799 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg=="); 800} 801.ace_dark .ace_fold-widget.ace_closed { 802 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg=="); 803} 804.ace_dark .ace_fold-widget:hover { 805 box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); 806 background-color: rgba(255, 255, 255, 0.1); 807} 808.ace_dark .ace_fold-widget:active { 809 box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); 810} 811 812.ace_inline_button { 813 border: 1px solid lightgray; 814 display: inline-block; 815 margin: -1px 8px; 816 padding: 0 5px; 817 pointer-events: auto; 818 cursor: pointer; 819} 820.ace_inline_button:hover { 821 border-color: gray; 822 background: rgba(200,200,200,0.2); 823 display: inline-block; 824 pointer-events: auto; 825} 826 827.ace_fold-widget.ace_invalid { 828 background-color: #FFB4B4; 829 border-color: #DE5555; 830} 831 832.ace_fade-fold-widgets .ace_fold-widget { 833 transition: opacity 0.4s ease 0.05s; 834 opacity: 0; 835} 836 837.ace_fade-fold-widgets:hover .ace_fold-widget { 838 transition: opacity 0.05s ease 0.05s; 839 opacity:1; 840} 841 842.ace_underline { 843 text-decoration: underline; 844} 845 846.ace_bold { 847 font-weight: bold; 848} 849 850.ace_nobold .ace_bold { 851 font-weight: normal; 852} 853 854.ace_italic { 855 font-style: italic; 856} 857 858 859.ace_error-marker { 860 background-color: rgba(255, 0, 0,0.2); 861 position: absolute; 862 z-index: 9; 863} 864 865.ace_highlight-marker { 866 background-color: rgba(255, 255, 0,0.2); 867 position: absolute; 868 z-index: 8; 869} 870 871.ace_mobile-menu { 872 position: absolute; 873 line-height: 1.5; 874 border-radius: 4px; 875 -ms-user-select: none; 876 -moz-user-select: none; 877 -webkit-user-select: none; 878 user-select: none; 879 background: white; 880 box-shadow: 1px 3px 2px grey; 881 border: 1px solid #dcdcdc; 882 color: black; 883} 884.ace_dark > .ace_mobile-menu { 885 background: #333; 886 color: #ccc; 887 box-shadow: 1px 3px 2px grey; 888 border: 1px solid #444; 889 890} 891.ace_mobile-button { 892 padding: 2px; 893 cursor: pointer; 894 overflow: hidden; 895} 896.ace_mobile-button:hover { 897 background-color: #eee; 898 opacity:1; 899} 900.ace_mobile-button:active { 901 background-color: #ddd; 902} 903 904.ace_placeholder { 905 position: relative; 906 font-family: arial; 907 transform: scale(0.9); 908 transform-origin: left; 909 white-space: pre; 910 opacity: 0.7; 911 margin: 0 10px; 912 z-index: 1; 913} 914 915.ace_ghost_text { 916 opacity: 0.5; 917 font-style: italic; 918} 919 920.ace_ghost_text_container > div { 921 white-space: pre; 922} 923 924.ghost_text_line_wrapped::after { 925 content: "â©"; 926 position: absolute; 927} 928 929.ace_lineWidgetContainer.ace_ghost_text { 930 margin: 0px 4px 931} 932 933.ace_screenreader-only { 934 position:absolute; 935 left:-10000px; 936 top:auto; 937 width:1px; 938 height:1px; 939 overflow:hidden; 940} 941 942.ace_hidden_token { 943 display: none; 944}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(E,k,H){var x=E("../lib/dom"),A=E("../lib/oop"),$=E("../lib/event_emitter").EventEmitter,a=(function(){function l(r,o){this.renderer=o,this.pixelRatio=1,this.maxHeight=o.layerConfig.maxHeight,this.lineHeight=o.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,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)"},this.setScrollBarV(r)}return l.prototype.$createCanvas=function(){this.canvas=x.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},l.prototype.setScrollBarV=function(r){this.$createCanvas(),this.scrollbarV=r,r.element.appendChild(this.canvas),this.setDimensions()},l.prototype.$updateDecorators=function(r){if(typeof this.canvas.getContext!="function")return;var o=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(r);var n=this.canvas.getContext("2d");function t(w,d){return w.priority<d.priority?-1:w.priority>d.priority?1:0}var e=this.renderer.session.$annotations;if(n.clearRect(0,0,this.canvas.width,this.canvas.height),e){var i={info:1,warning:2,error:3};
944e.forEach(function(w){w.priority=i[w.type]||null}),e=e.sort(t);for(var s=0;s<e.length;s++){var h=e[s].row,c=this.getVerticalOffsetForRow(h),m=c+this.lineHeight,p=Math.round(this.heightRatio*c),g=Math.round(this.heightRatio*m),f=Math.round((p+g)/2),b=g-f;b<this.halfMinDecorationHeight&&(b=this.halfMinDecorationHeight),f-b<0&&(f=b),f+b>this.canvasHeight&&(f=this.canvasHeight-b);var M=f-b,C=f+b,S=C-M;n.fillStyle=o[e[s].type]||null,n.fillRect(0,M,Math.round(this.oneZoneWidth-1),S)}}var R=this.renderer.session.selection.getCursor();if(R){var y=Math.round(this.getVerticalOffsetForRow(R.row)*this.heightRatio);n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,y,this.canvasWidth,2)}},l.prototype.getVerticalOffsetForRow=function(r){r=r|0;var o=this.renderer.session.documentToScreenRow(r,0)*this.lineHeight;return o},l.prototype.setDimensions=function(r){r=r||this.renderer.layerConfig,this.maxHeight=r.maxHeight,this.lineHeight=r.lineHeight,this.canvasHeight=r.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},l.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},l.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},l})();A.implement(a.prototype,$),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(E,k,H){var x=E("./lib/oop"),A=E("./lib/dom"),$=E("./lib/lang"),a=E("./config"),l=E("./layer/gutter").Gutter,r=E("./layer/marker").Marker,o=E("./layer/text").Text,n=E("./layer/cursor").Cursor,t=E("./scrollbar").HScrollBar,e=E("./scrollbar").VScrollBar,i=E("./scrollbar_custom").HScrollBar,s=E("./scrollbar_custom").VScrollBar,h=E("./renderloop").Ren
944derLoop,c=E("./layer/font_metrics").FontMetrics,m=E("./lib/event_emitter").EventEmitter,p=E("./css/editor-css"),g=E("./layer/decorators").Decorator,f=E("./lib/useragent"),b=E("./layer/text_util").isTextToken;A.importCssString(p,"ace_editor.css",!1);var M=(function(){function C(S,R){var y=this;this.container=S||A.createElement("div"),A.addCssClass(this.container,"ace_editor"),A.HI_DPI&&A.addCssClass(this.container,"ace_hidpi"),this.setTheme(R),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=A.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=A.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=A.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new l(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new r(this.content);var w=this.$textLayer=new o(this.content);this.canvas=w.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(d){y.$scrollAnimation||y.session.setScrollTop(d.data-y.scrollMargin.top)}),this.scrollBarH.on("scroll",function(d){y.$scrollAnimation||y.session.setScrollLeft(d.data-y.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new c(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(d){y.updateCharacterSize(),y.onResize(!0,y.gutterWidth,y.$size.width,y.$size.height),y._signal("changeCharacterSize",d)}),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=!f.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 C.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(),A.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},C.prototype.setSession=function(S){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=S,S&&this.scrollMargin.top&&S.getScrollTop()<=0&&S.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(S),this.$markerBack.setSession(S),this.$markerFront.setSession(S),this.$gutterLayer.setSession(S),this.$textLayer.setSession(S),S&&(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))},C.prototype.updateLines=function(S,R,y){if(R===void 0&&(R=1/0),this.$changedLines?(this.$changedLines.firstRow>S&&(this.$changedLines.firstRow=S),this.$changedLines.lastRow<R&&(this.$changedLines.lastRow=R)):this.$changedLines={firstRow:S,lastRow:R},this.$changedLines.lastRow<this.layerConfig.firstRow)if(y)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},C.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},C.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},C.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},C.prototype.updateFull=function(S){S?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},C.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()}
944,C.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},C.prototype.onResize=function(S,R,y,w){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=S?1:0;var d=this.container;w||(w=d.clientHeight||d.scrollHeight),!w&&this.$maxLines&&this.lineHeight>1&&(!d.style.height||d.style.height=="0px")&&(d.style.height="1px",w=d.clientHeight||d.scrollHeight),y||(y=d.clientWidth||d.scrollWidth);var u=this.$updateCachedSize(S,R,y,w);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!y&&!w)return this.resizing=0;S&&(this.$gutterLayer.$padding=null),S?this.$renderChanges(u|this.$changes,!0):this.$loop.schedule(u|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},C.prototype.$updateCachedSize=function(S,R,y,w){w-=this.$extraHeight||0;var d=0,u=this.$size,v={width:u.width,height:u.height,scrollerHeight:u.scrollerHeight,scrollerWidth:u.scrollerWidth};if(w&&(S||u.height!=w)&&(u.height=w,d|=this.CHANGE_SIZE,u.scrollerHeight=u.height,this.$horizScroll&&(u.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(u.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",d=d|this.CHANGE_SCROLL),y&&(S||u.width!=y)){d|=this.CHANGE_SIZE,u.width=y,R==null&&(R=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=R,A.setStyle(this.scrollBarH.element.style,"left",R+"px"),A.setStyle(this.scroller.style,"left",R+this.margin.left+"px"),u.scrollerWidth=Math.max(0,y-R-this.scrollBarV.getWidth()-this.margin.h),A.setStyle(this.$gutter.style,"left",this.margin.left+"px");var L=this.scrollBarV.getWidth()+"px";A.setStyle(this.scrollBarH.element.style,"right",L),A.setStyle(this.scroller.style,"right",L),A.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(u.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||S)&&(d|=this.CHANGE_FULL)}return u.$dirty=!y||!w,d&&this._signal("resize",v),d},C.prototype.onGutterResize=function(S){var R=this.$showGutter?S:0;R!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,R,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()},C.prototype.adjustWrapLimit=function(){var S=this.$size.scrollerWidth-this.$padding*2,R=Math.floor(S/this.characterWidth);return this.session.adjustWrapLimit(R,this.$showPrintMargin&&this.$printMarginColumn)},C.prototype.setAnimatedScroll=function(S){this.setOption("animatedScroll",S)},C.prototype.getAnimatedScroll=function(){return this.$animatedScroll},C.prototype.setShowInvisibles=function(S){this.setOption("showInvisibles",S),this.session.$bidiHandler.setShowInvisibles(S)},C.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},C.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},C.prototype.setDisplayIndentGuides=function(S){this.setOption("displayIndentGuides",S)},C.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},C.prototype.setHighlightIndentGuides=function(S){this.setOption("highlightIndentGuides",S)},C.prototype.setShowPrintMargin=function(S){this.setOption("showPrintMargin",S)},C.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},C.prototype.setPrintMarginColumn=function(S){this.setOption("printMarginColumn",S)},C.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},C.prototype.getShowGutter=function(){return this.getOption("showGutter")},C.prototype.setShowGutter=function(S){return this.setOption("showGutter",S)},C.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},C.prototype.setFadeFoldWidgets=function(S){this.setOption("fadeFoldWidgets",S)},C.prototype.setHighlightGutterLine=function(S){this.setOption("highlightGutterLine",S)},C.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},C.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var S=A.createElement("div");S.className="ace_layer ace_print-margin-layer",this.$printMarginEl=A.createElement("div"),this.$printMarginEl.className="ace_print-margin",S.appendChild(this.$printMarginEl),this.content.insertBefore(S,this.content.firstChild)}var R=this.$printMarginEl.style;R.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",R.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},C.prototype.getContainerElement=function(){return this.container},C.prototype.getMouseEventTarget=function(){return this.scroller},C.prototype.getTextAreaContainer=function(){return this.container},C.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var S=this.textarea.style,R=this.$composition;
944if(!this.$keepTextAreaAtCursor&&!R){A.translate(this.textarea,-100,0);return}var y=this.$cursorLayer.$pixelPos;if(y){R&&R.markerRange&&(y=this.$cursorLayer.getPixelPosition(R.markerRange.start,!0));var w=this.layerConfig,d=y.top,u=y.left;d-=w.offset;var v=R&&R.useTextareaForIME||f.isMobile?this.lineHeight:1;if(d<0||d>w.height-v){A.translate(this.textarea,0,0);return}var L=1,T=this.$size.height-v;if(!R)d+=this.lineHeight;else if(R.useTextareaForIME){var _=this.textarea.value;L=this.characterWidth*this.session.$getStringScreenWidth(_)[0]}else d+=this.lineHeight+2;u-=this.scrollLeft,u>this.$size.scrollerWidth-L&&(u=this.$size.scrollerWidth-L),u+=this.gutterWidth+this.margin.left,A.setStyle(S,"height",v+"px"),A.setStyle(S,"width",L+"px"),A.translate(this.textarea,Math.min(u,this.$size.scrollerWidth-L),Math.min(d,T))}}},C.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},C.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},C.prototype.getLastFullyVisibleRow=function(){var S=this.layerConfig,R=S.lastRow,y=this.session.documentToScreenRow(R,0)*S.lineHeight;return y-this.session.getScrollTop()>S.height-S.lineHeight?R-1:R},C.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},C.prototype.setPadding=function(S){this.$padding=S,this.$textLayer.setPadding(S),this.$cursorLayer.setPadding(S),this.$markerFront.setPadding(S),this.$markerBack.setPadding(S),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},C.prototype.setScrollMargin=function(S,R,y,w){var d=this.scrollMargin;d.top=S|0,d.bottom=R|0,d.right=w|0,d.left=y|0,d.v=d.top+d.bottom,d.h=d.left+d.right,d.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-d.top),this.updateFull()},C.prototype.setMargin=function(S,R,y,w){var d=this.margin;d.top=S|0,d.bottom=R|0,d.right=w|0,d.left=y|0,d.v=d.top+d.bottom,d.h=d.left+d.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},C.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},C.prototype.setHScrollBarAlwaysVisible=function(S){this.setOption("hScrollBarAlwaysVisible",S)},C.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},C.prototype.setVScrollBarAlwaysVisible=function(S){this.setOption("vScrollBarAlwaysVisible",S)},C.prototype.$updateScrollBarV=function(){var S=this.layerConfig.maxHeight,R=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(S-=(R-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>S-R&&(S=this.scrollTop+R,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(S+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},C.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},C.prototype.freeze=function(){this.$frozen=!0},C.prototype.unfreeze=function(){this.$frozen=!1},C.prototype.$renderChanges=function(S,R){if(this.$changes&&(S|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!S&&!R){this.$changes|=S;return}if(this.$size.$dirty)return this.$changes|=S,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",S),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var y=this.layerConfig;if(S&this.CHANGE_FULL||S&this.CHANGE_SIZE||S&this.CHANGE_TEXT||S&this.CHANGE_LINES||S&this.CHANGE_SCROLL||S&this.CHANGE_H_SCROLL){if(S|=this.$computeLayerConfig()|this.$loop.clear(),y.firstRow!=this.layerConfig.firstRow&&y.firstRowScreen==this.layerConfig.firstRowScreen){var w=this.scrollTop+(y.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;w>0&&(this.scrollTop=w,S=S|this.CHANGE_SCROLL,S|=this.$computeLayerConfig()|this.$loop.clear())}y=this.layerConfig,this.$updateScrollBarV(),S&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),A.translate(this.content,-this.scrollLeft,-y.offset);var d=y.width+2*this.$padding+"px",u=y.minHeight+"px";A.setStyle(this.content.style,"width",d),A.setStyle(this.content.style,"height",u)}if(S&this.CHANGE_H_SCROLL&&(A.translate(this.content,-this.scrollLeft,-y.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),S&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(y),this.$showGutter&&this.$gutterLayer.update(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y),this.$markerBack.update(y),this.$markerFront.update(y),this.$curs
944orLayer.update(y),this.$moveTextAreaToCursor(),this._signal("afterRender",S);return}if(S&this.CHANGE_SCROLL){this.$changedLines=null,S&this.CHANGE_TEXT||S&this.CHANGE_LINES?this.$textLayer.update(y):this.$textLayer.scrollLines(y),this.$showGutter&&(S&this.CHANGE_GUTTER||S&this.CHANGE_LINES?this.$gutterLayer.update(y):this.$gutterLayer.scrollLines(y)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y),this.$markerBack.update(y),this.$markerFront.update(y),this.$cursorLayer.update(y),this.$moveTextAreaToCursor(),this._signal("afterRender",S);return}S&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(y),this.$showGutter&&this.$gutterLayer.update(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y)):S&this.CHANGE_LINES?((this.$updateLines()||S&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y)):S&this.CHANGE_TEXT||S&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y)):S&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(y),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(y)),S&this.CHANGE_CURSOR&&(this.$cursorLayer.update(y),this.$moveTextAreaToCursor()),S&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(y),S&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(y),this._signal("afterRender",S)},C.prototype.$autosize=function(){var S=this.session.getScreenLength()*this.lineHeight,R=this.$maxLines*this.lineHeight,y=Math.min(R,Math.max((this.$minLines||1)*this.lineHeight,S))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(y+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&y>this.$maxPixelHeight&&(y=this.$maxPixelHeight);var w=y<=2*this.lineHeight,d=!w&&S>R;if(y!=this.desiredHeight||this.$size.height!=this.desiredHeight||d!=this.$vScroll){d!=this.$vScroll&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var u=this.container.clientWidth;this.container.style.height=y+"px",this.$updateCachedSize(!0,this.$gutterWidth,u,y),this.desiredHeight=y,this._signal("autosize")}},C.prototype.$computeLayerConfig=function(){var S=this.session,R=this.$size,y=R.height<=2*this.lineHeight,w=this.session.getScreenLength(),d=w*this.lineHeight,u=this.$getLongestLine(),v=!y&&(this.$hScrollBarAlwaysVisible||R.scrollerWidth-u-2*this.$padding<0),L=this.$horizScroll!==v;L&&(this.$horizScroll=v,this.scrollBarH.setVisible(v));var T=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),y=R.height<=2*this.lineHeight);var _=R.scrollerHeight+this.lineHeight,D=!this.$maxLines&&this.$scrollPastEnd?(R.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;d+=D;var N=this.scrollMargin;this.session.setScrollTop(Math.max(-N.top,Math.min(this.scrollTop,d-R.scrollerHeight+N.bottom))),this.session.setScrollLeft(Math.max(-N.left,Math.min(this.scrollLeft,u+2*this.$padding-R.scrollerWidth+N.right)));var V=!y&&(this.$vScrollBarAlwaysVisible||R.scrollerHeight-d+D<0||this.scrollTop>N.top),F=T!==V;F&&(this.$vScroll=V,this.scrollBarV.setVisible(V));var W=this.scrollTop%this.lineHeight,B=Math.ceil(_/this.lineHeight)-1,z=Math.max(0,Math.round((this.scrollTop-W)/this.lineHeight)),P=z+B,U,Y,j=this.lineHeight;z=S.screenToDocumentRow(z,0);var X=S.getFoldLine(z);X&&(z=X.start.row),U=S.documentToScreenRow(z,0),Y=S.getRowLength(z)*j,P=Math.min(S.screenToDocumentRow(P,0),S.getLength()-1),_=R.scrollerHeight+S.getRowLength(P)*j+Y,W=this.scrollTop-U*j,W<0&&U>0&&(U=Math.max(0,U+Math.floor(W/j)),W=this.scrollTop-U*j);var q=0;return(this.layerConfig.width!=u||L)&&(q=this.CHANGE_H_SCROLL),(L||F)&&(q|=this.$updateCachedSize(!0,this.gutterWidth,R.width,R.height),this._signal("scrollbarVisibilityChanged"),F&&(u=this.$getLongestLine())),this.layerConfig={width:u,padding:this.$padding,firstRow:z,firstRowScreen:U,lastRow:P,lineHeight:j,characterWidth:this.characterWidth,minHeight:_,maxHeight:d,offset:W,gutterOffset:j?Math.max(0,Math.ceil((W+R.height-R.scrollerHeight)/j)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(u-this.$padding),q},C.prototype.$updateLines=function(){if(this.$changedLines){var S=this.$changedLines.firstRow,R=this.$changedLines.lastRow;this.$changedLines=null;var y=this.layerConfig;if(!(S>
944y.lastRow+1)&&!(R<y.firstRow)){if(R===1/0){this.$showGutter&&this.$gutterLayer.update(y),this.$textLayer.update(y);return}return this.$textLayer.updateLines(y,S,R),!0}}},C.prototype.$getLongestLine=function(){var S=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(S+=1),this.$textLayer&&S>this.$textLayer.MAX_LINE_LENGTH&&(S=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(S*this.characterWidth))},C.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},C.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},C.prototype.addGutterDecoration=function(S,R){this.$gutterLayer.addGutterDecoration(S,R)},C.prototype.removeGutterDecoration=function(S,R){this.$gutterLayer.removeGutterDecoration(S,R)},C.prototype.updateBreakpoints=function(S){this._rows=S,this.$loop.schedule(this.CHANGE_GUTTER)},C.prototype.setAnnotations=function(S){this.$gutterLayer.setAnnotations(S),this.$loop.schedule(this.CHANGE_GUTTER)},C.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},C.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},C.prototype.showCursor=function(){this.$cursorLayer.showCursor()},C.prototype.scrollSelectionIntoView=function(S,R,y){this.scrollCursorIntoView(S,y),this.scrollCursorIntoView(R,y)},C.prototype.scrollCursorIntoView=function(S,R,y){if(this.$size.scrollerHeight!==0){var w=this.$cursorLayer.getPixelPosition(S),d=w.left,u=w.top,v=y&&y.top||0,L=y&&y.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var T=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;T+v>u?(R&&T+v>u+this.lineHeight&&(u-=R*this.$size.scrollerHeight),u===0&&(u=-this.scrollMargin.top),this.session.setScrollTop(u)):T+this.$size.scrollerHeight-L<u+this.lineHeight&&(R&&T+this.$size.scrollerHeight-L<u-this.lineHeight&&(u+=R*this.$size.scrollerHeight),this.session.setScrollTop(u+this.lineHeight+L-this.$size.scrollerHeight));var _=this.scrollLeft,D=2*this.layerConfig.characterWidth;d-D<_?(d-=D,d<this.$padding+D&&(d=-this.scrollMargin.left),this.session.setScrollLeft(d)):(d+=D,_+this.$size.scrollerWidth<d+this.characterWidth?this.session.setScrollLeft(Math.round(d+this.characterWidth-this.$size.scrollerWidth)):_<=this.$padding&&d-_<this.characterWidth&&this.session.setScrollLeft(0))}},C.prototype.getScrollTop=function(){return this.session.getScrollTop()},C.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},C.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},C.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},C.prototype.scrollToRow=function(S){this.session.setScrollTop(S*this.lineHeight)},C.prototype.alignCursor=function(S,R){typeof S=="number"&&(S={row:S,column:0});var y=this.$cursorLayer.getPixelPosition(S),w=this.$size.scrollerHeight-this.lineHeight,d=y.top-w*(R||0);return this.session.setScrollTop(d),d},C.prototype.$calcSteps=function(S,R){var y=0,w=this.STEPS,d=[],u=function(v,L,T){return T*(Math.pow(v-1,3)+1)+L};for(y=0;y<w;++y)d.push(u(y/this.STEPS,S,R-S));return d},C.prototype.scrollToLine=function(S,R,y,w){var d=this.$cursorLayer.getPixelPosition({row:S,column:0}),u=d.top;R&&(u-=this.$size.scrollerHeight/2);var v=this.scrollTop;this.session.setScrollTop(u),y!==!1&&this.animateScrolling(v,w)},C.prototype.animateScrolling=function(S,R){var y=this.scrollTop;if(!this.$animatedScroll)return;var w=this;if(S==y)return;if(this.$scrollAnimation){var d=this.$scrollAnimation.steps;if(d.length&&(S=d[0],S==y))return}var u=w.$calcSteps(S,y);this.$scrollAnimation={from:S,to:y,steps:u},clearInterval(this.$timer),w.session.setScrollTop(u.shift()),w.session.$scrollTop=y;function v(){w.$timer=clearInterval(w.$timer),w.$scrollAnimation=null,w.$stopAnimation=!1,R&&R()}this.$timer=setInterval(function(){if(w.$stopAnimation){v();return}if(!w.session)return clearInterval(w.$timer);u.length?(w.session.setScrollTop(u.shift()),w.session.$scrollTop=y):y!=null?(w.session.$scrollTop=-1,w.session.setScrollTop(y),y=null):v()},10)},C.prototype.scrollToY=function(S){this.scrollTop!==S&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=S)},C.prototype.scrollToX=function(S){this.scrollLeft!==S&&(this.scrollLeft=S),this.$loop.schedule(this.CHANGE_H_SCROLL)},C.prototype.scrollTo=function(S,R){this.session.setScrollTop(R),this.session.setScrollLeft(S)},C.prototype.scrollBy=function(S,R){R&&this.session.setScrollTop(this.session.getScrollTop()+R),S&&this.session.setScrollLeft(this.session.getScrollLeft()+S)},C.prototype.isScrollableBy=function(S,R){if(R<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||R>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||S<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||S>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},C.prototype.pixelToScreenCoordinates=function(S,R){var y;if(this.$hasCssTransforms){y={top:0,left:0};var w=this.$fontMetrics.transformCoordinates([S,R]);S=w[1]-this.gutterWidth-this.margin.left,R=w[0]}else y=this.scroller.getBoundingClientRect();var d=S+this.scrollLeft-y.left-this.$padding,u=d/this.characterWidth,v=Math.floor((R+this.scrollTop-y.top)/this.lineHeight),L=this.$blockCursor?Math.floor(u):Math.round(u);return{row:v,column:L,side:u-L>0?1:-1,offsetX:d}},C.prototype.screenToTextCoordinates=function(S,R){var y;if(this.$hasCssTransforms){y={top:0,left:0};var w=this.$fontMetrics.transformCoordinates([S,R]);S=w[1]-this.gutterWidth-this.margin.left,R=w[0]}else y=this.scroller.getBoundingClientRect();var d=S+this.scrollLeft-y.left-this.$padding,u=d/this.characterWidth,v=this.$blockCursor?Math.floor(u):Math.round(u),L=(R+this.scrollTop-y.top)/this.lineHeight;return this.session.screenToDocumentPosition(L,Math.max(v,0),d)},C.prototype.textToScreenCoordinates=function(S,R){var y=this.scroller.getBoundingClientRect(),w=this.session.documentToScreenPosition(S,R),d=this.$padding+(this.session.$bidiHandler.isBidiRow(w.row,S)?this.session.$bidiHandler.getPosLeft(w.column):Math.round(w.column*this.characterWidth)),u=w.row*this.lineHeight;return{pageX:y.left+d-this.scrollLeft,pageY:y.top+u-this.scrollTop}},C.prototype.visualizeFocus=function(){A.addCssClass(this.container,"ace_focus")},C.prototype.visualizeBlur=function(){A.removeCssClass(this.container,"ace_focus")},C.prototype.showComposition=function(S){this.$composition=S,S.cssText||(S.cssText=this.textarea.style.cssText),S.useTextareaForIME==null&&(S.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(A.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$curs
944orLayer.element.style.display="none"):S.markerId=this.session.addMarker(S.markerRange,"ace_composition_marker","text")},C.prototype.setCompositionText=function(S){var R=this.session.selection.cursor;this.addToken(S,"composition_placeholder",R.row,R.column),this.$moveTextAreaToCursor()},C.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),A.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var S=this.session.selection.cursor;this.removeExtraToken(S.row,S.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},C.prototype.setGhostText=function(S,R){var y=this.session.selection.cursor,w=R||{row:y.row,column:y.column};this.removeGhostText();var d=this.$calculateWrappedTextChunks(S,w);this.addToken(d[0].text,"ghost_text",w.row,w.column),this.$ghostText={text:S,position:{row:w.row,column:w.column}};var u=A.createElement("div");if(d.length>1){var v=this.hideTokensAfterPosition(w.row,w.column),L;d.slice(1).forEach(function(F){var W=A.createElement("div"),B=A.createElement("span");B.className="ace_ghost_text",F.wrapped&&(W.className="ghost_text_line_wrapped"),F.text.length===0&&(F.text=" "),B.appendChild(A.createTextNode(F.text)),W.appendChild(B),u.appendChild(W),L=W}),v.forEach(function(F){var W=A.createElement("span");b(F.type)||(W.className="ace_"+F.type.replace(/\./g," ace_")),W.appendChild(A.createTextNode(F.value)),L.appendChild(W)}),this.$ghostTextWidget={el:u,row:w.row,column:w.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var T=this.$cursorLayer.getPixelPosition(w,!0),_=this.container,D=_.getBoundingClientRect().height,N=d.length*this.lineHeight,V=N<D-T.top;if(V)return;N<D?this.scrollBy(0,(d.length-1)*this.lineHeight):this.scrollToRow(w.row)}},C.prototype.$calculateWrappedTextChunks=function(S,R){var y=this.$size.scrollerWidth-this.$padding*2,w=Math.floor(y/this.characterWidth)-2;w=w<=0?60:w;for(var d=S.split(/\r?\n/),u=[],v=0;v<d.length;v++){var L=this.session.$getDisplayTokens(d[v],R.column),T=this.session.$computeWrapSplits(L,w,this.session.$tabSize);if(T.length>0){var _=0;T.push(d[v].length);for(var D=0;D<T.length;D++){var N=d[v].slice(_,T[D]);u.push({text:N,wrapped:!0}),_=T[D]}}else u.push({text:d[v],wrapped:!1})}return u},C.prototype.removeGhostText=function(){if(this.$ghostText){var S=this.$ghostText.position;this.removeExtraToken(S.row,S.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},C.prototype.addToken=function(S,R,y,w){var d=this.session;d.bgTokenizer.lines[y]=null;var u={type:R,value:S},v=d.getTokens(y);if(w==null||!v.length)v.push(u);else for(var L=0,T=0;T<v.length;T++){var _=v[T];if(L+=_.value.length,w<=L){var D=_.value.length-(L-w),N=_.value.slice(0,D),V=_.value.slice(D);v.splice(T,1,{type:_.type,value:N},u,{type:_.type,value:V});break}}this.updateLines(y,y)},C.prototype.hideTokensAfterPosition=function(S,R){for(var y=this.session.getTokens(S),w=0,d=!1,u=[],v=0;v<y.length;v++){var L=y[v];if(w+=L.value.length,L.type!=="ghost_text"){if(d){u.push({type:L.type,value:L.value}),L.type="hidden_token";continue}w===R&&(d=!0)}}return this.updateLines(S,S),u},C.prototype.removeExtraToken=function(S,R){this.session.bgTokenizer.lines[S]=null,this.updateLines(S,S)},C.prototype.setTheme=function(S,R){var y=this;if(this.$themeId=S,y._dispatchEvent("themeChange",{theme:S}),!S||typeof S=="string"){var w=S||this.$options.theme.initialValue;a.loadModule(["theme",w],d)}else d(S);function d(u){if(y.$themeId!=S)return R&&R();if(!u||!u.cssClass)throw new Error("couldn't load module "+S+" or it didn't call define");u.$id&&(y.$themeId=u.$id),A.importCssString(u.cssText,u.cssClass,y.container),y.theme&&A.removeCssClass(y.container,y.theme.cssClass);var v="padding"in u?u.padding:"padding"in(y.theme||{})?4:y.$padding;if(y.$padding&&v!=y.$padding&&y.setPadding(v),y.$gutterLayer){var L=u.$showGutterCursorMarker;L&&!y.$gutterLayer.$showCursorMarker?y.$gutterLayer.$showCursorMarker="theme":!L&&y.$gutterLayer.$showCursorMarker=="theme"&&(y.$gutterLayer.$showCursorMarker=null)}y.$theme=u.cssClass,y.theme=u,A.addCssClass(y.container,u.cssClass),A.setCssClass(y.container,"ace_dark",u.isDark),y.$size&&(y.$size.width=0,y.$updateSizeAsync()),y._dispatchEvent("themeLoaded",{theme:u}),R&&R(),f.isSafari&&y.scroller&&(y.scroller.style.background="red",y.scroller.style.background="")}},C.prototype.getTheme=function(){return this.$themeId},C.prototype.setStyle=function(S,R){A.setCssClass(this.container,S,R!==!1)},C.prototype.unsetStyle=function(S){A.removeCssClass(this.container,S)},C.prototype.setCursorStyle=function(S){A.setStyle(this.scroller.style,"cursor",S)},C.prototype.setMouseCursor=function(S){A.setStyle(this.scroller.style,"cursor",S)},C.prototype.attachToShadowRoot=function(){A.importCssString(p,"ace_editor.css",this.container)},C.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$curs
944orLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},C.prototype.$updateCustomScrollbar=function(S){var R=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),S===!0?(this.scrollBarV=new s(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(y){R.$scrollAnimation||R.session.setScrollTop(y.data-R.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(y){R.$scrollAnimation||R.session.setScrollLeft(y.data-R.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new g(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new e(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.addEventListener("scroll",function(y){R.$scrollAnimation||R.session.setScrollTop(y.data-R.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(y){R.$scrollAnimation||R.session.setScrollLeft(y.data-R.scrollMargin.left)}))},C.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var S=this;this.$resizeTimer=$.delayedCall(function(){S.destroyed||S.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(R){var y=R[0].contentRect.width,w=R[0].contentRect.height;Math.abs(S.$size.width-y)>1||Math.abs(S.$size.height-w)>1?S.$resizeTimer.delay():S.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},C})();M.prototype.CHANGE_CURSOR=1,M.prototype.CHANGE_MARKER=2,M.prototype.CHANGE_GUTTER=4,M.prototype.CHANGE_SCROLL=8,M.prototype.CHANGE_LINES=16,M.prototype.CHANGE_TEXT=32,M.prototype.CHANGE_SIZE=64,M.prototype.CHANGE_MARKER_BACK=128,M.prototype.CHANGE_MARKER_FRONT=256,M.prototype.CHANGE_FULL=512,M.prototype.CHANGE_H_SCROLL=1024,M.prototype.$changes=0,M.prototype.$padding=null,M.prototype.$frozen=!1,M.prototype.STEPS=8,x.implement(M.prototype,m),a.defineOptions(M.prototype,"renderer",{useResizeObserver:{set:function(C){!C&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):C&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(C){this.$textLayer.setShowInvisibles(C)&&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(C){typeof C=="number"&&(this.$printMarginColumn=C),this.$showPrintMargin=!!C,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(C){this.$gutter.style.display=C?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(C){this.$gutterLayer.$useSvgGutterIcons=C},initialValue:!1},showFoldedAnnotations:{set:function(C){this.$gutterLayer.$showFoldedAnnotations=C},initialValue:!1},fadeFoldWidgets:{set:function(C){A.setCssClass(this.$gutter,"ace_fade-fold-widgets",C)},initialValue:!1},showFoldWidgets:{set:function(C){this.$gutterLayer.setShowFoldWidgets(C),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(C){this.$textLayer.setDisplayIndentGuides(C)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(C){this.$textLayer.setHighlightIndentGuides(C)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(C){this.$gutterLayer.setHighlightGutterLine(C),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(C){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(C){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(C){typeof C=="number"&&(C=C+"px"),this.container.style.fontSize=C,this.updateFontSize()},initialValue:12},fontFamily:{set:function(C){this.container.style.fontFamily=C,this.updateFontSize()}},maxLines:{set:function(C){this.updateFull()}},minLines:{set:function(C){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(C){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(C){C=+C||0,this.$scrollPastEnd!=C&&(this.$scrollPastEnd=C,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(C){this.$gutterLayer.$fixedWidth=!!C,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(C){this.$updateCustomScrollbar(C)},initialValue:!1},theme:{set:function(C){this.setTheme(C)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!f.isMobile&&!f.isIE}}),k.VirtualRenderer=M}
944),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(E,k,H){var x=E("../lib/oop"),A=E("../lib/net"),$=E("../lib/event_emitter").EventEmitter,a=E("../config");function l(t){var e="importScripts('"+A.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch{var i=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,s=new i;return s.append(e),s.getBlob("application/javascript")}}function r(t){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var e=l(t),i=window.URL||window.webkitURL,s=i.createObjectURL(e);return new Worker(s)}return new Worker(t)}var o=function(t){t.postMessage||(t=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=t,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){x.implement(this,$),this.$createWorkerFromOldConfig=function(t,e,i,s,h){if(E.nameToUrl&&!E.toUrl&&(E.toUrl=E.nameToUrl),a.get("packaged")||!E.toUrl)s=s||a.moduleUrl(e,"worker");else{var c=this.$normalizePath;s=s||c(E.toUrl("ace/worker/worker.js",null,"_"));var m={};t.forEach(function(p){m[p]=c(E.toUrl(p,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=r(s),h&&this.send("importScripts",h),this.$worker.postMessage({init:!0,tlns:m,module:e,classname:i}),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 i=this.callbacks[e.id];i&&(i(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 A.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,i){if(i){var s=this.callbackId++;this.callbacks[s]=i,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{}},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(o.prototype);var n=function(t,e,i){var s=null,h=!1,c=Object.create($),m=[],p=new o({messageBuffer:m,terminate:function(){},postMessage:function(f){m.push(f),s&&(h?setTimeout(g):g())}});p.setEmitSync=function(f){h=f};var g=function(){var f=m.shift();f.command?s[f.command].apply(s,f.args):f.event&&c._signal(f.event,f.data)};return c.postMessage=function(f){p.onMessage({data:f})},c.callback=function(f,b){this.postMessage({type:"call",id:b,data:f})},c.emit=function(f,b){this.postMessage({type:"event",name:f,data:b})},a.loadModule(["worker",e],function(f){for(s=new f[i](c);m.length;)g()}),p};k.UIWorkerClient=n,k.WorkerClient=o,k.createWorker=r}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(E,k,H){var x=E("./range").Range,A=E("./lib/event_emitter").EventEmitter,$=E("./lib/oop"),a=(function(){function l(r,o,n,t,e,i){var s=this;this.length=o,this.session=r,this.doc=r.getDocument(),this.mainClass=e,this.othersClass=i,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 l.prototype.setup=function(){var r=this,o=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=o.createAnchor(this.$pos.row,this.$pos.column);var t=this.pos;t.$insertRight=!0,t.detach(),t.markerId=n.addMarker(new x(t.row,t.column,t.row,t.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEac
944h(function(e){var i=o.createAnchor(e.row,e.column);i.$insertRight=!0,i.detach(),r.others.push(i)}),n.setUndoSelect(!1)},l.prototype.showOtherMarkers=function(){if(!this.othersActive){var r=this.session,o=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=r.addMarker(new x(n.row,n.column,n.row,n.column+o.length),o.othersClass,null,!1)})}},l.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var r=0;r<this.others.length;r++)this.session.removeMarker(this.others[r].markerId)}},l.prototype.onUpdate=function(r){if(this.$updating)return this.updateAnchors(r);var o=r;if(o.start.row===o.end.row&&o.start.row===this.pos.row){this.$updating=!0;var n=r.action==="insert"?o.end.column-o.start.column:o.start.column-o.end.column,t=o.start.column>=this.pos.column&&o.start.column<=this.pos.column+this.length+1,e=o.start.column-this.pos.column;if(this.updateAnchors(r),t&&(this.length+=n),t&&!this.session.$fromUndo){if(r.action==="insert")for(var i=this.others.length-1;i>=0;i--){var s=this.others[i],h={row:s.row,column:s.column+e};this.doc.insertMergedLines(h,r.lines)}else if(r.action==="remove")for(var i=this.others.length-1;i>=0;i--){var s=this.others[i],h={row:s.row,column:s.column+e};this.doc.remove(new x(h.row,h.column,h.row,h.column-n))}}this.$updating=!1,this.updateMarkers()}},l.prototype.updateAnchors=function(r){this.pos.onChange(r);for(var o=this.others.length;o--;)this.others[o].onChange(r);this.updateMarkers()},l.prototype.updateMarkers=function(){if(!this.$updating){var r=this,o=this.session,n=function(e,i){o.removeMarker(e.markerId),e.markerId=o.addMarker(new x(e.row,e.column,e.row,e.column+r.length),i,null,!1)};n(this.pos,this.mainClass);for(var t=this.others.length;t--;)n(this.others[t],this.othersClass)}},l.prototype.onCursorChange=function(r){if(!(this.$updating||!this.session)){var o=this.session.selection.getCursor();o.row===this.pos.row&&o.column>=this.pos.column&&o.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",r)):(this.hideOtherMarkers(),this._emit("cursorLeave",r))}},l.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},l.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var r=this.session.getUndoManager(),o=(r.$undoStack||r.$undostack).length-this.$undoStackDepth,n=0;n<o;n++)r.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},l})();$.implement(a.prototype,A),k.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(E,k,H){var x=E("../lib/event"),A=E("../lib/useragent");function $(l,r){return l.row==r.row&&l.column==r.column}function a(l){var r=l.domEvent,o=r.altKey,n=r.shiftKey,t=r.ctrlKey,e=l.getAccelKey(),i=l.getButton();if(t&&A.isMac&&(i=r.button),l.editor.inMultiSelectMode&&i==2){l.editor.textInput.onContextMenu(l.domEvent);return}if(!t&&!o&&!e){i===0&&l.editor.inMultiSelectMode&&l.editor.exitMultiSelectMode();return}if(i===0){var s=l.editor,h=s.selection,c=s.inMultiSelectMode,m=l.getDocumentPosition(),p=h.getCursor(),g=l.inSelection()||h.isEmpty()&&$(m,p),f=l.x,b=l.y,M=function(N){f=N.clientX,b=N.clientY},C=s.session,S=s.renderer.pixelToScreenCoordinates(f,b),R=S,y;if(s.$mouseHandler.$enableJumpToDef)t&&o||e&&o?y=n?"block":"add":o&&s.$blockSelectEnabled&&(y="block");else if(e&&!o){if(y="add",!c&&n)return}else o&&s.$blockSelectEnabled&&(y="block");if(y&&A.isMac&&r.ctrlKey&&s.$mouseHandler.cancelContextMenu(),y=="add"){if(!c&&g)return;if(!c){var w=h.toOrientedRange();s.addSelectionMarker(w)}var d=h.rangeList.rangeAtPoint(m);s.inVirtualSelectionMode=!0,n&&(d=null,w=h.ranges[0]||w,s.removeSelectionMarker(w)),s.once("mouseup",function(){var N=h.toOrientedRange();d&&N.isEmpty()&&$(d.cursor,N.cursor)?h.substractPoint(N.cursor):(n?h.substractPoint(w.cursor):w&&(s.removeSelectionMarker(w),h.addRange(w)),h.addRange(N)),s.inVirtualSelectionMode=!1})}else if(y=="block"){l.stop(),s.inVirtualSelectionMode=!0;var u,v=[],L=function(){var N=s.renderer.pixelToScreenCoordinates(f,b),V=C.screenToDocumentPosition(N.row,N.column,N.offsetX);
944$(R,N)&&$(V,h.lead)||(R=N,s.selection.moveToPosition(V),s.renderer.scrollCursorIntoView(),s.removeSelectionMarkers(v),v=h.rectangularRangeBlock(R,S),s.$mouseHandler.$clickSelection&&v.length==1&&v[0].isEmpty()&&(v[0]=s.$mouseHandler.$clickSelection.clone()),v.forEach(s.addSelectionMarker,s),s.updateSelectionMarkers())};c&&!e?h.toSingleRange():!c&&e&&(u=h.toOrientedRange(),s.addSelectionMarker(u)),n?S=C.documentToScreenPosition(h.lead):h.moveToPosition(m),R={row:-1,column:-1};var T=function(N){L(),clearInterval(D),s.removeSelectionMarkers(v),v.length||(v=[h.toOrientedRange()]),u&&(s.removeSelectionMarker(u),h.toSingleRange(u));for(var V=0;V<v.length;V++)h.addRange(v[V]);s.inVirtualSelectionMode=!1,s.$mouseHandler.$clickSelection=null},_=L;x.capture(s.container,M,T);var D=setInterval(function(){_()},20);return l.preventDefault()}}}k.onMouseDown=a}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(E,k,H){k.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(A){A.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(A){A.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(A){A.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(A){A.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(A){A.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(A){A.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(A){A.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(A){A.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(A){A.multiSelect.rangeCount>1?A.multiSelect.joinSelections():A.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(A){A.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(A){A.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(A){A.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(A){A.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(A){return A&&A.inMultiSelectMode}}];var x=E("../keyboard/hash_handler").HashHandler;k.keyboardHandler=new x(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(E,k,H){var x=E("./range_list").RangeList,A=E("./range").Range,$=E("./selection").Selection,a=E("./mouse/multi_select_handler").onMouseDown,l=E("./lib/event"),r=E("./lib/lang"),o=E("./commands/multi_select_commands");k.commands=o.defaultCommands.concat(o.multiSelectCommands);var n=E("./search").Search,t=new n;function e(p,g,f){return t.$options.wrap=!0,t.$options.needle=g,t.$options.backwards=f==-1,t.find(p)}var i=E("./edit_session").EditSession;
944(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(i.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(p,g){if(p){if(!this.inMultiSelectMode&&this.rangeCount===0){var f=this.toOrientedRange();if(this.rangeList.add(f),this.rangeList.add(p),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),g||this.fromOrientedRange(p);this.rangeList.removeAll(),this.rangeList.add(f),this.$onAddRange(f)}p.cursor||(p.cursor=p.end);var b=this.rangeList.add(p);return this.$onAddRange(p),b.length&&this.$onRemoveRange(b),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),g||this.fromOrientedRange(p)}},this.toSingleRange=function(p){p=p||this.ranges[0];var g=this.rangeList.removeAll();g.length&&this.$onRemoveRange(g),p&&this.fromOrientedRange(p)},this.substractPoint=function(p){var g=this.rangeList.substractPoint(p);if(g)return this.$onRemoveRange(g),g[0]},this.mergeOverlappingRanges=function(){var p=this.rangeList.merge();p.length&&this.$onRemoveRange(p)},this.$onAddRange=function(p){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(p),this._signal("addRange",{range:p})},this.$onRemoveRange=function(p){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var g=this.rangeList.ranges.pop();p.push(g),this.rangeCount=0}for(var f=p.length;f--;){var b=this.ranges.indexOf(p[f]);this.ranges.splice(b,1)}this._signal("removeRange",{ranges:p}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),g=g||this.ranges[0],g&&!g.isEqual(this.getRange())&&this.fromOrientedRange(g)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new x,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var p=this.ranges.length?this.ranges:[this.getRange()],g=[],f=0;f<p.length;f++){var b=p[f],M=b.start.row,C=b.end.row;if(M===C)g.push(b.clone());else{for(g.push(new A(M,b.start.column,M,this.session.getLine(M).length));++M<C;)g.push(this.getLineRange(M,!0));g.push(new A(C,0,C,b.end.column))}f==0&&!this.isBackwards()&&(g=g.reverse())}this.toSingleRange();for(var f=g.length;f--;)this.addRange(g[f])},this.joinSelections=function(){var p=this.rangeList.ranges,g=p[p.length-1],f=A.fromPoints(p[0].start,g.end);this.toSingleRange(),this.setSelectionRange(f,g.cursor==g.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var p=this.rangeList.ranges,g=p[p.length-1],f=A.fromPoints(p[0].start,g.end);this.toSingleRange(),this.setSelectionRange(f,g.cursor==g.start)}else{var b=this.session.documentToScreenPosition(this.cursor),M=this.session.documentToScreenPosition(this.anchor),C=this.rectangularRangeBlock(b,M);C.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(p,g,f){var b=[],M=p.column<g.column;if(M)var C=p.column,S=g.column,R=p.offsetX,y=g.offsetX;else var C=g.column,S=p.column,R=g.offsetX,y=p.offsetX;var w=p.row<g.row;if(w)var d=p.row,u=g.row;else var d=g.row,u=p.row;C<0&&(C=0),d<0&&(d=0),d==u&&(f=!0);for(var v,L=d;L<=u;L++){var T=A.fromPoints(this.session.screenToDocumentPosition(L,C,R),this.session.screenToDocumentPosition(L,S,y));if(T.isEmpty()){if(v&&h(T.end,v))break;v=T.end}T.cursor=M?T.start:T.end,b.push(T)}if(w&&b.reverse(),!f){for(var _=b.length-1;b[_].isEmpty()&&_>0;)_--;if(_>0)for(var D=0;b[D].isEmpty();)D++;for(var N=_;N>=D;N--)b[N].isEmpty()&&b.splice(N,1)}return b}}).call($.prototype);var s=E("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(p){p.cursor||(p.cursor=p.end);var g=this.getSelectionStyle();return p.marker=this.session.addMarker(p,"ace_selection",g),this.session.$selectionMarkers.push(p),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,p},this.removeSelectionMarker=function(p){if(p.marker){this.session.removeMarker(p.marker);var g=this.session.$selectionMarkers.indexOf(p);g!=-1&&this.session.$selectionMarkers.splice(g,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(p){for(var g=this.session.$selectionMarkers,f=p.length;f--;){var b=p[f];if(b.marker){this.session.removeMarker(b.marker);var M=g.indexOf(b);M!=-1&&g.splice(M,1)}}this.session.selectionMarkerCount=g.length},this.$onAddRange=function(p){this.addSelectionMarker(p.range),this.renderer.updateCursor(
944),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(p){this.removeSelectionMarkers(p.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(p){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(o.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(p){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(o.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(p){var g=p.command,f=p.editor;if(f.multiSelect){if(g.multiSelectAction)g.multiSelectAction=="forEach"?b=f.forEachSelection(g,p.args):g.multiSelectAction=="forEachLine"?b=f.forEachSelection(g,p.args,!0):g.multiSelectAction=="single"?(f.exitMultiSelectMode(),b=g.exec(f,p.args||{})):b=g.multiSelectAction(f,p.args||{});else{var b=g.exec(f,p.args||{});f.multiSelect.addRange(f.multiSelect.toOrientedRange()),f.multiSelect.mergeOverlappingRanges()}return b}},this.forEachSelection=function(p,g,f){if(!this.inVirtualSelectionMode){var b=f&&f.keepOrder,M=f==!0||f&&f.$byLines,C=this.session,S=this.selection,R=S.rangeList,y=(b?S:R).ranges,w;if(!y.length)return p.exec?p.exec(this,g||{}):p(this,g||{});var d=S._eventRegistry;S._eventRegistry={};var u=new $(C);this.inVirtualSelectionMode=!0;for(var v=y.length;v--;){if(M)for(;v>0&&y[v].start.row==y[v-1].end.row;)v--;u.fromOrientedRange(y[v]),u.index=v,this.selection=C.selection=u;var L=p.exec?p.exec(this,g||{}):p(this,g||{});!w&&L!==void 0&&(w=L),u.toOrientedRange(y[v])}u.detach(),this.selection=C.selection=S,this.inVirtualSelectionMode=!1,S._eventRegistry=d,S.mergeOverlappingRanges(),S.ranges[0]&&S.fromOrientedRange(S.ranges[0]);var T=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),T&&T.from==T.to&&this.renderer.animateScrolling(T.from),w}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var p="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var g=this.multiSelect.rangeList.ranges,f=[],b=0;b<g.length;b++)f.push(this.session.getTextRange(g[b]));var M=this.session.getDocument().getNewLineCharacter();p=f.join(M),p.length==(f.length-1)*M.length&&(p="")}else this.selection.isEmpty()||(p=this.session.getTextRange(this.getSelectionRange()));return p},this.$checkMultiselectChange=function(p,g){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var f=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&g==this.multiSelect.anchor)return;var b=g==this.multiSelect.anchor?f.cursor==f.start?f.end:f.start:f.cursor;b.row!=g.row||this.session.$clipPositionToDocument(b.row,b.column).column!=g.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(p,g,f){if(g=g||{},g.needle=p||g.needle,g.needle==null){var b=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();g.needle=this.session.getTextRange(b)}this.$search.set(g);var M=this.$search.findAll(this.session);if(!M.length)return 0;var C=this.multiSelect;f||C.toSingleRange(M[0]);for(var S=M.length;S--;)C.addRange(M[S],!0);return b&&C.rangeList.rangeAtPoint(b.start)&&C.addRange(b,!0),M.length},this.selectMoreLines=function(p,g){var f=this.selection.toOrientedRange(),b=f.cursor==f.end,M=this.session.documentToScreenPosition(f.cursor);this.selection.$desiredColumn&&(M.column=this.selection.$desiredColumn);var C=this.session.screenToDocumentPosition(M.row+p,M.column);if(f.isEmpty())var R=C;else var S=this.session.documentToScreenPosition(b?f.end:f.start),R=this.session.screenToDocumentPosition(S.row+p,S.column);if(b){var y=A.fromPoints(C,R);y.cursor=y.start}else{var y=A.fromPoints(R,C);y.cursor=y.end}if(y.desiredColumn=M.column,!this.selection.inMultiSelectMode)this.selection.addRange(f);else if(g)var w=f.cursor;this.selection.addRange(y),w&&this.selection.substractPoint(w)},this.transposeSelections=function(p){for(var g=this.session,f=g.multiSelect,b=f.ranges,M=b.length;M--;
944){var C=b[M];if(C.isEmpty()){var S=g.getWordRange(C.start.row,C.start.column);C.start.row=S.start.row,C.start.column=S.start.column,C.end.row=S.end.row,C.end.column=S.end.column}}f.mergeOverlappingRanges();for(var R=[],M=b.length;M--;){var C=b[M];R.unshift(g.getTextRange(C))}p<0?R.unshift(R.pop()):R.push(R.shift());for(var M=b.length;M--;){var C=b[M],y=C.clone();g.replace(C,R[M]),C.start.row=y.start.row,C.start.column=y.start.column}f.fromOrientedRange(f.ranges[0])},this.selectMore=function(p,g,f){var b=this.session,M=b.multiSelect,C=M.toOrientedRange();if(!(C.isEmpty()&&(C=b.getWordRange(C.start.row,C.start.column),C.cursor=p==-1?C.start:C.end,this.multiSelect.addRange(C),f))){var S=b.getTextRange(C),R=e(b,S,p);R&&(R.cursor=p==-1?R.start:R.end,this.session.unfold(R),this.multiSelect.addRange(R),this.renderer.scrollCursorIntoView(null,.5)),g&&this.multiSelect.substractPoint(C.cursor)}},this.alignCursors=function(){var p=this.session,g=p.multiSelect,f=g.ranges,b=-1,M=f.filter(function(_){if(_.cursor.row==b)return!0;b=_.cursor.row});if(!f.length||M.length==f.length-1){var C=this.selection.getRange(),S=C.start.row,R=C.end.row,y=S==R;if(y){var w=this.session.getLength(),d;do d=this.session.getLine(R);while(/[=:]/.test(d)&&++R<w);do d=this.session.getLine(S);while(/[=:]/.test(d)&&--S>0);S<0&&(S=0),R>=w&&(R=w-1)}var u=this.session.removeFullLines(S,R);u=this.$reAlignText(u,y),this.session.insert({row:S,column:0},u.join(` 945`)+` 946`),y||(C.start.column=0,C.end.column=u[u.length-1].length),this.selection.setRange(C)}else{M.forEach(function(_){g.substractPoint(_.cursor)});var v=0,L=1/0,T=f.map(function(_){var D=_.cursor,N=p.getLine(D.row),V=N.substr(D.column).search(/\S/g);return V==-1&&(V=0),D.column>v&&(v=D.column),V<L&&(L=V),V});f.forEach(function(_,D){var N=_.cursor,V=v-N.column,F=T[D]-L;V>F?p.insert(N,r.stringRepeat(" ",V-F)):p.remove(new A(N.row,N.column,N.row,N.column-V+F)),_.start.column=_.end.column=v,_.start.row=_.end.row=N.row,_.cursor=_.end}),g.fromOrientedRange(f[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(p,g){var f=!0,b=!0,M,C,S;return p.map(function(u){var v=u.match(/(\s*)(.*?)(\s*)([=:].*)/);return v?M==null?(M=v[1].length,C=v[2].length,S=v[3].length,v):(M+C+S!=v[1].length+v[2].length+v[3].length&&(b=!1),M!=v[1].length&&(f=!1),M>v[1].length&&(M=v[1].length),C<v[2].length&&(C=v[2].length),S>v[3].length&&(S=v[3].length),v):[u]}).map(g?y:f?b?w:y:d);function R(u){return r.stringRepeat(" ",u)}function y(u){return u[2]?R(M)+u[2]+R(C-u[2].length+S)+u[4].replace(/^([=:])\s+/,"$1 "):u[0]}function w(u){return u[2]?R(M+C-u[2].length)+u[2]+R(S)+u[4].replace(/^([=:])\s+/,"$1 "):u[0]}function d(u){return u[2]?R(M)+u[2]+R(S)+u[4].replace(/^([=:])\s+/,"$1 "):u[0]}}}).call(s.prototype);function h(p,g){return p.row==g.row&&p.column==g.column}k.onSessionChange=function(p){var g=p.session;g&&!g.multiSelect&&(g.$selectionMarkers=[],g.selection.$initRangeList(),g.multiSelect=g.selection),this.multiSelect=g&&g.multiSelect;var f=p.oldSession;f&&(f.multiSelect.off("addRange",this.$onAddRange),f.multiSelect.off("removeRange",this.$onRemoveRange),f.multiSelect.off("multiSelect",this.$onMultiSelect),f.multiSelect.off("singleSelect",this.$onSingleSelect),f.multiSelect.lead.off("change",this.$checkMultiselectChange),f.multiSelect.anchor.off("change",this.$checkMultiselectChange)),g&&(g.multiSelect.on("addRange",this.$onAddRange),g.multiSelect.on("removeRange",this.$onRemoveRange),g.multiSelect.on("multiSelect",this.$onMultiSelect),g.multiSelect.on("singleSelect",this.$onSingleSelect),g.multiSelect.lead.on("change",this.$checkMultiselectChange),g.multiSelect.anchor.on("change",this.$checkMultiselectChange)),g&&this.inMultiSelectMode!=g.selection.inMultiSelectMode&&(g.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function c(p){p.$multiselectOnSessionChange||(p.$onAddRange=p.$onAddRange.bind(p),p.$onRemoveRange=p.$onRemoveRange.bind(p),p.$onMultiSelect=p.$onMultiSelect.bind(p),p.$onSingleSelect=p.$onSingleSelect.bind(p),p.$multiselectOnSessionChange=k.onSessionChange.bind(p),p.$checkMultiselectChange=p.$checkMultiselectChange.bind(p),p.$multiselectOnSessionChange(p),p.on("changeSession",p.$multiselectOnSessionChange),p.on("mousedown",a),p.commands.addCommands(o.defaultCommands),m(p))}function m(p){if(!p.textInput)return;var g=p.textInput.getElement(),f=!1;l.addListener(g,"keydown",function(M){var C=M.keyCode==18&&!(M.ctrlKey||M.shiftKey||M.metaKey);p.$blockSelectEnabled&&C?f||(p.renderer.setMouseCursor("crosshair"),f=!0):f&&b()},p),l.addListener(g,"keyup",b,p),l.addListener(g,"blur",b,p);function b(M){f&&(p.renderer.setMouseCursor(""),f=!1)}}k.MultiSelect=c,E("./config").defineOptions(s.prototype,"editor",{enableMultiselect:{set:function(p){c(this),p?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(p){this.$blockSelectEnabled=p},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(E,k,H){var x=E("../../range").Range,A=k.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function($,a,l){var r=$.getLine(l);return this.foldingStartMarker.test(r)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function($,a,l){return null},this.indentationBlock=function($,a,l){var r=/\S/,o=$.getLine(a),n=o.search(r);if(n!=-1){for(var t=l||o.length,e=$.getLength(),i=a,s=a;++a<e;){var h=$.getLine(a).search(r);if(h!=-1){if(h<=n){var c=$.getTokenAt(a,0);if(!c||c.type!=="string")break}s=a}}if(s>i){var m=$.getLine(s).length;return new x(i,t,s,m)}}},this.openingBracketBlock=function($,a,l,r,o){var n={row:l,column:r+1},t=$.$findClosingBracket(a,n,o);if(t){var e=$.foldWidgets[t.row];return e==null&&(e=$.getFoldWidget(t.row)),e=="start"&&t.row>n.row&&(t.row--,t.column=$.getLine(t.row).length),x.fromPoints(n,t)}},this.closingBracketBlock=function($,a,l,r,o){var n={row:l,column:r},t=$.$findOpeningBracket(a,n);if(t)return t.column++,n.column--,x.fromPoints(t,n)}}).call(A.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(E,k,H){var x=E("../lib/dom"),A=E("../range").Range,$=E("../config").nls;function a(r,o,n){for(var t=0,e=r.length-1;t<=e;){var i=t+e>>1,s=n(o,r[i]);if(s>0)t=i+1;else if(s<0)e=i-1;else return i}return-(t+1)}function l(r,o,n){var t=r.getAnnotations().sort(A.comparePoints);if(t.length){var e=a(t,{row:o,column:-1},A.comparePoints);e<0&&(e=-e-1),e>=t.length?e=n>0?0:t.length-1:e===0&&n<0&&(e=t.length-1);var i=t[e];
946if(!(!i||!n)){if(i.row===o){do i=t[e+=n];while(i&&i.row===o);if(!i)return t.slice()}var s=[];o=i.row;do s[n<0?"unshift":"push"](i),i=t[e+=n];while(i&&i.row==o);return s.length&&s}}}k.showErrorMarker=function(r,o){var n=r.session,t=r.getCursorPosition(),e=t.row,i=n.widgetManager.getWidgetsAtRow(e).filter(function(M){return M.type=="errorMarker"})[0];i?i.destroy():e-=o;var s=l(n,e,o),h;if(s){var c=s[0];t.column=(c.pos&&typeof c.column!="number"?c.pos.sc:c.column)||0,t.row=c.row,h=r.renderer.$gutterLayer.$annotations[t.row]}else{if(i)return;h={displayText:[$("error-marker.good-state","Looks good!")],className:"ace_ok"}}r.session.unfold(t.row),r.selection.moveToPosition(t);var m={row:t.row,fixedWidth:!0,coverGutter:!0,el:x.createElement("div"),type:"errorMarker"},p=m.el.appendChild(x.createElement("div")),g=m.el.appendChild(x.createElement("div"));g.className="error_widget_arrow "+h.className;var f=r.renderer.$cursorLayer.getPixelPosition(t).left;g.style.left=f+r.renderer.gutterWidth-5+"px",m.el.className="error_widget_wrapper",p.className="error_widget "+h.className,h.displayText.forEach(function(M,C){p.appendChild(x.createTextNode(M)),C<h.displayText.length-1&&p.appendChild(x.createElement("br"))}),p.appendChild(x.createElement("div"));
946var b=function(M,C,S){if(C===0&&(S==="esc"||S==="return"))return m.destroy(),{command:"null"}};m.destroy=function(){r.$mouseHandler.isMousePressed||(r.keyBinding.removeKeyboardHandler(b),n.widgetManager.removeLineWidget(m),r.off("changeSelection",m.destroy),r.off("changeSession",m.destroy),r.off("mouseup",m.destroy),r.off("change",m.destroy))},r.keyBinding.addKeyboardHandler(b),r.on("changeSelection",m.destroy),r.on("changeSession",m.destroy),r.on("mouseup",m.destroy),r.on("change",m.destroy),r.session.widgetManager.addLineWidget(m),m.el.onmousedown=r.focus.bind(r),r.renderer.scrollCursorIntoView(null,.5,{bottom:m.el.offsetHeight})},x.importCssString(` 947 .error_widget_wrapper { 948 background: inherit; 949 color: inherit; 950 border:none 951 } 952 .error_widget { 953 border-top: solid 2px; 954 border-bottom: solid 2px; 955 margin: 5px 0; 956 padding: 10px 40px; 957 white-space: pre-wrap; 958 } 959 .error_widget.ace_error, .error_widget_arrow.ace_error{ 960 border-color: #ff5a5a 961 } 962 .error_widget.ace_warning, .error_widget_arrow.ace_warning{ 963 border-color: #F1D817 964 } 965 .error_widget.ace_info, .error_widget_arrow.ace_info{ 966 border-color: #5a5a5a 967 } 968 .error_widget.ace_ok, .error_widget_arrow.ace_ok{ 969 border-color: #5aaa5a 970 } 971 .error_widget_arrow { 972 position: absolute; 973 border: solid 5px; 974 border-top-color: transparent!important; 975 border-right-color: transparent!important; 976 border-left-color: transparent!important; 977 top: -5px; 978 } 979`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(E,k,H){E("./loader_build")(k);var x=E("./lib/dom"),A=E("./range").Range,$=E("./editor").Editor,a=E("./edit_session").EditSession,l=E("./undomanager").UndoManager,r=E("./virtual_renderer").VirtualRenderer;E("./worker/worker_client"),E("./keyboard/hash_handler"),E("./placeholder"),E("./multi_select"),E("./mode/folding/fold_mode"),E("./theme/textmate"),E("./ext/error_marker"),k.config=E("./config"),k.edit=function(n,t){if(typeof n=="string"){var e=n;if(n=document.getElementById(e),!n)throw new Error("ace.edit can't find div #"+e)}if(n&&n.env&&n.env.editor instanceof $)return n.env.editor;var i="";if(n&&/input|textarea/i.test(n.tagName)){var s=n;i=s.value,n=x.createElement("pre"),s.parentNode.replaceChild(n,s)}else n&&(i=n.textContent,n.innerHTML="");var h=k.createEditSession(i),c=new $(new r(n),h,t),m={document:h,editor:c,onResize:c.resize.bind(c,null)};return s&&(m.textarea=s),c.on("destroy",function(){m.editor.container.env=null}),c.container.env=c.env=m,c},k.createEditSession=function(n,t){var e=new a(n,t);return e.setUndoManager(new l),e},k.Range=A,k.Editor=$,k.EditSession=a,k.UndoManager=l,k.VirtualRenderer=r;var o=k.config.version;k.version=o}),(function(){ace.require(["ace/ace"],function(E){E&&(E.config.init(!0),E.define=ace.define);var k=(function(){return this})();!k&&typeof window<"u"&&(k=window),!k&&typeof self<"u"&&(k=self),k.ace||(k.ace=E);for(var H in E)E.hasOwnProperty(H)&&(k.ace[H]=E[H]);k.ace.default=k.ace,I&&(I.exports=k.ace)})})()})(Se)),Se.exports}var wt=yt();const pe=qe(wt);var Ge=(function(){if(typeof Map<"u")return Map;function I(O,E){var k=-1;return O.some(function(H,x){return H[0]===E?(k=x,!0):!1}),k}return(function(){function O(){this.__entries__=[]}return Object.defineProperty(O.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),O.prototype.get=function(E){var k=I(this.__entries__,E),H=this.__entries__[k];return H&&H[1]},O.prototype.set=function(E,k){var H=I(this.__entries__,E);~H?this.__entries__[H][1]=k:this.__entries__.push([E,k])},O.prototype.delete=function(E){var k=this.__entries__,H=I(k,E);~H&&k.splice(H,1)},O.prototype.has=function(E){return!!~I(this.__entries__,E)},O.prototype.clear=function(){this.__entries__.splice(0)},O.prototype.forEach=function(E,k){k===void 0&&(k=null);for(var H=0,x=this.__entries__;H<x.length;H++){var A=x[H];E.call(k,A[1],A[0])}},O})()})(),Ae=typeof window<"u"&&typeof document<"u"&&window.document===document,ye=(function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()})(),bt=(function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(ye):function(I){return setTimeout(function(){return I(Date.now())},1e3/60)}})(),$t=2;function Ct(I,O){var E=!1,k=!1,H=0;function x(){E&&(E=!1,I()),k&&$()}function A(){bt(x)}function $(){var a=Date.now();if(E){if(a-H<$t)return;k=!0}else E=!0,k=!1,setTimeout(A,O);H=a}return $}var St=20,At=["top","right","bottom","left","width","height","size","weight"],Mt=typeof MutationObserver<"u",Lt=(function(){function I(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Ct(this.refresh.bind(this),St)}return I.prototype.addObserver=function(O){~this.observers_.indexOf(O)||this.observers_.push(O),this.connected_||this.connect_()},I.prototype.removeObserver=function(O){var E=this.observers_,k=E.indexOf(O);~k&&E.splice(k,1),!E.length&&this.connected_&&this.disconnect_()},I.prototype.refresh=function(){var O=this.updateObservers_();O&&this.refresh()},I.prototype.updateObservers_=function(){var O=this.observers_.filter(function(E){return E.gatherActive(),E.hasActive()});return O.forEach(function(E){return E.broadcastActive()}),O.length>0},I.prototype.connect_=function(){!Ae||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Mt?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},I.prototype.disconnect_=function(){!Ae||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},I.prototype.onTransitionEnd_=function(O){var E=O.propertyName,k=E===void 0?"":E,H=At.some(function(x){return!!~k.indexOf(x)});H&&this.refresh()},I.getInstance=function(){return this.instance_||(this.instance_=ne
vendor: 4,812 bytes, line 979
979w I),this.instance_},I.instance_=null,I})(),je=(function(I,O){for(var E=0,k=Object.keys(O);E<k.length;E++){var H=k[E];Object.defineProperty(I,H,{value:O[H],enumerable:!1,writable:!1,configurable:!0})}return I}),fe=(function(I){var O=I&&I.ownerDocument&&I.ownerDocument.defaultView;return O||ye}),Ye=Ce(0,0,0,0);function we(I){return parseFloat(I)||0}function xe(I){for(var O=[],E=1;E<arguments.length;E++)O[E-1]=arguments[E];return O.reduce(function(k,H){var x=I["border-"+H+"-width"];return k+we(x)},0)}function kt(I){for(var O=["top","right","bottom","left"],E={},k=0,H=O;k<H.length;k++){var x=H[k],A=I["padding-"+x];E[x]=we(A)}return E}function Et(I){var O=I.getBBox();return Ce(0,0,O.width,O.height)}function xt(I){var O=I.clientWidth,E=I.clientHeight;if(!O&&!E)return Ye;var k=fe(I).getComputedStyle(I),H=kt(k),x=H.left+H.right,A=H.top+H.bottom,$=we(k.width),a=we(k.height);if(k.boxSizing==="border-box"&&(Math.round($+x)!==O&&($-=xe(k,"left","right")+x),Math.round(a+A)!==E&&(a-=xe(k,"top","bottom")+A)),!Rt(I)){var l=Math.round($+x)-O,r=Math.round(a+A)-E;Math.abs(l)!==1&&($-=l),Math.abs(r)!==1&&(a-=r)}return Ce(H.left,H.top,$,a)}var Tt=(function(){return typeof SVGGraphicsElement<"u"?function(I){return I instanceof fe(I).SVGGraphicsElement}:function(I){return I instanceof fe(I).SVGElement&&typeof I.getBBox=="function"}})();function Rt(I){return I===fe(I).document.documentElement}function It(I){return Ae?Tt(I)?Et(I):xt(I):Ye}function _t(I){var O=I.x,E=I.y,k=I.width,H=I.height,x=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,A=Object.create(x.prototype);return je(A,{x:O,y:E,width:k,height:H,top:E,right:O+k,bottom:H+E,left:O}),A}function Ce(I,O,E,k){return{x:I,y:O,width:E,height:k}}var Dt=(function(){function I(O){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Ce(0,0,0,0),this.target=O}return I.prototype.isActive=function(){var O=It(this.target);return this.contentRect_=O,O.width!==this.broadcastWidth||O.height!==this.broadcastHeight},I.prototype.broadcastRect=function(){var O=this.contentRect_;return this.broadcastWidth=O.width,this.broadcastHeight=O.height,O},I})(),Ot=(function(){function I(O,E){var k=_t(E);je(this,{target:O,contentRect:k})}return I})(),Nt=(function(){function I(O,E,k){if(this.activeObservations_=[],this.observations_=new Ge,typeof O!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=O,this.controller_=E,this.callbackCtx_=k}return I.prototype.observe=function(O){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(O instanceof fe(O).Element))throw new TypeError('parameter 1 is not of type "Element".');var E=this.observations_;E.has(O)||(E.set(O,new Dt(O)),this.controller_.addObserver(this),this.controller_.refresh())}},I.prototype.unobserve=function(O){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(O instanceof fe(O).Element))throw new TypeError('parameter 1 is not of type "Element".');var E=this.observations_;E.has(O)&&(E.delete(O),E.size||this.controller_.removeObserver(this))}},I.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},I.prototype.gatherActive=function(){var O=this;this.clearActive(),this.observations_.forEach(function(E){E.isActive()&&O.activeObservations_.push(E)})},I.prototype.broadcastActive=function(){if(this.hasActive()){var O=this.callbackCtx_,E=this.activeObservations_.map(function(k){return new Ot(k.target,k.broadcastRect())});this.callback_.call(O,E,O),this.clearActive()}},I.prototype.clearActive=function(){this.activeObservations_.splice(0)},I.prototype.hasActive=function(){return this.activeObservations_.length>0},I})(),Ke=typeof WeakMap<"u"?new WeakMap:new Ge,Ze=(function(){function I(O){if(!(this instanceof I))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var E=Lt.getInstance(),k=new Nt(O,E,this);Ke.set(this,k)}return I})();["observe","unobserve","disconnect"].forEach(function(I){Ze.prototype[I]=function(){var O;return(O=Ke.get(this))[I].apply(O,arguments)}});var Ft=(function(){return typeof ye.ResizeObserver<"u"?ye.ResizeObserver:Ze})();const Te=["blur","input","change","changeSelectionStyle","changeSession","copy","focus","paste"],Wt=Me({name:"VAceEditor",props:{value:{type:String,required:!0},lang:{type:String,default:"text"},theme:{type:String,default:"chrome"},options:Object,placeholder:String,readonly:Boolean,wrap:Boolean,printMargin:{type:[Boolean,Number],default:!0},minLines:Number,maxLines:Number},emits:["update:value","init",...Te],render(){return it("div")}
979,mounted(){const I=this._editor=et(pe.edit(this.$el,{placeholder:this.placeholder,readOnly:this.readonly,value:this.value,mode:"ace/mode/"+this.lang,theme:"ace/theme/"+this.theme,wrap:this.wrap,printMargin:this.printMargin,useWorker:!1,minLines:this.minLines,maxLines:this.maxLines,...this.options}));this._contentBackup=this.value,this._isSettingContent=!1,I.on("change",()=>{if(this._isSettingContent)return;const O=I.getValue();this._contentBackup=O,this.$emit("update:value",O)}),Te.forEach(O=>{const E="on"+tt(O);typeof this.$.vnode.props[E]=="function"&&I.on(O,this.$emit.bind(this,O))}),this._ro=new Ft(()=>I.resize()),this._ro.observe(this.$el),this.$emit("init",I)},beforeUnmount(){var I,O;(I=this._ro)===null||I===void 0||I.disconnect(),(O=this._editor)===null||O===void 0||O.destroy()},methods:{focus(){this._editor.focus()},blur(){this._editor.blur()},selectAll(){this._editor.selectAll()},getAceInstance(){return this._editor}},watch:{value(I){if(this._contentBackup!==I){try{this._isSettingContent=!0,this._editor.setValue(I,1)}finally{this._isSettingContent=!1}this._contentBackup=I}},theme(I){this._editor.setTheme("ace/theme/"+I)},options(I){this._editor.setOptions(I)},readonly(I){this._editor.setReadOnly(I)},placeholder(I){this._editor.setOption("placeholder",I)},wrap(I){this._editor.setWrapBehavioursEnabled(I)},printMargin(I){this._editor.setOption("printMargin",I)},lang(I){this._editor.setOption("mode","ace/mode/"+I)},minLines(I){this._editor.setOption("minLines",I)},maxLines(I){this._editor.setOption("maxLines",I)}}}),Bt="data:text/javascript;base64,YWNlLmRlZmluZSgiYWNlL3RoZW1lL2dpdGh1Yi1jc3MiLFsicmVxdWlyZSIsImV4cG9ydHMiLCJtb2R1bGUiXSwgZnVuY3Rpb24ocmVxdWlyZSwgZXhwb3J0cywgbW9kdWxlKXttb2R1bGUuZXhwb3J0cyA9ICIvKiBDU1Mgc3R5bGUgY29udGVudCBmcm9tIGdpdGh1YidzIGRlZmF1bHQgcHlnbWVudHMgaGlnaGxpZ2h0ZXIgdGVtcGxhdGUuXG4gICBDdXJzb3IgYW5kIHNlbGVjdGlvbiBzdHlsZXMgZnJvbSB0ZXh0bWF0ZS5jc3MuICovXG4uYWNlLWdpdGh1YiAuYWNlX2d1dHRlciB7XG4gIGJhY2tncm91bmQ6ICNlOGU4ZTg7XG4gIGNvbG9yOiAjQUFBO1xufVxuXG4uYWNlLWdpdGh1YiAge1xuICBiYWNrZ3JvdW5kOiAjZmZmO1xuICBjb2xvcjogIzAwMDtcbn1cblxuLmFjZS1naXRodWIgLmFjZV9rZXl3b3JkIHtcbiAgZm9udC13ZWlnaHQ6IGJvbGQ7XG59XG5cbi5hY2UtZ2l0aHViIC5hY2Vfc3RyaW5nIHtcbiAgY29sb3I6ICNEMTQ7XG59XG5cbi5hY2UtZ2l0aHViIC5hY2VfdmFyaWFibGUuYWNlX2NsYXNzIHtcbiAgY29sb3I6IHRlYWw7XG59XG5cbi5hY2UtZ2l0aHViIC5hY2VfY29uc3RhbnQuYWNlX251bWVyaWMge1xuICBjb2xvcjogIzA5OTtcbn1cblxuLmFjZS1naXRodWIgLmFjZV9jb25zdGFudC5hY2VfYnVpbGRpbiB7XG4gIGNvbG9yOiAjMDA4NkIzO1xufVxuXG4uYWNlLWdpdGh1YiAuYWNlX3N1cHBvcnQuYWNlX2Z1bmN0aW9uIHtcbiAgY29sb3I6ICMwMDg2QjM7XG59XG5cbi5hY2UtZ2l0aHViIC5hY2VfY29tbWVudCB7XG4gIGNvbG9yOiAjOTk4O1xuICBmb250LXN0eWxlOiBpdGFsaWM7XG59XG5cbi5hY2UtZ2l0aHViIC5hY2VfdmFyaWFibGUuYWNlX2xhbmd1YWdlICB7XG4gIGNvbG9yOiAjMDA4NkIzO1xufVxuXG4uYWNlLWdpdGh1YiAuYWNlX3BhcmVuIHtcbiAgZm9udC13ZWlnaHQ6IGJvbGQ7XG59XG5cbi5hY2UtZ2l0aHViIC5hY2VfYm9vbGVhbiB7XG4gIGZvbnQtd2VpZ2h0OiBib2xkO1xufVxuXG4uYWNlLWdpdGh1YiAuYWNlX3N0cmluZy5hY2VfcmVnZXhwIHtcbiAgY29sb3I6ICMwMDk5MjY7XG4gIGZvbnQtd2VpZ2h0OiBub3JtYWw7XG59XG5cbi5hY2UtZ2l0aHViIC5hY2VfdmFyaWFibGUuYWNlX2luc3RhbmNlIHtcbiAgY29sb3I6IHRlYWw7XG59XG5cbi5hY2UtZ2l0aHViIC5hY2VfY29uc3RhbnQuYWNlX2xhbmd1YWdlIHtcbiAgZm9udC13ZWlnaHQ6IGJvbGQ7XG59XG5cbi5hY2UtZ2l0aHViIC5hY2VfY3Vyc29yIHtcbiAgY29sb3I6IGJsYWNrO1xufVxuXG4uYWNlLWdpdGh1Yi5hY2VfZm9jdXMgLmFjZV9tYXJrZXItbGF5ZXIgLmFjZV9hY3RpdmUtbGluZSB7XG4gIGJhY2tncm91bmQ6IHJnYigyNTUsIDI1NSwgMjA0KTtcbn1cbi5hY2UtZ2l0aHViIC5hY2VfbWFya2VyLWxheWVyIC5hY2VfYWN0aXZlLWxpbmUge1xuICBiYWNrZ3JvdW5kOiByZ2IoMjQ1LCAyNDUsIDI0NSk7XG59XG5cbi5hY2UtZ2l0aHViIC5hY2VfbWFya2VyLWxheWVyIC5hY2Vfc2VsZWN0aW9uIHtcbiAgYmFja2dyb3VuZDogcmdiKDE4MSwgMjEzLCAyNTUpO1xufVxuXG4uYWNlLWdpdGh1Yi5hY2VfbXVsdGlzZWxlY3QgLmFjZV9zZWxlY3Rpb24uYWNlX3N0YXJ0IHtcbiAgYm94LXNoYWRvdzogMCAwIDNweCAwcHggd2hpdGU7XG59XG4vKiBib2xkIGtleXdvcmRzIGNhdXNlIGN1cnNvciBpc3N1ZXMgZm9yIHNvbWUgZm9udHMgKi9cbi8qIHRoaXMgZGlzYWJsZXMgYm9sZCBzdHlsZSBmb3IgZWRpdG9yIGFuZCBrZWVwcyBmb3Igc3RhdGljIGhpZ2hsaWdodGVyICovXG4uYWNlLWdpdGh1Yi5hY2Vfbm9ib2xkIC5hY2VfbGluZSA+IHNwYW4ge1xuICAgIGZvbnQtd2VpZ2h0OiBub3JtYWwgIWltcG9ydGFudDtcbn1cblxuLmFjZS1naXRodWIgLmFjZV9tYXJrZXItbGF5ZXIgLmFjZV9zdGVwIHtcbiAgYmFja2dyb3VuZDogcmdiKDI1MiwgMjU1LCAwKTtcbn1cblxuLmFjZS1naXRodWIgLmFjZV9tYXJrZXItbGF5ZXIgLmFjZV9zdGFjayB7XG4gIGJhY2tncm91bmQ6IHJnYigxNjQsIDIyOSwgMTAxKTtcbn1cblxuLmFjZS1naXRodWIgLmFjZV9tYXJrZXItbGF5ZXIgLmFjZV9icmFja2V0IHtcbiAgbWFyZ2luOiAtMXB4IDAgMCAtMXB4O1xuICBib3JkZXI6IDFweCBzb2xpZCByZ2IoMTkyLCAxOTIsIDE5Mik7XG59XG5cbi5hY2UtZ2l0aHViIC5hY2VfZ3V0dGVyLWFjdGl2ZS1saW5lI
979HtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yIDogcmdiYSgwLCAwLCAwLCAwLjA3KTtcbn1cblxuLmFjZS1naXRodWIgLmFjZV9tYXJrZXItbGF5ZXIgLmFjZV9zZWxlY3RlZC13b3JkIHtcbiAgYmFja2dyb3VuZDogcmdiKDI1MCwgMjUwLCAyNTUpO1xuICBib3JkZXI6IDFweCBzb2xpZCByZ2IoMjAwLCAyMDAsIDI1MCk7XG59XG5cbi5hY2UtZ2l0aHViIC5hY2VfaW52aXNpYmxlIHtcbiAgY29sb3I6ICNCRkJGQkZcbn1cblxuLmFjZS1naXRodWIgLmFjZV9wcmludC1tYXJnaW4ge1xuICB3aWR0aDogMXB4O1xuICBiYWNrZ3JvdW5kOiAjZThlOGU4O1xufVxuXG4uYWNlLWdpdGh1YiAuYWNlX2luZGVudC1ndWlkZSB7XG4gIGJhY2tncm91bmQ6IHVybChcImRhdGE6aW1hZ2UvcG5nO2Jhc2U2NCxpVkJPUncwS0dnb0FBQUFOU1VoRVVnQUFBQUVBQUFBQ0NBWUFBQUNaZ2JZbkFBQUFFMGxFUVZRSW1XUDQvLy8vZjRiTGx5Ly9Cd0FtVmdkMS93MTEvZ0FBQUFCSlJVNUVya0pnZ2c9PVwiKSByaWdodCByZXBlYXQteTtcbn1cblxuLmFjZS1naXRodWIgLmFjZV9pbmRlbnQtZ3VpZGUtYWN0aXZlIHtcbiAgYmFja2dyb3VuZDogdXJsKFwiZGF0YTppbWFnZS9wbmc7YmFzZTY0LGlWQk9SdzBLR2dvQUFBQU5TVWhFVWdBQUFBRUFBQUFDQ0FZQUFBQ1pnYlluQUFBQUNYQklXWE1BQUFzVEFBQUxFd0VBbXB3WUFBQUFJR05JVWswQUFIb2xBQUNBZ3dBQStmOEFBSURwQUFCMU1BQUE2bUFBQURxWUFBQVhiNUpmeFVZQUFBQVpTVVJCVkhqYVl2ai8vLzkvaGl2S3l2OEJBQUFBLy84REFDTHFCaGJ2aysvZUFBQUFBRWxGVGtTdVFtQ0NcIikgcmlnaHQgcmVwZWF0LXk7XG59XG4iOwoKfSk7CgphY2UuZGVmaW5lKCJhY2UvdGhlbWUvZ2l0aHViIixbInJlcXVpcmUiLCJleHBvcnRzIiwibW9kdWxlIiwiYWNlL3RoZW1lL2dpdGh1Yi1jc3MiLCJhY2UvbGliL2RvbSJdLCBmdW5jdGlvbihyZXF1aXJlLCBleHBvcnRzLCBtb2R1bGUpe2V4cG9ydHMuaXNEYXJrID0gZmFsc2U7CmV4cG9ydHMuY3NzQ2xhc3MgPSAiYWNlLWdpdGh1YiI7CmV4cG9ydHMuY3NzVGV4dCA9IHJlcXVpcmUoIi4vZ2l0aHViLWNzcyIpOwp2YXIgZG9tID0gcmVxdWlyZSgiLi4vbGliL2RvbSIpOwpkb20uaW1wb3J0Q3NzU3RyaW5nKGV4cG9ydHMuY3NzVGV4dCwgZXhwb3J0cy5jc3NDbGFzcywgZmFsc2UpOwoKfSk7ICAgICAgICAgICAgICAgIChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICBhY2UucmVxdWlyZShbImFjZS90aGVtZS9naXRodWIiXSwgZnVuY3Rpb24obSkgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG1vZHVsZSA9PSAib2JqZWN0IiAmJiB0eXBlb2YgZXhwb3J0cyA9PSAib2JqZWN0IiAmJiBtb2R1bGUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZHVsZS5leHBvcnRzID0gbTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfSkoKTsKICAgICAgICAgICAg",Ht="/kubcms-front/v5/master/s/a-theme-dracula-B3ty0lg6.js",zt="/kubcms-front/v5/master/s/a-mode-scss-Da3apocn.js",Vt="/kubcms-front/v5/master/s/a-mode-html--IETWGIY.js";at.add(lt,ht);const Pt=Me({name:"BackgroundSelector",components:{ElButton:$e,ElInput:be,FontAwesomeIcon:nt,ElScrollbar:De,ElSelect:_e,ElOption:Ie,SingleUploaderWithActions:Ue},props:{modelValue:{type:String,default:""}},emits:["update:modelValue"],setup(I,{emit:O}){const E=ae(""),k=ae([]),H=ae(!1),x=ae(!1),A=ae(!0),$=ae({colors:[],style:[],mood:[],pattern_type:[]}),a=(b,M)=>{if(!b)return[];const C=A.value?b[`${M}_ru`]:b[M];return C?Array.isArray(C)?C:typeof C=="string"?[C]:[]:[]},l=(b,M)=>$.value[b].includes(M),r=oe(()=>ct(vt(k.value,{label:I.modelValue}),"value",I.modelValue)),o=async()=>{const b="/kubcms-front/v5/master".endsWith("/")?"/kubcms-front/v5/master":"/kubcms-front/v5/master/";try{H.value=!0;const{data:M}=await ot.get(b+"img/backgrounds/backgrounds-with-tags.json");if(M&&M.length>0){x.value=!0;const C=new Map;M.forEach(S=>{S.tags&&C.set(S.filename,S.tags)}),k.value=M.map(S=>{const R=S.filename,y=C.get(R),w=[...y!=null&&y.colors?Array.isArray(y.colors)?y.colors:[y.colors]:[],...y!=null&&y.colors_ru?Array.isArray(y.colors_ru)?y.colors_ru:[y.colors_ru]:[]],d=[...y!=null&&y.style?Array.isArray(y.style)?y.style:[y.style]:[],...y!=null&&y.style_ru?Array.isArray(y.style_ru)?y.style_ru:[y.style_ru]:[]],u=[...y!=null&&y.mood?Array.isArray(y.mood)?y.mood:[y.mood]:[],...y!=null&&y.mood_ru?Array.isArray(y.mood_ru)?y.mood_ru:[y.mood_ru]:[]],v=[...y!=null&&y.pattern_type?Array.isArray(y.pattern_type)?y.pattern_type:[y.pattern_type]:[],...y!=null&&y.pattern_type_ru?Array.isArray(y.pattern_type_ru)?y.pattern_type_ru:[y.pattern_type_ru]:[]];return{...S,label:S.filename,value:b+"img/backgrounds/"+S.filename,tags:y,displayColors:a(y,"colors"),displayStyle:a(y,"style"),displayPatternType:a(y,"pattern_type"),displayMood:a(y,"mood"),allColors:w,allStyle:d,allMood:u,allPatternType:v}})}}catch{}finally{H.value=!1}},n=oe(()=>{const b={colors:new Set,style:new Set,mood:new Set,pattern_type:new Set},M={colors:new Set,style:new Set,mood:new Set,pattern_type:new Set};return k.value.forEach(C=>{if(C.tags){const S=(y,w)=>
979{y&&(Array.isArray(y)?y.forEach(d=>b[w].add(d)):typeof y=="string"&&b[w].add(y))},R=(y,w)=>{y&&(Array.isArray(y)?y.forEach(d=>M[w].add(d)):typeof y=="string"&&M[w].add(y))};S(C.tags.colors,"colors"),S(C.tags.style,"style"),S(C.tags.mood,"mood"),S(C.tags.pattern_type,"pattern_type"),R(C.tags.colors_ru,"colors"),R(C.tags.style_ru,"style"),R(C.tags.mood_ru,"mood"),R(C.tags.pattern_type_ru,"pattern_type")}}),{en:{colors:Array.from(b.colors),style:Array.from(b.style),mood:Array.from(b.mood),pattern_type:Array.from(b.pattern_type)},ru:{colors:Array.from(M.colors),style:Array.from(M.style),mood:Array.from(M.mood),pattern_type:Array.from(M.pattern_type)}}}),t=oe(()=>A.value?n.value.ru:n.value.en),e=oe(()=>t.value),i=oe(()=>k.value.filter(b=>{if(E.value){const M=E.value.toLowerCase(),C=b.label.toLowerCase().includes(M),S=b.allColors.some(R=>R.toLowerCase().includes(M))||b.allStyle.some(R=>R.toLowerCase().includes(M))||b.allMood.some(R=>R.toLowerCase().includes(M))||b.allPatternType.some(R=>R.toLowerCase().includes(M));if(!C&&!S)return!1}return!($.value.colors.length>0&&!$.value.colors.some(M=>b.allColors.includes(M))||$.value.style.length>0&&!$.value.style.some(M=>b.allStyle.includes(M))||$.value.mood.length>0&&!$.value.mood.some(M=>b.allMood.includes(M))||$.value.pattern_type.length>0&&!$.value.pattern_type.some(M=>b.allPatternType.includes(M)))})),s=oe(()=>E.value.trim()!==""||Object.values($.value).some(b=>b.length>0)),h=oe(()=>{const b=[];return E.value.trim()!==""&&b.push(`ÐоиÑк: "${E.value}"`),$.value.colors.length>0&&b.push(`ЦвеÑа: ${$.value.colors.join(", ")}`),$.value.style.length>0&&b.push(`СÑилÑ: ${$.value.style.join(", ")}`),$.value.mood.length>0&&b.push(`ÐаÑÑÑоение: ${$.value.mood.join(", ")}`),$.value.pattern_type.length>0&&b.push(`УзоÑ: ${$.value.pattern_type.join(", ")}`),b.join(" | ")}),c=b=>{O("update:modelValue",b.label),st.success(`Фон ${b.label} ÑÑпеÑно вÑбÑан`)},m=(b,M)=>{const C=$.value[b];if(C){const S=C.indexOf(M);S>=0?C.splice(S,1):C.push(M)}};rt(A,()=>{p(),k.value=k.value.map(b=>({...b,displayColors:a(b.tags,"colors"),displayStyle:a(b.tags,"style"),displayPatternType:a(b.tags,"pattern_type"),displayMood:a(b.tags,"mood")}))});const p=()=>{E.value="",$.value={colors:[],style:[],mood:[],pattern_type:[]}},g=()=>{E.value=""},f=b=>{};return Oe(()=>{o()}),{searchQuery:E,filteredBackgrounds:i,selectBackground:c,uniqueTags:n,displayTags:t,selectedTags:$,toggleTag:m,clearFilters:p,clearSearch:g,hasTags:x,useRussianTags:A,getTagsToDisplay:a,isTagSelected:l,availableTags:e,hasActiveFilters:s,activeFiltersText:h,backgroundsWithTags:k,cpBgSelectedUrl:r,changeBgHandler:f}}}),Ut={class:"mb-2 flex gap-6 items-center"},Gt={key:0,class:"flex justify-left items-center"},jt={class:"background-selector"},Yt={class:"flex justify-between items-center mb-2"},Kt={key:0,class:"tag-filters mb-3 flex justify-between gap-2"},Zt={class:"tag-category w-full"},Xt={class:"tag-category w-full"},Qt={class:"tag-category w-full"},Jt={class:"tag-category w-full"},qt={key:1,class:"filter-stats mb-2"},ei={class:"flex justify-between items-center"},ti={class:"text-sm"},ii={class:"font-bold"},ni={key:0,class:"active-filters mt-1"},ri={class:"text-xs text-gray-500"},oi={class:"background-grid"},si=["onClick"],ai={class:"bg-image"},li=["src","alt"];function hi(I,O,E,k,H,x){const A=de("SingleUploaderWithActions"),$=de("FontAwesomeIcon"),a=be,l=Ie,r=_e,o=$e,n=De;return Z(),J("div",null,[G("div",Ut,[G("div",null,[K(A,{action:"/api/admin/attachments/upload/background",modelValue:I.cpBgSelectedUrl,"onUpdate:modelValue":O[0]||(O[0]=t=>I.$emit("update:modelValue",t))},null,8,["modelValue"])]),I.cpBgSelectedUrl?ee("",!0):(Z(),J("div",Gt,[K($,{icon:"arrow-left",class:"mr-2"}),O[6]||(O[6]=ie(" ÐагÑÑзиÑе Ñвой Ñон или вÑбеÑиÑе из гоÑовÑÑ
",-1)),K($,{icon:"arrow-down",class:"ml-2"})]))]),O[14]||(O[14]=G("hr",null,null,-1)),G("div",jt,[O[13]||(O[13]=G("h4",null,"ÐоллекÑÐ¸Ñ Ñонов:",-1)),G("div",Yt,[K(a,{modelValue:I.searchQuery,"onUpdate:modelValue":O[1]||(O[1]=t=>I.searchQuery=t),placeholder:"ÐоиÑк по имени Ñайла или Ñегам","prefix-icon":"Search",clearable:"",onClear:I.clearSearch,class:"flex-grow mr-2"},null,8,["modelValue","onClear"])]),I.hasTags?(Z(),J("div",Kt,[G("div",Zt,[O[7]||
979(O[7]=G("div",{class:"tag-category-title"},"ЦвеÑа:",-1)),K(r,{modelValue:I.selectedTags.colors,"onUpdate:modelValue":O[2]||(O[2]=t=>I.selectedTags.colors=t),multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"ÐÑбеÑиÑе ÑвеÑа",class:"w-full mb-2"},{default:Q(()=>[(Z(!0),J(se,null,ge(I.availableTags.colors,t=>(Z(),ce(l,{key:"color-"+t,label:t,value:t},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),G("div",Xt,[O[8]||(O[8]=G("div",{class:"tag-category-title"},"СÑилÑ:",-1)),K(r,{modelValue:I.selectedTags.style,"onUpdate:modelValue":O[3]||(O[3]=t=>I.selectedTags.style=t),multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"ÐÑбеÑиÑе ÑÑилÑ",class:"w-full mb-2"},{default:Q(()=>[(Z(!0),J(se,null,ge(I.availableTags.style,t=>(Z(),ce(l,{key:"style-"+t,label:t,value:t},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),G("div",Qt,[O[9]||(O[9]=G("div",{class:"tag-category-title"},"ÐаÑÑÑоение:",-1)),K(r,{modelValue:I.selectedTags.mood,"onUpdate:modelValue":O[4]||(O[4]=t=>I.selectedTags.mood=t),multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"ÐÑбеÑиÑе наÑÑÑоение",class:"w-full mb-2"},{default:Q(()=>[(Z(!0),J(se,null,ge(I.availableTags.mood,t=>(Z(),ce(l,{key:"mood-"+t,label:t,value:t},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),G("div",Jt,[O[10]||(O[10]=G("div",{class:"tag-category-title"},"УзоÑ:",-1)),K(r,{modelValue:I.selectedTags.pattern_type,"onUpdate:modelValue":O[5]||(O[5]=t=>I.selectedTags.pattern_type=t),multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"ÐÑбеÑиÑе ÑзоÑ",class:"w-full mb-2"},{default:Q(()=>[(Z(!0),J(se,null,ge(I.availableTags.pattern_type,t=>(Z(),ce(l,{key:"pattern-"+t,label:t,value:t},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])])):ee("",!0),I.hasActiveFilters?(Z(),J("div",qt,[G("div",ei,[G("div",ti,[O[11]||(O[11]=ie(" Ðайдено: ",-1)),G("span",ii,he(I.filteredBackgrounds.length),1),ie(" из "+he(I.backgroundsWithTags.length),1)]),K(o,{size:"small",onClick:I.clearFilters,type:"primary",plain:""},{default:Q(()=>[...O[12]||(O[12]=[ie(" СбÑоÑиÑÑ ÑилÑÑÑÑ ",-1)])]),_:1},8,["onClick"])]),I.activeFiltersText?(Z(),J("div",ni,[G("div",ri,he(I.activeFiltersText),1)])):ee("",!0)])):ee("",!0),K(n,{height:"400px"},{default:Q(()=>[G("div",oi,[(Z(!0),J(se,null,ge(I.filteredBackgrounds,t=>(Z(),J("div",{key:t.value,class:ue(["background-item",{"bg-selected":I.modelValue===t.value}]),onClick:e=>I.selectBackground(t)},[G("div",ai,[G("img",{src:t.value,alt:t.label},null,8,li)])],10,si))),128))])]),_:1})])])}const ci=Ne(Pt,[["render",hi],["__scopeId","data-v-543c3b66"]]);pe.config.setModuleUrl("ace/mode/scss",zt);pe.config.setModuleUrl("ace/mode/html",Vt);pe.config.setModuleUrl("ace/theme/github",Bt);pe.config.setModuleUrl("ace/theme/dracula",Ht);const ui=Me({name:"AppearanceSettings",components:{Editor:Wt,BackgroundSelector:ci,SingleUploaderWithActions:Ue,ParentTreeSelect:ft,ElTabs:Pe,ElTabPane:Ve,ElSwitch:Be,ElCheckbox:He,ElColorPicker:ze,ElInput:be,ElButton:$e,ElDialog:We,ElTooltip:Fe},props:{modelValue:{type:Object,required:!0},siteValues:{type:Object,default:void 0},mode:{type:String,required:!0}},emits:{"update:modelValue":I=>!0},setup(I,{emit:O}){const E=ut(),k=ae("background"),H=oe(()=>E.value?"dracula":"github"),x=ae({background:!1,customStyle:!1,customHeadHtml:!1,favicon:!1,sidebar:!1,specialVersion:!1});Oe(()=>{if(I.mode!=="page")return;const p=I.modelValue;x.value={background:p.background!==void 0&&p.background!==""||!!p.disableSiteBackground,customStyle:p.customStyle!=null&&p.customStyle!=="",customHeadHtml:p.customHeadHtml!=null&&p.customHeadHtml!=="",favicon:p.favicon!=null&&p.favicon!=="",sidebar:p.sidebarEnabled!==null&&p.sidebarEnabled!==void 0,specialVersion:p.specialVersion!==null&&p.specialVersion!==void 0}});const A=(p,g)=>{O("update:modelValue",{...I.modelValue,[p]:g})},$=p=>{x.value[p]=!1,p==="background"?O("update:modelValue",{...I.modelValue,background:void 0,disableSiteBackgroun
979d:void 0}):p==="sidebar"?O("update:modelValue",{...I.modelValue,sidebarEnabled:void 0,sidebarShowByDefault:void 0,sidebarItemId:void 0}):O("update:modelValue",{...I.modelValue,[p]:void 0})},a=ae(!1),l=ae(""),r=oe(()=>{var g;const p=((g=I.siteValues)==null?void 0:g.background)||"";return p?p.indexOf("://")===-1?`/img/backgrounds/${p}`:p:""}),o=oe(()=>{const p=I.modelValue.background||"";return p?p.indexOf("://")===-1?`/img/backgrounds/${p}`:p:""}),n=oe(()=>{const p=I.modelValue;return p.background?"custom":p.disableSiteBackground?"disabled":"inherited"}),t=()=>{l.value=I.modelValue.background||"",a.value=!0},e=()=>{l.value&&(O("update:modelValue",{...I.modelValue,background:l.value,disableSiteBackground:!0}),a.value=!1)},i=()=>{O("update:modelValue",{...I.modelValue,background:"",disableSiteBackground:!0})},s=()=>{O("update:modelValue",{...I.modelValue,background:"",disableSiteBackground:!1})},h=oe(()=>I.mode==="site"?"calc(100vh - 300px)":"300px"),c=ae(!1),m=ae(!1);return{props:I,activeTab:k,aceTheme:H,overrides:x,update:A,resetField:$,bgPickerVisible:a,bgPickerValue:l,openBgPicker:t,confirmBgPicker:e,doDisableSiteBackground:i,resetToSiteBackground:s,siteBgUrl:r,pageBgUrl:o,pageBgStatus:n,editorHeight:h,cssFullscreen:c,htmlFullscreen:m}}}),di={key:0,class:"override-header"},fi={class:"override-toggle"},gi={class:"override-status"},pi={key:1,class:"bg-empty-hint"},mi={class:"d-flex gap-2 mt-2"},vi={class:"bg-disabled-hint"},yi={class:"d-flex gap-2 mt-2 flex-wrap"},wi={class:"d-flex gap-2 mt-2 flex-wrap"},bi={key:1,class:"bg-empty-hint"},$i={key:3,class:"mt-3"},Ci={class:"d-flex align-items-center gap-2"},Si={key:1,class:"override-hint mt-1"},Ai={key:0,class:"override-header"},Mi={class:"override-toggle"},Li={class:"override-status"},ki={class:"editor-wrap"},Ei={key:1,class:"override-hint mt-1"},xi={key:0,class:"editor-fullscreen-overlay"},Ti={class:"editor-fullscreen-toolbar"},Ri={key:0,class:"override-header"},Ii={class:"override-toggle"},_i={class:"override-status"},Di={class:"editor-wrap"},Oi={key:1,class:"override-hint mt-1"},Ni={key:0,class:"editor-fullscreen-overlay"},Fi={class:"editor-fullscreen-toolbar"},Wi={key:0,class:"override-header"},Bi={class:"override-toggle"},Hi={class:"override-status"},zi={key:1,class:"override-hint mt-1"},Vi={key:0,class:"override-header"},Pi={class:"override-toggle"},Ui={class:"override-status"},Gi={class:"form-group"},ji={class:"form-group mt-2"},Yi={class:"form-group mt-2"},Ki={key:1,class:"override-hint mt-1"},Zi={key:0,class:"override-header"},Xi={class:"override-toggle"},Qi={class:"override-status"},Ji={key:1,class:"override-hint mt-1"},qi={class:"dialog-footer"};function en(I,O,E,k,H,x){const A=Be,$=$e,a=de("BackgroundSelector"),l=ze,r=be,o=Ve,n=Fe,t=de("Editor"),e=de("SingleUploaderWithActions"),i=de("ParentTreeSelect"),s=He,h=Pe,c=We;return Z(),J(se,null,[K(h,{modelValue:I.activeTab,"onUpdate:modelValue":O[29]||(O[29]=m=>I.activeTab=m),type:"border-card"},{default:Q(()=>[K(o,{label:"Фон",name:"background",lazy:""},{default:Q(()=>[I.mode==="page"?(Z(),J("div",di,[O[33]||(O[33]=G("span",{class:"override-label"},"Фон ÑÑÑаниÑÑ",-1)),G("div",fi,[G("span",gi,he(I.overrides.background?"пеÑеопÑеделено Ð´Ð»Ñ ÑÑой ÑÑÑаниÑÑ":"наÑледÑеÑÑÑ Ð¾Ñ ÑайÑа"),1),K(A,{modelValue:I.overrides.background,"onUpdate:modelValue":O[0]||(O[0]=m=>I.overrides.background=m),size:"small"},null,8,["modelValue"])])])):ee("",!0),G("div",{class:ue({"content-disabled":I.mode==="page"&&!I.overrides.background})},[I.mode==="page"&&I.overrides.background?(Z(),J(se,{key:0},[I.pageBgStatus==="inherited"?(Z(),J(se,{key:0},[I.siteBgUrl?(Z(),J("div",{key:0,class:"bg-preview",style:ve({backgroundImage:`url('${I.siteBgUrl}')`})},[...O[34]||(O[34]=[G("span",{class:"bg-badge"},"Фон ÑайÑа",-1)])],4)):(Z(),J("div",pi,"Фон ÑайÑа не задан")),G("div",mi,[K($,{size:"small",type:"warning",plain:"",onClick:I.doDisableSiteBackground},{default:Q(()=>[...O[35]||(O[35]=[ie(" УбÑаÑÑ Ñон ÑайÑа Ð´Ð»Ñ ÑÑой ÑÑÑаниÑÑ ",-1)])]),_:1},8,["onClick"])])],64)):I.pageBgStatus==="disabled"?(Z(),J(se,{key:1},[G("div",vi,[O[36]||(O[36]=G("span",{style:{color:"#e6a23c","font-weight":"500"}},"Фон ÑайÑа оÑклÑÑÑн Ð´Ð»Ñ ÑÑой ÑÑÑаниÑÑ",-1)),I.siteBgUrl?(Z(),J(se,{key:0},[ie(" â Ñ ÑайÑа задан Ñон, но на ÑÑой ÑÑÑаниÑе он не оÑобÑажаеÑÑÑ ")],64)):ee("",!0)]),G("div",yi,[K($,{size:"small",type:"primary",plain:"",onClick:I.openBgPicker},{default:Q(()=>[...O[37]||(O[37]=[ie(" ÐÑбÑаÑÑ Ñон ÑÑÑаниÑÑ ",-1)])]),_:1},8,["onClick"]),K($,{size:"small",onClick:I.resetToSiteBackgroun
979d},{default:Q(()=>[...O[38]||(O[38]=[ie(" ÐеÑнÑÑÑ Ñон ÑайÑа ",-1)])]),_:1},8,["onClick"])])],64)):I.pageBgStatus==="custom"?(Z(),J(se,{key:2},[G("div",{class:"bg-preview",style:ve({backgroundImage:`url('${I.pageBgUrl}')`})},[...O[39]||(O[39]=[G("span",{class:"bg-badge bg-badge--page"},"Фон ÑÑÑаниÑÑ",-1)])],4),G("div",wi,[K($,{size:"small",type:"primary",plain:"",onClick:I.openBgPicker},{default:Q(()=>[...O[40]||(O[40]=[ie("ÐзмениÑÑ",-1)])]),_:1},8,["onClick"]),K($,{size:"small",type:"warning",plain:"",onClick:I.doDisableSiteBackground},{default:Q(()=>[...O[41]||(O[41]=[ie("УбÑаÑÑ Ñон",-1)])]),_:1},8,["onClick"]),K($,{size:"small",onClick:I.resetToSiteBackground},{default:Q(()=>[...O[42]||(O[42]=[ie("ÐеÑнÑÑÑ Ñон ÑайÑа",-1)])]),_:1},8,["onClick"])])],64)):ee("",!0)],64)):I.mode==="page"&&!I.overrides.background?(Z(),J(se,{key:1},[I.siteBgUrl?(Z(),J("div",{key:0,class:"bg-preview",style:ve({backgroundImage:`url('${I.siteBgUrl}')`})},[...O[43]||(O[43]=[G("span",{class:"bg-badge"},"Фон ÑайÑа",-1)])],4)):(Z(),J("div",bi,"Фон ÑайÑа не задан"))],64)):(Z(),ce(a,{key:2,modelValue:I.props.modelValue.background||"","onUpdate:modelValue":O[1]||(O[1]=m=>I.update("background",m))},null,8,["modelValue"])),I.mode==="site"||I.overrides.background?(Z(),J("div",$i,[O[45]||(O[45]=G("div",{class:"field-label"},"Ð¦Ð²ÐµÑ Ñона (background-color)",-1)),G("div",Ci,[K(l,{modelValue:I.props.modelValue.bgcolor||"","show-alpha":"","onUpdate:modelValue":O[2]||(O[2]=m=>I.update("bgcolor",m))},null,8,["modelValue"]),K(r,{modelValue:I.props.modelValue.bgcolor||"",placeholder:"#121212 или rgba(0,0,0,0.5)",style:{flex:"1"},"onUpdate:modelValue":O[3]||(O[3]=m=>I.update("bgcolor",m))},null,8,["modelValue"]),I.props.modelValue.bgcolor?(Z(),ce($,{key:0,size:"small",onClick:O[4]||(O[4]=m=>I.update("bgcolor",""))},{default:Q(()=>[...O[44]||(O[44]=[ie(" СбÑоÑиÑÑ ",-1)])]),_:1})):ee("",!0)])])):ee("",!0)],2),I.mode==="page"&&I.overrides.background?(Z(),J("div",Si,[O[47]||(O[47]=G("span",null,"â ÐеÑеопÑеделÑÐµÑ Ð·Ð½Ð°Ñение ÑайÑа: Ñон ÑайÑа",-1)),K($,{size:"small",type:"primary",onClick:O[5]||(O[5]=m=>I.resetField("background"))},{default:Q(()=>[...O[46]||(O[46]=[ie("СбÑоÑиÑÑ",-1)])]),_:1})])):ee("",!0)]),_:1}),K(o,{label:"CSS",name:"customStyle",lazy:""},{default:Q(()=>{var m;return[I.mode==="page"?(Z(),J("div",Ai,[O[48]||(O[48]=G("span",{class:"override-label"},"ÐополниÑелÑнÑй CSS",-1)),G("div",Mi,[G("span",Li,he(I.overrides.customStyle?"пеÑеопÑеделено Ð´Ð»Ñ ÑÑой ÑÑÑаниÑÑ":"наÑледÑеÑÑÑ Ð¾Ñ ÑайÑа"),1),K(A,{modelValue:I.overrides.customStyle,"onUpdate:modelValue":O[6]||(O[6]=p=>I.overrides.customStyle=p),size:"small"},null,8,["modelValue"])])])):ee("",!0),G("div",ki,[K(n,{content:"РазвеÑнÑÑÑ ÑедакÑÐ¾Ñ Ð²Ð¾ веÑÑ ÑкÑан",placement:"right"},{default:Q(()=>[K($,{class:"editor-expand-btn",size:"small",onClick:O[7]||(O[7]=p=>I.cssFullscreen=!0)},{default:Q(()=>[...O[49]||(O[49]=[G("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[G("path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}),G("path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}),G("path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}),G("path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"})],-1)])]),_:1})]),_:1}),G("div",{class:ue({"content-disabled":I.mode==="page"&&!I.overrides.customStyle})},[K(t,{value:I.props.modelValue.customStyle||"","onUpdate:value":O[8]||(O[8]=p=>(I.mode==="site"||I.overrides.customStyle)&&I.update("customStyle",p)),theme:I.aceTheme,width:"100%",lang:"scss",style:ve({height:I.editorHeight}),options:{readOnly:I.mode==="page"&&!I.overrides.customStyle}},null,8,["value","theme","style","options"])],2)]),I.mode==="page"&&I.overrides.customStyle&&((m=I.siteValues)!=null&&m.customStyle)?(Z(),J("div",Ei,[O[51]||(O[51]=G("span",null,"â ÐеÑеопÑеделÑÐµÑ Ð·Ð½Ð°Ñение ÑайÑа: CSS ÑайÑа задан",-1)),K($,{size:"small",type:"primary",onClick:O[9]||(O[9]=p=>I.resetField("customStyle"))},{default:Q(()=>[...O[50]||(O[50]=[ie("СбÑоÑиÑÑ",-1)])]),_:1})])):ee("",!0)]}),_:1}),(Z(),ce(ke,{to:"body"},[I.cssFullscreen?(Z(),J("div",xi,[G("div",Ti,[K(n,{content:"ÐÑйÑи в обÑÑнÑй Ñежим",placement:"right"},{default:Q(()=>[K($,{size:"small",onClick:O[10]||(O[10]=m=>I.cssFullscreen=!1)},{default:Q(()=>[...O[52]||(O[52]=[G("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[G("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),G("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),G("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),G("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})],-1)])]),_:1})]),_:1}),O[53]||(O[53]=G("span",{class:"editor-fullscreen-title"},"CSS",-1))]),K(t,{value:I.props.modelValue.customStyle||"","onUpdate:value":O[11]||(O[11]=m=>(I.mode==="site"||I.overrides.customStyle)&&I.update("customStyle",m)),theme:I.aceTheme,width:"100%",lang:"scss",class:"editor-fullscreen-ace",options:{readOnly:I.mode==="page"&&!I.overrides.customStyle}}
979,null,8,["value","theme","options"])])):ee("",!0)])),K(o,{label:"Head HTML",name:"customHeadHtml",lazy:""},{default:Q(()=>{var m;return[I.mode==="page"?(Z(),J("div",Ri,[O[54]||(O[54]=G("span",{class:"override-label"},"Ðод в <head>",-1)),G("div",Ii,[G("span",_i,he(I.overrides.customHeadHtml?"пеÑеопÑеделено Ð´Ð»Ñ ÑÑой ÑÑÑаниÑÑ":"наÑледÑеÑÑÑ Ð¾Ñ ÑайÑа"),1),K(A,{modelValue:I.overrides.customHeadHtml,"onUpdate:modelValue":O[12]||(O[12]=p=>I.overrides.customHeadHtml=p),size:"small"},null,8,["modelValue"])])])):ee("",!0),G("div",Di,[K(n,{content:"РазвеÑнÑÑÑ ÑедакÑÐ¾Ñ Ð²Ð¾ веÑÑ ÑкÑан",placement:"right"},{default:Q(()=>[K($,{class:"editor-expand-btn",size:"small",onClick:O[13]||(O[13]=p=>I.htmlFullscreen=!0)},{default:Q(()=>[...O[55]||(O[55]=[G("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[G("path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}),G("path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}),G("path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}),G("path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"})],-1)])]),_:1})]),_:1}),G("div",{class:ue({"content-disabled":I.mode==="page"&&!I.overrides.customHeadHtml})},[K(t,{value:I.props.modelValue.customHeadHtml||"","onUpdate:value":O[14]||(O[14]=p=>(I.mode==="site"||I.overrides.customHeadHtml)&&I.update("customHeadHtml",p)),theme:I.aceTheme,width:"100%",lang:"html",style:{height:"300px"},options:{readOnly:I.mode==="page"&&!I.overrides.customHeadHtml}},null,8,["value","theme","options"])],2)]),I.mode==="page"&&I.overrides.customHeadHtml&&((m=I.siteValues)!=null&&m.customHeadHtml)?(Z(),J("div",Oi,[O[57]||(O[57]=G("span",null,"â ÐеÑеопÑеделÑÐµÑ Ð·Ð½Ð°Ñение ÑайÑа: Head HTML ÑайÑа задан",-1)),K($,{size:"small",type:"primary",onClick:O[15]||(O[15]=p=>I.resetField("customHeadHtml"))},{default:Q(()=>[...O[56]||(O[56]=[ie("СбÑоÑиÑÑ",-1)])]),_:1})])):ee("",!0)]}),_:1}),(Z(),ce(ke,{to:"body"},[I.htmlFullscreen?(Z(),J("div",Ni,[G("div",Fi,[K(n,{content:"ÐÑйÑи в обÑÑнÑй Ñежим",placement:"right"},{default:Q(()=>[K($,{size:"small",onClick:O[16]||(O[16]=m=>I.htmlFullscreen=!1)},{default:Q(()=>[...O[58]||(O[58]=[G("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[G("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),G("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),G("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),G("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})],-1)])]),_:1})]),_:1}),O[59]||(O[59]=G("span",{class:"editor-fullscreen-title"},"Head HTML",-1))]),K(t,{value:I.props.modelValue.customHeadHtml||"","onUpdate:value":O[17]||(O[17]=m=>(I.mode==="site"||I.overrides.customHeadHtml)&&I.update("customHeadHtml",m)),theme:I.aceTheme,width:"100%",lang:"html",class:"editor-fullscreen-ace",options:{readOnly:I.mode==="page"&&!I.overrides.customHeadHtml}},null,8,["value","theme","options"])])):ee("",!0)])),K(o,{label:"Ðконка",name:"favicon",lazy:""},{default:Q(()=>{var m;return[I.mode==="page"?(Z(),J("div",Wi,[O[60]||(O[60]=G("span",{class:"override-label"},"Favicon",-1)),G("div",Bi,[G("span",Hi,he(I.overrides.favicon?"пеÑеопÑеделено Ð´Ð»Ñ ÑÑой ÑÑÑаниÑÑ":"наÑледÑеÑÑÑ Ð¾Ñ ÑайÑа"),1),K(A,{modelValue:I.overrides.favicon,"onUpdate:modelValue":O[18]||(O[18]=p=>I.overrides.favicon=p),size:"small"},null,8,["modelValue"])])])):ee("",!0),G("div",{class:ue({"content-disabled":I.mode==="page"&&!I.overrides.favicon})},[O[61]||(O[61]=G("div",{class:"field-label"},"Favicon (32Ã32, .png)",-1)),K(e,{action:"/api/admin/attachments/upload/favicon",modelValue:I.props.modelValue.favicon||"","onUpdate:modelValue":O[19]||(O[19]=p=>(I.mode==="site"||I.overrides.favicon)&&I.update("favicon",p))},null,8,["modelValue"])],2),I.mode==="page"&&I.overrides.favicon&&((m=I.siteValues)!=null&&m.favicon)?(Z(),J("div",zi,[G("span",null,"â ÐеÑеопÑеделÑÐµÑ Ð·Ð½Ð°Ñение ÑайÑа: "+he(I.siteValues.favicon),1),K($,{size:"small",type:"primary",onClick:O[20]||(O[20]=p=>I.resetField("favicon"))},{default:Q(()=>[...O[62]||(O[62]=[ie("СбÑоÑиÑÑ",-1)])]),_:1})])):ee("",!0)]}),_:1}),K(o,{label:"СайдбаÑ",name:"sidebar",lazy:""},{default:Q(()=>[I.mode==="page"?(Z(),J("div",Vi,[O[63]||(O[63]=G("span",{class:"override-label"}
979,"СайдбаÑ",-1)),G("div",Pi,[G("span",Ui,he(I.overrides.sidebar?"пеÑеопÑеделено Ð´Ð»Ñ ÑÑой ÑÑÑаниÑÑ":"наÑледÑеÑÑÑ Ð¾Ñ ÑайÑа"),1),K(A,{modelValue:I.overrides.sidebar,"onUpdate:modelValue":O[21]||(O[21]=m=>I.overrides.sidebar=m),size:"small"},null,8,["modelValue"])])])):ee("",!0),G("div",{class:ue({"content-disabled":I.mode==="page"&&!I.overrides.sidebar})},[G("div",Gi,[O[64]||(O[64]=G("div",{class:"field-label"},"ÐклÑÑиÑÑ Ð±Ð¾ÐºÐ¾Ð²Ð¾Ðµ менÑ",-1)),K(A,{modelValue:I.props.modelValue.sidebarEnabled??!1,"onUpdate:modelValue":O[22]||(O[22]=m=>(I.mode==="site"||I.overrides.sidebar)&&I.update("sidebarEnabled",m)),disabled:I.mode==="page"&&!I.overrides.sidebar},null,8,["modelValue","disabled"])]),G("div",ji,[O[65]||(O[65]=G("div",{class:"field-label"},"ÐоказÑваÑÑ Ð¿Ð¾ ÑмолÑаниÑ",-1)),K(A,{modelValue:I.props.modelValue.sidebarShowByDefault??!1,"onUpdate:modelValue":O[23]||(O[23]=m=>(I.mode==="site"||I.overrides.sidebar)&&I.update("sidebarShowByDefault",m)),disabled:I.mode==="page"&&!I.overrides.sidebar},null,8,["modelValue","disabled"])]),G("div",Yi,[O[66]||(O[66]=G("div",{class:"field-label"},"ÐÑаÑÑ Ð¿ÑнкÑÑ Ð¸Ð·",-1)),K(i,{modelValue:I.props.modelValue.sidebarItemId??null,"onUpdate:modelValue":O[24]||(O[24]=m=>(I.mode==="site"||I.overrides.sidebar)&&I.update("sidebarItemId",m)),disabled:I.mode==="page"&&!I.overrides.sidebar},null,8,["modelValue","disabled"])])],2),I.mode==="page"&&I.overrides.sidebar?(Z(),J("div",Ki,[O[68]||(O[68]=G("span",null,"â ÐеÑеопÑеделÑÐµÑ Ð½Ð°ÑÑÑойки ÑайдбаÑа ÑайÑа",-1)),K($,{size:"small",type:"primary",onClick:O[25]||(O[25]=m=>I.resetField("sidebar"))},{default:Q(()=>[...O[67]||(O[67]=[ie("СбÑоÑиÑÑ",-1)])]),_:1})])):ee("",!0)]),_:1}),K(o,{label:"ÐÑоÑее",name:"specialVersion",lazy:""},{default:Q(()=>{var m;return[I.mode==="page"?(Z(),J("div",Zi,[O[69]||(O[69]=G("span",{class:"override-label"},"ÐеÑÑÐ¸Ñ Ð´Ð»Ñ ÑлабовидÑÑиÑ
",-1)),G("div",Xi,[G("span",Qi,he(I.overrides.specialVersion?"пеÑеопÑеделено Ð´Ð»Ñ ÑÑой ÑÑÑаниÑÑ":"наÑледÑеÑÑÑ Ð¾Ñ ÑайÑа"),1),K(A,{modelValue:I.overrides.specialVersion,"onUpdate:modelValue":O[26]||(O[26]=p=>I.overrides.specialVersion=p),size:"small"},null,8,["modelValue"])])])):ee("",!0),G("div",{class:ue({"content-disabled":I.mode==="page"&&!I.overrides.specialVersion})},[K(s,{modelValue:I.props.modelValue.specialVersion??!1,"onUpdate:modelValue":O[27]||(O[27]=p=>(I.mode==="site"||I.overrides.specialVersion)&&I.update("specialVersion",p)),disabled:I.mode==="page"&&!I.overrides.specialVersion},{default:Q(()=>[...O[70]||(O[70]=[ie(" ÐеÑÑÐ¸Ñ Ð´Ð»Ñ ÑлабовидÑÑиÑ
",-1)])]),_:1},8,["modelValue","disabled"])],2),I.mode==="page"&&I.overrides.specialVersion&&((m=I.siteValues)==null?void 0:m.specialVersion)!=null?(Z(),J("div",Ji,[G("span",null,"â ÐеÑеопÑеделÑÐµÑ Ð·Ð½Ð°Ñение ÑайÑа: "+he(I.siteValues.specialVersion?"вклÑÑено":"вÑклÑÑено"),1),K($,{size:"small",type:"primary",onClick:O[28]||(O[28]=p=>I.resetField("specialVersion"))},{default:Q(()=>[...O[71]||(O[71]=[ie("СбÑоÑиÑÑ",-1)])]),_:1})])):ee("",!0)]}),_:1})]),_:1},8,["modelValue"]),K(c,{modelValue:I.bgPickerVisible,"onUpdate:modelValue":O[32]||(O[32]=m=>I.bgPickerVisible=m),title:"ÐÑÐ±Ð¾Ñ Ñона ÑÑÑаниÑÑ",width:"740px","append-to-body":"","destroy-on-close":""},{footer:Q(()=>[G("div",qi,[K($,{onClick:O[31]||(O[31]=m=>I.bgPickerVisible=!1)},{default:Q(()=>[...O[72]||(O[72]=[ie("ÐÑмена",-1)])]),_:1}),K($,{type:"primary",disabled:!I.bgPickerValue,onClick:I.confirmBgPicker},{default:Q(()=>[...O[73]||(O[73]=[ie(" ÐÑбÑаÑÑ ",-1)])]),_:1},8,["disabled","onClick"])])]),default:Q(()=>[K(a,{modelValue:I.bgPickerValue,"onUpdate:modelValue":O[30]||(O[30]=m=>I.bgPickerValue=m)},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}const cn=Ne(ui,[["render",en],["__scopeId","data-v-63b72fd6"]]);export{cn as A};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.