!function(e,t){"object"==typeofexports&&"object"==typeofmodule?module.exports=t():"function"==typeofdefine&&define.amd?define(t):"object"==typeofexports?exports.JSONEditor=t():e.JSONEditor=t()}(this,function(){returnfunction(e){functiont(n){if(i[n])returni[n].exports;varr=i[n]={exports:{},id:n,loaded:!1};returne[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}vari={};returnt.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){functionn(e,t,i){if(!(thisinstanceofn))thrownewError('JSONEditor constructor called without "new".');varr=l.getInternetExplorerVersion();if(-1!=r&&9>r)thrownewError("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");if(t&&(t.error&&(console.warn('Option "error" has been renamed to "onError"'),t.onError=t.error,deletet.error),t.change&&(console.warn('Option "change" has been renamed to "onChange"'),t.onChange=t.change,deletet.change),t.editable&&(console.warn('Option "editable" has been renamed to "onEditable"'),t.onEditable=t.editable,deletet.editable),t)){varo=["ace","theme","ajv","schema","onChange","onEditable","onError","onModeChange","escapeUnicode","history","search","mode","modes","name","indentation"];Object.keys(t).forEach(function(e){-1===o.indexOf(e)&&console.warn('Unknown option "'+e+'". This option will be ignored')})}arguments.length&&this._create(e,t,i)}varr;try{r=i(4)}catch(o){}vars=i(1),a=i(2),l=i(3);n.modes={},n.prototype.DEBOUNCE_INTERVAL=150,n.prototype._create=function(e,t,i){this.container=e,this.options=t||{},this.json=i||{};varn=this.options.mode||"tree";this.setMode(n)},n.prototype._delete=function(){},n.prototype.set=function(e){this.json=e},n.prototype.get=function(){returnthis.json},n.prototype.setText=function(e){this.json=l.parse(e)},n.prototype.getText=function(){returnJSON.stringify(this.json)},n.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},n.prototype.getName=function(){returnthis.options&&this.options.name},n.prototype.setMode=function(e){vart,i,r=this.container,o=l.extend({},this.options),s=o.mode;o.mode=e;vara=n.modes[e];if(!a)thrownewError('Unknown mode "'+o.mode+'"');try{varc="text"==a.data;if(i=this.getName(),t=this[c?"getText":"get"](),this._delete(),l.clear(this),l.extend(this,a.mixin),this.create(r,o),this.setName(i),this[c?"setText":"set"](t),"function"==typeofa.load)try{a.load.call(this)}catch(h){console.error(h)}if("function"==typeofo.onModeChange&&e!==s)try{o.onModeChange(e,s)}catch(h){console.error(h)}}catch(h){this._onError(h)}},n.prototype.getMode=function(){returnthis.options.mode},n.prototype._onError=function(e){if(!this.options||"function"!=typeofthis.options.onError)throwe;this.options.onError(e)},n.prototype.setSchema=function(e){if(e){vart;try{t=this.options.ajv||r({allErrors:!0,verbose:!0})}catch(i){console.warn("Failed to create an instance of Ajv, JSON Schema validation is not available. Please use a JSONEditor bundle including Ajv, or pass an instance of Ajv as via the configuration option `ajv`.")}t&&(this.validateSchema=t.compile(e),this.options.schema=e,this.validate())}elsethis.validateSchema=null,this.options.schema=null,this.validate()},n.prototype.validate=function(){},n.registerMode=function(e){vart,i;if(l.isArray(e))for(t=0;t<e.length;t++)n.registerMode(e[t]);else{if(!("mode"ine))thrownewError('Property "mode" missing');if(!("mixin"ine))thrownewError('Property "mixin" missing');if(!("data"ine))thrownewError('Property "data" missing');varr=e.mode;if(rinn.modes)thrownewError('Mode "'+r+'" already registered');if("function"!=typeofe.mixin.create)thrownewError('Required function "create" missing on mixin');varo=["setMode","registerMode","modes"];for(t=0;t<o.length;t++)if(i=o[t],iine.mixin)thrownewError('Reserved property "'+i+'" not allowed in mixin');n.modes[r]=e}},n.registerMode(s),n.registerMode(a),e.exports=n},function(e,t,i){varn=i(5),r=i(6),o=i(7),s=i(8),a=i(9),l=i(10),c=i(3),h={};h.create=function(e,t){if(!e)thrownewError("No container element provided.");this.container=e,this.dom={}
e.node.setHighlight(!1),e.node=void0,e.unhighlightTimer=void0},0))}},n.prototype._cancelUnhighlight=function(){this.unhighlightTimer&&(clearTimeout(this.unhighlightTimer),this.unhighlightTimer=void0)},n.prototype.lock=function(){this.locked=!0},n.prototype.unlock=function(){this.locked=!1},e.exports=n},function(e,t,i){functionn(e){this.editor=e,this.clear(),this.actions={editField:{undo:function(e){e.node.updateField(e.oldValue)},redo:function(e){e.node.updateField(e.newValue)}},editValue:{undo:function(e){e.node.updateValue(e.oldValue)},redo:function(e){e.node.updateValue(e.newValue)}},changeType:{undo:function(e){e.node.changeType(e.oldType)},redo:function(e){e.node.changeType(e.newType)}},appendNodes:{undo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})},redo:function(e){e.nodes.forEach(function(t){e.parent.appendChild(t)})}},insertBeforeNodes:{undo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})},redo:function(e){e.nodes.forEach(function(t){e.parent.insertBefore(t,e.beforeNode)})}},insertAfterNodes:{undo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})},redo:function(e){vart=e.afterNode;e.nodes.forEach(function(i){e.parent.insertAfter(e.node,t),t=i})}},removeNodes:{undo:function(e){vart=e.parent,i=t.childs[e.index]||t.append;e.nodes.forEach(function(e){t.insertBefore(e,i)})},redo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})}},duplicateNodes:{undo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})},redo:function(e){vart=e.afterNode;e.nodes.forEach(function(i){e.parent.insertAfter(i,t),t=i})}},moveNodes:{undo:function(e){e.nodes.forEach(function(t){e.oldBeforeNode.parent.moveBefore(t,e.oldBeforeNode)})},redo:function(e){e.nodes.forEach(function(t){e.newBeforeNode.parent.moveBefore(t,e.newBeforeNode)})}},sort:{undo:function(e){vart=e.node;t.hideChilds(),t.sort=e.oldSort,t.childs=e.oldChilds,t.showChilds()},redo:function(e){vart=e.node;t.hideChilds(),t.sort=e.newSort,t.childs=e.newChilds,t.showChilds()}}}}i(3);n.prototype.onChange=function(){},n.prototype.add=function(e,t){this.index++,this.history[this.index]={action:e,params:t,timestamp:newDate},this.index<this.history.length-1&&this.history.splice(this.index+1,this.history.length-this.index-1),this.onChange()},n.prototype.clear=function(){this.history=[],this.index=-1,this.onChange()},n.prototype.canUndo=function(){returnthis.index>=0},n.prototype.canRedo=function(){returnthis.index<this.history.length-1},n.prototype.undo=function(){if(this.canUndo()){vare=this.history[this.index];if(e){vart=this.actions[e.action];t&&t.undo?(t.undo(e.params),e.params.oldSelection&&this.editor.setSelection(e.params.oldSelection)):console.error(newError('unknown action "'+e.action+'"'))}this.index--,this.onChange()}},n.prototype.redo=function(){if(this.canRedo()){this.index++;vare=this.history[this.index];if(e){vart=this.actions[e.action];t&&t.redo?(t.redo(e.params),e.params.newSelection&&this.editor.setSelection(e.params.newSelection)):console.error(newError('unknown action "'+e.action+'"'))}this.onChange()}},e.exports=n},function(e,t,i){functionn(e,t){vari=this;this.editor=e,this.timeout=void0,this.delay=200,this.lastText=void0,this.dom={},this.dom.container=t;varn=document.createElement("table");this.dom.table=n,n.className="jsoneditor-search",t.appendChild(n);varr=document.createElement("tbody");this.dom.tbody=r,n.appendChild(r);varo=document.createElement("tr");r.appendChild(o);vars=document.createElement("td");o.appendChild(s);vara=document.createElement("div");this.dom.results=a,a.className="jsoneditor-results",s.appendChild(a),s=document.createElement("td"),o.appendChild(s);varl=document.createElement("div");this.dom.input=l,l.className="jsoneditor-frame",l.title="Search fields and values",s.appendChild(l);varc=document.createElement("table");l.appendChild(c);varh=document.createElement("tbody");c.appendChild(h),o=document.createElement("tr"),h.appendChild(o);vard=document.createElement("button");d.className="jsoneditor-refresh",s=document.createElement("td"),
e&&e.recurse===!0&&this.childs&&this.childs.forEach(function(t){t.updateDom(e)}),this.append&&this.append.updateDom()},n.prototype._updateDomIndexes=function(){vare=this.dom.value,t=this.childs;e&&t&&("array"==this.type?t.forEach(function(e,t){e.index=t;vari=e.dom.field;i&&(i.innerHTML=t)}):"object"==this.type&&t.forEach(function(e){void0!=e.index&&(deletee.index,void0==e.field&&(e.field=""))}))},n.prototype._createDomValue=function(){vare;return"array"==this.type?(e=document.createElement("div"),e.innerHTML="[...]"):"object"==this.type?(e=document.createElement("div"),e.innerHTML="{...}"):!this.editable.value&&s.isUrl(this.value)?(e=document.createElement("a"),e.href=this.value,e.target="_blank",e.innerHTML=this._escapeHTML(this.value)):(e=document.createElement("div"),e.contentEditable=this.editable.value,e.spellcheck=!1,e.innerHTML=this._escapeHTML(this.value)),e},n.prototype._createDomExpandButton=function(){vare=document.createElement("button");returnthis._hasChilds()?(e.className=this.expanded?"jsoneditor-expanded":"jsoneditor-collapsed",e.title="Click to expand/collapse this field (Ctrl+E). \nCtrl+Click to expand/collapse including all childs."):(e.className="jsoneditor-invisible",e.title=""),e},n.prototype._createDomTree=function(){vare=this.dom,t=document.createElement("table"),i=document.createElement("tbody");t.style.borderCollapse="collapse",t.className="jsoneditor-values",t.appendChild(i);varn=document.createElement("tr");i.appendChild(n);varr=document.createElement("td");r.className="jsoneditor-tree",n.appendChild(r),e.expand=this._createDomExpandButton(),r.appendChild(e.expand),e.tdExpand=r;varo=document.createElement("td");o.className="jsoneditor-tree",n.appendChild(o),e.field=this._createDomField(),o.appendChild(e.field),e.tdField=o;vars=document.createElement("td");s.className="jsoneditor-tree",n.appendChild(s),"object"!=this.type&&"array"!=this.type&&(s.appendChild(document.createTextNode(":")),s.className="jsoneditor-separator"),e.tdSeparator=s;vara=document.createElement("td");returna.className="jsoneditor-tree",n.appendChild(a),e.value=this._createDomValue(),a.appendChild(e.value),e.tdValue=a,t},n.prototype.onEvent=function(e){vart,i=e.type,n=e.target||e.srcElement,r=this.dom,o=this,a=this._hasChilds();if((n==r.drag||n==r.menu)&&("mouseover"==i?this.editor.highlighter.highlight(this):"mouseout"==i&&this.editor.highlighter.unhighlight()),"click"==i&&n==r.menu){varl=o.editor.highlighter;l.highlight(o),l.lock(),s.addClassName(r.menu,"jsoneditor-selected"),this.showContextMenu(r.menu,function(){s.removeClassName(r.menu,"jsoneditor-selected"),l.unlock(),l.unhighlight()})}if("click"==i&&(n==r.expand||("view"===o.editor.options.mode||"form"===o.editor.options.mode)&&"DIV"===n.nodeName)&&a){varc=e.ctrlKey;this._onExpand(c)}"change"==i&&n==r.checkbox&&(this.dom.value.innerHTML=!this.value,this._getDomValue());varh=r.value;if(n==h)switch(i){case"focus":t=this;break;case"blur":case"change":this._getDomValue(!0),this._updateDomValue(),this.value&&(h.innerHTML=this._escapeHTML(this.value));break;case"input":this._getDomValue(!0),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"click":(e.ctrlKey||!this.editable.value)&&s.isUrl(this.value)&&window.open(this.value,"_blank");break;case"keyup":this._getDomValue(!0),this._updateDomValue();break;case"cut":case"paste":setTimeout(function(){o._getDomValue(!0),o._updateDomValue()},1)}vard=r.field;if(n==d)switch(i){case"focus":t=this;break;case"blur":case"change":this._getDomField(!0),this._updateDomField(),this.field&&(d.innerHTML=this._escapeHTML(this.field));break;case"input":this._getDomField(!0),this._updateDomField();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"keyup":this._getDomField(!0),this._updateDomField();break;case"cut":case"paste":setTimeout(function(){o._getDomField(!0),o._updateDomField()},1)}varu=r.tree;if(n==u.parentNode&&"click"==i&&!e.hasMoved){varf=void0!=e.offsetX?e.offsetX<24*(this.getLevel()+1):e.pageX<s.g
vari=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>3&&t.dragDrop()}if("dragWait"===this.state){vari=r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);i>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;vart=this.editor,i=e.inSelection(),n=e.getButton(),r=e.domEvent.detail||1;if(1===r&&0===n&&i){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();varo=e.domEvent.target||e.domEvent.srcElement;if("unselectable"ino&&(o.unselectable="on"),t.getDragDelay()){if(a.isWebKit){this.cancelDrag=!0;vars=t.container;s.draggable=!0}this.setState("dragWait")}elsethis.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(n.prototype),t.DragdropHandler=n}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";varn=e("./dom");t.get=function(e,t){vari=newXMLHttpRequest;i.open("GET",e,!0),i.onreadystatechange=function(){4===i.readyState&&t(i.responseText)},i.send(null)},t.loadScript=function(e,t){vari=n.getDocumentHead(),r=document.createElement("script");r.src=e,i.appendChild(r),r.onload=r.onreadystatechange=function(e,i){(i||!r.readyState||"loaded"==r.readyState||"complete"==r.readyState)&&(r=r.onload=r.onreadystatechange=null,i||t())}},t.qualifyURL=function(e){vart=document.createElement("a");returnt.href=e,t.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(e,t,i){"use strict";varn={},r=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};n._emit=n._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});vari=this._eventRegistry[e]||[],n=this._defaultHandlers[e];if(i.length||n){"object"==typeoft&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=r),t.preventDefault||(t.preventDefault=o),i=i.slice();for(vars=0;s<i.length&&(i[s](t,this),!t.propagationStopped);s++);returnn&&!t.defaultPrevented?n(t,this):void0}},n._signal=function(e,t){vari=(this._eventRegistry||{})[e];if(i){i=i.slice();for(varn=0;n<i.length;n++)i[n](t,this)}},n.once=function(e,t){vari=this;t&&this.addEventListener(e,functionn(){i.removeEventListener(e,n),t.apply(null,arguments)})},n.setDefaultHandler=function(e,t){vari=this._defaultHandlers;if(i||(i=this._defaultHandlers={_disabled_:{}}),i[e]){varn=i[e],r=i._disabled_[e];r||(i._disabled_[e]=r=[]),r.push(n);varo=r.indexOf(t);-1!=o&&r.splice(o,1)}i[e]=t},n.removeDefaultHandler=function(e,t){vari=this._defaultHandlers;if(i){varn=i._disabled_[e];if(i[e]==t){i[e];n&&this.setDefaultHandler(e,n.pop())}elseif(n){varr=n.indexOf(t);-1!=r&&n.splice(r,1)}}},n.on=n.addEventListener=function(e,t,i){this._eventRegistry=this._eventRegistry||{};varn=this._eventRegistry[e];returnn||(n=this._eventRegistry[e]=[]),-1==n.indexOf(t)&&n[i?"unshift":"push"](t),t},n.off=n.removeListener=n.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};vari=this._eventRegistry[e];if(i){varn=i.indexOf(t);-1!==n&&i.splice(n,1)}},n.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=n}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,i){"no use strict";functionn(e){"undefined"!=typeofconsole&&console.warn&&console.warn.apply(console,arguments)}functionr(e,t){vari=newError(e);i.data=t,"object"==typeofconsole&&console.error&&console.error(i),setTimeout(function(){throwi})}varo=e("./oop"),s=e("./event_emitter").EventEmitter,a={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){vart={};returne?Array.isArray(e)||(t=e,e=Object.keys(t)):e=Object.keys(this.$options),e.forEach(function(e){t[e]=this.getOption(e)},this),t},setOption:function(e,t){if(this["$"+e]!==t){vari=this.$options[e];if(!i)returnn('misspelled option "'+e+'"'
a.lastIndex=0;for(varl,c=[],h=0,d=0,u={type:null,value:""};l=a.exec(e);){varf=s.defaultToken,p=null,g=l[0],m=a.lastIndex;if(m-g.length>h){varv=e.substring(h,m-g.length);u.type==f?u.value+=v:(u.type&&c.push(u),u={type:f,value:v})}for(varw=0;w<l.length-2;w++)if(void0!==l[w+1]){p=o[s[w]],f=p.onMatch?p.onMatch(g,n,i):p.token,p.next&&(n="string"==typeofp.next?p.next:p.next(n,i),o=this.states[n],o||(this.reportError("state doesn't exist",n),n="start",o=this.states[n]),s=this.matchMappings[n],h=m,a=this.regExps[n],a.lastIndex=m);break}if(g)if("string"==typeoff)p&&p.merge===!1||u.type!==f?(u.type&&c.push(u),u={type:f,value:g}):u.value+=g;elseif(f){u.type&&c.push(u),u={type:null,value:""};for(varw=0;w<f.length;w++)c.push(f[w])}if(h==e.length)break;if(h=m,d++>r){for(d>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});h<e.length;)u.type&&c.push(u),u={value:e.substring(h,h+=2e3),type:"overflow"};n="start",i=[];break}}returnu.type&&c.push(u),i.length>1&&i[0]!==n&&i.unshift("#tmp",n),{tokens:c,state:i.length?i:n}},this.reportError=n.reportError}).call(o.prototype),t.Tokenizer=o}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t,i){"use strict";varn=e("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(variine){for(varn=e[i],r=0;r<n.length;r++){varo=n[r];(o.next||o.onMatch)&&("string"==typeofo.next&&0!==o.next.indexOf(t)&&(o.next=t+o.next),o.nextState&&0!==o.nextState.indexOf(t)&&(o.nextState=t+o.nextState))}this.$rules[t+i]=n}elsefor(variine)this.$rules[i]=e[i]},this.getRules=function(){returnthis.$rules},this.embedRules=function(e,t,i,r,o){vars="function"==typeofe?(newe).getRules():e;if(r)for(vara=0;a<r.length;a++)r[a]=t+r[a];else{r=[];for(varlins)r.push(t+l)}if(this.addRules(s,t),i)for(varc=Array.prototype[o?"push":"unshift"],a=0;a<r.length;a++)c.apply(this.$rules[r[a]],n.deepCopy(i));this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){returnthis.$embeds};vare=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){returnt.shift(),t.shift()||"start"};this.normalizeRules=function(){functioni(o){vars=r[o];s.processed=!0;for(vara=0;a<s.length;a++){varl=s[a];!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);varc=l.next||l.push;if(c&&Array.isArray(c)){varh=l.stateName;h||(h=l.token,"string"!=typeofh&&(h=h[0]||""),r[h]&&(h+=n++)),r[h]=c,l.next=h,i(h)}else"pop"==c&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,deletel.push),l.rules)for(vardinl.rules)r[d]?r[d].push&&r[d].push.apply(r[d],l.rules[d]):r[d]=l.rules[d];if(l.include||"string"==typeofl)varu=l.include||l,f=r[u];elseArray.isArray(l)&&(f=l);if(f){varp=[a,1].concat(f);l.noEscape&&(p=p.filter(function(e){return!e.next})),s.splice.apply(s,p),a--,f=null}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),deletel.defaultToken)}}varn=0,r=this.$rules;Object.keys(r).forEach(i,this)},this.createKeywordMapper=function(e,t,i,n){varr=Object.create(null);returnObject.keys(e).forEach(function(t){varo=e[t];i&&(o=o.toLowerCase());for(vars=o.split(n||"|"),a=s.length;a--;)r[s[a]]=t}),Object.getPrototypeOf(r)&&(r.__proto__=null),this.$keywordList=Object.keys(r),e=null,i?function(e){returnr[e.toLowerCase()]||t}:function(e){returnr[e]||t}},this.getKeywords=function(){returnthis.$keywords}}).call(r.prototype),t.TextHighlightRules=r}),ace.define("ace/mode/behaviour",["require","exports","module"],function(e,t,i){"use strict";varn=function(){this.$behaviours={}};(function(){this.add=function(e,t,i){switch(void0){casethis.$behaviours:this.$behaviours={};casethis.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=i},this.addBehaviours=function(e){for(vartine)for(variine[t])
returnthis.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){returnthis.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){returnthis.getOption("fontSize")||r.computedStyle(this.container,"fontSize")},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){vare=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;vart=e.session;if(t&&t.bgTokenizer){vari=t.findMatchingBracket(e.getCursorPosition());if(i)varn=newf(i.row,i.column,i.row,i.column+1);elseif(t.$mode.getMatching)varn=t.$mode.getMatching(e.session);n&&(t.$bracketHighlight=t.addMarker(n,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){vare=this;this.$highlightTagPending=!0,setTimeout(function(){e.$highlightTagPending=!1;vart=e.session;if(t&&t.bgTokenizer){vari=e.getCursorPosition(),n=neww(e.session,i.row,i.column),r=n.getCurrentToken();if(!r||!/\b(?:tag-open|tag-name)/.test(r.type))returnt.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==r.type.indexOf("tag-open")||(r=n.stepForward())){varo=r.value,s=0,a=n.stepBackward();if("<"==a.value){doa=r,r=n.stepForward(),r&&r.value===o&&-1!==r.type.indexOf("tag-name")&&("<"===a.value?s++:"</"===a.value&&s--);while(r&&s>=0)}else{dor=a,a=n.stepBackward(),r&&r.value===o&&-1!==r.type.indexOf("tag-name")&&("<"===a.value?s++:"</"===a.value&&s--);while(a&&0>=s);n.stepForward()}if(!r)returnt.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);varl=n.getCurrentTokenRow(),c=n.getCurrentTokenColumn(),h=newf(l,c,l,c+r.value.length);t.$tagHighlight&&0!==h.compareRange(t.$backMarkers[t.$tagHighlight].range)&&(t.removeMarker(t.$tagHighlight),t.$tagHighlight=null),h&&!t.$tagHighlight&&(t.$tagHighlight=t.addMarker(h,"ace_bracket","text"))}}},50)}},this.focus=function(){vare=this;setTimeout(function(){e.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){returnthis.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},this.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(e){vart=this.session.$useWrapMode,i=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,i,t),this._signal("change",e),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(e){vart=e.data;this.renderer.updateLines(t.first,t.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||(v.warn("Automatically scrolling cursor into view after selection change","this will be disabled in the next version","set editor.$blockScrolling = Infinity to disable this message"),this.renderer.scrollCursorIntoView()),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){vare,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;elseif(!t.$highlightLineMarker&&e){vari=newf(e.row,e.column,e.row,1/0);i.id=t.addMarker(i,"ace_a