ace-builds
Version:
Ace (Ajax.org Cloud9 Editor)
1 lines • 78.7 kB
JavaScript
"no use strict";!function(e){function t(e,t){var n=e,r="";while(n){var i=t[n];if(typeof i=="string")return i+r;if(i)return i.location.replace(/\/*$/,"/")+(r||i.main||i.name);if(i===!1)return"";var s=n.lastIndexOf("/");if(s===-1)break;r=n.substr(s)+r,n=n.slice(0,s)}return e}if(typeof e.window!="undefined"&&e.document)return;if(e.require&&e.define)return;e.console||(e.console=function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console),e.window=e,e.ace=e,e.onerror=function(e,t,n,r,i){postMessage({type:"error",data:{message:e,data:i&&i.data,file:t,line:n,col:r,stack:i&&i.stack}})},e.normalizeModule=function(t,n){if(n.indexOf("!")!==-1){var r=n.split("!");return e.normalizeModule(t,r[0])+"!"+e.normalizeModule(t,r[1])}if(n.charAt(0)=="."){var i=t.split("/").slice(0,-1).join("/");n=(i?i+"/":"")+n;while(n.indexOf(".")!==-1&&s!=n){var s=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return n},e.require=function(r,i){i||(i=r,r=null);if(!i.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");i=e.normalizeModule(r,i);var s=e.require.modules[i];if(s)return s.initialized||(s.initialized=!0,s.exports=s.factory().exports),s.exports;if(!e.require.tlns)return console.log("unable to load "+i);var o=t(i,e.require.tlns);return o.slice(-3)!=".js"&&(o+=".js"),e.require.id=i,e.require.modules[i]={},importScripts(o),e.require(r,i)},e.require.modules={},e.require.tlns={},e.define=function(t,n,r){arguments.length==2?(r=n,typeof t!="string"&&(n=t,t=e.require.id)):arguments.length==1&&(r=t,n=[],t=e.require.id);if(typeof r!="function"){e.require.modules[t]={exports:r,initialized:!0};return}n.length||(n=["require","exports","module"]);var i=function(n){return e.require(t,n)};e.require.modules[t]={exports:{},factory:function(){var e=this,t=r.apply(this,n.slice(0,r.length).map(function(t){switch(t){case"require":return i;case"exports":return e.exports;case"module":return e;default:return i(t)}}));return t&&(e.exports=t),e}}},e.define.amd={},e.require.tlns={},e.initBaseUrls=function(t){for(var n in t)this.require.tlns[n]=t[n]},e.initSender=function(){var n=e.require("ace/lib/event_emitter").EventEmitter,r=e.require("ace/lib/oop"),i=function(){};return function(){r.implement(this,n),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(i.prototype),new i};var n=e.main=null,r=e.sender=null;e.onmessage=function(t){var i=t.data;if(i.event&&r)r._signal(i.event,i.data);else if(i.command)if(n[i.command])n[i.command].apply(n,i.args);else{if(!e[i.command])throw new Error("Unknown command:"+i.command);e[i.command].apply(e,i.args)}else if(i.init){e.initBaseUrls(i.tlns),r=e.sender=e.initSender();var s=this.require(i.module)[i.classname];n=e.main=new s(r)}}}(this),define("ace/lib/oop",[],function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),define("ace/apply_delta",[],function(e,t,n){"use strict";function r(e,t){throw console.log("Invalid Delta:",e),"Invalid Delta: "+t}function i(e,t){return t.row>=0&&t.row<e.length&&t.column>=0&&t.column<=e[t.row].length}function s(e,t){t.action!="insert"&&t.action!="remove"&&r(t,"delta.action must be 'insert' or 'remove'"),t.lines instanceof Array||r(t,"delta.lines must be an Array"),(!t.start||!t.end)&&r(t,"delta.start/end must be an present");var n=t.start;i(e,t.start)||r(t,"delta.start must be contained in document");var s=t.end;t.action=="remove"&&!i(e,s)&&r(t,"delta.end must contained in document for 'remove' actions");var o=s.row-n.row,u=s.column-(o==0?n.column:0);(o!=t.lines.length-1||t.lines[o].length!=u)&&r(t,"delta.range must match delta lines")}t.applyDelta=function(e,t,n){var r=t.start.row,i=t.start.column,s=e[r]||"";switch(t.action){case"insert":var o=t.lines;if(o.length===1)e[r]=s.substring(0,i)+t.lines[0]+s.substring(i);else{var u=[r,1].concat(t.lines);e.splice.apply(e,u),e[r]=s.substring(0,i)+e[r],e[r+t.lines.length-1]+=s.substring(i)}break;case"remove":var a=t.end.column,f=t.end.row;r===f?e[r]=s.substring(0,i)+s.substring(a):e.splice(r,f-r+1,s.substring(0,i)+e[f].substring(a))}}}),define("ace/lib/event_emitter",[],function(e,t,n){"use strict";var r={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;this.on(e,function r(){n.off(e,r),t.apply(null,arguments)});if(!t)return new Promise(function(e){t=e})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t)r&&this.setDefaultHandler(e,r.pop());else if(r){var i=r.indexOf(t);i!=-1&&r.splice(i,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=undefined),this._eventRegistry&&(this._eventRegistry[e]=undefined),this._defaultHandlers&&(this._defaultHandlers[e]=undefined)},t.EventEmitter=r}),define("ace/range",[],function(e,t,n){"use strict";var r=function(){function e(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}}return e.prototype.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},e.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return this.compare(e,t)==0},e.prototype.compareRange=function(e){var t,n=e.end,r=e.start;return t=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},e.prototype.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},e.prototype.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},e.prototype.insideEnd=function(e,t){return this.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},e.prototype.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,n){if(this.end.row>n)var r={row:n+1,column:0};else if(this.end.row<t)var r={row:t,column:0};if(this.start.row>n)var i={row:n+1,column:0};else if(this.start.row<t)var i={row:t,column:0};return e.fromPoints(i||this.start,r||this.end)},e.prototype.extend=function(t,n){var r=this.compare(t,n);if(r==0)return this;if(r==-1)var i={row:t,column:n};else var s={row:t,column:n};return e.fromPoints(i||this.start,s||this.end)},e.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},e.prototype.isMultiLine=function(){return this.start.row!==this.end.row},e.prototype.clone=function(){return e.fromPoints(this.start,this.end)},e.prototype.collapseRows=function(){return this.end.column==0?new e(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new e(this.start.row,0,this.end.row,0)},e.prototype.toScreenRange=function(t){var n=t.documentToScreenPosition(this.start),r=t.documentToScreenPosition(this.end);return new e(n.row,n.column,r.row,r.column)},e.prototype.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t},e}();r.fromPoints=function(e,t){return new r(e.row,e.column,t.row,t.column)},r.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=r}),define("ace/anchor",[],function(e,t,n){"use strict";function o(e,t,n){var r=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&r}function u(e,t,n){var r=e.action=="insert",i=(r?1:-1)*(e.end.row-e.start.row),s=(r?1:-1)*(e.end.column-e.start.column),u=e.start,a=r?u:e.end;return o(t,u,n)?{row:t.row,column:t.column}:o(a,t,!n)?{row:t.row+i,column:t.column+(t.row==a.row?s:0)}:{row:u.row,column:u.column}}var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=function(){function e(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeof t!="number"?this.setPosition(t.row,t.column):this.setPosition(t,n)}return e.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},e.prototype.getDocument=function(){return this.document},e.prototype.onChange=function(e){if(e.start.row==e.end.row&&e.start.row!=this.row)return;if(e.start.row>this.row)return;var t=u(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)},e.prototype.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n},e}();s.prototype.$insertRight=!1,r.implement(s.prototype,i),t.Anchor=s}),define("ace/document",[],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./apply_delta").applyDelta,s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=e("./anchor").Anchor,a=function(){function e(e){this.$lines=[""],e.length===0?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}return e.prototype.setValue=function(e){var t=this.getLength()-1;this.remove(new o(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},e.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},e.prototype.createAnchor=function(e,t){return new u(this,e,t)},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},e.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},e.prototype.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},e.prototype.getNewLineMode=function(){return this.$newLineMode},e.prototype.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},e.prototype.getLine=function(e){return this.$lines[e]||""},e.prototype.getLines=function(e,t){return this.$lines.slice(e,t+1)},e.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},e.prototype.getLength=function(){return this.$lines.length},e.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},e.prototype.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},e.prototype.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},e.prototype.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},e.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},e.prototype.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},e.prototype.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},e.prototype.clippedPos=function(e,t){var n=this.getLength();e===undefined?e=n:e<0?e=0:e>=n&&(e=n-1,t=undefined);var r=this.getLine(e);return t==undefined&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:e,column:t}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},e.prototype.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var n=0;e<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},e.prototype.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),r={row:n.row+t.length-1,column:(t.length==1?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:r,action:"insert",lines:t}),this.clonePos(r)},e.prototype.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},e.prototype.removeInLine=function(e,t,n){var r=this.clippedPos(e,t),i=this.clippedPos(e,n);return this.applyDelta({start:r,end:i,action:"remove",lines:this.getLinesForRange({start:r,end:i})},!0),this.clonePos(r)},e.prototype.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var n=t==this.getLength()-1&&e>0,r=t<this.getLength()-1,i=n?e-1:e,s=n?this.getLine(i).length:0,u=r?t+1:t,a=r?0:this.getLine(u).length,f=new o(i,s,u,a),l=this.$lines.slice(e,t+1);return this.applyDelta({start:f.start,end:f.end,action:"remove",lines:this.getLinesForRange(f)}),l},e.prototype.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){e instanceof o||(e=o.fromPoints(e.start,e.end));if(t.length===0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);var n;return t?n=this.insert(e.start,t):n=e.start,n},e.prototype.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},e.prototype.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var n=e.action=="insert";if(n?e.lines.length<=1&&!e.lines[0]:!o.comparePoints(e.start,e.end))return;n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(i(this.$lines,e,t),this._signal("change",e))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;(e.action=="remove"&&e.start.row<t&&e.end.row<t||e.action=="insert"&&e.start.row<=t)&&this.applyDelta(e)},e.prototype.$splitAndapplyLargeDelta=function(e,t){var n=e.lines,r=n.length-t+1,i=e.start.row,s=e.start.column;for(var o=0,u=0;o<r;o=u){u+=t-1;var a=n.slice(o,u);a.push(""),this.applyDelta({start:this.pos(i+o,s),end:this.pos(i+u,s=0),action:e.action,lines:a},!0)}e.lines=n.slice(o),e.start.row=i+o,e.start.column=s,this.applyDelta(e,!0)},e.prototype.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:e.action=="insert"?"remove":"insert",lines:e.lines.slice()})},e.prototype.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:e+n[s-1].length+r}},e.prototype.positionToIndex=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column},e.prototype.$split=function(e){return e.split(/\r\n|\r|\n/)},e}();a.prototype.$autoNewLine="",a.prototype.$newLineMode="auto",r.implement(a.prototype,s),t.Document=a}),define("ace/lib/deep_copy",[],function(e,t,n){t.deepCopy=function r(e){if(typeof e!="object"||!e)return e;var t;if(Array.isArray(e)){t=[];for(var n=0;n<e.length;n++)t[n]=r(e[n]);return t}if(Object.prototype.toString.call(e)!=="[object Object]")return e;t={};for(var n in e)t[n]=r(e[n]);return t}}),define("ace/lib/lang",[],function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=e("./deep_copy").deepCopy,t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r.isPending=function(){return t},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};return i.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i},t.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch(e){return!1}return!0},t.skipEmptyMatch=function(e,t,n){return n&&e.codePointAt(t)>65535?2:1}}),define("ace/worker/mirror",[],function(e,t,n){"use strict";var r=e("../document").Document,i=e("../lib/lang"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new r(""),n=this.deferredUpdate=i.delayedCall(this.onUpdate.bind(this)),s=this;e.on("change",function(e){var r=e.data;if(r[0].start)t.applyDeltas(r);else for(var i=0;i<r.length;i+=2){var o,u;Array.isArray(r[i+1])?o={action:"insert",start:r[i],lines:r[i+1]}:o={action:"remove",start:r[i],end:r[i+1]};if((o.action=="insert"?o.start:o.end).row>=t.$lines.length)throw u=new Error("Invalid delta"),u.data={path:s.$path,linesLength:t.$lines.length,start:o.start,end:o.end},u;t.applyDelta(o,!0)}if(s.$timeout)return n.schedule(s.$timeout);s.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(s.prototype)}),define("ace/mode/php/php",[],function(e,t,n){var r={Constants:{}};r.Constants.T_THROW=317,r.Constants.T_INCLUDE=272,r.Constants.T_INCLUDE_ONCE=273,r.Constants.T_EVAL=274,r.Constants.T_REQUIRE=275,r.Constants.T_REQUIRE_ONCE=276,r.Constants.T_LOGICAL_OR=277,r.Constants.T_LOGICAL_XOR=278,r.Constants.T_LOGICAL_AND=279,r.Constants.T_PRINT=280,r.Constants.T_YIELD=281,r.Constants.T_DOUBLE_ARROW=386,r.Constants.T_YIELD_FROM=282,r.Constants.T_PLUS_EQUAL=352,r.Constants.T_MINUS_EQUAL=353,r.Constants.T_MUL_EQUAL=354,r.Constants.T_DIV_EQUAL=355,r.Constants.T_CONCAT_EQUAL=356,r.Constants.T_MOD_EQUAL=357,r.Constants.T_AND_EQUAL=358,r.Constants.T_OR_EQUAL=359,r.Constants.T_XOR_EQUAL=360,r.Constants.T_SL_EQUAL=361,r.Constants.T_SR_EQUAL=362,r.Constants.T_POW_EQUAL=402,r.Constants.T_COALESCE_EQUAL=363,r.Constants.T_COALESCE=400,r.Constants.T_BOOLEAN_OR=364,r.Constants.T_BOOLEAN_AND=365,r.Constants.T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG=404,r.Constants.T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG=403,r.Constants.T_IS_EQUAL=366,r.Constants.T_IS_NOT_EQUAL=367,r.Constants.T_IS_IDENTICAL=368,r.Constants.T_IS_NOT_IDENTICAL=369,r.Constants.T_SPACESHIP=372,r.Constants.T_IS_SMALLER_OR_EQUAL=370,r.Constants.T_IS_GREATER_OR_EQUAL=371,r.Constants.T_SL=373,r.Constants.T_SR=374,r.Constants.T_INSTANCEOF=283,r.Constants.T_INC=375,r.Constants.T_DEC=376,r.Constants.T_INT_CAST=377,r.Constants.T_DOUBLE_CAST=378,r.Constants.T_STRING_CAST=379,r.Constants.T_ARRAY_CAST=380,r.Constants.T_OBJECT_CAST=381,r.Constants.T_BOOL_CAST=382,r.Constants.T_UNSET_CAST=383,r.Constants.T_POW=401,r.Constants.T_NEW=284,r.Constants.T_CLONE=285,r.Constants.T_EXIT=286,r.Constants.T_IF=287,r.Constants.T_ELSEIF=288,r.Constants.T_ELSE=289,r.Constants.T_ENDIF=290,r.Constants.T_LNUMBER=260,r.Constants.T_DNUMBER=261,r.Constants.T_STRING=262,r.Constants.T_STRING_VARNAME=270,r.Constants.T_VARIABLE=266,r.Constants.T_NUM_STRING=271,r.Constants.T_INLINE_HTML=267,r.Constants.T_ENCAPSED_AND_WHITESPACE=268,r.Constants.T_CONSTANT_ENCAPSED_STRING=269,r.Constants.T_ECHO=291,r.Constants.T_DO=292,r.Constants.T_WHILE=293,r.Constants.T_ENDWHILE=294,r.Constants.T_FOR=295,r.Constants.T_ENDFOR=296,r.Constants.T_FOREACH=297,r.Constants.T_ENDFOREACH=298,r.Constants.T_DECLARE=299,r.Constants.T_ENDDECLARE=300,r.Constants.T_AS=301,r.Constants.T_SWITCH=302,r.Constants.T_MATCH=306,r.Constants.T_ENDSWITCH=303,r.Constants.T_CASE=304,r.Constants.T_DEFAULT=305,r.Constants.T_BREAK=307,r.Constants.T_CONTINUE=308,r.Constants.T_GOTO=309,r.Constants.T_FUNCTION=310,r.Constants.T_FN=311,r.Constants.T_CONST=312,r.Constants.T_RETURN=313,r.Constants.T_TRY=314,r.Constants.T_CATCH=315,r.Constants.T_FINALLY=316,r.Constants.T_THROW=317,r.Constants.T_USE=318,r.Constants.T_INSTEADOF=319,r.Constants.T_GLOBAL=320,r.Constants.T_STATIC=321,r.Constants.T_ABSTRACT=322,r.Constants.T_FINAL=323,r.Constants.T_PRIVATE=324,r.Constants.T_PROTECTED=325,r.Constants.T_PUBLIC=326,r.Constants.T_READONLY=327,r.Constants.T_VAR=328,r.Constants.T_UNSET=329,r.Constants.T_ISSET=330,r.Constants.T_EMPTY=331,r.Constants.T_HALT_COMPILER=332,r.Constants.T_CLASS=333,r.Constants.T_TRAIT=334,r.Constants.T_INTERFACE=335,r.Constants.T_ENUM=336,r.Constants.T_EXTENDS=337,r.Constants.T_IMPLEMENTS=338,r.Constants.T_OBJECT_OPERATOR=384,r.Constants.T_NULLSAFE_OBJECT_OPERATOR=385,r.Constants.T_DOUBLE_ARROW=386,r.Constants.T_LIST=340,r.Constants.T_ARRAY=341,r.Constants.T_CALLABLE=342,r.Constants.T_CLASS_C=346,r.Constants.T_TRAIT_C=347,r.Constants.T_METHOD_C=348,r.Constants.T_FUNC_C=349,r.Constants.T_LINE=343,r.Constants.T_FILE=344,r.Constants.T_START_HEREDOC=393,r.Constants.T_END_HEREDOC=394,r.Constants.T_DOLLAR_OPEN_CURLY_BRACES=395,r.Constants.T_CURLY_OPEN=396,r.Constants.T_PAAMAYIM_NEKUDOTAYIM=397,r.Constants.T_NAMESPACE=339,r.Constants.T_NS_C=350,r.Constants.T_DIR=345,r.Constants.T_NS_SEPARATOR=398,r.Constants.T_ELLIPSIS=399,r.Constants.T_NAME_FULLY_QUALIFIED=263,r.Constants.T_NAME_QUALIFIED=265,r.Constants.T_NAME_RELATIVE=264,r.Constants.T_ATTRIBUTE=351,r.Constants.T_ENUM=336,r.Constants.T_BAD_CHARACTER=405,r.Constants.T_COMMENT=387,r.Constants.T_DOC_COMMENT=388,r.Constants.T_OPEN_TAG=389,r.Constants.T_OPEN_TAG_WITH_ECHO=390,r.Constants.T_CLOSE_TAG=391,r.Constants.T_WHITESPACE=392,r.Lexer=function(e,t){var n,i,s=["INITIAL"],o=0,u=function(e){s[o]=e},a=function(e){s[++o]=e},f=function(){--o},l=t===undefined||/^(on|true|1)$/i.test(t.short_open_tag),c=l?/^(\<\?php(?:\r\n|[ \t\r\n])|<\?|\<script language\=('|")?php('|")?\>)/i:/^(\<\?php(?:\r\n|[ \t\r\n])|\<script language\=('|")?php('|")?\>)/i,h=l?/[^<]*(?:<(?!\?|script language\=('|")?php('|")?\>)[^<]*)*/i:/[^<]*(?:<(?!\?=|\?php[ \t\r\n]|script language\=('|")?php('|")?\>)[^<]*)*/i,p="[a-zA-Z_\\x7f-\\uffff][a-zA-Z0-9_\\x7f-\\uffff]*",d=function(e){return"[^"+e+"\\\\${]*(?:(?:\\\\[\\s\\S]|\\$(?!\\{|[a-zA-Z_\\x7f-\\uffff])|\\{(?!\\$))[^"+e+"\\\\${]*)*"},v=[{value:r.Constants.T_VARIABLE,re:new RegExp("^\\$"+p+"(?=\\[)"),func:function(){a("VAR_OFFSET")}},{value:r.Constants.T_VARIABLE,re:new RegExp("^\\$"+p+"(?=->"+p+")"),func:function(){a("LOOKING_FOR_PROPERTY")}},{value:r.Constants.T_DOLLAR_OPEN_CURLY_BRACES,re:new RegExp("^\\$\\{(?="+p+"[\\[}])"),func:function(){a("LOOKING_FOR_VARNAME")}},{value:r.Constants.T_VARIABLE,re:new RegExp("^\\$"+p)},{value:r.Constants.T_DOLLAR_OPEN_CURLY_BRACES,re:/^\$\{/,func:function(){a("IN_SCRIPTING")}},{value:r.Constants.T_CURLY_OPEN,re:/^\{(?=\$)/,func:function(){a("IN_SCRIPTING")}}],m={INITIAL:[{value:r.Constants.T_OPEN_TAG_WITH_ECHO,re:/^<\?=/i,func:function(){u("IN_SCRIPTING")}},{value:r.Constants.T_OPEN_TAG,re:c,func:function(){u("IN_SCRIPTING")}},{value:r.Constants.T_INLINE_HTML,re:h}],IN_SCRIPTING:[{value:r.Constants.T_WHITESPACE,re:/^[ \n\r\t]+/},{value:r.Constants.T_ABSTRACT,re:/^abstract\b/i},{value:r.Constants.T_LOGICAL_AND,re:/^and\b/i},{value:r.Constants.T_ARRAY,re:/^array\b/i},{value:r.Constants.T_AS,re:/^as\b/i},{value:r.Constants.T_BREAK,re:/^break\b/i},{value:r.Constants.T_CALLABLE,re:/^callable\b/i},{value:r.Constants.T_CASE,re:/^case\b/i},{value:r.Constants.T_CATCH,re:/^catch\b/i},{value:r.Constants.T_CLASS,re:/^class\b/i},{value:r.Constants.T_CLONE,re:/^clone\b/i},{value:r.Constants.T_CONST,re:/^const\b/i},{value:r.Constants.T_CONTINUE,re:/^continue\b/i},{value:r.Constants.T_DECLARE,re:/^declare\b/i},{value:r.Constants.T_DEFAULT,re:/^default\b/i},{value:r.Constants.T_DO,re:/^do\b/i},{value:r.Constants.T_ECHO,re:/^echo\b/i},{value:r.Constants.T_ELSE,re:/^else\b/i},{value:r.Constants.T_ELSEIF,re:/^elseif\b/i},{value:r.Constants.T_ENUM,re:/^enum\b/i},{value:r.Constants.T_ENDDECLARE,re:/^enddeclare\b/i},{value:r.Constants.T_ENDFOR,re:/^endfor\b/i},{value:r.Constants.T_ENDFOREACH,re:/^endforeach\b/i},{value:r.Constants.T_ENDIF,re:/^endif\b/i},{value:r.Constants.T_ENDSWITCH,re:/^endswitch\b/i},{value:r.Constants.T_ENDWHILE,re:/^endwhile\b/i},{value:r.Constants.T_ENUM,re:/^enum\b/i},{value:r.Constants.T_EMPTY,re:/^empty\b/i},{value:r.Constants.T_EVAL,re:/^eval\b/i},{value:r.Constants.T_EXIT,re:/^(?:exit|die)\b/i},{value:r.Constants.T_EXTENDS,re:/^extends\b/i},{value:r.Constants.T_FINAL,re:/^final\b/i},{value:r.Constants.T_FINALLY,re:/^finally\b/i},{value:r.Constants.T_FN,re:/^fn\b/i},{value:r.Constants.T_FOR,re:/^for\b/i},{value:r.Constants.T_FOREACH,re:/^foreach\b/i},{value:r.Constants.T_FUNCTION,re:/^function\b/i},{value:r.Constants.T_GLOBAL,re:/^global\b/i},{value:r.Constants.T_GOTO,re:/^goto\b/i},{value:r.Constants.T_IF,re:/^if\b/i},{value:r.Constants.T_IMPLEMENTS,re:/^implements\b/i},{value:r.Constants.T_INCLUDE,re:/^include\b/i},{value:r.Constants.T_INCLUDE_ONCE,re:/^include_once\b/i},{value:r.Constants.T_INSTANCEOF,re:/^instanceof\b/i},{value:r.Constants.T_INSTEADOF,re:/^insteadof\b/i},{value:r.Constants.T_INTERFACE,re:/^interface\b/i},{value:r.Constants.T_ISSET,re:/^isset\b/i},{value:r.Constants.T_LIST,re:/^list\b/i},{value:r.Constants.T_MATCH,re:/^match\b/i},{value:r.Constants.T_NEW,re:/^new\b/i},{value:r.Constants.T_LOGICAL_OR,re:/^or\b/i},{value:r.Constants.T_PRINT,re:/^print\b/i},{value:r.Constants.T_PRIVATE,re:/^private\b/i},{value:r.Constants.T_PROTECTED,re:/^protected\b/i},{value:r.Constants.T_PUBLIC,re:/^public\b/i},{value:r.Constants.T_READONLY,re:/^readonly\b/i},{value:r.Constants.T_REQUIRE,re:/^require\b/i},{value:r.Constants.T_REQUIRE_ONCE,re:/^require_once\b/i},{value:r.Constants.T_STATIC,re:/^static\b/i},{value:r.Constants.T_SWITCH,re:/^switch\b/i},{value:r.Constants.T_THROW,re:/^throw\b/i},{value:r.Constants.T_TRAIT,re:/^trait\b/i},{value:r.Constants.T_TRY,re:/^try\b/i},{value:r.Constants.T_UNSET,re:/^unset\b/i},{value:r.Constants.T_USE,re:/^use\b/i},{value:r.Constants.T_VAR,re:/^var\b/i},{value:r.Constants.T_WHILE,re:/^while\b/i},{value:r.Constants.T_LOGICAL_XOR,re:/^xor\b/i},{value:r.Constants.T_YIELD_FROM,re:/^yield\s+from\b/i},{value:r.Constants.T_YIELD,re:/^yield\b/i},{value:r.Constants.T_RETURN,re:/^return\b/i},{value:r.Constants.T_METHOD_C,re:/^__METHOD__\b/i},{value:r.Constants.T_LINE,re:/^__LINE__\b/i},{value:r.Constants.T_FILE,re:/^__FILE__\b/i},{value:r.Constants.T_FUNC_C,re:/^__FUNCTION__\b/i},{value:r.Constants.T_NS_C,re:/^__NAMESPACE__\b/i},{value:r.Constants.T_TRAIT_C,re:/^__TRAIT__\b/i},{value:r.Constants.T_DIR,re:/^__DIR__\b/i},{value:r.Constants.T_CLASS_C,re:/^__CLASS__\b/i},{value:r.Constants.T_AND_EQUAL,re:/^&=/},{value:r.Constants.T_ARRAY_CAST,re:/^\([ \t]*array[ \t]*\)/i},{value:r.Constants.T_BOOL_CAST,re:/^\([ \t]*(?:bool|boolean)[ \t]*\)/i},{value:r.Constants.T_DOUBLE_CAST,re:/^\([ \t]*(?:real|float|double)[ \t]*\)/i},{value:r.Constants.T_INT_CAST,re:/^\([ \t]*(?:int|integer)[ \t]*\)/i},{value:r.Constants.T_OBJECT_CAST,re:/^\([ \t]*object[ \t]*\)/i},{value:r.Constants.T_STRING_CAST,re:/^\([ \t]*(?:binary|string)[ \t]*\)/i},{value:r.Constants.T_UNSET_CAST,re:/^\([ \t]*unset[ \t]*\)/i},{value:r.Constants.T_BOOLEAN_AND,re:/^&&/},{value:r.Constants.T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG,re:/^&(?=[$])/},{value:r.Constants.T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG,re:/^(&)(?=[^\$|^&])/},{value:r.Constants.T_BOOLEAN_OR,re:/^\|\|/},{value:r.Constants.T_CLOSE_TAG,re:/^(?:\?>|<\/script>)(\r\n|\r|\n)?/i,func:function(){u("INITIAL")}},{value:r.Constants.T_DOUBLE_ARROW,re:/^=>/},{value:r.Constants.T_PAAMAYIM_NEKUDOTAYIM,re:/^::/},{value:r.Constants.T_INC,re:/^\+\+/},{value:r.Constants.T_DEC,re:/^--/},{value:r.Constants.T_CONCAT_EQUAL,re:/^\.=/},{value:r.Constants.T_DIV_EQUAL,re:/^\/=/},{value:r.Constants.T_XOR_EQUAL,re:/^\^=/},{value:r.Constants.T_MUL_EQUAL,re:/^\*=/},{value:r.Constants.T_MOD_EQUAL,re:/^%=/},{value:r.Constants.T_SL_EQUAL,re:/^<<=/},{value:r.Constants.T_START_HEREDOC,re:new RegExp("^[bB]?<<<[ \\t]*'("+p+")'(?:\\r\\n|\\r|\\n)"),func:function(e){n=e[1],u("NOWDOC")}},{value:r.Constants.T_START_HEREDOC,re:new RegExp('^[bB]?<<<[ \\t]*("?)('+p+")\\1(?:\\r\\n|\\r|\\n)"),func:function(e){n=e[2],i=!0,u("HEREDOC")}},{value:r.Constants.T_SL,re:/^<</},{value:r.Constants.T_SPACESHIP,re:/^<=>/},{value:r.Constants.T_IS_SMALLER_OR_EQUAL,re:/^<=/},{value:r.Constants.T_SR_EQUAL,re:/^>>=/},{value:r.Constants.T_SR,re:/^>>/},{value:r.Constants.T_IS_GREATER_OR_EQUAL,re:/^>=/},{value:r.Constants.T_OR_EQUAL,re:/^\|=/},{value:r.Constants.T_PLUS_EQUAL,re:/^\+=/},{value:r.Constants.T_MINUS_EQUAL,re:/^-=/},{value:r.Constants.T_OBJECT_OPERATOR,re:new RegExp("^->(?=[ \n\r ]*"+p+")"),func:function(){a("LOOKING_FOR_PROPERTY")}},{value:r.Constants.T_OBJECT_OPERATOR,re:/^->/i},{value:r.Constants.T_ELLIPSIS,re:/^\.\.\./},{value:r.Constants.T_POW_EQUAL,re:/^\*\*=/},{value:r.Constants.T_POW,re:/^\*\*/},{value:r.Constants.T_COALESCE_EQUAL,re:/^\?\?=/},{value:r.Constants.T_COALESCE,re:/^\?\?/},{value:r.Constants.T_NULLSAFE_OBJECT_OPERATOR,re:/^\?->/},{value:r.Constants.T_NAME_FULLY_QUALIFIED,re:/^\\\w+(?:\\\w+)*/},{value:r.Constants.T_NAME_QUALIFIED,re:/^\w+\\\w+(?:\\\w+)*/},{value:r.Constants.T_NAME_RELATIVE,re:/^namespace\\\w+(?:\\\w+)*/},{value:r.Constants.T_NAMESPACE,re:/^namespace\b/i},{value:r.Constants.T_ATTRIBUTE,re:/^#\[([\S\s]*?)]/},{value:r.Constants.T_COMMENT,re:/^\/\*([\S\s]*?)(?:\*\/|$)/},{value:r.Constants.T_COMMENT,re:/^(?:\/\/|#)[^\r\n?]*(?:\?(?!>)[^\r\n?]*)*(?:\r\n|\r|\n)?/},{value:r.Constants.T_IS_IDENTICAL,re:/^===/},{value:r.Constants.T_IS_EQUAL,re:/^==/},{value:r.Constants.T_IS_NOT_IDENTICAL,re:/^!==/},{value:r.Constants.T_IS_NOT_EQUAL,re:/^(!=|<>)/},{value:r.Constants.T_DNUMBER,re:/^(?:[0-9]+\.[0-9]*|\.[0-9]+)(?:[eE][+-]?[0-9]+)?/},{value:r.Constants.T_DNUMBER,re:/^[0-9]+[eE][+-]?[0-9]+/},{value:r.Constants.T_LNUMBER,re:/^(?:0x[0-9A-F]+|0b[01]+|[0-9]+)/i},{value:r.Constants.T_VARIABLE,re:new RegExp("^\\$"+p)},{value:r.Constants.T_CONSTANT_ENCAPSED_STRING,re:/^[bB]?'[^'\\]*(?:\\[\s\S][^'\\]*)*'/},{value:r.Constants.T_CONSTANT_ENCAPSED_STRING,re:new RegExp('^[bB]?"'+d('"')+'"')},{value:-1,re:/^[bB]?"/,func:function(){u("DOUBLE_QUOTES")}},{value:-1,re:/^`/,func:function(){u("BACKTICKS")}},{value:r.Constants.T_NS_SEPARATOR,re:/^\\/},{value:r.Constants.T_STRING,re:/^[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/},{value:-1,re:/^\{/,func:function(){a("IN_SCRIPTING")}},{value:-1,re:/^\}/,func:function(){o>0&&f()}},{value:-1,re:/^[\[\];:?()!.,><=+-/*|&@^%"'$~]/}],DOUBLE_QUOTES:v.concat([{value:-1,re:/^"/,func:function(){u("IN_SCRIPTING")}},{value:r.Constants.T_ENCAPSED_AND_WHITESPACE,re:new RegExp("^"+d('"'))}]),BACKTICKS:v.concat([{value:-1,re:/^`/,func:function(){u("IN_SCRIPTING")}},{value:r.Constants.T_ENCAPSED_AND_WHITESPACE,re:new RegExp("^"+d("`"))}]),VAR_OFFSET:[{value:-1,re:/^\]/,func:function(){f()}},{value:r.Constants.T_NUM_STRING,re:/^(?:0x[0-9A-F]+|0b[01]+|[0-9]+)/i},{value:r.Constants.T_VARIABLE,re:new RegExp("^\\$"+p)},{value:r.Constants.T_STRING,re:new RegExp("^"+p)},{value:-1,re:/^[;:,.\[()|^&+-/*=%!~$<>?@{}"`]/}],LOOKING_FOR_PROPERTY:[{value:r.Constants.T_OBJECT_OPERATOR,re:/^->/},{value:r.Constants.T_STRING,re:new RegExp("^"+p),func:function(){f()}},{value:r.Constants.T_WHITESPACE,re:/^[ \n\r\t]+/}],LOOKING_FOR_VARNAME:[{value:r.Constants.T_STRING_VARNAME,re:new RegExp("^"+p+"(?=[\\[}])"),func:function(){u("IN_SCRIPTING")}}],NOWDOC:[{value:r.Constants.T_END_HEREDOC,matchFunc:function(e){var t=new RegExp("^"+n+"(?=;?[\\r\\n])");return e.match(t)?[e.substr(0,n.length)]:null},func:function(){u("IN_SCRIPTING")}},{value:r.Constants.T_ENCAPSED_AND_WHITESPACE,matchFunc:function(e){var t=new RegExp("[\\r\\n]"+n+"(?=;?[\\r\\n])"),r=t.exec(e),i=r?r.index+1:e.length;return[e.substring(0,i)]}}],HEREDOC:v.concat([{value:r.Constants.T_END_HEREDOC,matchFunc:function(e){if(!i)return null;var t=new RegExp("^"+n+"(?=;?[\\r\\n])");return e.match(t)?[e.substr(0,n.length)]:null},func:function(){u("IN_SCRIPTING")}},{value:r.Constants.T_ENCAPSED_AND_WHITESPACE,matchFunc:function(e){var t=e.length,r=new RegExp("^"+d("")),s=r.exec(e);return s&&(t=s[0].length),r=new RegExp("([\\r\\n])"+n+"(?=;?[\\r\\n])"),s=r.exec(e.substring(0,t)),s?(t=s.index+1,i=!0):i=!1,t==0?null:[e.substring(0,t)]}}])},g=[],y=1,b=!0;if(e===null)return g;typeof e!="string"&&(e=e.toString());while(e.length>0&&b===!0){var w=s[o],E=m[w];b=E.some(function(t){var n=t.matchFunc!==undefined?t.matchFunc(e):e.match(t.re);if(n!==null){if(n[0].length==0)throw new Error("empty match");t.func!==undefined&&t.func(n);if(t.value===-1)g.push(n[0]);else{var r=n[0];g.push([parseInt(t.value,10),r,y]),y+=r.split("\n").length-1}return e=e.substring(n[0].length),!0}return!1})}return g},r.Parser=function(e,t){var n=this.yybase,i=this.yydefault,s=this.yycheck,o=this.yyaction,u=this.yylen,a=this.yygbase,f=this.yygcheck,l=this.yyp,c=this.yygoto,h=this.yylhs,p=this.terminals,d=this.translate,v=this.yygdefault;this.pos=-1,this.line=1,this.tokenMap=this.createTokenMap(),this.dropTokens={},this.dropTokens[r.Constants.T_WHITESPACE]=1,this.dropTokens[r.Constants.T_OPEN_TAG]=1;var m=[];e.forEach(function(e,t){typeof e=="object"&&e[0]===r.Constants.T_OPEN_TAG_WITH_ECHO?(m.push([r.Constants.T_OPEN_TAG,e[1],e[2]]),m.push([r.Constants.T_ECHO,e[1],e[2]])):m.push(e)}),this.tokens=m;var g=this.TOKEN_NONE;this.startAttributes={startLine:1},this.endAttributes={};var y=[this.startAttributes],b=0,w=[b];this.yyastk=[],this.stackPos=0;var E,S;for(;;){if(n[b]===0)E=i[b];else{g===this.TOKEN_NONE&&(S=this.getNextToken(),g=S>=0&&S<this.TOKEN_MAP_SIZE?d[S]:this.TOKEN_INVALID,y[this.stackPos]=this.startAttributes);if(((E=n[b]+g)>=0&&E<this.YYLAST&&s[E]===g||b<this.YY2TBLSTATE&&(E=n[b+this.YYNLSTATES]+g)>=0&&E<this.YYLAST&&s[E]===g)&&(E=o[E])!==this.YYDEFAULT)if(E>0){++this.stackPos,w[this.stackPos]=b=E,this.yyastk[this.stackPos]=this.tokenValue,y[this.stackPos]=this.startAttributes,g=this.TOKEN_NONE;if(E<this.YYNLSTATES)continue;E-=this.YYNLSTATES}else E=-E;else E=i[b]}for(;;){if(E===0)return this.yyval;if(E===this.YYUNEXPECTED){if(t!==!0){var T=[];for(var N=0;N<this.TOKEN_MAP_SIZE;++N)if((E=n[b]+N)>=0&&E<this.YYLAST&&s[E]==N||b<this.YY2TBLSTATE&&(E=n[b+this.YYNLSTATES]+N)&&E<this.YYLAST&&s[E]==N)if(o[E]!=this.YYUNEXPECTED){if(T.length==4){T=[];break}T.push(this.terminals[N])}var C="";throw T.length&&(C=", expecting "+T.join(" or ")),new r.ParseError("syntax error, unexpected "+p[g]+C,this.startAttributes.startLine)}return this.startAttributes.startLine}for(var x in this.endAttributes)y[this.stackPos-u[E]][x]=this.endAttributes[x];this.stackPos-=u[E],E=h[E],(l=a[E]+w[this.stackPos])>=0&&l<this.YYGLAST&&f[l]===E?b=c[l]:b=v[E],++this.stackPos,w[this.stackPos]=b,this.yyastk[this.stackPos]=this.yyval,y[this.stackPos]=this.startAttributes;if(b<this.YYNLSTATES)break;E=b-this.YYNLSTATES}}},r.ParseError=function(e,t){this.message=e,this.line=t},r.Parser.prototype.getNextToken=function(){this.startAttributes={},this.endAttributes={};var e,t;while(this.tokens[++this.pos]!==undefined){e=this.tokens[this.pos];if(typeof e=="string")return this.startAttributes.startLine=this.line,this.endAttributes.endLine=this.line,'b"'===e?(this.tokenValue='b"','"'.charCodeAt(0)):(this.tokenValue=e,e.charCodeAt(0));this.line+=(t=e[1].match(/\n/g))===null?0:t.length;if(r.Constants.T_COMMENT===e[0])Array.isArray(this.startAttributes.comments)||(this.startAttributes.comments=[]),this.startAttributes.comments.push({type:"comment",comment:e[1],line:e[2]});else if(r.Constants.T_ATTRIBUTE===e[0])this.tokenValue=e[1],this.startAttributes.startLine=e[2],this.endAttributes.endLine=this.line;else if(r.Constants.T_DOC_COMMENT===e[0])this.startAttributes.comments.push(new PHPParser_Comment_Doc(e[1],e[2]));else if(this.dropTokens[e[0]]===undefined)return this.tokenValue=e[1],this.startAttributes.startLine=e[2],this.endAttributes.endLine=this.line,this.tokenMap[e[0]]}return this.startAttributes.startLine=this.line,0},r.Parser.prototype.tokenName=function(e){var t=["T_THROW","T_INCLUDE","T_INCLUDE_ONCE","T_EVAL","T_REQUIRE","T_REQUIRE_ONCE","T_LOGICAL_OR","T_LOGICAL_XOR","T_LOGICAL_AND","T_PRINT","T_YIELD","T_DOUBLE_ARROW","T_YIELD_FROM","T_PLUS_EQUAL","T_MINUS_EQUAL","T_MUL_EQUAL","T_DIV_EQUAL","T_CONCAT_EQUAL","T_MOD_EQUAL","T_AND_EQUAL","T_OR_EQUAL","T_XOR_EQUAL","T_SL_EQUAL","T_SR_EQUAL","T_POW_EQUAL","T_COALESCE_EQUAL","T_COALESCE","T_BOOLEAN_OR","T_BOOLEAN_AND","T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG","T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG","T_IS_EQUAL","T_IS_NOT_EQUAL","T_IS_IDENTICAL","T_IS_NOT_IDENTICAL","T_SPACESHIP","T_IS_SMALLER_OR_EQUAL","T_IS_GREATER_OR_EQUAL","T_SL","T_SR","T_INSTANCEOF","T_INC","T_DEC","T_INT_CAST","T_DOUBLE_CAST","T_STRING_CAST","T_ARRAY_CAST","T_OBJECT_CAST","T_BOOL_CAST","T_UNSET_CAST","T_POW","T_NEW","T_CLONE","T_EXIT","T_IF","T_ELSEIF","T_ELSE","T_ENDIF","T_LNUMBER","T_DNUMBER","T_STRING","T_STRING_VARNAME","T_VARIABLE","T_NUM_STRING","T_INLINE_HTML","T_ENCAPSED_AND_WHITESPACE","T_CONSTANT_ENCAPSED_STRING","T_ECHO","T_DO","T_WHILE","T_ENDWHILE","T_FOR","T_ENDFOR","T_FOREACH","T_ENDFOREACH","T_DECLARE","T_ENDDECLARE","T_AS","T_SWITCH","T_MATCH","T_ENDSWITCH","T_CASE","T_DEFAULT","T_BREAK","T_CONTINUE","T_GOTO","T_FUNCTION","T_FN","T_CONST","T_RETURN","T_TRY","T_CATCH","T_FINALLY","T_THROW","T_USE","T_INSTEADOF","T_GLOBAL","T_STATIC","T_ABSTRACT","T_FINAL","T_PRIVATE","T_PROTECTED","T_PUBLIC","T_READONLY","T_VAR","T_UNSET","T_ISSET","T_EMPTY","T_HALT_COMPILER","T_CLASS","T_TRAIT","T_INTERFACE","T_ENUM","T_EXTENDS","T_IMPLEMENTS","T_OBJECT_OPERATOR","T_NULLSAFE_OBJECT_OPERATOR","T_DOUBLE_ARROW","T_LIST","T_ARRAY","T_CALLABLE","T_CLASS_C","T_TRAIT_C","T_METHOD_C","T_FUNC_C","T_LINE","T_FILE","T_START_HEREDOC","T_END_HEREDOC","T_DOLLAR_OPEN_CURLY_BRACES","T_CURLY_OPEN","T_PAAMAYIM_NEKUDOTAYIM","T_NAMESPACE","T_NS_C","T_DIR","T_NS_SEPARATOR","T_ELLIPSIS","T_NAME_FULLY_QUALIFIED","T_NAME_QUALIFIED","T_NAME_RELATIVE","T_ATTRIBUTE","T_ENUM","T_BAD_CHARACTER","T_COMMENT","T_DOC_COMMENT","T_OPEN_TAG","T_OPEN_TAG_WITH_ECHO","T_CLOSE_TAG","T_WHITESPACE"],n="UNKNOWN";return t.some(function(t){return r.Constants[t]===e?(n=t,!0):!1}),n},r.Parser.prototype.createTokenMap=function(){var e={},t,n;for(n=256;n<1e3;++n)r.Constants.T_OPEN_TAG_WITH_ECHO===n?e[n]=r.Constants.T_ECHO:r.Constants.T_CLOSE_TAG===n?e[n]=59:"UNKNOWN"!==(t=this.tokenName(n))&&(e[n]=this[t]);return e},r.Parser.prototype.TOKEN_NONE=-1,r.Parser.prototype.TOKEN_INVALID=175,r.Parser.prototype.TOKEN_MAP_SIZE=403,r.Parser.prototype.YYLAST=1196,r.Parser.prototype.YY2TBLSTATE=420,r.Parser.prototype.YYGLAST=545,r.Parser.prototype.YYNLSTATES=710,r.Parser.prototype.YYUNEXPECTED=32767,r.Parser.prototype.YYDEFAULT=-32766,r.Parser.prototype.YYERRTOK=256,r.Parser.prototype.T_THROW=257,r.Parser.prototype.T_INCLUDE=258,r.Parser.prototype.T_INCLUDE_ONCE=259,r.Parser.prototype.T_EVAL=260,r.Parser.prototype.T_REQUIRE=261,r.Parser.prototype.T_REQUIRE_ONCE=262,r.Parser.prototype.T_LOGICAL_OR=263,r.Parser.prototype.T_LOGICAL_XOR=264,r.Parser.prototype.T_LOGICAL_AND=265,r.Parser.prototype.T_PRINT=266,r.Parser.prototype.T_YIELD=267,r.Parser.prototype.T_DOUBLE_ARROW=268,r.Parser.prototype.T_YIELD_FROM=269,r.Parser.prototype.T_PLUS_EQUAL=270,r.Parser.prototype.T_MINUS_EQUAL=271,r.Parser.prototype.T_MUL_EQUAL=272,r.Parser.prototype.T_DIV_EQUAL=273,r.Parser.prototype.T_CONCAT_EQUAL=274,r.Parser.prototype.T_MOD_EQUAL=275,r.Parser.prototype.T_AND_EQUAL=276,r.Parser.prototype.T_OR_EQUAL=277,r.Parser.prototype.T_XOR_EQUAL=278,r.Parser.prototype.T_SL_EQUAL=279,r.Parser.prototype.T_SR_EQUAL=280,r.Parser.prototype.T_POW_EQUAL=281,r.Parser.prototype.T_COALESCE_EQUAL=282,r.Parser.prototype.T_COALESCE=283,r.Parser.prototype.T_BOOLEAN_OR=284,r.Parser.prototype.T_BOOLEAN_AND=285,r.Parser.prototype.T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG=286,r.Parser.prototype.T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG=287,r.Parser.prototype.T_IS_EQUAL=288,r.Parser.prototype.T_IS_NOT_EQUAL=289,r.Parser.prototype.T_IS_IDENTICAL=290,r.Parser.prototype.T_IS_NOT_IDENTICAL=291,r.Parser.prototype.T_SPACESHIP=292,r.Parser.prototype.T_IS_SMALLER_OR_EQUAL=293,r.Parser.prototype.T_IS_GREATER_OR_EQUAL=294,r.Parser.prototype.T_SL=295,r.Parser.prototype.T_SR=296,r.Parser.prototype.T_INSTANCEOF=297,r.Parser.prototype.T_INC=298,r.Parser.prototype.T_DEC=299,r.Parser.prototype.T_INT_CAST=300,r.Parser.prototype.T_DOUBLE_CAST=301,r.Parser.prototype.T_STRING_CAST=302,r.Parser.prototype.T_ARRAY_CAST=303,r.Parser.prototype.T_OBJECT_CAST=304,r.Parser.prototype.T_BOOL_CAST=305,r.Parser.prototype.T_UNSET_CAST=306,r.Parser.prototype.T_POW=307,r.Parser.prototype.T_NEW=308,r.Parser.prototype.T_CLONE=309,r.Parser.prototype.T_EXIT=310,r.Parser.prototype.T_IF=311,r.Parser.prototype.T_ELSEIF=312,r.Parser.prototype.T_ELSE=313,r.Parser.prototype.T_ENDIF=314,r.Parser.prototype.T_LNUMBER=315,r.Parser.prototype.T_DNUMBER=316,r.Parser.prototype.T_STRING=317,r.Parser.prototype.T_STRING_VARNAME=318,r.Parser.prototype.T_VARIABLE=319,r.Parser.prototype.T_NUM_STRING=320,r.Parser.prototype.T_INLINE_HTML=321,r.Parser.prototype.T_ENCAPSED_AND_WHITESPACE=322,r.Parser.prototype.T_CONSTANT_ENCAPSED_STRING=323,r.Parser.prototype.T_ECHO=324,r.Parser.prototype.T_DO=325,r.Parser.prototype.T_WHILE=326,r.Parser.prototype.T_ENDWHILE=327,r.Parser.prototype.T_FOR=328,r.Parser.prototype.T_ENDFOR=329,r.Parser.prototype.T_FOREACH=330,r.Parser.prototype.T_ENDFOREACH=331,r.Parser.prototype.T_DECLARE=332,r.Parser.prototype.T_ENDDECLARE=333,r.Parser.prototype.T_AS=334,r.Parser.prototype.T_SWITCH=335,r.Parser.prototype.T_MATCH=336,r.Parser.prototype.T_ENDSWITCH=337,r.Parser.prototype.T_CASE=338,r.Parser.prototype.T_DEFAULT=339,r.Parser.prototype.T_BREAK=340,r.Parser.prototype.T_CONTINUE=341,r.Parser.prototype.T_GOTO=342,r.Parser.prototype.T_FUNCTION=343,r.Parser.prototype.T_FN=344,r.Parser.prototype.T_CONST=345,r.Parser.prototype.T_RETURN=346,r.Parser.prototype.T_TRY=347,r.Parser.prototype.T_CATCH=348,r.Parser.prototype.T_FINALLY=349,r.Parser.prototype.T_USE=350,r.Parser.prototype.T_INSTEADOF=351,r.Parser.prototype.T_GLOBAL=352,r.Parser.prototype.T_STATIC=353,r.Parser.prototype.T_ABSTRACT=354,r.Parser.prototype.T_FINAL=355,r.Parser.prototype.T_PRIVATE=356,r.Parser.prototype.T_PROTECTED=357,r.Parser.prototype.T_PUBLIC=358,r.Parser.prototype.T_READONLY=359,r.Parser.prototype.T_VAR=360,r.Parser.prototype.T_UNSET=361,r.Parser.prototype.T_ISSET=362,r.Parser.prototype.T_EMPTY=363,r.Parser.prototype.T_HALT_COMPILER=364,r.Parser.prototype.T_CLASS=365,r.Parser.prototype.T_TRAIT=366,r.Parser.prototype.T_INTERFACE=367,r.Parser.prototype.T_ENUM=368,r.Parser.prototype.T_EXTENDS=369,r.Parser.prototype.T_IMPLEMENTS=370,r.Parser.prototype.T_OBJECT_OPERATOR=371,r.Parser.prototype.T_NULLSAFE_OBJECT_OPERATOR=372,r.Parser.prototype.T_LIST=373,r.Parser.prototype.T_ARRAY=374,r.Parser.prototype.T_CALLABLE=375,r.Parser.prototype.T_CLASS_C=376,r.Parser.prototype.T_TRAIT_C=377,r.Parser.prototype.T_METHOD_C=378,r.Parser.prototype.T_FUNC_C=379,r.Parser.prototype.T_LINE=380,r.Parser.prototype.T_FILE=381,r.Parser.prototype.T_START_HEREDOC=382,r.Parser.prototype.T_END_HEREDOC=383,r.Parser.prototype.T_DOLLAR_OPEN_CURLY_BRACES=384,r.Parser.prototype.T_CURLY_OPEN=385,r.Parser.prototype.T_PAAMAYIM_NEKUDOTAYIM=386,r.Parser.prototype.T_NAMESPACE=387,r.Parser.prototype.T_NS_C=388,r.Parser.prototype.T_DIR=389,r.Parser.prototype.T_NS_SEPARATOR=390,r.Parser.prototype.T_ELLIPSIS=391,r.Parser.prototype.T_NAME_FULLY_QUALIFIED=392,r.Parser.prototype.T_NAME_QUALIFIED=393,r.Parser.prototype.T_NAME_RELATIVE=394,r.Parser.prototype.T_ATTRIBUTE=395,r.Parser.prototype.T_BAD_CHARACTER=396,r.Parser.prototype.T_COMMENT=397,r.Parser.prototype.T_DOC_COMMENT=398,r.Parser.prototype.T_OPEN_TAG=399,r.Parser.prototype.T_OPEN_TAG_WITH_ECHO=400,r.Parser.prototype.T_CLOSE_TAG=401,r.Parser.prototype.T_WHITESPACE=402,r.Parser.prototype.terminals=["EOF","error","T_THROW","T_INCLUDE","T_INCLUDE_ONCE","T_EVAL","T_REQUIRE","T_REQUIRE_ONCE","','","T_LOGICAL_OR","T_LOGICAL_XOR","T_LOGICAL_AND","T_PRINT","T_YIELD","T_DOUBLE_ARROW","T_YIELD_FROM","'='","T_PLUS_EQUAL","T_MINUS_EQUAL","T_MUL_EQUAL","T_DIV_EQUAL","T_CONCAT_EQUAL","T_MOD_EQUAL","T_AND_EQUAL","T_OR_EQUAL","T_XOR_EQUAL","T_SL_EQUAL","T_SR_EQUAL","T_POW_EQUAL","T_COALESCE_EQUAL","'?'","':'","T_COALESCE","T_BOOLEAN_OR","T_BOOLEAN_AND","'|'","'^'","T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG","T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG","T_IS_EQUAL","T_IS_NOT_EQUAL","T_IS_IDENTICAL","T_IS_NOT_IDENTICAL","T_SPACESHIP","'<'","T_IS_SMALLER_OR_EQUAL","'>'","T_IS_GREATER_OR_EQUAL","T_SL","T_SR","'+'","'-'","'.'","'*'","'/'","'%'","'!'","T_INSTANCEOF","'~'","T_INC","T_DEC","T_INT_CAST","T_DOUBLE_CAST","T_STRING_CAST","T_ARRAY_CAST","T_OBJECT_CAST","T_BOOL_CAST","T_UNSET_CAST","'@'","T_POW","'['","T_NEW","T_CLONE","T_EXIT","T_IF","T_ELSEIF","T_ELSE","T_ENDIF","T_LNUMBER","T_DNUMBER","T_STRING","T_STRING_VARNAME","T_VARIABLE","T_NUM_STRING","T_INLINE_HTML","T_ENCAPSED_AND_WHITESPACE","T_CONSTANT_ENCAPSED_STRING","T_ECHO","T_DO","T_WHILE","T_ENDWHILE","T_FOR","T_ENDFOR","T_FOREACH","T_ENDFOREACH","T_DECLARE","T_ENDDECLARE","T_AS","T_SWITCH","T_MATCH","T_ENDSWITCH","T_CASE","T_DEFAULT","T_BREAK","T_CONTINUE","T_GOTO","T_FUNCTION","T_FN","T_CONST","T_RETURN","T_TRY","T_CATCH","T_FINALLY","T_USE","T_INSTEADOF","T_GLOBAL","T_STATIC","T_ABSTRACT","T_FINAL","T_PRIVATE","T_PROTECTED","T_PUBLIC","T_READONLY","T_VAR","T_UNSET","T_ISSET","T_EMPTY","T_HALT_COMPILER","T_CLASS","T_TRAIT","T_INTERFACE","T_ENUM","T_EXTEN