1import{c as tt,aT as Xe,g as Ct,aU as At,I as Fe,a as fe,V as Mt,j as Y,b4 as kt,aW as Et,aZ as We}from"./index-DZgiyEfX.js";import{A as xt}from"./AdaptiveCard-CLRS1HMO.js";import{B as $e}from"./Button-BiazGNgx.js";import{D as it}from"./index-bgDa2liZ.js";import{t as Ee,N as xe}from"./Notification-BF4i7x-v.js";import{D as Lt}from"./DataTable-BtH2c0IF.js";import{D as Ie}from"./Dialog-C7lwLQ_P.js";import{S as nt}from"./ScrollBar-BMzJ_aw0.js";import{r as Je}from"./index-Chjiymov.js";import{C as Tt}from"./index-D-G0snlV.js";import{c as rt}from"./cloneDeep-B9FZ8awu.js";import"./Card-C5ft4_IO.js";import"./useUniqueId-DW5n-8sV.js";import"./uniqueId-L6Pf-iJq.js";import"./toString-Ca9MftBt.js";import"./isObjectLike-Bj69nFek.js";import"./isArray-DnKyzTIY.js";import"./isSymbol-8ASRihsl.js";import"./index-BeRbu6Sb.js";import"./index-YFp9qhO8.js";import"./floating-ui.react-rGfnS0rr.js";import"./floating-ui.dom-BbtxUxwo.js";import"./index-zwc5etUn.js";import"./Pagination-DsWqgjOJ.js";import"./useControllableState-D4o7m0Ek.js";import"./Select-D7iKmBzt.js";import"./toConsumableArray-B-bNg196.js";import"./extends-CF3RwP-h.js";import"./index-BFIarCM6.js";import"./last-qTSvMfkb.js";import"./_baseAssignValue-BF5A_HIh.js";import"./isTypedArray-4anjUQKj.js";import"./isObject--vsEa_js.js";import"./TableRowSkeleton-DIIB7wVM.js";import"./Skeleton-7aOzdyBO.js";import"./index-CB8uyaAw.js";import"./index-Cm2GqBhf.js";import"./debounce-Cf1dOWwK.js";import"./debounce-DTvS9hcT.js";import"./throttle-Bx8W9olf.js";import"./_getPrototype-EC_E710j.js";var Be={},Pe={},ze={},ot;function qe(){if(ot)return ze;ot=1;var X=Object.create,z=Object.defineProperty,L=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,I=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty,p=(s,l,t,i)=>{if(l&&typeof l=="object"||typeof l=="function")for(var n=E(l),r=0,e=n.length,o;r<e;r++)o=n[r],!v.call(s,o)&&o!==t&&z(s,o,{get:(a=>l[a]).bind(null,o),enumerable:!(i=L(l,o))||i.enumerable});return s},f=(s,l,t)=>(t=s!=null?X(I(s)):{},p(l||!s||!s.__esModule?z(t,"default",{value:s,enumerable:!0}):t,s));return ze.__toESM=f,ze}var He={},je={exports:{}},st;function De(){return st||(st=1,function(X,z){(function(){var L="ace",E=function(){return this}();!E&&typeof window<"u"&&(E=window);var I=function(t,i,n){if(typeof t!="string"){I.original?I.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(n=i),I.modules[t]||(I.payloads[t]=n,I.modules[t]=null)};I.modules={},I.payloads={};var v=function(t,i,n){if(typeof i=="string"){var r=s(t,i);if(r!=null)return n&&n(),r}else if(Object.prototype.toString.call(i)==="[object Array]"){for(var e=[],o=0,a=i.length;o<a;++o){var c=s(t,i[o]);if(c==null&&p.original)return;e.push(c)}return n&&n.apply(null,e)||!0}},p=function(t,i){var n=v("",t,i);return n==null&&p.original?p.original.apply(this,arguments):n},f=function(t,i){if(i.indexOf("!")!==-1){var n=i.split("!");return f(t,n[0])+"!"+f(t,n[1])}if(i.charAt(0)=="."){var r=t.split("/").slice(0,-1).join("/");for(i=r+"/"+i;i.indexOf(".")!==-1&&e!=i;){var e=i;i=i.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return i},s=function(t,i){i=f(t,i);var n=I.modules[i];if(!n){if(n=I.payloads[i],typeof n=="function"){var r={},e={id:i,uri:"",exports:r,packaged:!0},o=function(c,h){return v(i,c,h)},a=n(o,r,e);r=a||e.exports,I.modules[i]=r,delete I.payloads[i]}n=I.modules[i]=r||n}return n};function l(t){var i=E;E[t]||(E[t]={}),i=E[t],(!i.define||!i.define.packaged)&&(I.original=i.define,i.define=I,i.define.packaged=!0),(!i.require||!i.require.packaged)&&(p.original=i.require,i.require=p,i.require.packaged=!0)}l(L)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(L,E,I){function v(p,f,s){Object.defineProperty(p,f,{value:s,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||v(String.prototype,"startsWith",function(p,f){return f=f||0,this.lastIndexOf(p,f)===f}),String.prototype.endsWith||v(String.prototype,"endsWith",function(p,f){var s=this;(f===void 0||f>s.length)&&(f=s.length),f-=p.length;var l=s.indexOf(p,f);return l!==-1&&l===f}),String.prototype.repeat||v(String.prototype,"repeat",function(p){for(var f="",s=this;p>0;)p&1&&(f+=s),(p>>=1)&&(s+=s);return f}),String.prototype.includes||v(String.prototype,"includes",function(p,f){return this.indexOf(p,f)!=-1}),Object.assign||(Object.assign=function(p){if(p==null)throw new TypeError("Cannot convert undefined or null to object");for(var f=Object(p),s=1;s<arguments.length;s++){var l=arguments[s];l!=null&&Object.keys(l).forEach(function(t){f[t]=l[t]})}return f}),Object.values||(Object.values=function(p){return Object.keys(p).map(function(f){return p[f]})}),Array.prototype.find||v(Array.prototype,"find",function(p){for(var f=this.length,s=arguments[1],l=0;l<f;l++){var t=this[l];if(p.call(s,t,l,this))return t}}),Array.prototype.findIndex||v(Array.prototype,"findIndex",function(p){for(var f=this.length,s=arguments[1],l=0;l<f;l++){var t=this[l];if(p.call(s,t,l,this))return l}}),Array.prototype.includes||v(Array.prototype,"includes",function(p,f){return this.indexOf(p,f)!=-1}),Array.prototype.fill||v(Array.prototype,"fill",function(p){for(var f=this,s=f.length>>>0,l=arguments[1],t=l>>0,i=t<0?Math.max(s+t,0):Math.min(t,s),n=arguments[2],r=n===void 0?s:n>>0,e=r<0?Math.max(s+r,0):Math.min(r,s);i<e;)f[i]=p,i++;return f}),Array.of||v(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(L,E,I){L("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(L,E,I){E.deepCopy=function v(p){if(typeof p!="object"||!p)return p;var f;if(Array.isArray(p)){f=[];for(var s=0;s<p.length;s++)f[s]=v(p[s]);return f}if(Object.prototype.toString.call(p)!=="[object Object]")return p;f={};for(var s in p)f[s]=v(p[s]);return f}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(L,E,I){E.last=function(f){return f[f.length-1]}
1,E.stringReverse=function(f){return f.split("").reverse().join("")},E.stringRepeat=function(f,s){for(var l="";s>0;)s&1&&(l+=f),(s>>=1)&&(f+=f);return l};var v=/^\s\s*/,p=/\s\s*$/;E.stringTrimLeft=function(f){return f.replace(v,"")},E.stringTrimRight=function(f){return f.replace(p,"")},E.copyObject=function(f){var s={};for(var l in f)s[l]=f[l];return s},E.copyArray=function(f){for(var s=[],l=0,t=f.length;l<t;l++)f[l]&&typeof f[l]=="object"?s[l]=this.copyObject(f[l]):s[l]=f[l];return s},E.deepCopy=L("./deep_copy").deepCopy,E.arrayToMap=function(f){for(var s={},l=0;l<f.length;l++)s[f[l]]=1;return s},E.createMap=function(f){var s=Object.create(null);for(var l in f)s[l]=f[l];return s},E.arrayRemove=function(f,s){for(var l=0;l<=f.length;l++)s===f[l]&&f.splice(l,1)},E.escapeRegExp=function(f){return f.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},E.escapeHTML=function(f){return(""+f).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},E.getMatchOffsets=function(f,s){var l=[];return f.replace(s,function(t){l.push({offset:arguments[arguments.length-2],length:t.length})}),l},E.deferredCall=function(f){var s=null,l=function(){s=null,f()},t=function(i){return t.cancel(),s=setTimeout(l,i||0),t};return t.schedule=t,t.call=function(){return this.cancel(),f(),t},t.cancel=function(){return clearTimeout(s),s=null,t},t.isPending=function(){return s},t},E.delayedCall=function(f,s){var l=null,t=function(){l=null,f()},i=function(n){l==null&&(l=setTimeout(t,n||s))};return i.delay=function(n){l&&clearTimeout(l),l=setTimeout(t,n||s)},i.schedule=i,i.call=function(){this.cancel(),f()},i.cancel=function(){l&&clearTimeout(l),l=null},i.isPending=function(){return l},i},E.sleep=function(f){return new Promise(function(s){setTimeout(s,f)})},E.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},E.skipEmptyMatch=function(f,s,l){return l&&f.codePointAt(s)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(L,E,I){E.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},E.getOS=function(){return E.isMac?E.OS.MAC:E.isLinux?E.OS.LINUX:E.OS.WINDOWS};var v=typeof navigator=="object"?navigator:{},p=(/mac|win|linux/i.exec(v.platform)||["other"])[0].toLowerCase(),f=v.userAgent||"",s=v.appName||"";E.isWin=p=="win",E.isMac=p=="mac",E.isLinux=p=="linux",E.isIE=s=="Microsoft Internet Explorer"||s.indexOf("MSAppHost")>=0?parseFloat((f.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((f.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),E.isOldIE=E.isIE&&E.isIE<9,E.isGecko=E.isMozilla=f.match(/ Gecko\/\d+/),E.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",E.isWebKit=parseFloat(f.split("WebKit/")[1])||void 0,E.isChrome=parseFloat(f.split(" Chrome/")[1])||void 0,E.isSafari=parseFloat(f.split(" Safari/")[1])&&!E.isChrome||void 0,E.isEdge=parseFloat(f.split(" Edge/")[1])||void 0,E.isAIR=f.indexOf("AdobeAIR")>=0,E.isAndroid=f.indexOf("Android")>=0,E.isChromeOS=f.indexOf(" CrOS ")>=0,E.isIOS=/iPad|iPhone|iPod/.test(f)&&!window.MSStream,E.isIOS&&(E.isMac=!0),E.isMobile=E.isIOS||E.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(L,E,I){var v=L("./useragent"),p="http://www.w3.org/1999/xhtml";E.buildDom=function n(r,e,o){if(typeof r=="string"&&r){var a=document.createTextNode(r);return e&&e.appendChild(a),a}if(!Array.isArray(r))return r&&r.appendChild&&e&&e.appendChild(r),r;if(typeof r[0]!="string"||!r[0]){for(var c=[],h=0;h<r.length;h++){var w=n(r[h],e,o);w&&c.push(w)}return c}var y=document.createElement(r[0]),m=r[1],d=1;m&&typeof m=="object"&&!Array.isArray(m)&&(d=2);for(var h=d;h<r.length;h++)n(r[h],y,o);return d==2&&Object.keys(m).forEach(function(C){var x=m[C];C==="class"?y.className=Array.isArray(x)?x.join(" "):x:typeof x=="function"||C=="value"||C[0]=="$"?y[C]=x:C==="ref"?o&&(o[x]=y):C==="style"?typeof x=="string"&&(y.style.cssText=x):x!=null&&y.setAttribute(C,x)}),e&&e.appendChild(y),y},E.getDocumentHead=function(n){return n||(n=document),n.head||n.getElementsByTagName("head")[0]||n.documentElement},E.createElement=function(n,r){return document.createElementNS?document.createElementNS(r||p,n):document.createElement(n)},E.removeChildren=function(n){n.innerHTML=""},E.createTextNode=function(n,r){var e=r?r.ownerDocument:document;return e.createTextNode(n)},E.createFragment=function(n){var r=n?n.ownerDocument:document;return r.createDocumentFragment()},E.hasCssClass=function(n,r){var e=(n.className+"").split(/\s+/g);return e.indexOf(r)!==-1},E.addCssClass=function(n,r){E.hasCssClass(n,r)||(n.className+=" "+r)},E.removeCssClass=function(n,r){for(var e=n.className.split(/\s+/g);;){var o=e.indexOf(r);if(o==-1)break;e.splice(o,1)}n.className=e.join(" ")},E.toggleCssClass=function(n,r){for(var e=n.className.split(/\s+/g),o=!0;;){var a=e.indexOf(r);if(a==-1)break;o=!1,e.splice(a,1)}return o&&e.push(r),n.className=e.join(" "),o},E.setCssClass=function(n,r,e){e?E.addCssClass(n,r):E.removeCssClass(n,r)},E.hasCssString=function(n,r){var e=0,o;if(r=r||document,o=r.querySelectorAll("style")){for(;e<o.length;)if(o[e++].id===n)return!0}},E.removeElementById=function(n,r){r=r||document,r.getElementById(n)&&r.getElementById(n).remove()};var f,s=[];E.useStrictCSP=function(n){f=n,n==!1?l():s||(s=[])};function l(){var n=s;
1s=null,n&&n.forEach(function(r){t(r[0],r[1])})}function t(n,r,e){if(!(typeof document>"u")){if(s){if(e)l();else if(e===!1)return s.push([n,r])}if(!f){var o=e;!e||!e.getRootNode?o=document:(o=e.getRootNode(),(!o||o==e)&&(o=document));var a=o.ownerDocument||o;if(r&&E.hasCssString(r,o))return null;r&&(n+=` 2/*# sourceURL=ace/css/`+r+" */");var c=E.createElement("style");c.appendChild(a.createTextNode(n)),r&&(c.id=r),o==a&&(o=E.getDocumentHead(a)),o.insertBefore(c,o.firstChild)}}}if(E.importCssString=t,E.importCssStylsheet=function(n,r){E.buildDom(["link",{rel:"stylesheet",href:n}],E.getDocumentHead(r))},E.$fixPositionBug=function(n){var r=n.getBoundingClientRect();if(n.style.left){var e=parseFloat(n.style.left),o=+r.left;Math.abs(e-o)>1&&(n.style.left=2*e-o+"px")}if(n.style.right){var e=parseFloat(n.style.right),o=window.innerWidth-r.right;Math.abs(e-o)>1&&(n.style.right=2*e-o+"px")}if(n.style.top){var e=parseFloat(n.style.top),o=+r.top;Math.abs(e-o)>1&&(n.style.top=2*e-o+"px")}if(n.style.bottom){var e=parseFloat(n.style.bottom),o=window.innerHeight-r.bottom;Math.abs(e-o)>1&&(n.style.bottom=2*e-o+"px")}},E.scrollbarWidth=function(n){var r=E.createElement("ace_inner");r.style.width="100%",r.style.minWidth="0px",r.style.height="200px",r.style.display="block";var e=E.createElement("ace_outer"),o=e.style;o.position="absolute",o.left="-10000px",o.overflow="hidden",o.width="200px",o.minWidth="0px",o.height="150px",o.display="block",e.appendChild(r);var a=n&&n.documentElement||document&&document.documentElement;if(!a)return 0;a.appendChild(e);var c=r.offsetWidth;o.overflow="scroll";var h=r.offsetWidth;return c===h&&(h=e.clientWidth),a.removeChild(e),c-h},E.computedStyle=function(n,r){return window.getComputedStyle(n,"")||{}},E.setStyle=function(n,r,e){n[r]!==e&&(n[r]=e)},E.HAS_CSS_ANIMATION=!1,E.HAS_CSS_TRANSFORMS=!1,E.HI_DPI=v.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,v.isChromeOS&&(E.HI_DPI=!1),typeof document<"u"){var i=document.createElement("div");E.HI_DPI&&i.style.transform!==void 0&&(E.HAS_CSS_TRANSFORMS=!0),!v.isEdge&&typeof i.style.animationName<"u"&&(E.HAS_CSS_ANIMATION=!0),i=null}E.HAS_CSS_TRANSFORMS?E.translate=function(n,r,e){n.style.transform="translate("+Math.round(r)+"px, "+Math.round(e)+"px)"}:E.translate=function(n,r,e){n.style.top=Math.round(e)+"px",n.style.left=Math.round(r)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(L,E,I){/* 3* based on code from: 4* 5* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. 6* Available via the MIT or new BSD license. 7* see: http://github.com/jrburke/requirejs for details 8*/var v=L("./dom");E.get=function(p,f){var s=new XMLHttpRequest;s.open("GET",p,!0),s.onreadystatechange=function(){s.readyState===4&&f(s.responseText)},s.send(null)},E.loadScript=function(p,f){var s=v.getDocumentHead(),l=document.createElement("script");l.src=p,s.appendChild(l),l.onload=l.onreadystatechange=function(t,i){(i||!l.readyState||l.readyState=="loaded"||l.readyState=="complete")&&(l=l.onload=l.onreadystatechange=null,i||f())}},E.qualifyURL=function(p){var f=document.createElement("a");return f.href=p,f.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(L,E,I){E.inherits=function(v,p){v.super_=p,v.prototype=Object.create(p.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}})},E.mixin=function(v,p){for(var f in p)v[f]=p[f];return v},E.implement=function(v,p){E.mixin(v,p)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(L,E,I){var v={},p=function(){this.propagationStopped=!0},f=function(){this.defaultPrevented=!0};v._emit=v._dispatchEvent=function(s,l){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var t=this._eventRegistry[s]||[],i=this._defaultHandlers[s];if(!(!t.length&&!i)){(typeof l!="object"||!l)&&(l={}),l.type||(l.type=s),l.stopPropagation||(l.stopPropagation=p),l.preventDefault||(l.preventDefault=f),t=t.slice();for(var n=0;n<t.length&&(t[n](l,this),!l.propagationStopped);n++);if(i&&!l.defaultPrevented)return i(l,this)}},v._signal=function(s,l){var t=(this._eventRegistry||{})[s];if(t){t=t.slice();for(var i=0;i<t.length;i++)t[i](l,this)}},v.once=function(s,l){var t=this;if(this.on(s,function i(){t.off(s,i),l.apply(null,arguments)}),!l)return new Promise(function(i){l=i})},v.setDefaultHandler=function(s,l){var t=this._defaultHandlers;if(t||(t=this._defaultHandlers={_disabled_:{}}),t[s]){var i=t[s],n=t._disabled_[s];n||(t._disabled_[s]=n=[]),n.push(i);var r=n.indexOf(l);r!=-1&&n.splice(r,1)}t[s]=l},v.removeDefaultHandler=function(s,l){var t=this._defaultHandlers;if(t){var i=t._disabled_[s];if(t[s]==l)i&&this.setDefaultHandler(s,i.pop());else if(i){var n=i.indexOf(l);n!=-1&&i.splice(n,1)}}},v.on=v.addEventListener=function(s,l,t){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[s];
8return i||(i=this._eventRegistry[s]=[]),i.indexOf(l)==-1&&i[t?"unshift":"push"](l),l},v.off=v.removeListener=v.removeEventListener=function(s,l){this._eventRegistry=this._eventRegistry||{};var t=this._eventRegistry[s];if(t){var i=t.indexOf(l);i!==-1&&t.splice(i,1)}},v.removeAllListeners=function(s){s||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[s]=void 0),this._defaultHandlers&&(this._defaultHandlers[s]=void 0)},E.EventEmitter=v}),ace.define("ace/lib/report_error",["require","exports","module"],function(L,E,I){E.reportError=function(p,f){var s=new Error(p);s.data=f,typeof console=="object"&&console.error&&console.error(s),setTimeout(function(){throw s})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(L,E,I){var v={"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":"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"};E.defaultEnglishMessages=v}),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(L,E,I){"no use strict";var v=L("./oop"),p=L("./event_emitter").EventEmitter,f=L("./report_error").reportError,s=L("./default_english_messages").defaultEnglishMessages,l={setOptions:function(e){Object.keys(e).forEach(function(o){this.setOption(o,e[o])},this)},getOptions:function(e){var o={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var a=this.$options;e=Object.keys(a).filter(function(c){return!a[c].hidden})}return e.forEach(function(c){o[c]=this.getOption(c)},this),o},setOption:function(e,o){if(this["$"+e]!==o){var a=this.$options[e];if(!a)return t('misspelled option "'+e+'"');if(a.forwardTo)return this[a.forwardTo]&&this[a.forwardTo].setOption(e,o);a.handlesSet||(this["$"+e]=o),a&&a.set&&a.set.call(this,o)}},getOption:function(e){var o=this.$options[e];return o?o.forwardTo?this[o.forwardTo]&&this[o.forwardTo].getOption(e):o&&o.get?o.get.call(this):this["$"+e]:t('misspelled option "'+e+'"')}};function t(e){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var i,n,r=function(){function e(){this.$defaultOptions={},i=s,n="dollarSigns"}return e.prototype.defineOptions=function(o,a,c){return o.$options||(this.$defaultOptions[a]=o.$options={}
8),Object.keys(c).forEach(function(h){var w=c[h];typeof w=="string"&&(w={forwardTo:w}),w.name||(w.name=h),o.$options[w.name]=w,"initialValue"in w&&(o["$"+w.name]=w.initialValue)}),v.implement(o,l),this},e.prototype.resetOptions=function(o){Object.keys(o.$options).forEach(function(a){var c=o.$options[a];"value"in c&&o.setOption(a,c.value)})},e.prototype.setDefaultValue=function(o,a,c){if(!o){for(o in this.$defaultOptions)if(this.$defaultOptions[o][a])break;if(!this.$defaultOptions[o][a])return!1}var h=this.$defaultOptions[o]||(this.$defaultOptions[o]={});h[a]&&(h.forwardTo?this.setDefaultValue(h.forwardTo,a,c):h[a].value=c)},e.prototype.setDefaultValues=function(o,a){Object.keys(a).forEach(function(c){this.setDefaultValue(o,c,a[c])},this)},e.prototype.setMessages=function(o,a){i=o,a&&a.placeholders&&(n=a.placeholders)},e.prototype.nls=function(o,a,c){i[o]||(t("No message found for the key '"+o+"' in messages with id "+i.$id+", trying to find a translation for the default string '"+a+"'."),i[a]||t("No message found for the default string '"+a+"' in the provided messages. Falling back to the default English message."));var h=i[o]||i[a]||a;return c&&(n==="dollarSigns"&&(h=h.replace(/\$(\$|[\d]+)/g,function(w,y){return y=="$"?"$":c[y]})),n==="curlyBrackets"&&(h=h.replace(/\{([^\}]+)\}/g,function(w,y){return c[y]}))),h},e}();r.prototype.warn=t,r.prototype.reportError=f,v.implement(r.prototype,p),E.AppConfig=r}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(L,E,I){I.exports=`.ace-tm .ace_gutter { 9 background: #f0f0f0; 10 color: #333; 11} 12 13.ace-tm .ace_print-margin { 14 width: 1px; 15 background: #e8e8e8; 16} 17 18.ace-tm .ace_fold { 19 background-color: #6B72E6; 20} 21 22.ace-tm { 23 background-color: #FFFFFF; 24 color: black; 25} 26 27.ace-tm .ace_cursor { 28 color: black; 29} 30 31.ace-tm .ace_invisible { 32 color: rgb(191, 191, 191); 33} 34 35.ace-tm .ace_storage, 36.ace-tm .ace_keyword { 37 color: blue; 38} 39 40.ace-tm .ace_constant { 41 color: rgb(197, 6, 11); 42} 43 44.ace-tm .ace_constant.ace_buildin { 45 color: rgb(88, 72, 246); 46} 47 48.ace-tm .ace_constant.ace_language { 49 color: rgb(88, 92, 246); 50} 51 52.ace-tm .ace_constant.ace_library { 53 color: rgb(6, 150, 14); 54} 55 56.ace-tm .ace_invalid { 57 background-color: rgba(255, 0, 0, 0.1); 58 color: red; 59} 60 61.ace-tm .ace_support.ace_function { 62 color: rgb(60, 76, 114); 63} 64 65.ace-tm .ace_support.ace_constant { 66 color: rgb(6, 150, 14); 67} 68 69.ace-tm .ace_support.ace_type, 70.ace-tm .ace_support.ace_class { 71 color: rgb(109, 121, 222); 72} 73 74.ace-tm .ace_keyword.ace_operator { 75 color: rgb(104, 118, 135); 76} 77 78.ace-tm .ace_string { 79 color: rgb(3, 106, 7); 80} 81 82.ace-tm .ace_comment { 83 color: rgb(76, 136, 107); 84} 85 86.ace-tm .ace_comment.ace_doc { 87 color: rgb(0, 102, 255); 88} 89 90.ace-tm .ace_comment.ace_doc.ace_tag { 91 color: rgb(128, 159, 191); 92} 93 94.ace-tm .ace_constant.ace_numeric { 95 color: rgb(0, 0, 205); 96} 97 98.ace-tm .ace_variable { 99 color: rgb(49, 132, 149); 100} 101 102.ace-tm .ace_xml-pe { 103 color: rgb(104, 104, 91); 104} 105 106.ace-tm .ace_entity.ace_name.ace_function { 107 color: #0000A2; 108} 109 110 111.ace-tm .ace_heading { 112 color: rgb(12, 7, 255); 113} 114 115.ace-tm .ace_list { 116 color:rgb(185, 6, 144); 117} 118 119.ace-tm .ace_meta.ace_tag { 120 color:rgb(0, 22, 142); 121} 122 123.ace-tm .ace_string.ace_regex { 124 color: rgb(255, 0, 0) 125} 126 127.ace-tm .ace_marker-layer .ace_selection { 128 background: rgb(181, 213, 255); 129} 130.ace-tm.ace_multiselect .ace_selection.ace_start { 131 box-shadow: 0 0 3px 0px white; 132} 133.ace-tm .ace_marker-layer .ace_step { 134 background: rgb(252, 255, 0); 135} 136 137.ace-tm .ace_marker-layer .ace_stack { 138 background: rgb(164, 229, 101); 139} 140 141.ace-tm .ace_marker-layer .ace_bracket { 142 margin: -1px 0 0 -1px; 143 border: 1px solid rgb(192, 192, 192); 144} 145 146.ace-tm .ace_marker-layer .ace_active-line { 147 background: rgba(0, 0, 0, 0.07); 148} 149 150.ace-tm .ace_gutter-active-line { 151 background-color : #dcdcdc; 152} 153 154.ace-tm .ace_marker-layer .ace_selected-word { 155 background: rgb(250, 250, 255); 156 border: 1px solid rgb(200, 200, 250); 157} 158 159.ace-tm .ace_indent-guide { 160 background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y; 161} 162 163.ace-tm .ace_indent-guide-active { 164 background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y; 165} 166`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(L,E,I){E.isDark=!1,E.cssClass="ace-tm",E.cssText=L("./textmate-css"),E.$id="ace/theme/textmate";var v=L("../lib/dom");v.importCssString(E.cssText,E.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(L,E,I){"no use strict";var v=L("./lib/lang"),p=L("./lib/net"),f=L("./lib/dom"),s=L("./lib/app_config").AppConfig;I.exports=E=new s;var l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};E.get=function(r){if(!l.hasOwnProperty(r))throw new Error("Unknown config key: "+r);return l[r]},E.set=function(r,e){if(l.hasOwnProperty(r))l[r]=e;else if(this.setDefaultValue("",r,e)==!1)throw new Error("Unknown config key: "+r);r=="useStrictCSP"&&f.useStrictCSP(e)},E.all=function(){return v.copyObject(l)},E.$modes={},E.moduleUrl=function(r,e){if(l.$moduleUrls[r])return l.$moduleUrls[r];var o=r.split("/");e=e||o[o.length-2]||"";var a=e=="snippets"?"/":"-",c=o[o.length-1];if(e=="worker"&&a=="-"){var h=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");c=c.replace(h,"")}(!c||c==e)&&o.length>1&&(c=o[o.length-2]);var w=l[e+"Path"];return w==null?w=l.basePath:a=="/"&&(e=a=""),w&&w.slice(-1)!="/"&&(w+="/"),w+e+a+c+this.get("suffix")},E.setModuleUrl=function(r,e){return l.$moduleUrls[r]=e};var t=function(r,e){if(r==="ace/theme/textmate"||r==="./theme/textmate")return e(null,L("./theme/textmate"));if(i)return i(r,e);console.error("loader is not configured")},i;
166E.setLoader=function(r){i=r},E.dynamicModules=Object.create(null),E.$loading={},E.$loaded={},E.loadModule=function(r,e){var o;if(Array.isArray(r))var a=r[0],c=r[1];else if(typeof r=="string")var c=r;var h=function(w){if(w&&!E.$loading[c])return e&&e(w);if(E.$loading[c]||(E.$loading[c]=[]),E.$loading[c].push(e),!(E.$loading[c].length>1)){var y=function(){t(c,function(m,d){d&&(E.$loaded[c]=d),E._emit("load.module",{name:c,module:d});var C=E.$loading[c];E.$loading[c]=null,C.forEach(function(x){x&&x(d)})})};if(!E.get("packaged"))return y();p.loadScript(E.moduleUrl(c,a),y),n()}};if(E.dynamicModules[c])E.dynamicModules[c]().then(function(w){w.default?h(w.default):h(w)});else{try{o=this.$require(c)}catch{}h(o||E.$loaded[c])}},E.$require=function(r){if(typeof I.require=="function"){var e="require";return I[e](r)}},E.setModuleLoader=function(r,e){E.dynamicModules[r]=e};var n=function(){!l.basePath&&!l.workerPath&&!l.modePath&&!l.themePath&&!Object.keys(l.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),n=function(){})};E.version="1.44.0"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(L,E,I){L("./lib/fixoldbrowsers");var v=L("./config");v.setLoader(function(l,t){L([l],function(i){t(null,i)})});var p=function(){return this||typeof window<"u"&&window}();I.exports=function(l){v.init=f,v.$require=L,l.require=L},f(!0);function f(l){if(!(!p||!p.document)){v.set("packaged",l||L.packaged||I.packaged||p.define&&(void 0).packaged);var t={},i="",n=document.currentScript||document._currentScript,r=n&&n.ownerDocument||document;n&&n.src&&(i=n.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=r.getElementsByTagName("script"),o=0;o<e.length;o++){var a=e[o],c=a.src||a.getAttribute("src");if(c){for(var h=a.attributes,w=0,y=h.length;w<y;w++){var m=h[w];m.name.indexOf("data-ace-")===0&&(t[s(m.name.replace(/^data-ace-/,""))]=m.value)}var d=c.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);d&&(i=d[1])}}i&&(t.base=t.base||i,t.packaged=!0),t.basePath=t.base,t.workerPath=t.workerPath||t.base,t.modePath=t.modePath||t.base,t.themePath=t.themePath||t.base,delete t.base;for(var C in t)typeof t[C]<"u"&&v.set(C,t[C])}}function s(l){return l.replace(/-(.)/g,function(t,i){return i.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(L,E,I){var v=function(){function p(f,s,l,t){this.start={row:f,column:s},this.end={row:l,column:t}}return p.prototype.isEqual=function(f){return this.start.row===f.start.row&&this.end.row===f.end.row&&this.start.column===f.start.column&&this.end.column===f.end.column},p.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},p.prototype.contains=function(f,s){return this.compare(f,s)==0},p.prototype.compareRange=function(f){var s,l=f.end,t=f.start;return s=this.compare(l.row,l.column),s==1?(s=this.compare(t.row,t.column),s==1?2:s==0?1:0):s==-1?-2:(s=this.compare(t.row,t.column),s==-1?-1:s==1?42:0)},p.prototype.comparePoint=function(f){return this.compare(f.row,f.column)},p.prototype.containsRange=function(f){return this.comparePoint(f.start)==0&&this.comparePoint(f.end)==0},p.prototype.intersects=function(f){var s=this.compareRange(f);return s==-1||s==0||s==1},p.prototype.isEnd=function(f,s){return this.end.row==f&&this.end.column==s},p.prototype.isStart=function(f,s){return this.start.row==f&&this.start.column==s},p.prototype.setStart=function(f,s){typeof f=="object"?(this.start.column=f.column,this.start.row=f.row):(this.start.row=f,this.start.column=s)},p.prototype.setEnd=function(f,s){typeof f=="object"?(this.end.column=f.column,this.end.row=f.row):(this.end.row=f,this.end.column=s)},p.prototype.inside=function(f,s){return this.compare(f,s)==0?!(this.isEnd(f,s)||this.isStart(f,s)):!1},p.prototype.insideStart=function(f,s){return this.compare(f,s)==0?!this.isEnd(f,s):!1},p.prototype.insideEnd=function(f,s){return this.compare(f,s)==0?!this.isStart(f,s):!1},p.prototype.compare=function(f,s){return!this.isMultiLine()&&f===this.start.row?s<this.start.column?-1:s>this.end.column?1:0:f<this.start.row?-1:f>this.end.row?1:this.start.row===f?s>=this.start.column?0:-1:this.end.row===f?s<=this.end.column?0:1:0},p.prototype.compareStart=function(f,s){return this.start.row==f&&this.start.column==s?-1:this.compare(f,s)},p.prototype.compareEnd=function(f,s){return this.end.row==f&&this.end.column==s?1:this.compare(f,s)},p.prototype.compareInside=function(f,s){return this.end.row==f&&this.end.column==s?1:this.start.row==f&&this.start.column==s?-1:this.compare(f,s)},p.prototype.clipRows=function(f,s){if(this.end.row>s)var l={row:s+1,column:0};else if(this.end.row<f)var l={row:f,column:0};if(this.start.row>s)var t={row:s+1,column:0};else if(this.start.row<f)var t={row:f,column:0};return p.fromPoints(t||this.start,l||this.end)},p.prototype.extend=function(f,s){var l=this.compare(f,s);if(l==0)return this;if(l==-1)var t={row:f,column:s};else var i={row:f,column:s};return p.fromPoints(t||this.start,i||this.end)},p.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},p.prototype.isMultiLine=function(){return this.start.row!==this.end.row},p.prototype.clone=function(){return p.fromPoints(this.start,this.end)},p.prototype.collapseRows=function(){return this.end.column==0?new p(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new p(this.start.row,0,this.end.row,0)},p.prototype.toScreenRange=function(f){var s=f.documentToScreenPosition(this.start),l=f.documentToScreenPosition(this.end);return new p(s.row,s.column,l.row,l.column)},p.prototype.moveBy=function(f,s){this.start.row+=f,this.start.column+=s,this.end.row+=f,this.end.column+=s},p}();v.fromPoints=function(p,f){return new v(p.row,p.column,f.row,f.column)},v.comparePoints=function(p,f){return p.row-f.row||p.column-f.column},E.Range=v}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(L,E,I){for(var v=L("./oop"),p={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}
166,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:"*"}},f={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},s=0;s<10;s++)f["Digit"+s]=48+s,f["Numpad"+s]=96+s,p.PRINTABLE_KEYS[48+s]=""+s,p.FUNCTION_KEYS[96+s]="Numpad"+s;for(var s=65;s<91;s++){var l=String.fromCharCode(s+32);f["Key"+l.toUpperCase()]=s,p.PRINTABLE_KEYS[s]=l}for(var s=1;s<13;s++)f["F"+s]=111+s,p.FUNCTION_KEYS[111+s]="F"+s;var t={Shift:16,Control:17,Alt:18,Meta:224};for(var i in t)f[i]=f[i+"Left"]=f[i+"Right"]=t[i];E.$codeToKeyCode=f,p.PRINTABLE_KEYS[173]="-";for(var n in p.FUNCTION_KEYS){var r=p.FUNCTION_KEYS[n].toLowerCase();p[r]=parseInt(n,10)}for(var n in p.PRINTABLE_KEYS){var r=p.PRINTABLE_KEYS[n].toLowerCase();p[r]=parseInt(n,10)}v.mixin(p,p.MODIFIER_KEYS),v.mixin(p,p.PRINTABLE_KEYS),v.mixin(p,p.FUNCTION_KEYS),p.enter=p.return,p.escape=p.esc,p.del=p.delete,function(){for(var e=["cmd","ctrl","alt","shift"],o=Math.pow(2,e.length);o--;)p.KEY_MODS[o]=e.filter(function(a){return o&p.KEY_MODS[a]}).join("-")+"-"}(),p.KEY_MODS[0]="",p.KEY_MODS[-1]="input-",v.mixin(E,p),E.default=E,E.keyCodeToString=function(e){var o=p[e];return typeof o!="string"&&(o=String.fromCharCode(e)),o.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(L,E,I){var v=L("./keys"),p=L("./useragent"),f=null,s=0,l;function t(){l=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return l={passive:!1},!0}})}catch{}}function i(){return l==null&&t(),l}function n(w,y,m){this.elem=w,this.type=y,this.callback=m}n.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var r=E.addListener=function(w,y,m,d){w.addEventListener(y,m,i()),d&&d.$toDestroy.push(new n(w,y,m))},e=E.removeListener=function(w,y,m){w.removeEventListener(y,m,i())};E.stopEvent=function(w){return E.stopPropagation(w),E.preventDefault(w),!1},E.stopPropagation=function(w){w.stopPropagation&&w.stopPropagation()},E.preventDefault=function(w){w.preventDefault&&w.preventDefault()},E.getButton=function(w){return w.type=="dblclick"?0:w.type=="contextmenu"||p.isMac&&w.ctrlKey&&!w.altKey&&!w.shiftKey?2:w.button},E.capture=function(w,y,m){var d=w&&w.ownerDocument||document;function C(x){y&&y(x),m&&m(x),e(d,"mousemove",y),e(d,"mouseup",C),e(d,"dragstart",C)}return r(d,"mousemove",y),r(d,"mouseup",C),r(d,"dragstart",C),C},E.addMouseWheelListener=function(w,y,m){r(w,"wheel",function(d){var C=.15,x=d.deltaX||0,A=d.deltaY||0;switch(d.deltaMode){case d.DOM_DELTA_PIXEL:d.wheelX=x*C,d.wheelY=A*C;break;case d.DOM_DELTA_LINE:var M=15;d.wheelX=x*M,d.wheelY=A*M;break;case d.DOM_DELTA_PAGE:var _=150;d.wheelX=x*_,d.wheelY=A*_;break}y(d)},m)},E.addMultiMouseDownListener=function(w,y,m,d,C){var x=0,A,M,_,S={2:"dblclick",3:"tripleclick",4:"quadclick"};function $(g){if(E.getButton(g)!==0?x=0:g.detail>1?(x++,x>4&&(x=1)):x=1,p.isIE){var u=Math.abs(g.clientX-A)>5||Math.abs(g.clientY-M)>5;(!_||u)&&(x=1),_&&clearTimeout(_),_=setTimeout(function(){_=null},y[x-1]||600),x==1&&(A=g.clientX,M=g.clientY)}if(g._clicks=x,m[d]("mousedown",g),x>4)x=0;else if(x>1)return m[d](S[x],g)}
166Array.isArray(w)||(w=[w]),w.forEach(function(g){r(g,"mousedown",$,C)})};function o(w){return 0|(w.ctrlKey?1:0)|(w.altKey?2:0)|(w.shiftKey?4:0)|(w.metaKey?8:0)}E.getModifierString=function(w){return v.KEY_MODS[o(w)]};function a(w,y,m){var d=o(y);if(!m&&y.code&&(m=v.$codeToKeyCode[y.code]||m),!p.isMac&&f){if(y.getModifierState&&(y.getModifierState("OS")||y.getModifierState("Win"))&&(d|=8),f.altGr)if((3&d)!=3)f.altGr=0;else return;if(m===18||m===17){var C=y.location;if(m===17&&C===1)f[m]==1&&(s=y.timeStamp);else if(m===18&&d===3&&C===2){var x=y.timeStamp-s;x<50&&(f.altGr=!0)}}}if(m in v.MODIFIER_KEYS&&(m=-1),!(!d&&m===13&&y.location===3&&(w(y,d,-m),y.defaultPrevented))){if(p.isChromeOS&&d&8){if(w(y,d,m),y.defaultPrevented)return;d&=-9}return!d&&!(m in v.FUNCTION_KEYS)&&!(m in v.PRINTABLE_KEYS)?!1:w(y,d,m)}}E.addCommandKeyListener=function(w,y,m){var d=null;r(w,"keydown",function(C){f[C.keyCode]=(f[C.keyCode]||0)+1;var x=a(y,C,C.keyCode);return d=C.defaultPrevented,x},m),r(w,"keypress",function(C){d&&(C.ctrlKey||C.altKey||C.shiftKey||C.metaKey)&&(E.stopEvent(C),d=null)},m),r(w,"keyup",function(C){f[C.keyCode]=null},m),f||(c(),r(window,"focus",c))};function c(){f=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!p.isOldIE){var h=1;E.nextTick=function(w,y){y=y||window;var m="zero-timeout-message-"+h++,d=function(C){C.data==m&&(E.stopPropagation(C),e(y,"message",d),w())};r(y,"message",d),y.postMessage(m,"*")}}E.$idleBlocked=!1,E.onIdle=function(w,y){return setTimeout(function m(){E.$idleBlocked?setTimeout(m,100):w()},y)},E.$idleBlockId=null,E.blockIdle=function(w){E.$idleBlockId&&clearTimeout(E.$idleBlockId),E.$idleBlocked=!0,E.$idleBlockId=setTimeout(function(){E.$idleBlocked=!1},w||100)},E.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),E.nextFrame?E.nextFrame=E.nextFrame.bind(window):E.nextFrame=function(w){setTimeout(w,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(L,E,I){var v;I.exports={lineMode:!1,pasteCancelled:function(){return v&&v>Date.now()-50?!0:v=!1},cancel:function(){v=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(L,E,I){var v=L("../lib/event"),p=L("../config").nls,f=L("../lib/useragent"),s=L("../lib/dom"),l=L("../lib/lang"),t=L("../clipboard"),i=f.isChrome<18,n=f.isIE,r=f.isChrome>63,e=400,o=L("../lib/keys"),a=o.KEY_MODS,c=f.isIOS,h=c?/\s/:/\n/,w=f.isMobile,y=function(){function m(d,C){var x=this;this.host=C,this.text=s.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",d.insertBefore(this.text,d.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",w||(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"}),v.addListener(this.text,"blur",function(A){x.ignoreFocusEvents||(C.onBlur(A),x.$isFocused=!1)},C),v.addListener(this.text,"focus",function(A){if(!x.ignoreFocusEvents){if(x.$isFocused=!0,f.isEdge)try{if(!document.hasFocus())return}catch{}C.onFocus(A),f.isEdge?setTimeout(x.resetSelection.bind(x)):x.resetSelection()}},C),this.$focusScroll=!1,C.on("beforeEndOperation",function(){var A=C.curOp,M=A&&A.command&&A.command.name;if(M!="insertstring"){var _=M&&(A.docChanged||A.selectionChanged);
166x.inComposition&&_&&(x.lastValue=x.text.value="",x.onCompositionEnd()),x.resetSelection()}}),C.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=c?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&C.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,v.addCommandKeyListener(this.text,function(A,M,_){if(!x.inComposition)return C.onCommandKey(A,M,_)},C),v.addListener(this.text,"select",this.onSelect.bind(this),C),v.addListener(this.text,"input",this.onInput.bind(this),C),v.addListener(this.text,"cut",this.onCut.bind(this),C),v.addListener(this.text,"copy",this.onCopy.bind(this),C),v.addListener(this.text,"paste",this.onPaste.bind(this),C),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&v.addListener(d,"keydown",function(A){if(!(f.isMac&&!A.metaKey||!A.ctrlKey))switch(A.keyCode){case 67:x.onCopy(A);break;case 86:x.onPaste(A);break;case 88:x.onCut(A);break}},C),this.syncComposition=l.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),v.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),C),v.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),C),v.addListener(this.text,"keyup",this.onKeyup.bind(this),C),v.addListener(this.text,"keydown",this.syncComposition.bind(this),C),v.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),C),this.closeTimeout,v.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),C),v.addListener(this.text,"mousedown",function(A){A.preventDefault(),x.onContextMenuClose()},C),v.addListener(C.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),C),v.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),C),c&&this.addIosSelectionHandler(d,C,this.text)}return m.prototype.addIosSelectionHandler=function(d,C,x){var A=this,M=null,_=!1;x.addEventListener("keydown",function($){M&&clearTimeout(M),_=!0},!0),x.addEventListener("keyup",function($){M=setTimeout(function(){_=!1},100)},!0);var S=function($){if(document.activeElement===x&&!(_||A.inComposition||C.$mouseHandler.isMousePressed)&&!A.copied){var g=x.selectionStart,u=x.selectionEnd,b=null,k=0;if(g==0?b=o.up:g==1?b=o.home:u>A.lastSelectionEnd&&A.lastValue[u]==` 167`?b=o.end:g<A.lastSelectionStart&&A.lastValue[g-1]==" "?(b=o.left,k=a.option):g<A.lastSelectionStart||g==A.lastSelectionStart&&A.lastSelectionEnd!=A.lastSelectionStart&&g==u?b=o.left:u>A.lastSelectionEnd&&A.lastValue.slice(0,u).split(` 168`).length>2?b=o.down:u>A.lastSelectionEnd&&A.lastValue[u-1]==" "?(b=o.right,k=a.option):(u>A.lastSelectionEnd||u==A.lastSelectionEnd&&A.lastSelectionEnd!=A.lastSelectionStart&&g==u)&&(b=o.right),g!==u&&(k|=a.shift),b){var T=C.onCommandKey({},k,b);if(!T&&C.commands){b=o.keyCodeToString(b);var R=C.commands.findKeyCommand(k,b);R&&C.execCommand(R)}A.lastSelectionStart=g,A.lastSelectionEnd=u,A.resetSelection("")}}};document.addEventListener("selectionchange",S),C.on("destroy",function(){document.removeEventListener("selectionchange",S)})},m.prototype.onContextMenuClose=function(){var d=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){d.tempStyle&&(d.text.style.cssText=d.tempStyle,d.tempStyle=""),d.host.renderer.$isMousePressed=!1,d.host.renderer.$keepTextAreaAtCursor&&d.host.renderer.$moveTextAreaToCursor()},0)},m.prototype.$onContextMenu=function(d){this.host.textInput.onContextMenu(d),this.onContextMenuClose()},m.prototype.onKeyup=function(d){d.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()},m.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},m.prototype.onCompositionStart=function(d){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){d.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var C=this.host.getSelectionRange();C.end.row=C.start.row,C.end.column=C.start.column,this.inComposition.markerRange=C,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()))}},m.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 d=this.text.value;this.sendText(d),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)}}},m.prototype.onCompositionEnd=function(d){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),d&&this.onInput())},m.prototype.onCut=function(d){this.doCopy(d,!0)},m.prototype.onCopy=function(d){this.doCopy(d,!1)},m.prototype.onPaste=function(d){var C=this.handleClipboardData(d);t.pasteCancelled()||(typeof C=="string"?(C&&this.host.onPaste(C,d),f.isIE&&setTimeout(this.resetSelection),v.preventDefault(d)):(this.text.value="",this.pasted=!0))},m.prototype.doCopy=function(d,C){var x=this,A=this.host.getCopyText();if(!A)return v.preventDefault(d);this.handleClipboardData(d,A)?(c&&(this.resetSelection(A),this.copied=A,setTimeout(function(){x.copied=!1},10)),C?this.host.onCut():this.host.onCopy(),v.preventDefault(d)):(this.copied=!0,this.text.value=A,this.text.select(),setTimeout(function(){x.copied=!1,x.resetSelection(),C?x.host.onCut():x.host.onCopy()}))},m.prototype.handleClipboardData=function(d,C,x){var A=d.clipboardData||window.clipboardData;if(!(!A||i)){var M=n||x?"Text":"text/plain";
168try{return C?A.setData(M,C)!==!1:A.getData(M)}catch(_){if(!x)return this.handleClipboardData(_,C,!0)}}},m.prototype.onInput=function(d){if(this.inComposition)return this.onCompositionUpdate();if(d&&d.inputType){if(d.inputType=="historyUndo")return this.host.execCommand("undo");if(d.inputType=="historyRedo")return this.host.execCommand("redo")}var C=this.text.value,x=this.sendText(C,!0);(C.length>e+100||h.test(x)||w&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},m.prototype.sendText=function(d,C){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),d&&this.host.onPaste(d),this.pasted=!1,"";for(var x=this.text.selectionStart,A=this.text.selectionEnd,M=this.lastSelectionStart,_=this.lastValue.length-this.lastSelectionEnd,S=d,$=d.length-x,g=d.length-A,u=0;M>0&&this.lastValue[u]==d[u];)u++,M--;for(S=S.slice(u),u=1;_>0&&this.lastValue.length-u>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-u]==d[d.length-u];)u++,_--;$-=u-1,g-=u-1;var b=S.length-u+1;if(b<0&&(M=-b,b=0),S=S.slice(0,b),!C&&!S&&!$&&!M&&!_&&!g)return"";this.sendingText=!0;var k=!1;return f.isAndroid&&S==". "&&(S=" ",k=!0),S&&!M&&!_&&!$&&!g||this.commandMode?this.host.onTextInput(S):this.host.onTextInput(S,{extendLeft:M,extendRight:_,restoreStart:$,restoreEnd:g}),this.sendingText=!1,this.lastValue=d,this.lastSelectionStart=x,this.lastSelectionEnd=A,this.lastRestoreEnd=g,k?` 169`:S},m.prototype.onSelect=function(d){var C=this;if(!this.inComposition){var x=function(A){return A.selectionStart===0&&A.selectionEnd>=C.lastValue.length&&A.value===C.lastValue&&C.lastValue&&A.selectionEnd!==C.lastSelectionEnd};this.copied?this.copied=!1:x(this.text)?(this.host.selectAll(),this.resetSelection()):w&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},m.prototype.$resetSelectionIOS=function(d){if(!(!this.$isFocused||this.copied&&!d||this.sendingText)){d||(d="");var C=` 170 ab`+d+`cde fg 171`;C!=this.text.value&&(this.text.value=this.lastValue=C);var x=4,A=4+(d.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=x||this.lastSelectionEnd!=A)&&this.text.setSelectionRange(x,A),this.lastSelectionStart=x,this.lastSelectionEnd=A}},m.prototype.$resetSelection=function(){var d=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var C=0,x=0,A="",M=function(R,D){for(var O=D,P=1;P<=R-d.rowStart&&P<2*d.numberOfExtraLines+1;P++)O+=d.host.session.getLine(R-P).length+1;return O};if(this.host.session){var _=this.host.selection,S=_.getRange(),$=_.cursor.row;$===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):$===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):($<this.rowStart-1||$>this.rowEnd+1)&&(this.rowStart=$>this.numberOfExtraLines?$-this.numberOfExtraLines:0,this.rowEnd=$>this.numberOfExtraLines?$+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var g=[],u=this.rowStart;u<=this.rowEnd;u++)g.push(this.host.session.getLine(u));if(A=g.join(` 172`),C=M(S.start.row,S.start.column),x=M(S.end.row,S.end.column),S.start.row<this.rowStart){var b=this.host.session.getLine(this.rowStart-1);C=S.start.row<this.rowStart-1?0:C,x+=b.length+1,A=b+` 173`+A}else if(S.end.row>this.rowEnd){var k=this.host.session.getLine(this.rowEnd+1);x=S.end.row>this.rowEnd+1?k.length:S.end.column,x+=A.length+1,A=A+` 174`+k}else w&&$>0&&(A=` 175`+A,x+=1,C+=1);A.length>e&&(C<e&&x<e?A=A.slice(0,e):(A=` 176`,C==x?C=x=0:(C=0,x=1)));var T=A+` 177 178`;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!=x||this.lastSelectionStart!=C||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(C,x),this.lastSelectionStart=C,this.lastSelectionEnd=x}catch{}this.inComposition=!1}},m.prototype.setHost=function(d){this.host=d},m.prototype.setNumberOfExtraLines=function(d){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,d<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=d},m.prototype.setAriaLabel=function(){var d="";if(this.host.$textInputAriaLabel&&(d+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var C=this.host.session.selection.cursor.row;d+=p("text-input.aria-label","Cursor at row $0",[C+1])}this.text.setAttribute("aria-label",d)},m.prototype.setAriaOptions=function(d){d.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",d.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",d.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),d.role&&this.text.setAttribute("role",d.role),d.setLabel&&(this.text.setAttribute("aria-roledescription",p("text-input.aria-roledescription","editor")),this.setAriaLabel())}
178,m.prototype.focus=function(){var d=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||r||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var C=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var x=this.text.getBoundingClientRect().top!=0}catch{return}var A=[];if(x)for(var M=this.text.parentElement;M&&M.nodeType==1;)A.push(M),M.setAttribute("ace_nocontext","true"),!M.parentElement&&M.getRootNode?M=M.getRootNode().host:M=M.parentElement;this.text.focus({preventScroll:!0}),x&&A.forEach(function(_){_.removeAttribute("ace_nocontext")}),setTimeout(function(){d.text.style.position="",d.text.style.top=="0px"&&(d.text.style.top=C)},0)},m.prototype.blur=function(){this.text.blur()},m.prototype.isFocused=function(){return this.$isFocused},m.prototype.setInputHandler=function(d){this.inputHandler=d},m.prototype.getInputHandler=function(){return this.inputHandler},m.prototype.getElement=function(){return this.text},m.prototype.setCommandMode=function(d){this.commandMode=d,this.text.readOnly=!1},m.prototype.setReadOnly=function(d){this.commandMode||(this.text.readOnly=d)},m.prototype.setCopyWithEmptySelection=function(d){},m.prototype.onContextMenu=function(d){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:d}),this.moveToMouse(d,!0)},m.prototype.moveToMouse=function(d,C){var x=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(C?"z-index:100000;":"")+(f.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var A=this.host.container.getBoundingClientRect(),M=s.computedStyle(this.host.container),_=A.top+(parseInt(M.borderTopWidth)||0),S=A.left+(parseInt(M.borderLeftWidth)||0),$=A.bottom-_-this.text.clientHeight-2,g=function(u){s.translate(x.text,u.clientX-S-2,Math.min(u.clientY-_-2,$))};g(d),d.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),f.isWin&&v.capture(this.host.container,g,this.onContextMenuClose.bind(this)))},m.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},m}();E.TextInput=y,E.$setUserAgentForTests=function(m,d){w=m,c=d}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(L,E,I){var v=L("../lib/useragent"),p=0,f=550,s=function(){function i(n){n.$clickSelection=null;var r=n.editor;r.setDefaultHandler("mousedown",this.onMouseDown.bind(n)),r.setDefaultHandler("dblclick",this.onDoubleClick.bind(n)),r.setDefaultHandler("tripleclick",this.onTripleClick.bind(n)),r.setDefaultHandler("quadclick",this.onQuadClick.bind(n)),r.setDefaultHandler("mousewheel",this.onMouseWheel.bind(n));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(o){n[o]=this[o]},this),n.selectByLines=this.extendSelectionBy.bind(n,"getLineRange"),n.selectByWords=this.extendSelectionBy.bind(n,"getWordRange")}return i.prototype.onMouseDown=function(n){var r=n.inSelection(),e=n.getDocumentPosition();this.mousedownEvent=n;var o=this.editor,a=n.getButton();if(a!==0){var c=o.getSelectionRange(),h=c.isEmpty();(h||a==1)&&o.selection.moveToPosition(e),a==2&&(o.textInput.onContextMenu(n.domEvent),v.isMozilla||n.preventDefault());return}if(this.mousedownEvent.time=Date.now(),r&&!o.isFocused()&&(o.focus(),this.$focusTimeout&&!this.$clickSelection&&!o.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(n);return}return this.captureMouse(n),this.startSelect(e,n.domEvent._clicks>1),n.preventDefault()},i.prototype.startSelect=function(n,r){n=n||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(n):r||e.selection.moveToPosition(n),r||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},i.prototype.select=function(){var n,r=this.editor,e=r.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var o=this.$clickSelection.comparePoint(e);if(o==-1)n=this.$clickSelection.end;else if(o==1)n=this.$clickSelection.start;else{var a=t(this.$clickSelection,e,r.session);e=a.cursor,n=a.anchor}r.selection.setSelectionAnchor(n.row,n.column)}r.selection.selectToPosition(e),r.renderer.scrollCursorIntoView()},i.prototype.extendSelectionBy=function(n){var r,e=this.editor,o=e.renderer.screenToTextCoordinates(this.x,this.y),a=e.selection[n](o.row,o.column);if(this.$clickSelection){var c=this.$clickSelection.comparePoint(a.start),h=this.$clickSelection.comparePoint(a.end);if(c==-1&&h<=0)r=this.$clickSelection.end,(a.end.row!=o.row||a.end.column!=o.column)&&(o=a.start);else if(h==1&&c>=0)r=this.$clickSelection.start,(a.start.row!=o.row||a.start.column!=o.column)&&(o=a.end);else if(c==-1&&h==1)o=a.end,r=a.start;else{var w=t(this.$clickSelection,o,e.session);o=w.cursor,r=w.anchor}e.selection.setSelectionAnchor(r.row,r.column)}e.selection.selectToPosition(o),e.renderer.scrollCursorIntoView()},i.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")}
178,i.prototype.focusWait=function(){var n=l(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),r=Date.now();(n>p||r-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},i.prototype.onDoubleClick=function(n){var r=n.getDocumentPosition(),e=this.editor,o=e.session,a=o.getBracketRange(r);a?(a.isEmpty()&&(a.start.column--,a.end.column++),this.setState("select")):(a=e.selection.getWordRange(r.row,r.column),this.setState("selectByWords")),this.$clickSelection=a,this.select()},i.prototype.onTripleClick=function(n){var r=n.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var o=e.getSelectionRange();o.isMultiLine()&&o.contains(r.row,r.column)?(this.$clickSelection=e.selection.getLineRange(o.start.row),this.$clickSelection.end=e.selection.getLineRange(o.end.row).end):this.$clickSelection=e.selection.getLineRange(r.row),this.select()},i.prototype.onQuadClick=function(n){var r=this.editor;r.selectAll(),this.$clickSelection=r.getSelectionRange(),this.setState("selectAll")},i.prototype.onMouseWheel=function(n){if(!n.getAccelKey()){n.getShiftKey()&&n.wheelY&&!n.wheelX&&(n.wheelX=n.wheelY,n.wheelY=0);var r=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,o=n.domEvent.timeStamp,a=o-e.t,c=a?n.wheelX/a:e.vx,h=a?n.wheelY/a:e.vy;a<f&&(c=(c+e.vx)/2,h=(h+e.vy)/2);var w=Math.abs(c/h),y=!1;if(w>=1&&r.renderer.isScrollableBy(n.wheelX*n.speed,0)&&(y=!0),w<=1&&r.renderer.isScrollableBy(0,n.wheelY*n.speed)&&(y=!0),y)e.allowed=o;else if(o-e.allowed<f){var m=Math.abs(c)<=1.5*Math.abs(e.vx)&&Math.abs(h)<=1.5*Math.abs(e.vy);m?(y=!0,e.allowed=o):e.allowed=0}if(e.t=o,e.vx=c,e.vy=h,y)return r.renderer.scrollBy(n.wheelX*n.speed,n.wheelY*n.speed),n.stop()}},i}();s.prototype.selectEnd=s.prototype.selectByLinesEnd,s.prototype.selectAllEnd=s.prototype.selectByLinesEnd,s.prototype.selectByWordsEnd=s.prototype.selectByLinesEnd,E.DefaultHandlers=s;function l(i,n,r,e){return Math.sqrt(Math.pow(r-i,2)+Math.pow(e-n,2))}function t(i,n,r){if(i.start.row==i.end.row)var e=2*n.column-i.start.column-i.end.column;else if(i.start.row==i.end.row-1&&!i.start.column&&!i.end.column)var e=3*n.column-2*r.getLine(i.start.row).length;else var e=2*n.row-i.start.row-i.end.row;return e<0?{cursor:i.start,anchor:i.end}:{cursor:i.end,anchor:i.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(L,E,I){var v=L("../lib/event"),p=L("../lib/useragent"),f=function(){function s(l,t){this.speed,this.wheelX,this.wheelY,this.domEvent=l,this.editor=t,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 s.prototype.stopPropagation=function(){v.stopPropagation(this.domEvent),this.propagationStopped=!0},s.prototype.preventDefault=function(){v.preventDefault(this.domEvent),this.defaultPrevented=!0},s.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},s.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},s.prototype.getGutterRow=function(){var l=this.getDocumentPosition().row,t=this.editor.session.documentToScreenRow(l,0),i=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return t-i},s.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var l=this.editor,t=l.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var i=this.getDocumentPosition();this.$inSelection=t.contains(i.row,i.column)}return this.$inSelection},s.prototype.getButton=function(){return v.getButton(this.domEvent)},s.prototype.getShiftKey=function(){return this.domEvent.shiftKey},s.prototype.getAccelKey=function(){return p.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},s}();E.MouseEvent=f}),ace.define("ace/lib/scroll",["require","exports","module"],function(L,E,I){E.preventParentScroll=function(p){p.stopPropagation();var f=p.currentTarget,s=f.scrollHeight>f.clientHeight;s||p.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(L,E,I){var v=this&&this.__extends||function(){var o=function(a,c){return o=Object.
178setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,w){h.__proto__=w}||function(h,w){for(var y in w)Object.prototype.hasOwnProperty.call(w,y)&&(h[y]=w[y])},o(a,c)};return function(a,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");o(a,c);function h(){this.constructor=a}a.prototype=c===null?Object.create(c):(h.prototype=c.prototype,new h)}}(),p=this&&this.__values||function(o){var a=typeof Symbol=="function"&&Symbol.iterator,c=a&&o[a],h=0;if(c)return c.call(o);if(o&&typeof o.length=="number")return{next:function(){return o&&h>=o.length&&(o=void 0),{value:o&&o[h++],done:!o}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},f=L("./lib/dom");L("./lib/event");var s=L("./range").Range,l=L("./lib/scroll").preventParentScroll,t="ace_tooltip",i=function(){function o(a){this.isOpen=!1,this.$element=null,this.$parentNode=a}return o.prototype.$init=function(){return this.$element=f.createElement("div"),this.$element.className=t,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},o.prototype.getElement=function(){return this.$element||this.$init()},o.prototype.setText=function(a){this.getElement().textContent=a},o.prototype.setHtml=function(a){this.getElement().innerHTML=a},o.prototype.setPosition=function(a,c){this.getElement().style.left=a+"px",this.getElement().style.top=c+"px"},o.prototype.setClassName=function(a){f.addCssClass(this.getElement(),a)},o.prototype.setTheme=function(a){this.theme&&(this.theme.isDark&&f.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&f.removeCssClass(this.getElement(),this.theme.cssClass)),a.isDark&&f.addCssClass(this.getElement(),"ace_dark"),a.cssClass&&f.addCssClass(this.getElement(),a.cssClass),this.theme={isDark:a.isDark,cssClass:a.cssClass}},o.prototype.show=function(a,c,h){a!=null&&this.setText(a),c!=null&&h!=null&&this.setPosition(c,h),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},o.prototype.hide=function(a){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=t,this.isOpen=!1)},o.prototype.getHeight=function(){return this.getElement().offsetHeight},o.prototype.getWidth=function(){return this.getElement().offsetWidth},o.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},o}(),n=function(){function o(){this.popups=[]}return o.prototype.addPopup=function(a){this.popups.push(a),this.updatePopups()},o.prototype.removePopup=function(a){var c=this.popups.indexOf(a);c!==-1&&(this.popups.splice(c,1),this.updatePopups())},o.prototype.updatePopups=function(){var a,c,h,w;this.popups.sort(function(S,$){return $.priority-S.priority});var y=[];try{for(var m=p(this.popups),d=m.next();!d.done;d=m.next()){var C=d.value,x=!0;try{for(var A=(h=void 0,p(y)),M=A.next();!M.done;M=A.next()){var _=M.value;if(this.doPopupsOverlap(_,C)){x=!1;break}}}catch(S){h={error:S}}finally{try{M&&!M.done&&(w=A.return)&&w.call(A)}finally{if(h)throw h.error}}x?y.push(C):C.hide()}}catch(S){a={error:S}}finally{try{d&&!d.done&&(c=m.return)&&c.call(m)}finally{if(a)throw a.error}}},o.prototype.doPopupsOverlap=function(a,c){var h=a.getElement().getBoundingClientRect(),w=c.getElement().getBoundingClientRect();return h.left<w.right&&h.right>w.left&&h.top<w.bottom&&h.bottom>w.top},o}(),r=new n;E.popupManager=r,E.Tooltip=i;var e=function(o){v(a,o);function a(c){c===void 0&&(c=document.body);var h=o.call(this,c)||this;h.timeout=void 0,h.lastT=0,h.idleTime=350,h.lastEvent=void 0,h.onMouseOut=h.onMouseOut.bind(h),h.onMouseMove=h.onMouseMove.bind(h),h.waitForHover=h.waitForHover.bind(h),h.hide=h.hide.bind(h);var w=h.getElement();return w.style.whiteSpace="pre-wrap",w.style.pointerEvents="auto",w.addEventListener("mouseout",h.onMouseOut),w.tabIndex=-1,w.addEventListener("blur",(function(){w.contains(document.activeElement)||this.hide()}).bind(h)),w.addEventListener("wheel",l),h}return a.prototype.addToEditor=function(c){c.on("mousemove",this.onMouseMove),c.on("mousedown",this.hide);var h=c.renderer.getMouseEventTarget();h&&typeof h.removeEventListener=="function"&&h.addEventListener("mouseout",this.onMouseOut,!0)},a.prototype.removeFromEditor=function(c){c.off("mousemove",this.onMouseMove),c.off("mousedown",this.hide);var h=c.renderer.getMouseEventTarget();h&&typeof h.removeEventListener=="function"&&h.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},a.prototype.onMouseMove=function(c,h){this.lastEvent=c,this.lastT=Date.now();var w=h.$mouseHandler.isMousePressed;if(this.isOpen){var y=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(y.row,y.column)||w||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||w||(this.lastEvent=c,this.timeout=setTimeout(this.waitForHover,this.idleTime))},a.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var c=Date.now()-this.lastT;if(this.idleTime-c>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-c);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},a.prototype.isOutsideOfText=function(c){var h=c.editor,w=c.getDocumentPosition(),y=h.session.getLine(w.row);if(w.column==y.length){var m=h.renderer.pixelToScreenCoordinates(c.clientX,c.clientY),d=h.session.documentToScreenPosition(w.row,w.column);if(d.column!=m.column||d.row!=m.row)return!0}return!1},a.prototype.setDataProvider=function(c){this.$gatherData=c},a.prototype.showForRange=function(c,h,w,y){if(!(y&&y!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var m=c.renderer;this.isOpen||(r.addPopup(this),this.$registerCloseEvents(),this.setTheme(m.theme)),this.isOpen=!0,this.range=s.fromPoints(h.start,h.end);var d=m.textToScreenCoordinates(h.start.row,h.start.column),C=m.scroller.getBoundingClientRect();d.pageX<C.left&&(d.pageX=C.left);var x=this.getElement();x.innerHTML="",x.appendChild(w),x.style.maxHeight="",x.style.display="block",this.$setPosition(c,d,!0,h),f.$fixPositionBug(x)}},a.prototype.$setPosition=function(c,h,w,y){var m=10;w&&this.addMarker(y,c.session);var d=c.renderer,C=this.getElement(),x=C.offsetHeight,A=C.offsetWidth,M=h.pageY,_=h.pageX,S=window.innerHeight-M-d.lineHeight,$=this.$shouldPlaceAbove(x,M,S-m);C.style.maxHeight=($?M:S)-m+"px",C.style.top=$?"":M+d.lineHeight+"px",C.style.bottom=$?window.innerHeight-M+"px":"",C.style.left=Math.min(_,window.innerWidth-A-m)+"px"},a.prototype.$shouldPlaceAbove=function(c,h,w){return!(h-c<0&&h<w)},a.prototype.addMarker=function(c,h){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=h,this.marker=h&&h.addMarker(c,"ace_highlight-marker","text")},a.prototype.hide=function(c){c&&this.$fromKeyboard&&c.type=="keydown"&&c.code=="Escape"||!c&&document.activeElement==this.getElement()||c&&c.target&&(c.type!="keydown"||c.ctrlKey||c.metaKey)&&this.$element.contains(c.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,r.removePopup(this)))},a.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},a.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},a.prototype.onMouseOut=function(c){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!c.relatedTarget||this.getElement().contains(c.relatedTarget)||c&&c.currentTarget.contains(c.relatedTarget)||c.relatedTarget.classList.contains("ace_content")||this.hide())},a}(i);E.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(L,E,I){var v=this&&this.__extends||function(){var e=function(o,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var w in h)Object.prototype.hasOwnProperty.call(h,w)&&(c[w]=h[w])},e(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(o,a);function c(){this.constructor=o}
178o.prototype=a===null?Object.create(a):(c.prototype=a.prototype,new c)}}(),p=this&&this.__values||function(e){var o=typeof Symbol=="function"&&Symbol.iterator,a=o&&e[o],c=0;if(a)return a.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&c>=e.length&&(e=void 0),{value:e&&e[c++],done:!e}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")},f=L("../lib/dom"),s=L("./mouse_event").MouseEvent,l=L("../tooltip").HoverTooltip,t=L("../config").nls,i=L("../range").Range;function n(e){var o=e.editor,a=o.renderer.$gutterLayer;e.$tooltip=new r(o),e.$tooltip.addToEditor(o),e.$tooltip.setDataProvider(function(c,h){var w=c.getDocumentPosition().row;e.$tooltip.showTooltip(w)}),e.editor.setDefaultHandler("guttermousedown",function(c){if(!(!o.isFocused()||c.getButton()!=0)){var h=a.getRegion(c);if(h!="foldWidgets"){var w=c.getDocumentPosition().row,y=o.session.selection;if(c.getShiftKey())y.selectTo(w,0);else{if(c.domEvent.detail==2)return o.selectAll(),c.preventDefault();e.$clickSelection=o.selection.getLineRange(w)}return e.setState("selectByLines"),e.captureMouse(c),c.preventDefault()}}})}E.GutterHandler=n;var r=function(e){v(o,e);function o(a){var c=e.call(this,a.container)||this;c.id="gt"+ ++o.$uid,c.editor=a,c.visibleTooltipRow;var h=c.getElement();return h.setAttribute("role","tooltip"),h.setAttribute("id",c.id),h.style.pointerEvents="auto",c.idleTime=50,c.onDomMouseMove=c.onDomMouseMove.bind(c),c.onDomMouseOut=c.onDomMouseOut.bind(c),c.setClassName("ace_gutter-tooltip"),c}return o.prototype.onDomMouseMove=function(a){var c=new s(a,this.editor);this.onMouseMove(c,this.editor)},o.prototype.onDomMouseOut=function(a){var c=new s(a,this.editor);this.onMouseOut(c)},o.prototype.addToEditor=function(a){var c=a.renderer.$gutter;c.addEventListener("mousemove",this.onDomMouseMove),c.addEventListener("mouseout",this.onDomMouseOut),e.prototype.addToEditor.call(this,a)},o.prototype.removeFromEditor=function(a){var c=a.renderer.$gutter;c.removeEventListener("mousemove",this.onDomMouseMove),c.removeEventListener("mouseout",this.onDomMouseOut),e.prototype.removeFromEditor.call(this,a)},o.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),e.prototype.destroy.call(this)},Object.defineProperty(o,"annotationLabels",{get:function(){return{error:{singular:t("gutter-tooltip.aria-label.error.singular","error"),plural:t("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:t("gutter-tooltip.aria-label.security.singular","security finding"),plural:t("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:t("gutter-tooltip.aria-label.warning.singular","warning"),plural:t("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:t("gutter-tooltip.aria-label.info.singular","information message"),plural:t("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:t("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:t("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),o.prototype.showTooltip=function(a){var c,h=this.editor.renderer.$gutterLayer,w=h.$annotations[a],y;w?y={displayText:Array.from(w.displayText),type:Array.from(w.type)}:y={displayText:[],type:[]};var m=h.session.getFoldLine(a);if(m&&h.$showFoldedAnnotations){for(var d={error:[],security:[],warning:[],info:[],hint:[]},C={error:1,security:2,warning:3,info:4,hint:5},x,A=a+1;A<=m.end.row;A++)if(h.$annotations[A])for(var M=0;M<h.$annotations[A].text.length;M++){var _=h.$annotations[A].type[M];d[_].push(h.$annotations[A].text[M]),(!x||C[_]<C[x])&&(x=_)}if(["error","security","warning"].includes(x)){var S="".concat(o.annotationsToSummaryString(d)," in folded code.");y.displayText.push(S),y.type.push(x+"_fold")}}if(y.displayText.length===0)return this.hide();for(var $={error:[],security:[],warning:[],info:[],hint:[]},g=h.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",A=0;A<y.displayText.length;A++){var u=f.createElement("span"),b=f.createElement("span");(c=b.classList).add.apply(c,["ace_".concat(y.type[A]),g]),b.setAttribute("aria-label","".concat(o.annotationLabels[y.type[A].replace("_fold","")].singular)),b.setAttribute("role","img"),b.appendChild(f.createTextNode(" ")),u.appendChild(b),u.appendChild(f.createTextNode(y.displayText[A])),u.appendChild(f.createElement("br")),$[y.type[A].replace("_fold","")].push(u)}var k=f.createElement("span");$.error.forEach(function(D){return k.appendChild(D)}
178),$.security.forEach(function(D){return k.appendChild(D)}),$.warning.forEach(function(D){return k.appendChild(D)}),$.info.forEach(function(D){return k.appendChild(D)}),$.hint.forEach(function(D){return k.appendChild(D)}),k.setAttribute("aria-live","polite");var T=this.$findLinkedAnnotationNode(a);T&&T.setAttribute("aria-describedby",this.id);var R=i.fromPoints({row:a,column:0},{row:a,column:0});this.showForRange(this.editor,R,k),this.visibleTooltipRow=a,this.editor._signal("showGutterTooltip",this)},o.prototype.$setPosition=function(a,c,h,w){var y=this.$findCellByRow(w.start.row);if(y){var m=y&&y.element,d=m&&m.querySelector(".ace_gutter_annotation");if(d){var C=d.getBoundingClientRect();if(C){var x={pageX:C.right,pageY:C.top};return e.prototype.$setPosition.call(this,a,x,!1,w)}}}},o.prototype.$shouldPlaceAbove=function(a,c,h){return h<a},o.prototype.$findLinkedAnnotationNode=function(a){var c=this.$findCellByRow(a);if(c){var h=c.element;if(h.childNodes.length>2)return h.childNodes[2]}},o.prototype.$findCellByRow=function(a){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(c){return c.row===a})},o.prototype.hide=function(a){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var c=this.$findLinkedAnnotationNode(this.visibleTooltipRow);c&&c.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),e.prototype.hide.call(this,a)}},o.annotationsToSummaryString=function(a){var c,h,w=[],y=["error","security","warning","info","hint"];try{for(var m=p(y),d=m.next();!d.done;d=m.next()){var C=d.value;if(a[C].length){var x=a[C].length===1?o.annotationLabels[C].singular:o.annotationLabels[C].plural;w.push("".concat(a[C].length," ").concat(x))}}}catch(A){c={error:A}}finally{try{d&&!d.done&&(h=m.return)&&h.call(m)}finally{if(c)throw c.error}}return w.join(", ")},o.prototype.isOutsideOfText=function(a){var c=a.editor,h=c.renderer.$gutter.getBoundingClientRect();return!(a.clientX>=h.left&&a.clientX<=h.right&&a.clientY>=h.top&&a.clientY<=h.bottom)},o}(l);r.$uid=0,E.GutterTooltip=r}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(L,E,I){var v=L("../lib/dom"),p=L("../lib/event"),f=L("../lib/useragent"),s=200,l=200,t=5;function i(r){var e=r.editor,o=v.createElement("div");o.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",o.textContent=" ";var a=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];a.forEach(function(N){r[N]=this[N]},this),e.on("mousedown",this.onMouseDown.bind(r));var c=e.container,h,w,y,m,d,C,x=0,A,M,_,S,$;this.onDragStart=function(N){if(this.cancelDrag||!c.draggable){var F=this;return setTimeout(function(){F.startSelect(),F.captureMouse(N)},0),N.preventDefault()}d=e.getSelectionRange();var W=N.dataTransfer;W.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(o),W.setDragImage&&W.setDragImage(o,0,0),setTimeout(function(){e.container.removeChild(o)}),W.clearData(),W.setData("Text",e.session.getTextRange()),M=!0,this.setState("drag")},this.onDragEnd=function(N){if(c.draggable=!1,M=!1,this.setState(null),!e.getReadOnly()){var F=N.dataTransfer.dropEffect;!A&&F=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(N){if(!(e.getReadOnly()||!O(N.dataTransfer)))return w=N.clientX,y=N.clientY,h||k(),x++,N.dataTransfer.dropEffect=A=P(N),p.preventDefault(N)},this.onDragOver=function(N){if(!(e.getReadOnly()||!O(N.dataTransfer)))return w=N.clientX,y=N.clientY,h||(k(),x++),R!==null&&(R=null),N.dataTransfer.dropEffect=A=P(N),p.preventDefault(N)},this.onDragLeave=function(N){if(x--,x<=0&&h)return T(),A=null,p.preventDefault(N)},this.onDrop=function(N){if(C){var F=N.dataTransfer;if(M)switch(A){case"move":d.contains(C.row,C.column)?d={start:C,end:C}:d=e.moveText(d,C);break;case"copy":d=e.moveText(d,C,!0);break}else{var W=F.getData("Text");d={start:C,end:e.session.insert(C,W)},e.focus(),A=null}return T(),p.preventDefault(N)}},p.addListener(c,"dragstart",this.onDragStart.bind(r),e),p.addListener(c,"dragend",this.onDragEnd.bind(r),e),p.addListener(c,"dragenter",this.onDragEnter.bind(r),e),p.addListener(c,"dragover",this.onDragOver.bind(r),e),p.addListener(c,"dragleave",this.onDragLeave.bind(r),e),p.addListener(c,"drop",this.onDrop.bind(r),e);function g(N,F){var W=Date.now(),B=!F||N.row!=F.row,H=!F||N.column!=F.column;if(!S||B||H)e.moveCursorToPosition(N),S=W,$={x:w,y};else{var U=n($.x,$.y,w,y);U>t?S=null:W-S>=l&&(e.renderer.scrollCursorIntoView(),S=null)}}function u(N,F){var W=Date.now(),B=e.renderer.layerConfig.lineHeight,H=e.renderer.layerConfig.characterWidth,U=e.renderer.scroller.getBoundingClientRect(),K={x:{left:w-U.left,right:U.right-w},y:{top:y-U.top,bottom:U.bottom-y}},V=Math.min(K.x.left,K.x.right),J=Math.min(K.y.top,K.y.bottom),te={row:N.row,column:N.column};V/H<=2&&(te.column+=K.x.left<K.x.right?-3:2),J/B<=1&&(te.row+=K.y.top<K.y.bottom?-1:1);var ce=N.row!=te.row,ue=N.column!=te.column,le=!F||N.row!=F.row;ce||ue&&!le?_?W-_>=s&&e.renderer.scrollCursorIntoView(te):_=W:_=null}function b(){var N=C;C=e.renderer.screenToTextCoordinates(w,y),g(C,N),u(C,N)}function k(){d=e.selection.toOrientedRange(),h=e.session.addMarker(d,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(m),b(),m=setInterval(b,20),x=0,p.addListener(document,"mousemove",D)}function T(){clearInterval(m),e.session.removeMarker(h),h=null,e.selection.fromOrientedRange(d),e.isFocused()&&!M&&e.$resetCursorStyle(),d=null,C=null,x=0,_=null,S=null,p.removeListener(document,"mousemove",D)}var R=null;function D(){R==null&&(R=setTimeout(function(){R!=null&&h&&T()},20))}function O(N){var F=N.types;return!F||Array.prototype.some.call(F,function(W){return W=="text/plain"||W=="Text"})}function P(N){var F=["copy","copymove","all","uninitialized"],W=["move","copymove","linkmove","all","uninitialized"],B=f.isMac?N.altKey:N.ctrlKey,H="uninitialized";try{H=N.dataTransfer.effectAllowed.toLowerCase()}catch{}var U="none";return B&&F.indexOf(H)>=0?U="copy":W.indexOf(H)>=0?U="move":F.indexOf(H)>=0&&(U="copy"),U}}(function(){this.dragWait=function(){var r=Date.now()-this.mousedownEvent.time;r>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var r=this.editor.container;r.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(r){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var r=this.editor,e=r.container;e.draggable=!0,r.renderer.$cursorLayer.setBlinking(!1),r.setStyle("ace_dragging");var o=f.isWin?"default":"move";r.renderer.setCursorStyle(o),this.setState("dragReady")},this.onMouseDrag=function(r){var e=this.editor.container;if(f.isIE&&this.state=="dragReady"){var o=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);o>3&&e.dragDrop()}if(this.state==="dragWait"){var o=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);o>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(r){if(this.$dragEnabled){this.mousedownEvent=r;var e=this.editor,o=r.inSelection(),a=r.getButton(),c=r.domEvent.detail||1;if(c===1&&a===0&&o){if(r.editor.inMultiSelectMode&&(r.getAccelKey()||r.getShiftKey()))return;this.mousedownEvent.time=Date.now();var h=r.domEvent.target||r.domEvent.srcElement;if("unselectable"in h&&(h.unselectable="on"),e.getDragDelay()){if(f.isWebKit){this.cancelDrag=!0;var w=e.container;w.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(r,this.onMouseDrag.bind(this)),r.defaultPrevented=!0}}}}).call(i.prototype);function n(r,e,o,a){return Math.sqrt(Math.pow(o-r,2)+Math.pow(a-e,2))}E.DragdropHandler=i}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(L,E,I){var v=L("./mouse_event").MouseEvent,p=L("../lib/event"),f=L("../lib/dom");E.addTouchListeners=function(s,l){var t="scroll",i,n,r,e,o,a,c=0,h,w=0,y=0,m=0,d,C;function x(){var g=window.navigator&&window.navigator.clipboard,u=!1,b=function(){var R=l.getCopyText(),D=l.session.getUndoManager().hasUndo();C.replaceChild(f.buildDom(u?["span",!R&&k("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],R&&k("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],R&&k("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],g&&k("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],D&&k("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],k("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],k("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),C.firstChild)},k=function(R){return l.commands.canExecute(R,l)},T=function(R){var D=R.target.getAttribute("action");if(D=="more"||!u)return u=!u,b();D=="paste"?g.readText().then(function(O){l.execCommand(D,O)}):D&&((D=="cut"||D=="copy")&&(g?g.writeText(l.getCopyText()):document.execCommand("copy")),l.execCommand(D)),C.firstChild.style.display="none",u=!1,D!="openCommandPalette"&&l.focus()};C=f.buildDom(["div",{class:"ace_mobile-menu",onclick:T},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],l.container),C.addEventListener("touchstart",function(R){t="menu",R.stopPropagation(),R.preventDefault(),l.textInput.focus()}),C.addEventListener("touchend",function(R){R.stopPropagation(),R.preventDefault(),T(R)})}function A(){if(!l.getOption("enableMobileMenu")){C&&M();return}C||x();var g=l.selection.cursor,u=l.renderer.textToScreenCoordinates(g.row,g.column),b=l.renderer.textToScreenCoordinates(0,0).pageX,k=l.renderer.scrollLeft,T=l.container.getBoundingClientRect();C.style.top=u.pageY-T.top-3+"px",u.pageX-T.left<T.width-70?(C.style.left="",C.style.right="10px"):(C.style.right="",C.style.left=b+k-T.left+"px"),C.style.display="",C.firstChild.style.display="none",l.on("input",M)}function M(g){C&&(C.style.display="none"),l.off("input",M)}function _(){o=null,clearTimeout(o);var g=l.selection.getRange(),u=g.contains(h.row,h.column);(g.isEmpty()||!u)&&(l.selection.moveToPosition(h),l.selection.selectWord()),t="wait",A()}function S(){o=null,clearTimeout(o),l.selection.moveToPosition(h);var g=w>=2?l.selection.getLineRange(h.row):l.session.getBracketRange(h);g&&!g.isEmpty()?l.selection.setRange(g):l.selection.selectWord(),t="wait"}p.addListener(s,"contextmenu",function(g){if(d){var u=l.textInput.getElement();u.focus()}},l),p.addListener(s,"touchstart",function(g){var u=g.touches;if(o||u.length>1){clearTimeout(o),o=null,r=-1,t="zoom";return}d=l.$mouseHandler.isMousePressed=!0;var b=l.renderer.layerConfig.lineHeight,k=l.renderer.layerConfig.lineHeight,T=g.timeStamp;e=T;var R=u[0],D=R.clientX,O=R.clientY;Math.abs(i-D)+Math.abs(n-O)>b&&(r=-1),i=g.clientX=D,n=g.clientY=O,y=m=0;var P=new v(g,l);if(h=P.getDocumentPosition(),T-r<500&&u.length==1&&!c)w++,g.preventDefault(),g.button=0,S();else{w=0;var N=l.selection.cursor,F=l.selection.isEmpty()?N:l.selection.anchor,W=l.renderer.$cursorLayer.getPixelPosition(N,!0),B=l.renderer.$cursorLayer.getPixelPosition(F,!0),H=l.renderer.scroller.getBoundingClientRect(),U=l.renderer.layerConfig.offset,K=l.renderer.scrollLeft,V=function(ce,ue){return ce=ce/k,ue=ue/b-.75,ce*ce+ue*ue};if(g.clientX<H.left){t="zoom";return}
178var J=V(g.clientX-H.left-W.left+K,g.clientY-H.top-W.top+U),te=V(g.clientX-H.left-B.left+K,g.clientY-H.top-B.top+U);J<3.5&&te<3.5&&(t=J>te?"cursor":"anchor"),te<3.5?t="anchor":J<3.5?t="cursor":t="scroll",o=setTimeout(_,450)}r=T},l),p.addListener(s,"touchend",function(g){d=l.$mouseHandler.isMousePressed=!1,a&&clearInterval(a),t=="zoom"?(t="",c=0):o?(l.selection.moveToPosition(h),c=0,A()):t=="scroll"?($(),M()):A(),clearTimeout(o),o=null},l),p.addListener(s,"touchmove",function(g){o&&(clearTimeout(o),o=null);var u=g.touches;if(!(u.length>1||t=="zoom")){var b=u[0],k=i-b.clientX,T=n-b.clientY;if(t=="wait")if(k*k+T*T>4)t="cursor";else return g.preventDefault();i=b.clientX,n=b.clientY,g.clientX=b.clientX,g.clientY=b.clientY;var R=g.timeStamp,D=R-e;if(e=R,t=="scroll"){var O=new v(g,l);O.speed=1,O.wheelX=k,O.wheelY=T,10*Math.abs(k)<Math.abs(T)&&(k=0),10*Math.abs(T)<Math.abs(k)&&(T=0),D!=0&&(y=k/D,m=T/D),l._emit("mousewheel",O),O.propagationStopped||(y=m=0)}else{var P=new v(g,l),N=P.getDocumentPosition();t=="cursor"?l.selection.moveCursorToPosition(N):t=="anchor"&&l.selection.setSelectionAnchor(N.row,N.column),l.renderer.scrollCursorIntoView(N),g.preventDefault()}}},l);function $(){c+=60,a=setInterval(function(){c--<=0&&(clearInterval(a),a=null),Math.abs(y)<.01&&(y=0),Math.abs(m)<.01&&(m=0),c<20&&(y=.9*y),c<20&&(m=.9*m);var g=l.session.getScrollTop();l.renderer.scrollBy(10*y,10*m),g==l.session.getScrollTop()&&(c=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(L,E,I){var v=L("../lib/event"),p=L("../lib/useragent"),f=L("./default_handlers").DefaultHandlers,s=L("./default_gutter_handler").GutterHandler,l=L("./mouse_event").MouseEvent,t=L("./dragdrop_handler").DragdropHandler,i=L("./touch_handler").addTouchListeners,n=L("../config"),r=function(){function e(o){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var a=this;this.editor=o,new f(this),new s(this),new t(this);var c=function(y){var m=!document.hasFocus||!document.hasFocus()||!o.isFocused()&&document.activeElement==(o.textInput&&o.textInput.getElement());m&&window.focus(),o.focus(),setTimeout(function(){o.isFocused()||o.focus()})},h=o.renderer.getMouseEventTarget();v.addListener(h,"click",this.onMouseEvent.bind(this,"click"),o),v.addListener(h,"mousemove",this.onMouseMove.bind(this,"mousemove"),o),v.addMultiMouseDownListener([h,o.renderer.scrollBarV&&o.renderer.scrollBarV.inner,o.renderer.scrollBarH&&o.renderer.scrollBarH.inner,o.textInput&&o.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",o),v.addMouseWheelListener(o.container,this.onMouseWheel.bind(this,"mousewheel"),o),i(o.container,o);var w=o.renderer.$gutter;v.addListener(w,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),o),v.addListener(w,"click",this.onMouseEvent.bind(this,"gutterclick"),o),v.addListener(w,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),o),v.addListener(w,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),o),v.addListener(h,"mousedown",c,o),v.addListener(w,"mousedown",c,o),p.isIE&&o.renderer.scrollBarV&&(v.addListener(o.renderer.scrollBarV.element,"mousedown",c,o),v.addListener(o.renderer.scrollBarH.element,"mousedown",c,o)),o.on("mousemove",function(y){if(!(a.state||a.$dragDelay||!a.$dragEnabled)){var m=o.renderer.screenToTextCoordinates(y.x,y.y),d=o.session.selection.getRange(),C=o.renderer;!d.isEmpty()&&d.insideStart(m.row,m.column)?C.setCursorStyle("default"):C.setCursorStyle("")}},o)}return e.prototype.onMouseEvent=function(o,a){this.editor.session&&this.editor._emit(o,new l(a,this.editor))},e.prototype.onMouseMove=function(o,a){var c=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!c||!c.length||this.editor._emit(o,new l(a,this.editor))},e.prototype.onMouseWheel=function(o,a){var c=new l(a,this.editor);c.speed=this.$scrollSpeed*2,c.wheelX=a.wheelX,c.wheelY=a.wheelY,this.editor._emit(o,c)},e.prototype.setState=function(o){this.state=o},e.prototype.captureMouse=function(o,a){this.x=o.x,this.y=o.y,this.isMousePressed=!0;var c=this.editor,h=this.editor.renderer;h.$isMousePressed=!0;var w=this,y=!0,m=function(M){if(M){if(p.isWebKit&&!M.which&&w.releaseMouse)return w.releaseMouse();
178w.x=M.clientX,w.y=M.clientY,a&&a(M),w.mouseEvent=new l(M,w.editor),w.$mouseMoved=!0}},d=function(M){c.off("beforeEndOperation",A),y=!1,c.session&&C(),w[w.state+"End"]&&w[w.state+"End"](M),w.state="",w.isMousePressed=h.$isMousePressed=!1,h.$keepTextAreaAtCursor&&h.$moveTextAreaToCursor(),w.$onCaptureMouseMove=w.releaseMouse=null,M&&w.onMouseEvent("mouseup",M),c.endOperation()},C=function(){w[w.state]&&w[w.state](),w.$mouseMoved=!1},x=function(){y&&(C(),v.nextFrame(x))};if(p.isOldIE&&o.domEvent.type=="dblclick")return setTimeout(function(){d(o)});var A=function(M){w.releaseMouse&&c.curOp.command.name&&c.curOp.selectionChanged&&(w[w.state+"End"]&&w[w.state+"End"](),w.state="",w.releaseMouse())};c.on("beforeEndOperation",A),c.startOperation({command:{name:"mouse"}}),w.$onCaptureMouseMove=m,w.releaseMouse=v.capture(this.editor.container,m,d),x()},e.prototype.cancelContextMenu=function(){var o=(function(a){a&&a.domEvent&&a.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",o),a&&a.domEvent&&v.stopEvent(a.domEvent))}).bind(this);setTimeout(o,10),this.editor.on("nativecontextmenu",o)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},e}();r.prototype.releaseMouse=null,n.defineOptions(r.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:p.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),E.MouseHandler=r}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(L,E,I){var v=L("../lib/dom"),p=function(){function f(s){s.on("click",function(l){var t=l.getDocumentPosition(),i=s.session,n=i.getFoldAt(t.row,t.column,1);n&&(l.getAccelKey()?i.removeFold(n):i.expandFold(n),l.stop());var r=l.domEvent&&l.domEvent.target;r&&v.hasCssClass(r,"ace_inline_button")&&v.hasCssClass(r,"ace_toggle_wrap")&&(i.setOption("wrap",!i.getUseWrapMode()),s.renderer.scrollCursorIntoView())}),s.on("gutterclick",function(l){var t=s.renderer.$gutterLayer.getRegion(l);if(t=="foldWidgets"){var i=l.getDocumentPosition().row,n=s.session;n.foldWidgets&&n.foldWidgets[i]&&s.session.onFoldWidgetClick(i,l),s.isFocused()||s.focus(),l.stop()}}),s.on("gutterdblclick",function(l){var t=s.renderer.$gutterLayer.getRegion(l);if(t=="foldWidgets"){var i=l.getDocumentPosition().row,n=s.session,r=n.getParentFoldRangeData(i,!0),e=r.range||r.firstRange;if(e){i=e.start.row;var o=n.getFoldAt(i,n.getLine(i).length,1);o?n.removeFold(o):(n.addFold("...",e),s.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}l.stop()}})}return f}();E.FoldHandler=p}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(L,E,I){var v=L("../lib/keys"),p=L("../lib/event"),f=function(){function s(l){this.$editor=l,this.$data={editor:l},this.$handlers=[],this.setDefaultHandler(l.commands)}return s.prototype.setDefaultHandler=function(l){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=l,this.addKeyboardHandler(l,0)},s.prototype.setKeyboardHandler=function(l){var t=this.$handlers;if(t[t.length-1]!=l){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(l,1)}},s.prototype.addKeyboardHandler=function(l,t){if(l){typeof l=="function"&&!l.handleKeyboard&&(l.handleKeyboard=l);var i=this.$handlers.indexOf(l);i!=-1&&this.$handlers.splice(i,1),t==null?this.$handlers.push(l):this.$handlers.splice(t,0,l),i==-1&&l.attach&&l.attach(this.$editor)}},s.prototype.removeKeyboardHandler=function(l){var t=this.$handlers.indexOf(l);return t==-1?!1:(this.$handlers.splice(t,1),l.detach&&l.detach(this.$editor),!0)},s.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},s.prototype.getStatusText=function(){var l=this.$data,t=l.editor;return this.$handlers.map(function(i){return i.getStatusText&&i.getStatusText(t,l)||""}).filter(Boolean).join(" ")},s.prototype.$callKeyboardHandlers=function(l,t,i,n){for(var r,e=!1,o=this.$editor.commands,a=this.$handlers.length;a--&&(r=this.$handlers[a].handleKeyboard(this.$data,l,t,i,n),!(!(!r||!r.command)&&(r.command=="null"?e=!0:e=o.exec(r.command,this.$editor,r.args,n),e&&n&&l!=-1&&r.passEvent!=!0&&r.command.passEvent!=!0&&p.stopEvent(n),e))););return!e&&l==-1&&(r={command:"insertstring"},e=o.exec("insertstring",this.$editor,t)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",r),e},s.prototype.onCommandKey=function(l,t,i){var n=v.keyCodeToString(i);return this.$callKeyboardHandlers(t,n,i,l)},s.prototype.onTextInput=function(l){return this.$callKeyboardHandlers(-1,l)},s}();E.KeyBinding=f}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(L,E,I){var v=0,p=0,f=!1,s=!1,l=!1,t=[[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]],i=[[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,r=1,e=0,o=1,a=2,c=3,h=4,w=5,y=6,m=7,d=8,C=9,x=10,A=11,M=12,_=13,S=14,$=15,g=16,u=17,b=18,k=[b,b,b,b,b,b,b,b,b,y,w,y,d,w,b,b,b,b,b,b,b,b,b,b,b,b,b,b,w,w,w,y,d,h,h,A,A,A,h,h,h,h,h,x,C,x,C,C,a,a,a,a,a,a,a,a,a,a,C,h,h,h,h,h,h,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,h,h,h,h,h,h,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,h,h,h,h,b,b,b,b,b,b,w,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,b,C,h,A,A,A,A,h,h,h,h,e,h,h,b,h,h,A,A,a,a,h,e,h,h,h,a,e,h,h,h,h,h],T=[d,d,d,d,d,d,d,d,d,d,d,b,b,b,e,o,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,d,w,_,S,$,g,u,C,A,A,A,A,A,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,C,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,h,d];function R(N,F,W,B){var H=v?i:t,U=null,K=null,V=null,J=0,te=null,ce=null,ue=-1,le=null,ge=null,ke=[];if(!B)for(le=0,B=[];le<W;le++)B[le]=P(N[le]);for(p=v,f=!1,s=!1,l=!1,ge=0;ge<W;ge++){if(U=J,ke[ge]=K=O(N,B,ke,ge),J=H[U][K],te=J&240,J&=15,F[ge]=V=H[J][5],te>0)if(te==16){for(le=ue;le<ge;le++)F[le]=1;ue=-1}else ue=-1;if(ce=H[J][6],ce)ue==-1&&(ue=ge);else if(ue>-1){for(le=ue;le<ge;le++)F[le]=V;ue=-1}B[ge]==w&&(F[ge]=0),p|=V}if(l){for(le=0;le<W;le++)if(B[le]==y){F[le]=v;for(var be=le-1;be>=0&&B[be]==d;be--)F[be]=v}}}function D(N,F,W){if(!(p<N)){if(N==1&&v==r&&!s){W.reverse();return}for(var B=W.length,H=0,U,K,V,J;H<B;){if(F[H]>=N){for(U=H+1;U<B&&F[U]>=N;)U++;for(K=H,V=U-1;K<V;K++,V--)J=W[K],W[K]=W[V],W[V]=J;H=U}H++}}}function O(N,F,W,B){var H=F[B],U,K,V,J;
178switch(H){case e:case o:f=!1;case h:case c:return H;case a:return f?c:a;case m:return f=!0,o;case d:return h;case C:return B<1||B+1>=F.length||(U=W[B-1])!=a&&U!=c||(K=F[B+1])!=a&&K!=c?h:(f&&(K=c),K==U?K:h);case x:return U=B>0?W[B-1]:w,U==a&&B+1<F.length&&F[B+1]==a?a:h;case A:if(B>0&&W[B-1]==a)return a;if(f)return h;for(J=B+1,V=F.length;J<V&&F[J]==A;)J++;return J<V&&F[J]==a?a:h;case M:for(V=F.length,J=B+1;J<V&&F[J]==M;)J++;if(J<V){var te=N[B],ce=te>=1425&&te<=2303||te==64286;if(U=F[J],ce&&(U==o||U==m))return o}return B<1||(U=F[B-1])==w?h:W[B-1];case w:return f=!1,s=!0,v;case y:return l=!0,h;case _:case S:case g:case u:case $:f=!1;case b:return h}}function P(N){var F=N.charCodeAt(0),W=F>>8;return W==0?F>191?e:k[F]:W==5?/[\u0591-\u05f4]/.test(N)?o:e:W==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(N)?M:/[\u0660-\u0669\u066b-\u066c]/.test(N)?c:F==1642?A:/[\u06f0-\u06f9]/.test(N)?a:m:W==32&&F<=8287?T[F&255]:W==254&&F>=65136?m:h}E.L=e,E.R=o,E.EN=a,E.ON_R=3,E.AN=4,E.R_H=5,E.B=6,E.RLE=7,E.DOT="·",E.doBidiReorder=function(N,F,W){if(N.length<2)return{};var B=N.split(""),H=new Array(B.length),U=new Array(B.length),K=[];v=W?r:n,R(B,K,B.length,F);for(var V=0;V<H.length;H[V]=V,V++);D(2,K,H),D(1,K,H);for(var V=0;V<H.length-1;V++)F[V]===c?K[V]=E.AN:K[V]===o&&(F[V]>m&&F[V]<_||F[V]===h||F[V]===b)?K[V]=E.ON_R:V>0&&B[V-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(B[V])&&(K[V-1]=K[V]=E.R_H,V++);B[B.length-1]===E.DOT&&(K[B.length-1]=E.B),B[0]==="‫"&&(K[0]=E.RLE);for(var V=0;V<H.length;V++)U[V]=K[H[V]];return{logicalFromVisual:H,bidiLevels:U}},E.hasBidiCharacters=function(N,F){for(var W=!1,B=0;B<N.length;B++)F[B]=P(N.charAt(B)),!W&&(F[B]==o||F[B]==m||F[B]==c)&&(W=!0);return W},E.getVisualFromLogicalIdx=function(N,F){for(var W=0;W<F.logicalFromVisual.length;W++)if(F.logicalFromVisual[W]==N)return W;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(L,E,I){var v=L("./lib/bidiutil"),p=L("./lib/lang"),f=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=function(){function l(t){this.session=t,this.bidiMap={},this.currentRow=null,this.bidiUtil=v,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=f.test(t.getValue())}return l.prototype.isBidiRow=function(t,i,n){return this.seenBidi?(t!==this.currentRow&&(this.currentRow=t,this.updateRowLine(i,n),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},l.prototype.onChange=function(t){this.seenBidi?this.currentRow=null:t.action=="insert"&&f.test(t.lines.join(` 179`))&&(this.seenBidi=!0,this.currentRow=null)},l.prototype.getDocumentRow=function(){var t=0,i=this.session.$screenRowCache;if(i.length){var n=this.session.$getRowCacheIndex(i,this.currentRow);n>=0&&(t=this.session.$docRowCache[n])}return t},l.prototype.getSplitIndex=function(){var t=0,i=this.session.$screenRowCache;if(i.length)for(var n,r=this.session.$getRowCacheIndex(i,this.currentRow);this.currentRow-t>0&&(n=this.session.$getRowCacheIndex(i,this.currentRow-t-1),n===r);)r=n,t++;else t=this.currentRow;return t},l.prototype.updateRowLine=function(t,i){t===void 0&&(t=this.getDocumentRow());var n=t===this.session.getLength()-1,r=n?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(t),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[t];e&&(i===void 0&&(i=this.getSplitIndex()),i>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[v.L],this.line=i<e.length?this.line.substring(e[i-1],e[i]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[i]),i==e.length&&(this.line+=this.showInvisibles?r:v.DOT))}else this.line+=this.showInvisibles?r:v.DOT;var o=this.session,a=0,c;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(h,w){return h===" "||o.isFullWidth(h.charCodeAt(0))?(c=h===" "?o.getScreenTabSize(w+a):2,a+=c-1,p.stringRepeat(v.DOT,c)):h}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==v.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 t=[];v.hasBidiCharacters(this.line,t)||this.isRtlDir?this.bidiMap=v.doBidiReorder(this.line,t,this.isRtlDir):this.bidiMap={}},l.prototype.markAsDirty=function(){this.currentRow=null},l.prototype.updateCharacterWidths=function(t){if(this.characterWidth!==t.$characterSize.width){this.fontMetrics=t;var i=this.characterWidth=t.$characterSize.width,n=t.$measureCharWidth("ה");this.charWidths[v.L]=this.charWidths[v.EN]=this.charWidths[v.ON_R]=i,this.charWidths[v.R]=this.charWidths[v.AN]=n,this.charWidths[v.R_H]=n*.45,this.charWidths[v.B]=this.charWidths[v.RLE]=0,this.currentRow=null}},l.prototype.setShowInvisibles=function(t){this.showInvisibles=t,this.currentRow=null},l.prototype.setEolChar=function(t){this.EOL=t},l.prototype.setContentWidth=function(t){this.contentWidth=t},l.prototype.isRtlLine=function(t){return this.$isRtl?!0:t!=null?this.session.getLine(t).charAt(0)==this.RLE:this.isRtlDir},l.prototype.setRtlDirection=function(t,i){for(var n=t.getCursorPosition(),r=t.selection.getSelectionAnchor().row;r<=n.row;r++)!i&&t.session.getLine(r).charAt(0)===t.session.$bidiHandler.RLE?t.session.doc.removeInLine(r,0,1):i&&t.session.getLine(r).charAt(0)!==t.session.$bidiHandler.RLE&&t.session.doc.insert({column:0,row:r},t.session.$bidiHandler.RLE)},l.prototype.getPosLeft=function(t){t-=this.wrapIndent;var i=this.line.charAt(0)===this.RLE?1:0,n=t>i?this.session.getOverwrite()?t:t-1:i,r=v.getVisualFromLogicalIdx(n,this.bidiMap),e=this.bidiMap.bidiLevels,o=0;!this.session.getOverwrite()&&t<=i&&e[r]%2!==0&&r++;for(var a=0;a<r;a++)o+=this.charWidths[e[a]];return!this.session.getOverwrite()&&t>i&&e[r]%2===0&&(o+=this.charWidths[e[r]]),this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(o+=this.rtlLineOffset),o},l.prototype.getSelections=function(t,i){var n=this.bidiMap,r=n.bidiLevels,e,o=[],a=0,
179c=Math.min(t,i)-this.wrapIndent,h=Math.max(t,i)-this.wrapIndent,w=!1,y=!1,m=0;this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,C=0;C<r.length;C++)d=n.logicalFromVisual[C],e=r[C],w=d>=c&&d<h,w&&!y?m=a:!w&&y&&o.push({left:m,width:a-m}),a+=this.charWidths[e],y=w;if(w&&C===r.length&&o.push({left:m,width:a-m}),this.isRtlDir)for(var x=0;x<o.length;x++)o[x].left+=this.rtlLineOffset;return o},l.prototype.offsetToCol=function(n){this.isRtlDir&&(n-=this.rtlLineOffset);var i=0,n=Math.max(n,0),r=0,e=0,o=this.bidiMap.bidiLevels,a=this.charWidths[o[e]];for(this.wrapIndent&&(n-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);n>r+a/2;){if(r+=a,e===o.length-1){a=0;break}a=this.charWidths[o[++e]]}return e>0&&o[e-1]%2!==0&&o[e]%2===0?(n<r&&e--,i=this.bidiMap.logicalFromVisual[e]):e>0&&o[e-1]%2===0&&o[e]%2!==0?i=1+(n>r?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===o.length-1&&a===0&&o[e-1]%2===0||!this.isRtlDir&&e===0&&o[e]%2!==0?i=1+this.bidiMap.logicalFromVisual[e]:(e>0&&o[e-1]%2!==0&&a!==0&&e--,i=this.bidiMap.logicalFromVisual[e]),i===0&&this.isRtlDir&&i++,i+this.wrapIndent},l}();E.BidiHandler=s}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(L,E,I){var v=L("./lib/oop"),p=L("./lib/lang"),f=L("./lib/event_emitter").EventEmitter,s=L("./range").Range,l=function(){function t(i){this.session=i,this.doc=i.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var n=this;this.cursor.on("change",function(r){n.$cursorChanged=!0,n.$silent||n._emit("changeCursor"),!n.$isEmpty&&!n.$silent&&n._emit("changeSelection"),!n.$keepDesiredColumnOnChange&&r.old.column!=r.value.column&&(n.$desiredColumn=null)}),this.anchor.on("change",function(){n.$anchorChanged=!0,!n.$isEmpty&&!n.$silent&&n._emit("changeSelection")})}return t.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},t.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},t.prototype.getCursor=function(){return this.lead.getPosition()},t.prototype.setAnchor=function(i,n){this.$isEmpty=!1,this.anchor.setPosition(i,n)},t.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},t.prototype.getSelectionLead=function(){return this.lead.getPosition()},t.prototype.isBackwards=function(){var i=this.anchor,n=this.lead;return i.row>n.row||i.row==n.row&&i.column>n.column},t.prototype.getRange=function(){var i=this.anchor,n=this.lead;return this.$isEmpty?s.fromPoints(n,n):this.isBackwards()?s.fromPoints(n,i):s.fromPoints(i,n)},t.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},t.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},t.prototype.setRange=function(i,n){var r=n?i.end:i.start,e=n?i.start:i.end;this.$setSelection(r.row,r.column,e.row,e.column)},t.prototype.$setSelection=function(i,n,r,e){if(!this.$silent){var o=this.$isEmpty,a=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(i,n),this.cursor.setPosition(r,e),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||a)&&this._emit("changeSelection")}},t.prototype.$moveSelection=function(i){var n=this.lead;this.$isEmpty&&this.setSelectionAnchor(n.row,n.column),i.call(this)},t.prototype.selectTo=function(i,n){this.$moveSelection(function(){this.moveCursorTo(i,n)})},t.prototype.selectToPosition=function(i){this.$moveSelection(function(){this.moveCursorToPosition(i)})},t.prototype.moveTo=function(i,n){this.clearSelection(),this.moveCursorTo(i,n)},t.prototype.moveToPosition=function(i){this.clearSelection(),this.moveCursorToPosition(i)},t.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},t.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},t.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},t.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},t.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},t.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},t.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},t.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},t.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},t.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},t.prototype.getWordRange=function(i,n){if(typeof n>"u"){var r=i||this.lead;i=r.row,n=r.column}return this.session.getWordRange(i,n)},t.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},t.prototype.selectAWord=function(){var i=this.getCursor(),n=this.session.getAWordRange(i.row,i.column);this.setSelectionRange(n)},t.prototype.getLineRange=function(i,n){var r=typeof i=="number"?i:this.lead.row,e,o=this.session.getFoldLine(r);return o?(r=o.start.row,e=o.end.row):e=r,n===!0?new s(r,0,e,this.session.getLine(e).length):new s(r,0,e+1,0)},t.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},t.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},t.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},t.prototype.wouldMoveIntoSoftTab=function(i,n,r){var e=i.column,o=i.column+n;return r<0&&(e=i.column-n,o=i.column),this.session.isTabStop(i)&&this.doc.getLine(i.row).slice(e,o).split(" ").length-1==n},t.prototype.moveCursorLeft=function(){var i=this.lead.getPosition(),n;if(n=this.session.getFoldAt(i.row,i.column,-1))this.moveCursorTo(n.start.row,n.start.column);else if(i.column===0)i.row>0&&this.moveCursorTo(i.row-1,this.doc.getLine(i.row-1).length);else{var r=this.session.getTabSize();this.wouldMoveIntoSoftTab(i,r,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-r):this.moveCursorBy(0,-1)}},t.prototype.moveCursorRight=function(){var i=this.lead.getPosition(),n;if(n=this.session.getFoldAt(i.row,i.column,1))this.moveCursorTo(n.end.row,n.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var r=this.session.getTabSize(),i=this.lead;this.wouldMoveIntoSoftTab(i,r,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,r):this.moveCursorBy(0,1)}},t.prototype.moveCursorLineStart=function(){var i=this.lead.row,n=this.lead.column,r=this.session.documentToScreenRow(i,n),e=this.session.screenToDocumentPosition(r,0),o=this.session.getDisplayLine(i,null,e.row,e.column),a=o.match(/^\s*/);a[0].length!=n&&!this.session.$useEmacsStyleLineStart&&(e.column+=a[0].length),this.moveCursorToPosition(e)},t.prototype.moveCursorLineEnd=function(){var i=this.lead,n=this.session.getDocumentLastRowColumnPosition(i.row,i.column);if(this.lead.column==n.column){var r=this.session.getLine(n.row);if(n.column==r.length){var e=r.search(/\s+$/);e>0&&(n.column=e)}}this.moveCursorTo(n.row,n.column)},t.prototype.moveCursorFileEnd=function(){var i=this.doc.getLength()-1,n=this.doc.getLine(i).length;this.moveCursorTo(i,n)},t.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},t.prototype.moveCursorLongWordRight=function(){var i=this.lead.row,n=this.lead.column,r=this.doc.getLine(i),e=r.substring(n);
179this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(i,n,1);if(o){this.moveCursorTo(o.end.row,o.end.column);return}if(this.session.nonTokenRe.exec(e)&&(n+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=r.substring(n)),n>=r.length){this.moveCursorTo(i,r.length),this.moveCursorRight(),i<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(n+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,n)},t.prototype.moveCursorLongWordLeft=function(){var i=this.lead.row,n=this.lead.column,r;if(r=this.session.getFoldAt(i,n,-1)){this.moveCursorTo(r.start.row,r.start.column);return}var e=this.session.getFoldStringAt(i,n,-1);e==null&&(e=this.doc.getLine(i).substring(0,n));var o=p.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(o)&&(n-=this.session.nonTokenRe.lastIndex,o=o.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0){this.moveCursorTo(i,0),this.moveCursorLeft(),i>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(o)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,n)},t.prototype.$shortWordEndIndex=function(i){var n=0,r,e=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(i))n=this.session.tokenRe.lastIndex;else{for(;(r=i[n])&&e.test(r);)n++;if(n<1){for(o.lastIndex=0;(r=i[n])&&!o.test(r);)if(o.lastIndex=0,n++,e.test(r))if(n>2){n--;break}else{for(;(r=i[n])&&e.test(r);)n++;if(n>2)break}}}return o.lastIndex=0,n},t.prototype.moveCursorShortWordRight=function(){var i=this.lead.row,n=this.lead.column,r=this.doc.getLine(i),e=r.substring(n),o=this.session.getFoldAt(i,n,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(n==r.length){var a=this.doc.getLength();do i++,e=this.doc.getLine(i);while(i<a&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),n=0}var c=this.$shortWordEndIndex(e);this.moveCursorTo(i,n+c)},t.prototype.moveCursorShortWordLeft=function(){var i=this.lead.row,n=this.lead.column,r;if(r=this.session.getFoldAt(i,n,-1))return this.moveCursorTo(r.start.row,r.start.column);var e=this.session.getLine(i).substring(0,n);if(n===0){do i--,e=this.doc.getLine(i);while(i>0&&/^\s*$/.test(e));n=e.length,/\s+$/.test(e)||(e="")}var o=p.stringReverse(e),a=this.$shortWordEndIndex(o);return this.moveCursorTo(i,n-a)},t.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},t.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},t.prototype.moveCursorBy=function(i,n){var r=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(n===0&&(i!==0&&(this.session.$bidiHandler.isBidiRow(r.row,this.lead.row)?(e=this.session.$bidiHandler.getPosLeft(r.column),r.column=Math.round(e/this.session.$bidiHandler.charWidths[0])):e=r.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?r.column=this.$desiredColumn:this.$desiredColumn=r.column),i!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var o=this.session.lineWidgets[this.lead.row];i<0?i-=o.rowsAbove||0:i>0&&(i+=o.rowCount-(o.rowsAbove||0))}var a=this.session.screenToDocumentPosition(r.row+i,r.column,e);i!==0&&n===0&&a.row===this.lead.row&&(a.column,this.lead.column),this.moveCursorTo(a.row,a.column+n,n===0)},t.prototype.moveCursorToPosition=function(i){this.moveCursorTo(i.row,i.column)},t.prototype.moveCursorTo=function(i,n,r){var e=this.session.getFoldAt(i,n,1);e&&(i=e.start.row,n=e.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(i);/[\uDC00-\uDFFF]/.test(o.charAt(n))&&o.charAt(n-1)&&(this.lead.row==i&&this.lead.column==n+1?n=n-1:n=n+1),this.lead.setPosition(i,n),this.$keepDesiredColumnOnChange=!1,r||(this.$desiredColumn=null)},t.prototype.moveCursorToScreen=function(i,n,r){var e=this.session.screenToDocumentPosition(i,n);this.moveCursorTo(e.row,e.column,r)},t.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},t.prototype.fromOrientedRange=function(i){this.setSelectionRange(i,i.cursor==i.start),this.$desiredColumn=i.desiredColumn||this.$desiredColumn},t.prototype.toOrientedRange=function(i){var n=this.getRange();return i?(i.start.column=n.start.column,i.start.row=n.start.row,i.end.column=n.end.column,i.end.row=n.end.row):i=n,i.cursor=this.isBackwards()?i.start:i.end,i.desiredColumn=this.$desiredColumn,i},t.prototype.getRangeOfMovements=function(i){var n=this.getCursor();try{i(this);var r=this.getCursor();return s.fromPoints(n,r)}catch{return s.fromPoints(n,n)}finally{this.moveCursorToPosition(n)}},t.prototype.toJSON=function(){if(this.rangeCount)var i=this.ranges.map(function(n){var r=n.clone();return r.isBackwards=n.cursor==n.start,r});else{var i=this.getRange();i.isBackwards=this.isBackwards()}return i},t.prototype.fromJSON=function(i){if(i.start==null)if(this.rangeList&&i.length>1){this.toSingleRange(i[0]);for(var n=i.length;n--;){var r=s.fromPoints(i[n].start,i[n].end);i[n].isBackwards&&(r.cursor=r.start),this.addRange(r,!0)}return}else i=i[0];this.rangeList&&this.toSingleRange(i),this.setSelectionRange(i,i.isBackwards)},t.prototype.isEqual=function(i){if((i.length||this.rangeCount)&&i.length!=this.rangeCount)return!1;if(!i.length||!this.ranges)return this.getRange().isEqual(i);for(var n=this.ranges.length;n--;)if(!this.ranges[n].isEqual(i[n]))return!1;return!0},t}();l.prototype.setSelectionAnchor=l.prototype.setAnchor,l.prototype.getSelectionAnchor=l.prototype.getAnchor,l.prototype.setSelectionRange=l.prototype.setRange,v.implement(l.prototype,f),E.Selection=l}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(L,E,I){var v=L("./lib/report_error").reportError,p=2e3,f=function(){function s(l){this.splitRegex,this.states=l,this.regExps={},this.matchMappings={};for(var t in this.states){for(var i=this.states[t],n=[],r=0,e=this.matchMappings[t]={defaultToken:"text"},o="g",a=[],c=0;c<i.length;c++){var h=i[c];if(h.defaultToken&&(e.defaultToken=h.defaultToken),h.caseInsensitive&&o.indexOf("i")===-1&&(o+="i"),h.unicode&&o.indexOf("u")===-1&&(o+="u"),h.regex!=null){h.regex instanceof RegExp&&(h.regex=h.regex.toString().slice(1,-1));var w=h.regex,y=new RegExp("(?:("+w+")|(.))").exec("a").length-2;
179Array.isArray(h.token)?h.token.length==1||y==1?h.token=h.token[0]:y-1!=h.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:h,groupCount:y-1}),h.token=h.token[0]):(h.tokenArray=h.token,h.token=null,h.onMatch=this.$arrayTokens):typeof h.token=="function"&&!h.onMatch&&(y>1?h.onMatch=this.$applyToken:h.onMatch=h.token),y>1&&(/\\\d/.test(h.regex)?w=h.regex.replace(/\\([0-9]+)/g,function(m,d){return"\\"+(parseInt(d,10)+r+1)}):(y=1,w=this.removeCapturingGroups(h.regex)),!h.splitRegex&&typeof h.token!="string"&&a.push(h)),e[r]=c,r+=y,n.push(w),h.onMatch||(h.onMatch=null)}}n.length||(e[0]=0,n.push("$")),a.forEach(function(m){m.splitRegex=this.createSplitterRegexp(m.regex,o)},this),this.regExps[t]=new RegExp("("+n.join(")|(")+")|($)",o)}}return s.prototype.$setMaxTokenCount=function(l){p=l|0},s.prototype.$applyToken=function(l){var t=this.splitRegex.exec(l).slice(1),i=this.token.apply(this,t);if(typeof i=="string")return[{type:i,value:l}];for(var n=[],r=0,e=i.length;r<e;r++)t[r]&&(n[n.length]={type:i[r],value:t[r]});return n},s.prototype.$arrayTokens=function(l){if(!l)return[];var t=this.splitRegex.exec(l);if(!t)return"text";for(var i=[],n=this.tokenArray,r=0,e=n.length;r<e;r++)t[r+1]&&(i[i.length]={type:n[r],value:t[r+1]});return i},s.prototype.removeCapturingGroups=function(l){var t=l.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(i,n){return n?"(?:":i});return t},s.prototype.createSplitterRegexp=function(l,t){if(l.indexOf("(?=")!=-1){var i=0,n=!1,r={};l.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,o,a,c,h,w){return n?n=h!="]":h?n=!0:c?(i==r.stack&&(r.end=w+1,r.stack=-1),i--):a&&(i++,a.length!=1&&(r.stack=i,r.start=w)),e}),r.end!=null&&/^\)*$/.test(l.substr(r.end))&&(l=l.substring(0,r.start)+l.substr(r.end))}return l.charAt(0)!="^"&&(l="^"+l),l.charAt(l.length-1)!="$"&&(l+="$"),new RegExp(l,(t||"").replace("g",""))},s.prototype.getLineTokens=function(l,t){if(t&&typeof t!="string"){var i=t.slice(0);t=i[0],t==="#tmp"&&(i.shift(),t=i.shift())}else var i=[];var n=t||"start",r=this.states[n];r||(n="start",r=this.states[n]);var e=this.matchMappings[n],o=this.regExps[n];o.lastIndex=0;for(var a,c=[],h=0,w=0,y={type:null,value:""};a=o.exec(l);){var m=e.defaultToken,d=null,C=a[0],x=o.lastIndex;if(x-C.length>h){var A=l.substring(h,x-C.length);y.type==m?y.value+=A:(y.type&&c.push(y),y={type:m,value:A})}for(var M=0;M<a.length-2;M++)if(a[M+1]!==void 0){d=r[e[M]],d.onMatch?m=d.onMatch(C,n,i,l):m=d.token,d.next&&(typeof d.next=="string"?n=d.next:n=d.next(n,i),r=this.states[n],r||(this.reportError("state doesn't exist",n),n="start",r=this.states[n]),e=this.matchMappings[n],h=x,o=this.regExps[n],o.lastIndex=x),d.consumeLineEnd&&(h=x);break}if(C){if(typeof m=="string")(!d||d.merge!==!1)&&y.type===m?y.value+=C:(y.type&&c.push(y),y={type:m,value:C});else if(m){y.type&&c.push(y),y={type:null,value:""};for(var M=0;M<m.length;M++)c.push(m[M])}}if(h==l.length)break;if(h=x,w++>p){for(w>2*l.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:l});h<l.length;)y.type&&c.push(y),y={value:l.substring(h,h+=500),type:"overflow"};n="start",i=[];break}}return y.type&&c.push(y),i.length>1&&i[0]!==n&&i.unshift("#tmp",n),{tokens:c,state:i.length?i:n}},s}();f.prototype.reportError=v,E.Tokenizer=f}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(L,E,I){var v=L("../lib/deep_copy").deepCopy,p;p=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(l,t){if(!t){for(var i in l)this.$rules[i]=l[i];return}for(var i in l){for(var n=l[i],r=0;r<n.length;r++){var e=n[r];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(t)!==0&&(e.next=t+e.next),e.nextState&&e.nextState.indexOf(t)!==0&&(e.nextState=t+e.nextState))}this.$rules[t+i]=n}},this.getRules=function(){return this.$rules},this.embedRules=function(l,t,i,n,r){var e=typeof l=="function"?new l().getRules():l;if(n)for(var o=0;o<n.length;o++)n[o]=t+n[o];else{n=[];for(var a in e)n.push(t+a)}if(this.addRules(e,t),i)for(var c=Array.prototype[r?"push":"unshift"],o=0;o<n.length;o++)c.apply(this.$rules[n[o]],v(i));this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var f=function(l,t){return(l!="start"||t.length)&&t.unshift(this.nextState,l),this.nextState},s=function(l,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var l=0,t=this.$rules;function i(n){var r=t[n];r.processed=!0;for(var e=0;e<r.length;e++){var o=r[e],a=null;Array.isArray(o)&&(a=o,o={}),!o.regex&&o.start&&(o.regex=o.start,o.next||(o.next=[]),o.next.push({defaultToken:o.token},{token:o.token+".end",regex:o.end||o.start,next:"pop"}),o.token=o.token+".start",o.push=!0);var c=o.next||o.push;if(c&&Array.isArray(c)){var h=o.stateName;h||(h=o.token,typeof h!="string"&&(h=h[0]||""),t[h]&&(h+=l++)),t[h]=c,o.next=h,i(h)}else c=="pop"&&(o.next=s);if(o.push&&(o.nextState=o.next||o.push,o.next=f,delete o.push),o.rules)for(var w in o.rules)t[w]?t[w].push&&t[w].push.apply(t[w],o.rules[w]):t[w]=o.rules[w];
179var y=typeof o=="string"?o:o.include;if(y&&(y==="$self"&&(y="start"),Array.isArray(y)?a=y.map(function(d){return t[d]}):a=t[y]),a){var m=[e,1].concat(a);o.noEscape&&(m=m.filter(function(d){return!d.next})),r.splice.apply(r,m),e--}o.keywordMap&&(o.token=this.createKeywordMapper(o.keywordMap,o.defaultToken||"text",o.caseInsensitive),delete o.defaultToken)}}Object.keys(t).forEach(i,this)},this.createKeywordMapper=function(l,t,i,n){var r=Object.create(null);return this.$keywordList=[],Object.keys(l).forEach(function(e){for(var o=l[e],a=o.split(n||"|"),c=a.length;c--;){var h=a[c];this.$keywordList.push(h),i&&(h=h.toLowerCase()),r[h]=e}},this),l=null,i?function(e){return r[e.toLowerCase()]||t}:function(e){return r[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(p.prototype),E.TextHighlightRules=p}),ace.define("ace/mode/behaviour",["require","exports","module"],function(L,E,I){var v;v=function(){this.$behaviours={}},(function(){this.add=function(p,f,s){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[p]:this.$behaviours[p]={}}this.$behaviours[p][f]=s},this.addBehaviours=function(p){for(var f in p)for(var s in p[f])this.add(f,s,p[f][s])},this.remove=function(p){this.$behaviours&&this.$behaviours[p]&&delete this.$behaviours[p]},this.inherit=function(p,f){if(typeof p=="function")var s=new p().getBehaviours(f);else var s=p.getBehaviours(f);this.addBehaviours(s)},this.getBehaviours=function(p){if(p){for(var f={},s=0;s<p.length;s++)this.$behaviours[p[s]]&&(f[p[s]]=this.$behaviours[p[s]]);return f}else return this.$behaviours}}).call(v.prototype),E.Behaviour=v}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(L,E,I){var v=L("./range").Range,p=function(){function f(s,l,t){this.$session=s,this.$row=l,this.$rowTokens=s.getTokens(l);var i=s.getTokenAt(l,t);this.$tokenIndex=i?i.index:-1}return f.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]},f.prototype.stepForward=function(){this.$tokenIndex+=1;for(var s;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,s||(s=this.$session.getLength()),this.$row>=s)return this.$row=s-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},f.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},f.prototype.getCurrentTokenRow=function(){return this.$row},f.prototype.getCurrentTokenColumn=function(){var s=this.$rowTokens,l=this.$tokenIndex,t=s[l].start;if(t!==void 0)return t;for(t=0;l>0;)l-=1,t+=s[l].value.length;return t},f.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},f.prototype.getCurrentTokenRange=function(){var s=this.$rowTokens[this.$tokenIndex],l=this.getCurrentTokenColumn();return new v(this.$row,l,this.$row,l+s.value.length)},f}();E.TokenIterator=p}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(L,E,I){var v=L("../../lib/oop"),p=L("../behaviour").Behaviour,f=L("../../token_iterator").TokenIterator,s=L("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],t=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],i,n={},r={'"':'"',"'":"'"},e=function(c){var h=-1;if(c.multiSelect&&(h=c.selection.index,n.rangeCount!=c.multiSelect.rangeCount&&(n={rangeCount:c.multiSelect.rangeCount})),n[h])return i=n[h];i=n[h]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},o=function(c,h,w,y){var m=c.end.row-c.start.row;return{text:w+h+y,selection:[0,c.start.column+1,m,c.end.column+(m?0:1)]}},a;a=function(c){c=c||{},this.add("braces","insertion",function(h,w,y,m,d){var C=y.getCursorPosition(),x=m.doc.getLine(C.row);if(d=="{"){e(y);var A=y.getSelectionRange(),M=m.doc.getTextRange(A),_=m.getTokenAt(C.row,C.column);if(M!==""&&M!=="{"&&y.getWrapBehavioursEnabled())return o(A,M,"{","}");if(_&&/(?:string)\.quasi|\.xml/.test(_.type)){var S=[/tag\-(?:open|name)/,/attribute\-name/];return S.some(function(R){return R.test(_.type)})||/(string)\.quasi/.test(_.type)&&_.value[C.column-_.start-1]!=="$"?void 0:(a.recordAutoInsert(y,m,"}"),{text:"{}",selection:[1,1]})}else if(a.isSaneInsertion(y,m))return/[\]\}\)]/.test(x[C.column])||y.inMultiSelectMode||c.braces?(a.recordAutoInsert(y,m,"}"),{text:"{}",selection:[1,1]}):(a.recordMaybeInsert(y,m,"{"),{text:"{",selection:[1,1]})}else if(d=="}"){e(y);var $=x.substring(C.column,C.column+1);if($=="}"){var g=m.$findOpeningBracket("}",{column:C.column+1,row:C.row});if(g!==null&&a.isAutoInsertedClosing(C,x,d))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(d==` 180`||d==`\r 181`){e(y);var u="";a.isMaybeInsertedClosing(C,x)&&(u=s.stringRepeat("}",i.maybeInsertedBrackets),a.clearMaybeInsertedClosing());var $=x.substring(C.column,C.column+1);if($==="}"){var b=m.findMatchingBracket({row:C.row,column:C.column+1},"}");if(!b)return null;var k=this.$getIndent(m.getLine(b.row))}
181else if(u)var k=this.$getIndent(x);else{a.clearMaybeInsertedClosing();return}var T=k+m.getTabString();return{text:` 182`+T+` 183`+k+u,selection:[1,T.length,1,T.length]}}else a.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(h,w,y,m,d){var C=m.doc.getTextRange(d);if(!d.isMultiLine()&&C=="{"){e(y);var x=m.doc.getLine(d.start.row),A=x.substring(d.end.column,d.end.column+1);if(A=="}")return d.end.column++,d;i.maybeInsertedBrackets--}}),this.add("parens","insertion",function(h,w,y,m,d){if(d=="("){e(y);var C=y.getSelectionRange(),x=m.doc.getTextRange(C);if(x!==""&&y.getWrapBehavioursEnabled())return o(C,x,"(",")");if(a.isSaneInsertion(y,m))return a.recordAutoInsert(y,m,")"),{text:"()",selection:[1,1]}}else if(d==")"){e(y);var A=y.getCursorPosition(),M=m.doc.getLine(A.row),_=M.substring(A.column,A.column+1);if(_==")"){var S=m.$findOpeningBracket(")",{column:A.column+1,row:A.row});if(S!==null&&a.isAutoInsertedClosing(A,M,d))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(h,w,y,m,d){var C=m.doc.getTextRange(d);if(!d.isMultiLine()&&C=="("){e(y);var x=m.doc.getLine(d.start.row),A=x.substring(d.start.column+1,d.start.column+2);if(A==")")return d.end.column++,d}}),this.add("brackets","insertion",function(h,w,y,m,d){if(d=="["){e(y);var C=y.getSelectionRange(),x=m.doc.getTextRange(C);if(x!==""&&y.getWrapBehavioursEnabled())return o(C,x,"[","]");if(a.isSaneInsertion(y,m))return a.recordAutoInsert(y,m,"]"),{text:"[]",selection:[1,1]}}else if(d=="]"){e(y);var A=y.getCursorPosition(),M=m.doc.getLine(A.row),_=M.substring(A.column,A.column+1);if(_=="]"){var S=m.$findOpeningBracket("]",{column:A.column+1,row:A.row});if(S!==null&&a.isAutoInsertedClosing(A,M,d))return a.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(h,w,y,m,d){var C=m.doc.getTextRange(d);if(!d.isMultiLine()&&C=="["){e(y);var x=m.doc.getLine(d.start.row),A=x.substring(d.start.column+1,d.start.column+2);if(A=="]")return d.end.column++,d}}),this.add("string_dquotes","insertion",function(h,w,y,m,d){var C=m.$mode.$quotes||r;if(d.length==1&&C[d]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(d)!=-1)return;e(y);var x=d,A=y.getSelectionRange(),M=m.doc.getTextRange(A);if(M!==""&&(M.length!=1||!C[M])&&y.getWrapBehavioursEnabled())return o(A,M,x,x);if(!M){var _=y.getCursorPosition(),S=m.doc.getLine(_.row),$=S.substring(_.column-1,_.column),g=S.substring(_.column,_.column+1),u=m.getTokenAt(_.row,_.column),b=m.getTokenAt(_.row,_.column+1);if($=="\\"&&u&&/escape/.test(u.type))return null;var k=u&&/string|escape/.test(u.type),T=!b||/string|escape/.test(b.type),R;if(g==x)R=k!==T,R&&/string\.end/.test(b.type)&&(R=!1);else{if(k&&!T||k&&T)return null;var D=m.$mode.tokenRe;D.lastIndex=0;var O=D.test($);D.lastIndex=0;var P=D.test(g),N=m.$mode.$pairQuotesAfter,F=N&&N[x]&&N[x].test($);if(!F&&O||P||g&&!/[\s;,.})\]\\]/.test(g))return null;var W=S[_.column-2];if($==x&&(W==x||D.test(W)))return null;R=!0}return{text:R?x+x:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(h,w,y,m,d){var C=m.$mode.$quotes||r,x=m.doc.getTextRange(d);if(!d.isMultiLine()&&C.hasOwnProperty(x)){e(y);var A=m.doc.getLine(d.start.row),M=A.substring(d.start.column+1,d.start.column+2);if(M==x)return d.end.column++,d}}),c.closeDocComment!==!1&&this.add("doc comment end","insertion",function(h,w,y,m,d){if(h==="doc-start"&&(d===` 184`||d===`\r 185`)&&y.selection.isEmpty()){var C=y.getCursorPosition();if(C.column===0)return;for(var x=m.doc.getLine(C.row),A=m.doc.getLine(C.row+1),M=m.getTokens(C.row),_=0,S=0;S<M.length;S++){_+=M[S].value.length;var $=M[S];if(_>=C.column){if(_===C.column){if(!/\.doc/.test($.type))return;if(/\*\//.test($.value)){var g=M[S+1];if(!g||!/\.doc/.test(g.type))return}}var u=C.column-(_-$.value.length),b=$.value.indexOf("*/"),k=$.value.indexOf("/**",b>-1?b+2:0);if(k!==-1&&u>k&&u<k+3||b!==-1&&k!==-1&&u>=b&&u<=k||!/\.doc/.test($.type))return;break}}var T=this.$getIndent(x);if(/\s*\*/.test(A))return/^\s*\*/.test(x)?{text:d+T+"* ",selection:[1,2+T.length,1,2+T.length]}:{text:d+T+" * ",selection:[1,3+T.length,1,3+T.length]};if(/\/\*\*/.test(x.substring(0,C.column)))return{text:d+T+" * "+d+" "+T+"*/",selection:[1,4+T.length,1,4+T.length]}}})},a.isSaneInsertion=function(c,h){var w=c.getCursorPosition(),y=new f(h,w.row,w.column);if(!this.$matchTokenType(y.getCurrentToken()||"text",l)){if(/[)}\]]/.test(c.session.getLine(w.row)[w.column]))return!0;var m=new f(h,w.row,w.column+1);if(!this.$matchTokenType(m.getCurrentToken()||"text",l))return!1}return y.stepForward(),y.getCurrentTokenRow()!==w.row||this.$matchTokenType(y.getCurrentToken()||"text",t)},a.$matchTokenType=function(c,h){return h.indexOf(c.type||c)>-1},a.recordAutoInsert=function(c,h,w){var y=c.getCursorPosition(),m=h.doc.getLine(y.row);
185this.isAutoInsertedClosing(y,m,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=y.row,i.autoInsertedLineEnd=w+m.substr(y.column),i.autoInsertedBrackets++},a.recordMaybeInsert=function(c,h,w){var y=c.getCursorPosition(),m=h.doc.getLine(y.row);this.isMaybeInsertedClosing(y,m)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=y.row,i.maybeInsertedLineStart=m.substr(0,y.column)+w,i.maybeInsertedLineEnd=m.substr(y.column),i.maybeInsertedBrackets++},a.isAutoInsertedClosing=function(c,h,w){return i.autoInsertedBrackets>0&&c.row===i.autoInsertedRow&&w===i.autoInsertedLineEnd[0]&&h.substr(c.column)===i.autoInsertedLineEnd},a.isMaybeInsertedClosing=function(c,h){return i.maybeInsertedBrackets>0&&c.row===i.maybeInsertedRow&&h.substr(c.column)===i.maybeInsertedLineEnd&&h.substr(0,c.column)==i.maybeInsertedLineStart},a.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},a.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},v.inherits(a,p),E.CstyleBehaviour=a}),ace.define("ace/unicode",["require","exports","module"],function(L,E,I){for(var v=[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],p=0,f=[],s=0;s<v.length;s+=2)f.push(p+=v[s]),v[s+1]&&f.push(45,p+=v[s+1]);E.wordChars=String.fromCharCode.apply(null,f)}),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(L,E,I){var v=L("../config"),p=L("../tokenizer").Tokenizer,f=L("./text_highlight_rules").TextHighlightRules,s=L("./behaviour/cstyle").CstyleBehaviour,l=L("../unicode"),t=L("../lib/lang"),i=L("../token_iterator").TokenIterator,n=L("../range").Range,r;r=function(){this.HighlightRules=f},(function(){this.$defaultBehaviour=new s,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 p(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,o,a,c){var h=o.doc,w=!0,y=!0,m=1/0,d=o.getTabSize(),C=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var M=this.lineCommentStart.map(t.escapeRegExp).join("|"),x=this.lineCommentStart[0];else var M=t.escapeRegExp(this.lineCommentStart),x=this.lineCommentStart;M=new RegExp("^(\\s*)(?:"+M+") ?"),C=o.getUseSoftTabs();var $=function(P,N){var F=P.match(M);if(F){var W=F[1].length,B=F[0].length;!b(P,W,B)&&F[0][B-1]==" "&&B--,h.removeInLine(N,W,B)}},u=x+" ",S=function(P,N){(!w||/\S/.test(P))&&(b(P,m,m)?h.insertInLine({row:N,column:m},u):h.insertInLine({row:N,column:m},x))},g=function(P,N){return M.test(P)},b=function(P,N,F){for(var W=0;N--&&P.charAt(N)==" ";)W++;if(W%d!=0)return!1;for(var W=0;P.charAt(F++)==" ";)W++;return d>2?W%d!=d-1:W%d==0}}else{if(!this.blockComment)return!1;var x=this.blockComment.start,A=this.blockComment.end,M=new RegExp("^(\\s*)(?:"+t.escapeRegExp(x)+")"),_=new RegExp("(?:"+t.escapeRegExp(A)+")\\s*$"),S=function(R,D){g(R,D)||(!w||/\S/.test(R))&&(h.insertInLine({row:D,column:R.length},A),h.insertInLine({row:D,column:m},x))},$=function(R,D){var O;(O=R.match(_))&&h.removeInLine(D,R.length-O[0].length,R.length),(O=R.match(M))&&h.removeInLine(D,O[1].length,O[0].length)},g=function(R,D){if(M.test(R))return!0;for(var O=o.getTokens(D),P=0;P<O.length;P++)if(O[P].type==="comment")return!0}}function k(R){for(var D=a;D<=c;D++)R(h.getLine(D),D)}var T=1/0;k(function(R,D){var O=R.search(/\S/);
185O!==-1?(O<m&&(m=O),y&&!g(R,D)&&(y=!1)):T>R.length&&(T=R.length)}),m==1/0&&(m=T,w=!1,y=!1),C&&m%d!=0&&(m=Math.floor(m/d)*d),k(y?$:S)},this.toggleBlockComment=function(e,o,a,c){var h=this.blockComment;if(h){!h.start&&h[0]&&(h=h[0]);var w=new i(o,c.row,c.column),y=w.getCurrentToken();o.selection;var m=o.selection.toOrientedRange(),d,C;if(y&&/comment/.test(y.type)){for(var x,A;y&&/comment/.test(y.type);){var M=y.value.indexOf(h.start);if(M!=-1){var _=w.getCurrentTokenRow(),S=w.getCurrentTokenColumn()+M;x=new n(_,S,_,S+h.start.length);break}y=w.stepBackward()}for(var w=new i(o,c.row,c.column),y=w.getCurrentToken();y&&/comment/.test(y.type);){var M=y.value.indexOf(h.end);if(M!=-1){var _=w.getCurrentTokenRow(),S=w.getCurrentTokenColumn()+M;A=new n(_,S,_,S+h.end.length);break}y=w.stepForward()}A&&o.remove(A),x&&(o.remove(x),d=x.start.row,C=-h.start.length)}else C=h.start.length,d=a.start.row,o.insert(a.end,h.end),o.insert(a.start,h.start);m.start.row==d&&(m.start.column+=C),m.end.row==d&&(m.end.column+=C),o.selection.fromOrientedRange(m)}},this.getNextLineIndent=function(e,o,a){return this.$getIndent(o)},this.checkOutdent=function(e,o,a){return!1},this.autoOutdent=function(e,o,a){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var o in e)if(e[o]){var a=e[o],c=a.prototype.$id,h=v.$modes[c];h||(v.$modes[c]=h=new a),v.$modes[o]||(v.$modes[o]=h),this.$embeds.push(o),this.$modes[o]=h}for(var w=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],y=function(d){(function(C){var x=w[d],A=C[x];C[w[d]]=function(){return this.$delegator(x,arguments,A)}})(m)},m=this,o=0;o<w.length;o++)y(o)},this.$delegator=function(e,o,a){var c=o[0]||"start";if(typeof c!="string"){if(Array.isArray(c[2])){var h=c[2][c[2].length-1],w=this.$modes[h];if(w)return w[e].apply(w,[c[1]].concat([].slice.call(o,1)))}c=c[0]||"start"}for(var y=0;y<this.$embeds.length;y++)if(this.$modes[this.$embeds[y]]){var m=c.split(this.$embeds[y]);if(!m[0]&&m[1]){o[0]=m[1];var w=this.$modes[this.$embeds[y]];return w[e].apply(w,o)}}var d=a.apply(this,o);return a?d:void 0},this.transformAction=function(e,o,a,c,h){if(this.$behaviour){var w=this.$behaviour.getBehaviours();for(var y in w)if(w[y][o]){var m=w[y][o].apply(this,arguments);if(m)return m}}},this.getKeywords=function(e){if(!this.completionKeywords){var o=this.$tokenizer.rules,a=[];for(var c in o)for(var h=o[c],w=0,y=h.length;w<y;w++)if(typeof h[w].token=="string")/keyword|support|storage/.test(h[w].token)&&a.push(h[w].regex);else if(typeof h[w].token=="object"){for(var m=0,d=h[w].token.length;m<d;m++)if(/keyword|support|storage/.test(h[w].token[m])){var c=h[w].regex.match(/\(.+?\)/g)[m];a.push(c.substr(1,c.length-2))}}this.completionKeywords=a}return e?a.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,o,a,c){var h=this.$keywordList||this.$createKeywordList();return h.map(function(w){return{name:w,value:w,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(r.prototype),E.Mode=r}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(L,E,I){var v=L("./lib/dom"),p=function(){function f(s){this.session=s,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 f.prototype.getRowLength=function(s){var l;return this.lineWidgets?l=this.lineWidgets[s]&&this.lineWidgets[s].rowCount||0:l=0,
185!this.$useWrapMode||!this.$wrapData[s]?1+l:this.$wrapData[s].length+1+l},f.prototype.$getWidgetScreenLength=function(){var s=0;return this.lineWidgets.forEach(function(l){l&&l.rowCount&&!l.hidden&&(s+=l.rowCount)}),s},f.prototype.$onChangeEditor=function(s){this.attach(s.editor)},f.prototype.attach=function(s){s&&s.widgetManager&&s.widgetManager!=this&&s.widgetManager.detach(),this.editor!=s&&(this.detach(),this.editor=s,s&&(s.widgetManager=this,s.renderer.on("beforeRender",this.measureWidgets),s.renderer.on("afterRender",this.renderWidgets)))},f.prototype.detach=function(s){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 t=this.session.lineWidgets;t&&t.forEach(function(i){i&&i.el&&i.el.parentNode&&(i._inDocument=!1,i.el.parentNode.removeChild(i.el))})}},f.prototype.updateOnFold=function(s,l){var t=l.lineWidgets;if(!(!t||!s.action)){for(var i=s.data,n=i.start.row,r=i.end.row,e=s.action=="add",o=n+1;o<r;o++)t[o]&&(t[o].hidden=e);t[r]&&(e?t[n]?t[r].hidden=e:t[n]=t[r]:(t[n]==t[r]&&(t[n]=void 0),t[r].hidden=e))}},f.prototype.updateOnChange=function(s){var l=this.session.lineWidgets;if(l){var t=s.start.row,i=s.end.row-t;if(i!==0)if(s.action=="remove"){var n=l.splice(t+1,i);!l[t]&&n[n.length-1]&&(l[t]=n.pop()),n.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var r=new Array(i);l[t]&&l[t].column!=null&&s.start.column>l[t].column&&t++,r.unshift(t,0),l.splice.apply(l,r),this.$updateRows()}}},f.prototype.$updateRows=function(){var s=this.session.lineWidgets;if(s){var l=!0;s.forEach(function(t,i){if(t)for(l=!1,t.row=i;t.$oldWidget;)t.$oldWidget.row=i,t=t.$oldWidget}),l&&(this.session.lineWidgets=null)}},f.prototype.$registerLineWidget=function(s){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var l=this.session.lineWidgets[s.row];return l&&(s.$oldWidget=l,l.el&&l.el.parentNode&&(l.el.parentNode.removeChild(l.el),l._inDocument=!1)),this.session.lineWidgets[s.row]=s,s},f.prototype.addLineWidget=function(s){if(this.$registerLineWidget(s),s.session=this.session,!this.editor)return s;var l=this.editor.renderer;s.html&&!s.el&&(s.el=v.createElement("div"),s.el.innerHTML=s.html),s.text&&!s.el&&(s.el=v.createElement("div"),s.el.textContent=s.text),s.el&&(v.addCssClass(s.el,"ace_lineWidgetContainer"),s.className&&v.addCssClass(s.el,s.className),s.el.style.position="absolute",s.el.style.zIndex="5",l.container.appendChild(s.el),s._inDocument=!0,s.coverGutter||(s.el.style.zIndex="3"),s.pixelHeight==null&&(s.pixelHeight=s.el.offsetHeight)),s.rowCount==null&&(s.rowCount=s.pixelHeight/l.layerConfig.lineHeight);var t=this.session.getFoldAt(s.row,0);if(s.$fold=t,t){var i=this.session.lineWidgets;s.row==t.end.row&&!i[t.start.row]?i[t.start.row]=s:s.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows(),this.renderWidgets(null,l),this.onWidgetChanged(s),s},f.prototype.removeLineWidget=function(s){if(s._inDocument=!1,s.session=null,s.el&&s.el.parentNode&&s.el.parentNode.removeChild(s.el),s.editor&&s.editor.destroy)try{s.editor.destroy()}catch{}if(this.session.lineWidgets){var l=this.session.lineWidgets[s.row];if(l==s)this.session.lineWidgets[s.row]=s.$oldWidget,s.$oldWidget&&this.onWidgetChanged(s.$oldWidget);else for(;l;){if(l.$oldWidget==s){l.$oldWidget=s.$oldWidget;break}l=l.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:s.row}}}),this.$updateRows()},f.prototype.getWidgetsAtRow=function(s){for(var l=this.session.lineWidgets,t=l&&l[s],i=[];t;)i.push(t),t=t.$oldWidget;return i},f.prototype.onWidgetChanged=function(s){this.session._changedWidgets.push(s),this.editor&&this.editor.renderer.updateFull()},f.prototype.measureWidgets=function(s,l){var t=this.session._changedWidgets,i=l.layerConfig;if(!(!t||!t.length)){for(var n=1/0,r=0;r<t.length;r++){var e=t[r];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/i.characterWidth));var o=e.h/i.lineHeight;e.coverLine&&(o-=this.session.getRowLineCount(e.row),o<0&&(o=0)),e.rowCount!=o&&(e.rowCount=o,e.row<n&&(n=e.row))}}n!=1/0&&(this.session._emit("changeFold",{data:{start:{row:n}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},f.prototype.renderWidgets=function(s,l){var t=l.layerConfig,i=this.session.lineWidgets;
185if(i){for(var n=Math.min(this.firstRow,t.firstRow),r=Math.max(this.lastRow,t.lastRow,i.length);n>0&&!i[n];)n--;this.firstRow=t.firstRow,this.lastRow=t.lastRow,l.$cursorLayer.config=t;for(var e=n;e<=r;e++){var o=i[e];if(!(!o||!o.el)){if(o.hidden){o.el.style.top=-100-(o.pixelHeight||0)+"px";continue}o._inDocument||(o._inDocument=!0,l.container.appendChild(o.el));var a=l.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;o.coverLine||(a+=t.lineHeight*this.session.getRowLineCount(o.row)),o.el.style.top=a-t.offset+"px";var c=o.coverGutter?0:l.gutterWidth;o.fixedWidth||(c-=l.scrollLeft),o.el.style.left=c+"px",o.fullWidth&&o.screenWidth&&(o.el.style.minWidth=t.width+2*t.padding+"px"),o.fixedWidth?o.el.style.right=l.scrollBar.getWidth()+"px":o.el.style.right=""}}}},f}();E.LineWidgets=p}),ace.define("ace/apply_delta",["require","exports","module"],function(L,E,I){E.applyDelta=function(v,p,f){var s=p.start.row,l=p.start.column,t=v[s]||"";switch(p.action){case"insert":var i=p.lines;if(i.length===1)v[s]=t.substring(0,l)+p.lines[0]+t.substring(l);else{var n=[s,1].concat(p.lines);v.splice.apply(v,n),v[s]=t.substring(0,l)+v[s],v[s+p.lines.length-1]+=t.substring(l)}break;case"remove":var r=p.end.column,e=p.end.row;s===e?v[s]=t.substring(0,l)+t.substring(r):v.splice(s,e-s+1,t.substring(0,l)+v[e].substring(r));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(L,E,I){var v=L("./lib/oop"),p=L("./lib/event_emitter").EventEmitter,f=function(){function t(i,n,r){this.$onChange=this.onChange.bind(this),this.attach(i),typeof n!="number"?this.setPosition(n.row,n.column):this.setPosition(n,r)}return t.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},t.prototype.getDocument=function(){return this.document},t.prototype.onChange=function(i){if(!(i.start.row==i.end.row&&i.start.row!=this.row)&&!(i.start.row>this.row)){var n=l(i,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},t.prototype.setPosition=function(i,n,r){var e;if(r?e={row:i,column:n}:e=this.$clipPositionToDocument(i,n),!(this.row==e.row&&this.column==e.column)){var o={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:o,value:e})}},t.prototype.detach=function(){this.document.off("change",this.$onChange)},t.prototype.attach=function(i){this.document=i||this.document,this.document.on("change",this.$onChange)},t.prototype.$clipPositionToDocument=function(i,n){var r={};return i>=this.document.getLength()?(r.row=Math.max(0,this.document.getLength()-1),r.column=this.document.getLine(r.row).length):i<0?(r.row=0,r.column=0):(r.row=i,r.column=Math.min(this.document.getLine(r.row).length,Math.max(0,n))),n<0&&(r.column=0),r},t}();f.prototype.$insertRight=!1,v.implement(f.prototype,p);function s(t,i,n){var r=n?t.column<=i.column:t.column<i.column;return t.row<i.row||t.row==i.row&&r}function l(t,i,n){var r=t.action=="insert",e=(r?1:-1)*(t.end.row-t.start.row),o=(r?1:-1)*(t.end.column-t.start.column),a=t.start,c=r?a:t.end;return s(i,a,n)?{row:i.row,column:i.column}:s(c,i,!n)?{row:i.row+e,column:i.column+(i.row==c.row?o:0)}:{row:a.row,column:a.column}}E.Anchor=f}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(L,E,I){var v=L("./lib/oop"),p=L("./apply_delta").applyDelta,f=L("./lib/event_emitter").EventEmitter,s=L("./range").Range,l=L("./anchor").Anchor,t=function(){function i(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 i.prototype.setValue=function(n){var r=this.getLength()-1;this.remove(new s(0,0,r,this.getLine(r).length)),this.insert({row:0,column:0},n||"")},i.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},i.prototype.createAnchor=function(n,r){return new l(this,n,r)},i.prototype.$detectNewLine=function(n){var r=n.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=r?r[1]:` 186`,this._signal("changeNewLineMode")},i.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r 187`;case"unix":return` 188`;default:return this.$autoNewLine||` 189`}},i.prototype.setNewLineMode=function(n){this.$newLineMode!==n&&(this.$newLineMode=n,this._signal("changeNewLineMode"))},i.prototype.getNewLineMode=function(){return this.$newLineMode},i.prototype.isNewLine=function(n){return n==`\r 190`||n=="\r"||n==` 191`},i.prototype.getLine=function(n){return this.$lines[n]||""},i.prototype.getLines=function(n,r){return this.$lines.slice(n,r+1)},i.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},i.prototype.getLength=function(){return this.$lines.length},i.prototype.getTextRange=function(n){return this.getLinesForRange(n).join(this.getNewLineCharacter())},i.prototype.getLinesForRange=function(n){var r;if(n.start.row===n.end.row)r=[this.getLine(n.start.row).substring(n.start.column,n.end.column)];else{r=this.getLines(n.start.row,n.end.row),r[0]=(r[0]||"").substring(n.start.column);var e=r.length-1;n.end.row-n.start.row==e&&(r[e]=r[e].substring(0,n.end.column))}return r},i.prototype.insertLines=function(n,r){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(n,r)},i.prototype.removeLines=function(n,r){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(n,r)},i.prototype.insertNewLine=function(n){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(n,["",""])},i.prototype.insert=function(n,r){return this.getLength()<=1&&this.$detectNewLine(r),this.insertMergedLines(n,this.$split(r))},i.prototype.insertInLine=function(n,r){var e=this.clippedPos(n.row,n.column),o=this.pos(n.row,n.column+r.length);return this.applyDelta({start:e,end:o,action:"insert",lines:[r]},!0),this.clonePos(o)},i.prototype.clippedPos=function(n,r){var e=this.getLength();n===void 0?n=e:n<0?n=0:n>=e&&(n=e-1,r=void 0);var o=this.getLine(n);
191return r==null&&(r=o.length),r=Math.min(Math.max(r,0),o.length),{row:n,column:r}},i.prototype.clonePos=function(n){return{row:n.row,column:n.column}},i.prototype.pos=function(n,r){return{row:n,column:r}},i.prototype.$clipPosition=function(n){var r=this.getLength();return n.row>=r?(n.row=Math.max(0,r-1),n.column=this.getLine(r-1).length):(n.row=Math.max(0,n.row),n.column=Math.min(Math.max(n.column,0),this.getLine(n.row).length)),n},i.prototype.insertFullLines=function(n,r){n=Math.min(Math.max(n,0),this.getLength());var e=0;n<this.getLength()?(r=r.concat([""]),e=0):(r=[""].concat(r),n--,e=this.$lines[n].length),this.insertMergedLines({row:n,column:e},r)},i.prototype.insertMergedLines=function(n,r){var e=this.clippedPos(n.row,n.column),o={row:e.row+r.length-1,column:(r.length==1?e.column:0)+r[r.length-1].length};return this.applyDelta({start:e,end:o,action:"insert",lines:r}),this.clonePos(o)},i.prototype.remove=function(n){var r=this.clippedPos(n.start.row,n.start.column),e=this.clippedPos(n.end.row,n.end.column);return this.applyDelta({start:r,end:e,action:"remove",lines:this.getLinesForRange({start:r,end:e})}),this.clonePos(r)},i.prototype.removeInLine=function(n,r,e){var o=this.clippedPos(n,r),a=this.clippedPos(n,e);return this.applyDelta({start:o,end:a,action:"remove",lines:this.getLinesForRange({start:o,end:a})},!0),this.clonePos(o)},i.prototype.removeFullLines=function(n,r){n=Math.min(Math.max(0,n),this.getLength()-1),r=Math.min(Math.max(0,r),this.getLength()-1);var e=r==this.getLength()-1&&n>0,o=r<this.getLength()-1,a=e?n-1:n,c=e?this.getLine(a).length:0,h=o?r+1:r,w=o?0:this.getLine(h).length,y=new s(a,c,h,w),m=this.$lines.slice(n,r+1);return this.applyDelta({start:y.start,end:y.end,action:"remove",lines:this.getLinesForRange(y)}),m},i.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:["",""]})},i.prototype.replace=function(n,r){if(n instanceof s||(n=s.fromPoints(n.start,n.end)),r.length===0&&n.isEmpty())return n.start;if(r==this.getTextRange(n))return n.end;this.remove(n);var e;return r?e=this.insert(n.start,r):e=n.start,e},i.prototype.applyDeltas=function(n){for(var r=0;r<n.length;r++)this.applyDelta(n[r])},i.prototype.revertDeltas=function(n){for(var r=n.length-1;r>=0;r--)this.revertDelta(n[r])},i.prototype.applyDelta=function(n,r){var e=n.action=="insert";(e?n.lines.length<=1&&!n.lines[0]:!s.comparePoints(n.start,n.end))||(e&&n.lines.length>2e4?this.$splitAndapplyLargeDelta(n,2e4):(p(this.$lines,n,r),this._signal("change",n)))},i.prototype.$safeApplyDelta=function(n){var r=this.$lines.length;(n.action=="remove"&&n.start.row<r&&n.end.row<r||n.action=="insert"&&n.start.row<=r)&&this.applyDelta(n)},i.prototype.$splitAndapplyLargeDelta=function(n,r){for(var e=n.lines,o=e.length-r+1,a=n.start.row,c=n.start.column,h=0,w=0;h<o;h=w){w+=r-1;var y=e.slice(h,w);y.push(""),this.applyDelta({start:this.pos(a+h,c),end:this.pos(a+w,c=0),action:n.action,lines:y},!0)}n.lines=e.slice(h),n.start.row=a+h,n.start.column=c,this.applyDelta(n,!0)},i.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()})},i.prototype.indexToPosition=function(n,r){for(var e=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,a=r||0,c=e.length;a<c;a++)if(n-=e[a].length+o,n<0)return{row:a,column:n+e[a].length+o};return{row:c-1,column:n+e[c-1].length+o}},i.prototype.positionToIndex=function(n,r){for(var e=this.$lines||this.getAllLines(),o=this.getNewLineCharacter().length,a=0,c=Math.min(n.row,e.length),h=r||0;h<c;++h)a+=e[h].length+o;return a+n.column},i.prototype.$split=function(n){return n.split(/\r\n|\r|\n/)},i}();t.prototype.$autoNewLine="",t.prototype.$newLineMode="auto",v.implement(t.prototype,f),E.Document=t}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(L,E,I){var v=L("./lib/oop"),p=L("./lib/event_emitter").EventEmitter,f=function(){function s(l,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=l;var i=this;this.$worker=function(){if(i.running){for(var n=new Date,r=i.currentLine,e=-1,o=i.doc,a=r;i.lines[r];)r++;var c=o.getLength(),h=0;for(i.running=!1;r<c;){i.$tokenizeRow(r),e=r;do r++;while(i.lines[r]);if(h++,h%5===0&&new Date-n>20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=r,e==-1&&(e=r),a<=e&&i.fireUpdateEvent(a,e)}}}return s.prototype.setTokenizer=function(l){this.tokenizer=l,this.lines=[],this.states=[],this.start(0)},s.prototype.setDocument=function(l){this.doc=l,this.lines=[],this.states=[],this.stop()},s.prototype.fireUpdateEvent=function(l,t){var i={first:l,last:t};this._signal("update",{data:i})},s.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)},s.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},s.prototype.$updateOnChange=function(l){var t=l.start.row,i=l.end.row-t;if(i===0)this.lines[t]=null;else if(l.action=="remove")this.lines.splice(t,i+1,null),this.states.splice(t,i+1,null);else{var n=Array(i+1);n.unshift(t,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},s.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},s.prototype.getTokens=function(l){return this.lines[l]||this.$tokenizeRow(l)},s.prototype.getState=function(l){return this.currentLine==l&&this.$tokenizeRow(l),this.states[l]||"start"},s.prototype.$tokenizeRow=function(l){var t=this.doc.getLine(l),i=this.states[l-1],n=this.tokenizer.getLineTokens(t,i,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},s.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},s}();
191v.implement(f.prototype,p),E.BackgroundTokenizer=f}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(L,E,I){var v=L("./lib/lang"),p=L("./range").Range,f=function(){function s(l,t,i){i===void 0&&(i="text"),this.setRegexp(l),this.clazz=t,this.type=i,this.docLen=0}return s.prototype.setRegexp=function(l){this.regExp+""!=l+""&&(this.regExp=l,this.cache=[])},s.prototype.update=function(l,t,i,n){if(this.regExp){for(var r=n.firstRow,e=n.lastRow,o={},a=i.$editor&&i.$editor.$search,c=a&&a.$isMultilineSearch(i.$editor.getLastSearchOptions()),h=r;h<=e;h++){var w=this.cache[h];if(w==null||i.getValue().length!=this.docLen){if(c){w=[];var y=a.$multiLineForward(i,this.regExp,h,e);if(y){var m=y.endRow<=e?y.endRow-1:e;m>h&&(h=m),w.push(new p(y.startRow,y.startCol,y.endRow,y.endCol))}w.length>this.MAX_RANGES&&(w=w.slice(0,this.MAX_RANGES))}else w=v.getMatchOffsets(i.getLine(h),this.regExp),w.length>this.MAX_RANGES&&(w=w.slice(0,this.MAX_RANGES)),w=w.map(function(A){return new p(h,A.offset,h,A.offset+A.length)});this.cache[h]=w.length?w:""}if(w.length!==0)for(var d=w.length;d--;){var C=w[d].toScreenRange(i),x=C.toString();o[x]||(o[x]=!0,t.drawSingleLineMarker(l,C,this.clazz,n))}}this.docLen=i.getValue().length}},s}();f.prototype.MAX_RANGES=500,E.SearchHighlight=f}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(L,E,I){var v=function(){function m(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return m.prototype.addSession=function(d){this.$session=d},m.prototype.add=function(d,C,x){if(!this.$fromUndo&&d!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),C===!1||!this.lastDeltas){this.lastDeltas=[];var A=this.$undoStack.length;A>this.$undoDepth-1&&this.$undoStack.splice(0,A-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),d.id=this.$rev=++this.$maxRev}(d.action=="remove"||d.action=="insert")&&(this.$lastDelta=d),this.lastDeltas.push(d)}},m.prototype.addSelection=function(d,C){this.selections.push({value:d,rev:C||this.$rev})},m.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},m.prototype.markIgnored=function(d,C){C==null&&(C=this.$rev+1);for(var x=this.$undoStack,A=x.length;A--;){var M=x[A][0];if(M.id<=d)break;M.id<C&&(M.ignore=!0)}this.lastDeltas=null},m.prototype.getSelection=function(d,C){for(var x=this.selections,A=x.length;A--;){var M=x[A];if(M.rev<d)return C&&(M=x[A+1]),M}},m.prototype.getRevision=function(){return this.$rev},m.prototype.getDeltas=function(d,C){C==null&&(C=this.$rev+1);for(var x=this.$undoStack,A=null,M=0,_=x.length;_--;){var S=x[_][0];if(S.id<C&&!A&&(A=_+1),S.id<=d){M=_+1;break}}return x.slice(M,A)},m.prototype.getChangedRanges=function(d,C){C==null&&(C=this.$rev+1)},m.prototype.getChangedLines=function(d,C){C==null&&(C=this.$rev+1)},m.prototype.undo=function(d,C){this.lastDeltas=null;var x=this.$undoStack;if(p(x,x.length)){d||(d=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var A=x.pop(),M=null;return A&&(M=d.undoChanges(A,C),this.$redoStack.push(A),this.$syncRev()),this.$fromUndo=!1,M}},m.prototype.redo=function(d,C){if(this.lastDeltas=null,d||(d=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var x=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);y(this.$redoStack,x),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(_){_[0].id=++this.$maxRev},this)}var A=this.$redoStack.pop(),M=null;return A&&(M=d.redoChanges(A,C),this.$undoStack.push(A),this.$syncRev()),this.$fromUndo=!1,M},m.prototype.$syncRev=function(){var d=this.$undoStack,C=d[d.length-1],x=C&&C[0].id||0;this.$redoStackBaseRev=x,this.$rev=x},m.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=[]},m.prototype.canUndo=function(){return this.$undoStack.length>0},m.prototype.canRedo=function(){return this.$redoStack.length>0},m.prototype.bookmark=function(d){d==null&&(d=this.$rev),this.mark=d},m.prototype.isAtBookmark=function(){return this.$rev===this.mark},m.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},m.prototype.fromJSON=function(d){this.reset(),this.$undoStack=d.$undoStack,this.$redoStack=d.$redoStack},m.prototype.$prettyPrint=function(d){return d?i(d):i(this.$undoStack)+` 192--- 193`+i(this.$redoStack)},m}();v.prototype.hasUndo=v.prototype.canUndo,v.prototype.hasRedo=v.prototype.canRedo,v.prototype.isClean=v.prototype.isAtBookmark,v.prototype.markClean=v.prototype.bookmark;function p(m,d){for(var C=d;C--;){var x=m[C];if(x&&!x[0].ignore){for(;C<d-1;){var A=e(m[C],m[C+1]);m[C]=A[0],m[C+1]=A[1],C++}return!0}}}var f=L("./range").Range,s=f.comparePoints;f.comparePoints;function l(m){return{row:m.row,column:m.column}}function t(m){return{start:l(m.start),end:l(m.end),action:m.action,lines:m.lines.slice()}}function i(m){if(m=m||this,Array.isArray(m))return m.map(i).join(` 194`);var d="";return m.action?(d=m.action=="insert"?"+":"-",d+="["+m.lines+"]"):m.value&&(Array.isArray(m.value)?d=m.value.map(n).join(` 195`):d=n(m.value)),m.start&&(d+=n(m)),(m.id||m.rev)&&(d+=" ("+(m.id||m.rev)+")"),d}function n(m){return m.start.row+":"+m.start.column+"=>"+m.end.row+":"+m.end.column}function r(m,d){var C=m.action=="insert",x=d.action=="insert";if(C&&x)if(s(d.start,m.end)>=0)a(d,m,-1);else if(s(d.start,m.start)<=0)a(m,d,1);else return null;else if(C&&!x)if(s(d.start,m.end)>=0)a(d,m,-1);else if(s(d.end,m.start)<=0)a(m,d,-1);else return null;else if(!C&&x)if(s(d.start,m.start)>=0)a(d,m,1);else if(s(d.start,m.start)<=0)a(m,d,1);else return null;else if(!C&&!x)if(s(d.start,m.start)>=0)a(d,m,1);else if(s(d.end,m.start)<=0)a(m,d,-1);else return null;return[d,m]}function e(m,d){for(var C=m.length;C--;)for(var x=0;x<d.length;x++)if(!r(m[C],d[x])){for(;C<m.length;){for(;x--;)r(d[x],m[C]);x=d.length,C++}return[m,d]}return m.selectionBefore=d.selectionBefore=m.selectionAfter=d.selectionAfter=null,[d,m]}function o(m,d){var C=m.action=="insert",x=d.action=="insert";if(C&&x)s(m.start,d.start)<0?a(d,m,1):a(m,d,1);else if(C&&!x)s(m.start,d.end)>=0?a(m,d,-1):(s(m.start,d.start)<=0||a(m,f.fromPoints(d.start,m.start),-1),a(d,m,1));else if(!C&&x)s(d.start,m.end)>=0?a(d,m,-1):(s(d.start,m.start)<=0||a(d,f.fromPoints(m.start,d.start),-1),a(m,d,1));else if(!C&&!x)if(s(d.start,m.end)>=0)a(d,m,-1);else if(s(d.end,m.start)<=0)a(m,d,-1);else{var A,M;return s(m.start,d.start)<0&&(A=m,m=h(m,d.start)),s(m.end,d.end)>0&&(M=h(m,d.end)),c(d.end,m.start,m.end,-1),M&&!A&&(m.lines=M.lines,m.start=M.start,m.end=M.end,M=m),[d,A,M].filter(
195Boolean)}return[d,m]}function a(m,d,C){c(m.start,d.start,d.end,C),c(m.end,d.start,d.end,C)}function c(m,d,C,x){m.row==(x==1?d:C).row&&(m.column+=x*(C.column-d.column)),m.row+=x*(C.row-d.row)}function h(m,d){var C=m.lines,x=m.end;m.end=l(d);var A=m.end.row-m.start.row,M=C.splice(A,C.length),_=A?d.column:d.column-m.start.column;C.push(M[0].substring(0,_)),M[0]=M[0].substr(_);var S={start:l(d),end:x,lines:M,action:m.action};return S}function w(m,d){d=t(d);for(var C=m.length;C--;){for(var x=m[C],A=0;A<x.length;A++){var M=x[A],_=o(M,d);d=_[0],_.length!=2&&(_[2]?(x.splice(A+1,1,_[1],_[2]),A++):_[1]||(x.splice(A,1),A--))}x.length||m.splice(C,1)}return m}function y(m,d){for(var C=0;C<d.length;C++)for(var x=d[C],A=0;A<x.length;A++)w(m,x[A])}E.UndoManager=v}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(L,E,I){var v=L("../range").Range,p=function(){function f(s,l){this.foldData=s,Array.isArray(l)?this.folds=l:l=this.folds=[l];var t=l[l.length-1];this.range=new v(l[0].start.row,l[0].start.column,t.end.row,t.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(i){i.setFoldLine(this)},this)}return f.prototype.shiftRow=function(s){this.start.row+=s,this.end.row+=s,this.folds.forEach(function(l){l.start.row+=s,l.end.row+=s})},f.prototype.addFold=function(s){if(s.sameRow){if(s.start.row<this.startRow||s.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(s),this.folds.sort(function(l,t){return-l.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(s.start.row,s.start.column)>0?(this.end.row=s.end.row,this.end.column=s.end.column):this.range.compareStart(s.end.row,s.end.column)<0&&(this.start.row=s.start.row,this.start.column=s.start.column)}else if(s.start.row==this.end.row)this.folds.push(s),this.end.row=s.end.row,this.end.column=s.end.column;else if(s.end.row==this.start.row)this.folds.unshift(s),this.start.row=s.start.row,this.start.column=s.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");s.foldLine=this},f.prototype.containsRow=function(s){return s>=this.start.row&&s<=this.end.row},f.prototype.walk=function(s,l,t){var i=0,n=this.folds,r,e,o,a=!0;l==null&&(l=this.end.row,t=this.end.column);for(var c=0;c<n.length;c++){if(r=n[c],e=r.range.compareStart(l,t),e==-1){s(null,l,t,i,a);return}if(o=s(null,r.start.row,r.start.column,i,a),o=!o&&s(r.placeholder,r.start.row,r.start.column,i),o||e===0)return;a=!r.sameRow,i=r.end.column}s(null,l,t,i,a)},f.prototype.getNextFoldTo=function(s,l){for(var t,i,n=0;n<this.folds.length;n++){if(t=this.folds[n],i=t.range.compareEnd(s,l),i==-1)return{fold:t,kind:"after"};if(i===0)return{fold:t,kind:"inside"}}return null},f.prototype.addRemoveChars=function(s,l,t){var i=this.getNextFoldTo(s,l),n,r;if(i){if(n=i.fold,i.kind=="inside"&&n.start.column!=l&&n.start.row!=s)window.console&&window.console.log(s,l,n);else if(n.start.row==s){r=this.folds;var e=r.indexOf(n);for(e===0&&(this.start.column+=t),e;e<r.length;e++){if(n=r[e],n.start.column+=t,!n.sameRow)return;n.end.column+=t}this.end.column+=t}}},f.prototype.split=function(s,l){var t=this.getNextFoldTo(s,l);if(!t||t.kind=="inside")return null;var i=t.fold,n=this.folds,r=this.foldData,e=n.indexOf(i),o=n[e-1];this.end.row=o.end.row,this.end.column=o.end.column,n=n.splice(e,n.length-e);var a=new f(r,n);return r.splice(r.indexOf(this)+1,0,a),a},f.prototype.merge=function(s){for(var l=s.folds,t=0;t<l.length;t++)this.addFold(l[t]);var i=this.foldData;i.splice(i.indexOf(s),1)},f.prototype.toString=function(){var s=[this.range.toString()+": ["];return this.folds.forEach(function(l){s.push(" "+l.toString())}),s.push("]"),s.join(` 196`)},f.prototype.idxToPosition=function(s){for(var l=0,t=0;t<this.folds.length;t++){var i=this.folds[t];if(s-=i.start.column-l,s<0)return{row:i.start.row,column:i.start.column+s};if(s-=i.placeholder.length,s<0)return i.start;l=i.end.column}return{row:this.end.row,column:this.end.column+s}},f}();E.FoldLine=p}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(L,E,I){var v=L("./range").Range,p=v.comparePoints,f=function(){function s(){this.ranges=[],this.$bias=1}return s.prototype.pointIndex=function(l,t,i){for(var n=this.ranges,r=i||0;r<n.length;r++){var e=n[r],o=p(l,e.end);if(!(o>0)){var a=p(l,e.start);return o===0?t&&a!==0?-r-2:r:a>0||a===0&&!t?r:-r-1}}return-r-1},s.prototype.add=function(l){var t=!l.isEmpty(),i=this.pointIndex(l.start,t);i<0&&(i=-i-1);var n=this.pointIndex(l.end,t,i);return n<0?n=-n-1:n++,this.ranges.splice(i,n-i,l)},s.prototype.addList=function(l){for(var t=[],i=l.length;i--;)t.push.apply(t,this.add(l[i]));return t},s.prototype.substractPoint=function(l){var t=this.pointIndex(l);if(t>=0)return this.ranges.splice(t,1)},s.prototype.merge=function(){var l=[],t=this.ranges;t=t.sort(function(o,a){return p(o.start,a.start)});for(var i=t[0],n,r=1;r<t.length;r++){n=i,i=t[r];var e=p(n.end,i.start);e<0||e==0&&!n.isEmpty()&&!i.isEmpty()||(p(n.end,i.end)<0&&(n.end.row=i.end.row,n.end.column=i.end.column),t.splice(r,1),l.push(i),i=n,r--)}return this.ranges=t,l},s.prototype.contains=function(l,t){return this.pointIndex({row:l,column:t})>=0},s.prototype.containsPoint=function(l){return this.pointIndex(l)>=0},s.prototype.rangeAtPoint=function(l){var t=this.pointIndex(l);if(t>=0)return this.ranges[t]},s.prototype.clipRows=function(l,t){var i=this.ranges;if(i[0].start.row>t||i[i.length-1].start.row<l)return[];var n=this.pointIndex({row:l,column:0});n<0&&(n=-n-1);var r=this.pointIndex({row:t,column:0},n);r<0&&(r=-r-1);for(var e=[],o=n;o<r;
196o++)e.push(i[o]);return e},s.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},s.prototype.attach=function(l){this.session&&this.detach(),this.session=l,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},s.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},s.prototype.$onChange=function(l){for(var t=l.start,i=l.end,n=t.row,r=i.row,e=this.ranges,o=0,a=e.length;o<a;o++){var c=e[o];if(c.end.row>=n)break}if(l.action=="insert")for(var h=r-n,w=-t.column+i.column;o<a;o++){var c=e[o];if(c.start.row>n)break;if(c.start.row==n&&c.start.column>=t.column&&(c.start.column==t.column&&this.$bias<=0||(c.start.column+=w,c.start.row+=h)),c.end.row==n&&c.end.column>=t.column){if(c.end.column==t.column&&this.$bias<0)continue;c.end.column==t.column&&w>0&&o<a-1&&c.end.column>c.start.column&&c.end.column==e[o+1].start.column&&(c.end.column-=w),c.end.column+=w,c.end.row+=h}}else for(var h=n-r,w=t.column-i.column;o<a;o++){var c=e[o];if(c.start.row>r)break;c.end.row<r&&(n<c.end.row||n==c.end.row&&t.column<c.end.column)?(c.end.row=n,c.end.column=t.column):c.end.row==r?c.end.column<=i.column?(h||c.end.column>t.column)&&(c.end.column=t.column,c.end.row=t.row):(c.end.column+=w,c.end.row+=h):c.end.row>r&&(c.end.row+=h),c.start.row<r&&(n<c.start.row||n==c.start.row&&t.column<c.start.column)?(c.start.row=n,c.start.column=t.column):c.start.row==r?c.start.column<=i.column?(h||c.start.column>t.column)&&(c.start.column=t.column,c.start.row=t.row):(c.start.column+=w,c.start.row+=h):c.start.row>r&&(c.start.row+=h)}if(h!=0&&o<a)for(;o<a;o++){var c=e[o];c.start.row+=h,c.end.row+=h}},s}();f.prototype.comparePoints=p,E.RangeList=f}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(L,E,I){var v=this&&this.__extends||function(){var n=function(r,e){return n=Object.
196setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},n(r,e)};return function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(r,e);function o(){this.constructor=r}r.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)}}(),p=L("../range_list").RangeList,f=function(n){v(r,n);function r(e,o){var a=n.call(this)||this;return a.foldLine=null,a.placeholder=o,a.range=e,a.start=e.start,a.end=e.end,a.sameRow=e.start.row==e.end.row,a.subFolds=a.ranges=[],a}return r.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},r.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(o){o.setFoldLine(e)})},r.prototype.clone=function(){var e=this.range.clone(),o=new r(e,this.placeholder);return this.subFolds.forEach(function(a){o.subFolds.push(a.clone())}),o.collapseChildren=this.collapseChildren,o},r.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){l(e,this.start);for(var w=e.start.row,y=e.start.column,o=0,a=-1;o<this.subFolds.length&&(a=this.subFolds[o].range.compare(w,y),a==1);o++);var c=this.subFolds[o],h=0;if(a==0){if(c.range.containsRange(e))return c.addSubFold(e);h=1}for(var w=e.range.end.row,y=e.range.end.column,m=o,a=-1;m<this.subFolds.length&&(a=this.subFolds[m].range.compare(w,y),a==1);m++);a==0&&m++;for(var d=this.subFolds.splice(o,m-o,e),C=a==0?d.length-1:d.length,x=h;x<C;x++)e.addSubFold(d[x]);return e.setFoldLine(this.foldLine),e}},r.prototype.restoreRange=function(e){return i(e,this.start)},r}(p);function s(n,r){n.row-=r.row,n.row==0&&(n.column-=r.column)}function l(n,r){s(n.start,r),s(n.end,r)}function t(n,r){n.row==0&&(n.column+=r.column),n.row+=r.row}function i(n,r){t(n.start,r),t(n.end,r)}E.Fold=f}),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(L,E,I){var v=L("../range").Range,p=L("./fold_line").FoldLine,f=L("./fold").Fold,s=L("../token_iterator").TokenIterator,l=L("../mouse/mouse_event").MouseEvent;function t(){this.getFoldAt=function(i,n,r){var e=this.getFoldLine(i);if(!e)return null;for(var o=e.folds,a=0;a<o.length;a++){var c=o[a].range;if(c.contains(i,n)){if(r==1&&c.isEnd(i,n)&&!c.isEmpty())continue;if(r==-1&&c.isStart(i,n)&&!c.isEmpty())continue;return o[a]}}},this.getFoldsInRange=function(i){var n=i.start,r=i.end,e=this.$foldData,o=[];n.column+=1,r.column-=1;for(var a=0;a<e.length;a++){var c=e[a].range.compareRange(i);if(c!=2){if(c==-2)break;for(var h=e[a].folds,w=0;w<h.length;w++){var y=h[w];if(c=y.range.compareRange(i),c==-2)break;if(c==2)continue;if(c==42)break;o.push(y)}}}return n.column-=1,r.column+=1,o},this.getFoldsInRangeList=function(i){if(Array.isArray(i)){var n=[];i.forEach(function(r){n=n.concat(this.getFoldsInRange(r))},this)}else var n=this.getFoldsInRange(i);return n},this.getAllFolds=function(){for(var i=[],n=this.$foldData,r=0;r<n.length;r++)for(var e=0;e<n[r].folds.length;e++)i.push(n[r].folds[e]);return i},this.getFoldStringAt=function(i,n,r,e){if(e=e||this.getFoldLine(i),!e)return null;for(var o={end:{column:0}},a,c,h=0;h<e.folds.length;h++){c=e.folds[h];var w=c.range.compareEnd(i,n);if(w==-1){a=this.getLine(c.start.row).substring(o.end.column,c.start.column);break}else if(w===0)return null;o=c}return a||(a=this.getLine(c.start.row).substring(o.end.column)),r==-1?a.substring(0,n-o.end.column):r==1?a.substring(n-o.end.column):a},this.getFoldLine=function(i,n){var r=this.$foldData,e=0;for(n&&(e=r.indexOf(n)),e==-1&&(e=0),e;e<r.length;e++){var o=r[e];if(o.start.row<=i&&o.end.row>=i)return o;if(o.end.row>i)return null}return null},this.getNextFoldLine=function(i,n){var r=this.$foldData,e=0;for(n&&(e=r.indexOf(n)),e==-1&&(e=0),e;e<r.length;e++){var o=r[e];if(o.end.row>=i)return o}return null},this.getFoldedRowCount=function(i,n){for(var r=this.$foldData,e=n-i+1,o=0;o<r.length;o++){var a=r[o],c=a.end.row,h=a.start.row;if(c>=n){h<n&&(h>=i?e-=n-h:e=0);break}else c>=i&&(h>=i?e-=c-h:e-=c-i+1)}return e},this.$addFoldLine=function(i){return this.$foldData.push(i),this.$foldData.sort(function(n,r){return n.start.row-r.start.row}),i},this.addFold=function(i,n){var r=this.$foldData,e=!1,o;i instanceof f?o=i:(o=new f(n,i),o.collapseChildren=n.collapseChildren),this.$clipRangeToDocument(o.range);var a=o.start.row,c=o.start.column,h=o.end.row,w=o.end.column,y=this.getFoldAt(a,c,1),m=this.getFoldAt(h,w,-1);if(y&&m==y)return y.addSubFold(o);y&&!y.range.isStart(a,c)&&this.removeFold(y),m&&!m.range.isEnd(h,w)&&this.removeFold(m);var d=this.getFoldsInRange(o.range);d.length>0&&(this.removeFolds(d),o.collapseChildren||d.forEach(function(M){o.addSubFold(M)}));for(var C=0;C<r.length;C++){var x=r[C];if(h==x.start.row){x.addFold(o),e=!0;break}else if(a==x.end.row){if(x.addFold(o),e=!0,!o.sameRow){var A=r[C+1];
196if(A&&A.start.row==h){x.merge(A);break}}break}else if(h<=x.start.row)break}return e||(x=this.$addFoldLine(new p(this.$foldData,o))),this.$useWrapMode?this.$updateWrapData(x.start.row,x.start.row):this.$updateRowLengthCache(x.start.row,x.start.row),this.$modified=!0,this._signal("changeFold",{data:o,action:"add"}),o},this.addFolds=function(i){i.forEach(function(n){this.addFold(n)},this)},this.removeFold=function(i){var n=i.foldLine,r=n.start.row,e=n.end.row,o=this.$foldData,a=n.folds;if(a.length==1)o.splice(o.indexOf(n),1);else if(n.range.isEnd(i.end.row,i.end.column))a.pop(),n.end.row=a[a.length-1].end.row,n.end.column=a[a.length-1].end.column;else if(n.range.isStart(i.start.row,i.start.column))a.shift(),n.start.row=a[0].start.row,n.start.column=a[0].start.column;else if(i.sameRow)a.splice(a.indexOf(i),1);else{var c=n.split(i.start.row,i.start.column);a=c.folds,a.shift(),c.start.row=a[0].start.row,c.start.column=a[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(r,e):this.$updateRowLengthCache(r,e)),this.$modified=!0,this._signal("changeFold",{data:i,action:"remove"})},this.removeFolds=function(i){for(var n=[],r=0;r<i.length;r++)n.push(i[r]);n.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(i){this.removeFold(i),i.subFolds.forEach(function(n){i.restoreRange(n),this.addFold(n)},this),i.collapseChildren>0&&this.foldAll(i.start.row+1,i.end.row,i.collapseChildren-1),i.subFolds=[]},this.expandFolds=function(i){i.forEach(function(n){this.expandFold(n)},this)},this.unfold=function(i,n){var r,e;if(i==null)r=new v(0,0,this.getLength(),0),n==null&&(n=!0);else if(typeof i=="number")r=new v(i,0,i,this.getLine(i).length);else if("row"in i)r=v.fromPoints(i,i);else{if(Array.isArray(i))return e=[],i.forEach(function(a){e=e.concat(this.unfold(a))},this),e;r=i}e=this.getFoldsInRangeList(r);for(var o=e;e.length==1&&v.comparePoints(e[0].start,r.start)<0&&v.comparePoints(e[0].end,r.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(r);if(n!=!1?this.removeFolds(e):this.expandFolds(e),o.length)return o},this.isRowFolded=function(i,n){return!!this.getFoldLine(i,n)},this.getRowFoldEnd=function(i,n){var r=this.getFoldLine(i,n);return r?r.end.row:i},this.getRowFoldStart=function(i,n){var r=this.getFoldLine(i,n);return r?r.start.row:i},this.getFoldDisplayLine=function(i,n,r,e,o){e==null&&(e=i.start.row),o==null&&(o=0),n==null&&(n=i.end.row),r==null&&(r=this.getLine(n).length);var a=this.doc,c="";return i.walk(function(h,w,y,m){if(!(w<e)){if(w==e){if(y<o)return;m=Math.max(o,m)}h!=null?c+=h:c+=a.getLine(w).substring(m,y)}},n,r),c},this.getDisplayLine=function(i,n,r,e){var o=this.getFoldLine(i);if(o)return this.getFoldDisplayLine(o,i,n,r,e);var a;return a=this.doc.getLine(i),a.substring(e||0,n||a.length)},this.$cloneFoldData=function(){var i=[];return i=this.$foldData.map(function(n){var r=n.folds.map(function(e){return e.clone()});return new p(i,r)}),i},this.toggleFold=function(i){var n=this.selection,r=n.getRange(),e,o;if(r.isEmpty()){var a=r.start;if(e=this.getFoldAt(a.row,a.column),e){this.expandFold(e);return}else if(i){var c=this.getFoldLine(a.row);c&&this.expandFolds(c.folds);return}else(o=this.findMatchingBracket(a))?r.comparePoint(o)==1?r.end=o:(r.start=o,r.start.column++,r.end.column--):(o=this.findMatchingBracket({row:a.row,column:a.column+1}))?(r.comparePoint(o)==1?r.end=o:r.start=o,r.start.column++):r=this.getCommentFoldRange(a.row,a.column)||r}else{var h=this.getFoldsInRange(r);if(i&&h.length){this.expandFolds(h);return}else h.length==1&&(e=h[0])}if(e||(e=this.getFoldAt(r.start.row,r.start.column)),e&&e.range.toString()==r.toString()){this.expandFold(e);return}var w="...";if(!r.isMultiLine()){if(w=this.getTextRange(r),w.length<4)return;w=w.trim().substring(0,2)+".."}this.addFold(w,r)},this.getCommentFoldRange=function(i,n,r){var e=new s(this,i,n),o=e.getCurrentToken(),a=o&&o.type;if(o&&/^comment|string/.test(a)){a=a.match(/comment|string/)[0],a=="comment"&&(a+="|doc-start|\\.doc");var c=new RegExp(a),h=new v;if(r!=1){do o=e.stepBackward();while(o&&c.test(o.type));o=e.stepForward()}h.start.row=e.getCurrentTokenRow(),h.start.column=e.getCurrentTokenColumn()+o.value.length,e=new s(this,i,n);var w=this.getState(e.$row);if(r!=-1){var y=-1;do if(o=e.stepForward(),y==-1){var m=this.getState(e.$row);w.toString()!==m.toString()&&(y=e.$row)}else if(e.$row>y)break;while(o&&c.test(o.type));o=e.stepBackward()}else o=e.getCurrentToken();return h.end.row=e.getCurrentTokenRow(),h.end.column=e.getCurrentTokenColumn(),h.start.row==h.end.row&&h.start.column>h.end.column?void 0:h}},this.foldAll=function(i,n,r,e){r==null&&(r=1e5);var o=this.foldWidgets;if(o){n=n||this.getLength(),i=i||0;for(var a=i;a<n;a++)if(o[a]==null&&(o[a]=this.getFoldWidget(a)),o[a]=="start"&&!(e&&!e(a))){var c=this.getFoldWidgetRange(a);c&&c.isMultiLine()&&c.end.row<=n&&c.start.row>=i&&(a=c.end.row,c.collapseChildren=r,this.addFold("...",c))}}},this.foldToLevel=function(i){for(this.foldAll();i-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var i=this;this.foldAll(null,null,null,function(n){for(var r=i.getTokens(n),e=0;e<r.length;e++){var o=r[e];if(!(o.type=="text"&&/^\s+$/.test(o.value)))return!!/comment/.test(o.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(i){if(!this.$foldStyles[i])throw new Error("invalid fold style: "+i+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=i){this.$foldStyle=i,i=="manual"&&this.unfold();var n=this.$foldMode;this.$setFolding(null),this.$setFolding(n)}},this.$setFolding=function(i){if(this.$foldMode!=i){if(this.$foldMode=i,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!i||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=i.getFoldWidget.bind(i,this,this.$foldStyle),this.getFoldWidgetRange=i.getFoldWidgetRange.bind(i,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(i,n){var r=this.foldWidgets;if(!r||n&&r[i])return{};for(var e=i-1,o;e>=0;){var a=r[e];if(a==null&&(a=r[e]=this.getFoldWidget(e)),a=="start"){var c=this.getFoldWidgetRange(e);if(o||(o=c),c&&c.end.row>=i)break}e--}return{range:e!==-1&&c,firstRange:o}},this.onFoldWidgetClick=function(i,n){n instanceof l&&(n=n.domEvent);var r={children:n.shiftKey,all:n.ctrlKey||n.metaKey,siblings:n.altKey},e=this.$toggleFoldWidget(i,r);if(!e){var o=n.target||n.srcElement;o&&/ace_fold-widget/.test(o.className)&&(o.className+=" ace_invalid")}},this.$toggleFoldWidget=function(i,n){if(this.getFoldWidget){var r=this.getFoldWidget(i),e=this.getLine(i),o=r==="end"?-1:1,a=this.getFoldAt(i,o===-1?0:e.length,o);if(a)return n.children||n.all?this.removeFold(a):this.expandFold(a),a;var c=this.getFoldWidgetRange(i,!0);if(c&&!c.isMultiLine()&&(a=this.getFoldAt(c.start.row,c.start.column,1),a&&c.isEqual(a.range)))return this.removeFold(a),a;if(n.siblings){var h=this.getParentFoldRangeData(i);if(h.range)var w=h.range.start.row+1,y=h.range.end.row;this.foldAll(w,y,n.all?1e4:0)}else n.children?(y=c?c.end.row:this.getLength(),this.foldAll(i+1,y,n.all?1e4:0)):c&&(n.all&&(c.collapseChildren=1e4),this.addFold("...",c));return c}},this.toggleFoldWidget=function(i){var n=this.selection.getCursor().row;n=this.getRowFoldStart(n);var r=this.$toggleFoldWidget(n,{});if(!r){var e=this.getParentFoldRangeData(n,!0);if(r=e.range||e.firstRange,r){n=r.start.row;var o=this.getFoldAt(n,this.getLine(n).length,1);o?this.removeFold(o):this.addFold("...",r)}}},this.updateFoldWidgets=function(i){var n=i.start.row,r=i.end.row-n;if(r===0)this.foldWidgets[n]=null;else if(i.action=="remove")this.foldWidgets.splice(n,r+1,null);else{var e=Array(r+1);e.unshift(n,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(i){var n=i.data;n.first!=n.last&&this.foldWidgets.length>n.first&&this.foldWidgets.splice(n.first,this.foldWidgets.length)}}E.Folding=t}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(L,E,I){var v=L("../token_iterator").TokenIterator,p=L("../range").Range;function f(){this.findMatchingBracket=function(s,l){if(s.column==0)return null;var t=l||this.getLine(s.row).charAt(s.column-1);if(t=="")return null;var i=t.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],s):this.$findOpeningBracket(i[2],s):null},this.getBracketRange=function(s){var l=this.getLine(s.row),t=!0,i,n=l.charAt(s.column-1),r=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(r||(n=l.charAt(s.column),s={row:s.row,column:s.column+1},r=n&&n.match(/([\(\[\{])|([\)\]\}])/),t=!1),!r)return null;if(r[1]){var e=this.$findClosingBracket(r[1],s);if(!e)return null;i=p.fromPoints(s,e),t||(i.end.column++,i.start.column--),i.cursor=i.end}else{var e=this.$findOpeningBracket(r[2],s);if(!e)return null;i=p.fromPoints(e,s),t||(i.start.column++,i.end.column--),i.cursor=i.start}return i},this.getMatchingBracketRanges=function(s,l){var t=this.getLine(s.row),i=/([\(\[\{])|([\)\]\}])/,n=!l&&t.charAt(s.column-1),r=n&&n.match(i);if(r||(n=(l===void 0||l)&&t.charAt(s.column),s={row:s.row,column:s.column+1},r=n&&n.match(i)),!r)return null;var e=new p(s.row,s.column-1,s.row,s.column),o=r[1]?this.$findClosingBracket(r[1],s):this.$findOpeningBracket(r[2],s);if(!o)return[e];var a=new p(o.row,o.column,o.row,o.column+1);return[e,a]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(s,l,t){var i=this.$brackets[s],n=1,r=new v(this,l.row,l.column),e=r.getCurrentToken();if(e||(e=r.stepForward()),!!e){t||(t=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var o=l.column-r.getCurrentTokenColumn()-2,a=e.value;;){for(;o>=0;){var c=a.charAt(o);if(c==i){if(n-=1,n==0)return{row:r.getCurrentTokenRow(),column:o+r.getCurrentTokenColumn()}}else c==s&&(n+=1);o-=1}do e=r.stepBackward();while(e&&!t.test(e.type));if(e==null)break;a=e.value,o=a.length-1}return null}},this.$findClosingBracket=function(s,l,t){var i=this.$brackets[s],n=1,r=new v(this,l.row,l.column),e=r.getCurrentToken();if(e||(e=r.stepForward()),!!e){t||(t=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var o=l.column-r.getCurrentTokenColumn();;){for(var a=e.value,c=a.length;o<c;){var h=a.charAt(o);if(h==i){if(n-=1,n==0)return{row:r.getCurrentTokenRow(),column:o+r.getCurrentTokenColumn()}}else h==s&&(n+=1);o+=1}do e=r.stepForward();while(e&&!t.test(e.type));if(e==null)break;o=0}return null}},this.getMatchingTags=function(s){var l=new v(this,s.row,s.column),t=this.$findTagName(l);
196if(t){var i=l.stepBackward();return i.value==="<"?this.$findClosingTag(l,t):this.$findOpeningTag(l,t)}},this.$findTagName=function(s){var l=s.getCurrentToken(),t=!1,i=!1;if(l&&l.type.indexOf("tag-name")===-1)do i?l=s.stepBackward():l=s.stepForward(),l&&(l.value==="/>"?i=!0:l.type.indexOf("tag-name")!==-1&&(t=!0));while(l&&!t);return l},this.$findClosingTag=function(s,l){var t,i=l.value,n=l.value,r=0,e=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);l=s.stepForward();var o=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+l.value.length),a=!1;do{if(t=l,t.type.indexOf("tag-close")!==-1&&!a){var c=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);a=!0}if(l=s.stepForward(),l){if(l.value===">"&&!a){var c=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);a=!0}if(l.type.indexOf("tag-name")!==-1){if(i=l.value,n===i){if(t.value==="<")r++;else if(t.value==="</"&&(r--,r<0)){s.stepBackward();var h=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2);l=s.stepForward();var w=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+l.value.length);if(l.type.indexOf("tag-close")===-1&&(l=s.stepForward()),l&&l.value===">")var y=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);else return}}}else if(n===i&&l.value==="/>"&&(r--,r<0))var h=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+2),w=h,y=w,c=new p(o.end.row,o.end.column,o.end.row,o.end.column+1)}}while(l&&r>=0);if(e&&c&&h&&y&&o&&w)return{openTag:new p(e.start.row,e.start.column,c.end.row,c.end.column),closeTag:new p(h.start.row,h.start.column,y.end.row,y.end.column),openTagName:o,closeTagName:w}},this.$findOpeningTag=function(s,l){var t=s.getCurrentToken(),i=l.value,n=0,r=s.getCurrentTokenRow(),e=s.getCurrentTokenColumn(),o=e+2,a=new p(r,e,r,o);s.stepForward();var c=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+l.value.length);if(l.type.indexOf("tag-close")===-1&&(l=s.stepForward()),!(!l||l.value!==">")){var h=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);s.stepBackward(),s.stepBackward();do if(l=t,r=s.getCurrentTokenRow(),e=s.getCurrentTokenColumn(),o=e+l.value.length,t=s.stepBackward(),l){if(l.type.indexOf("tag-name")!==-1){if(i===l.value)if(t.value==="<"){if(n++,n>0){var w=new p(r,e,r,o),y=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1);do l=s.stepForward();while(l&&l.value!==">");var m=new p(s.getCurrentTokenRow(),s.getCurrentTokenColumn(),s.getCurrentTokenRow(),s.getCurrentTokenColumn()+1)}}else t.value==="</"&&n--}else if(l.value==="/>"){for(var d=0,C=t;C;){if(C.type.indexOf("tag-name")!==-1&&C.value===i){n--;break}else if(C.value==="<")break;C=s.stepBackward(),d++}for(var x=0;x<d;x++)s.stepForward()}}while(t&&n<=0);if(y&&m&&a&&h&&w&&c)return{openTag:new p(y.start.row,y.start.column,m.end.row,m.end.column),closeTag:new p(a.start.row,a.start.column,h.end.row,h.end.column),openTagName:w,closeTagName:c}}}}E.BracketMatch=f}),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(L,E,I){var v=L("./lib/oop"),p=L("./lib/lang"),f=L("./bidihandler").BidiHandler,s=L("./config"),l=L("./lib/event_emitter").EventEmitter,t=L("./selection").Selection,i=L("./mode/text").Mode,n=L("./range").Range,r=L("./line_widgets").LineWidgets,e=L("./document").Document,o=L("./background_tokenizer").Backgroun
196dTokenizer,a=L("./search_highlight").SearchHighlight,c=L("./undomanager").UndoManager,h=function(){function S($,g){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"+ ++S.$uid,this.$foldData.toString=function(){return this.join(` 197`)},this.$gutterCustomWidgets={},this.bgTokenizer=new o(new i().getTokenizer(),this);var u=this;this.bgTokenizer.on("update",function(b){u._signal("tokenizerUpdate",b)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof $!="object"||!$.getLine)&&($=new e($)),this.setDocument($),this.selection=new t(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new f(this),s.resetOptions(this),this.setMode(g),s._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return S.prototype.$initOperationListeners=function(){var $=this;this.curOp=null,this.on("change",function(){$.curOp||($.startOperation(),$.curOp.selectionBefore=$.$lastSel),$.curOp.docChanged=!0},!0),this.on("changeSelection",function(){$.curOp||($.startOperation(),$.curOp.selectionBefore=$.$lastSel),$.curOp.selectionChanged=!0},!0),this.$operationResetTimer=p.delayedCall(this.endOperation.bind(this,!0))},S.prototype.startOperation=function($){if(this.curOp){if(!$||this.curOp.command)return;this.prevOp=this.curOp}$||($={}),this.$operationResetTimer.schedule(),this.curOp={command:$.command||{},args:$.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",$)},S.prototype.endOperation=function($){if(this.curOp){if($&&$.returnValue===!1){this.curOp=null,this._signal("endOperation",$);return}if($==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var g=this.selection.toJSON();this.curOp.selectionAfter=g,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(g),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",$)}},S.prototype.setDocument=function($){this.doc&&this.doc.off("change",this.$onChange),this.doc=$,$.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},S.prototype.getDocument=function(){return this.doc},Object.defineProperty(S.prototype,"widgetManager",{get:function(){var $=new r(this);return this.widgetManager=$,this.$editor&&$.attach(this.$editor),$},set:function($){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:$})},enumerable:!1,configurable:!0}),S.prototype.$resetRowCache=function($){if(!$){this.$docRowCache=[],this.$screenRowCache=[];return}var g=this.$docRowCache.length,u=this.$getRowCacheIndex(this.$docRowCache,$)+1;g>u&&(this.$docRowCache.splice(u,g),this.$screenRowCache.splice(u,g))},S.prototype.$getRowCacheIndex=function($,g){for(var u=0,b=$.length-1;u<=b;){var k=u+b>>1,T=$[k];if(g>T)u=k+1;else if(g<T)b=k-1;else return k}return u-1},S.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},S.prototype.onChangeFold=function($){var g=$.data;this.$resetRowCache(g.start.row)},S.prototype.onChange=function($){this.$modified=!0,this.$bidiHandler.onChange($),this.$resetRowCache($.start.row);var g=this.$updateInternalDataOnChange($);!this.$fromUndo&&this.$undoManager&&(g&&g.length&&(this.$undoManager.add({action:"removeFolds",folds:g},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add($,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange($),this._signal("change",$)},S.prototype.onSelectionChange=function(){this._signal("changeSelection")},S.prototype.setValue=function($){this.doc.setValue($),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},S.fromJSON=function($){typeof $=="string"&&($=JSON.parse($));var g=new c;g.$undoStack=$.history.$undoStack,g.$redoStack=$.history.$redoStack,g.mark=$.history.mark,g.$rev=$.history.rev;var u=new S($.value);return $.folds.forEach(function(b){u.addFold("...",n.fromPoints(b.start,b.end))}),u.setAnnotations($.annotations),u.setBreakpoints($.breakpoints),u.setMode($.mode),u.setScrollLeft($.scrollLeft),u.setScrollTop($.scrollTop),u.setUndoManager(g),u.selection.fromJSON($.selection),u},S.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function($){return $.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},S.prototype.toString=function(){return this.doc.getValue()},S.prototype.getSelection=function(){return this.selection},S.prototype.getState=function($){return this.bgTokenizer.getState($)},S.prototype.getTokens=function($){return this.bgTokenizer.getTokens($)},S.prototype.getTokenAt=function($,g){var u=this.bgTokenizer.getTokens($),b,k=0;if(g==null){var T=u.length-1;k=this.getLine($).length}else for(var T=0;T<u.length&&(k+=u[T].value.length,!(k>=g));T++);return b=u[T],b?(b.index=T,b.start=k-b.value.length,b):null}
vendor: 1,206 bytes, line 197
197,S.prototype.setUndoManager=function($){if(this.$undoManager=$,this.$informUndoManager&&this.$informUndoManager.cancel(),$){var g=this;$.addSession(this),this.$syncInformUndoManager=function(){g.$informUndoManager.cancel(),g.mergeUndoDeltas=!1},this.$informUndoManager=p.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},S.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},S.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},S.prototype.getTabString=function(){return this.getUseSoftTabs()?p.stringRepeat(" ",this.getTabSize()):" "},S.prototype.setUseSoftTabs=function($){this.setOption("useSoftTabs",$)},S.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},S.prototype.setTabSize=function($){this.setOption("tabSize",$)},S.prototype.getTabSize=function(){return this.$tabSize},S.prototype.isTabStop=function($){return this.$useSoftTabs&&$.column%this.$tabSize===0},S.prototype.setNavigateWithinSoftTabs=function($){this.setOption("navigateWithinSoftTabs",$)},S.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs}
197,S.prototype.setOverwrite=function($){this.setOption("overwrite",$)},S.prototype.getOverwrite=function(){return this.$overwrite},S.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},S.prototype.addGutterDecoration=function($,g){this.$decorations[$]||(this.$decorations[$]=""),this.$decorations[$]+=" "+g,this._signal("changeBreakpoint",{})},S.prototype.removeGutterCustomWidget=function($){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget($)},S.prototype.addGutterCustomWidget=function($,g){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget($,g)},S.prototype.removeGutterDecoration=function($,g){this.$decorations[$]=(this.$decorations[$]||"").replace(" "+g,""),this._signal("changeBreakpoint",{})},S.prototype.getBreakpoints=function(){return this.$breakpoints},S.prototype.setBreakpoints=function($){this.$breakpoints=[];for(var g=0;g<$.length;g++)this.$breakpoints[$[g]]="ace_breakpoint";this._signal("changeBreakpoint",{})},S.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},S.prototype.setBreakpoint=function($,g){g===void 0&&(g="ace_breakpoint"),g?this.$breakpoints[$]=g:delete this.$breakpoints[$],this._signal("changeBreakpoint",{})},S.prototype.clearBreakpoint=function($){delete this.$breakpoints[$],this._signal("changeBreakpoint",{})},S.prototype.addMarker=function($,g,u,b){var k=this.$markerId++,T={range:$,type:u||"line",renderer:typeof u=="function"?u:null,clazz:g,inFront:!!b,id:k};return b?(this.$frontMarkers[k]=T,this._signal("changeFrontMarker")):(this.$backMarkers[k]=T,this._signal("changeBackMarker")),k},S.prototype.addDynamicMarker=function($,g){if($.update){var u=this.$markerId++;return $.id=u,$.inFront=!!g,g?(this.$frontMarkers[u]=$,this._signal("changeFrontMarker")):(this.$backMarkers[u]=$,this._signal("changeBackMarker")),$}},S.prototype.removeMarker=function($){var g=this.$frontMarkers[$]||this.$backMarkers[$];if(g){var u=g.inFront?this.$frontMarkers:this.$backMarkers;delete u[$],this._signal(g.inFront?"changeFrontMarker":"changeBackMarker")}},S.prototype.getMarkers=function($){return $?this.$frontMarkers:this.$backMarkers},S.prototype.highlight=function($){if(!this.$searchHighlight){var g=new a(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(g)}this.$searchHighlight.setRegexp($)},S.prototype.highlightLines=function($,g,u,b){typeof g!="number"&&(u=g,g=$),u||(u="ace_step");var k=new n($,0,g,1/0);return k.id=this.addMarker(k,u,"fullLine",b),k},S.prototype.setAnnotations=function($){this.$annotations=$,this._signal("changeAnnotation",{})},S.prototype.getAnnotations=function(){return this.$annotations||[]},S.prototype.clearAnnotations=function(){this.setAnnotations([])},S.prototype.$detectNewLine=function($){var g=$.match(/^.*?(\r?\n)/m);g?this.$autoNewLine=g[1]:this.$autoNewLine=` 198`},S.prototype.getWordRange=function($,g){var u=this.getLine($),b=!1;if(g>0&&(b=!!u.charAt(g-1).match(this.tokenRe)),b||(b=!!u.charAt(g).match(this.tokenRe)),b)var k=this.tokenRe;else if(/^\s+$/.test(u.slice(g-1,g+1)))var k=/\s/;else var k=this.nonTokenRe;var T=g;if(T>0){do T--;while(T>=0&&u.charAt(T).match(k));T++}for(var R=g;R<u.length&&u.charAt(R).match(k);)R++;return new n($,T,$,R)},S.prototype.getAWordRange=function($,g){for(var u=this.getWordRange($,g),b=this.getLine(u.end.row);b.charAt(u.end.column).match(/[ \t]/);)u.end.column+=1;return u},S.prototype.setNewLineMode=function($){this.doc.setNewLineMode($)},S.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},S.prototype.setUseWorker=function($){this.setOption("useWorker",$)},S.prototype.getUseWorker=function(){return this.$useWorker},S.prototype.onReloadTokenizer=function($){var g=$.data;this.bgTokenizer.start(g.first),this._signal("tokenizerUpdate",$)},S.prototype.setMode=function($,g){if($&&typeof $=="object"){if($.getTokenizer)return this.$onChangeMode($);var u=$,b=u.path}else b=$||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new i),this.$modes[b]&&!u){this.$onChangeMode(this.$modes[b]),g&&g();return}
198this.$modeId=b,s.loadModule(["mode",b],(function(k){if(!this.destroyed){if(this.$modeId!==b)return g&&g();this.$modes[b]&&!u?this.$onChangeMode(this.$modes[b]):k&&k.Mode&&(k=new k.Mode(u),u||(this.$modes[b]=k,k.$id=b),this.$onChangeMode(k)),g&&g()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},S.prototype.$onChangeMode=function($,g){if(g||(this.$modeId=$.$id),this.$mode!==$){var u=this.$mode;this.$mode=$,this.$stopWorker(),this.$useWorker&&this.$startWorker();var b=$.getTokenizer();if(b.on!==void 0){var k=this.onReloadTokenizer.bind(this);b.on("update",k)}this.bgTokenizer.setTokenizer(b),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=$.tokenRe,this.nonTokenRe=$.nonTokenRe,g||($.attachToSession&&$.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding($.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:u,mode:$}))}},S.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},S.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch($){s.warn("Could not load worker",$),this.$worker=null}},S.prototype.getMode=function(){return this.$mode},S.prototype.setScrollTop=function($){this.$scrollTop===$||isNaN($)||(this.$scrollTop=$,this._signal("changeScrollTop",$))},S.prototype.getScrollTop=function(){return this.$scrollTop},S.prototype.setScrollLeft=function($){this.$scrollLeft===$||isNaN($)||(this.$scrollLeft=$,this._signal("changeScrollLeft",$))},S.prototype.getScrollLeft=function(){return this.$scrollLeft},S.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},S.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var $=0;return this.lineWidgets.forEach(function(g){g&&g.screenWidth>$&&($=g.screenWidth)}),this.lineWidgetWidth=$},S.prototype.$computeWidth=function($){if(this.$modified||$){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var g=this.doc.getAllLines(),u=this.$rowLengthCache,b=0,k=0,T=this.$foldData[k],R=T?T.start.row:1/0,D=g.length,O=0;O<D;O++){if(O>R){if(O=T.end.row+1,O>=D)break;T=this.$foldData[k++],R=T?T.start.row:1/0}u[O]==null&&(u[O]=this.$getStringScreenWidth(g[O])[0]),u[O]>b&&(b=u[O])}this.screenWidth=b}},S.prototype.getLine=function($){return this.doc.getLine($)},S.prototype.getLines=function($,g){return this.doc.getLines($,g)},S.prototype.getLength=function(){return this.doc.getLength()},S.prototype.getTextRange=function($){return this.doc.getTextRange($||this.selection.getRange())},S.prototype.insert=function($,g){return this.doc.insert($,g)},S.prototype.remove=function($){return this.doc.remove($)},S.prototype.removeFullLines=function($,g){return this.doc.removeFullLines($,g)},S.prototype.undoChanges=function($,g){if($.length){this.$fromUndo=!0;for(var u=$.length-1;u!=-1;u--){var b=$[u];b.action=="insert"||b.action=="remove"?this.doc.revertDelta(b):b.folds&&this.addFolds(b.folds)}!g&&this.$undoSelect&&($.selectionBefore?this.selection.fromJSON($.selectionBefore):this.selection.setRange(this.$getUndoSelection($,!0))),this.$fromUndo=!1}},S.prototype.redoChanges=function($,g){if($.length){this.$fromUndo=!0;for(var u=0;u<$.length;u++){var b=$[u];(b.action=="insert"||b.action=="remove")&&this.doc.$safeApplyDelta(b)}!g&&this.$undoSelect&&($.selectionAfter?this.selection.fromJSON($.selectionAfter):this.selection.setRange(this.$getUndoSelection($,!1))),this.$fromUndo=!1}},S.prototype.setUndoSelect=function($){this.$undoSelect=$},S.prototype.$getUndoSelection=function($,g){function u(D){return g?D.action!=="insert":D.action==="insert"}for(var b,k,T=0;T<$.length;T++){var R=$[T];if(R.start){if(!b){u(R)?b=n.fromPoints(R.start,R.end):b=n.fromPoints(R.start,R.start);continue}u(R)?(k=R.start,b.compare(k.row,k.column)==-1&&b.setStart(k),k=R.end,b.compare(k.row,k.column)==1&&b.setEnd(k)):(k=R.start,b.compare(k.row,k.column)==-1&&(b=n.fromPoints(R.start,R.start)))}}return b},S.prototype.replace=function($,g){return this.doc.replace($,g)},S.prototype.moveText=function($,g,u){var b=this.getTextRange($),k=this.getFoldsInRange($),T=n.fromPoints(g,g);if(!u){this.remove($);var R=$.start.row-$.end.row,D=R?-$.end.column:$.start.column-$.end.column;D&&(T.start.row==$.end.row&&T.start.column>$.end.column&&(T.start.column+=D),T.end.row==$.end.row&&T.end.column>$.end.column&&(T.end.column+=D)),R&&T.start.row>=$.end.row&&(T.start.row+=R,T.end.row+=R)}if(T.end=this.insert(T.start,b),k.length){var O=$.start,P=T.start,R=P.row-O.row,D=P.column-O.column;this.addFolds(k.map(function(W){return W=W.clone(),W.start.row==O.row&&(W.start.column+=D),W.end.row==O.row&&(W.end.column+=D),W.start.row+=R,W.end.row+=R,W}))}return T},S.prototype.indentRows=function($,g,u){u=u.replace(/\t/g,this.getTabString());for(var b=$;b<=g;b++)this.doc.insertInLine({row:b,column:0},u)},S.prototype.outdentRows=function($){for(var g=$.collapseRows(),u=new n(0,0,0,0),b=this.getTabSize(),k=g.start.row;k<=g.end.row;++k){var T=this.getLine(k);u.start.row=k,u.end.row=k;for(var R=0;R<b&&T.charAt(R)==" ";++R);R<b&&T.charAt(R)==" "?(u.start.column=R,u.end.column=R+1):(u.start.column=0,u.end.column=R),this.remove(u)}},S.prototype.$moveLines=function($,g,u){if($=this.getRowFoldStart($),g=this.getRowFoldEnd(g),u<0){var b=this.getRowFoldStart($+u);if(b<0)return 0;var k=b-$}else if(u>0){var b=this.getRowFoldEnd(g+u);if(b>this.doc.getLength()-1)return 0;var k=b-g}else{$=this.$clipRowToDocument($),g=this.$clipRowToDocument(g);var k=g-$+1}var T=new n($,0,g,Number.MAX_VALUE),R=this.getFoldsInRange(T).map(function(O){return O=O.clone(),O.start.row+=k,O.end.row+=k,O}),D=u==0?this.doc.getLines($,g):this.doc.removeFullLines($,g);return this.doc.insertFullLines($+k,D),R.length&&this.addFolds(R),k},S.prototype.moveLinesUp=function($,g){return this.$moveLines($,g,-1)},S.prototype.moveLinesDown=function($,g){return this.$moveLines($,g,1)},S.prototype.duplicateLines=function($,g){return this.$moveLines($,g,0)},S.prototype.$clipRowToDocument=function($){return Math.max(0,Math.min($,this.doc.getLength()-1))},S.prototype.$clipColumnToRow=function($,g){return g<0?0:Math.min(this.doc.getLine($).length,g)},S.prototype.$clipPositionToDocument=function($,g){if(g=Math.max(0,g),$<0)$=0,g=0;else{var u=this.doc.getLength();$>=u?($=u-1,g=this.doc.getLine(u-1).length):g=Math.min(this.doc.getLine($).length,g)}return{row:$,column:g}},S.prototype.$clipRangeToDocument=function($){$.start.row<0?($.start.row=0,$.start.column=0):$.start.column=this.$clipColumnToRow($.start.row,$.start.column);var g=this.doc.getLength()-1;return $.end.row>g?($.end.row=g,$.end.column=this.doc.getLine(g).length):$.end.column=this.$clipColumnToRow($.end.row,$.end.column),$},S.prototype.setUseWrapMode=function($){if($!=this.$useWrapMode){if(this.$useWrapMode=$,this.$modified=!0,this.$resetRowCache(0),$){var g=this.getLength();this.$wrapData=Array(g),this.$updateWrapData(0,g-1)}this._signal("changeWrapMode")}},S.prototype.getUseWrapMode=function(){return this.$useWrapMode},S.prototype.setWrapLimitRange=function($,g){(this.$wrapLimitRange.min!==$||this.$wrapLimitRange.max!==g)&&(this.$wrapLimitRange={min:$,max:g},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},S.prototype.adjustWrapLimit=function($,g){var u=this.$wrapLimitRange;u.max<0&&(u={min:g,max:g});var b=this.$constrainWrapLimit($,u.min,u.max);return b!=this.$wrapLimit&&b>1?(this.$wrapLimit=b,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},S.prototype.$constrainWrapLimit=function($,g,u){return g&&($=Math.max(g,$)),u&&($=Math.min(u,$)),$},S.prototype.getWrapLimit=function(){return this.$wrapLimit},S.prototype.setWrapLimit=function($){this.setWrapLimitRange($,$)},S.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},S.prototype.$updateInternalDataOnChange=function($){var g=this.$useWrapMode,u=$.action,b=$.start,k=$.end,T=b.row,R=k.row,D=R-T,O=null;if(this.$updating=!0,D!=0)if(u==="remove"){this[g?"$wrapData":"$rowLengthCache"].splice(T,D);var P=this.$foldData;O=this.getFoldsInRange($),this.removeFolds(O);var N=this.getFoldLine(k.row),F=0;if(N){N.addRemoveChars(k.row,k.column,b.column-k.column),N.shiftRow(-D);var W=this.getFoldLine(T);W&&W!==N&&(W.merge(N),N=W),F=P.indexOf(N)+1}for(F;F<P.length;F++){var N=P[F];N.start.row>=k.row&&N.shiftRow(-D)}R=T}else{var B=Array(D);B.unshift(T,0);var H=g?this.$wrapData:this.$rowLengthCache;H.splice.apply(H,B);var P=this.$foldData,N=this.getFoldLine(T),F=0;if(N){var U=N.range.compareInside(b.row,b.column);U==0?(N=N.split(b.row,b.column),N&&(N.shiftRow(D),N.addRemoveChars(R,0,k.column-b.column))):U==-1&&(N.addRemoveChars(T,0,k.column-b.column),N.shiftRow(D)),F=P.indexOf(N)+1}for(F;F<P.length;F++){var N=P[F];N.start.row>=T&&N.shiftRow(D)}}else{D=Math.abs($.start.column-$.end.column),u==="remove"&&(O=this.getFoldsInRange($),this.removeFolds(O),D=-D);var N=this.getFoldLine(T);N&&N.addRemoveChars(T,b.column,D)}return g&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,g?this.$updateWrapData(T,R):this.$updateRowLengthCache(T,R),O},S.prototype.$updateRowLengthCache=function($,g){this.$rowLengthCache[$]=null,this.$rowLengthCache[g]=null},S.prototype.$updateWrapData=function($,g){var u=this.doc.getAllLines(),b=this.getTabSize(),k=this.$wrapData,T=this.$wrapLimit,R,D,O=$;for(g=Math.min(g,u.length-1);O<=g;)D=this.getFoldLine(O,D),D?(R=[],D.walk((function(P,N,F,W){var B;if(P!=null){B=this.$getDisplayTokens(P,R.length),B[0]=m;for(var H=1;H<B.length;H++)B[H]=d}else B=this.$getDisplayTokens(u[N].substring(W,F),R.length);R=R.concat(B)}).bind(this),D.end.row,u[D.end.row].length+1),k[D.start.row]=this.$computeWrapSplits(R,T,b),O=D.end.row+1):(R=this.$getDisplayTokens(u[O]),k[O]=this.$computeWrapSplits(R,T,b),O++)},S.prototype.$computeWrapSplits=function($,g,u){if($.length==0)return[];var b=[],k=$.length,T=0,R=0,D=this.$wrapAsCode,O=this.$indentedSoftWrap,P=g<=Math.max(2*u,8)||O===!1?0:Math.floor(g/2);function N(){var U=0;if(P===0)return U;if(O)for(var K=0;K<$.length;K++){var V=$[K];if(V==x)U+=1;else if(V==A)U+=u;else{if(V==M)continue;break}}return D&&O!==!1&&(U+=u),Math.min(U,P)}function F(U){for(var K=U-T,V=T;V<U;V++){var J=$[V];(J===12||J===2)&&(K-=1)}b.length||(W=N(),b.indent=W),R+=K,b.push(R),T=U}for(var W=0;k-T>g-W;){var B=T+g-W;if($[B-1]>=x&&$[B]>=x){F(B);continue}if($[B]==m||$[B]==d){for(B;B!=T-1&&$[B]!=m;B--);if(B>T){F(B);continue}for(B=T+g,B;B<$.length&&$[B]==d;B++);if(B==$.length)break;F(B);continue}for(var H=Math.max(B-(g-(g>>2)),T-1);B>H&&$[B]<m;)B--;if(D){for(;B>H&&$[B]<m;)B--;for(;B>H&&$[B]==C;)B--}else for(;B>H&&$[B]<x;)B--;if(B>H){F(++B);continue}B=T+g,$[B]==y&&B--,F(B-W)}return b},S.prototype.$getDisplayTokens=function($,g){var u=[],b;g=g||0;for(var k=0;k<$.length;k++){var T=$.charCodeAt(k);if(T==9){b=this.getScreenTabSize(u.length+g),u.push(A);for(var R=1;R<b;R++)u.push(M)}else T==32?u.push(x):T>39&&T<48||T>57&&T<64?u.push(C):T>=4352&&_(T)?u.push(w,y):u.push(w)}return u},S.prototype.$getStringScreenWidth=function($,g,u){if(g==0)return[0,0];g==null&&(g=1/0),u=u||0;var b,k;for(k=0;k<$.length&&(b=$.charCodeAt(k),b==9?u+=this.getScreenTabSize(u):b>=4352&&_(b)?u+=2:u+=1,!(u>g));k++);return[u,k]},S.prototype.getRowLength=function($){var g=1;return this.lineWidgets&&(g+=this.lineWidgets[$]&&this.lineWidgets[$].rowCount||0),!this.$useWrapMode||!this.$wrapData[$]?g:this.$wrapData[$].length+g},S.prototype.getRowLineCount=function($){return!this.$useWrapMode||!this.$wrapData[$]?1:this.$wrapData[$].length+1},S.prototype.getRowWrapIndent=function($){if(this.$useWrapMode){var g=this.screenToDocumentPosition($,Number.MAX_VALUE),u=this.$wrapData[g.row];return u.length&&u[0]<g.column?u.indent:0}else return 0},S.prototype.getScreenLastRowColumn=function($){var g=this.screenToDocumentPosition($,Number.MAX_VALUE);return this.documentToScreenColumn(g.row,g.column)},S.prototype.getDocumentLastRowColumn=function($,g){var u=this.documentToScreenRow($,g);
198return this.getScreenLastRowColumn(u)},S.prototype.getDocumentLastRowColumnPosition=function($,g){var u=this.documentToScreenRow($,g);return this.screenToDocumentPosition(u,Number.MAX_VALUE/10)},S.prototype.getRowSplitData=function($){if(this.$useWrapMode)return this.$wrapData[$]},S.prototype.getScreenTabSize=function($){return this.$tabSize-($%this.$tabSize|0)},S.prototype.screenToDocumentRow=function($,g){return this.screenToDocumentPosition($,g).row},S.prototype.screenToDocumentColumn=function($,g){return this.screenToDocumentPosition($,g).column},S.prototype.screenToDocumentPosition=function($,g,u){if($<0)return{row:0,column:0};var b,k=0,T=0,R,D=0,O=0,P=this.$screenRowCache,N=this.$getRowCacheIndex(P,$),F=P.length;if(F&&N>=0)var D=P[N],k=this.$docRowCache[N],W=$>P[F-1];else var W=!F;for(var B=this.getLength()-1,H=this.getNextFoldLine(k),U=H?H.start.row:1/0;D<=$&&(O=this.getRowLength(k),!(D+O>$||k>=B));)D+=O,k++,k>U&&(k=H.end.row+1,H=this.getNextFoldLine(k,H),U=H?H.start.row:1/0),W&&(this.$docRowCache.push(k),this.$screenRowCache.push(D));if(H&&H.start.row<=k)b=this.getFoldDisplayLine(H),k=H.start.row;else{if(D+O<=$||k>B)return{row:B,column:this.getLine(B).length};b=this.getLine(k),H=null}var K=0,V=Math.floor($-D);if(this.$useWrapMode){var J=this.$wrapData[k];J&&(R=J[V],V>0&&J.length&&(K=J.indent,T=J[V-1]||J[J.length-1],b=b.substring(T)))}return u!==void 0&&this.$bidiHandler.isBidiRow(D+V,k,V)&&(g=this.$bidiHandler.offsetToCol(u)),T+=this.$getStringScreenWidth(b,g-K)[1],this.$useWrapMode&&T>=R&&(T=R-1),H?H.idxToPosition(T):{row:k,column:T}},S.prototype.documentToScreenPosition=function($,g){if(typeof g>"u")var u=this.$clipPositionToDocument($.row,$.column);else u=this.$clipPositionToDocument($,g);$=u.row,g=u.column;var b=0,k=null,T=null;T=this.getFoldAt($,g,1),T&&($=T.start.row,g=T.start.column);var R,D=0,O=this.$docRowCache,P=this.$getRowCacheIndex(O,$),N=O.length;if(N&&P>=0)var D=O[P],b=this.$screenRowCache[P],F=$>O[N-1];else var F=!N;for(var W=this.getNextFoldLine(D),B=W?W.start.row:1/0;D<$;){if(D>=B){if(R=W.end.row+1,R>$)break;W=this.getNextFoldLine(R,W),B=W?W.start.row:1/0}else R=D+1;b+=this.getRowLength(D),D=R,F&&(this.$docRowCache.push(D),this.$screenRowCache.push(b))}var H="";W&&D>=B?(H=this.getFoldDisplayLine(W,$,g),k=W.start.row):(H=this.getLine($).substring(0,g),k=$);var U=0;if(this.$useWrapMode){var K=this.$wrapData[k];if(K){for(var V=0;H.length>=K[V];)b++,V++;H=H.substring(K[V-1]||0,H.length),U=V>0?K.indent:0}}return this.lineWidgets&&this.lineWidgets[D]&&this.lineWidgets[D].rowsAbove&&(b+=this.lineWidgets[D].rowsAbove),{row:b,column:U+this.$getStringScreenWidth(H)[0]}},S.prototype.documentToScreenColumn=function($,g){return this.documentToScreenPosition($,g).column},S.prototype.documentToScreenRow=function($,g){return this.documentToScreenPosition($,g).row},S.prototype.getScreenLength=function(){var $=0,g=null;if(this.$useWrapMode)for(var k=this.$wrapData.length,T=0,b=0,g=this.$foldData[b++],R=g?g.start.row:1/0;T<k;){var D=this.$wrapData[T];$+=D?D.length+1:1,T++,T>R&&(T=g.end.row+1,g=this.$foldData[b++],R=g?g.start.row:1/0)}else{$=this.getLength();for(var u=this.$foldData,b=0;b<u.length;b++)g=u[b],$-=g.end.row-g.start.row}return this.lineWidgets&&($+=this.$getWidgetScreenLength()),$},S.prototype.$setFontMetrics=function($){this.$enableVarChar&&(this.$getStringScreenWidth=function(g,u,b){if(u===0)return[0,0];u||(u=1/0),b=b||0;var k,T;for(T=0;T<g.length&&(k=g.charAt(T),k===" "?b+=this.getScreenTabSize(b):b+=$.getCharacterWidth(k),!(b>u));T++);return[b,T]})},S.prototype.getPrecedingCharacter=function(){var $=this.selection.getCursor();if($.column===0)return $.row===0?"":this.doc.getNewLineCharacter();var g=this.getLine($.row);return g[$.column-1]},S.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()},S}();h.$uid=0,h.prototype.$modes=s.$modes,h.prototype.getValue=h.prototype.toString,h.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},h.prototype.$overwrite=!1,h.prototype.$mode=null,h.prototype.$modeId=null,h.prototype.$scrollTop=0,h.prototype.$scrollLeft=0,h.prototype.$wrapLimit=80,h.prototype.$useWrapMode=!1,h.prototype.$wrapLimitRange={min:null,max:null},h.prototype.lineWidgets=null,h.prototype.isFullWidth=_,v.implement(h.prototype,l);var w=1,y=2,m=3,d=4,C=9,x=10,A=11,M=12;function _(S){return S<4352?!1:S>=4352&&S<=4447||S>=4515&&S<=4519||S>=4602&&S<=4607||S>=9001&&S<=9002||S>=11904&&S<=11929||S>=11931&&S<=12019||S>=12032&&S<=12245||S>=12272&&S<=12283||S>=12288&&S<=12350||S>=12353&&S<=12438||S>=12441&&S<=12543||S>=12549&&S<=12589||S>=12593&&S<=12686||S>=12688&&S<=12730||S>=12736&&S<=12771||S>=12784&&S<=12830||S>=12832&&S<=12871||S>=12880&&S<=13054||S>=13056&&S<=19903||S>=19968&&S<=42124||S>=42128&&S<=42182||S>=43360&&S<=43388||S>=44032&&S<=55203||S>=55216&&S<=55238||S>=55243&&S<=55291||S>=63744&&S<=64255||S>=65040&&S<=65049||S>=65072&&S<=65106||S>=65108&&S<=65126||S>=65128&&S<=65131||S>=65281&&S<=65376||S>=65504&&S<=65510}L("./edit_session/folding").Folding.call(h.prototype),L("./edit_session/bracket_match").BracketMatch.call(h.prototype),s.defineOptions(h.prototype,"session",{wrap:{set:function(S){if(!S||S=="off"?S=!1:S=="free"?S=!0:S=="printMargin"?S=-1:typeof S=="string"&&(S=parseInt(S,10)||!1),this.$wrap!=S)if(this.$wrap=S,!S)this.setUseWrapMode(!1);else{var $=typeof S=="number"?S:null;this.setWrapLimitRange($,$),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(S){S=S=="auto"?this.$mode.type!="text":S!="text",S!=this.$wrapAsCode&&(this.$wrapAsCode=S,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(S){this.$useWorker=S,this.$stopWorker(),S&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(S){S=parseInt(S),S>0&&this.$tabSize!==S&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=S,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(S){this.setFoldStyle(S)},handlesSet:!0},overwrite:{set:function(S){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(S){this.doc.setNewLineMode(S)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(S){this.setMode(S)},get:function(){return this.$modeId},handlesSet:!0}}),E.EditSession=h}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(L,E,I){var v=L("./lib/lang"),p=L("./lib/oop"),f=L("./range").Range,s=function(){function n(){this.$options={}}return n.prototype.set=function(r){return p.mixin(this.$options,r),this},n.prototype.getOptions=function(){return v.copyObject(this.$options)},n.prototype.setOptions=function(r){this.$options=r},n.prototype.find=function(r){var e=this.$options,o=this.$matchIterator(r,e);if(!o)return!1;var a=null;return o.forEach(function(c,h,w,y){return a=new f(c,h,w,y),h==y&&e.start&&e.start.start&&e.skipCurrent!=!1&&a.isEqual(e.start)?(a=null,!1):!0}),a},n.prototype.findAll=function(r){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var o=e.range,a=o?r.getLines(o.start.row,o.end.row):r.doc.getAllLines(),c=[],h=e.re;if(e.$isMultiLine){var w=h.length,y=a.length-w,m;e:for(var d=h.offset||0;d<=y;d++){for(var C=0;C<w;C++)if(a[d+C].search(h[C])==-1)continue e;
198var x=a[d],A=a[d+w-1],M=x.length-x.match(h[0])[0].length,_=A.match(h[w-1])[0].length;m&&m.end.row===d&&m.end.column>M||(c.push(m=new f(d,M,d+w-1,_)),w>2&&(d=d+w-2))}}else for(var S,$=0;$<a.length;$++)if(this.$isMultilineSearch(e)){var g=a.length-1;if(S=this.$multiLineForward(r,h,$,g),S){var u=S.endRow<=g?S.endRow-1:g;u>$&&($=u),c.push(new f(S.startRow,S.startCol,S.endRow,S.endCol))}}else{S=v.getMatchOffsets(a[$],h);for(var C=0;C<S.length;C++){var b=S[C];c.push(new f($,b.offset,$,b.offset+b.length))}}if(o){for(var k=o.start.column,T=o.end.column,$=0,C=c.length-1;$<C&&c[$].start.column<k&&c[$].start.row==0;)$++;for(var R=o.end.row-o.start.row;$<C&&c[C].end.column>T&&c[C].end.row==R;)C--;for(c=c.slice($,C+1),$=0,C=c.length;$<C;$++)c[$].start.row+=o.start.row,c[$].end.row+=o.start.row}return c},n.prototype.parseReplaceString=function(r){for(var e={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},o="",a=0,c=r.length;a<c;a++){var h=r.charCodeAt(a);if(h===e.Backslash){if(a++,a>=c){o+="\\";break}var w=r.charCodeAt(a);switch(w){case e.Backslash:o+="\\";break;case e.n:o+=` 199`;break;case e.t:o+=" ";break}continue}if(h===e.DollarSign){if(a++,a>=c){o+="$";break}var y=r.charCodeAt(a);if(y===e.DollarSign){o+="$$";continue}if(y===e.Digit0||y===e.Ampersand){o+="$&";continue}if(e.Digit1<=y&&y<=e.Digit9){o+="$"+r[a];continue}}o+=r[a]}return o||r},n.prototype.replace=function(r,e){var o=this.$options,a=this.$assembleRegExp(o);if(o.$isMultiLine)return e;if(a){var c=this.$isMultilineSearch(o);c&&(r=r.replace(/\r\n|\r|\n/g,` 200`));var h=a.exec(r);if(!h||!c&&h[0].length!=r.length)return null;if(e=o.regExp?this.parseReplaceString(e):e.replace(/\$/g,"$$$$"),e=r.replace(a,e),o.preserveCase){e=e.split("");for(var w=Math.min(r.length,r.length);w--;){var y=r[w];y&&y.toLowerCase()!=y?e[w]=e[w].toUpperCase():e[w]=e[w].toLowerCase()}e=e.join("")}return e}},n.prototype.$assembleRegExp=function(r,e){if(r.needle instanceof RegExp)return r.re=r.needle;var o=r.needle;if(!r.needle)return r.re=!1;r.regExp||(o=v.escapeRegExp(o));var a=r.caseSensitive?"gm":"gmi";try{new RegExp(o,"u"),r.$supportsUnicodeFlag=!0,a+="u"}catch{r.$supportsUnicodeFlag=!1}if(r.wholeWord&&(o=l(o,r)),r.$isMultiLine=!e&&/[\n\r]/.test(o),r.$isMultiLine)return r.re=this.$assembleMultilineRegExp(o,a);try{var c=new RegExp(o,a)}catch{c=!1}return r.re=c},n.prototype.$assembleMultilineRegExp=function(r,e){for(var o=r.replace(/\r\n|\r|\n/g,`$ 201^`).split(` 202`),a=[],c=0;c<o.length;c++)try{a.push(new RegExp(o[c],e))}catch{return!1}return a},n.prototype.$isMultilineSearch=function(r){return r.re&&/\\r\\n|\\r|\\n/.test(r.re.source)&&r.regExp&&!r.$isMultiLine},n.prototype.$multiLineForward=function(r,e,o,a){for(var c,h=i(r,o),w=o;w<=a;){for(var y=0;y<h&&!(w>a);y++){var m=r.getLine(w++);c=c==null?m:c+` 203`+m}var d=e.exec(c);if(e.lastIndex=0,d){var C=c.slice(0,d.index).split(` 204`),x=d[0].split(` 205`),A=o+C.length-1,M=C[C.length-1].length,_=A+x.length-1,S=x.length==1?M+x[0].length:x[x.length-1].length;return{startRow:A,startCol:M,endRow:_,endCol:S}}}return null},n.prototype.$multiLineBackward=function(r,e,o,a,c){for(var h,w=i(r,a),y=r.getLine(a).length-o,m=a;m>=c;){for(var d=0;d<w&&m>=c;d++){var C=r.getLine(m--);h=h==null?C:C+` 206`+h}var x=t(h,e,y);if(x){var A=h.slice(0,x.index).split(` 207`),M=x[0].split(` 208`),_=m+A.length,S=A[A.length-1].length,$=_+M.length-1,g=M.length==1?S+M[0].length:M[M.length-1].length;return{startRow:_,startCol:S,endRow:$,endCol:g}}}return null},n.prototype.$matchIterator=function(r,e){var o=this.$assembleRegExp(e);if(!o)return!1;var a=this.$isMultilineSearch(e),c=this.$multiLineForward,h=this.$multiLineBackward,w=e.backwards==!0,y=e.skipCurrent!=!1,m=o.unicode,d=e.range,C=e.start;C||(C=d?d[w?"end":"start"]:r.selection.getRange()),C.start&&(C=C[y!=w?"end":"start"]);var x=d?d.start.row:0,A=d?d.end.row:r.getLength()-1;if(w)var M=function($){var g=C.row;if(!S(g,C.column,$)){for(g--;g>=x;g--)if(S(g,Number.MAX_VALUE,$))return;if(e.wrap!=!1){for(g=A,x=C.row;g>=x;g--)if(S(g,Number.MAX_VALUE,$))return}}};else var M=function(g){var u=C.row;if(!S(u,C.column,g)){for(u=u+1;u<=A;u++)if(S(u,0,g))return;if(e.wrap!=!1){for(u=x,A=C.row;u<=A;u++)if(S(u,0,g))return}}};if(e.$isMultiLine)var _=o.length,S=function($,g,u){var b=w?$-_+1:$;if(!(b<0||b+_>r.getLength())){var k=r.getLine(b),T=k.search(o[0]);if(!(!w&&T<g||T===-1)){for(var R=1;R<_;R++)if(k=r.getLine(b+R),k.search(o[R])==-1)return;var D=k.match(o[_-1])[0].length;if(!(w&&D>g)&&u(b,T,b+_-1,D))return!0}}};else if(w)var S=function(g,u,b){if(a){var k=h(r,o,u,g,x);if(!k)return!1;if(b(k.startRow,k.startCol,k.endRow,k.endCol))return!0}else{var T=r.getLine(g),R=[],D,O=0;for(o.lastIndex=0;D=o.exec(T);){var P=D[0].length;if(O=D.index,!P){if(O>=T.length)break;
208o.lastIndex=O+=v.skipEmptyMatch(T,O,m)}if(D.index+P>u)break;R.push(D.index,P)}for(var N=R.length-1;N>=0;N-=2){var F=R[N-1],P=R[N];if(b(g,F,g,F+P))return!0}}};else var S=function(g,u,b){if(o.lastIndex=u,a){var k=c(r,o,g,A);if(k){var T=k.endRow<=A?k.endRow-1:A;T>g&&(g=T)}if(!k)return!1;if(b(k.startRow,k.startCol,k.endRow,k.endCol))return!0}else for(var R=r.getLine(g),D,O;O=o.exec(R);){var P=O[0].length;if(D=O.index,b(g,D,g,D+P))return!0;if(!P&&(o.lastIndex=D+=v.skipEmptyMatch(R,D,m),D>=R.length))return!1}};return{forEach:M}},n}();function l(n,r){var e=v.supportsLookbehind();function o(w,y){y===void 0&&(y=!0);var m=e&&r.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return m.test(w)||r.regExp?e&&r.$supportsUnicodeFlag?y?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var a=Array.from(n),c=a[0],h=a[a.length-1];return o(c)+n+o(h,!1)}function t(n,r,e){for(var o=null,a=0;a<=n.length;){r.lastIndex=a;var c=r.exec(n);if(!c)break;var h=c.index+c[0].length;if(h>n.length-e)break;(!o||h>o.index+o[0].length)&&(o=c),a=c.index+1}return o}function i(n,r){var e=5e3,o={row:r,column:0},a=n.doc.positionToIndex(o),c=a+e,h=n.doc.indexToPosition(c),w=h.row;return w+1}E.Search=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(L,E,I){var v=this&&this.__extends||function(){var n=function(r,e){return n=Object.
208setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,a){o.__proto__=a}||function(o,a){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(o[c]=a[c])},n(r,e)};return function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(r,e);function o(){this.constructor=r}r.prototype=e===null?Object.create(e):(o.prototype=e.prototype,new o)}}(),p=L("../lib/keys"),f=L("../lib/useragent"),s=p.KEY_MODS,l=function(){function n(r,e){this.$init(r,e,!1)}return n.prototype.$init=function(r,e,o){this.platform=e||(f.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(r),this.$singleCommand=o},n.prototype.addCommand=function(r){this.commands[r.name]&&this.removeCommand(r),this.commands[r.name]=r,r.bindKey&&this._buildKeyHash(r)},n.prototype.removeCommand=function(r,e){var o=r&&(typeof r=="string"?r:r.name);r=this.commands[o],e||delete this.commands[o];var a=this.commandKeyBinding;for(var c in a){var h=a[c];if(h==r)delete a[c];else if(Array.isArray(h)){var w=h.indexOf(r);w!=-1&&(h.splice(w,1),h.length==1&&(a[c]=h[0]))}}},n.prototype.bindKey=function(r,e,o){if(typeof r=="object"&&r&&(o==null&&(o=r.position),r=r[this.platform]),!!r){if(typeof e=="function")return this.addCommand({exec:e,bindKey:r,name:e.name||r});r.split("|").forEach(function(a){var c="";if(a.indexOf(" ")!=-1){var h=a.split(/\s+/);a=h.pop(),h.forEach(function(m){var d=this.parseKeys(m),C=s[d.hashId]+d.key;c+=(c?" ":"")+C,this._addCommandToBinding(c,"chainKeys")},this),c+=" "}var w=this.parseKeys(a),y=s[w.hashId]+w.key;this._addCommandToBinding(c+y,e,o)},this)}},n.prototype._addCommandToBinding=function(r,e,o){var a=this.commandKeyBinding,c;if(!e)delete a[r];else if(!a[r]||this.$singleCommand)a[r]=e;else{Array.isArray(a[r])?(c=a[r].indexOf(e))!=-1&&a[r].splice(c,1):a[r]=[a[r]],typeof o!="number"&&(o=t(e));var h=a[r];for(c=0;c<h.length;c++){var w=h[c],y=t(w);if(y>o)break}h.splice(c,0,e)}},n.prototype.addCommands=function(r){r&&Object.keys(r).forEach(function(e){var o=r[e];if(o){if(typeof o=="string")return this.bindKey(o,e);typeof o=="function"&&(o={exec:o}),typeof o=="object"&&(o.name||(o.name=e),this.addCommand(o))}},this)},n.prototype.removeCommands=function(r){Object.keys(r).forEach(function(e){this.removeCommand(r[e])},this)},n.prototype.bindKeys=function(r){Object.keys(r).forEach(function(e){this.bindKey(e,r[e])},this)},n.prototype._buildKeyHash=function(r){this.bindKey(r.bindKey,r)},n.prototype.parseKeys=function(r){var e=r.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(y){return y}),o=e.pop(),a=p[o];if(p.FUNCTION_KEYS[a])o=p.FUNCTION_KEYS[a].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:o.toUpperCase(),hashId:-1}}else return{key:o,hashId:-1};for(var c=0,h=e.length;h--;){var w=p.KEY_MODS[e[h]];if(w==null)return typeof console<"u"&&console.error("invalid modifier "+e[h]+" in "+r),!1;c|=w}return{key:o,hashId:c}},n.prototype.findKeyCommand=function(r,e){var o=s[r]+e;return this.commandKeyBinding[o]},n.prototype.handleKeyboard=function(r,e,o,a){if(!(a<0)){var c=s[e]+o,h=this.commandKeyBinding[c];return r.$keyChain&&(r.$keyChain+=" "+c,h=this.commandKeyBinding[r.$keyChain]||h),h&&(h=="chainKeys"||h[h.length-1]=="chainKeys")?(r.$keyChain=r.$keyChain||c,{command:"null"}):(r.$keyChain&&((!e||e==4)&&o.length==1?r.$keyChain=r.$keyChain.slice(0,-c.length-1):(e==-1||a>0)&&(r.$keyChain="")),{command:h})}},n.prototype.getStatusText=function(r,e){return e.$keyChain||""},n}();function t(n){return typeof n=="object"&&n.bindKey&&n.bindKey.position||(n.isDefault?-100:0)}var i=function(n){v(r,n);function r(e,o){var a=n.call(this,e,o)||this;return a.$singleCommand=!0,a}return r}(l);i.call=function(n,r,e){l.prototype.$init.call(n,r,e,!0)},l.call=function(n,r,e){l.prototype.$init.call(n,r,e,!1)},E.HashHandler=i,E.MultiHashHandler=l}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(L,E,I){var v=this&&this.__extends||function(){var t=function(i,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])},t(i,n)};return function(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}
208i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),p=L("../lib/oop"),f=L("../keyboard/hash_handler").MultiHashHandler,s=L("../lib/event_emitter").EventEmitter,l=function(t){v(i,t);function i(n,r){var e=t.call(this,r,n)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(o){return o.args?o.command.exec(o.editor,o.args,o.event,!1):o.command.exec(o.editor,{},o.event,!0)}),e}return i.prototype.exec=function(n,r,e){if(Array.isArray(n)){for(var o=n.length;o--;)if(this.exec(n[o],r,e))return!0;return!1}typeof n=="string"&&(n=this.commands[n]);var a={editor:r,command:n,args:e};return this.canExecute(n,r)?(a.returnValue=this._emit("exec",a),this._signal("afterExec",a),a.returnValue!==!1):(this._signal("commandUnavailable",a),!1)},i.prototype.canExecute=function(n,r){return typeof n=="string"&&(n=this.commands[n]),!(!n||r&&r.$readOnly&&!n.readOnly||this.$checkCommandState!=!1&&n.isAvailable&&!n.isAvailable(r))},i.prototype.toggleRecording=function(n){if(!this.$inReplay)return n&&n._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(r){this.macro.push([r.command,r.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},i.prototype.replay=function(n){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(n);try{this.$inReplay=!0,this.macro.forEach(function(r){typeof r=="string"?this.exec(r,n):this.exec(r[0],n,r[1])},this)}finally{this.$inReplay=!1}}},i.prototype.trimMacro=function(n){return n.map(function(r){return typeof r[0]!="string"&&(r[0]=r[0].name),r[1]||(r=r[0]),r})},i}(f);p.implement(l.prototype,s),E.CommandManager=l}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(L,E,I){var v=L("../lib/lang"),p=L("../config"),f=L("../range").Range;function s(t,i){return{win:t,mac:i}}E.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(t){p.loadModule("ace/ext/settings_menu",function(i){i.init(t),t.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(t){p.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(t,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(t){p.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(t,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(t){t.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(t){t.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(t,i){typeof i=="number"&&!isNaN(i)&&t.gotoLine(i),t.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(t){t.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(t){t.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(t){t.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(t){t.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(t){t.session.foldAll(),t.session.unfold(t.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(t){t.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(t){t.findNext(
vendor: 8,214 bytes, line 208
208)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(t){t.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(t){p.loadModule("ace/ext/searchbox",function(i){i.Search(t)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(t){t.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(t){t.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(t){t.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(t){t.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(t,i){t.navigateUp(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(t){t.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(t){t.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(t){t.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(t,i){t.navigateDown(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(t){t.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(t){t.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(t){t.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(t){t.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(t,i){t.navigateLeft(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(t){t.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(t){t.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(t){t.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(t){t.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(t,i){t.navigateRight(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(t){t.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(t){t.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(t){t.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(t){t.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(t){t.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(t){t.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(t){t.renderer.scrollBy(0,-2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(t){t.renderer.scrollBy(0,2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(t){t.commands.toggleRecording(t)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(t){t.commands.replay(t)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(t){t.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(t){t.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(t){t.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(t){},readOnly:!0},{name:"cut",description:"Cut",exec:function(t){var i=t.$copyWithEmptySelection&&t.selection.isEmpty(),n=i?t.selection.getLineRange():t.selection.getRange();t._emit("cut",n),n.isEmpty()||t.session.remove(n),t.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(t,i){t.$handlePaste(i)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(t){t.removeLines()}
208,scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(t){t.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(t){t.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(t){t.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(t){t.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(t){t.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(t){t.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(t){p.loadModule("ace/ext/searchbox",function(i){i.Search(t,!0)})}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(t){t.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(t){t.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(t){t.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(t){t.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(t){t.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(t){t.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(t){t.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(t){t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(t){if(t.selection.isEmpty())t.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(t){t.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(t){t.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(t){var i=t.selection.getRange();i.start.column=0,t.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(t){var i=t.selection.getRange();i.end.column=Number.MAX_VALUE,t.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(t){t.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(t){t.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(t){t.blockOutdent()}
208,multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(t){t.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(t){t.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(t){t.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(t,i){t.insert(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(t,i){t.insert(v.stringRepeat(i.text||"",i.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(t){t.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(t){t.transposeLetters()},multiSelectAction:function(t){t.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(t){t.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(t){t.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(t){t.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(t){var i=t.selection.getRange();i.start.column=i.end.column=0,i.end.row++,t.selection.setRange(i,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(t){t.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(t){for(var i=t.selection.isBackwards(),n=i?t.selection.getSelectionLead():t.selection.getSelectionAnchor(),r=i?t.selection.getSelectionAnchor():t.selection.getSelectionLead(),e=t.session.doc.getLine(n.row).length,o=t.session.doc.getTextRange(t.selection.getRange()),a=o.replace(/\n\s*/," ").length,c=t.session.doc.getLine(n.row),h=n.row+1;h<=r.row+1;h++){var w=v.stringTrimLeft(v.stringTrimRight(t.session.doc.getLine(h)));w.length!==0&&(w=" "+w),c+=w}r.row+1<t.session.doc.getLength()-1&&(c+=t.session.doc.getNewLineCharacter()),t.clearSelection(),t.session.doc.replace(new f(n.row,0,r.row+2,0),c),a>0?(t.selection.moveCursorTo(n.row,n.column),t.selection.selectTo(n.row,n.column+a)):(e=t.session.doc.getLine(n.row).length>e?e+1:e,t.selection.moveCursorTo(n.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(t){var i=t.session.doc.getLength()-1,n=t.session.doc.getLine(i).length,r=t.selection.rangeList.ranges,e=[];r.length<1&&(r=[t.selection.getRange()]);for(var o=0;o<r.length;o++)o==r.length-1&&(r[o].end.row===i&&r[o].end.column===n||e.push(new f(r[o].end.row,r[o].end.column,i,n))),o===0?r[o].start.row===0&&r[o].start.column===0||e.push(new f(0,0,r[o].start.row,r[o].start.column)):e.push(new f(r[o-1].end.row,r[o-1].end.column,r[o].start.row,r[o].start.column));t.exitMultiSelectMode(),t.clearSelection();for(var o=0;o<e.length;o++)t.selection.addRange(e[o],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(t){t.selection.clearSelection(),t.navigateLineEnd(),t.insert(` 209`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(t){t.selection.clearSelection();var i=t.getCursorPosition();t.selection.moveTo(i.row-1,Number.MAX_VALUE),t.insert(` 210`),i.row===0&&t.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(t){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),t.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:s("F1","F1"),exec:function(t){t.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(t){t.prompt({$type:"modes"})},readOnly:!0}];for(var l=1;l<9;l++)E.commands.push({name:"foldToLevel"+l,description:"Fold To Level "+l,level:l,exec:function(t){t.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(L,E,I){var v=L("../lib/keys"),p=function(){function s(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 s.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))},s.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))},s.prototype.$onGutterKeyDown=function(l){if(this.annotationTooltip.isOpen){l.preventDefault(),l.keyCode===v.escape&&this.annotationTooltip.hide();return}if(l.target===this.element){if(l.keyCode!=v.enter)return;l.preventDefault();var t=this.editor.getCursorPosition().row;this.editor.isRowVisible(t)||this.editor.scrollToLine(t,!0,!0),setTimeout((function(){var i=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),n=this.$findNearestFoldLaneWidget(i),r=this.$findNearestAnnotation(i);if(!(n===null&&r===null)){var e=this.$findClosestNumber(n,r,i);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=r,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(l),setTimeout((function(){this.editor._signal("gutterkeydown",new f(l,this))}).bind(this),10)},s.prototype.$handleGutterKeyboardInteraction=function(l){if(l.keyCode===v.tab){l.preventDefault();return}if(l.keyCode===v.escape){l.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(l.keyCode===v.up){switch(l.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(l.keyCode===v.down){switch(l.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(l.keyCode===v.left){l.preventDefault(),this.$switchLane("annotation");return}if(l.keyCode===v.right){l.preventDefault(),this.$switchLane("fold");return}if(l.keyCode===v.enter||l.keyCode===v.space){switch(l.preventDefault(),this.activeLane){case"fold":var t=this.$rowIndexToRow(this.activeRowIndex),i=this.editor.session.$gutterCustomWidgets[t];
210if(i)i.callbacks&&i.callbacks.onClick&&i.callbacks.onClick(l,t);else if(this.gutterLayer.session.foldWidgets[t]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),l),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==t&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(t),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}},s.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()},s.prototype.$isFoldWidgetVisible=function(l){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(l)),i=this.$getFoldWidget(l).style.display!=="none";return t&&i},s.prototype.$isCustomWidgetVisible=function(l){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(l)),i=!!this.$getCustomWidget(l);return t&&i},s.prototype.$isAnnotationVisible=function(l){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(l)),i=this.$getAnnotation(l).style.display!=="none";return t&&i},s.prototype.$getFoldWidget=function(l){var t=this.lines.get(l),i=t.element;return i.childNodes[1]},s.prototype.$getCustomWidget=function(l){var t=this.lines.get(l),i=t.element;return i.childNodes[3]},s.prototype.$getAnnotation=function(l){var t=this.lines.get(l),i=t.element;return i.childNodes[2]},s.prototype.$findNearestFoldLaneWidget=function(l){if(this.$isCustomWidgetVisible(l)||this.$isFoldWidgetVisible(l))return l;for(var t=0;l-t>0||l+t<this.lines.getLength()-1;){if(t++,l-t>=0&&this.$isCustomWidgetVisible(l-t))return l-t;if(l+t<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(l+t))return l+t;if(l-t>=0&&this.$isFoldWidgetVisible(l-t))return l-t;if(l+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(l+t))return l+t}return null},s.prototype.$findNearestAnnotation=function(l){if(this.$isAnnotationVisible(l))return l;for(var t=0;l-t>0||l+t<this.lines.getLength()-1;){if(t++,l-t>=0&&this.$isAnnotationVisible(l-t))return l-t;if(l+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(l+t))return l+t}return null},s.prototype.$focusFoldWidget=function(l){if(l!=null){var t=this.$getFoldWidget(l);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},s.prototype.$focusCustomWidget=function(l){if(l!=null){var t=this.$getCustomWidget(l);t&&(t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus())}},s.prototype.$focusAnnotation=function(l){if(l!=null){var t=this.$getAnnotation(l);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},s.prototype.$blurFoldWidget=function(l){var t=this.$getFoldWidget(l);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},s.prototype.$blurCustomWidget=function(l){var t=this.$getCustomWidget(l);t&&(t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur())},s.prototype.$blurAnnotation=function(l){var t=this.$getAnnotation(l);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},s.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}},s.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}},s.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}},s.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}},s.prototype.$findClosestNumber=function(l,t,i){return l===null?t:t===null||Math.abs(i-l)<=Math.abs(i-t)?l:t},s.prototype.$switchLane=function(l){switch(l){case"annotation":if(this.activeLane==="annotation")break;var t=this.$findNearestAnnotation(this.activeRowIndex);if(t==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=t,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var i=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(i===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=i,this.$isCustomWidgetVisible(i)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},s.prototype.$rowIndexToRow=function(l){var t=this.lines.get(l);return t?t.row:null},s.prototype.$rowToRowIndex=function(l){for(var t=0;t<this.lines.getLength();t++){var i=this.lines.get(t);if(i.row==l)return t}return null},s}();E.GutterKeyboardHandler=p;var f=function(){function s(l,t){this.gutterKeyboardHandler=t,this.domEvent=l}return s.prototype.getKey=function(){return v.keyCodeToString(this.domEvent.keyCode)},s.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},s.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},s.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},s}();E.GutterKeyboardEvent=f}),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(L,E,I){var v=this&&this.__values||function(g){var u=typeof Symbol=="function"&&Symbol.iterator,b=u&&g[u],k=0;if(b)return b.call(g);if(g&&typeof g.length=="number")return{next:function(){return g&&k>=g.length&&(g=void 0),{value:g&&g[k++],done:!g}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")},p=L("./lib/oop"),f=L("./lib/dom"),s=L("./lib/lang"),l=L("./lib/useragent"),t=L("./keyboard/textinput").TextInput,i=L("./mouse/mouse_handler").MouseHandler,n=L("./mouse/fold_handler").FoldHandler,r=L("./keyboard/keybinding").KeyBinding,e=L("./edit_session").EditSession,o=L("./search").Search,a=L("./range").Range,c=L("./lib/event_emitter").EventEmitter,h=L("./commands/command_manager").CommandManager,w=L("./commands/default_commands").commands,y=L("./config"),m=L("./token_iterator").TokenIterator,d=L("./keyboard/gutter_handler").GutterKeyboardHandler,C=L("./config").nls,x=L("./cl
210ipboard"),A=L("./lib/keys"),M=L("./lib/event"),_=L("./tooltip").HoverTooltip,S=function(){function g(u,b,k){this.id="editor"+ ++g.$uid,this.session,this.$toDestroy=[];var T=u.getContainerElement();this.container=T,this.renderer=u,this.commands=new h(l.isMac?"mac":"win",w),typeof document=="object"&&(this.textInput=new t(u.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new i(this),new n(this)),this.keyBinding=new r(this),this.$search=new o().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(R,D){D._$emitInputEvent.schedule(31)}),this.setSession(b||k&&k.session||new e("")),y.resetOptions(this),k&&this.setOptions(k),y._signal("editor",this)}return g.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},g.prototype.startOperation=function(u){this.session.startOperation(u)},g.prototype.endOperation=function(u){this.session.endOperation(u)},g.prototype.onStartOperation=function(u){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,u||(this.previousCommand=null)},g.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 b=this.curOp.command,k=b&&b.scrollIntoView;if(k){switch(k){case"center-animate":k="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var T=this.selection.getRange(),R=this.renderer.layerConfig;(T.start.row>=R.lastRow||T.end.row<=R.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}k=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},g.prototype.$historyTracker=function(u){if(this.$mergeUndoDeltas){var b=this.prevOp,k=this.$mergeableCommands,T=b.command&&u.command.name==b.command.name;if(u.command.name=="insertstring"){var R=u.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),T=T&&this.mergeNextCommand&&(!/\s/.test(R)||/\s/.test(b.args)),this.mergeNextCommand=!0}else T=T&&k.indexOf(u.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(T=!1),T?this.session.mergeUndoDeltas=!0:k.indexOf(u.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},g.prototype.setKeyboardHandler=function(u,b){if(u&&typeof u=="string"&&u!="ace"){this.$keybindingId=u;var k=this;y.loadModule(["keybinding",u],function(T){k.$keybindingId==u&&k.keyBinding.setKeyboardHandler(T&&T.handler),b&&b()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(u),b&&b()},g.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},g.prototype.setSession=function(u){if(this.session!=u){this.curOp&&this.endOperation(),this.curOp={};var b=this.session;if(b){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("
210changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var k=this.session.getSelection();k.off("changeCursor",this.$onCursorChange),k.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:b}),this.curOp=null,b&&b._signal("changeEditor",{oldEditor:this}),b&&(b.$editor=null),u&&u._signal("changeEditor",{editor:this}),u&&(u.$editor=this),u&&!u.destroyed&&u.bgTokenizer.scheduleStart()}},g.prototype.getSession=function(){return this.session},g.prototype.setValue=function(u,b){return this.session.doc.setValue(u),b?b==1?this.navigateFileEnd():b==-1&&this.navigateFileStart():this.selectAll(),u},g.prototype.getValue=function(){return this.session.getValue()},g.prototype.getSelection=function(){return this.selection},g.prototype.resize=function(u){this.renderer.onResize(u)},g.prototype.setTheme=function(u,b){this.renderer.setTheme(u,b)},g.prototype.getTheme=function(){return this.renderer.getTheme()},g.prototype.setStyle=function(u,b){this.renderer.setStyle(u,b)},g.prototype.unsetStyle=function(u){this.renderer.unsetStyle(u)},g.prototype.getFontSize=function(){return this.getOption("fontSize")||f.computedStyle(this.container).fontSize},g.prototype.setFontSize=function(u){this.setOption("fontSize",u)},g.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var u=this;this.$highlightPending=!0,setTimeout(function(){u.$highlightPending=!1;var b=u.session;if(!(!b||b.destroyed)){b.$bracketHighlight&&(b.$bracketHighlight.markerIds.forEach(function(W){b.removeMarker(W)}),b.$bracketHighlight=null);var k=u.getCursorPosition(),T=u.getKeyboardHandler(),R=T&&T.$getDirectionForHighlight&&T.$getDirectionForHighlight(u),D=b.getMatchingBracketRanges(k,R);if(!D){var O=new m(b,k.row,k.column),P=O.getCurrentToken();if(P&&/\b(?:tag-open|tag-name)/.test(P.type)){var N=b.getMatchingTags(k);N&&(D=[N.openTagName.isEmpty()?N.openTag:N.openTagName,N.closeTagName.isEmpty()?N.closeTag:N.closeTagName])}}if(!D&&b.$mode.getMatching&&(D=b.$mode.getMatching(u.session)),!D){u.getHighlightIndentGuides()&&u.renderer.$textLayer.$highlightIndentGuide();return}var F="ace_bracket";Array.isArray(D)?D.length==1&&(F="ace_error_bracket"):D=[D],D.length==2&&(
210a.comparePoints(D[0].end,D[1].start)==0?D=[a.fromPoints(D[0].start,D[1].end)]:a.comparePoints(D[0].start,D[1].end)==0&&(D=[a.fromPoints(D[1].start,D[0].end)])),b.$bracketHighlight={ranges:D,markerIds:D.map(function(W){return b.addMarker(W,F,"text")})},u.getHighlightIndentGuides()&&u.renderer.$textLayer.$highlightIndentGuide()}},50)}},g.prototype.focus=function(){this.textInput.focus()},g.prototype.isFocused=function(){return this.textInput.isFocused()},g.prototype.blur=function(){this.textInput.blur()},g.prototype.onFocus=function(u){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",u))},g.prototype.onBlur=function(u){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",u))},g.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},g.prototype.onDocumentChange=function(u){var b=this.session.$useWrapMode,k=u.start.row==u.end.row?u.end.row:1/0;this.renderer.updateLines(u.start.row,k,b),this._signal("change",u),this.$cursorChange()},g.prototype.onTokenizerUpdate=function(u){var b=u.data;this.renderer.updateLines(b.first,b.last)},g.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},g.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},g.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},g.prototype.$updateHighlightActiveLine=function(){var u=this.getSession(),b;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(b=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(b=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(b=!1)),u.$highlightLineMarker&&!b)u.removeMarker(u.$highlightLineMarker.id),u.$highlightLineMarker=null;else if(!u.$highlightLineMarker&&b){var k=new a(b.row,b.column,b.row,1/0);k.id=u.addMarker(k,"ace_active-line","screenLine"),u.$highlightLineMarker=k}else b&&(u.$highlightLineMarker.start.row=b.row,u.$highlightLineMarker.end.row=b.row,u.$highlightLineMarker.start.column=b.column,u._signal("changeBackMarker"))},g.prototype.onSelectionChange=function(u){var b=this.session;if(b.$selectionMarker&&b.removeMarker(b.$selectionMarker),b.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var k=this.selection.getRange(),T=this.getSelectionStyle();b.$selectionMarker=b.addMarker(k,"ace_selection",T)}var R=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(R),this._signal("changeSelection")},g.prototype.$getSelectionHighLightRegexp=function(){var u=this.session,b=this.getSelectionRange();if(!(b.isEmpty()||b.isMultiLine())){var k=b.start.column,T=b.end.column,R=u.getLine(b.start.row),D=R.substring(k,T);if(!(D.length>5e3||!/[\w\d]/.test(D))){var O=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:D}),P=R.substring(k-1,T+1);if(O.test(P))return O}}},g.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},g.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},g.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},g.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},g.prototype.onChangeMode=function(u){this.renderer.updateText(),this._emit("changeMode",u)},g.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},g.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},g.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},g.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},g.prototype.getCopyText=function(){var u=this.getSelectedText(),b=this.session.doc.getNewLineCharacter(),k=!1;if(!u&&this.$copyWithEmptySelection){k=!0;for(var T=this.selection.getAllRanges(),R=0;R<T.length;R++){var D=T[R];R&&T[R-1].start.row==D.start.row||(u+=this.session.getLine(D.start.row)+b)}}var O={text:u};return this._signal("copy",O),x.lineMode=k?O.text:!1,O.text},g.prototype.onCopy=function(){this.commands.exec("copy",this)},g.prototype.onCut=function(){this.commands.exec("cut",this)},g.prototype.onPaste=function(u,b){var k={text:u,event:b};this.commands.exec("paste",this,k)},g.prototype.$handlePaste=function(u){typeof u=="string"&&(u={text:u}),this._signal("paste",u);var b=u.text,k=b===x.lineMode,T=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)k?T.insert({row:this.selection.lead.row,column:0},b):this.insert(b);
210else if(k)this.selection.rangeList.ranges.forEach(function(F){T.insert({row:F.start.row,column:0},b)});else{var R=b.split(/\r\n|\r|\n/),D=this.selection.rangeList.ranges,O=R.length==2&&(!R[0]||!R[1]);if(R.length!=D.length||O)return this.commands.exec("insertstring",this,b);for(var P=D.length;P--;){var N=D[P];N.isEmpty()||T.remove(N),T.insert(N.start,R[P])}}},g.prototype.execCommand=function(u,b){return this.commands.exec(u,this,b)},g.prototype.insert=function(u,b){var k=this.session,T=k.getMode(),R=this.getCursorPosition();if(this.getBehavioursEnabled()&&!b){var D=T.transformAction(k.getState(R.row),"insertion",this,k,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(` 211`)==-1){var O=a.fromPoints(R,R);O.end.column+=u.length,this.session.remove(O)}}else{var O=this.getSelectionRange();R=this.session.remove(O),this.clearSelection()}if(u==` 212`||u==`\r 213`){var W=k.getLine(R.row);if(R.column>W.search(/\S|$/)){var P=W.substr(R.column).search(/\S|$/);k.doc.removeInLine(R.row,R.column,R.column+P)}}this.clearSelection();var N=R.column,F=k.getState(R.row),W=k.getLine(R.row),B=T.checkOutdent(F,W,u);if(k.insert(R,u),D&&D.selection&&(D.selection.length==2?this.selection.setSelectionRange(new a(R.row,N+D.selection[0],R.row,N+D.selection[1])):this.selection.setSelectionRange(new a(R.row+D.selection[0],D.selection[1],R.row+D.selection[2],D.selection[3]))),this.$enableAutoIndent){if(k.getDocument().isNewLine(u)){var H=T.getNextLineIndent(F,W.slice(0,R.column),k.getTabString());k.insert({row:R.row+1,column:0},H)}B&&T.autoOutdent(F,k,R.row)}},g.prototype.autoIndent=function(){for(var u=this.session,b=u.getMode(),k=this.selection.isEmpty()?[new a(0,0,u.doc.getLength()-1,0)]:this.selection.getAllRanges(),T="",R="",D="",O=u.getTabString(),P=0;P<k.length;P++)for(var N=k[P].start.row,F=k[P].end.row,W=N;W<=F;W++){W>0&&(T=u.getState(W-1),R=u.getLine(W-1),D=b.getNextLineIndent(T,R,O));var B=u.getLine(W),H=b.$getIndent(B);if(D!==H){if(H.length>0){var U=new a(W,0,W,H.length);u.remove(U)}D.length>0&&u.insert({row:W,column:0},D)}b.autoOutdent(T,u,W)}},g.prototype.onTextInput=function(u,b){if(!b)return this.keyBinding.onTextInput(u);this.startOperation({command:{name:"insertstring"}});var k=this.applyComposition.bind(this,u,b);this.selection.rangeCount?this.forEachSelection(k):k(),this.endOperation()},g.prototype.applyComposition=function(u,b){if(b.extendLeft||b.extendRight){var k=this.selection.getRange();k.start.column-=b.extendLeft,k.end.column+=b.extendRight,k.start.column<0&&(k.start.row--,k.start.column+=this.session.getLine(k.start.row).length+1),this.selection.setRange(k),!u&&!k.isEmpty()&&this.remove()}if((u||!this.selection.isEmpty())&&this.insert(u,!0),b.restoreStart||b.restoreEnd){var k=this.selection.getRange();k.start.column-=b.restoreStart,k.end.column-=b.restoreEnd,this.selection.setRange(k)}},g.prototype.onCommandKey=function(u,b,k){return this.keyBinding.onCommandKey(u,b,k)},g.prototype.setOverwrite=function(u){this.session.setOverwrite(u)},g.prototype.getOverwrite=function(){return this.session.getOverwrite()},g.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},g.prototype.setScrollSpeed=function(u){this.setOption("scrollSpeed",u)},g.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},g.prototype.setDragDelay=function(u){this.setOption("dragDelay",u)},g.prototype.getDragDelay=function(){return this.getOption("dragDelay")},g.prototype.setSelectionStyle=function(u){this.setOption("selectionStyle",u)},g.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},g.prototype.setHighlightActiveLine=function(u){this.setOption("highlightActiveLine",u)},g.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},g.prototype.setHighlightGutterLine=function(u){this.setOption("highlightGutterLine",u)},g.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},g.prototype.setHighlightSelectedWord=function(u){this.setOption("highlightSelectedWord",u)},g.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},g.prototype.setAnimatedScroll=function(u){this.renderer.setAnimatedScroll(u)},g.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},g.prototype.setShowInvisibles=function(u){this.renderer.setShowInvisibles(u)},g.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},g.prototype.setDisplayIndentGuides=function(u){this.renderer.setDisplayIndentGuides(u)},g.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},g.prototype.setHighlightIndentGuides=function(u){this.renderer.setHighlightIndentGuides(u)},g.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},g.prototype.setShowPrintMargin=function(u){this.renderer.setShowPrintMargin(u)},g.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},g.prototype.setPrintMarginColumn=function(u){this.renderer.setPrintMarginColumn(u)},g.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},g.prototype.setReadOnly=function(u){this.setOption("readOnly",u)},g.prototype.getReadOnly=function(){return this.getOption("readOnly")},g.prototype.setBehavioursEnabled=function(u){this.setOption("behavioursEnabled",u)},g.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},g.prototype.setWrapBehavioursEnabled=function(u){this.setOption("wrapBehavioursEnabled",u)},g.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},g.prototype.setShowFoldWidgets=function(u){this.setOption("showFoldWidgets",u)},g.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},g.prototype.setFadeFoldWidgets=function(u){this.setOption("fadeFoldWidgets",u)},g.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},g.prototype.remove=function(u){this.selection.isEmpty()&&(u=="left"?this.selection.selectLeft():this.selection.selectRight());var b=this.getSelectionRange();if(this.getBehavioursEnabled()){var k=this.session,T=k.getState(b.start.row),R=k.getMode().transformAction(T,"deletion",this,k,b);if(b.end.column===0){var D=k.getTextRange(b);if(D[D.length-1]==` 214`){var O=k.getLine(b.end.row);/^\s+$/.test(O)&&(b.end.column=O.length)}}R&&(b=R)}this.session.remove(b),this.clearSelection()},g.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},g.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},g.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},g.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var u=this.getSelectionRange();u.start.column==u.end.column&&u.start.row==u.end.row&&(u.end.column=0,u.end.row++),this.session.remove(u),this.clearSelection()},g.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var u=this.getCursorPosition();this.insert(` 215`),this.moveCursorToPosition(u)},g.prototype.setGhostText=function(u,b){this.renderer.setGhostText(u,b)},g.prototype.removeGhostText=function(){this.renderer.removeGhostText()},g.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var u=this.getCursorPosition(),b=u.column;if(b!==0){var k=this.session.getLine(u.row),T,R;b<k.length?(T=k.charAt(b)+k.charAt(b-1),R=new a(u.row,b-1,u.row,b+1)):(T=k.charAt(b-1)+k.charAt(b-2),R=new a(u.row,b-2,u.row,b)),this.session.replace(R,T),this.session.selection.moveToPosition(R.end)}}},g.prototype.toLowerCase=function(){var u=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var b=this.getSelectionRange(),k=this.session.getTextRange(b);this.session.replace(b,k.toLowerCase()),this.selection.setSelectionRange(u)},g.prototype.toUpperCase=function(){var u=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var b=this.getSelectionRange(),k=this.session.getTextRange(b);this.session.replace(b,k.toUpperCase()),this.selection.setSelectionRange(u)},g.prototype.indent=function(){var u=this.session,b=this.getSelectionRange();if(b.start.row<b.end.row){var k=this.$getSelectedRows();u.indentRows(k.first,k.last," ");return}else if(b.start.column<b.end.column){var T=u.getTextRange(b);if(!/^\s+$/.test(T)){var k=this.$getSelectedRows();u.indentRows(k.first,k.last," ");return}}var R=u.getLine(b.start.row),D=b.start,O=u.getTabSize(),P=u.documentToScreenColumn(D.row,D.column);if(this.session.getUseSoftTabs())var N=O-P%O,F=s.stringRepeat(" ",N);else{for(var N=P%O;R[b.start.column-1]==" "&&N;)b.start.column--,N--;this.selection.setSelectionRange(b),F=" "}return this.insert(F)},g.prototype.blockIndent=function(){var u=this.$getSelectedRows();this.session.indentRows(u.first,u.last," ")},g.prototype.blockOutdent=function(){var u=this.session.getSelection();this.session.outdentRows(u.getRange())},g.prototype.sortLines=function(){for(var u=this.$getSelectedRows(),b=this.session,k=[],T=u.first;T<=u.last;T++)k.push(b.getLine(T));k.sort(function(O,P){return O.toLowerCase()<P.toLowerCase()?-1:O.toLowerCase()>P.toLowerCase()?1:0});for(var R=new a(0,0,0,0),T=u.first;T<=u.last;T++){var D=b.getLine(T);R.start.row=T,R.end.row=T,R.end.column=D.length,b.replace(R,k[T-u.first])}},g.prototype.toggleCommentLines=function(){var u=this.session.getState(this.getCursorPosition().row),b=this.$getSelectedRows();this.session.getMode().toggleCommentLines(u,this.session,b.first,b.last)},g.prototype.toggleBlockComment=function(){var u=this.getCursorPosition(),b=this.session.getState(u.row),k=this.getSelectionRange();this.session.getMode().toggleBlockComment(b,this.session,k,u)},g.prototype.getNumberAt=function(u,b){var k=/[\-]?[0-9]+(?:\.[0-9]+)?/g;k.lastIndex=0;for(var T=this.session.getLine(u);k.lastIndex<b;){var R=k.exec(T);if(R.index<=b&&R.index+R[0].length>=b){var D={value:R[0],start:R.index,end:R.index+R[0].length};return D}}return null},g.prototype.modifyNumber=function(u){var b=this.selection.getCursor().row,k=this.selection.getCursor().column,T=new a(b,k-1,b,k),R=this.session.getTextRange(T);if(!isNaN(parseFloat(R))&&isFinite(R)){var D=this.getNumberAt(b,k);if(D){var O=D.value.indexOf(".")>=0?D.start+D.value.indexOf(".")+1:D.end,P=D.start+D.value.length-O,N=parseFloat(D.value);N*=Math.pow(10,P),O!==D.end&&k<O?u*=Math.pow(10,D.end-k-1):u*=Math.pow(10,D.end-k),N+=u,N/=Math.pow(10,P);var F=N.toFixed(P),W=new a(b,D.start,b,D.end);this.session.replace(W,F),this.moveCursorTo(b,Math.max(D.start+1,k+F.length-D.value.length))}}else this.toggleWord()},g.prototype.toggleWord=function(){var u=this.selection.getCursor().row,b=this.selection.getCursor().column;this.selection.selectWord();var k=this.getSelectedText(),T=this.selection.getWordRange().start.column,R=k.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),D=b-T
215-1;D<0&&(D=0);var O=0,P=0,N=this;k.match(/[A-Za-z0-9_]+/)&&R.forEach(function(te,ce){P=O+te.length,D>=O&&D<=P&&(k=te,N.selection.clearSelection(),N.moveCursorTo(u,O+T),N.selection.selectTo(u,P+T)),O=P});for(var F=this.$toggleWordPairs,W,B=0;B<F.length;B++)for(var H=F[B],U=0;U<=1;U++){var K=+!U,V=k.match(new RegExp("^\\s?_?("+s.escapeRegExp(H[U])+")\\s?$","i"));if(V){var J=k.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(V[1])+")($|\\s)","g"));J&&(W=k.replace(new RegExp(s.escapeRegExp(H[U]),"i"),function(te){var ce=H[K];return te.toUpperCase()==te?ce=ce.toUpperCase():te.charAt(0).toUpperCase()==te.charAt(0)&&(ce=ce.substr(0,0)+H[K].charAt(0).toUpperCase()+ce.substr(1)),ce}),this.insert(W),W="")}}},g.prototype.findLinkAt=function(u,b){var k,T,R=this.session.getLine(u),D=R.split(/((?:https?|ftp):\/\/[\S]+)/),O=b;O<0&&(O=0);var P=0,N=0,F;try{for(var W=v(D),B=W.next();!B.done;B=W.next()){var H=B.value;if(N=P+H.length,O>=P&&O<=N&&H.match(/((?:https?|ftp):\/\/[\S]+)/)){F=H.replace(/[\s:.,'";}\]]+$/,"");break}P=N}}catch(U){k={error:U}}finally{try{B&&!B.done&&(T=W.return)&&T.call(W)}finally{if(k)throw k.error}}return F},g.prototype.openLink=function(){var u=this.selection.getCursor(),b=this.findLinkAt(u.row,u.column);return b&&window.open(b,"_blank"),b!=null},g.prototype.removeLines=function(){var u=this.$getSelectedRows();this.session.removeFullLines(u.first,u.last),this.clearSelection()},g.prototype.duplicateSelection=function(){var u=this.selection,b=this.session,k=u.getRange(),T=u.isBackwards();if(k.isEmpty()){var R=k.start.row;b.duplicateLines(R,R)}else{var D=T?k.start:k.end,O=b.insert(D,b.getTextRange(k));k.start=D,k.end=O,u.setSelectionRange(k,T)}},g.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},g.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},g.prototype.moveText=function(u,b,k){return this.session.moveText(u,b,k)},g.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},g.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},g.prototype.$moveLines=function(u,b){var k,T,R=this.selection;if(!R.inMultiSelectMode||this.inVirtualSelectionMode){var D=R.toOrientedRange();k=this.$getSelectedRows(D),T=this.session.$moveLines(k.first,k.last,b?0:u),b&&u==-1&&(T=0),D.moveBy(T,0),R.fromOrientedRange(D)}else{var O=R.rangeList.ranges;R.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var P=0,N=0,F=O.length,W=0;W<F;W++){var B=W;O[W].moveBy(P,0),k=this.$getSelectedRows(O[W]);for(var H=k.first,U=k.last;++W<F;){N&&O[W].moveBy(N,0);var K=this.$getSelectedRows(O[W]);if(b&&K.first!=U)break;if(!b&&K.first>U+1)break;U=K.last}for(W--,P=this.session.$moveLines(H,U,b?0:u),b&&u==-1&&(B=W+1);B<=W;)O[B].moveBy(P,0),B++;b||(P=0),N+=P}R.fromOrientedRange(R.ranges[0]),R.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}}
215,g.prototype.$getSelectedRows=function(u){return u=(u||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(u.start.row),last:this.session.getRowFoldEnd(u.end.row)}},g.prototype.onCompositionStart=function(u){this.renderer.showComposition(u)},g.prototype.onCompositionUpdate=function(u){this.renderer.setCompositionText(u)},g.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},g.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},g.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},g.prototype.isRowVisible=function(u){return u>=this.getFirstVisibleRow()&&u<=this.getLastVisibleRow()},g.prototype.isRowFullyVisible=function(u){return u>=this.renderer.getFirstFullyVisibleRow()&&u<=this.renderer.getLastFullyVisibleRow()},g.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},g.prototype.$moveByPage=function(u,b){var k=this.renderer,T=this.renderer.layerConfig,R=u*Math.floor(T.height/T.lineHeight);b===!0?this.selection.$moveSelection(function(){this.moveCursorBy(R,0)}):b===!1&&(this.selection.moveCursorBy(R,0),this.selection.clearSelection());var D=k.scrollTop;k.scrollBy(0,R*T.lineHeight),b!=null&&k.scrollCursorIntoView(null,.5),k.animateScrolling(D)},g.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},g.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},g.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},g.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},g.prototype.scrollPageDown=function(){this.$moveByPage(1)},g.prototype.scrollPageUp=function(){this.$moveByPage(-1)},g.prototype.scrollToRow=function(u){this.renderer.scrollToRow(u)},g.prototype.scrollToLine=function(u,b,k,T){this.renderer.scrollToLine(u,b,k,T)},g.prototype.centerSelection=function(){var u=this.getSelectionRange(),b={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(b,.5)},g.prototype.getCursorPosition=function(){return this.selection.getCursor()},g.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},g.prototype.getSelectionRange=function(){return this.selection.getRange()},g.prototype.selectAll=function(){this.selection.selectAll()},g.prototype.clearSelection=function(){this.selection.clearSelection()},g.prototype.moveCursorTo=function(u,b){this.selection.moveCursorTo(u,b)},g.prototype.moveCursorToPosition=function(u){this.selection.moveCursorToPosition(u)},g.prototype.jumpToMatching=function(u,b){var k=this.getCursorPosition(),T=new m(this.session,k.row,k.column),R=T.getCurrentToken(),D=0;R&&R.type.indexOf("tag-name")!==-1&&(R=T.stepBackward());var O=R||T.stepForward();if(O){var P,N=!1,F={},W=k.column-O.start,B,H={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(O.value.match(/[{}()\[\]]/g)){for(;W<O.value.length&&!N;W++)if(H[O.value[W]])switch(B=H[O.value[W]]+"."+O.type.replace("rparen","lparen"),isNaN(F[B])&&(F[B]=0),O.value[W]){case"(":case"[":case"{":F[B]++;break;case")":case"]":case"}":F[B]--,F[B]===-1&&(P="bracket",N=!0);break}}else O.type.indexOf("tag-name")!==-1&&(isNaN(F[O.value])&&(F[O.value]=0),R.value==="<"&&D>1?F[O.value]++:R.value==="</"&&F[O.value]--,F[O.value]===-1&&(P="tag",N=!0));N||(R=O,D++,O=T.stepForward(),W=0)}while(O&&!N);if(P){var U,K;if(P==="bracket")U=this.session.getBracketRange(k),U||(U=new a(T.getCurrentTokenRow(),T.getCurrentTokenColumn()+W-1,T.getCurrentTokenRow(),T.getCurrentTokenColumn()+W-1),K=U.start,(b||K.row===k.row&&Math.abs(K.column-k.column)<2)&&(U=this.session.getBracketRange(K)));else if(P==="tag"){if(!O||O.type.indexOf("tag-name")===-1)return;if(U=new a(T.getCurrentTokenRow(),T.getCurrentTokenColumn()-2,T.getCurrentTokenRow(),T.getCurrentTokenColumn()-2),U.compare(k.row,k.column)===0){var V=this.session.getMatchingTags(k);V&&(V.openTag.contains(k.row,k.column)?(U=V.closeTag,K=U.start):(U=V.openTag,V.closeTag.start.row===k.row&&V.closeTag.start.column===k.column?K=U.end:K=U.start))}K=K||U.start}K=U&&U.cursor||K,K&&(u?U&&b?this.selection.setRange(U):U&&U.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(K.row,K.column):this.selection.moveTo(K.row,K.column))}}},g.prototype.gotoLine=function(u,b,k){this.selection.clearSelection(),this.session.unfold({row:u-1,column:b||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(u-1,b||0),this.isRowFullyVisible(u-1)||this.scrollToLine(u-1,!0,k)},g.prototype.navigateTo=function(u,b){this.selection.moveTo(u,b)},g.prototype.navigateUp=function(u){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var b=this.selection.anchor.getPosition();return this.moveCursorToPosition(b)}this.selection.clearSelection(),this.selection.moveCursorBy(-u||-1,0)},g.prototype.navigateDown=function(u){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var b=this.selection.anchor.getPosition();return this.moveCursorToPosition(b)}this.selection.clearSelection(),this.selection.moveCursorBy(u||1,0)},g.prototype.navigateLeft=function(u){if(this.selection.isEmpty())for(u=u||1;u--;)this.selection.moveCursorLeft();else{var b=this.getSelectionRange().start;this.moveCursorToPosition(b)}this.clearSelection()},g.prototype.navigateRight=function(u){if(this.selection.isEmpty())for(u=u||1;u--;)this.selection.moveCursorRight();else{var b=this.getSelectionRange().end;this.moveCursorToPosition(b)}this.clearSelection()},g.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},g.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},g.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},g.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},g.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},g.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},g.prototype.replace=function(u,b){b&&this.$search.set(b);var k=this.$search.find(this.session),T=0;return k&&(this.$tryReplace(k,u)&&(T=1),this.selection.setSelectionRange(k),this.renderer.scrollSelectionIntoView(k.start,k.end)),T},g.prototype.replaceAll=function(u,b){b&&this.$search.set(b);var k=this.$search.findAll(this.session),T=0;if(!k.length)return T;var R=this.getSelectionRange();this.selection.moveTo(0,0);for(var D=k.length-1;D>=0;--D)this.$tryReplace(k[D],u)&&T++;return this.selection.setSelectionRange(R),T},g.prototype.$tryReplace=function(u,b){var k=this.session.getTextRange(u);return b=this.$search.replace(k,b),b!==null?(u.end=this.session.replace(u,b),u):null},g.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},g.prototype.find=function(u,b,k){b||(b={}),typeof u=="string"||u instanceof RegExp?b.needle=u:typeof u=="object"&&p.mixin(b,u);var T=this.selection.getRange();b.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(b),b.start||this.$search.set({start:T});var R=this.$search.find(this.session);if(b.preventScroll)return R;if(R)return this.revealRange(R,k),R;b.backwards?T.start=T.end:T.end=T.start,this.selection.setRange(T)}
215,g.prototype.findNext=function(u,b){this.find({skipCurrent:!0,backwards:!1},u,b)},g.prototype.findPrevious=function(u,b){this.find(u,{skipCurrent:!0,backwards:!0},b)},g.prototype.revealRange=function(u,b){this.session.unfold(u),this.selection.setSelectionRange(u);var k=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(u.start,u.end,.5),b!==!1&&this.renderer.animateScrolling(k)},g.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},g.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},g.prototype.destroy=function(){this.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()},g.prototype.setAutoScrollEditorIntoView=function(u){if(u){var b,k=this,T=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var R=this.$scrollAnchor;R.style.cssText="position:absolute",this.container.insertBefore(R,this.container.firstChild);var D=this.on("changeSelection",function(){T=!0}),O=this.renderer.on("beforeRender",function(){T&&(b=k.renderer.container.getBoundingClientRect())}),P=this.renderer.on("afterRender",function(){if(T&&b&&(k.isFocused()||k.searchBox&&k.searchBox.isFocused())){var N=k.renderer,F=N.$cursorLayer.$pixelPos,W=N.layerConfig,B=F.top-W.offset;F.top>=0&&B+b.top<0?T=!0:F.top<W.height&&F.top+b.top+W.lineHeight>window.innerHeight?T=!1:T=null,T!=null&&(R.style.top=B+"px",R.style.left=F.left+"px",R.style.height=W.lineHeight+"px",R.scrollIntoView(T)),T=b=null}});this.setAutoScrollEditorIntoView=function(N){N||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",D),this.renderer.off("afterRender",P),this.renderer.off("beforeRender",O))}}},g.prototype.$resetCursorStyle=function(){var u=this.$cursorStyle||"ace",b=this.renderer.$cursorLayer;b&&(b.setSmoothBlinking(/smooth/.test(u)),b.isBlinking=!this.$readOnly&&u!="wide",f.setCssClass(b.element,"ace_slim-cursors",/slim/.test(u)))},g.prototype.prompt=function(u,b,k){var T=this;y.loadModule("ace/ext/prompt",function(R){R.prompt(T,u,b,k)})},Object.defineProperty(g.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new _(this.container))},set:function(u){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=u},enumerable:!1,configurable:!0}),g}();S.$uid=0,S.prototype.curOp=null,S.prototype.prevOp={},S.prototype.$mergeableCommands=["backspace","del","insertstring"],S.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"],["&&","||"],["==","!="]],p.implement(S.prototype,c),y.defineOptions(S.prototype,"editor",{selectionStyle:{set:function(g){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:g})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(g){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(g){var u=this;if(this.textInput.setReadOnly(g),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(k){var T=!1;if(k&&k.type=="keydown"){if(k&&k.key&&!k.ctrlKey&&!k.metaKey&&(k.key==" "&&k.preventDefault(),T=k.key.length==1),!T)return}else k&&k.type!=="exec"&&(T=!0);if(T){var R=f.createElement("div");R.textContent=C("editor.tooltip.disable-editing","Editing is disabled"),u.hoverTooltip.isOpen||u.hoverTooltip.showForRange(u,u.getSelectionRange(),R)}else u.hoverTooltip&&u.hoverTooltip.isOpen&&u.hoverTooltip.hide()});var b=this.textInput.getElement();g?(M.addListener(b,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(M.removeListener(b,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("
215commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function(g){this.textInput.setCopyWithEmptySelection(g)},initialValue:!1},cursorStyle:{set:function(g){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(g){this.setAutoScrollEditorIntoView(g)}},keyboardHandler:{set:function(g){this.setKeyboardHandler(g)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(g){this.session.setValue(g)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(g){this.setSession(g)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(g){this.renderer.$gutterLayer.setShowLineNumbers(g),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),g&&this.$relativeLineNumbers?$.attach(this):$.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(g){this.$showLineNumbers&&g?$.attach(this):$.detach(this)}},placeholder:{set:function(g){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var u=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(u&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),f.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),f.addCssClass(this.container,"ace_hasPlaceholder");var b=f.createElement("div");b.className="ace_placeholder",b.textContent=this.$placeholder||"",this.renderer.placeholderNode=b,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!u&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(g){var u={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(T){T.blur(),T.renderer.scroller.focus()},readOnly:!0},b=function(T){if(T.target==this.renderer.scroller&&T.keyCode===A.enter){T.preventDefault();var R=this.getCursorPosition().row;this.isRowVisible(R)||this.scrollToLine(R,!0,!0),this.focus()}},k;g?(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",C("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",C("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",b.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",C("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",C("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),k||(k=new d(this)),k.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",b.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),k&&k.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(g){this.$textInputAriaLabel=g},initialValue:""},enableMobileMenu:{set:function(g){this.$enableMobileMenu=g},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
215sTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var $={getText:function(g,u){return(Math.abs(g.selection.lead.row-u)||u+1+(u<9?"·":""))+""},getWidth:function(g,u,b){return Math.max(u.toString().length,(b.lastRow+1).toString().length,2)*b.characterWidth},update:function(g,u){u.renderer.$loop.schedule(u.renderer.CHANGE_GUTTER)},attach:function(g){g.renderer.$gutterLayer.$renderer=this,g.on("changeSelection",this.update),this.update(null,g)},detach:function(g){g.renderer.$gutterLayer.$renderer==this&&(g.renderer.$gutterLayer.$renderer=null),g.off("changeSelection",this.update),this.update(null,g)}};E.Editor=S}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(L,E,I){var v=L("../lib/dom"),p=function(){function f(s,l){this.element=s,this.canvasHeight=l||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return f.prototype.moveContainer=function(s){v.translate(this.element,0,-(s.firstRowScreen*s.lineHeight%this.canvasHeight)-s.offset*this.$offsetCoefficient)},f.prototype.pageChanged=function(s,l){return Math.floor(s.firstRowScreen*s.lineHeight/this.canvasHeight)!==Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)},f.prototype.computeLineTop=function(s,l,t){var i=l.firstRowScreen*l.lineHeight,n=Math.floor(i/this.canvasHeight),r=t.documentToScreenRow(s,0)*l.lineHeight;return r-n*this.canvasHeight},f.prototype.computeLineHeight=function(s,l,t){return l.lineHeight*t.getRowLineCount(s)},f.prototype.getLength=function(){return this.cells.length},f.prototype.get=function(s){return this.cells[s]},f.prototype.shift=function(){this.$cacheCell(this.cells.shift())},f.prototype.pop=function(){this.$cacheCell(this.cells.pop())},f.prototype.push=function(s){if(Array.isArray(s)){this.cells.push.apply(this.cells,s);for(var l=v.createFragment(this.element),t=0;t<s.length;t++)l.appendChild(s[t].element);this.element.appendChild(l)}else this.cells.push(s),this.element.appendChild(s.element)},f.prototype.unshift=function(s){if(Array.isArray(s)){this.cells.unshift.apply(this.cells,s);for(var l=v.createFragment(this.element),t=0;t<s.length;t++)l.appendChild(s[t].element);this.element.firstChild?this.element.insertBefore(l,this.element.firstChild):this.element.appendChild(l)}else this.cells.unshift(s),this.element.insertAdjacentElement("afterbegin",s.element)},f.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},f.prototype.$cacheCell=function(s){s&&(s.element.remove(),this.cellCache.push(s))},f.prototype.createCell=function(s,l,t,i){var n=this.cellCache.pop();if(!n){var r=v.createElement("div");i&&i(r),this.element.appendChild(r),n={element:r,text:"",row:s}}return n.row=s,n},f}();E.Lines=p}),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(L,E,I){var v=L("../lib/dom"),p=L("../lib/oop"),f=L("../lib/lang"),s=L("../lib/event_emitter").EventEmitter,l=L("./lines").Lines,t=L("../config").nls,i=function(){function r(e){this.$showCursorMarker=null,this.element=v.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 r.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},r.prototype.addGutterDecoration=function(e,o){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,o)},r.prototype.removeGutterDecoration=function(e,o){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,o)},r.prototype.setAnnotations=function(e){this.$annotations=[];for(var o=0;o<e.length;o++){var a=e[o],c=a.row,h=this.$annotations[c];h||(h=this.$annotations[c]={text:[],type:[],displayText:[]});var w=a.text,y=a.text,m=a.type;w=w?f.escapeHTML(w):a.html||"",y=y||a.html||"",h.text.indexOf(w)===-1&&(h.text.push(w),h.type.pu
215sh(m),h.displayText.push(y));var d=a.className;d?h.className=d:m==="error"?h.className=" ace_error":m==="security"&&!/\bace_error\b/.test(h.className)?h.className=" ace_security":m==="warning"&&!/\bace_(error|security)\b/.test(h.className)?h.className=" ace_warning":m==="info"&&!h.className?h.className=" ace_info":m==="hint"&&!h.className&&(h.className=" ace_hint")}},r.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var o=e.start.row,a=e.end.row-o;if(a!==0)if(e.action=="remove")this.$annotations.splice(o,a+1,null);else{var c=new Array(a+1);c.unshift(o,1),this.$annotations.splice.apply(this.$annotations,c)}}},r.prototype.update=function(e){this.config=e;var o=this.session,a=e.firstRow,c=Math.min(e.lastRow+e.gutterOffset,o.getLength()-1);this.oldLastRow=c,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var h=o.getNextFoldLine(a),w=h?h.start.row:1/0,y=null,m=-1,d=a;;){if(d>w&&(d=h.end.row+1,h=o.getNextFoldLine(d,h),w=h?h.start.row:1/0),d>c){for(;this.$lines.getLength()>m+1;)this.$lines.pop();break}y=this.$lines.get(++m),y?y.row=d:(y=this.$lines.createCell(d,e,this.session,n),this.$lines.push(y)),this.$renderCell(y,e,h,d),d++}this._signal("afterRender"),this.$updateGutterWidth(e),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},r.prototype.$updateGutterWidth=function(e){var o=this.session,a=o.gutterRenderer||this.$renderer,c=o.$firstLineNumber,h=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||o.$useWrapMode)&&(h=o.getLength()+c-1);var w=a?a.getWidth(o,h,e):h.toString().length*e.characterWidth,y=this.$padding||this.$computePadding();w+=y.left+y.right,w!==this.gutterWidth&&!isNaN(w)&&(this.gutterWidth=w,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",w))},r.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},r.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 o=this.$lines.cells;this.$cursorCell=null;for(var a=0;a<o.length;a++){var c=o[a];if(c.row>=this.$cursorRow){if(c.row>this.$cursorRow){var h=this.session.getFoldLine(this.$cursorRow);if(a>0&&h&&h.start.row==o[a-1].row)c=o[a-1];else break}c.element.className="ace_gutter-active-line "+c.element.className,this.$cursorCell=c;break}}}}},r.prototype.$updateCursorMarker=function(){if(this.session){var e=this.session;this.$highlightElement||(this.$highlightElement=v.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var o=e.selection.cursor,a=this.config,c=this.$lines,h=a.firstRowScreen*a.lineHeight,w=Math.floor(h/c.canvasHeight),y=e.documentToScreenRow(o)*a.lineHeight,m=y-w*c.canvasHeight;v.setStyle(this.$highlightElement.style,"height",a.lineHeight+"px"),v.setStyle(this.$highlightElement.style,"top",m+"px")}},r.prototype.scrollLines=function(e){var o=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(o,e))return this.update(e);this.$lines.moveContainer(e);var a=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),c=this.oldLastRow;if(this.oldLastRow=a,!o||c<e.firstRow)return this.update(e);if(a<o.firstRow)return this.update(e);if(o.firstRow<e.firstRow)for(var h=this.session.getFoldedRowCount(o.firstRow,e.firstRow-1);h>0;h--)this.$lines.shift();if(c>a)for(var h=this.session.getFoldedRowCount(a+1,c);h>0;h--)this.$lines.pop();e.firstRow<o.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,o.firstRow-1)),a>c&&this.$lines.push(this.$renderLines(e,c+1,a)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},r.prototype.$renderLines=function(e,o,a){for(var c=[],h=o,w=this.session.getNextFoldLine(h),y=w?w.start.row:1/0;h>y&&(h=w.end.row+1,w=this.session.getNextFoldLine(h,w),y=w?w.start.row:1/0),!(h>a);){var m=this.$lines.createCell(h,e,this.session,n);this.$renderCell(m,e,w,h),c.push(m),h++}return c},r.prototype.$renderCell=function(e,o,a,c){var h=e.element,w=this.session,y=h.childNodes[0],m=h.childNodes[1],d=h.childNodes[2],C=h.childNodes[3],x=d.firstChild,A=w.$f
215irstLineNumber,M=w.$breakpoints,_=w.$decorations,S=w.gutterRenderer||this.$renderer,$=this.$showFoldWidgets&&w.foldWidgets,g=a?a.start.row:Number.MAX_VALUE,u=o.lineHeight+"px",b=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",k=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",T=(S?S.getText(w,c):c+A).toString();if(this.$highlightGutterLine&&(c==this.$cursorRow||a&&c<this.$cursorRow&&c>=g&&this.$cursorRow<=a.end.row)&&(b+="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)),M[c]&&(b+=M[c]),_[c]&&(b+=_[c]),this.$annotations[c]&&c!==g&&(b+=this.$annotations[c].className),$){var R=$[c];R==null&&(R=$[c]=w.getFoldWidget(c))}if(R){var D="ace_fold-widget ace_"+R,O=R=="start"&&c==g&&c<a.end.row;if(O){D+=" ace_closed";for(var P="",N=!1,F=c+1;F<=a.end.row;F++)if(this.$annotations[F]){if(this.$annotations[F].className===" ace_error"){N=!0,P=" ace_error_fold";break}this.$annotations[F].className===" ace_security"?(N=!0,P=" ace_security_fold"):this.$annotations[F].className===" ace_warning"&&P!==" ace_security_fold"&&(N=!0,P=" ace_warning_fold")}b+=P}else D+=" ace_open";m.className!=D&&(m.className=D),v.setStyle(m.style,"height",u),v.setStyle(m.style,"display","inline-block"),m.setAttribute("role","button"),m.setAttribute("tabindex","-1");var W=w.getFoldWidgetRange(c);W?m.setAttribute("aria-label",t("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[W.start.row+1,W.end.row+1])):a?m.setAttribute("aria-label",t("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[a.start.row+1,a.end.row+1])):m.setAttribute("aria-label",t("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[c+1])),O?(m.setAttribute("aria-expanded","false"),m.setAttribute("title",t("gutter.code-folding.closed.title","Unfold code"))):(m.setAttribute("aria-expanded","true"),m.setAttribute("title",t("gutter.code-folding.open.title","Fold code")))}else m&&(v.setStyle(m.style,"display","none"),m.setAttribute("tabindex","0"),m.removeAttribute("role"),m.removeAttribute("aria-label"));var B=this.session.$gutterCustomWidgets[c];if(B?this.$addCustomWidget(c,B,e):C&&this.$removeCustomWidget(c,e),N&&this.$showFoldedAnnotations){d.className="ace_gutter_annotation",x.className=k,x.className+=P,v.setStyle(x.style,"height",u),v.setStyle(d.style,"display","block"),v.setStyle(d.style,"height",u);var H;switch(P){case" ace_error_fold":H=t("gutter.annotation.aria-label.error","Error, read annotations row $0",[T]);break;case" ace_security_fold":H=t("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[T]);break;case" ace_warning_fold":H=t("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[T]);break}d.setAttribute("aria-label",H),d.setAttribute("tabindex","-1"),d.setAttribute("role","button")}else if(this.$annotations[c]){d.className="ace_gutter_annotation",x.className=k,this.$useSvgGutterIcons?x.className+=this.$annotations[c].className:h.classList.add(this.$annotations[c].className.replace(" ","")),v.setStyle(x.style,"height",u),v.setStyle(d.style,"display","block"),v.setStyle(d.style,"height",u);var H;switch(this.$annotations[c].className){case" ace_error":H=t("gutter.annotation.aria-label.error","Error, read annotations row $0",[T]);break;case" ace_security":H=t("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[T]);break;case" ace_warning":H=t("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[T]);break;case" ace_info":H=t("gutter.annotation.aria-label.info","Info, read annotations row $0",[T]);break;case" ace_hint":H=t("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[T]);break}d.setAttribute("aria-label",H),d.setAttribute("tabindex","-1"),d.setAttribute("role","button")}else v.setStyle(d.style,"display","none"),d.removeAttribute("aria-label"),d.removeAttribute("role"),d.setAttribute("tabindex","0");return T!==y.data&&(y.data=T),h.className!=b&&(h.className=b),v.setStyle(e.element.style,"height",this.$lines.computeLineHeight(c,o,w)+"px"),v.setStyle(e.element.style,"top",this.$lines.computeLineTop(c,o,w)+"px"),e.text=T,d.style.display==="none"&&m.style.display==="none"&&!B?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},r.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e,!e&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},r.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},r.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},r.prototype.setShowFoldWidgets=function(e){e?v.addCssClass(this.element,"ace_folding-enabled"):v.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},r.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},r.prototype.$hideFoldWidget=function(e,o){var a=o||this.$getGutterCell(e);if(a&&a.element){var c=a.element.childNodes[1];c&&v.setStyle(c.style,"display","none")}},r.prototype.$showFoldWidget=function(e,o){var a=o||this.$getGutterCell(e);if(a&&a.element){var c=a.element.childNodes[1];c&&this.session.foldWidgets&&this.session.foldWidgets[a.row]&&v.setStyle(c.style,"display","inline-block")}},r.prototype.$getGutterCell=function(e){var o=this.$lines.cells,a=0,c=o.length-1;if(!(e<o[0].row||e>o[c].row)){for(;a<=c;){var h=Math.floor((a+c)/2),w=o[h];if(w.row>e)c=h-1;else if(w.row<e)a=h+1;else return w}return w}},r.prototype.$addCustomWidget=function(e,o,a){var c=o.className,h=o.label,w=o.title,y=o.callbacks;this.session.$gutterCustomWidgets[e]={className:c,label:h,title:w,callbacks:y},this.$hideFoldWidget(e,a);var m=a||this.$getGutterCell(e);if(m&&m.element){var d=m.element.querySelector(".ace_custom-widget");d&&d.remove(),d=v.createElement("span"),d.className="ace_custom-widget ".concat(c),d.setAttribute("tabindex","-1"),d.setAttribute("role","button"),d.setAttribute("aria-label",h),d.setAttribute("title",w),v.setStyle(d.style,"display","inline-block"),v.setStyle(d.style,"height","inherit"),y&&y.onClick&&d.addEventListener("click",function(C){y.onClick(C,e),C.stopPropagation()}),m.element.appendChild(d)}},r.prototype.$removeCustomWidget=function(e,o){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,o);var a=o||this.$getGutterCell(e);if(a&&a.element){var c=a.element.querySelector(".ace_custom-widget");c&&a.element.removeChild(c)}},r.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=v.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},r.prototype.getRegion=function(e){var o=this.$padding||this.$computePadding(),a=this.element.getBoundingClientRect();if(e.x<o.left+a.left)return"markers";if(this.$showFoldWidgets&&e.x>a.right-o.right)return"foldWidgets"},r}();i.prototype.$fixedWidth=!1,i.prototype.$highlightGutterLine=!0,i.prototype.$renderer=void 0,i.prototype.$showLineNumbers=!0,i.prototype.$showFoldWidgets=!0,p.implement(i.prototype,s);function n(r){var e=document.createTextNode("");r.appendChild(e);var o=v.createElement("span");r.appendChild(o);var a=v.createElement("span");r.appendChild(a);var c=v.createElement("span");return a.appendChild(c),r}E.Gutter=i}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(L,E,I){var v=L("../range").Range,p=L("../lib/dom"),f=function(){function l(t){this.element=p.createElement("div"),this.element.className="ace_layer ace_marker-layer",t.appendChild(this.element)}return l.prototype.setPadding=function(t){this.$padding=t},l.prototype.setSession=function(t){this.session=t},l.prototype.setMarkers=function(t){this.markers=t},l.prototype.elt=function(t,i){var n=this.i!=-1&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=i,n.className=t},l.prototype.update=function(t){if(t){this.config=t,this.i=0;var i;for(var n in this.markers){var r=this.markers[n];if(!r.range){r.update(i,this,this.session,t);continue}var e=r.range.clipRows(t.firstRow,t.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),r.renderer){var o=this.$getTop(e.start.row,t),a=this.$padding+e.start.column*t.characterWidth;r.renderer(i,e,a,o,t)}else r.type=="fullLine"?this.drawFullLineMarker(i,e,r.clazz,t):r.type=="screenLine"?this.drawScreenLineMarker(i,e,r.clazz,t):e.isMultiLine()?r.type=="text"?this.drawTextMarker(i,e,r.clazz,t):this.drawMultiLineMarker(i,e,r.clazz,t):this.drawSingleLineMarker(i,e,r.clazz+" ace_start ace_br15",t)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},l.prototype.$getTop=function(t,i){return(t-i.firstRowScreen)*i.lineHeight},l.prototype.drawTextMarker=function(t,i,n,r,e){for(var o=this.session,a=i.start.row,c=i.end.row,h=a,w=0,y=0,m=o.getScreenLastRowColumn(h),d=new v(h,i.start.column,h,y);h<=c;h++)d.start.row=d.end.row=h,d.start.column=h==a?i.start.column:o.getRowWrapIndent(h),d.end.column=m,w=y,y=m,m=h+1<c?o.getScreenLastRowColumn(h+1):h==c?0:i.end.column,this.drawSingleLineMarker(t,d,n+(h==a?" ace_start":"")+" ace_br"+s(h==a||h==a+1&&i.start.column,w<y,y>m,h==c),r,h==c?0:1,e)},l.prototype.drawMultiLineMarker=function(t,i,n,r,e){var o=this.$padding,a=r.lineHeight,c=this.$getTop(i.start.row,r),h=o+i.start.column*r.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(i.start.row)){var w=i.clone();w.end.row=w.start.row,w.end.column=this.session.getLine(w.start.row).length,this.drawBidiSingleLineMarker(t,w,n+" ace_br1 ace_start",r,null,e)}else this.elt(n+" ace_br1 ace_start","height:"+a+"px;right:"+o+"px;top:"+c+"px;left:"+h+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(i.end.row)){var w=i.clone();w.start.row=w.end.row,w.start.column=0,this.drawBidiSingleLineMarker(t,w,n+" ace_br12",r,null,e)}else{c=this.$getTop(i.end.row,r);var y=i.end.column*r.characterWidth;this.elt(n+" ace_br12","height:"+a+"px;width:"+y+"px;top:"+c+"px;left:"+o+"px;"+(e||""))}
215if(a=(i.end.row-i.start.row-1)*r.lineHeight,!(a<=0)){c=this.$getTop(i.start.row+1,r);var m=(i.start.column?1:0)|(i.end.column?0:8);this.elt(n+(m?" ace_br"+m:""),"height:"+a+"px;right:"+o+"px;top:"+c+"px;left:"+o+"px;"+(e||""))}},l.prototype.drawSingleLineMarker=function(t,i,n,r,e,o){if(this.session.$bidiHandler.isBidiRow(i.start.row))return this.drawBidiSingleLineMarker(t,i,n,r,e,o);var a=r.lineHeight,c=(i.end.column+(e||0)-i.start.column)*r.characterWidth,h=this.$getTop(i.start.row,r),w=this.$padding+i.start.column*r.characterWidth;this.elt(n,"height:"+a+"px;width:"+c+"px;top:"+h+"px;left:"+w+"px;"+(o||""))},l.prototype.drawBidiSingleLineMarker=function(t,i,n,r,e,o){var a=r.lineHeight,c=this.$getTop(i.start.row,r),h=this.$padding,w=this.session.$bidiHandler.getSelections(i.start.column,i.end.column);w.forEach(function(y){this.elt(n,"height:"+a+"px;width:"+(y.width+(e||0))+"px;top:"+c+"px;left:"+(h+y.left)+"px;"+(o||""))},this)},l.prototype.drawFullLineMarker=function(t,i,n,r,e){var o=this.$getTop(i.start.row,r),a=r.lineHeight;i.start.row!=i.end.row&&(a+=this.$getTop(i.end.row,r)-o),this.elt(n,"height:"+a+"px;top:"+o+"px;left:0;right:0;"+(e||""))},l.prototype.drawScreenLineMarker=function(t,i,n,r,e){var o=this.$getTop(i.start.row,r),a=r.lineHeight;this.elt(n,"height:"+a+"px;top:"+o+"px;left:0;right:0;"+(e||""))},l}();f.prototype.$padding=0;function s(l,t,i,n){return(l?1:0)|(t?2:0)|(i?4:0)|(n?8:0)}E.Marker=f}),ace.define("ace/layer/text_util",["require","exports","module"],function(L,E,I){var v=new Set(["text","rparen","lparen"]);E.isTextToken=function(p){return v.has(p)}}),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(L,E,I){var v=L("../lib/oop"),p=L("../lib/dom"),f=L("../lib/lang"),s=L("./lines").Lines,l=L("../lib/event_emitter").EventEmitter,t=L("../config").nls,i=L("./text_util").isTextToken,n=function(){function r(e){this.dom=p,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 s(this.element)}return r.prototype.$updateEolChar=function(){var e=this.session.doc,o=e.getNewLineCharacter()==` 216`&&e.getNewLineMode()!="windows",a=o?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=a)return this.EOL_CHAR=a,!0},r.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},r.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},r.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},r.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",(function(o){this._signal("changeCharacterSize",o)}).bind(this)),this.$pollSizeChanges()},r.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},r.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},r.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},r.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)},r.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},r.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},r.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var o=this.$tabStrings=[0],a=1;a<e+1;a++)if(this.showTabs){var c=this.dom.createElement("span");c.className="ace_invisible ace_invisible_tab",c.textContent=f.stringRepeat(this.TAB_CHAR,a),o.push(c)}else o.push(this.dom.createTextNode(f.stringRepeat(" ",a),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var h="ace_indent-guide",w=this.showSpaces?" ace_invisible ace_invisible_space":"",y=this.showSpaces?f.stringRepeat(this.SPACE_CHAR,this.tabSize):f.stringRepeat(" ",this.tabSize),m=this.showTabs?" ace_invisible ace_invisible_tab":"",d=this.showTabs?f.stringRepeat(this.TAB_CHAR,this.tabSize):y,c=this.dom.createElement("span");c.className=h+w,c.textContent=y,this.$tabStrings[" "]=c;var c=this.dom.createElement("span");c.className=h+m,c.textContent=d,this.$tabStrings[" "]=c}},r.prototype.updateLines=function(e,o,a){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var c=Math.max(o,e.firstRow),h=Math.min(a,e.lastRow),w=this.element.childNodes,y=0,d=e.firstRow;d<c;d++){var C=this.session.getFoldLine(d);if(C)if(C.containsRow(c)){c=C.start.row;break}else d=C.end.row;y++}for(var m=!1,d=c,C=this.session.getNextFoldLine(d),x=C?C.start.row:1/0;d>x&&(d=C.end.row+1,C=this.session.getNextFoldLine(d,C),x=C?C.start.row:1/0),!(d>h);){var A=w[y++];if(A){this.dom.removeChildren(A),this.$renderLine(A,d,d==x?C:!1),m&&(A.style.top=this.$lines.computeLineTop(d,e,this.session)+"px");var M=e.lineHeight*this.session.getRowLength(d)+"px";A.style.height!=M&&(m=!0,A.style.height=M)}d++}if(m)for(;y<this.$lines.cells.length;){var _=this.$lines.cells[y++];_.element.style.top=this.$lines.computeLineTop(_.row,e,this.session)+"px"}},r.prototype.scrollLines=function(e){var o=this.config;if(this.config=e,this.$lines.pageChanged(o,e))return this.update(e);
216this.$lines.moveContainer(e);var a=e.lastRow,c=o?o.lastRow:-1;if(!o||c<e.firstRow)return this.update(e);if(a<o.firstRow)return this.update(e);if(!o||o.lastRow<e.firstRow)return this.update(e);if(e.lastRow<o.firstRow)return this.update(e);if(o.firstRow<e.firstRow)for(var h=this.session.getFoldedRowCount(o.firstRow,e.firstRow-1);h>0;h--)this.$lines.shift();if(o.lastRow>e.lastRow)for(var h=this.session.getFoldedRowCount(e.lastRow+1,o.lastRow);h>0;h--)this.$lines.pop();e.firstRow<o.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,o.firstRow-1)),e.lastRow>o.lastRow&&this.$lines.push(this.$renderLinesFragment(e,o.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},r.prototype.$renderLinesFragment=function(e,o,a){for(var c=[],h=o,w=this.session.getNextFoldLine(h),y=w?w.start.row:1/0;h>y&&(h=w.end.row+1,w=this.session.getNextFoldLine(h,w),y=w?w.start.row:1/0),!(h>a);){var m=this.$lines.createCell(h,e,this.session),d=m.element;this.dom.removeChildren(d),p.setStyle(d.style,"height",this.$lines.computeLineHeight(h,e,this.session)+"px"),p.setStyle(d.style,"top",this.$lines.computeLineTop(h,e,this.session)+"px"),this.$renderLine(d,h,h==y?w:!1),this.$useLineGroups()?d.className="ace_line_group":d.className="ace_line",c.push(m),h++}return c},r.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var o=e.firstRow,a=e.lastRow,c=this.$lines;c.getLength();)c.pop();c.push(this.$renderLinesFragment(e,o,a))},r.prototype.$renderToken=function(e,o,a,c){for(var h=this,w=/(\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,y=this.dom.createFragment(this.element),m,d=0;m=w.exec(c);){var C=m[1],x=m[2],A=m[3],M=m[4],_=m[5];if(!(!h.showSpaces&&x)){var S=d!=m.index?c.slice(d,m.index):"";if(d=m.index+m[0].length,S&&y.appendChild(this.dom.createTextNode(S,this.element)),C){var $=h.session.getScreenTabSize(o+m.index),g=h.$tabStrings[$].cloneNode(!0);g.charCount=1,y.appendChild(g),o+=$-1}else if(x)if(h.showSpaces){var u=this.dom.createElement("span");u.className="ace_invisible ace_invisible_space",u.textContent=f.stringRepeat(h.SPACE_CHAR,x.length),y.appendChild(u)}else y.appendChild(this.dom.createTextNode(x,this.element));else if(A){var u=this.dom.createElement("span");u.className="ace_invisible ace_invisible_space ace_invalid",u.textContent=f.stringRepeat(h.SPACE_CHAR,A.length),y.appendChild(u)}else if(M){o+=1;var u=this.dom.createElement("span");u.style.width=h.config.characterWidth*2+"px",u.className=h.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",u.textContent=h.showSpaces?h.SPACE_CHAR:M,y.appendChild(u)}else if(_){o+=1;var u=this.dom.createElement("span");u.style.width=h.config.characterWidth*2+"px",u.className="ace_cjk",u.textContent=_,y.appendChild(u)}}}if(y.appendChild(this.dom.createTextNode(d?c.slice(d):c,this.element)),i(a.type))e.appendChild(y);else{var b="ace_"+a.type.replace(/\./g," ace_"),u=this.dom.createElement("span");a.type=="fold"&&(u.style.width=a.value.length*this.config.characterWidth+"px",u.setAttribute("title",t("inline-fold.closed.title","Unfold code"))),u.className=b,u.appendChild(y),e.appendChild(u)}return o+c.length},r.prototype.renderIndentGuide=function(e,o,a){var c=o.search(this.$indentGuideRe);if(c<=0||c>=a)return o;if(o[0]==" "){c-=c%this.tabSize;for(var h=c/this.tabSize,w=0;w<h;w++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),o.substr(c)}else if(o[0]==" "){for(var w=0;w<c;w++){var y=this.$tabStrings[" "].cloneNode(!0);y.charCount=1,e.appendChild(y)}return this.$highlightIndentGuide(),o.substr(c)}return this.$highlightIndentGuide(),o},r.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var o=this.session.selection.getCursor(),a=/^\s*/.exec(this.session.doc.getLine(o.row))[0].length,c=Math.floor(a/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:c,start:o.row};var h=this.session.$bracketHighlight;if(h){for(var w=this.session.$bracketHighlight.ranges,y=0;y<w.length;y++)if(o.row!==w[y].start.row){this.$highlightIndentGuideMarker.end=w[y].start.row+1,o.row>w[y].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[o.row]!==""&&o.column===e[o.row].length){this.$highlightIndentGuideMarker.dir=1;for(var y=o.row+1;y<e.length;y++){var m=e[y],d=/^\s*/.exec(m)[0].length;if(m!==""&&(this.$highlightIndentGuideMarker.end=y,d<=a))break}}this.$renderHighlightIndentGuide()}}},r.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(".ace_indent-guide-active"),o=0;o<e.length;o++)e[o].classList.remove("ace_indent-guide-active")},r.prototype.$setIndentGuideActive=function(e,o){var a=this.session.doc.getLine(e.row);if(a!==""){var c=e.element;if(e.element.classList&&e.element.classList.contains("ace_line_group"))if(e.element.childNodes.length>0)c=e.element.childNodes[0];else return;var h=c.childNodes;if(h){var w=h[o-1];w&&w.classList&&w.classList.contains("ace_indent-guide")&&w.classList.add("ace_indent-guide-active")}}},r.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var o=this.$highlightIndentGuideMarker.indentLevel;if(o!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var a=0;a<e.length;a++){var c=e[a];if(this.$highlightIndentGuideMarker.end&&c.row>=this.$highlightIndentGuideMarker.start+1){if(c.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(c,o)}}else for(var a=e.length-1;a>=0;a--){var c=e[a];if(this.$highlightIndentGuideMarker.end&&c.row<this.$highlightIndentGuideMarker.start){if(c.row<this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(c,o)}}}},r.prototype.$createLineElement=function(e){var o=this.dom.createElement("div");return o.className="ace_line",o.style.height=this.config.lineHeight+"px",o},r.prototype.$renderWrappedLine=function(e,o,a){var c=0,h=0,w=a[0],y=0,m=this.$createLineElement();e.appendChild(m);for(var d=0;d<o.length;d++){var C=o[d],x=C.value;if(d==0&&this.displayIndentGuides){if(c=x.length,x=this.renderIndentGuide(m,x,w),!x)continue;c-=x.length}if(c+x.length<w)y=this.$renderToken(m,y,C,x),c+=x.length;else{for(;c+x.length>=w;){y=this.$renderToken(m,y,C,x.substring(0,w-c)),x=x.substring(w-c),c=w,m=this.$createLineElement(),e.appendChild(m);var A=this.dom.createTextNode(f.stringRepeat(" ",a.indent),this.element);A.charCount=0,m.appendChild(A),h++,y=0,w=a[h]||Number.MAX_VALUE}x.length!=0&&(c+=x.length,y=this.$renderToken(m,y,C,x))}}a[a.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(m,y,null,"",!0)}
216,r.prototype.$renderSimpleLine=function(e,o){for(var a=0,c=0;c<o.length;c++){var h=o[c],w=h.value;if(!(c==0&&this.displayIndentGuides&&(w=this.renderIndentGuide(e,w),!w))){if(a+w.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,a,h,w);a=this.$renderToken(e,a,h,w)}}},r.prototype.$renderOverflowMessage=function(e,o,a,c,h){a&&this.$renderToken(e,o,a,c.slice(0,this.MAX_LINE_LENGTH-o));var w=this.dom.createElement("span");w.className="ace_inline_button ace_keyword ace_toggle_wrap",w.textContent=h?"<hide>":"<click to see more...>",e.appendChild(w)},r.prototype.$renderLine=function(e,o,a){if(!a&&a!=!1&&(a=this.session.getFoldLine(o)),a)var c=this.$getFoldLineTokens(o,a);else var c=this.session.getTokens(o);var h=e;if(c.length){var w=this.session.getRowSplitData(o);if(w&&w.length){this.$renderWrappedLine(e,c,w);var h=e.lastChild}else{var h=e;this.$useLineGroups()&&(h=this.$createLineElement(),e.appendChild(h)),this.$renderSimpleLine(h,c)}}else this.$useLineGroups()&&(h=this.$createLineElement(),e.appendChild(h));if(this.showEOL&&h){a&&(o=a.end.row);var y=this.dom.createElement("span");y.className="ace_invisible ace_invisible_eol",y.textContent=o==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,h.appendChild(y)}},r.prototype.$getFoldLineTokens=function(e,o){var a=this.session,c=[];function h(y,m,d){for(var C=0,x=0;x+y[C].value.length<m;)if(x+=y[C].value.length,C++,C==y.length)return;if(x!=m){var A=y[C].value.substring(m-x);A.length>d-m&&(A=A.substring(0,d-m)),c.push({type:y[C].type,value:A}),x=m+A.length,C+=1}for(;x<d&&C<y.length;){var A=y[C].value;A.length+x>d?c.push({type:y[C].type,value:A.substring(0,d-x)}):c.push(y[C]),x+=A.length,C+=1}}var w=a.getTokens(e);return o.walk(function(y,m,d,C,x){y!=null?c.push({type:"fold",value:y}):(x&&(w=a.getTokens(m)),w.length&&h(w,C,d))},o.end.row,this.session.getLine(o.end.row).length),c},r.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},r}();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,v.implement(n.prototype,l),E.Text=n}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(L,E,I){var v=L("../lib/dom"),p=function(){function f(s){this.element=v.createElement("div"),this.element.className="ace_layer ace_cursor-layer",s.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),v.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return f.prototype.$updateOpacity=function(s){for(var l=this.cursors,t=l.length;t--;)v.setStyle(l[t].style,"opacity",s?"":"0")},f.prototype.$startCssAnimation=function(){for(var s=this.cursors,l=s.length;l--;)s[l].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&v.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},f.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,v.removeCssClass(this.element,"ace_animate-blinking")},f.prototype.setPadding=function(s){this.$padding=s},f.prototype.setSession=function(s){this.session=s},f.prototype.setBlinking=function(s){s!=this.isBlinking&&(this.isBlinking=s,this.restartTimer())},f.prototype.setBlinkInterval=function(s){s!=this.blinkInterval&&(this.blinkInterval=s,this.restartTimer())},f.prototype.setSmoothBlinking=function(s){s!=this.smoothBlinking&&(this.smoothBlinking=s,v.setCssClass(this.element,"ace_smooth-blinking",s),this.$updateCursors(!0),this.restartTimer())},f.prototype.addCursor=function(){var s=v.createElement("div");return s.className="ace_cursor",this.element.appendChild(s),this.cursors.push(s),s},f.prototype.removeCursor=function(){if(this.cursors.length>1){var s=this.cursors.pop();return s.parentNode.removeChild(s),s}},f.prototype.hideCursor=function(){this.isVisible=!1,v.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},f.prototype.showCursor=function(){this.isVisible=!0,v.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},f.prototype.restartTimer=function(){var s=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,v.removeCssClass(this.element,"ace_smooth-blinking")),s(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&v.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),v.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var l=(function(){this.timeoutId=setTimeout(function(){s(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){s(!0),l()},this.blinkInterval),l()}},f.prototype.getPixelPosition=function(s,l){if(!this.config||!this.session)return{left:0,top:0};s||(s=this.session.selection.getCursor());var t=this.session.documentToScreenPosition(s),i=this.$padding+(this.session.$bidiHandler.isBidiRow(t.row,s.row)?this.session.$bidiHandler.getPosLeft(t.column):t.column*this.config.characterWidth),n=(t.row-(l?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:n}},f.prototype.isCursorInView=function(s,l){return s.top>=0&&s.top<l.maxHeight},f.prototype.update=function(s){this.config=s;var l=this.session.$selectionMarkers,t=0,i=0;(l===void 0||l.length===0)&&(l=[{cursor:null}]);for(var t=0,n=l.length;t<n;t++){var r=this.getPixelPosition(l[t].cursor,!0);if(!((r.top>s.height+s.offset||r.top<0)&&t>1)){var e=this.cursors[i++]||this.addCursor(),o=e.style;this.drawCursor?this.drawCursor(e,r,s,l[t],this.session):this.isCursorInView(r,s)?(v.setStyle(o,"display","block"),v.translate(e,r.left,r.top),v.setStyle(o,"width",Math.round(s.characterWidth)+"px"),v.setStyle(o,"height",s.lineHeight+"px")):v.setStyle(o,"display","none")}}for(;this.cursors.length>i;
216)this.removeCursor();var a=this.session.getOverwrite();this.$setOverwrite(a),this.$pixelPos=r,this.restartTimer()},f.prototype.$setOverwrite=function(s){s!=this.overwrite&&(this.overwrite=s,s?v.addCssClass(this.element,"ace_overwrite-cursors"):v.removeCssClass(this.element,"ace_overwrite-cursors"))},f.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},f}();p.prototype.$padding=0,p.prototype.drawCursor=null,E.Cursor=p}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(L,E,I){var v=this&&this.__extends||function(){var e=function(o,a){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,h){c.__proto__=h}||function(c,h){for(var w in h)Object.prototype.hasOwnProperty.call(h,w)&&(c[w]=h[w])},e(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");e(o,a);function c(){this.constructor=o}o.prototype=a===null?Object.create(a):(c.prototype=a.prototype,new c)}}(),p=L("./lib/oop"),f=L("./lib/dom"),s=L("./lib/event"),l=L("./lib/event_emitter").EventEmitter,t=32768,i=function(){function e(o,a){this.element=f.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+a,this.element.tabIndex=-1,this.inner=f.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),o.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)}return e.prototype.setVisible=function(o){this.element.style.display=o?"":"none",this.isVisible=o,this.coeff=1},e}();p.implement(i.prototype,l);var n=function(e){v(o,e);function o(a,c){var h=e.call(this,a,"-v")||this;return h.scrollTop=0,h.scrollHeight=0,c.$scrollbarWidth=h.width=f.scrollbarWidth(a.ownerDocument),h.inner.style.width=h.element.style.width=(h.width||15)+5+"px",h.$minWidth=0,h}return o.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var a=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-a)/(this.coeff-a)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},o.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},o.prototype.setHeight=function(a){this.element.style.height=a+"px"},o.prototype.setScrollHeight=function(a){this.scrollHeight=a,a>t?(this.coeff=t/a,a=t):this.coeff!=1&&(this.coeff=1),this.inner.style.height=a+"px"},o.prototype.setScrollTop=function(a){this.scrollTop!=a&&(this.skipEvent=!0,this.scrollTop=a,this.element.scrollTop=a*this.coeff)},o}(i);n.prototype.setInnerHeight=n.prototype.setScrollHeight;var r=function(e){v(o,e);function o(a,c){var h=e.call(this,a,"-h")||this;return h.scrollLeft=0,h.height=c.$scrollbarWidth,h.inner.style.height=h.element.style.height=(h.height||15)+5+"px",h}return o.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},o.prototype.getHeight=function(){return this.isVisible?this.height:0},o.prototype.setWidth=function(a){this.element.style.width=a+"px"},o.prototype.setInnerWidth=function(a){this.inner.style.width=a+"px"},o.prototype.setScrollWidth=function(a){this.inner.style.width=a+"px"},o.prototype.setScrollLeft=function(a){this.scrollLeft!=a&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=a)},o}(i);E.ScrollBar=n,E.ScrollBarV=n,E.ScrollBarH=r,E.VScrollBar=n,E.HScrollBar=r}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(L,E,I){var v=this&&this.__extends||function(){var r=function(e,o){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(a[h]=c[h])},r(e,o)};return function(e,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");r(e,o);function a(){this.constructor=e}
216e.prototype=o===null?Object.create(o):(a.prototype=o.prototype,new a)}}(),p=L("./lib/oop"),f=L("./lib/dom"),s=L("./lib/event"),l=L("./lib/event_emitter").EventEmitter;f.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ 217 position: absolute; 218 background: rgba(128, 128, 128, 0.6); 219 -moz-box-sizing: border-box; 220 box-sizing: border-box; 221 border: 1px solid #bbb; 222 border-radius: 2px; 223 z-index: 8; 224} 225.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h { 226 position: absolute; 227 z-index: 6; 228 background: none; 229 overflow: hidden!important; 230} 231.ace_editor>.ace_sb-v { 232 z-index: 6; 233 right: 0; 234 top: 0; 235 width: 12px; 236} 237.ace_editor>.ace_sb-v div { 238 z-index: 8; 239 right: 0; 240 width: 100%; 241} 242.ace_editor>.ace_sb-h { 243 bottom: 0; 244 left: 0; 245 height: 12px; 246} 247.ace_editor>.ace_sb-h div { 248 bottom: 0; 249 height: 100%; 250} 251.ace_editor>.ace_sb_grabbed { 252 z-index: 8; 253 background: #000; 254}`,"ace_scrollbar.css",!1);var t=function(){function r(e,o){this.element=f.createElement("div"),this.element.className="ace_sb"+o,this.inner=f.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,s.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return r.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},r}();p.implement(t.prototype,l);var i=function(r){v(e,r);function e(o,a){var c=r.call(this,o,"-v")||this;return c.scrollTop=0,c.scrollHeight=0,c.parent=o,c.width=c.VScrollWidth,c.renderer=a,c.inner.style.width=c.element.style.width=(c.width||15)+"px",c.$minWidth=0,c}return e.prototype.onMouseDown=function(o,a){if(o==="mousedown"&&!(s.getButton(a)!==0||a.detail===2)){if(a.target===this.inner){var c=this,h=a.clientY,w=function(M){h=M.clientY},y=function(){clearInterval(x)},m=a.clientY,d=this.thumbTop,C=function(){if(h!==void 0){var M=c.scrollTopFromThumbTop(d+h-m);M!==c.scrollTop&&c._emit("scroll",{data:M})}};s.capture(this.inner,w,y);var x=setInterval(C,20);return s.preventDefault(a)}var A=a.clientY-this.element.getBoundingClientRect().top-this.thumbHe
254ight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(A)}),s.preventDefault(a)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(o){var a=o*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return a=a>>0,a<0?a=0:a>this.pageHeight-this.viewHeight&&(a=this.pageHeight-this.viewHeight),a},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(o){this.height=Math.max(0,o),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(o,a){this.pageHeight===o&&!a||(this.pageHeight=o,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},e.prototype.setScrollTop=function(o){this.scrollTop=o,o<0&&(o=0),this.thumbTop=o*(this.slideHeight-this.thumbHe
254ight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e}(t);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var n=function(r){v(e,r);function e(o,a){var c=r.call(this,o,"-h")||this;return c.scrollLeft=0,c.scrollWidth=0,c.height=c.HScrollHeight,c.inner.style.height=c.element.style.height=(c.height||12)+"px",c.renderer=a,c}return e.prototype.onMouseDown=function(o,a){if(o==="mousedown"&&!(s.getButton(a)!==0||a.detail===2)){if(a.target===this.inner){var c=this,h=a.clientX,w=function(M){h=M.clientX},y=function(){clearInterval(x)},m=a.clientX,d=this.thumbLeft,C=function(){if(h!==void 0){var M=c.scrollLeftFromThumbLeft(d+h-m);M!==c.scrollLeft&&c._emit("scroll",{data:M})}};s.capture(this.inner,w,y);var x=setInterval(C,20);return s.preventDefault(a)}var A=a.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(A)}),s.preventDefault(a)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(o){var a=o*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return a=a>>0,a<0?a=0:a>this.pageWidth-this.viewWidth&&(a=this.pageWidth-this.viewWidth),a},e.prototype.setWidth=function(o){this.width=Math.max(0,o),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(o,a){this.pageWidth===o&&!a||(this.pageWidth=o,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},e.prototype.setScrollLeft=function(o){this.scrollLeft=o,o<0&&(o=0),this.thumbLeft=o*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e}(t);n.prototype.setInnerWidth=n.prototype.setScrollWidth,E.ScrollBar=i,E.ScrollBarV=i,E.ScrollBarH=n,E.VScrollBar=i,E.HScrollBar=n}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(L,E,I){var v=L("./lib/event"),p=function(){function f(s,l){this.onRender=s,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=l||window;var t=this;this._flush=function(i){t.pending=!1;var n=t.changes;if(n&&(v.blockIdle(100),t.changes=0,t.onRender(n)),t.changes){if(t.$recursionLimit--<0)return;t.schedule()}else t.$recursionLimit=2}}return f.prototype.schedule=function(s){this.changes=this.changes|s,this.changes&&!this.pending&&(v.nextFrame(this._flush),this.pending=!0)},f.prototype.clear=function(s){var l=this.changes;return this.changes=0,l},f}();E.RenderLoop=p}),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(L,E,I){var v=L("../lib/oop"),p=L("../lib/dom"),f=L("../lib/lang"),s=L("../lib/event"),l=L("../lib/useragent"),t=L("../lib/event_emitter").EventEmitter,i=512,n=typeof ResizeObserver=="function",r=200,e=function(){function o(a){this.el=p.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=p.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=p.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),a.appendChild(this.el),this.$measureNode.textContent=f.stringRepeat("X",i),this.$characterSize={width:0,height:0},n?this.$addObserver():this.checkForSizeChanges()}return o.prototype.$setMeasureNodeStyles=function(a,c){a.width=a.height="auto",a.left=a.top="0px",a.visibility="hidden",a.position="absolute",a.whiteSpace="pre",l.isIE<8?a["font-family"]="inherit":a.font="inherit",a.overflow=c?"hidden":"visible"},o.prototype.checkForSizeChanges=function(a){if(a===void 0&&(a=this.$measureSizes()),a&&(this.$characterSize.width!==a.width||this.$characterSize.height!==a.height)){this.$measureNode.style.fontWeight="bold";var c=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=a,this.charSizes=Object.create(null),this.allowBoldFonts=c&&c.width===a.width&&c.height===a.height,this._emit("changeCharacterSize",{data:a})}},o.prototype.$addObserver=function(){var a=this;this.$observer=new window.ResizeObserver(function(c){a.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},o.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var a=this;return this.$pollSizeChangesTimer=s.onIdle(function c(){a.checkForSizeChanges(),s.onIdle(c,500)},500)},o.prototype.setPolling=function(a){a?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},o.prototype.$measureSizes=function(a){var c={height:(a||this.$measureNode).clientHeight,width:(a||this.$measureNode).clientWidth/i};return c.width===0||c.height===0?null:c},o.prototype.$measureCharWidth=function(a){this.$main.textContent=f.stringRepeat(a,i);var c=this.$main.getBoundingClientRect();return c.width/i},o.prototype.getCharacterWidth=function(a){var c=this.charSizes[a];return c===void 0&&(c=this.charSizes[a]=this.$measureCharWidth(a)/this.$characterSize.width),c},o.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},o.prototype.$getZoom=function(a){return!a||!a.parentElement?1:(Number(window.getComputedStyle(a).zoom)||1)*this.$getZoom(a.parentElement)},o.prototype.$initTransformMeasureNodes=function(){var a=function(c,h){return["div",{style:"position: absolute;top:"+c+"px;left:"+h+"px;"}]};this.els=p.buildDom([a(0,0),a(r,0),a(0,r),a(r,r)],this.el)},o.prototype.transformCoordinates=function(a,c){if(a){var h=this.$getZoom(this.el);a=d(1/h,a)}
vendor: 4,462 bytes, lines 254-380
254function w(D,O,P){var N=D[1]*O[0]-D[0]*O[1];return[(-O[1]*P[0]+O[0]*P[1])/N,(+D[1]*P[0]-D[0]*P[1])/N]}function y(D,O){return[D[0]-O[0],D[1]-O[1]]}function m(D,O){return[D[0]+O[0],D[1]+O[1]]}function d(D,O){return[D*O[0],D*O[1]]}this.els||this.$initTransformMeasureNodes();function C(D){var O=D.getBoundingClientRect();return[O.left,O.top]}var x=C(this.els[0]),A=C(this.els[1]),M=C(this.els[2]),_=C(this.els[3]),S=w(y(_,A),y(_,M),y(m(A,M),m(_,x))),$=d(1+S[0],y(A,x)),g=d(1+S[1],y(M,x));if(c){var u=c,b=S[0]*u[0]/r+S[1]*u[1]/r+1,k=m(d(u[0],$),d(u[1],g));return m(d(1/b/r,k),x)}var T=y(a,x),R=w(y($,d(S[0],T)),y(g,d(S[1],T)),T);return d(r,R)},o}();e.prototype.$characterSize={width:0,height:0},v.implement(e.prototype,t),E.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(L,E,I){I.exports=` 255.ace_br1 {border-top-left-radius : 3px;} 256.ace_br2 {border-top-right-radius : 3px;} 257.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;} 258.ace_br4 {border-bottom-right-radius: 3px;} 259.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;} 260.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;} 261.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;} 262.ace_br8 {border-bottom-left-radius : 3px;} 263.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;} 264.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;} 265.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;} 266.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} 267.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} 268.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} 269.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} 270 271 272.ace_editor { 273 position: relative; 274 overflow: hidden; 275 padding: 0; 276 font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace; 277 direction: ltr; 278 text-align: left; 279 -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 280 forced-color-adjust: none; 281} 282 283.ace_scroller { 284 position: absolute; 285 overflow: hidden; 286 top: 0; 287 bottom: 0; 288 background-color: inherit; 289 -ms-user-select: none; 290 -moz-user-select: none; 291 -webkit-user-select: none; 292 user-select: none; 293 cursor: text; 294} 295 296.ace_content { 297 position: absolute; 298 box-sizing: border-box; 299 min-width: 100%; 300 contain: style size layout; 301 font-variant-ligatures: no-common-ligatures; 302} 303.ace_invisible { 304 font-variant-ligatures: none; 305} 306 307.ace_keyboard-focus:focus { 308 box-shadow: inset 0 0 0 2px #5E9ED6; 309 outline: none; 310} 311 312.ace_dragging .ace_scroller:before{ 313 position: absolute; 314 top: 0; 315 left: 0; 316 right: 0; 317 bottom: 0; 318 content: ''; 319 background: rgba(250, 250, 250, 0.01); 320 z-index: 1000; 321} 322.ace_dragging.ace_dark .ace_scroller:before{ 323 background: rgba(0, 0, 0, 0.01); 324} 325 326.ace_gutter { 327 position: absolute; 328 overflow : hidden; 329 width: auto; 330 top: 0; 331 bottom: 0; 332 left: 0; 333 cursor: default; 334 z-index: 4; 335 -ms-user-select: none; 336 -moz-user-select: none; 337 -webkit-user-select: none; 338 user-select: none; 339 contain: style size layout; 340} 341 342.ace_gutter-active-line { 343 position: absolute; 344 left: 0; 345 right: 0; 346} 347 348.ace_scroller.ace_scroll-left:after { 349 content: ""; 350 position: absolute; 351 top: 0; 352 right: 0; 353 bottom: 0; 354 left: 0; 355 box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset; 356 pointer-events: none; 357} 358 359.ace_gutter-cell, .ace_gutter-cell_svg-icons { 360 position: absolute; 361 top: 0; 362 left: 0; 363 right: 0; 364 padding-left: 19px; 365 padding-right: 6px; 366 background-repeat: no-repeat; 367} 368 369.ace_gutter-cell_svg-icons .ace_gutter_annotation { 370 margin-left: -14px; 371 float: left; 372} 373 374.ace_gutter-cell .ace_gutter_annotation { 375 margin-left: -19px; 376 float: left; 377} 378 379.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 { 380 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////
380////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg=="); 381 background-repeat: no-repeat; 382 background-position: 2px center; 383} 384 385.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold { 386 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=="); 387 background-repeat: no-repeat; 388 background-position: 2px center; 389} 390 391.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint { 392 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII="); 393 background-repeat: no-repeat; 394 background-position: 2px center; 395} 396 397.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 { 398 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC"); 399} 400 401.ace_icon_svg.ace_error { 402 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+"); 403 background-color: crimson; 404} 405.ace_icon_svg.ace_security { 406 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+"); 407 background-color: crimson; 408} 409.ace_icon_svg.ace_warning { 410 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg=="); 411 background-color: darkorange; 412} 413.ace_icon_svg.ace_info { 414 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGx
414pbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg=="); 415 background-color: royalblue; 416} 417.ace_icon_svg.ace_hint { 418 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg=="); 419 background-color: silver; 420} 421 422.ace_icon_svg.ace_error_fold { 423 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); 424 background-color: crimson; 425} 426.ace_icon_svg.ace_security_fold { 427 -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyM
427DUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); 428 background-color: crimson; 429} 430.ace_icon_svg.ace_warning_fold { 431 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4="); 432 background-color: darkorange; 433} 434 435.ace_scrollbar { 436 contain: strict; 437 position: absolute; 438 right: 0; 439 bottom: 0; 440 z-index: 6; 441} 442 443.ace_scrollbar-inner { 444 position: absolute; 445 cursor: text; 446 left: 0; 447 top: 0; 448} 449 450.ace_scrollbar-v{ 451 overflow-x: hidden; 452 overflow-y: scroll; 453 top: 0; 454} 455 456.ace_scrollbar-h { 457 overflow-x: scroll; 458 overflow-y: hidden; 459 left: 0; 460} 461 462.ace_print-margin { 463 position: absolute; 464 height: 100%; 465} 466 467.ace_text-input { 468 position: absolute; 469 z-index: 0; 470 width: 0.5em; 471 height: 1em; 472 opacity: 0; 473 background: transparent; 474 -moz-appearance: none; 475 appearance: none; 476 border: none; 477 resize: none; 478 outline: none; 479 overflow: hidden; 480 font: inherit; 481 padding: 0 1px; 482 margin: 0 -1px; 483 contain: strict; 484 -ms-user-select: text; 485 -moz-user-select: text; 486 -webkit-user-select: text; 487 user-select: text; 488 /*with \`pre-line\` chrome inserts instead of space*/ 489 white-space: pre!important; 490} 491.ace_text-input.ace_composition { 492 background: transparent; 493 color: inherit; 494 z-index: 1000; 495 opacity: 1; 496} 497.ace_composition_placeholder { color: transparent } 498.ace_composition_marker { 499 border-bottom: 1px solid; 500 position: absolute; 501 border-radius: 0;
502 margin-top: 1px; 503} 504 505[ace_nocontext=true] { 506 transform: none!important; 507 filter: none!important; 508 clip-path: none!important; 509 mask : none!important; 510 contain: none!important; 511 perspective: none!important; 512 mix-blend-mode: initial!important; 513 z-index: auto; 514} 515 516.ace_layer { 517 z-index: 1; 518 position: absolute; 519 overflow: hidden; 520 /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/ 521 word-wrap: normal; 522 white-space: pre; 523 height: 100%; 524 width: 100%; 525 box-sizing: border-box; 526 /* setting pointer-events: auto; on node under the mouse, which changes 527 during scroll, will break mouse wheel scrolling in Safari */ 528 pointer-events: none; 529} 530 531.ace_gutter-layer { 532 position: relative; 533 width: auto; 534 text-align: right; 535 pointer-events: auto; 536 height: 1000000px; 537 contain: style size layout; 538} 539 540.ace_text-layer { 541 font: inherit !important; 542 position: absolute; 543 height: 1000000px; 544 width: 1000000px; 545 contain: style size layout; 546} 547 548.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group { 549 contain: style size layout; 550 position: absolute; 551 top: 0; 552 left: 0; 553 right: 0; 554} 555 556.ace_hidpi .ace_text-layer, 557.ace_hidpi .ace_gutter-layer, 558.ace_hidpi .ace_content, 559.ace_hidpi .ace_gutter { 560 contain: strict; 561} 562.ace_hidpi .ace_text-layer > .ace_line, 563.ace_hidpi .ace_text-layer > .ace_line_group { 564 contain: strict; 565} 566 567.ace_cjk { 568 display: inline-block; 569 text-align: center; 570} 571 572.ace_cursor-layer { 573 z-index: 4; 574} 575 576.ace_cursor { 577 z-index: 4; 578 position: absolute; 579 box-sizing: border-box; 580 border-left: 2px solid; 581 /* workaround for smooth cursor repaintng whole screen in chrome */ 582 transform: translatez(0); 583} 584 585.ace_multiselect .ace_cursor { 586 border-left-width: 1px; 587} 588 589.ace_slim-cursors .ace_cursor { 590 border-left-width: 1px; 591} 592 593.ace_overwrite-cursors .ace_cursor { 594 border-left-width: 0; 595 border-bottom: 1px solid; 596} 597 598.ace_hidden-cursors .ace_cursor { 599 opacity: 0.2; 600} 601 602.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor { 603 opacity: 0; 604} 605 606.ace_smooth-blinking .ace_cursor { 607 transition: opacity 0.18s; 608} 609 610.ace_animate-blinking .ace_cursor { 611 animation-duration: 1000ms; 612 animation-timing-function: step-end; 613 animation-name: blink-ace-animate; 614 animation-iteration-count: infinite; 615} 616 617.ace_animate-blinking.ace_smooth-blinking .ace_cursor { 618 animation-duration: 1000ms; 619 animation-timing-function: ease-in-out; 620 animation-name: blink-ace-animate-smooth; 621} 622 623@keyframes blink-ace-animate { 624 from, to { opacity: 1; } 625 60% { opacity: 0; } 626} 627 628@keyframes blink-ace-animate-smooth { 629 from, to { opacity: 1; } 630 45% { opacity: 1; } 631 60% { opacity: 0; } 632 85% { opacity: 0; } 633} 634 635.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack { 636 position: absolute; 637 z-index: 3; 638} 639 640.ace_marker-layer .ace_selection { 641 position: absolute; 642 z-index: 5; 643} 644 645.ace_marker-layer .ace_bracket { 646 position: absolute; 647 z-index: 6; 648} 649 650.ace_marker-layer .ace_error_bracket { 651 position: absolute; 652 border-bottom: 1px solid #DE5555; 653 border-radius: 0; 654} 655 656.ace_marker-layer .ace_active-line { 657 position: absolute; 658 z-index: 2; 659} 660 661.ace_marker-layer .ace_selected-word { 662 position: absolute; 663 z-index: 4; 664 box-sizing: border-box; 665} 666 667.ace_line .ace_fold { 668 box-sizing: border-box; 669 670 display: inline-block; 671 height: 11px; 672 margin-top: -2px; 673 vertical-align: middle; 674 675 background-image: 676 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), 677 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII="); 678 background-repeat: no-repeat, repeat-x; 679 background-position: center center, top left; 680 color: transparent; 681 682 border: 1px solid black; 683 border-radius: 2px; 684 685 cursor: pointer; 686 pointer-events: auto; 687} 688 689.ace_dark .ace_fold { 690} 691 692.ace_fold:hover{ 693 background-image: 694 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), 695 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC"); 696} 697 698.ace_tooltip { 699 background-color: #f5f5f5; 700 border: 1px solid gray; 701 border-radius: 1px; 702 box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); 703 color: black; 704 padding: 3px 4px; 705 position: fixed; 706 z-index: 999999; 707 box-sizing: border-box; 708 cursor: default; 709 white-space: pre-wrap; 710 word-wrap: break-word; 711 line-height: normal; 712 font-style: normal; 713 font-weight: normal; 714 letter-spacing: normal; 715 pointer-events: none; 716 overflow: auto; 717 max-width: min(33em, 66vw); 718 overscroll-behavior: contain; 719} 720.ace_tooltip pre { 721 white-space: pre-wrap; 722} 723 724.ace_tooltip.ace_dark { 725 background-color: #636363; 726 color: #fff; 727} 728 729.ace_tooltip:focus { 730 outline: 1px solid #5E9ED6; 731} 732 733.ace_icon { 734 display: inline-block; 735 width: 18px; 736 vertical-align: top; 737} 738 739.ace_icon_svg { 740 display: inline-block; 741 width: 12px; 742 vertical-align: top; 743 -webkit-mask-repeat: no-repeat; 744 -webkit-mask-size: 12px; 745 -webkit-mask-position: center; 746} 747 748.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons { 749 padding-right: 13px; 750} 751 752.ace_fold-widget, .ace_custom-widget { 753 box-sizing: border-box; 754 755 margin: 0 -12px 0 1px; 756 display: none; 757 width: 11px; 758 vertical-align: top; 759 760 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVo
760DBUxKAAAAABJRU5ErkJggg=="); 761 background-repeat: no-repeat; 762 background-position: center; 763 764 border-radius: 3px; 765 766 border: 1px solid transparent; 767 cursor: pointer; 768 pointer-events: auto; 769} 770 771.ace_custom-widget { 772 background: none; 773} 774 775.ace_folding-enabled .ace_fold-widget { 776 display: inline-block; 777} 778 779.ace_fold-widget.ace_end { 780 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg=="); 781} 782 783.ace_fold-widget.ace_closed { 784 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA=="); 785} 786 787.ace_fold-widget:hover { 788 border: 1px solid rgba(0, 0, 0, 0.3); 789 background-color: rgba(255, 255, 255, 0.2); 790 box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); 791} 792 793.ace_fold-widget:active { 794 border: 1px solid rgba(0, 0, 0, 0.4); 795 background-color: rgba(0, 0, 0, 0.05); 796 box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); 797} 798/** 799 * Dark version for fold widgets 800 */ 801.ace_dark .ace_fold-widget { 802 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC"); 803} 804.ace_dark .ace_fold-widget.ace_end { 805 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg=="); 806} 807.ace_dark .ace_fold-widget.ace_closed { 808 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg=="); 809} 810.ace_dark .ace_fold-widget:hover { 811 box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); 812 background-color: rgba(255, 255, 255, 0.1); 813} 814.ace_dark .ace_fold-widget:active { 815 box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); 816} 817 818.ace_inline_button { 819 border: 1px solid lightgray; 820 display: inline-block; 821 margin: -1px 8px; 822 padding: 0 5px; 823 pointer-events: auto; 824 cursor: pointer; 825} 826.ace_inline_button:hover { 827 border-color: gray; 828 background: rgba(200,200,200,0.2); 829 display: inline-block; 830 pointer-events: auto; 831} 832 833.ace_fold-widget.ace_invalid { 834 background-color: #FFB4B4; 835 border-color: #DE5555; 836} 837 838.ace_fade-fold-widgets .ace_fold-widget { 839 transition: opacity 0.4s ease 0.05s; 840 opacity: 0; 841} 842 843.ace_fade-fold-widgets:hover .ace_fold-widget { 844 transition: opacity 0.05s ease 0.05s; 845 opacity:1; 846} 847 848.ace_underline { 849 text-decoration: underline; 850} 851 852.ace_bold { 853 font-weight: bold; 854} 855 856.ace_nobold .ace_bold { 857 font-weight: normal; 858} 859 860.ace_italic { 861 font-style: italic; 862} 863 864 865.ace_error-marker { 866 background-color: rgba(255, 0, 0,0.2); 867 position: absolute; 868 z-index: 9; 869} 870 871.ace_highlight-marker { 872 background-color: rgba(255, 255, 0,0.2); 873 position: absolute; 874 z-index: 8; 875} 876 877.ace_mobile-menu { 878 position: absolute; 879 line-height: 1.5; 880 border-radius: 4px; 881 -ms-user-select: none; 882 -moz-user-select: none; 883 -webkit-user-select: none; 884 user-select: none; 885 background: white; 886 box-shadow: 1px 3px 2px grey; 887 border: 1px solid #dcdcdc; 888 color: black; 889} 890.ace_dark > .ace_mobile-menu { 891 background: #333; 892 color: #ccc; 893 box-shadow: 1px 3px 2px grey; 894 border: 1px solid #444; 895 896} 897.ace_mobile-button { 898 padding: 2px; 899 cursor: pointer; 900 overflow: hidden; 901} 902.ace_mobile-button:hover { 903 background-color: #eee; 904 opacity:1; 905} 906.ace_mobile-button:active { 907 background-color: #ddd; 908} 909 910.ace_placeholder { 911 position: relative; 912 font-family: arial; 913 transform: scale(0.9); 914 transform-origin: left; 915 white-space: pre; 916 opacity: 0.7; 917 margin: 0 10px; 918 z-index: 1; 919} 920 921.ace_ghost_text { 922 opacity: 0.5; 923 font-style: italic; 924} 925 926.ace_ghost_text_container > div { 927 white-space: pre; 928} 929 930.ghost_text_line_wrapped::after { 931 content: "↩"; 932 position: absolute; 933} 934 935.ace_lineWidgetContainer.ace_ghost_text { 936 margin: 0px 4px 937} 938 939.ace_screenreader-only { 940 position:absolute; 941 left:-10000px; 942 top:auto; 943 width:1px; 944 height:1px; 945 overflow:hidden; 946} 947 948.ace_hidden_token { 949 display: none; 950}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(L,E,I){var v=L("../lib/dom"),p=L("../lib/oop"),f=L("../lib/event_emitter").EventEmitter,s=function(){function l(t,i){this.renderer=i,this.pixelRatio=1,this.maxHeight=i.layerConfig.maxHeight,this.lineHeight=i.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(t)}return l.prototype.$createCanvas=function(){this.canvas=v.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(t){this.$createCanvas(),this.scrollbarV=t,t.element.appendChild(this.canvas),this.setDimensions()},l.prototype.$updateDecorators=function(t){if(typeof this.canvas.getContext!="function")return;var i=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(t);var n=this.canvas.getContext("2d");function r($,g){return $.priority<g.priority?-1:$.priority>g.priority?1:0}var e=this.renderer.session.$annotations;if(n.clearRect(0,0,this.canvas.width,this.canvas.height),e){var o={info:1,warning:2,error:3};e.forEach(function($){$.priority=o[$.type]||null}),e=e.sort(r);for(var a=0;a<e.length;a++){var c=e[a].row,h=this.getVerticalOffsetForRow(c),w=h+this.lineHeight,y=Math.round(this.heightRatio*h),m=Math.round(this.heightRatio*w),d=Math.round((y+m)/2),C=m-d;C<this.halfMinDecorationHeight&&(C=this.halfMinDecorationHeight),d-C<0&&(d=C),d+C>this.canvasHeight&&(d=this.canvasHeight-C);var x=d-C,A=d+C,M=A-x;
950n.fillStyle=i[e[a].type]||null,n.fillRect(0,x,Math.round(this.oneZoneWidth-1),M)}}var _=this.renderer.session.selection.getCursor();if(_){var S=Math.round(this.getVerticalOffsetForRow(_.row)*this.heightRatio);n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,S,this.canvasWidth,2)}},l.prototype.getVerticalOffsetForRow=function(t){t=t|0;var i=this.renderer.session.documentToScreenRow(t,0)*this.lineHeight;return i},l.prototype.setDimensions=function(t){t=t||this.renderer.layerConfig,this.maxHeight=t.maxHeight,this.lineHeight=t.lineHeight,this.canvasHeight=t.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}();p.implement(s.prototype,f),E.Decorator=s}),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(L,E,I){var v=L("./lib/oop"),p=L("./lib/dom"),f=L("./lib/lang"),s=L("./config"),l=L("./layer/gutter").Gutter,t=L("./layer/marker").Marker,i=L("./layer/text").Text,n=L("./layer/cursor").Cursor,r=L("./scrollbar").HScrollBar,e=L("./scrollbar").VScrollBar,o=L("./scrollbar_custom").HScrollBar,a=L("./scrollbar_custom").VScrollBar,c=L("./renderloop").Ren
vendor: 4,689 bytes, line 950
950derLoop,h=L("./layer/font_metrics").FontMetrics,w=L("./lib/event_emitter").EventEmitter,y=L("./css/editor-css"),m=L("./layer/decorators").Decorator,d=L("./lib/useragent"),C=L("./layer/text_util").isTextToken;p.importCssString(y,"ace_editor.css",!1);var x=function(){function A(M,_){var S=this;this.container=M||p.createElement("div"),p.addCssClass(this.container,"ace_editor"),p.HI_DPI&&p.addCssClass(this.container,"ace_hidpi"),this.setTheme(_),s.get("useStrictCSP")==null&&s.set("useStrictCSP",!1),this.$gutter=p.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=p.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=p.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 t(this.content);var $=this.$textLayer=new i(this.content);this.canvas=$.element,this.$markerFront=new t(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 r(this.container,this),this.scrollBarV.on("scroll",function(g){S.$scrollAnimation||S.session.setScrollTop(g.data-S.scrollMargin.top)}),this.scrollBarH.on("scroll",function(g){S.$scrollAnimation||S.session.setScrollLeft(g.data-S.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new h(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(g){S.updateCharacterSize(),S.onResize(!0,S.gutterWidth,S.$size.width,S.$size.height),S._signal("changeCharacterSize",g)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!d.isIOS,this.$loop=new c(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),s.resetOptions(this),s._signal("renderer",this)}return A.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),p.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},A.prototype.setSession=function(M){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=M,M&&this.scrollMargin.top&&M.getScrollTop()<=0&&M.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(M),this.$markerBack.setSession(M),this.$markerFront.setSession(M),this.$gutterLayer.setSession(M),this.$textLayer.setSession(M),M&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},A.prototype.updateLines=function(M,_,S){if(_===void 0&&(_=1/0),this.$changedLines?(this.$changedLines.firstRow>M&&(this.$changedLines.firstRow=M),this.$changedLines.lastRow<_&&(this.$changedLines.lastRow=_)):this.$changedLines={firstRow:M,lastRow:_},this.$changedLines.lastRow<this.layerConfig.firstRow)if(S)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},A.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},A.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},A.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},A.prototype.updateFull=function(M){M?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},A.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()}
950,A.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},A.prototype.onResize=function(M,_,S,$){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=M?1:0;var g=this.container;$||($=g.clientHeight||g.scrollHeight),!$&&this.$maxLines&&this.lineHeight>1&&(!g.style.height||g.style.height=="0px")&&(g.style.height="1px",$=g.clientHeight||g.scrollHeight),S||(S=g.clientWidth||g.scrollWidth);var u=this.$updateCachedSize(M,_,S,$);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!S&&!$)return this.resizing=0;M&&(this.$gutterLayer.$padding=null),M?this.$renderChanges(u|this.$changes,!0):this.$loop.schedule(u|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},A.prototype.$updateCachedSize=function(M,_,S,$){$-=this.$extraHeight||0;var g=0,u=this.$size,b={width:u.width,height:u.height,scrollerHeight:u.scrollerHeight,scrollerWidth:u.scrollerWidth};if($&&(M||u.height!=$)&&(u.height=$,g|=this.CHANGE_SIZE,u.scrollerHeight=u.height,this.$horizScroll&&(u.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(u.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",g=g|this.CHANGE_SCROLL),S&&(M||u.width!=S)){g|=this.CHANGE_SIZE,u.width=S,_==null&&(_=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=_,p.setStyle(this.scrollBarH.element.style,"left",_+"px"),p.setStyle(this.scroller.style,"left",_+this.margin.left+"px"),u.scrollerWidth=Math.max(0,S-_-this.scrollBarV.getWidth()-this.margin.h),p.setStyle(this.$gutter.style,"left",this.margin.left+"px");var k=this.scrollBarV.getWidth()+"px";p.setStyle(this.scrollBarH.element.style,"right",k),p.setStyle(this.scroller.style,"right",k),p.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(u.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||M)&&(g|=this.CHANGE_FULL)}return u.$dirty=!S||!$,g&&this._signal("resize",b),g},A.prototype.onGutterResize=function(M){var _=this.$showGutter?M:0;_!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,_,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},A.prototype.adjustWrapLimit=function(){var M=this.$size.scrollerWidth-this.$padding*2,_=Math.floor(M/this.characterWidth);return this.session.adjustWrapLimit(_,this.$showPrintMargin&&this.$printMarginColumn)},A.prototype.setAnimatedScroll=function(M){this.setOption("animatedScroll",M)},A.prototype.getAnimatedScroll=function(){return this.$animatedScroll},A.prototype.setShowInvisibles=function(M){this.setOption("showInvisibles",M),this.session.$bidiHandler.setShowInvisibles(M)},A.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},A.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},A.prototype.setDisplayIndentGuides=function(M){this.setOption("displayIndentGuides",M)},A.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},A.prototype.setHighlightIndentGuides=function(M){this.setOption("highlightIndentGuides",M)},A.prototype.setShowPrintMargin=function(M){this.setOption("showPrintMargin",M)},A.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},A.prototype.setPrintMarginColumn=function(M){this.setOption("printMarginColumn",M)},A.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},A.prototype.getShowGutter=function(){return this.getOption("showGutter")},A.prototype.setShowGutter=function(M){return this.setOption("showGutter",M)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.setFadeFoldWidgets=function(M){this.setOption("fadeFoldWidgets",M)},A.prototype.setHighlightGutterLine=function(M){this.setOption("highlightGutterLine",M)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var M=p.createElement("div");M.className="ace_layer ace_print-margin-layer",this.$printMarginEl=p.createElement("div"),this.$printMarginEl.className="ace_print-margin",M.appendChild(this.$printMarginEl),this.content.insertBefore(M,this.content.firstChild)}var _=this.$printMarginEl.style;_.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",_.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},A.prototype.getContainerElement=function(){return this.container},A.prototype.getMouseEventTarget=function(){return this.scroller},A.prototype.getTextAreaContainer=function(){return this.container},A.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var M=this.textarea.style,_=this.$composition;
950if(!this.$keepTextAreaAtCursor&&!_){p.translate(this.textarea,-100,0);return}var S=this.$cursorLayer.$pixelPos;if(S){_&&_.markerRange&&(S=this.$cursorLayer.getPixelPosition(_.markerRange.start,!0));var $=this.layerConfig,g=S.top,u=S.left;g-=$.offset;var b=_&&_.useTextareaForIME||d.isMobile?this.lineHeight:1;if(g<0||g>$.height-b){p.translate(this.textarea,0,0);return}var k=1,T=this.$size.height-b;if(!_)g+=this.lineHeight;else if(_.useTextareaForIME){var R=this.textarea.value;k=this.characterWidth*this.session.$getStringScreenWidth(R)[0]}else g+=this.lineHeight+2;u-=this.scrollLeft,u>this.$size.scrollerWidth-k&&(u=this.$size.scrollerWidth-k),u+=this.gutterWidth+this.margin.left,p.setStyle(M,"height",b+"px"),p.setStyle(M,"width",k+"px"),p.translate(this.textarea,Math.min(u,this.$size.scrollerWidth-k),Math.min(g,T))}}},A.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},A.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},A.prototype.getLastFullyVisibleRow=function(){var M=this.layerConfig,_=M.lastRow,S=this.session.documentToScreenRow(_,0)*M.lineHeight;return S-this.session.getScrollTop()>M.height-M.lineHeight?_-1:_},A.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},A.prototype.setPadding=function(M){this.$padding=M,this.$textLayer.setPadding(M),this.$cursorLayer.setPadding(M),this.$markerFront.setPadding(M),this.$markerBack.setPadding(M),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},A.prototype.setScrollMargin=function(M,_,S,$){var g=this.scrollMargin;g.top=M|0,g.bottom=_|0,g.right=$|0,g.left=S|0,g.v=g.top+g.bottom,g.h=g.left+g.right,g.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-g.top),this.updateFull()},A.prototype.setMargin=function(M,_,S,$){var g=this.margin;g.top=M|0,g.bottom=_|0,g.right=$|0,g.left=S|0,g.v=g.top+g.bottom,g.h=g.left+g.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},A.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},A.prototype.setHScrollBarAlwaysVisible=function(M){this.setOption("hScrollBarAlwaysVisible",M)},A.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},A.prototype.setVScrollBarAlwaysVisible=function(M){this.setOption("vScrollBarAlwaysVisible",M)},A.prototype.$updateScrollBarV=function(){var M=this.layerConfig.maxHeight,_=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(M-=(_-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>M-_&&(M=this.scrollTop+_,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(M+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},A.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},A.prototype.freeze=function(){this.$frozen=!0},A.prototype.unfreeze=function(){this.$frozen=!1},A.prototype.$renderChanges=function(M,_){if(this.$changes&&(M|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!M&&!_){this.$changes|=M;return}if(this.$size.$dirty)return this.$changes|=M,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",M),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var S=this.layerConfig;if(M&this.CHANGE_FULL||M&this.CHANGE_SIZE||M&this.CHANGE_TEXT||M&this.CHANGE_LINES||M&this.CHANGE_SCROLL||M&this.CHANGE_H_SCROLL){if(M|=this.$computeLayerConfig()|this.$loop.clear(),S.firstRow!=this.layerConfig.firstRow&&S.firstRowScreen==this.layerConfig.firstRowScreen){var $=this.scrollTop+(S.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;$>0&&(this.scrollTop=$,M=M|this.CHANGE_SCROLL,M|=this.$computeLayerConfig()|this.$loop.clear())}S=this.layerConfig,this.$updateScrollBarV(),M&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),p.translate(this.content,-this.scrollLeft,-S.offset);var g=S.width+2*this.$padding+"px",u=S.minHeight+"px";p.setStyle(this.content.style,"width",g),p.setStyle(this.content.style,"height",u)}if(M&this.CHANGE_H_SCROLL&&(p.translate(this.content,-this.scrollLeft,-S.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),M&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(S),this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S),this.$markerBack.update(S),this.$markerFront.update(S),this.$curs
950orLayer.update(S),this.$moveTextAreaToCursor(),this._signal("afterRender",M);return}if(M&this.CHANGE_SCROLL){this.$changedLines=null,M&this.CHANGE_TEXT||M&this.CHANGE_LINES?this.$textLayer.update(S):this.$textLayer.scrollLines(S),this.$showGutter&&(M&this.CHANGE_GUTTER||M&this.CHANGE_LINES?this.$gutterLayer.update(S):this.$gutterLayer.scrollLines(S)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S),this.$markerBack.update(S),this.$markerFront.update(S),this.$cursorLayer.update(S),this.$moveTextAreaToCursor(),this._signal("afterRender",M);return}M&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(S),this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):M&this.CHANGE_LINES?((this.$updateLines()||M&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):M&this.CHANGE_TEXT||M&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)):M&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(S),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(S)),M&this.CHANGE_CURSOR&&(this.$cursorLayer.update(S),this.$moveTextAreaToCursor()),M&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(S),M&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(S),this._signal("afterRender",M)},A.prototype.$autosize=function(){var M=this.session.getScreenLength()*this.lineHeight,_=this.$maxLines*this.lineHeight,S=Math.min(_,Math.max((this.$minLines||1)*this.lineHeight,M))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(S+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&S>this.$maxPixelHeight&&(S=this.$maxPixelHeight);var $=S<=2*this.lineHeight,g=!$&&M>_;if(S!=this.desiredHeight||this.$size.height!=this.desiredHeight||g!=this.$vScroll){g!=this.$vScroll&&(this.$vScroll=g,this.scrollBarV.setVisible(g));var u=this.container.clientWidth;this.container.style.height=S+"px",this.$updateCachedSize(!0,this.$gutterWidth,u,S),this.desiredHeight=S,this._signal("autosize")}},A.prototype.$computeLayerConfig=function(){var M=this.session,_=this.$size,S=_.height<=2*this.lineHeight,$=this.session.getScreenLength(),g=$*this.lineHeight,u=this.$getLongestLine(),b=!S&&(this.$hScrollBarAlwaysVisible||_.scrollerWidth-u-2*this.$padding<0),k=this.$horizScroll!==b;k&&(this.$horizScroll=b,this.scrollBarH.setVisible(b));var T=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),S=_.height<=2*this.lineHeight);var R=_.scrollerHeight+this.lineHeight,D=!this.$maxLines&&this.$scrollPastEnd?(_.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;g+=D;var O=this.scrollMargin;this.session.setScrollTop(Math.max(-O.top,Math.min(this.scrollTop,g-_.scrollerHeight+O.bottom))),this.session.setScrollLeft(Math.max(-O.left,Math.min(this.scrollLeft,u+2*this.$padding-_.scrollerWidth+O.right)));var P=!S&&(this.$vScrollBarAlwaysVisible||_.scrollerHeight-g+D<0||this.scrollTop>O.top),N=T!==P;N&&(this.$vScroll=P,this.scrollBarV.setVisible(P));var F=this.scrollTop%this.lineHeight,W=Math.ceil(R/this.lineHeight)-1,B=Math.max(0,Math.round((this.scrollTop-F)/this.lineHeight)),H=B+W,U,K,V=this.lineHeight;B=M.screenToDocumentRow(B,0);var J=M.getFoldLine(B);J&&(B=J.start.row),U=M.documentToScreenRow(B,0),K=M.getRowLength(B)*V,H=Math.min(M.screenToDocumentRow(H,0),M.getLength()-1),R=_.scrollerHeight+M.getRowLength(H)*V+K,F=this.scrollTop-U*V,F<0&&U>0&&(U=Math.max(0,U+Math.floor(F/V)),F=this.scrollTop-U*V);var te=0;return(this.layerConfig.width!=u||k)&&(te=this.CHANGE_H_SCROLL),(k||N)&&(te|=this.$updateCachedSize(!0,this.gutterWidth,_.width,_.height),this._signal("scrollbarVisibilityChanged"),N&&(u=this.$getLongestLine())),this.layerConfig={width:u,padding:this.$padding,firstRow:B,firstRowScreen:U,lastRow:H,lineHeight:V,characterWidth:this.characterWidth,minHeight:R,maxHeight:g,offset:F,gutterOffset:V?Math.max(0,Math.ceil((F+_.height-_.scrollerHeight)/V)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(u-this.$padding),te},A.prototype.$updateLines=function(){if(this.$changedLines){var M=this.$changedLines.firstRow,_=this.$changedLines.lastRow;this.$changedLines=null;var S=this.layerConfig;if(!(M>
950S.lastRow+1)&&!(_<S.firstRow)){if(_===1/0){this.$showGutter&&this.$gutterLayer.update(S),this.$textLayer.update(S);return}return this.$textLayer.updateLines(S,M,_),!0}}},A.prototype.$getLongestLine=function(){var M=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(M+=1),this.$textLayer&&M>this.$textLayer.MAX_LINE_LENGTH&&(M=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(M*this.characterWidth))},A.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},A.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},A.prototype.addGutterDecoration=function(M,_){this.$gutterLayer.addGutterDecoration(M,_)},A.prototype.removeGutterDecoration=function(M,_){this.$gutterLayer.removeGutterDecoration(M,_)},A.prototype.updateBreakpoints=function(M){this._rows=M,this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.setAnnotations=function(M){this.$gutterLayer.setAnnotations(M),this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},A.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},A.prototype.showCursor=function(){this.$cursorLayer.showCursor()},A.prototype.scrollSelectionIntoView=function(M,_,S){this.scrollCursorIntoView(M,S),this.scrollCursorIntoView(_,S)},A.prototype.scrollCursorIntoView=function(M,_,S){if(this.$size.scrollerHeight!==0){var $=this.$cursorLayer.getPixelPosition(M),g=$.left,u=$.top,b=S&&S.top||0,k=S&&S.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var T=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;T+b>u?(_&&T+b>u+this.lineHeight&&(u-=_*this.$size.scrollerHeight),u===0&&(u=-this.scrollMargin.top),this.session.setScrollTop(u)):T+this.$size.scrollerHeight-k<u+this.lineHeight&&(_&&T+this.$size.scrollerHeight-k<u-this.lineHeight&&(u+=_*this.$size.scrollerHeight),this.session.setScrollTop(u+this.lineHeight+k-this.$size.scrollerHeight));var R=this.scrollLeft,D=2*this.layerConfig.characterWidth;g-D<R?(g-=D,g<this.$padding+D&&(g=-this.scrollMargin.left),this.session.setScrollLeft(g)):(g+=D,R+this.$size.scrollerWidth<g+this.characterWidth?this.session.setScrollLeft(Math.round(g+this.characterWidth-this.$size.scrollerWidth)):R<=this.$padding&&g-R<this.characterWidth&&this.session.setScrollLeft(0))}},A.prototype.getScrollTop=function(){return this.session.getScrollTop()},A.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},A.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},A.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},A.prototype.scrollToRow=function(M){this.session.setScrollTop(M*this.lineHeight)},A.prototype.alignCursor=function(M,_){typeof M=="number"&&(M={row:M,column:0});var S=this.$cursorLayer.getPixelPosition(M),$=this.$size.scrollerHeight-this.lineHeight,g=S.top-$*(_||0);return this.session.setScrollTop(g),g},A.prototype.$calcSteps=function(M,_){var S=0,$=this.STEPS,g=[],u=function(b,k,T){return T*(Math.pow(b-1,3)+1)+k};for(S=0;S<$;++S)g.push(u(S/this.STEPS,M,_-M));return g},A.prototype.scrollToLine=function(M,_,S,$){var g=this.$cursorLayer.getPixelPosition({row:M,column:0}),u=g.top;_&&(u-=this.$size.scrollerHeight/2);var b=this.scrollTop;this.session.setScrollTop(u),S!==!1&&this.animateScrolling(b,$)},A.prototype.animateScrolling=function(M,_){var S=this.scrollTop;if(!this.$animatedScroll)return;var $=this;if(M==S)return;if(this.$scrollAnimation){var g=this.$scrollAnimation.steps;if(g.length&&(M=g[0],M==S))return}var u=$.$calcSteps(M,S);this.$scrollAnimation={from:M,to:S,steps:u},clearInterval(this.$timer),$.session.setScrollTop(u.shift()),$.session.$scrollTop=S;function b(){$.$timer=clearInterval($.$timer),$.$scrollAnimation=null,$.$stopAnimation=!1,_&&_()}this.$timer=setInterval(function(){if($.$stopAnimation){b();return}if(!$.session)return clearInterval($.$timer);u.length?($.session.setScrollTop(u.shift()),$.session.$scrollTop=S):S!=null?($.session.$scrollTop=-1,$.session.setScrollTop(S),S=null):b()},10)},A.prototype.scrollToY=function(M){this.scrollTop!==M&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=M)},A.prototype.scrollToX=function(M){this.scrollLeft!==M&&(this.scrollLeft=M),this.$loop.schedule(this.CHANGE_H_SCROLL)},A.prototype.scrollTo=function(M,_){this.session.setScrollTop(_),this.session.setScrollLeft(M)},A.prototype.scrollBy=function(M,_){_&&this.session.setScrollTop(this.session.getScrollTop()+_),M&&this.session.setScrollLeft(this.session.getScrollLeft()+M)},A.prototype.isScrollableBy=function(M,_){if(_<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||_>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||M<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||M>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},A.prototype.pixelToScreenCoordinates=function(M,_){var S;if(this.$hasCssTransforms){S={top:0,left:0};var $=this.$fontMetrics.transformCoordinates([M,_]);M=$[1]-this.gutterWidth-this.margin.left,_=$[0]}else S=this.scroller.getBoundingClientRect();var g=M+this.scrollLeft-S.left-this.$padding,u=g/this.characterWidth,b=Math.floor((_+this.scrollTop-S.top)/this.lineHeight),k=this.$blockCursor?Math.floor(u):Math.round(u);return{row:b,column:k,side:u-k>0?1:-1,offsetX:g}},A.prototype.screenToTextCoordinates=function(M,_){var S;if(this.$hasCssTransforms){S={top:0,left:0};var $=this.$fontMetrics.transformCoordinates([M,_]);M=$[1]-this.gutterWidth-this.margin.left,_=$[0]}else S=this.scroller.getBoundingClientRect();var g=M+this.scrollLeft-S.left-this.$padding,u=g/this.characterWidth,b=this.$blockCursor?Math.floor(u):Math.round(u),k=(_+this.scrollTop-S.top)/this.lineHeight;return this.session.screenToDocumentPosition(k,Math.max(b,0),g)},A.prototype.textToScreenCoordinates=function(M,_){var S=this.scroller.getBoundingClientRect(),$=this.session.documentToScreenPosition(M,_),g=this.$padding+(this.session.$bidiHandler.isBidiRow($.row,M)?this.session.$bidiHandler.getPosLeft($.column):Math.round($.column*this.characterWidth)),u=$.row*this.lineHeight;return{pageX:S.left+g-this.scrollLeft,pageY:S.top+u-this.scrollTop}},A.prototype.visualizeFocus=function(){p.addCssClass(this.container,"ace_focus")},A.prototype.visualizeBlur=function(){p.removeCssClass(this.container,"ace_focus")},A.prototype.showComposition=function(M){this.$composition=M,M.cssText||(M.cssText=this.textarea.style.cssText),M.useTextareaForIME==null&&(M.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(p.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$curs
950orLayer.element.style.display="none"):M.markerId=this.session.addMarker(M.markerRange,"ace_composition_marker","text")},A.prototype.setCompositionText=function(M){var _=this.session.selection.cursor;this.addToken(M,"composition_placeholder",_.row,_.column),this.$moveTextAreaToCursor()},A.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),p.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var M=this.session.selection.cursor;this.removeExtraToken(M.row,M.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},A.prototype.setGhostText=function(M,_){var S=this.session.selection.cursor,$=_||{row:S.row,column:S.column};this.removeGhostText();var g=this.$calculateWrappedTextChunks(M,$);this.addToken(g[0].text,"ghost_text",$.row,$.column),this.$ghostText={text:M,position:{row:$.row,column:$.column}};var u=p.createElement("div");if(g.length>1){var b=this.hideTokensAfterPosition($.row,$.column),k;g.slice(1).forEach(function(N){var F=p.createElement("div"),W=p.createElement("span");W.className="ace_ghost_text",N.wrapped&&(F.className="ghost_text_line_wrapped"),N.text.length===0&&(N.text=" "),W.appendChild(p.createTextNode(N.text)),F.appendChild(W),u.appendChild(F),k=F}),b.forEach(function(N){var F=p.createElement("span");C(N.type)||(F.className="ace_"+N.type.replace(/\./g," ace_")),F.appendChild(p.createTextNode(N.value)),k.appendChild(F)}),this.$ghostTextWidget={el:u,row:$.row,column:$.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var T=this.$cursorLayer.getPixelPosition($,!0),R=this.container,D=R.getBoundingClientRect().height,O=g.length*this.lineHeight,P=O<D-T.top;if(P)return;O<D?this.scrollBy(0,(g.length-1)*this.lineHeight):this.scrollToRow($.row)}},A.prototype.$calculateWrappedTextChunks=function(M,_){var S=this.$size.scrollerWidth-this.$padding*2,$=Math.floor(S/this.characterWidth)-2;$=$<=0?60:$;for(var g=M.split(/\r?\n/),u=[],b=0;b<g.length;b++){var k=this.session.$getDisplayTokens(g[b],_.column),T=this.session.$computeWrapSplits(k,$,this.session.$tabSize);if(T.length>0){var R=0;T.push(g[b].length);for(var D=0;D<T.length;D++){var O=g[b].slice(R,T[D]);u.push({text:O,wrapped:!0}),R=T[D]}}else u.push({text:g[b],wrapped:!1})}return u},A.prototype.removeGhostText=function(){if(this.$ghostText){var M=this.$ghostText.position;this.removeExtraToken(M.row,M.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},A.prototype.addToken=function(M,_,S,$){var g=this.session;g.bgTokenizer.lines[S]=null;var u={type:_,value:M},b=g.getTokens(S);if($==null||!b.length)b.push(u);else for(var k=0,T=0;T<b.length;T++){var R=b[T];if(k+=R.value.length,$<=k){var D=R.value.length-(k-$),O=R.value.slice(0,D),P=R.value.slice(D);b.splice(T,1,{type:R.type,value:O},u,{type:R.type,value:P});break}}this.updateLines(S,S)},A.prototype.hideTokensAfterPosition=function(M,_){for(var S=this.session.getTokens(M),$=0,g=!1,u=[],b=0;b<S.length;b++){var k=S[b];if($+=k.value.length,k.type!=="ghost_text"){if(g){u.push({type:k.type,value:k.value}),k.type="hidden_token";continue}$===_&&(g=!0)}}return this.updateLines(M,M),u},A.prototype.removeExtraToken=function(M,_){this.session.bgTokenizer.lines[M]=null,this.updateLines(M,M)},A.prototype.setTheme=function(M,_){var S=this;if(this.$themeId=M,S._dispatchEvent("themeChange",{theme:M}),!M||typeof M=="string"){var $=M||this.$options.theme.initialValue;s.loadModule(["theme",$],g)}else g(M);function g(u){if(S.$themeId!=M)return _&&_();if(!u||!u.cssClass)throw new Error("couldn't load module "+M+" or it didn't call define");u.$id&&(S.$themeId=u.$id),p.importCssString(u.cssText,u.cssClass,S.container),S.theme&&p.removeCssClass(S.container,S.theme.cssClass);var b="padding"in u?u.padding:"padding"in(S.theme||{})?4:S.$padding;if(S.$padding&&b!=S.$padding&&S.setPadding(b),S.$gutterLayer){var k=u.$showGutterCursorMarker;k&&!S.$gutterLayer.$showCursorMarker?S.$gutterLayer.$showCursorMarker="theme":!k&&S.$gutterLayer.$showCursorMarker=="theme"&&(S.$gutterLayer.$showCursorMarker=null)}S.$theme=u.cssClass,S.theme=u,p.addCssClass(S.container,u.cssClass),p.setCssClass(S.container,"ace_dark",u.isDark),S.$size&&(S.$size.width=0,S.$updateSizeAsync()),S._dispatchEvent("themeLoaded",{theme:u}),_&&_(),d.isSafari&&S.scroller&&(S.scroller.style.background="red",S.scroller.style.background="")}},A.prototype.getTheme=function(){return this.$themeId},A.prototype.setStyle=function(M,_){p.setCssClass(this.container,M,_!==!1)},A.prototype.unsetStyle=function(M){p.removeCssClass(this.container,M)},A.prototype.setCursorStyle=function(M){p.setStyle(this.scroller.style,"cursor",M)},A.prototype.setMouseCursor=function(M){p.setStyle(this.scroller.style,"cursor",M)},A.prototype.attachToShadowRoot=function(){p.importCssString(y,"ace_editor.css",this.container)},A.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$curs
950orLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},A.prototype.$updateCustomScrollbar=function(M){var _=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),M===!0?(this.scrollBarV=new a(this.container,this),this.scrollBarH=new o(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(S){_.$scrollAnimation||_.session.setScrollTop(S.data-_.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(S){_.$scrollAnimation||_.session.setScrollLeft(S.data-_.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new m(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new e(this.container,this),this.scrollBarH=new r(this.container,this),this.scrollBarV.addEventListener("scroll",function(S){_.$scrollAnimation||_.session.setScrollTop(S.data-_.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(S){_.$scrollAnimation||_.session.setScrollLeft(S.data-_.scrollMargin.left)}))},A.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var M=this;this.$resizeTimer=f.delayedCall(function(){M.destroyed||M.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(_){var S=_[0].contentRect.width,$=_[0].contentRect.height;Math.abs(M.$size.width-S)>1||Math.abs(M.$size.height-$)>1?M.$resizeTimer.delay():M.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},A}();x.prototype.CHANGE_CURSOR=1,x.prototype.CHANGE_MARKER=2,x.prototype.CHANGE_GUTTER=4,x.prototype.CHANGE_SCROLL=8,x.prototype.CHANGE_LINES=16,x.prototype.CHANGE_TEXT=32,x.prototype.CHANGE_SIZE=64,x.prototype.CHANGE_MARKER_BACK=128,x.prototype.CHANGE_MARKER_FRONT=256,x.prototype.CHANGE_FULL=512,x.prototype.CHANGE_H_SCROLL=1024,x.prototype.$changes=0,x.prototype.$padding=null,x.prototype.$frozen=!1,x.prototype.STEPS=8,v.implement(x.prototype,w),s.defineOptions(x.prototype,"renderer",{useResizeObserver:{set:function(A){!A&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):A&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(A){this.$textLayer.setShowInvisibles(A)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(A){typeof A=="number"&&(this.$printMarginColumn=A),this.$showPrintMargin=!!A,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(A){this.$gutter.style.display=A?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(A){this.$gutterLayer.$useSvgGutterIcons=A},initialValue:!1},showFoldedAnnotations:{set:function(A){this.$gutterLayer.$showFoldedAnnotations=A},initialValue:!1},fadeFoldWidgets:{set:function(A){p.setCssClass(this.$gutter,"ace_fade-fold-widgets",A)},initialValue:!1},showFoldWidgets:{set:function(A){this.$gutterLayer.setShowFoldWidgets(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(A){this.$textLayer.setDisplayIndentGuides(A)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(A){this.$textLayer.setHighlightIndentGuides(A)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(A){this.$gutterLayer.setHighlightGutterLine(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(A){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(A){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(A){typeof A=="number"&&(A=A+"px"),this.container.style.fontSize=A,this.updateFontSize()},initialValue:12},fontFamily:{set:function(A){this.container.style.fontFamily=A,this.updateFontSize()}},maxLines:{set:function(A){this.updateFull()}},minLines:{set:function(A){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(A){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(A){A=+A||0,this.$scrollPastEnd!=A&&(this.$scrollPastEnd=A,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(A){this.$gutterLayer.$fixedWidth=!!A,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(A){this.$updateCustomScrollbar(A)},initialValue:!1},theme:{set:function(A){this.setTheme(A)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!d.isMobile&&!d.isIE}}),E.VirtualRenderer=x}
vendor: 4,982 bytes, line 950
950),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(L,E,I){var v=L("../lib/oop"),p=L("../lib/net"),f=L("../lib/event_emitter").EventEmitter,s=L("../config");function l(r){var e="importScripts('"+p.qualifyURL(r)+"');";try{return new Blob([e],{type:"application/javascript"})}catch{var o=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,a=new o;return a.append(e),a.getBlob("application/javascript")}}function t(r){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var e=l(r),o=window.URL||window.webkitURL,a=o.createObjectURL(e);return new Worker(a)}return new Worker(r)}var i=function(r){r.postMessage||(r=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=r,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(){v.implement(this,f),this.$createWorkerFromOldConfig=function(r,e,o,a,c){if(L.nameToUrl&&!L.toUrl&&(L.toUrl=L.nameToUrl),s.get("packaged")||!L.toUrl)a=a||s.moduleUrl(e,"worker");else{var h=this.$normalizePath;a=a||h(L.toUrl("ace/worker/worker.js",null,"_"));var w={};r.forEach(function(y){w[y]=h(L.toUrl(y,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=t(a),c&&this.send("importScripts",c),this.$worker.postMessage({init:!0,tlns:w,module:e,classname:o}),this.$worker},this.onMessage=function(r){var e=r.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var o=this.callbacks[e.id];o&&(o(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data);break}},this.reportError=function(r){window.console&&console.error&&console.error(r)},this.$normalizePath=function(r){return p.qualifyURL(r)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(r){r.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(r,e){this.$worker.postMessage({command:r,args:e})},this.call=function(r,e,o){if(o){var a=this.callbackId++;this.callbacks[a]=o,e.push(a)}this.send(r,e)},this.emit=function(r,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:r,data:{data:e.data}})}catch(o){console.error(o.stack)}},this.attachToDocument=function(r){this.$doc&&this.terminate(),this.$doc=r,this.call("setValue",[r.getValue()]),r.on("change",this.changeListener,!0)},this.changeListener=function(r){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),r.action=="insert"?this.deltaQueue.push(r.start,r.lines):this.deltaQueue.push(r.start,r.end)},this.$sendDeltaQueue=function(){var r=this.deltaQueue;r&&(this.deltaQueue=null,r.length>50&&r.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:r}))}}).call(i.prototype);var n=function(r,e,o){var a=null,c=!1,h=Object.create(f),w=[],y=new i({messageBuffer:w,terminate:function(){},postMessage:function(d){w.push(d),a&&(c?setTimeout(m):m())}});y.setEmitSync=function(d){c=d};var m=function(){var d=w.shift();d.command?a[d.command].apply(a,d.args):d.event&&h._signal(d.event,d.data)};return h.postMessage=function(d){y.onMessage({data:d})},h.callback=function(d,C){this.postMessage({type:"call",id:C,data:d})},h.emit=function(d,C){this.postMessage({type:"event",name:d,data:C})},s.loadModule(["worker",e],function(d){for(a=new d[o](h);w.length;)m()}),y};E.UIWorkerClient=n,E.WorkerClient=i,E.createWorker=t}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(L,E,I){var v=L("./range").Range,p=L("./lib/event_emitter").EventEmitter,f=L("./lib/oop"),s=function(){function l(t,i,n,r,e,o){var a=this;this.length=i,this.session=t,this.doc=t.getDocument(),this.mainClass=e,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=r,this.$onCursorChange=function(){setTimeout(function(){a.onCursorChange()})},this.$pos=n;var c=t.getUndoManager().$undoStack||t.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=c.length,this.setup(),t.selection.on("changeCursor",this.$onCursorChange)}return l.prototype.setup=function(){var t=this,i=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=i.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=n.addMarker(new v(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEac
950h(function(e){var o=i.createAnchor(e.row,e.column);o.$insertRight=!0,o.detach(),t.others.push(o)}),n.setUndoSelect(!1)},l.prototype.showOtherMarkers=function(){if(!this.othersActive){var t=this.session,i=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=t.addMarker(new v(n.row,n.column,n.row,n.column+i.length),i.othersClass,null,!1)})}},l.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var t=0;t<this.others.length;t++)this.session.removeMarker(this.others[t].markerId)}},l.prototype.onUpdate=function(t){if(this.$updating)return this.updateAnchors(t);var i=t;if(i.start.row===i.end.row&&i.start.row===this.pos.row){this.$updating=!0;var n=t.action==="insert"?i.end.column-i.start.column:i.start.column-i.end.column,r=i.start.column>=this.pos.column&&i.start.column<=this.pos.column+this.length+1,e=i.start.column-this.pos.column;if(this.updateAnchors(t),r&&(this.length+=n),r&&!this.session.$fromUndo){if(t.action==="insert")for(var o=this.others.length-1;o>=0;o--){var a=this.others[o],c={row:a.row,column:a.column+e};this.doc.insertMergedLines(c,t.lines)}else if(t.action==="remove")for(var o=this.others.length-1;o>=0;o--){var a=this.others[o],c={row:a.row,column:a.column+e};this.doc.remove(new v(c.row,c.column,c.row,c.column-n))}}this.$updating=!1,this.updateMarkers()}},l.prototype.updateAnchors=function(t){this.pos.onChange(t);for(var i=this.others.length;i--;)this.others[i].onChange(t);this.updateMarkers()},l.prototype.updateMarkers=function(){if(!this.$updating){var t=this,i=this.session,n=function(e,o){i.removeMarker(e.markerId),e.markerId=i.addMarker(new v(e.row,e.column,e.row,e.column+t.length),o,null,!1)};n(this.pos,this.mainClass);for(var r=this.others.length;r--;)n(this.others[r],this.othersClass)}},l.prototype.onCursorChange=function(t){if(!(this.$updating||!this.session)){var i=this.session.selection.getCursor();i.row===this.pos.row&&i.column>=this.pos.column&&i.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",t)):(this.hideOtherMarkers(),this._emit("cursorLeave",t))}},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 t=this.session.getUndoManager(),i=(t.$undoStack||t.$undostack).length-this.$undoStackDepth,n=0;n<i;n++)t.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},l}();f.implement(s.prototype,p),E.PlaceHolder=s}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(L,E,I){var v=L("../lib/event"),p=L("../lib/useragent");function f(l,t){return l.row==t.row&&l.column==t.column}function s(l){var t=l.domEvent,i=t.altKey,n=t.shiftKey,r=t.ctrlKey,e=l.getAccelKey(),o=l.getButton();if(r&&p.isMac&&(o=t.button),l.editor.inMultiSelectMode&&o==2){l.editor.textInput.onContextMenu(l.domEvent);return}if(!r&&!i&&!e){o===0&&l.editor.inMultiSelectMode&&l.editor.exitMultiSelectMode();return}if(o===0){var a=l.editor,c=a.selection,h=a.inMultiSelectMode,w=l.getDocumentPosition(),y=c.getCursor(),m=l.inSelection()||c.isEmpty()&&f(w,y),d=l.x,C=l.y,x=function(O){d=O.clientX,C=O.clientY},A=a.session,M=a.renderer.pixelToScreenCoordinates(d,C),_=M,S;if(a.$mouseHandler.$enableJumpToDef)r&&i||e&&i?S=n?"block":"add":i&&a.$blockSelectEnabled&&(S="block");else if(e&&!i){if(S="add",!h&&n)return}else i&&a.$blockSelectEnabled&&(S="block");if(S&&p.isMac&&t.ctrlKey&&a.$mouseHandler.cancelContextMenu(),S=="add"){if(!h&&m)return;if(!h){var $=c.toOrientedRange();a.addSelectionMarker($)}var g=c.rangeList.rangeAtPoint(w);a.inVirtualSelectionMode=!0,n&&(g=null,$=c.ranges[0]||$,a.removeSelectionMarker($)),a.once("mouseup",function(){var O=c.toOrientedRange();g&&O.isEmpty()&&f(g.cursor,O.cursor)?c.substractPoint(O.cursor):(n?c.substractPoint($.cursor):$&&(a.removeSelectionMarker($),c.addRange($)),c.addRange(O)),a.inVirtualSelectionMode=!1})}else if(S=="block"){l.stop(),a.inVirtualSelectionMode=!0;var u,b=[],k=function(){var O=a.renderer.pixelToScreenCoordinates(d,C),P=A.screenToDocumentPosition(O.row,O.column,O.offsetX);
950f(_,O)&&f(P,c.lead)||(_=O,a.selection.moveToPosition(P),a.renderer.scrollCursorIntoView(),a.removeSelectionMarkers(b),b=c.rectangularRangeBlock(_,M),a.$mouseHandler.$clickSelection&&b.length==1&&b[0].isEmpty()&&(b[0]=a.$mouseHandler.$clickSelection.clone()),b.forEach(a.addSelectionMarker,a),a.updateSelectionMarkers())};h&&!e?c.toSingleRange():!h&&e&&(u=c.toOrientedRange(),a.addSelectionMarker(u)),n?M=A.documentToScreenPosition(c.lead):c.moveToPosition(w),_={row:-1,column:-1};var T=function(O){k(),clearInterval(D),a.removeSelectionMarkers(b),b.length||(b=[c.toOrientedRange()]),u&&(a.removeSelectionMarker(u),c.toSingleRange(u));for(var P=0;P<b.length;P++)c.addRange(b[P]);a.inVirtualSelectionMode=!1,a.$mouseHandler.$clickSelection=null},R=k;v.capture(a.container,x,T);var D=setInterval(function(){R()},20);return l.preventDefault()}}}E.onMouseDown=s}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(L,E,I){E.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(p){p.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(p){p.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(p){p.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(p){p.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(p){p.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(p){p.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(p){p.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(p){p.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(p){p.multiSelect.rangeCount>1?p.multiSelect.joinSelections():p.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(p){p.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(p){p.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(p){p.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],E.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(p){p.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(p){return p&&p.inMultiSelectMode}}];var v=L("../keyboard/hash_handler").HashHandler;E.keyboardHandler=new v(E.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(L,E,I){var v=L("./range_list").RangeList,p=L("./range").Range,f=L("./selection").Selection,s=L("./mouse/multi_select_handler").onMouseDown,l=L("./lib/event"),t=L("./lib/lang"),i=L("./commands/multi_select_commands");E.commands=i.defaultCommands.concat(i.multiSelectCommands);var n=L("./search").Search,r=new n;function e(y,m,d){return r.$options.wrap=!0,r.$options.needle=m,r.$options.backwards=d==-1,r.find(y)}var o=L("./edit_session").EditSession;
950(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(o.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(y,m){if(y){if(!this.inMultiSelectMode&&this.rangeCount===0){var d=this.toOrientedRange();if(this.rangeList.add(d),this.rangeList.add(y),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),m||this.fromOrientedRange(y);this.rangeList.removeAll(),this.rangeList.add(d),this.$onAddRange(d)}y.cursor||(y.cursor=y.end);var C=this.rangeList.add(y);return this.$onAddRange(y),C.length&&this.$onRemoveRange(C),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),m||this.fromOrientedRange(y)}},this.toSingleRange=function(y){y=y||this.ranges[0];var m=this.rangeList.removeAll();m.length&&this.$onRemoveRange(m),y&&this.fromOrientedRange(y)},this.substractPoint=function(y){var m=this.rangeList.substractPoint(y);if(m)return this.$onRemoveRange(m),m[0]},this.mergeOverlappingRanges=function(){var y=this.rangeList.merge();y.length&&this.$onRemoveRange(y)},this.$onAddRange=function(y){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(y),this._signal("addRange",{range:y})},this.$onRemoveRange=function(y){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var m=this.rangeList.ranges.pop();y.push(m),this.rangeCount=0}for(var d=y.length;d--;){var C=this.ranges.indexOf(y[d]);this.ranges.splice(C,1)}this._signal("removeRange",{ranges:y}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),m=m||this.ranges[0],m&&!m.isEqual(this.getRange())&&this.fromOrientedRange(m)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new v,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var y=this.ranges.length?this.ranges:[this.getRange()],m=[],d=0;d<y.length;d++){var C=y[d],x=C.start.row,A=C.end.row;if(x===A)m.push(C.clone());else{for(m.push(new p(x,C.start.column,x,this.session.getLine(x).length));++x<A;)m.push(this.getLineRange(x,!0));m.push(new p(A,0,A,C.end.column))}d==0&&!this.isBackwards()&&(m=m.reverse())}this.toSingleRange();for(var d=m.length;d--;)this.addRange(m[d])},this.joinSelections=function(){var y=this.rangeList.ranges,m=y[y.length-1],d=p.fromPoints(y[0].start,m.end);this.toSingleRange(),this.setSelectionRange(d,m.cursor==m.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var y=this.rangeList.ranges,m=y[y.length-1],d=p.fromPoints(y[0].start,m.end);this.toSingleRange(),this.setSelectionRange(d,m.cursor==m.start)}else{var C=this.session.documentToScreenPosition(this.cursor),x=this.session.documentToScreenPosition(this.anchor),A=this.rectangularRangeBlock(C,x);A.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(y,m,d){var C=[],x=y.column<m.column;if(x)var A=y.column,M=m.column,_=y.offsetX,S=m.offsetX;else var A=m.column,M=y.column,_=m.offsetX,S=y.offsetX;var $=y.row<m.row;if($)var g=y.row,u=m.row;else var g=m.row,u=y.row;A<0&&(A=0),g<0&&(g=0),g==u&&(d=!0);for(var b,k=g;k<=u;k++){var T=p.fromPoints(this.session.screenToDocumentPosition(k,A,_),this.session.screenToDocumentPosition(k,M,S));if(T.isEmpty()){if(b&&c(T.end,b))break;b=T.end}T.cursor=x?T.start:T.end,C.push(T)}if($&&C.reverse(),!d){for(var R=C.length-1;C[R].isEmpty()&&R>0;)R--;if(R>0)for(var D=0;C[D].isEmpty();)D++;for(var O=R;O>=D;O--)C[O].isEmpty()&&C.splice(O,1)}return C}}).call(f.prototype);var a=L("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(y){y.cursor||(y.cursor=y.end);var m=this.getSelectionStyle();return y.marker=this.session.addMarker(y,"ace_selection",m),this.session.$selectionMarkers.push(y),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,y},this.removeSelectionMarker=function(y){if(y.marker){this.session.removeMarker(y.marker);var m=this.session.$selectionMarkers.indexOf(y);m!=-1&&this.session.$selectionMarkers.splice(m,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(y){for(var m=this.session.$selectionMarkers,d=y.length;d--;
950){var C=y[d];if(C.marker){this.session.removeMarker(C.marker);var x=m.indexOf(C);x!=-1&&m.splice(x,1)}}this.session.selectionMarkerCount=m.length},this.$onAddRange=function(y){this.addSelectionMarker(y.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(y){this.removeSelectionMarkers(y.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(y){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(i.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(y){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(i.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(y){var m=y.command,d=y.editor;if(d.multiSelect){if(m.multiSelectAction)m.multiSelectAction=="forEach"?C=d.forEachSelection(m,y.args):m.multiSelectAction=="forEachLine"?C=d.forEachSelection(m,y.args,!0):m.multiSelectAction=="single"?(d.exitMultiSelectMode(),C=m.exec(d,y.args||{})):C=m.multiSelectAction(d,y.args||{});else{var C=m.exec(d,y.args||{});d.multiSelect.addRange(d.multiSelect.toOrientedRange()),d.multiSelect.mergeOverlappingRanges()}return C}},this.forEachSelection=function(y,m,d){if(!this.inVirtualSelectionMode){var C=d&&d.keepOrder,x=d==!0||d&&d.$byLines,A=this.session,M=this.selection,_=M.rangeList,S=(C?M:_).ranges,$;if(!S.length)return y.exec?y.exec(this,m||{}):y(this,m||{});var g=M._eventRegistry;M._eventRegistry={};var u=new f(A);this.inVirtualSelectionMode=!0;for(var b=S.length;b--;){if(x)for(;b>0&&S[b].start.row==S[b-1].end.row;)b--;u.fromOrientedRange(S[b]),u.index=b,this.selection=A.selection=u;var k=y.exec?y.exec(this,m||{}):y(this,m||{});!$&&k!==void 0&&($=k),u.toOrientedRange(S[b])}u.detach(),this.selection=A.selection=M,this.inVirtualSelectionMode=!1,M._eventRegistry=g,M.mergeOverlappingRanges(),M.ranges[0]&&M.fromOrientedRange(M.ranges[0]);var T=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),T&&T.from==T.to&&this.renderer.animateScrolling(T.from),$}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var y="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var m=this.multiSelect.rangeList.ranges,d=[],C=0;C<m.length;C++)d.push(this.session.getTextRange(m[C]));var x=this.session.getDocument().getNewLineCharacter();y=d.join(x),y.length==(d.length-1)*x.length&&(y="")}else this.selection.isEmpty()||(y=this.session.getTextRange(this.getSelectionRange()));return y},this.$checkMultiselectChange=function(y,m){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var d=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&m==this.multiSelect.anchor)return;var C=m==this.multiSelect.anchor?d.cursor==d.start?d.end:d.start:d.cursor;C.row!=m.row||this.session.$clipPositionToDocument(C.row,C.column).column!=m.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(y,m,d){if(m=m||{},m.needle=y||m.needle,m.needle==null){var C=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();m.needle=this.session.getTextRange(C)}this.$search.set(m);var x=this.$search.findAll(this.session);if(!x.length)return 0;var A=this.multiSelect;d||A.toSingleRange(x[0]);for(var M=x.length;M--;)A.addRange(x[M],!0);return C&&A.rangeList.rangeAtPoint(C.start)&&A.addRange(C,!0),x.length},this.selectMoreLines=function(y,m){var d=this.selection.toOrientedRange(),C=d.cursor==d.end,x=this.session.documentToScreenPosition(d.cursor);this.selection.$desiredColumn&&(x.column=this.selection.$desiredColumn);var A=this.session.screenToDocumentPosition(x.row+y,x.column);if(d.isEmpty())var _=A;else var M=this.session.documentToScreenPosition(C?d.end:d.start),_=this.session.screenToDocumentPosition(M.row+y,M.column);if(C){var S=p.fromPoints(A,_);S.cursor=S.start}else{var S=p.fromPoints(_,A);S.cursor=S.end}if(S.desiredColumn=x.column,!this.selection.inMultiSelectMode)this.selection.addRange(d);else if(m)var $=d.cursor;this.selection.addRange(S),$&&this.selection.substractPoint($)},this.transposeSelections=function(y){for(var m=this.session,d=m.multiSelect,C=d.ranges,x=C.length;x--;){var A=C[x];if(A.isEmpty()){var M=m.getWordRange(A.start.row,A.start.column);A.start.row=M.start.row,A.start.column=M.start.column,A.end.row=M.end.row,A.end.column=M.end.column}}d.mergeOverlappingRanges();for(var _=[],x=C.length;x--;){var A=C[x];_.unshift(m.getTextRange(A))}y<0?_.unshift(_.pop()):_.push(_.shift());for(var x=C.length;x--;){var A=C[x],S=A.clone();m.replace(A,_[x]),A.start.row=S.start.row,A.start.column=S.start.column}d.fromOrientedRange(d.ranges[0])},this.selectMore=function(y,m,d){var C=this.session,x=C.multiSelect,A=x.toOrientedRange();if(!(A.isEmpty()&&(A=C.getWordRange(A.start.row,A.start.column),A.cursor=y==-1?A.start:A.end,this.multiSelect.addRange(A),d))){var M=C.getTextRange(A),_=e(C,M,y);
950_&&(_.cursor=y==-1?_.start:_.end,this.session.unfold(_),this.multiSelect.addRange(_),this.renderer.scrollCursorIntoView(null,.5)),m&&this.multiSelect.substractPoint(A.cursor)}},this.alignCursors=function(){var y=this.session,m=y.multiSelect,d=m.ranges,C=-1,x=d.filter(function(R){if(R.cursor.row==C)return!0;C=R.cursor.row});if(!d.length||x.length==d.length-1){var A=this.selection.getRange(),M=A.start.row,_=A.end.row,S=M==_;if(S){var $=this.session.getLength(),g;do g=this.session.getLine(_);while(/[=:]/.test(g)&&++_<$);do g=this.session.getLine(M);while(/[=:]/.test(g)&&--M>0);M<0&&(M=0),_>=$&&(_=$-1)}var u=this.session.removeFullLines(M,_);u=this.$reAlignText(u,S),this.session.insert({row:M,column:0},u.join(` 951`)+` 952`),S||(A.start.column=0,A.end.column=u[u.length-1].length),this.selection.setRange(A)}else{x.forEach(function(R){m.substractPoint(R.cursor)});var b=0,k=1/0,T=d.map(function(R){var D=R.cursor,O=y.getLine(D.row),P=O.substr(D.column).search(/\S/g);return P==-1&&(P=0),D.column>b&&(b=D.column),P<k&&(k=P),P});d.forEach(function(R,D){var O=R.cursor,P=b-O.column,N=T[D]-k;P>N?y.insert(O,t.stringRepeat(" ",P-N)):y.remove(new p(O.row,O.column,O.row,O.column-P+N)),R.start.column=R.end.column=b,R.start.row=R.end.row=O.row,R.cursor=R.end}),m.fromOrientedRange(d[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(y,m){var d=!0,C=!0,x,A,M;return y.map(function(u){var b=u.match(/(\s*)(.*?)(\s*)([=:].*)/);return b?x==null?(x=b[1].length,A=b[2].length,M=b[3].length,b):(x+A+M!=b[1].length+b[2].length+b[3].length&&(C=!1),x!=b[1].length&&(d=!1),x>b[1].length&&(x=b[1].length),A<b[2].length&&(A=b[2].length),M>b[3].length&&(M=b[3].length),b):[u]}).map(m?S:d?C?$:S:g);function _(u){return t.stringRepeat(" ",u)}function S(u){return u[2]?_(x)+u[2]+_(A-u[2].length+M)+u[4].replace(/^([=:])\s+/,"$1 "):u[0]}function $(u){return u[2]?_(x+A-u[2].length)+u[2]+_(M)+u[4].replace(/^([=:])\s+/,"$1 "):u[0]}function g(u){return u[2]?_(x)+u[2]+_(M)+u[4].replace(/^([=:])\s+/,"$1 "):u[0]}}}).call(a.prototype);function c(y,m){return y.row==m.row&&y.column==m.column}E.onSessionChange=function(y){var m=y.session;m&&!m.multiSelect&&(m.$selectionMarkers=[],m.selection.$initRangeList(),m.multiSelect=m.selection),this.multiSelect=m&&m.multiSelect;var d=y.oldSession;d&&(d.multiSelect.off("addRange",this.$onAddRange),d.multiSelect.off("removeRange",this.$onRemoveRange),d.multiSelect.off("multiSelect",this.$onMultiSelect),d.multiSelect.off("singleSelect",this.$onSingleSelect),d.multiSelect.lead.off("change",this.$checkMultiselectChange),d.multiSelect.anchor.off("change",this.$checkMultiselectChange)),m&&(m.multiSelect.on("addRange",this.$onAddRange),m.multiSelect.on("removeRange",this.$onRemoveRange),m.multiSelect.on("multiSelect",this.$onMultiSelect),m.multiSelect.on("singleSelect",this.$onSingleSelect),m.multiSelect.lead.on("change",this.$checkMultiselectChange),m.multiSelect.anchor.on("change",this.$checkMultiselectChange)),m&&this.inMultiSelectMode!=m.selection.inMultiSelectMode&&(m.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function h(y){y.$multiselectOnSessionChange||(y.$onAddRange=y.$onAddRange.bind(y),y.$onRemoveRange=y.$onRemoveRange.bind(y),y.$onMultiSelect=y.$onMultiSelect.bind(y),y.$onSingleSelect=y.$onSingleSelect.bind(y),y.$multiselectOnSessionChange=E.onSessionChange.bind(y),y.$checkMultiselectChange=y.$checkMultiselectChange.bind(y),y.$multiselectOnSessionChange(y),y.on("changeSession",y.$multiselectOnSessionChange),y.on("mousedown",s),y.commands.addCommands(i.defaultCommands),w(y))}function w(y){if(!y.textInput)return;var m=y.textInput.getElement(),d=!1;l.addListener(m,"keydown",function(x){var A=x.keyCode==18&&!(x.ctrlKey||x.shiftKey||x.metaKey);y.$blockSelectEnabled&&A?d||(y.renderer.setMouseCursor("crosshair"),d=!0):d&&C()},y),l.addListener(m,"keyup",C,y),l.addListener(m,"blur",C,y);function C(x){d&&(y.renderer.setMouseCursor(""),d=!1)}}E.MultiSelect=h,L("./config").defineOptions(a.prototype,"editor",{enableMultiselect:{set:function(y){h(this),y?this.on("mousedown",s):this.off("mousedown",s)},value:!0},enableBlockSelect:{set:function(y){this.$blockSelectEnabled=y},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(L,E,I){var v=L("../../range").Range,p=E.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(f,s,l){var t=f.getLine(l);return this.foldingStartMarker.test(t)?"start":s=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(t)?"end":""},this.getFoldWidgetRange=function(f,s,l){return null},this.indentationBlock=function(f,s,l){var t=/\S/,i=f.getLine(s),n=i.search(t);if(n!=-1){for(var r=l||i.length,e=f.getLength(),o=s,a=s;++s<e;){var c=f.getLine(s).search(t);if(c!=-1){if(c<=n){var h=f.getTokenAt(s,0);if(!h||h.type!=="string")break}a=s}}if(a>o){var w=f.getLine(a).length;return new v(o,r,a,w)}}},this.openingBracketBlock=function(f,s,l,t,i){var n={row:l,column:t+1},r=f.$findClosingBracket(s,n,i);if(r){var e=f.foldWidgets[r.row];return e==null&&(e=f.getFoldWidget(r.row)),e=="start"&&r.row>n.row&&(r.row--,r.column=f.getLine(r.row).length),v.fromPoints(n,r)}},this.closingBracketBlock=function(f,s,l,t,i){var n={row:l,column:t},r=f.$findOpeningBracket(s,n);if(r)return r.column++,n.column--,v.fromPoints(r,n)}}).call(p.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(L,E,I){var v=L("../lib/dom"),p=L("../range").Range,f=L("../config").nls;function s(t,i,n){for(var r=0,e=t.length-1;r<=e;){var o=r+e>>1,a=n(i,t[o]);if(a>0)r=o+1;else if(a<0)e=o-1;else return o}return-(r+1)}function l(t,i,n){var r=t.getAnnotations().sort(p.comparePoints);if(r.length){var e=s(r,{row:i,column:-1},p.comparePoints);e<0&&(e=-e-1),e>=r.length?e=n>0?0:r.length-1:e===0&&n<0&&(e=r.length-1);var o=r[e];
952if(!(!o||!n)){if(o.row===i){do o=r[e+=n];while(o&&o.row===i);if(!o)return r.slice()}var a=[];i=o.row;do a[n<0?"unshift":"push"](o),o=r[e+=n];while(o&&o.row==i);return a.length&&a}}}E.showErrorMarker=function(t,i){var n=t.session,r=t.getCursorPosition(),e=r.row,o=n.widgetManager.getWidgetsAtRow(e).filter(function(x){return x.type=="errorMarker"})[0];o?o.destroy():e-=i;var a=l(n,e,i),c;if(a){var h=a[0];r.column=(h.pos&&typeof h.column!="number"?h.pos.sc:h.column)||0,r.row=h.row,c=t.renderer.$gutterLayer.$annotations[r.row]}else{if(o)return;c={displayText:[f("error-marker.good-state","Looks good!")],className:"ace_ok"}}t.session.unfold(r.row),t.selection.moveToPosition(r);var w={row:r.row,fixedWidth:!0,coverGutter:!0,el:v.createElement("div"),type:"errorMarker"},y=w.el.appendChild(v.createElement("div")),m=w.el.appendChild(v.createElement("div"));m.className="error_widget_arrow "+c.className;var d=t.renderer.$cursorLayer.getPixelPosition(r).left;m.style.left=d+t.renderer.gutterWidth-5+"px",w.el.className="error_widget_wrapper",y.className="error_widget "+c.className,c.displayText.forEach(function(x,A){y.appendChild(v.createTextNode(x)),A<c.displayText.length-1&&y.appendChild(v.createElement("br"))}),y.appendChild(v.createElement("div"));var C=function(x,A,M){if(A===0&&(M==="esc"||M==="return"))return w.destroy(),{command:"null"}};w.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(C),n.widgetManager.removeLineWidget(w),t.off("changeSelection",w.destroy),t.off("changeSession",w.destroy),t.off("mouseup",w.destroy),t.off("change",w.destroy))},t.keyBinding.addKeyboardHandler(C),t.on("changeSelection",w.destroy),t.on("changeSession",w.destroy),t.on("mouseup",w.destroy),t.on("change",w.destroy),t.session.widgetManager.addLineWidget(w),w.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:w.el.offsetHeight})},v.importCssString(` 953 .error_widget_wrapper { 954 background: inherit; 955 color: inherit; 956 border:none 957 } 958 .error_widget { 959 border-top: solid 2px; 960 border-bottom: solid 2px; 961 margin: 5px 0; 962 padding: 10px 40px; 963 white-space: pre-wrap; 964 } 965 .error_widget.ace_error, .error_widget_arrow.ace_error{ 966 border-color: #ff5a5a 967 } 968 .error_widget.ace_warning, .error_widget_arrow.ace_warning{ 969 border-color: #F1D817 970 } 971 .error_widget.ace_info, .error_widget_arrow.ace_info{ 972 border-color: #5a5a5a 973 } 974 .error_widget.ace_ok, .error_widget_arrow.ace_ok{ 975 border-color: #5aaa5a 976 } 977 .error_widget_arrow { 978 position: absolute; 979 border: solid 5px; 980 border-top-color: transparent!important; 981 border-right-color: transparent!important; 982 border-left-color: transparent!important; 983 top: -5px; 984 } 985`,"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(L,E,I){L("./loader_build")(E);var v=L("./lib/dom"),p=L("./range").Range,f=L("./editor").Editor,s=L("./edit_session").EditSession,l=L("./undomanager").UndoManager,t=L("./virtual_renderer").VirtualRenderer;L("./worker/worker_client"),L("./keyboard/hash_handler"),L("./placeholder"),L("./multi_select"),L("./mode/folding/fold_mode"),L("./theme/textmate"),L("./ext/error_marker"),E.config=L("./config"),E.edit=function(n,r){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 f)return n.env.editor;var o="";if(n&&/input|textarea/i.test(n.tagName)){var a=n;o=a.value,n=v.createElement("pre"),a.parentNode.replaceChild(n,a)}else n&&(o=n.textContent,n.innerHTML="");var c=E.createEditSession(o),h=new f(new t(n),c,r),w={document:c,editor:h,onResize:h.resize.bind(h,null)};return a&&(w.textarea=a),h.on("destroy",function(){w.editor.container.env=null}),h.container.env=h.env=w,h},E.createEditSession=function(n,r){var e=new s(n,r);return e.setUndoManager(new l),e},E.Range=p,E.Editor=f,E.EditSession=s,E.UndoManager=l,E.VirtualRenderer=t;var i=E.config.version;E.version=i}
985),function(){ace.require(["ace/ace"],function(L){L&&(L.config.init(!0),L.define=ace.define);var E=function(){return this}();!E&&typeof window<"u"&&(E=window),!E&&typeof self<"u"&&(E=self),E.ace||(E.ace=L);for(var I in L)L.hasOwnProperty(I)&&(E.ace[I]=L[I]);E.ace.default=E.ace,X&&(X.exports=E.ace)})}()}(je)),je.exports}var at;function bt(){return at||(at=1,function(X){Object.defineProperty(X,Symbol.toStringTag,{value:"Module"});const z=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"],L=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"],E=()=>{let v;return typeof window>"u"?(tt.window={},v=De(),delete tt.window):window.ace?(v=window.ace,v.acequire=window.ace.require||window.ace.acequire):v=De(),v},I=(v,p)=>{let f=null;return function(){const s=this,l=arguments;clearTimeout(f),f=setTimeout(()=>{v.apply(s,l)},p)}};X.debounce=I,X.editorEvents=L,X.editorOptions=z,X.getAceInstance=E}(He)),He}var ve={},lt;function $t(){if(lt)return ve;lt=1;const{getOwnPropertyNames:X,getOwnPropertySymbols:z}=Object,{hasOwnProperty:L}=Object.prototype;function E(j,G){return function(Q,ne,se){return j(Q,ne,se)&&G(Q,ne,se)}}function I(j){return function(Z,Q,ne){if(!Z||!Q||typeof Z!="object"||typeof Q!="object")return j(Z,Q,ne);const{cache:se}=ne,re=se.get(Z),ie=se.get(Q);if(re&&ie)return re===Q&&ie===Z;se.set(Z,Q),se.set(Q,Z);const de=j(Z,Q,ne);return se.delete(Z),se.delete(Q),de}}function v(j){return j!=null?j[Symbol.toStringTag]:void 0}function p(j){return X(j).concat(z(j))}const f=Object.hasOwn||((j,G)=>L.call(j,G));function s(j,G){return j===G||!j&&!G&&j!==j&&G!==G}const l="__v",t="__o",i="_owner",n=typeof Float16Array<"u",{getOwnPropertyDescriptor:r,keys:e}=Object;function o(j,G){return j.byteLength===G.byteLength&&S(new Uint8Array(j),new Uint8Array(G))}function a(j,G,Z){let Q=j.length;if(G.length!==Q)return!1;for(;Q-- >0;)if(!Z.equals(j[Q],G[Q],Q,Q,j,G,Z))return!1;return!0}function c(j,G){return j.byteLength===G.byteLength&&S(new Uint8Array(j.buffer,j.byteOffset,j.byteLength),new Uint8Array(G.buffer,G.byteOffset,G.byteLength))}function h(j,G){return s(j.getTime(),G.getTime())}function w(j,G,Z){return j.name===G.name&&j.message===G.message&&j.stack===G.stack&&Z.equals(j.cause,G.cause,"cause","cause",j,G,Z)}function y(j,G){return j===G}function m(j,G,Z){const Q=j.size;if(Q!==G.size)return!1;if(!Q)return!0;const ne=new Array(Q),se=j.entries();let re,ie,de=0;for(;(re=se.next())&&!re.done;){const Se=G.entries();let we=!1,Ce=0;for(;(ie=Se.next())&&!ie.done;){if(ne[Ce]){Ce++;continue}const Le=re.value,Te=ie.value;if(Z.equals(Le[0],Te[0],de,Ce,j,G,Z)&&Z.equals(Le[1],Te[1],Le[0],Te[0],j,G,Z)){we=ne[Ce]=!0;break}Ce++}if(!we)return!1;de++}return!0}const d=s;function C(j,G,Z){const Q=e(j);let ne=Q.length;if(e(G).length!==ne)return!1;for(;ne-- >0;)if(!b(j,G,Z,Q[ne]))return!1;return!0}function x(j,G,Z){const Q=p(j);let ne=Q.length;if(p(G).length!==ne)return!1;let se,re,ie;for(;ne-- >0;)if(se=Q[ne],!b(j,G,Z,se)||(re=r(j,se),ie=r(G,se),(re||ie)&&(!re||!ie||re.configurable!==ie.configurable||re.enumerable!==ie.enumerable||re.writable!==ie.writable)))return!1;return!0}function A(j,G){return s(j.valueOf(),G.valueOf())}function M(j,G){return j.source===G.source&&j.flags===G.flags}function _(j,G,Z){const Q=j.size;if(Q!==G.size)return!1;if(!Q)return!0;const ne=new Array(Q),se=j.values();let re,ie;for(;(re=se.next())&&!re.done;){const de=G.values();let Se=!1,we=0;for(;(ie=de.next())&&!ie.done;){if(!ne[we]&&Z.equals(re.value,ie.value,re.value,ie.value,j,G,Z)){Se=ne[we]=!0;break}we++}if(!Se)return!1}return!0}function S(j,G){let Z=j.length;if(G.length!==Z||j.byteOffset!==G.byteOffset)return!1;if(j instanceof Float64Array||j instanceof Float32Array||n&&j instanceof Float16Array){for(;Z-- >0;)if(j[Z]!==G[Z]&&(j[Z]===j[Z]||G[Z]===G[Z]))return!1;return!0}for(;Z-- >0;)if(j[Z]!==G[Z])return!1;return!0}function $(j,G){return j.href===G.href?!0:j.protocol===G.protocol&&j.username===G.username&&j.password===G.password&&j.host===G.host&&j.pathname===G.pathname&&j.hash===G.hash&&g(j.searchParams,G.searchParams)}function g(j,G){const Z=j.toString(),Q=G.toString();return Z===Q||u(Z)===u(Q)}function u(j){return j.split("&").sort().join("&")}function b(j,G,Z,Q){return(Q===i||Q===t||Q===l)&&(j.$$typeof||G.$$typeof)?!0:f(G,Q)&&Z.equals(j[Q],G[Q],Q,Q,j,G,Z)}const k="[object ArrayBuffer]",T="[object Arguments]",R="[object Boolean]",D="[object DataView]",O="[object Date]",P="[object Error]",N="[object Map]",F="[object Number]",W="[object Object]",B="[object RegExp]",H="[object Set]",U="[object String]",K={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array
985]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},V="[object URL]",J=Object.prototype.toString;function te({areArrayBuffersEqual:j,areArraysEqual:G,areDataViewsEqual:Z,areDatesEqual:Q,areErrorsEqual:ne,areFunctionsEqual:se,areMapsEqual:re,areNumbersEqual:ie,areObjectsEqual:de,arePrimitiveWrappersEqual:Se,areRegExpsEqual:we,areSetsEqual:Ce,areTypedArraysEqual:Le,areUrlsEqual:Te,unknownTagComparators:Ne}){return function(oe,ae,he){if(oe===ae)return!0;if(oe==null||ae==null)return!1;const _e=typeof oe;if(_e!==typeof ae)return!1;if(_e!=="object")return _e==="number"?ie(oe,ae,he):_e==="function"?se(oe,ae,he):!1;const Me=oe.constructor;if(Me!==ae.constructor)return!1;if(Me===Object)return de(oe,ae,he);if(Array.isArray(oe))return G(oe,ae,he);if(Me===Date)return Q(oe,ae,he);if(Me===RegExp)return we(oe,ae,he);if(Me===Map)return re(oe,ae,he);if(Me===Set)return Ce(oe,ae,he);if(Me==null)return de(oe,ae,he);const me=J.call(oe);if(me===O)return Q(oe,ae,he);if(me===B)return we(oe,ae,he);if(me===N)return re(oe,ae,he);if(me===H)return Ce(oe,ae,he);if(me===W)return typeof oe.then!="function"&&typeof ae.then!="function"&&de(oe,ae,he);if(me===V)return Te(oe,ae,he);if(me===P)return ne(oe,ae,he);if(me===T)return de(oe,ae,he);if(K[me])return Le(oe,ae,he);if(me===k)return j(oe,ae,he);if(me===D)return Z(oe,ae,he);if(me===R||me===F||me===U)return Se(oe,ae,he);if(Ne){let Re=Ne[me];if(!Re){const et=v(oe);et&&(Re=Ne[et])}if(Re)return Re(oe,ae,he)}return!1}}function ce({circular:j,createCustomConfig:G,strict:Z}){let Q={areArrayBuffersEqual:o,areArraysEqual:Z?x:a,areDataViewsEqual:c,areDatesEqual:h,areErrorsEqual:Z?E(w,x):E(w,C),areFunctionsEqual:y,areMapsEqual:Z?E(m,x):m,areNumbersEqual:d,areObjectsEqual:Z?x:C,arePrimitiveWrappersEqual:A,areRegExpsEqual:M,areSetsEqual:Z?E(_,x):_,areTypedArraysEqual:Z?E(S,x):S,areUrlsEqual:$,unknownTagComparators:void 0};if(G&&(Q=Object.assign({},Q,G(Q))),j){const ne=I(Q.areArraysEqual),se=I(Q.areErrorsEqual),re=I(Q.areMapsEqual),ie=I(Q.areObjectsEqual),de=I(Q.areSetsEqual);Q=Object.assign({},Q,{areArraysEqual:ne,areErrorsEqual:se,areMapsEqual:re,areObjectsEqual:ie,areSetsEqual:de})}return Q}function ue(j){return function(G,Z,Q,ne,se,re,ie){return j(G,Z,ie)}}function le({circular:j,comparator:G,createState:Z,equals:Q,strict:ne}){if(Z)return function(ie,de){const{cache:Se=j?new WeakMap:void 0,meta:we}=Z();return G(ie,de,{cache:Se,equals:Q,meta:we,strict:ne})};if(j)return function(ie,de){return G(ie,de,{cache:new WeakMap,equals:Q,meta:void 0,strict:ne})};const se={cache:void 0,equals:Q,meta:void 0,strict:ne};return function(ie,de){return G(ie,de,se)}}const ge=pe(),ke=pe({strict:!0}),be=pe({circular:!0}),Oe=pe({circular:!0,strict:!0}),q=pe({createInternalComparator:()=>s}),ee=pe({strict:!0,createInternalComparator:()=>s}),ye=pe({circular:!0,createInternalComparator:()=>s}),Ae=pe({circular:!0,createInternalComparator:()=>s,strict:!0});function pe(j={}){const{circular:G=!1,createInternalComparator:Z,createState:Q,strict:ne=!1}=j,se=ce(j),re=te(se),ie=Z?Z(re):ue(re);return le({circular:G,comparator:re,createState:Q,equals:ie,strict:ne})}return ve.circularDeepEqual=be,ve.circularShallowEqual=ye,ve.createCustomEqual=pe,ve.deepEqual=ge,ve.sameValueZeroEqual=s,ve.shallowEqual=q,ve.strictCircularDeepEqual=Oe,ve.strictCircularShallowEqual=Ae,ve.strictDeepEqual=ke,ve.strictShallowEqual=ee,ve}var ct;function _t(){return ct||(ct=1,function(X){Object.defineProperties(X,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const z=qe(),L=bt();let E=De(),I=Je();I=z.__toESM(I);let v=Xe();v=z.__toESM(v);let p=$t();const f=L.getAceInstance();var s=class extends v.Component{constructor(l){super(l),L.editorEvents.forEach(t=>{this[t]=this[t].bind(this)}),this.debounce=L.debounce}isInShadow(l){let t=l&&l.parentNode;for(;t;){if(t.toString()==="[object ShadowRoot]")return!0;t=t.parentNode}return!1}componentDidMount(){const{className:l,onBeforeLoad:t,onValidate:i,mode:n,focus:r,theme:e,fontSize:o,lineHeight:a,value:c,defaultValue:h,showGutter:w,wrapEnabled:y,showPrintMargin:m,scrollMargin:d=[0,0,0,0],keyboardHandler:C,onLoad:x,commands:A,annotations:M,markers:_,placeholder:S}=this.props;this.editor=f.edit(this.refEditor),t&&t(f);const $=Object.keys(this.props.editorProps);for(let u=0;u<$.length;u++)this.editor[$[u]]=this.props.editorProps[$[u]];
985this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),this.editor.renderer.setScrollMargin(d[0],d[1],d[2],d[3]),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.getSession().setMode(typeof n=="string"?`ace/mode/${n}`:n),e&&e!==""&&this.editor.setTheme(`ace/theme/${e}`),this.editor.setFontSize(typeof o=="number"?`${o}px`:o),a&&(this.editor.container.style.lineHeight=typeof a=="number"?`${a}px`:`${a}`,this.editor.renderer.updateFontSize()),this.editor.getSession().setValue(h||c||""),this.props.navigateToFileEnd&&this.editor.navigateFileEnd(),this.editor.renderer.setShowGutter(w),this.editor.getSession().setUseWrapMode(y),this.editor.setShowPrintMargin(m),this.editor.on("focus",this.onFocus),this.editor.on("blur",this.onBlur),this.editor.on("copy",this.onCopy),this.editor.on("paste",this.onPaste),this.editor.on("change",this.onChange),this.editor.on("input",this.onInput),S&&this.updatePlaceholder(),this.editor.getSession().selection.on("changeSelection",this.onSelectionChange),this.editor.getSession().selection.on("changeCursor",this.onCursorChange),i&&this.editor.getSession().on("changeAnnotation",()=>{const u=this.editor.getSession().getAnnotations();this.props.onValidate(u)}),this.editor.session.on("changeScrollTop",this.onScroll),this.editor.getSession().setAnnotations(M||[]),_&&_.length>0&&this.handleMarkers(_);const g=this.editor.$options;L.editorOptions.forEach(u=>{g.hasOwnProperty(u)?this.editor.setOption(u,this.props[u]):this.props[u]&&console.warn(`ReactAce: editor option ${u} was activated but not found. Did you need to import a related tool or did you possibly mispell the option?`)}),this.handleOptions(this.props),Array.isArray(A)&&A.forEach(u=>{typeof u.exec=="string"?this.editor.commands.bindKey(u.bindKey,u.exec):this.editor.commands.addCommand(u)}),C&&this.editor.setKeyboardHandler("ace/keyboard/"+C),l&&(this.refEditor.className+=" "+l),x&&x(this.editor),this.editor.resize(),r&&this.editor.focus()}componentDidUpdate(l){const t=l,i=this.props;for(let o=0;o<L.editorOptions.length;o++){const a=L.editorOptions[o];i[a]!==t[a]&&this.editor.setOption(a,i[a])}if(i.className!==t.className){const o=this.refEditor.className.trim().split(" ");t.className.trim().split(" ").forEach(a=>{const c=o.indexOf(a);o.splice(c,1)}),this.refEditor.className=" "+i.className+" "+o.join(" ")}const n=this.editor&&i.value!=null&&this.editor.getValue()!==i.value;if(n){this.silent=!0;const o=this.editor.session.selection.toJSON();this.editor.setValue(i.value,i.cursorStart),this.editor.session.selection.fromJSON(o),this.silent=!1}i.placeholder!==t.placeholder&&this.updatePlaceholder(),i.mode!==t.mode&&this.editor.getSession().setMode(typeof i.mode=="string"?`ace/mode/${i.mode}`:i.mode),i.theme!==t.theme&&this.editor.setTheme("ace/theme/"+i.theme),i.keyboardHandler!==t.keyboardHandler&&(i.keyboardHandler?this.editor.setKeyboardHandler("ace/keyboard/"+i.keyboardHandler):this.editor.setKeyboardHandler(null)),i.fontSize!==t.fontSize&&this.editor.setFontSize(typeof i.fontSize=="number"?`${i.fontSize}px`:i.fontSize),i.lineHeight!==t.lineHeight&&(this.editor.container.style.lineHeight=typeof i.lineHeight=="number"?`${i.lineHeight}px`:i.lineHeight,this.editor.renderer.updateFontSize()),i.wrapEnabled!==t.wrapEnabled&&this.editor.getSession().setUseWrapMode(i.wrapEnabled),i.showPrintMargin!==t.showPrintMargin&&this.editor.setShowPrintMargin(i.showPrintMargin),i.showGutter!==t.showGutter&&this.editor.renderer.setShowGutter(i.showGutter),(0,p.deepEqual)(i.setOptions,t.setOptions)||this.handleOptions(i),(n||!(0,p.deepEqual)(i.annotations,t.annotations))&&this.editor.getSession().setAnnotations(i.annotations||[]);const r=t.markers||[],e=i.markers||[];(0,p.deepEqual)(r,e)||this.handleMarkers(e),(0,p.deepEqual)(i.scrollMargin,t.scrollMargin)||this.handleScrollMargins(i.scrollMargin),(l.height!==this.props.height||l.width!==this.props.width)&&this.editor.resize(),this.props.focus&&!l.focus&&this.editor.focus()}handleScrollMargins(l=[0,0,0,0]){this.editor.renderer.setScrollMargin(l[0],l[1],l[2],l[3])}componentWillUnmount(){this.editor&&(this.editor.destroy(),this.editor=null)}onChange(l){if(this.editor&&this.props.onChange&&!this.silent){const t=this.editor.getValue();this.props.onChange(t,l)}}onSelectionChange(l){if(this.props.onSelectionChange){const t=this.editor.getSelection();this.props.onSelectionChange(t,l)}}onCursorChange(l){if(this.props.onCursorChange){const t=this.editor.getSelection();this.props.onCursorChange(t,l)}}onInput(l){this.props.onInput&&this.props.onInput(l),this.props.placeholder&&this.updatePlaceholder()}onFocus(l){this.props.onFocus&&this.props.onFocus(l,this.editor)}onBlur(l){this.props.onBlur&&this.props.onBlur(l,this.editor)}onCopy({text:l}){this.props.onCopy&&this.props.onCopy(l)}onPaste({text:l}){this.props.onPaste&&this.props.onPaste(l)}onScroll(){this.props.onScroll&&this.props.onScroll(this.editor)}handleOptions(l){const t=Object.keys(l.setOptions);for(let i=0;i<t.length;i++)this.editor.setOption(t[i],l.setOptions[t[i]])}handleMarkers(l){let t=this.editor.getSession().getMarkers(!0);for(const i in t)t.hasOwnProperty(i)&&this.editor.getSession().removeMarker(t[i].id);t=this.editor.getSession().getMarkers(!1);for(const i in t)t.hasOwnProperty(i)&&t[i].clazz!=="ace_active-line"&&t[i].clazz!=="ace_selected-word"&&this.editor.getSession().removeMarker(t[i].id);l.forEach(({startRow:i,startCol:n,endRow:r,endCol:e,className:o,type:a,inFront:c=!1})=>{const h=new E.Range(i,n,r,e);this.editor.getSession().addMarker(h,o,a,c)})}updatePlaceholder(){const l=this.editor,{placeholder:t}=this.props,i=!l.session.getValue().length;let n=l.renderer.placeholderNode;!i&&n?(l.renderer.scroller.removeChild(l.renderer.placeholderNode),l.renderer.placeholderNode=null):i&&!n?(n=l.renderer.placeholderNode=document.createElement("div"),n.textContent=t||"",n.className="ace_comment ace_placeholder",n.style.padding="0 9px",n.style.position="absolute",n.style.zIndex="3",l.renderer.scroller.appendChild(n)):i&&n&&(n.textContent=t)}updateRef(l){this.refEditor=l}render(){const{name:l,width:t,height:i,style:n}=this.props,r={width:t,height:i,...n};return v.createElement("div",{ref:this.updateRef,id:l,style:r})}};s.propTypes={mode:I.oneOfType([I.string,I.object]),focus:I.bool,theme:I.str
985ing,name:I.string,className:I.string,height:I.string,width:I.string,fontSize:I.oneOfType([I.number,I.string]),lineHeight:I.oneOfType([I.number,I.string]),showGutter:I.bool,onChange:I.func,onCopy:I.func,onPaste:I.func,onFocus:I.func,onInput:I.func,onBlur:I.func,onScroll:I.func,value:I.string,defaultValue:I.string,onLoad:I.func,onSelectionChange:I.func,onCursorChange:I.func,onBeforeLoad:I.func,onValidate:I.func,minLines:I.number,maxLines:I.number,readOnly:I.bool,highlightActiveLine:I.bool,tabSize:I.number,showPrintMargin:I.bool,cursorStart:I.number,debounceChangePeriod:I.number,editorProps:I.object,setOptions:I.object,style:I.object,scrollMargin:I.array,annotations:I.array,markers:I.array,keyboardHandler:I.string,wrapEnabled:I.bool,enableSnippets:I.bool,enableBasicAutocompletion:I.oneOfType([I.bool,I.array]),enableLiveAutocompletion:I.oneOfType([I.bool,I.array]),navigateToFileEnd:I.bool,commands:I.array,placeholder:I.string},s.defaultProps={name:"ace-editor",focus:!1,mode:"",theme:"",height:"500px",width:"500px",fontSize:12,enableSnippets:!1,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,placeholder:null,navigateToFileEnd:!0},X.default=s}(Pe)),Pe}var Ue={},Ve={exports:{}},ht;function Rt(){return ht||(ht=1,function(X,z){ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(L,E,I){var v=L("./lib/oop");L("./lib/lang");var p=L("./lib/event_emitter").EventEmitter,f=L("./editor").Editor,s=L("./virtual_renderer").VirtualRenderer,l=L("./edit_session").EditSession,t;t=function(i,n,r){this.BELOW=1,this.BESIDE=0,this.$container=i,this.$theme=n,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(r||1),this.$cEditor=this.$editors[0],this.on("focus",(function(e){this.$cEditor=e}).bind(this))},(function(){v.implement(this,p),this.$createEditor=function(){var i=document.createElement("div");i.className=this.$editorCSS,i.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(i);var n=new f(new s(i,this.$theme));return n.on("focus",(function(){this._emit("focus",n)}).bind(this)),this.$editors.push(n),n.setFontSize(this.$fontSize),n},this.setSplits=function(i){var n;if(i<1)throw"The number of splits have to be > 0!";if(i!=this.$splits){if(i>this.$splits){for(;this.$splits<this.$editors.length&&this.$splits<i;)n=this.$editors[this.$splits],this.$container.appendChild(n.container),n.setFontSize(this.$fontSize),this.$splits++;for(;this.$splits<i;)this.$createEditor(),this.$splits++}else for(;this.$splits>i;)n=this.$editors[this.$splits-1],this.$container.removeChild(n.container),this.$splits--;this.resize()}}
985,this.getSplits=function(){return this.$splits},this.getEditor=function(i){return this.$editors[i]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(i){this.$editors.forEach(function(n){n.setTheme(i)})},this.setKeyboardHandler=function(i){this.$editors.forEach(function(n){n.setKeyboardHandler(i)})},this.forEach=function(i,n){this.$editors.forEach(i,n)},this.$fontSize="",this.setFontSize=function(i){this.$fontSize=i,this.forEach(function(n){n.setFontSize(i)})},this.$cloneSession=function(i){var n=new l(i.getDocument(),i.getMode()),r=i.getUndoManager();return n.setUndoManager(r),n.setTabSize(i.getTabSize()),n.setUseSoftTabs(i.getUseSoftTabs()),n.setOverwrite(i.getOverwrite()),n.setBreakpoints(i.getBreakpoints()),n.setUseWrapMode(i.getUseWrapMode()),n.setUseWorker(i.getUseWorker()),n.setWrapLimitRange(i.$wrapLimitRange.min,i.$wrapLimitRange.max),n.$foldData=i.$cloneFoldData(),n},this.setSession=function(i,n){var r;n==null?r=this.$cEditor:r=this.$editors[n];var e=this.$editors.some(function(o){return o.session===i});return e&&(i=this.$cloneSession(i)),r.setSession(i),i},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(i){this.$orientation!=i&&(this.$orientation=i,this.resize())},this.resize=function(){var i=this.$container.clientWidth,n=this.$container.clientHeight,r;if(this.$orientation==this.BESIDE)for(var e=i/this.$splits,o=0;o<this.$splits;o++)r=this.$editors[o],r.container.style.width=e+"px",r.container.style.top="0px",r.container.style.left=o*e+"px",r.container.style.height=n+"px",r.resize();else for(var a=n/this.$splits,o=0;o<this.$splits;o++)r=this.$editors[o],r.container.style.width=i+"px",r.container.style.top=o*a+"px",r.container.style.left="0px",r.container.style.height=a+"px",r.resize()}}).call(t.prototype),E.Split=t}),ace.define("ace/ext/split",["require","exports","module","ace/ext/split","ace/split"],function(L,E,I){I.exports=L("../split")}),function(){ace.require(["ace/ext/split"],function(L){X&&(X.exports=L)})}()}(Ve)),Ve.exports}var ut;function St(){return ut||(ut=1,function(X){Object.defineProperties(X,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const z=qe(),L=bt();let E=De(),I=Je();I=z.__toESM(I);let v=Xe();v=z.__toESM(v);let p=$t(),f=Rt();const s=L.getAceInstance();var l=class extends v.Component{constructor(t){super(t),L.editorEvents.forEach(i=>{this[i]=this[i].bind(this)}),this.debounce=L.debounce}isInShadow(t){let i=t&&t.parentNode;for(;i;){if(i.toString()==="[object ShadowRoot]")return!0;i=i.parentNode}return!1}componentDidMount(){const{className:t,onBeforeLoad:i,mode:n,focus:r,theme:e,fontSize:o,value:a,defaultValue:c,cursorStart:h,showGutter:w,wrapEnabled:y,showPrintMargin:m,scrollMargin:d=[0,0,0,0],keyboardHandler:C,onLoad:x,commands:A,annotations:M,markers:_,splits:S}=this.props;this.editor=s.edit(this.refEditor),this.isInShadow(this.refEditor)&&this.editor.renderer.attachToShadowRoot(),this.editor.setTheme(`ace/theme/${e}`),i&&i(s);const $=Object.keys(this.props.editorProps),g=new f.Split(this.editor.container,`ace/theme/${e}`,S);this.editor.env.split=g,this.splitEditor=g.getEditor(0),this.split=g,this.editor.setShowPrintMargin(!1),this.editor.renderer.setShowGutter(!1);const u=this.splitEditor.$options;this.props.debounceChangePeriod&&(this.onChange=this.debounce(this.onChange,this.props.debounceChangePeriod)),g.forEach((k,T)=>{for(let N=0;N<$.length;N++)k[$[N]]=this.props.editorProps[$[N]];const R=c==null?void 0:c[T],D=(a==null?void 0:a[T])??"";k.session.setUndoManager(new s.UndoManager),k.setTheme(`ace/theme/${e}`),k.renderer.setScrollMargin(d[0],d[1],d[2],d[3]),k.getSession().setMode(`ace/mode/${n}`),k.setFontSize(o),k.renderer.setShowGutter(w),k.getSession().setUseWrapMode(y),k.setShowPrintMargin(m),k.on("focus",N=>this.onFocus(N,T)),k.on("blur",this.onBlur),k.on("input",this.onInput),k.on("copy",this.onCopy),k.on("paste",this.onPaste),k.on("change",this.onChange),k.getSession().selection.on("changeSelection",this.onSelectionChange),k.getSession().selection.on("changeCursor",this.onCursorChange),k.session.on("changeScrollTop",this.onScroll),k.setValue(R===void 0?D:R,h);const O=(M==null?void 0:M[T])??[],P=(_==null?void 0:_[T])??[];k.getSession().setAnnotations(O),P&&P.length>0&&this.handleMarkers(P,k);for(let N=0;N<L.editorOptions.length;N++){const F=L.editorOptions[N];u.hasOwnProperty(F)?k.setOption(F,this.props[F]):this.props[F]&&console.warn(`ReactAce: editor option ${F} was activated but not found. Did you need to import a related tool or did you possibly misspell the option?`)}this.handleOptions(this.props,k),Array.isArray(A)&&A.forEach(N=>{typeof N.exec=="string"?k.commands.bindKey(N.bindKey,N.exec):k.commands.addCommand(N)}),C&&k.setKeyboardHandler("ace/keyboard/"+C)}),t&&(this.refEditor.className+=" "+t),r&&this.splitEditor.focus();const b=this.editor.env.split;b.setOrientation(this.props.orientation==="below"?b.BELOW:b.BESIDE),b.resize(!0),x&&x(b)}componentDidUpdate(t){const i=t,n=this.props,r=this.editor.env.split;if(n.splits!==i.splits&&r.setSplits(n.splits),n.orientation!==i.orientation&&r.setOrientation(n.orientation==="below"?r.BELOW:r.BESIDE),r.forEach((e,o)=>{var w,y,m,d,C;n.mode!==i.mode&&e.getSession().setMode("ace/mode/"+n.mode),n.keyboardHandler!==i.keyboardHandler&&(n.keyboardHandler?e.setKeyboardHandler("ace/keyboard/"+n.keyboardHandler):e.setKeyboardHandler(null)),n.fontSize!==i.fontSize&&e.setFontSize(n.fontSize),n.wrapEnabled!==i.wrapEnabled&&e.getSession().setUseWrapMode(n.wrapEnabled),n.showPrintMargin!==i.showPrintMargin&&e.setShowPrintMargin(n.showPrintMargin),n.showGutter!==i.showGutter&&e.renderer.setShowGutter(n.showGutter);for(let x=0;x<L.editorOptions.length;x++){const A=L.editorOptions[x];n[A]!==i[A]&&e.setOption(A,n[A])}(0,p.deepEqual)(n.setOptions,i.setOptions)||this.handleOptions(n,e);const a=((w=n.value)==null?void 0:w[o])??"";if(e.getValue()!==a){this.silent=!0;const x=e.session.selection.toJSON();e.setValue(a,n.cursorStart),e.session.selection.fromJSON(x),this.silent=!1}const c=((y=n.annotations)==null?void 0:y[o])??[];(0,p.deepEqual)(c,((m=i.annotations)==null?void 0:m[o])??[])||e.getSession().setAnnotations(c);const h=((d=n.markers)==null?void 0:d[o])??[];
985!(0,p.deepEqual)(h,((C=i.markers)==null?void 0:C[o])??[])&&Array.isArray(h)&&this.handleMarkers(h,e)}),n.className!==i.className){const e=this.refEditor.className.trim().split(" ");i.className.trim().split(" ").forEach(o=>{const a=e.indexOf(o);e.splice(a,1)}),this.refEditor.className=" "+n.className+" "+e.join(" ")}n.theme!==i.theme&&r.setTheme("ace/theme/"+n.theme),n.focus&&!i.focus&&this.splitEditor.focus(),(n.height!==this.props.height||n.width!==this.props.width)&&this.editor.resize()}componentWillUnmount(){this.editor.destroy(),this.editor=null}onChange(t){if(this.props.onChange&&!this.silent){const i=[];this.editor.env.split.forEach(n=>{i.push(n.getValue())}),this.props.onChange(i,t)}}onSelectionChange(t){if(this.props.onSelectionChange){const i=[];this.editor.env.split.forEach(n=>{i.push(n.getSelection())}),this.props.onSelectionChange(i,t)}}onCursorChange(t){if(this.props.onCursorChange){const i=[];this.editor.env.split.forEach(n=>{i.push(n.getSelection())}),this.props.onCursorChange(i,t)}}onFocus(t,i){this.props.onFocus&&this.props.onFocus(t,i)}onInput(t){this.props.onInput&&this.props.onInput(t)}onBlur(t){this.props.onBlur&&this.props.onBlur(t)}onCopy(t){this.props.onCopy&&this.props.onCopy(t)}onPaste(t){this.props.onPaste&&this.props.onPaste(t)}onScroll(){this.props.onScroll&&this.props.onScroll(this.editor)}handleOptions(t,i){const n=Object.keys(t.setOptions);for(let r=0;r<n.length;r++)i.setOption(n[r],t.setOptions[n[r]])}handleMarkers(t,i){let n=i.getSession().getMarkers(!0);for(const r in n)n.hasOwnProperty(r)&&i.getSession().removeMarker(n[r].id);n=i.getSession().getMarkers(!1);for(const r in n)n.hasOwnProperty(r)&&i.getSession().removeMarker(n[r].id);t.forEach(({startRow:r,startCol:e,endRow:o,endCol:a,className:c,type:h,inFront:w=!1})=>{const y=new E.Range(r,e,o,a);i.getSession().addMarker(y,c,h,w)})}updateRef(t){this.refEditor=t}render(){const{name:t,width:i,height:n,style:r}=this.props,e={width:i,height:n,...r};return v.createElement("div",{ref:this.updateRef,id:t,style:e})}};l.propTypes={className:I.string,debounceChangePeriod:I.number,defaultValue:I.arrayOf(I.string),focus:I.bool,fontSize:I.oneOfType([I.number,I.string]),height:I.string,mode:I.string,name:I.string,onBlur:I.func,onChange:I.func,onCopy:I.func,onFocus:I.func,onInput:I.func,onLoad:I.func,onPaste:I.func,onScroll:I.func,orientation:I.string,showGutter:I.bool,splits:I.number,theme:I.string,value:I.arrayOf(I.string),width:I.string,onSelectionChange:I.func,onCursorChange:I.func,onBeforeLoad:I.func,minLines:I.number,maxLines:I.number,readOnly:I.bool,highlightActiveLine:I.bool,tabSize:I.number,showPrintMargin:I.bool,cursorStart:I.number,editorProps:I.object,setOptions:I.object,style:I.object,scrollMargin:I.array,annotations:I.array,markers:I.array,keyboardHandler:I.string,wrapEnabled:I.bool,enableBasicAutocompletion:I.oneOfType([I.bool,I.array]),enableLiveAutocompletion:I.oneOfType([I.bool,I.array]),commands:I.array},l.defaultProps={name:"ace-editor",focus:!1,orientation:"beside",splits:2,mode:"",theme:"",height:"500px",width:"500px",value:[],fontSize:12,showGutter:!0,onChange:null,onPaste:null,onLoad:null,onScroll:null,minLines:null,maxLines:null,readOnly:!1,highlightActiveLine:!0,showPrintMargin:!0,tabSize:4,cursorStart:1,editorProps:{},style:{},scrollMargin:[0,0,0,0],setOptions:{},wrapEnabled:!1,enableBasicAutocompletion:!1,enableLiveAutocompletion:!1},X.default=l}(Ue)),Ue}var Ge={},Ke={exports:{}},dt;function It(){return dt||(dt=1,function(X){var z=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},L=-1,E=1,I=0;z.Diff=function(v,p){return[v,p]},z.prototype.diff_main=function(v,p,f,s){typeof s>"u"&&(this.Diff_Timeout<=0?s=Number.MAX_VALUE:s=new Date().getTime()+this.Diff_Timeout*1e3);var l=s;if(v==null||p==null)throw new Error("Null input. (diff_main)");if(v==p)return v?[new z.Diff(I,v)]:[];typeof f>"u"&&(f=!0);var t=f,i=this.diff_commonPrefix(v,p),n=v.substring(0,i);v=v.substring(i),p=p.substring(i),i=this.diff_commonSuffix(v,p);var r=v.substring(v.length-i);v=v.substring(0,v.length-i),p=p.substring(0,p.length-i);var e=this.diff_compute_(v,p,t,l);return n&&e.unshift(new z.Diff(I,n)),r&&e.push(new z.Diff(I,r)),this.diff_cleanupMerge(e),e},z.prototype.diff_compute_=function(v,p,f,s){var l;if(!v)return[new z.Diff(E,p)];if(!p)return[new z.Diff(L,v)];var t=v.length>p.length?v:p,i=v.length>p.length?p:v,n=t.indexOf(i);if(n!=-1)return l=[new z.Diff(E,t.substring(0,n)),new z.Diff(I,i),new z.Diff(E,t.substring(n+i.length))],v.length>p.length&&(l[0][0]=l[2][0]=L),l;if(i.length==1)return[new z.Diff(L,v),new z.Diff(E,p)];var r=this.diff_halfMatch_(v,p);if(r){var e=r[0],o=r[1],a=r[2],c=r[3],h=r[4],w=this.diff_main(e,a,f,s),y=this.diff_main(o,c,f,s);return w.concat([new z.Diff(I,h)],y)}return f&&v.length>100&&p.length>100?this.diff_lineMode_(v,p,s):this.diff_bisect_(v,p,s)},z.prototype.diff_lineMode_=function(v,p,f){var s=this.diff_linesToChars_(v,p);v=s.chars1,p=s.chars2;var l=s.lineArray,t=this.diff_main(v,p,!1,f);this.diff_charsToLines_(t,l),this.diff_cleanupSemantic(t),t.push(new z.Diff(I,""));for(var i=0,n=0,r=0,e="",o="";i<t.length;){switch(t[i][0]){case E:r++,o+=t[i][1];break;case L:n++,e+=t[i][1];break;case I:if(n>=1&&r>=1){t.splice(i-n-r,n+r),i=i-n-r;for(var a=this.diff_main(e,o,!1,f),c=a.length-1;c>=0;c--)t.splice(i,0,a[c]);i=i+a.length}r=0,n=0,e="",o="";break}i++}return t.pop(),t},z.prototype.diff_bisect_=function(v,p,f){for(var s=v.length,l=p.length,t=Math.ceil((s+l)/2),i=t,n=2*t,r=new Array(n),e=new Array(n),o=0;o<n;o++)r[o]=-1,e[o]=-1;r[i+1]=0,e[i+1]=0;for(var a=s-l,c=a%2!=0,h=0,w=0,y=0,m=0,d=0;d<t&&!(new Date().getTime()>f);d++){for(var C=-d+h;C<=d-w;C+=2){var x=i+C,A;C==-d||C!=d&&r[x-1]<r[x+1]?A=r[x+1]:A=r[x-1]+1;for(var M=A-C;A<s&&M<l&&v.charAt(A)==p.charAt(M);)A++,M++;if(r[x]=A,A>s)w+=2;else if(M>l)h+=2;else if(c){var _=i+a-C;if(_>=0&&_<n&&e[_]!=-1){var S=s-e[_];
985if(A>=S)return this.diff_bisectSplit_(v,p,A,M,f)}}}for(var $=-d+y;$<=d-m;$+=2){var _=i+$,S;$==-d||$!=d&&e[_-1]<e[_+1]?S=e[_+1]:S=e[_-1]+1;for(var g=S-$;S<s&&g<l&&v.charAt(s-S-1)==p.charAt(l-g-1);)S++,g++;if(e[_]=S,S>s)m+=2;else if(g>l)y+=2;else if(!c){var x=i+a-$;if(x>=0&&x<n&&r[x]!=-1){var A=r[x],M=i+A-x;if(S=s-S,A>=S)return this.diff_bisectSplit_(v,p,A,M,f)}}}}return[new z.Diff(L,v),new z.Diff(E,p)]},z.prototype.diff_bisectSplit_=function(v,p,f,s,l){var t=v.substring(0,f),i=p.substring(0,s),n=v.substring(f),r=p.substring(s),e=this.diff_main(t,i,!1,l),o=this.diff_main(n,r,!1,l);return e.concat(o)},z.prototype.diff_linesToChars_=function(v,p){var f=[],s={};f[0]="";function l(r){for(var e="",o=0,a=-1,c=f.length;a<r.length-1;){a=r.indexOf(` 986`,o),a==-1&&(a=r.length-1);var h=r.substring(o,a+1);(s.hasOwnProperty?s.hasOwnProperty(h):s[h]!==void 0)?e+=String.fromCharCode(s[h]):(c==t&&(h=r.substring(o),a=r.length),e+=String.fromCharCode(c),s[h]=c,f[c++]=h),o=a+1}return e}var t=4e4,i=l(v);t=65535;var n=l(p);return{chars1:i,chars2:n,lineArray:f}},z.prototype.diff_charsToLines_=function(v,p){for(var f=0;f<v.length;f++){for(var s=v[f][1],l=[],t=0;t<s.length;t++)l[t]=p[s.charCodeAt(t)];v[f][1]=l.join("")}},z.prototype.diff_commonPrefix=function(v,p){if(!v||!p||v.charAt(0)!=p.charAt(0))return 0;for(var f=0,s=Math.min(v.length,p.length),l=s,t=0;f<l;)v.substring(t,l)==p.substring(t,l)?(f=l,t=f):s=l,l=Math.floor((s-f)/2+f);return l},z.prototype.diff_commonSuffix=function(v,p){if(!v||!p||v.charAt(v.length-1)!=p.charAt(p.length-1))return 0;for(var f=0,s=Math.min(v.length,p.length),l=s,t=0;f<l;)v.substring(v.length-l,v.length-t)==p.substring(p.length-l,p.length-t)?(f=l,t=f):s=l,l=Math.floor((s-f)/2+f);return l},z.prototype.diff_commonOverlap_=function(v,p){var f=v.length,s=p.length;if(f==0||s==0)return 0;f>s?v=v.substring(f-s):f<s&&(p=p.substring(0,f));var l=Math.min(f,s);if(v==p)return l;for(var t=0,i=1;;){var n=v.substring(l-i),r=p.indexOf(n);if(r==-1)return t;i+=r,(r==0||v.substring(l-i)==p.substring(0,i))&&(t=i,i++)}},z.prototype.diff_halfMatch_=function(v,p){if(this.Diff_Timeout<=0)return null;var f=v.length>p.length?v:p,s=v.length>p.length?p:v;if(f.length<4||s.length*2<f.length)return null;var l=this;function t(w,y,m){for(var d=w.substring(m,m+Math.floor(w.length/4)),C=-1,x="",A,M,_,S;(C=y.indexOf(d,C+1))!=-1;){var $=l.diff_commonPrefix(w.substring(m),y.substring(C)),g=l.diff_commonSuffix(w.substring(0,m),y.substring(0,C));x.length<g+$&&(x=y.substring(C-g,C)+y.substring(C,C+$),A=w.substring(0,m-g),M=w.substring(m+$),_=y.substring(0,C-g),S=y.substring(C+$))}return x.length*2>=w.length?[A,M,_,S,x]:null}var i=t(f,s,Math.ceil(f.length/4)),n=t(f,s,Math.ceil(f.length/2)),r;if(!i&&!n)return null;n?i?r=i[4].length>n[4].length?i:n:r=n:r=i;var e,o,a,c;v.length>p.length?(e=r[0],o=r[1],a=r[2],c=r[3]):(a=r[0],c=r[1],e=r[2],o=r[3]);var h=r[4];return[e,o,a,c,h]},z.prototype.diff_cleanupSemantic=function(v){for(var p=!1,f=[],s=0,l=null,t=0,i=0,n=0,r=0,e=0;t<v.length;)v[t][0]==I?(f[s++]=t,i=r,n=e,r=0,e=0,l=v[t][1]):(v[t][0]==E?r+=v[t][1].length:e+=v[t][1].length,l&&l.length<=Math.max(i,n)&&l.length<=Math.max(r,e)&&(v.splice(f[s-1],0,new z.Diff(L,l)),v[f[s-1]+1][0]=E,s--,s--,t=s>0?f[s-1]:-1,i=0,n=0,r=0,e=0,l=null,p=!0)),t++;for(p&&this.diff_cleanupMerge(v),this.diff_cleanupSemanticLossless(v),t=1;t<v.length;){if(v[t-1][0]==L&&v[t][0]==E){var o=v[t-1][1],a=v[t][1],c=this.diff_commonOverlap_(o,a),h=this.diff_commonOverlap_(a,o);c>=h?(c>=o.length/2||c>=a.length/2)&&(v.splice(t,0,new z.Diff(I,a.substring(0,c))),v[t-1][1]=o.substring(0,o.length-c),v[t+1][1]=a.substring(c),t++):(h>=o.length/2||h>=a.length/2)&&(v.splice(t,0,new z.Diff(I,o.substring(0,h))),v[t-1][0]=E,v[t-1][1]=a.substring(0,a.length-h),v[t+1][0]=L,v[t+1][1]=o.substring(h),t++),t++}t++}},z.prototype.diff_cleanupSemanticLossless=function(v){function p(h,w){if(!h||!w)return 6;var y=h.charAt(h.length-1),m=w.charAt(0),d=y.match(z.nonAlphaNumericRegex_),C=m.match(z.nonAlphaNumericRegex_),x=d&&y.match(z.whitespaceRegex_),A=C&&m.match(z.whitespaceRegex_),M=x&&y.match(z.linebreakRegex_),_=A&&m.match(z.linebreakRegex_),S=M&&h.match(z.blanklineEndRegex_),$=_&&w.match(z.blanklineStartRegex_);return S||$?5:M||_?4:d&&!x&&A?3:x||A?2:d||C?1:0}
986for(var f=1;f<v.length-1;){if(v[f-1][0]==I&&v[f+1][0]==I){var s=v[f-1][1],l=v[f][1],t=v[f+1][1],i=this.diff_commonSuffix(s,l);if(i){var n=l.substring(l.length-i);s=s.substring(0,s.length-i),l=n+l.substring(0,l.length-i),t=n+t}for(var r=s,e=l,o=t,a=p(s,l)+p(l,t);l.charAt(0)===t.charAt(0);){s+=l.charAt(0),l=l.substring(1)+t.charAt(0),t=t.substring(1);var c=p(s,l)+p(l,t);c>=a&&(a=c,r=s,e=l,o=t)}v[f-1][1]!=r&&(r?v[f-1][1]=r:(v.splice(f-1,1),f--),v[f][1]=e,o?v[f+1][1]=o:(v.splice(f+1,1),f--))}f++}},z.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,z.whitespaceRegex_=/\s/,z.linebreakRegex_=/[\r\n]/,z.blanklineEndRegex_=/\n\r?\n$/,z.blanklineStartRegex_=/^\r?\n\r?\n/,z.prototype.diff_cleanupEfficiency=function(v){for(var p=!1,f=[],s=0,l=null,t=0,i=!1,n=!1,r=!1,e=!1;t<v.length;)v[t][0]==I?(v[t][1].length<this.Diff_EditCost&&(r||e)?(f[s++]=t,i=r,n=e,l=v[t][1]):(s=0,l=null),r=e=!1):(v[t][0]==L?e=!0:r=!0,l&&(i&&n&&r&&e||l.length<this.Diff_EditCost/2&&i+n+r+e==3)&&(v.splice(f[s-1],0,new z.Diff(L,l)),v[f[s-1]+1][0]=E,s--,l=null,i&&n?(r=e=!0,s=0):(s--,t=s>0?f[s-1]:-1,r=e=!1),p=!0)),t++;p&&this.diff_cleanupMerge(v)},z.prototype.diff_cleanupMerge=function(v){v.push(new z.Diff(I,""));for(var p=0,f=0,s=0,l="",t="",i;p<v.length;)switch(v[p][0]){case E:s++,t+=v[p][1],p++;break;case L:f++,l+=v[p][1],p++;break;case I:f+s>1?(f!==0&&s!==0&&(i=this.diff_commonPrefix(t,l),i!==0&&(p-f-s>0&&v[p-f-s-1][0]==I?v[p-f-s-1][1]+=t.substring(0,i):(v.splice(0,0,new z.Diff(I,t.substring(0,i))),p++),t=t.substring(i),l=l.substring(i)),i=this.diff_commonSuffix(t,l),i!==0&&(v[p][1]=t.substring(t.length-i)+v[p][1],t=t.substring(0,t.length-i),l=l.substring(0,l.length-i))),p-=f+s,v.splice(p,f+s),l.length&&(v.splice(p,0,new z.Diff(L,l)),p++),t.length&&(v.splice(p,0,new z.Diff(E,t)),p++),p++):p!==0&&v[p-1][0]==I?(v[p-1][1]+=v[p][1],v.splice(p,1)):p++,s=0,f=0,l="",t="";break}v[v.length-1][1]===""&&v.pop();var n=!1;for(p=1;p<v.length-1;)v[p-1][0]==I&&v[p+1][0]==I&&(v[p][1].substring(v[p][1].length-v[p-1][1].length)==v[p-1][1]?(v[p][1]=v[p-1][1]+v[p][1].substring(0,v[p][1].length-v[p-1][1].length),v[p+1][1]=v[p-1][1]+v[p+1][1],v.splice(p-1,1),n=!0):v[p][1].substring(0,v[p+1][1].length)==v[p+1][1]&&(v[p-1][1]+=v[p+1][1],v[p][1]=v[p][1].substring(v[p+1][1].length)+v[p+1][1],v.splice(p+1,1),n=!0)),p++;n&&this.diff_cleanupMerge(v)},z.prototype.diff_xIndex=function(v,p){var f=0,s=0,l=0,t=0,i;for(i=0;i<v.length&&(v[i][0]!==E&&(f+=v[i][1].length),v[i][0]!==L&&(s+=v[i][1].length),!(f>p));i++)l=f,t=s;return v.length!=i&&v[i][0]===L?t:t+(p-l)},z.prototype.diff_prettyHtml=function(v){for(var p=[],f=/&/g,s=/</g,l=/>/g,t=/\n/g,i=0;i<v.length;i++){var n=v[i][0],r=v[i][1],e=r.replace(f,"&").replace(s,"<").replace(l,">").replace(t,"¶<br>");switch(n){case E:p[i]='<ins style="background:#e6ffe6;">'+e+"</ins>";break;case L:p[i]='<del style="background:#ffe6e6;">'+e+"</del>";break;case I:p[i]="<span>"+e+"</span>";break}}return p.join("")},z.prototype.diff_text1=function(v){for(var p=[],f=0;f<v.length;f++)v[f][0]!==E&&(p[f]=v[f][1]);return p.join("")},z.prototype.diff_text2=function(v){for(var p=[],f=0;f<v.length;f++)v[f][0]!==L&&(p[f]=v[f][1]);return p.join("")},z.prototype.diff_levenshtein=function(v){for(var p=0,f=0,s=0,l=0;l<v.length;l++){var t=v[l][0],i=v[l][1];switch(t){case E:f+=i.length;break;case L:s+=i.length;break;case I:p+=Math.max(f,s),f=0,s=0;break}}return p+=Math.max(f,s),p},z.prototype.diff_toDelta=function(v){for(var p=[],f=0;f<v.length;f++)switch(v[f][0]){case E:p[f]="+"+encodeURI(v[f][1]);break;case L:p[f]="-"+v[f][1].length;break;case I:p[f]="="+v[f][1].length;break}return p.join(" ").replace(/%20/g," ")},z.prototype.diff_fromDelta=function(v,p){for(var f=[],s=0,l=0,t=p.split(/\t/g),i=0;i<t.length;i++){var n=t[i].substring(1);switch(t[i].charAt(0)){case"+":try{f[s++]=new z.Diff(E,decodeURI(n))}catch{throw new Error("Illegal escape in diff_fromDelta: "+n)}break;case"-":case"=":var r=parseInt(n,10);if(isNaN(r)||r<0)throw new Error("Invalid number in diff_fromDelta: "+n);var e=v.substring(l,l+=r);t[i].charAt(0)=="="?f[s++]=new z.Diff(I,e):f[s++]=new z.Diff(L,e);break;default:if(t[i])throw new Error("Invalid diff operation in diff_fromDelta: "+t[i])}}if(l!=v.length)throw new Error("Delta length ("+l+") does not equal source text length ("+v.length+").");return f},z.prototype.match_main=function(v,p,f){if(v==null||p==null||f==null)throw new Error("Null input. (match_main)");return f=Math.max(0,Math.min(f,v.length)),v==p?0:v.length?v.substring(f,f+p.length)==p?f:this.match_bitap_(v,p,f):-1},z.prototype.match_bitap_=function(v,p,f){if(p.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var s=this.match_alphabet_(p),l=this;function t(A,M){var _=A/p.length,S=Math.abs(f-M);return l.Match_Distance?_+S/l.Match_Distance:S?1:_}var i=this.Match_Threshold,n=v.indexOf(p,f);n!=-1&&(i=Math.min(t(0,n),i),n=v.lastIndexOf(p,f+p.length),n!=-1&&(i=Math.min(t(0,n),i)));var r=1<<p.length-1;n=-1;for(var e,o,a=p.length+v.length,c,h=0;h<p.length;h++){for(e=0,o=a;e<o;)t(h,f+o)<=i?e=o:a=o,o=Math.floor((a-e)/2+e);a=o;var w=Math.max(1,f-o+1),y=Math.min(f+o,v.length)+p.length,m=Array(y+2);m[y+1]=(1<<h)-1;for(var d=y;d>=w;d--){var C=s[v.charAt(d-1)];if(h===0?m[d]=(m[d+1]<<1|1)&C:m[d]=(m[d+1]<<1|1)&C|((c[d+1]|c[d])<<1|1)|c[d+1],m[d]&r){var x=t(h,d-1);if(x<=i)if(i=x,n=d-1,n>f)w=Math.max(1,2*f-n);else break}}if(t(h+1,f)>i)break;c=m}return n},z.prototype.match_alphabet_=function(v){for(var p={},f=0;f<v.length;f++)p[v.charAt(f)]=0;for(var f=0;f<v.length;f++)p[v.charAt(f)]|=1<<v.length-f-1;return p},z.prototype.patch_addContext_=function(v,p){if(p.length!=0){if(v.start2===null)throw Error("patch not initialized");for(var f=p.substring(v.start2,v.start2+v.length1),s=0;p.indexOf(f)!=p.lastIndexOf(f)&&f.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)s+=this.Patch_Margin,f=p.substring(v.start2-s,v.start2+v.length1+s);s+=this.Patch_Margin;var l=p.substring(v.start2-s,v.start2);l&&v.diffs.unshift(new z.Diff(I,l));var t=p.substring(v.start2+v.length1,v.start2+v.length1+s);t&&v.diffs.push(new z.Diff(I,t)),v.start1-=l.length,v.start2-=l.length,v.length1+=l.length+t.length,v.length2+=l.length+t.length}},z.prototype.patch_make=function(v,p,f){var s,l;if(typeof v=="string"&&typeof p=="string"&&typeof f>"u")s=v,l=this.diff_main(s,p,!0),l.length>2&&(this.diff_cleanupSemantic(l),this.diff_cleanupEfficiency(l));else if(v&&typeof v=="object"&&typeof p>"u"&&typeof f>"u")l=v,s=this.diff_text1(l);else if(typeof v=="string"&&p&&typeof p=="object"&&typeof f>"u")s=v,l=p;else if(typeof v=="string"&&typeof p=="string"&&f&&typeof f=="object")s=v,l=f;else throw new Error("Unknown call format to patch_make.");if(l.length===0)return[];for(var t=[],i=new z.patch_obj,n=0,r=0,e=0,o=s,a=s,c=0;c<l.length;c++){var h=l[c][0],w=l[c][1];switch(!n&&h!==I&&(i.start1=r,i.start2=e),h){case E:i.diffs[n++]=l[c],i.length2+=w.length,a=a.substring(0,e)+w+a.substring(e);break;case L:i.length1+=w.length,i.diffs[n++]=l[c],a=a.substring(0,e)+a.substring(e+w.length);break;case I:w.length<=2*this.Patch_Margin&&n&&l.length!=c+1?(i.diffs[n++]=l[c],i.length1+=w.length,i.length2+=w.length):w.length>=2*this.Patch_Margin&&n&&(this.patch_addContext_(i,o),t.push(i),i=new z.patch_obj,n=0,o=a,r=e);break}h!==E&&(r+=w.length),h!==L&&(e+=w.length)}return n&&(this.patch_addContext_(i,o),t.push(i)),t},z.prototype.patch_deepCopy=function(v){for(var p=[],f=0;f<v.length;f++){var s=v[f],l=new z.patch_obj;l.diffs=[];for(var t=0;t<s.diffs.length;t++)l.diffs[t]=new z.Diff(s.diffs[t][0],s.diffs[t][1]);l.start1=s.start1,l.start2=s.start2,l.length1=s.length1,l.length2=s.length2,p[f]=l}return p},z.prototype.patch_apply=function(v,p){if(v.length==0)return[p,[]];v=this.patch_deepCopy(v);var f=this.patch_addPadding(v);p=f+p+f,this.patch_splitMax(v);for(var s=0,l=[],t=0;t<v.length;t++){var i=v[t].start2+s,n=this.diff_text1(v[t].diffs),r,e=-1;if(n.length>this.Match_MaxBits?(r=this.match_main(p,n.substring(0,this.Match_MaxBits),i),r!=-1&&(e=this.match_main(p,n.substring(n.length-this.Match_MaxBits),i+n.length-this.Match_MaxBits),(e==-1||r>=e)&&(r=-1))):r=this.match_main(p,n,i),r==-1)l[t]=!1,s-=v[t].length2-v[t].length1;else{l[t]=!0,s=r-i;var o;if(e==-1?o=p.substring(r,r+n.length):o=p.substring(r,e+this.Match_MaxBits),n==o)p=p.substring(0,r)+this.diff_text2(v[t].diffs)+p.substring(r+n.length);else{var a=this.diff_main(n,o,!1);if(n.length>this.Match_MaxBits&&this.diff_levenshtein(a)/n.length>this.Patch_DeleteThreshold)l[t]=!1;else{this.diff_cleanupSemanticLossless(a);for(var c=0,h,w=0;w<v[t].diffs.length;w++){var y=v[t].diffs[w];y[0]!==I&&(h=this.diff_xIndex(a,c)),y[0]===E?p=p.substring(0,r+h)+y[1]+p.substring(r+h):y[0]===L&&(p=p.substring(0,r+h)+p.substring(r+this.diff_xIndex(a,c+y[1].length))),y[0]!==L&&(c+=y[1].length)}}}}}return p=p.substring(f.length,p.length-f.length),[p,l]},z.prototype.patch_addPadding=function(v){for(var p=this.Patch_Margin,f="",s=1;s<=p;s++)f+=String.fromCharCode(s);for(var s=0;s<v.length;s++)v[s].start1+=p,v[s].start2+=p;var l=v[0],t=l.diffs;if(t.length==0||t[0][0]!=I)t.unshift(new z.Diff(I,f)),l.start1-=p,l.start2-=p,l.length1+=p,l.length2+=p;else if(p>t[0][1].length){var i=p-t[0][1].length;t[0][1]=f.substring(t[0][1].length)+t[0][1],l.start1-=i,l.start2-=i,l.length1+=i,l.length2+=i}if(l=v[v.length-1],t=l.diffs,t.length==0||t[t.length-1][0]!=I)t.push(new z.Diff(I,f)),l.length1+=p,l.length2+=p;else if(p>t[t.length-1][1].length){var i=p-t[t.length-1][1].length;t[t.length-1][1]+=f.substring(0,i),l.length1+=i,l.length2+=i}return f},z.prototype.patch_splitMax=function(v){for(var p=this.Match_MaxBits,f=0;f<v.length;f++)if(!(v[f].length1<=p)){var s=v[f];
986v.splice(f--,1);for(var l=s.start1,t=s.start2,i="";s.diffs.length!==0;){var n=new z.patch_obj,r=!0;for(n.start1=l-i.length,n.start2=t-i.length,i!==""&&(n.length1=n.length2=i.length,n.diffs.push(new z.Diff(I,i)));s.diffs.length!==0&&n.length1<p-this.Patch_Margin;){var e=s.diffs[0][0],o=s.diffs[0][1];e===E?(n.length2+=o.length,t+=o.length,n.diffs.push(s.diffs.shift()),r=!1):e===L&&n.diffs.length==1&&n.diffs[0][0]==I&&o.length>2*p?(n.length1+=o.length,l+=o.length,r=!1,n.diffs.push(new z.Diff(e,o)),s.diffs.shift()):(o=o.substring(0,p-n.length1-this.Patch_Margin),n.length1+=o.length,l+=o.length,e===I?(n.length2+=o.length,t+=o.length):r=!1,n.diffs.push(new z.Diff(e,o)),o==s.diffs[0][1]?s.diffs.shift():s.diffs[0][1]=s.diffs[0][1].substring(o.length))}i=this.diff_text2(n.diffs),i=i.substring(i.length-this.Patch_Margin);var a=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);a!==""&&(n.length1+=a.length,n.length2+=a.length,n.diffs.length!==0&&n.diffs[n.diffs.length-1][0]===I?n.diffs[n.diffs.length-1][1]+=a:n.diffs.push(new z.Diff(I,a))),r||v.splice(++f,0,n)}}},z.prototype.patch_toText=function(v){for(var p=[],f=0;f<v.length;f++)p[f]=v[f];return p.join("")},z.prototype.patch_fromText=function(v){var p=[];if(!v)return p;for(var f=v.split(` 987`),s=0,l=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;s<f.length;){var t=f[s].match(l);if(!t)throw new Error("Invalid patch string: "+f[s]);var i=new z.patch_obj;for(p.push(i),i.start1=parseInt(t[1],10),t[2]===""?(i.start1--,i.length1=1):t[2]=="0"?i.length1=0:(i.start1--,i.length1=parseInt(t[2],10)),i.start2=parseInt(t[3],10),t[4]===""?(i.start2--,i.length2=1):t[4]=="0"?i.length2=0:(i.start2--,i.length2=parseInt(t[4],10)),s++;s<f.length;){var n=f[s].charAt(0);try{var r=decodeURI(f[s].substring(1))}catch{throw new Error("Illegal escape in patch_fromText: "+r)}if(n=="-")i.diffs.push(new z.Diff(L,r));else if(n=="+")i.diffs.push(new z.Diff(E,r));else if(n==" ")i.diffs.push(new z.Diff(I,r));else{if(n=="@")break;if(n!=="")throw new Error('Invalid patch mode "'+n+'" in: '+r)}s++}}return p},z.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},z.patch_obj.prototype.toString=function(){var v,p;this.length1===0?v=this.start1+",0":this.length1==1?v=this.start1+1:v=this.start1+1+","+this.length1,this.length2===0?p=this.start2+",0":this.length2==1?p=this.start2+1:p=this.start2+1+","+this.length2;for(var f=["@@ -"+v+" +"+p+` @@ 988`],s,l=0;l<this.diffs.length;l++){switch(this.diffs[l][0]){case E:s="+";break;case L:s="-";break;case I:s=" ";break}f[l+1]=s+encodeURI(this.diffs[l][1])+` 989`}return f.join("").replace(/%20/g," ")},X.exports=z,X.exports.diff_match_patch=z,X.exports.DIFF_DELETE=L,X.exports.DIFF_INSERT=E,X.exports.DIFF_EQUAL=I}(Ke)),Ke.exports}var ft;function Dt(){return ft||(ft=1,function(X){Object.defineProperties(X,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const z=qe(),L=St();let E=Je();E=z.__toESM(E);let I=Xe();I=z.__toESM(I);let v=It();v=z.__toESM(v);var p=class extends I.Component{constructor(f){super(f),this.state={value:this.props.value},this.onChange=this.onChange.bind(this),this.diff=this.diff.bind(this)}componentDidUpdate(){const{value:f}=this.props;f!==this.state.value&&this.setState({value:f})}onChange(f){this.setState({value:f}),this.props.onChange&&this.props.onChange(f)}diff(){const f=new v.default,s=this.state.value[0],l=this.state.value[1];if(s.length===0&&l.length===0)return[];const t=f.diff_main(s,l);f.diff_cleanupSemantic(t);const i=this.generateDiffedLines(t);return this.setCodeMarkers(i)}generateDiffedLines(f){const s={DIFF_EQUAL:0,DIFF_DELETE:-1,DIFF_INSERT:1},l={left:[],right:[]},t={left:1,right:1};return f.forEach(i=>{const n=i[0],r=i[1];let e=r.split(` 990`).length-1;if(r.length===0)return;const o=r[0],a=r[r.length-1];let c=0;switch(n){case s.DIFF_EQUAL:t.left+=e,t.right+=e;break;case s.DIFF_DELETE:o===` 991`&&(t.left++,e--),c=e,c===0&&l.right.push({startLine:t.right,endLine:t.right}),a===` 992`&&(c-=1),l.left.push({startLine:t.left,endLine:t.left+c}),t.left+=e;break;case s.DIFF_INSERT:o===` 993`&&(t.right++,e--),c=e,c===0&&l.left.push({startLine:t.left,endLine:t.left}),a===` 994`&&(c-=1),l.right.push({startLine:t.right,endLine:t.right+c}),t.right+=e;break;default:throw new Error("Diff type was not defined.")}}),l}
994setCodeMarkers(f={left:[],right:[]}){const s=[],l={left:[],right:[]};for(let t=0;t<f.left.length;t++){const i={startRow:f.left[t].startLine-1,endRow:f.left[t].endLine,type:"text",className:"codeMarker"};l.left.push(i)}for(let t=0;t<f.right.length;t++){const i={startRow:f.right[t].startLine-1,endRow:f.right[t].endLine,type:"text",className:"codeMarker"};l.right.push(i)}return s[0]=l.left,s[1]=l.right,s}render(){const f=this.diff();return I.createElement(L.default,{name:this.props.name,className:this.props.className,focus:this.props.focus,orientation:this.props.orientation,splits:this.props.splits,mode:this.props.mode,theme:this.props.theme,height:this.props.height,width:this.props.width,fontSize:this.props.fontSize,showGutter:this.props.showGutter,onChange:this.onChange,onPaste:this.props.onPaste,onLoad:this.props.onLoad,onScroll:this.props.onScroll,minLines:this.props.minLines,maxLines:this.props.maxLines,readOnly:this.props.readOnly,highlightActiveLine:this.props.highlightActiveLine,showPrintMargin:this.props.showPrintMargin,tabSize:this.props.tabSize,cursorStart:this.props.cursorStart,editorProps:this.props.editorProps,style:this.props.style,scrollMargin:this.props.scrollMargin,setOptions:this.props.setOptions,wrapEnabled:this.props.wrapEnabled,enableBasicAutocompletion:this.props.enableBasicAutocompletion,enableLiveAutocompletion:this.props.enableLiveAutocompletion,value:this.state.value,markers:f})}};p.propTypes={cursorStart:E.number,editorProps:E.object,enableBasicAutocompletion:E.bool,enableLiveAutocompletion:E.bool,focus:E.bool,fontSize:E.number,height:E.string,highlightActiveLine:E.bool,maxLines:E.number,minLines:E.number,mode:E.string,name:E.string,className:E.string,onLoad:E.func,onPaste:E.func,onScroll:E.func,onChange:E.func,orientation:E.string,readOnly:E.bool,scrollMargin:E.array,setOptions:E.object,showGutter:E.bool,showPrintMargin:E.bool,splits:E.number,style:E.object,tabSize:E.number,theme:E.string,value:E.array,width:E.string,wrapEnabled:E.bool},p.defaultProps={cursorStart:1,editorProps:{},enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,focus:!1,fontSize:12,height:"500px",highlightActiveLine:!0,maxLines:null,minLines:null,mode:"",name:"ace-editor",onLoad:null,onScroll:null,onPaste:null,onChange:null,orientation:"beside",readOnly:!1,scrollMargin:[0,0,0,0],setOptions:{},showGutter:!0,showPrintMargin:!0,splits:2,style:{},tabSize:4,theme:"github",value:["",""],width:"500px",wrapEnabled:!0},X.default=p}(Ge)),Ge}var gt;function Ot(){return gt||(gt=1,function(X){Object.defineProperties(X,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const z=_t(),L=St(),E=Dt();var I=z.default;X.default=I,X.diff=E.default,X.split=L.default}(Be)),Be}var Nt=Ot();const pt=Ct(Nt);var Ye={exports:{}},mt;function Ft(){return mt||(mt=1,function(X,z){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(L,E,I){var v=L("../lib/oop"),p=L("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"text",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment.start",regex:"\\/\\*",next:"comment"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"punctuation.operator",regex:/[,]/},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'"|$',next:"start"},{defaultToken:"string"}],comment:[{token:"comment.end",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]}};v.inherits(f,p),E.JsonHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(L,E,I){var v=L("../range").Range,p=function(){};(function(){this.checkOutdent=function(f,s){return/^\s+$/.test(f)?/^\s*\}/.test(s):!1},this.autoOutdent=function(f,s){var l=f.getLine(s),t=l.match(/^(\s*\})/);if(!t)return 0;var i=t[1].length,n=f.findMatchingBracket({row:s,column:i});if(!n||n.row==s)return 0;var r=this.$getIndent(f.getLine(n.row));f.replace(new v(s,0,s,i-1),r)},this.$getIndent=function(f){return f.match(/^\s*/)[0]}}).call(p.prototype),E.MatchingBraceOutdent=p}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(L,E,I){var v=L("../../lib/oop"),p=L("../../range").Range,f=L("./fold_mode").FoldMode,s=E.FoldMode=function(l){l&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+l.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+l.end)))};v.inherits(s,f),(function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(l,t,i){var n=l.getLine(i);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var r=this._getFoldWidgetBase(l,t,i);return!r&&this.startRegionRe.test(n)?"start":r},this.getFoldWidgetRange=function(l,t,i,n){var r=l.getLine(i);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(l,r,i);var a=r.match(this.foldingStartMarker);if(a){var e=a.index;if(a[1])return this.openingBracketBlock(l,a[1],i,e);var o=l.getCommentFoldRange(i,e+a[0].length,1);return o&&!o.isMultiLine()&&(n?o=this.getSectionRange(l,i):t!="all"&&(o=null)),o}if(t!=="markbegin"){var a=r.match(this.foldingStopMarker);if(a){var e=a.index+a[0].length;return a[1]?this.closingBracketBlock(l,a[1],i,e):l.getCommentFoldRange(i,e,-1)}}}
994,this.getSectionRange=function(l,t){var i=l.getLine(t),n=i.search(/\S/),r=t,e=i.length;t=t+1;for(var o=t,a=l.getLength();++t<a;){i=l.getLine(t);var c=i.search(/\S/);if(c!==-1){if(n>c)break;var h=this.getFoldWidgetRange(l,"all",t);if(h){if(h.start.row<=r)break;if(h.isMultiLine())t=h.end.row;else if(n==c)break}o=t}}return new p(r,e,o,l.getLine(o).length)},this.getCommentRegionBlock=function(l,t,i){for(var n=t.search(/\s*$/),r=l.getLength(),e=i,o=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,a=1;++i<r;){t=l.getLine(i);var c=o.exec(t);if(c&&(c[1]?a--:a++,!a))break}var h=i;if(h>e)return new p(e,n,h,t.length)}}).call(s.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle","ace/worker/worker_client"],function(L,E,I){var v=L("../lib/oop"),p=L("./text").Mode,f=L("./json_highlight_rules").JsonHighlightRules,s=L("./matching_brace_outdent").MatchingBraceOutdent,l=L("./folding/cstyle").FoldMode,t=L("../worker/worker_client").WorkerClient,i=function(){this.HighlightRules=f,this.$outdent=new s,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new l};v.inherits(i,p),(function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(n,r,e){var o=this.$getIndent(r);if(n=="start"){var a=r.match(/^.*[\{\(\[]\s*$/);a&&(o+=e)}return o},this.checkOutdent=function(n,r,e){return this.$outdent.checkOutdent(r,e)},this.autoOutdent=function(n,r,e){this.$outdent.autoOutdent(r,e)},this.createWorker=function(n){var r=new t(["ace"],"ace/mode/json_worker","JsonWorker");return r.attachToDocument(n.getDocument()),r.on("annotate",function(e){n.setAnnotations(e.data)}),r.on("terminate",function(){n.clearAnnotations()}),r},this.$id="ace/mode/json"}).call(i.prototype),E.Mode=i}),function(){ace.require(["ace/mode/json"],function(L){X&&(X.exports=L)})}()}(Ye)),Ye.exports}Ft();var Qe={exports:{}},vt;function Wt(){return vt||(vt=1,function(X,z){ace.define("ace/theme/github-css",["require","exports","module"],function(L,E,I){I.exports=`/* CSS style content from github's default pygments highlighter template. 995 Cursor and selection styles from textmate.css. */ 996.ace-github .ace_gutter { 997 background: #e8e8e8; 998 color: #AAA; 999} 1000 1001.ace-github { 1002 background: #fff; 1003 color: #000; 1004} 1005 1006.ace-github .ace_keyword { 1007 font-weight: bold; 1008} 1009 1010.ace-github .ace_string { 1011 color: #D14; 1012} 1013 1014.ace-github .ace_variable.ace_class { 1015 color: teal; 1016} 1017 1018.ace-github .ace_constant.ace_numeric { 1019 color: #099; 1020} 1021 1022.ace-github .ace_constant.ace_buildin { 1023 color: #0086B3; 1024} 1025 1026.ace-github .ace_support.ace_function { 1027 color: #0086B3; 1028} 1029 1030.ace-github .ace_comment { 1031 color: #998; 1032 font-style: italic; 1033} 1034 1035.ace-github .ace_variable.ace_language { 1036 color: #0086B3; 1037} 1038 1039.ace-github .ace_paren { 1040 font-weight: bold; 1041} 1042 1043.ace-github .ace_boolean { 1044 font-weight: bold; 1045} 1046 1047.ace-github .ace_string.ace_regexp { 1048 color: #009926; 1049 font-weight: normal; 1050} 1051 1052.ace-github .ace_variable.ace_instance { 1053 color: teal; 1054} 1055 1056.ace-github .ace_constant.ace_language { 1057 font-weight: bold; 1058} 1059 1060.ace-github .ace_cursor { 1061 color: black; 1062} 1063 1064.ace-github.ace_focus .ace_marker-layer .ace_active-line { 1065 background: rgb(255, 255, 204); 1066} 1067.ace-github .ace_marker-layer .ace_active-line { 1068 background: rgb(245, 245, 245); 1069} 1070 1071.ace-github .ace_marker-layer .ace_selection { 1072 background: rgb(181, 213, 255); 1073} 1074 1075.ace-github.ace_multiselect .ace_selection.ace_start { 1076 box-shadow: 0 0 3px 0px white; 1077} 1078/* bold keywords cause cursor issues for some fonts */ 1079/* this disables bold style for editor and keeps for static highlighter */ 1080.ace-github.ace_nobold .ace_line > span { 1081 font-weight: normal !important; 1082} 1083 1084.ace-github .ace_marker-layer .ace_step { 1085 background: rgb(252, 255, 0); 1086} 1087 1088.ace-github .ace_marker-layer .ace_stack { 1089 background: rgb(164, 229, 101); 1090} 1091 1092.ace-github .ace_marker-layer .ace_bracket { 1093 margin: -1px 0 0 -1px; 1094 border: 1px solid rgb(192, 192, 192); 1095} 1096 1097.ace-github .ace_gutter-active-line { 1098 background-color : rgba(0, 0, 0, 0.07); 1099} 1100 1101.ace-github .ace_marker-layer .ace_selected-word { 1102 background: rgb(250, 250, 255); 1103 border: 1px solid rgb(200, 200, 250); 1104} 1105 1106.ace-github .ace_invisible { 1107 color: #BFBFBF 1108} 1109 1110.ace-github .ace_print-margin { 1111 width: 1px; 1112 background: #e8e8e8; 1113} 1114 1115.ace-github .ace_indent-guide { 1116 background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4b
1116Lly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y; 1117} 1118 1119.ace-github .ace_indent-guide-active { 1120 background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y; 1121} 1122`}),ace.define("ace/theme/github",["require","exports","module","ace/theme/github-css","ace/lib/dom"],function(L,E,I){E.isDark=!1,E.cssClass="ace-github",E.cssText=L("./github-css");var v=L("../lib/dom");v.importCssString(E.cssText,E.cssClass,!1)}),function(){ace.require(["ace/theme/github"],function(L){X&&(X.exports=L)})}()}(Qe)),Qe.exports}Wt();var Ze={exports:{}},yt;function Bt(){return yt||(yt=1,function(X,z){ace.define("ace/theme/monokai-css",["require","exports","module"],function(L,E,I){I.exports=`.ace-monokai .ace_gutter { 1123 background: #2F3129; 1124 color: #8F908A 1125} 1126 1127.ace-monokai .ace_print-margin { 1128 width: 1px; 1129 background: #555651 1130} 1131 1132.ace-monokai { 1133 background-color: #272822; 1134 color: #F8F8F2 1135} 1136 1137.ace-monokai .ace_cursor { 1138 color: #F8F8F0 1139} 1140 1141.ace-monokai .ace_marker-layer .ace_selection { 1142 background: #49483E 1143} 1144 1145.ace-monokai.ace_multiselect .ace_selection.ace_start { 1146 box-shadow: 0 0 3px 0px #272822; 1147} 1148 1149.ace-monokai .ace_marker-layer .ace_step { 1150 background: rgb(102, 82, 0) 1151} 1152 1153.ace-monokai .ace_marker-layer .ace_bracket { 1154 margin: -1px 0 0 -1px; 1155 border: 1px solid #49483E 1156} 1157 1158.ace-monokai .ace_marker-layer .ace_active-line { 1159 background: #202020 1160} 1161 1162.ace-monokai .ace_gutter-active-line { 1163 background-color: #272727 1164} 1165 1166.ace-monokai .ace_marker-layer .ace_selected-word { 1167 border: 1px solid #49483E 1168} 1169 1170.ace-monokai .ace_invisible { 1171 color: #52524d 1172} 1173 1174.ace-monokai .ace_entity.ace_name.ace_tag, 1175.ace-monokai .ace_keyword, 1176.ace-monokai .ace_meta.ace_tag, 1177.ace-monokai .ace_storage { 1178 color: #F92672 1179} 1180 1181.ace-monokai .ace_punctuation, 1182.ace-monokai .ace_punctuation.ace_tag { 1183 color: #fff 1184} 1185 1186.ace-monokai .ace_constant.ace_character, 1187.ace-monokai .ace_constant.ace_language, 1188.ace-monokai .ace_constant.ace_numeric, 1189.ace-monokai .ace_constant.ace_other { 1190 color: #AE81FF 1191} 1192 1193.ace-monokai .ace_invalid { 1194 color: #F8F8F0; 1195 background-color: #F92672 1196} 1197 1198.ace-monokai .ace_invalid.ace_deprecated { 1199 color: #F8F8F0; 1200 background-color: #AE81FF 1201} 1202 1203.ace-monokai .ace_support.ace_constant, 1204.ace-monokai .ace_support.ace_function { 1205 color: #66D9EF 1206} 1207 1208.ace-monokai .ace_fold { 1209 background-color: #A6E22E; 1210 border-color: #F8F8F2 1211} 1212 1213.ace-monokai .ace_storage.ace_type, 1214.ace-monokai .ace_support.ace_class, 1215.ace-monokai .ace_support.ace_type { 1216 font-style: italic; 1217 color: #66D9EF 1218} 1219 1220.ace-monokai .ace_entity.ace_name.ace_function, 1221.ace-monokai .ace_entity.ace_other, 1222.ace-monokai .ace_entity.ace_other.ace_attribute-name, 1223.ace-monokai .ace_variable { 1224 color: #A6E22E 1225} 1226 1227.ace-monokai .ace_variable.ace_parameter { 1228 font-style: italic; 1229 color: #FD971F 1230} 1231 1232.ace-monokai .ace_string { 1233 color: #E6DB74 1234} 1235 1236.ace-monokai .ace_comment { 1237 color: #75715E 1238} 1239 1240.ace-monokai .ace_indent-guide { 1241 background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y 1242} 1243 1244.ace-monokai .ace_indent-guide-active { 1245 background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y; 1246} 1247`}),ace.define("ace/theme/monokai",["require","exports","module","ace/theme/monokai-css","ace/lib/dom"],function(L,E,I){E.isDark=!0,E.cssClass="ace-monokai",E.cssText=L("./monokai-css");var v=L("../lib/dom");v.importCssString(E.cssText,E.cssClass,!1)}),function(){ace.require(["ace/theme/monokai"],function(L){X&&(X.exports=L)})}()}(Ze)),Ze.exports}Bt();const Pt=At((X,z)=>({vpnConfigs:[],hasFetchedInitialVPNConfigs:!1,isLoading:!1,fetchVPNConfigs:async()=>{X({isLoading:!0});try{const L=await fetch("https://closedvpn.io/auth/vpn-configs",{method:"GET",credentials:"include"}),E=await L.json();if(L.ok)X({vpnConfigs:E.vpnConfigs||[]}),z().hasFetchedInitialVPNConfigs||X({hasFetchedInitialVPNConfigs:!0});else throw new Error(E.message||"Error fetching VPN configurations")}catch(L){console.error("Error fetching VPN configurations:",L),X({vpnConfigs:[]})}finally{X({isLoading:!1})}},createVPNConfig:async(L,E)=>{try{const I=await fetch("https://closedvpn.io/auth/create-vpn-config",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:L,config:E})}),v=await I.json();if(I.ok)return await z().fetchVPNConfigs(),Fe.getState().fetchVpnExitNodes(),v.vpnConfig;throw new Error(v.message||"Error creating VPN configuration")}catch(I){throw console.error("Error creating VPN configuration:",I),I}},updateVPNConfig:async(L,E,I)=>{try{const v=await fetch(`https://closedvpn.io/auth/update-vpn-config/${L}`,{method:"PUT",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:E,config:I})}),p=await v.json();if(v.ok)return await z().fetchVPNConfigs(),Fe.getState().fetchVpnExitNodes(),p.vpnConfig;throw new Error(p.message||"Error updating VPN configuration")}catch(v){throw console.error("Error updating VPN configuration:",v),v}},deleteVPNConfig:async L=>{try{const E=await fetch(`https://closedvpn.io/auth/delete-vpn-config/${L}`,{method:"DELETE",credentials:"include"}),I=await E.json();if(E.ok)await z().fetchVPNConfigs(),Fe.getState().fetchVpnExitNodes();else throw new Error(I.message||"Error deleting VPN configuration")}catch(E){throw console.error("Error deleting VPN configuration:",E),E}},executeCommand:async(L,E)=>{try{const I=await fetch(`https://closedvpn.io/auth/execute-vpn-command/${L}`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({command:E})}),v=await I.json();if(I.ok)return v;throw v}catch(I){throw console.error(`Error executing command '${E}':`,I),I}}})),wt={description:"Default VPN configuration",access:[],dhcp:["1.1.1.1","8.8.8.8"],location:"",orgs:["*"],port:1980,private:{server:"",port:22,user:"",ssh_public_key:""},coordinates:[0,0],usage_percentage:0,img:"/img/countries/DF.png",commands:{deploy:"echo 1"}},zt=X=>{const z=new Date(X),L=z.getMonth()+1,E=z.getDate(),I=z.getFullYear(),v=z.getHours()%12||12,p=z.getMinutes().toString().padStart(2,"0"),f=z.getHours()>=12?"PM":"AM";return`${L}/${E}/${I} ${v}:${p} ${f}`},Ti=()=>{const{vpnConfigs:X,isLoading:z,hasFetchedInitialVPNConfigs:L,fetchVPNConfigs:E,createVPNConfig:I,updateVPNConfig:v,deleteVPNConfig:p,executeCommand:f}=Pt(),[s,l]=fe.useState({pageIndex:1,pageSize:10}),[t,i]=fe.useState(!1),[n,r]=fe.useState(!1),[e,o]=fe.useState(!1),[a,c]=fe.useState(""),[h,w]=fe.useState(null),[y,m]=fe.useState({name:"",config:JSON.stringify(wt,null,2)}),[d,C]=fe.useState(!1),[x,A]=fe.useState(!1),[M,_]=fe.useState(!1),{user:S}=Mt(),[$,g]=fe.useState({configId:null,command:null}),[u,b]=fe.useState(!1),[k,T]=fe.useState({title:"",stdout:"",stderr:""}),R=["[email protected]"],D=fe.useMemo(()=>
1247S&&R.includes(S.email),[S]);fe.useEffect(()=>{L||E()},[L,E]);const O=fe.useMemo(()=>D?!0:!z&&L?X.length>0:!1,[D,z,L,X.length]);fe.useEffect(()=>{const q=Math.ceil(X.length/s.pageSize);s.pageIndex>q&&q>0&&l(ee=>({...ee,pageIndex:q})),X.length===0&&l(ee=>({...ee,pageIndex:1}))},[X,s.pageSize]);const P=q=>{const ee=rt(s);q(ee),l(ee)},N=()=>{w(null);const q=rt(wt);S.email&&(q.access=[S.email]),m({name:"",config:JSON.stringify(q,null,2)}),i(!0)},F=q=>{w(q);const ee=!q.config||Object.keys(q.config).length===0?JSON.stringify({},null,2):JSON.stringify(q.config,null,2);m({name:q.name,config:ee}),r(!0)},W=async(q,ee)=>{var Ae,pe;g({configId:q._id,command:ee});const ye=ee.charAt(0).toUpperCase()+ee.slice(1);try{const j=await f(q._id,ee);T({title:`${ye} Result`,stdout:j.response.stdout,stderr:j.response.stderr})}catch(j){T({title:`${ye} Failed`,stdout:((Ae=j.response)==null?void 0:Ae.stdout)||"No standard output.",stderr:((pe=j.response)==null?void 0:pe.stderr)||"An unknown error occurred."})}finally{b(!0),g({configId:null,command:null})}},B=()=>{i(!1),r(!1),o(!1),c("")},H=()=>{o(!1),setTimeout(()=>{c("")},200)},U=async q=>{let ee;try{ee=JSON.parse(y.config)}catch{throw Ee.push(Y.jsx(xe,{type:"danger",title:"Invalid JSON",children:"Please check your JSON format for errors."}),{placement:"top-center"}),new Error("Invalid JSON")}try{q==="POST"?await I(y.name,ee):await v(h._id,y.name,ee),Ee.push(Y.jsxs(xe,{type:"success",title:"Success",children:["VPN configuration ",q==="POST"?"created":"updated"," successfully!"]}),{placement:"top-center"}),B()}catch(ye){Ee.push(Y.jsx(xe,{type:"danger",title:"Error",children:ye.message.includes("Unexpected end of JSON input")?"Invalid JSON format":ye.message}),{placement:"top-center"})}},K=async()=>{if(y.name.trim()!==""){C(!0);try{await U("POST")}catch(q){console.error("Error creating config:",q)}finally{C(!1)}}},V=async()=>{if(y.name.trim()!==""){A(!0);try{await U("PUT")}catch(q){console.error("Error updating config:",q)}finally{A(!1)}}},J=async()=>{if(a!==h.name){Ee.push(Y.jsx(xe,{type:"danger",title:"Error",children:"Incorrect name entered. Deletion cancelled."}),{placement:"top-center"}),H();return}_(!0),r(!1);try{await p(h._id),Ee.push(Y.jsx(xe,{type:"success",title:"Success",children:"VPN configuration deleted successfully!"}),{placement:"top-center"}),H()}catch(q){Ee.push(Y.jsx(xe,{type:"danger",title:"Error",children:q.message}),{placement:"top-center"})}finally{_(!1)}},te=fe.useMemo(()=>[{header:"Name",accessorKey:"name",cell:q=>Y.jsx("span",{children:q.row.original.name}),headerClassName:"text-left px-4 w-48",cellClassName:"text-left px-4 w-48"},{header:"Updated At",accessorKey:"updatedAt",cell:q=>Y.jsx("span",{children:zt(q.row.original.updatedAt)}),headerClassName:"text-left px-4 w-32",cellClassName:"text-left px-4 w-32"},{header:"Operations",accessorKey:"operations",cell:q=>{var Z;const ee=q.row.original,ye=(Z=ee.config)!=null&&Z.commands?Object.keys(ee.config.commands):[],Ae=$.configId!==null,pe=$.configId===ee._id;let j="Actions";if(pe&&(j=`${$.command.charAt(0).toUpperCase()+$.command.slice(1)}`),ye.length===0)return Y.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:"No actions"});const G=Y.jsx($e,{size:"sm",variant:"solid",disabled:Ae,loading:pe,children:j});return Y.jsx("div",{className:"inline-block",onClick:Q=>Q.stopPropagation(),children:Y.jsx(it,{renderTitle:G,placement:"bottom-start",menuClass:"vpn-actions-dropdown",children:ye.map(Q=>Y.jsx(it.Item,{disabled:Ae,onSelect:()=>W(ee,Q),children:Y.jsx("span",{className:"capitalize",children:Q})},Q))})})},headerClassName:"text-left px-4 w-32",cellClassName:"text-left px-4 w-32"}],[$]),{pageIndex:ce,pageSize:ue}=s,le=X.length,ge=(ce-1)*ue,ke=X.slice(ge,ge+ue),be={overlay:{backgroundColor:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center"},content:{position:"relative",inset:"auto",maxWidth:"800px",width:"100%",padding:"0",border:"none",background:"none"}},Oe={overlay:{backgroundColor:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center"},content:{position:"relative",inset:"auto",maxWidth:"500px",width:"100%",padding:"0",border:"none",background:"none"}};return Y.jsxs(kt,{children:[Y.jsxs(xt,{children:[Y.jsxs("div",{className:"flex flex-col gap-4",children:[Y.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-2",children:[Y.jsx("h3",{children:"VPN Configurations"}),O&&Y.jsx($e,{variant:"solid",icon:Y.jsx(Tt,{}),onClick:N,children:"Create New VPN Config"})]}),Y.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-200 dark:border-gray-700 p-6",children:z&&!L?Y.jsx("div",{className:"min-h-full flex flex-col items-center justify-center",children:Y.jsx(Et,{loading:!0})}):O?Y.jsx(Lt,{columns:te,data:ke,noData:X.length===0,loading:z,pagingData:{total:le,pageIndex:ce,pageSize:ue},onPaginationChange:q=>P(ee=>{ee.pageIndex=q}),onSelectChange:q=>P(ee=>{ee.pageSize=q,ee.pageIndex=1}),onRowClick:F}):Y.jsx("div",{className:"flex items-center justify-center p-6 text-center text-gray-500 dark:text-gray-400",children:Y.jsx("p",{children:"This page is not available. Please contact the OneFirewall team if you believe you should have access."})})})]}),Y.jsx(Ie,{isOpen:t,onClose:B,style:be,children:Y.jsxs("div",{className:"w-full",children:[Y.jsx("h3",{className:"text-xl font-semibold mb-4",children:"Create New VPN Configuration"}),Y.jsxs("div",{className:"space-y-4",children:[Y.jsxs("div",{children:[Y.jsx("label",{className:"block mb-1 font-medium",children:"Name"}),Y.jsx(We,{type:"text",value:y.name,onChange:q=>m(ee=>({...ee,name:q.target.value})),placeholder:"e.g., Default VPN Config",className:"w-full"})]}),Y.jsxs("div",{children:[Y.jsx("label",{className:"block mb-1 font-medium",children:"Configuration (JSON)"}),Y.jsx(pt,{mode:"json",theme:"monokai",name:"vpn-config-editor-new",value:y.config,onChange:q=>m(ee=>({...ee,config:q})),editorProps:{$blockScrolling:!0},fontSize:13,showPrintMargin:!1,showGutter:!0,highlightActiveLine:!0,width:"100%",height:"340px",setOptions:{enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,showLineNumbers:!0,tabSize:2,useWorker:!1,vScrollBarAlwaysVisible:!1,hScrollBarAlwaysVisible:!1},className:"rounded-md custom-ace-editor"})]})]}),Y.jsxs("div",{className:"mt-6 flex justify-end space-x-2",children:[Y.jsx($e,{variant:"outline",onClick:B,children:"Cancel"}),Y.jsx($e,{variant:"solid",onClick:K,disabled:y.name.trim()==="",loading:d,children:"Create"})]})]})}),Y.jsx(Ie,{isOpen:n,onClose:B,style:be,children:Y.jsxs("div",{className:"w-full",children:[Y.jsx("h3",{className:"text-xl font-semibold mb-4",children:"Edit VPN Configuration"}),Y.jsxs("div",{className:"space-y-4",children:[Y.jsxs("div",{children:[Y.jsx("label",{className:"block mb-1 font-medium",children:"Name"}),Y.jsx(We,{type:"text",value:y.name,onChange:q=>m(ee=>({...ee,name:q.target.value})),placeholder:"e.g., Default VPN Config",className:"w-full"})]}),Y.jsxs("div",{children:[Y.jsx("label",{className:"block mb-1 font-medium",children:"Configuration (JSON)"}),Y.jsx(pt,{mode:"json",theme:"monokai",value:y.config,onChange:q=>m(ee=>({...ee,config:q})),name:"vpn-config-editor-edit",editorProps:{$blockScrolling:!0},fontSize:13,showPrintMargin:!1,showGutter:!0,highlightActiveLine:!0,width:"100%",height:"340px",setOptions:{enableBasicAutocompletion:!1,enableLiveAutocompletion:!1,showLineNumbers:!0,tabSize:2,useWorker:!1,vScrollBarAlwaysVisible:!1,hScrollBarAlwaysVisible:!1},className:"rounded-md custom-ace-editor"})]})]}),Y.jsxs("div",{className:"mt-6 flex justify-between",children:[(D||X.length>0)&&Y.jsx($e,{variant:"solid",className:"bg-[#D32F3F] hover:bg-[#F7374F]",onClick:()=>o(!0),disabled:x,children:"Delete"}),Y.jsxs("div",{className:"flex space-x-2",children:[Y.jsx($e,{variant:"outline",onClick:B,children:"Cancel"}),Y.jsx($e,{variant:"solid",onClick:V,disabled:y.name.trim()==="",loading:x,children:"Save"})]})]})]})}),Y.jsx(Ie,{isOpen:e,onClose:H,style:Oe,children:Y.jsxs("div",{className:"w-full",children:[Y.jsx("h3",{className:"text-xl font-semibold mb-4",children:"Delete VPN Configuration"}),Y.jsxs("p",{className:"mb-4",children:["Are you sure you want to delete ",Y.jsx("strong",{children:h==null?void 0:h.name}),"? This action cannot be undone."]}),Y.jsxs("p",{className:"text-sm text-gray-500 dark:text-gray-400 mb-4",children:["Please type ",Y.jsxs("strong",{children:['"',h==null?void 0:h.name,'"']})," below to confirm."]}),Y.jsx(We,{value:a,onChange:q=>c(q.target.value),placeholder:"Enter VPN configuration name",className:"mb-4"}),Y.jsxs("div",{className:"mt-6 flex justify-end space-x-2",children:[Y.jsx($e,{variant:"outline",onClick:H,children:"Cancel"}),Y.jsx($e,{variant:"solid",className:"bg-[#D32F3F] hover:bg-[#F7374F]",onClick:J,disabled:a!==(h==null?void 0:h.name),loading:M,children:"Delete"})]})]})}),Y.jsx(Ie,{isOpen:u,onClose:()=>b(!1),style:be,children:Y.jsxs("div",{className:"w-full",children:[Y.jsx("h3",{className:"text-xl font-semibold mb-4",children:k.title}),Y.jsxs("div",{className:"space-y-4",children:[Y.jsxs("div",{children:[Y.jsx("label",{className:"block mb-2 font-medium text-gray-500 dark:text-gray-400",children:"Standard Output (stdout)"}),Y.jsx("div",{className:"w-full p-3 font-mono text-sm text-gray-900 dark:text-gray-100 rounded-md border border-gray-300 dark:border-gray-600",children:Y.jsx(nt,{style:{maxHeight:"160px"},children:Y.jsx("pre",{className:"whitespace-pre-wrap break-all",children:Y.jsx("code",{children:k.stdout||"(No standard output)"})})})})]}),k.stderr&&Y.jsxs("div",{children:[Y.jsx("label",{className:"block mb-2 font-medium text-gray-500 dark:text-gray-400",children:"Standard Error (stderr)"}),Y.jsx("div",{className:"w-full p-3 font-mono text-sm text-gray-900 dark:text-gray-100 rounded-md border border-gray-300 dark:border-gray-600",children:Y.jsx(nt,{style:{maxHeight:"160px"},children:Y.jsx("pre",{className:"whitespace-pre-wrap break-all",children:Y.jsx("code",{children:k.stderr})})})})]})]}),Y.jsx("div",{className:"mt-6 flex justify-end",children:Y.jsx($e,{variant:"solid",onClick:()=>b(!1),children:"Close"})})]})})]}),Y.jsx("style",{jsx:!0,children:` 1248 .custom-ace-editor { 1249 border: 1px solid #1f2d55; 1250 border-radius: 4px; 1251 overflow: hidden; 1252 } 1253 .custom-ace-editor .ace_scrollbar, 1254 .custom-ace-editor .ace_scrollbar-v, 1255 .custom-ace-editor .ace_scrollbar-h { 1256 display: none !important; 1257 } 1258 .custom-ace-editor .ace_scroller { 1259 width: 100% !important; 1260 right: 0 !important; 1261 overflow: hidden !important; 1262 } 1263 .vpn-actions-dropdown { 1264 margin-top: 5px; 1265 } 1266 `})]})};export{Ti as default};
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.