UNPKG

connect-platform

Version:

A platform to build backened code mostly in a visual manner.

1 lines 390 kB
(function(){var e=function(){return this}();if(!e&&"undefined"!=typeof window&&(e=window),"undefined"==typeof requirejs){var t=function(e,i,n){"string"==typeof e?(2==arguments.length&&(n=i),t.modules[e]||(t.payloads[e]=n,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var i=function(e,t,i){if("string"==typeof t){var s=o(e,t);if(null!=s)return i&&i(),s}else if("[object Array]"===Object.prototype.toString.call(t)){for(var r=[],a=0,l=t.length;a<l;++a){var h=o(e,t[a]);if(null==h&&n.original)return;r.push(h)}return i&&i.apply(null,r)||!0}},n=function(e,t){var s=i("",e,t);return null==s&&n.original?n.original.apply(this,arguments):s},s=function(e,t){if(-1!==t.indexOf("!")){var i=t.split("!");return s(e,i[0])+"!"+s(e,i[1])}if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&n!=t;){var n=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},o=function(e,n){n=s(e,n);var o=t.modules[n];if(!o){if("function"==typeof(o=t.payloads[n])){var r={},a={id:n,uri:"",exports:r,packaged:!0},l=o((function(e,t){return i(n,e,t)}),r,a);t.modules[n]=r=l||a.exports,delete t.payloads[n]}o=t.modules[n]=r||o}return o};!function(i){var s=e;s.define&&s.define.packaged||(t.original=s.define,s.define=t,s.define.packaged=!0),s.require&&s.require.packaged||(n.original=s.require,s.require=n,s.require.packaged=!0)}()}})(),define("ace/lib/regexp",["require","exports","module"],(function(e,t,i){"use strict";function n(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function s(e,t,i){if(Array.prototype.indexOf)return e.indexOf(t,i);for(var n=i||0;n<e.length;n++)if(e[n]===t)return n;return-1}var o={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},r=void 0===o.exec.call(/()??/,"")[1],a=function(){var e=/^/g;return o.test.call(e,""),!e.lastIndex}();a&&r||(RegExp.prototype.exec=function(e){var t,i,l=o.exec.apply(this,arguments);if("string"==typeof e&&l){if(!r&&l.length>1&&s(l,"")>-1&&(i=RegExp(this.source,o.replace.call(n(this),"g","")),o.replace.call(e.slice(l.index),i,(function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(l[e]=void 0)}))),this._xregexp&&this._xregexp.captureNames)for(var h=1;h<l.length;h++)(t=this._xregexp.captureNames[h-1])&&(l[t]=l[h]);!a&&this.global&&!l[0].length&&this.lastIndex>l.index&&this.lastIndex--}return l},a||(RegExp.prototype.test=function(e){var t=o.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))})),define("ace/lib/es5-shim",["require","exports","module"],(function(e,t,i){function n(){}function s(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function o(e){return(e=+e)!=e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var i=g.call(arguments,1),s=function(){if(this instanceof s){var n=t.apply(this,i.concat(g.call(arguments)));return Object(n)===n?n:this}return t.apply(e,i.concat(g.call(arguments)))};return t.prototype&&(n.prototype=t.prototype,s.prototype=new n,n.prototype=null),s});var r,a,l,h,c,u=Function.prototype.call,d=Object.prototype,g=Array.prototype.slice,f=u.bind(d.toString),m=u.bind(d.hasOwnProperty);if((c=m(d,"__defineGetter__"))&&(r=u.bind(d.__defineGetter__),a=u.bind(d.__defineSetter__),l=u.bind(d.__lookupGetter__),h=u.bind(d.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,i=[];if(i.splice.apply(i,e(20)),i.splice.apply(i,e(26)),t=i.length,i.splice(5,0,"XXX"),t+1==i.length)return!0}()){var p=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?p.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(g.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var i=this.length;e>0?e>i&&(e=i):null==e?e=0:e<0&&(e=Math.max(i+e,0)),e+t<i||(t=i-e);var n=this.slice(e,e+t),s=g.call(arguments,2),o=s.length;if(e===i)o&&this.push.apply(this,s);else{var r=Math.min(t,i-e),a=e+r,l=a+o-r,h=i-a,c=i-r;if(l<a)for(var u=0;u<h;++u)this[l+u]=this[a+u];else if(l>a)for(u=h;u--;)this[l+u]=this[a+u];if(o&&e===c)this.length=c,this.push.apply(this,s);else for(this.length=c+o,u=0;u<o;++u)this[e+u]=s[u]}return n};Array.isArray||(Array.isArray=function(e){return"[object Array]"==f(e)});var v,w=Object("a"),b="a"!=w[0]||!(0 in w);if(Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=_(this),i=b&&"[object String]"==f(this)?this.split(""):t,n=arguments[1],s=-1,o=i.length>>>0;if("[object Function]"!=f(e))throw new TypeError;for(;++s<o;)s in i&&e.call(n,i[s],s,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=_(this),i=b&&"[object String]"==f(this)?this.split(""):t,n=i.length>>>0,s=Array(n),o=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var r=0;r<n;r++)r in i&&(s[r]=e.call(o,i[r],r,t));return s}),Array.prototype.filter||(Array.prototype.filter=function(e){var t,i=_(this),n=b&&"[object String]"==f(this)?this.split(""):i,s=n.length>>>0,o=[],r=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var a=0;a<s;a++)a in n&&e.call(r,t=n[a],a,i)&&o.push(t);return o}),Array.prototype.every||(Array.prototype.every=function(e){var t=_(this),i=b&&"[object String]"==f(this)?this.split(""):t,n=i.length>>>0,s=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var o=0;o<n;o++)if(o in i&&!e.call(s,i[o],o,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=_(this),i=b&&"[object String]"==f(this)?this.split(""):t,n=i.length>>>0,s=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var o=0;o<n;o++)if(o in i&&e.call(s,i[o],o,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=_(this),i=b&&"[object String]"==f(this)?this.split(""):t,n=i.length>>>0;if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var s,o=0;if(arguments.length>=2)s=arguments[1];else for(;;){if(o in i){s=i[o++];break}if(++o>=n)throw new TypeError("reduce of empty array with no initial value")}for(;o<n;o++)o in i&&(s=e.call(void 0,s,i[o],o,t));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=_(this),i=b&&"[object String]"==f(this)?this.split(""):t,n=i.length>>>0;if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var s,o=n-1;if(arguments.length>=2)s=arguments[1];else for(;;){if(o in i){s=i[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do{o in this&&(s=e.call(void 0,s,i[o],o,t))}while(o--);return s}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=b&&"[object String]"==f(this)?this.split(""):_(this),i=t.length>>>0;if(!i)return-1;var n=0;for(arguments.length>1&&(n=o(arguments[1])),n=n>=0?n:Math.max(0,i+n);n<i;n++)if(n in t&&t[n]===e)return n;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(e){var t=b&&"[object String]"==f(this)?this.split(""):_(this),i=t.length>>>0;if(!i)return-1;var n=i-1;for(arguments.length>1&&(n=Math.min(n,o(arguments[1]))),n=n>=0?n:i-Math.abs(n);n>=0;n--)if(n in t&&e===t[n])return n;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:d)}),Object.getOwnPropertyDescriptor||(Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(m(e,t)){var i;if(i={enumerable:!0,configurable:!0},c){var n=e.__proto__;e.__proto__=d;var s=l(e,t),o=h(e,t);if(e.__proto__=n,s||o)return s&&(i.get=s),o&&(i.set=o),i}return i.value=e[t],i}}),Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),Object.create||(v=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var i;if(null===e)i=v();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var n=function(){};n.prototype=e,(i=new n).__proto__=e}return void 0!==t&&Object.defineProperties(i,t),i}),Object.defineProperty){var $=s({}),y="undefined"==typeof document||s(document.createElement("div"));if(!$||!y)var S=Object.defineProperty}Object.defineProperty&&!S||(Object.defineProperty=function(e,t,i){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=typeof i&&"function"!=typeof i||null===i)throw new TypeError("Property description must be an object: "+i);if(S)try{return S.call(Object,e,t,i)}catch(u){}if(m(i,"value"))if(c&&(l(e,t)||h(e,t))){var n=e.__proto__;e.__proto__=d,delete e[t],e[t]=i.value,e.__proto__=n}else e[t]=i.value;else{if(!c)throw new TypeError("getters & setters can not be defined on this javascript engine");m(i,"get")&&r(e,t,i.get),m(i,"set")&&a(e,t,i.set)}return e}),Object.defineProperties||(Object.defineProperties=function(e,t){for(var i in t)m(t,i)&&Object.defineProperty(e,i,t[i]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze((function(){}))}catch(M){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";m(e,t);)t+="?";e[t]=!0;var i=m(e,t);return delete e[t],i}),!Object.keys){var C=!0,x=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],k=x.length;for(var A in{toString:null})C=!1;Object.keys=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var i in e)m(e,i)&&t.push(i);if(C)for(var n=0,s=k;n<s;n++){var o=x[n];m(e,o)&&t.push(o)}return t}}Date.now||(Date.now=function(){return(new Date).getTime()});var L="\t\n\v\f\r                 \u2028\u2029\ufeff";if(!String.prototype.trim){L="["+L+"]";var R=new RegExp("^"+L+L+"*"),E=new RegExp(L+L+"*$");String.prototype.trim=function(){return String(this).replace(R,"").replace(E,"")}}var _=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}})),define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],(function(e,t,i){"use strict";e("./regexp"),e("./es5-shim"),"undefined"!=typeof Element&&!Element.prototype.remove&&Object.defineProperty(Element.prototype,"remove",{enumerable:!1,writable:!0,configurable:!0,value:function(){this.parentNode&&this.parentNode.removeChild(this)}})})),define("ace/lib/useragent",["require","exports","module"],(function(e,t,i){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var n="object"==typeof navigator?navigator:{},s=(/mac|win|linux/i.exec(n.platform)||["other"])[0].toLowerCase(),o=n.userAgent||"",r=n.appName||"";t.isWin="win"==s,t.isMac="mac"==s,t.isLinux="linux"==s,t.isIE="Microsoft Internet Explorer"==r||r.indexOf("MSAppHost")>=0?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=o.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,t.isAIR=o.indexOf("AdobeAIR")>=0,t.isAndroid=o.indexOf("Android")>=0,t.isChromeOS=o.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(o)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,i){"use strict";var n=e("./useragent");if(t.buildDom=function e(t,i,n){if("string"==typeof t&&t){var s=document.createTextNode(t);return i&&i.appendChild(s),s}if(!Array.isArray(t))return t;if("string"!=typeof t[0]||!t[0]){for(var o=[],r=0;r<t.length;r++){var a=e(t[r],i,n);a&&o.push(a)}return o}var l=document.createElement(t[0]),h=t[1],c=1;for(h&&"object"==typeof h&&!Array.isArray(h)&&(c=2),r=c;r<t.length;r++)e(t[r],l,n);return 2==c&&Object.keys(h).forEach((function(e){var t=h[e];"class"===e?l.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e?l[e]=t:"ref"===e?n&&(n[t]=l):null!=t&&l.setAttribute(e,t)})),i&&i.appendChild(l),l},t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=""},t.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},t.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},t.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},t.addCssClass=function(e,i){t.hasCssClass(e,i)||(e.className+=" "+i)},t.removeCssClass=function(e,t){for(var i=e.className.split(/\s+/g);;){var n=i.indexOf(t);if(-1==n)break;i.splice(n,1)}e.className=i.join(" ")},t.toggleCssClass=function(e,t){for(var i=e.className.split(/\s+/g),n=!0;;){var s=i.indexOf(t);if(-1==s)break;n=!1,i.splice(s,1)}return n&&i.push(t),e.className=i.join(" "),n},t.setCssClass=function(e,i,n){n?t.addCssClass(e,i):t.removeCssClass(e,i)},t.hasCssString=function(e,t){var i,n=0;if(i=(t=t||document).querySelectorAll("style"))for(;n<i.length;)if(i[n++].id===e)return!0},t.importCssString=function(e,i,n){var s=n;n&&n.getRootNode&&(s=n.getRootNode())&&s!=n||(s=document);var o=s.ownerDocument||s;if(i&&t.hasCssString(i,s))return null;i&&(e+="\n/*# sourceURL=ace/css/"+i+" */");var r=t.createElement("style");r.appendChild(o.createTextNode(e)),i&&(r.id=i),s==o&&(s=t.getDocumentHead(o)),s.insertBefore(r,s.firstChild)},t.importCssStylsheet=function(e,i){t.buildDom(["link",{rel:"stylesheet",href:e}],t.getDocumentHead(i))},t.scrollbarWidth=function(e){var i=t.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var n=t.createElement("ace_outer"),s=n.style;s.position="absolute",s.left="-10000px",s.overflow="hidden",s.width="200px",s.minWidth="0px",s.height="150px",s.display="block",n.appendChild(i);var o=e.documentElement;o.appendChild(n);var r=i.offsetWidth;s.overflow="scroll";var a=i.offsetWidth;return r==a&&(a=n.clientWidth),o.removeChild(n),r-a},"undefined"==typeof document&&(t.importCssString=function(){}),t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,i){e[t]!==i&&(e[t]=i)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!n.isWin||"undefined"!=typeof window&&window.devicePixelRatio>=1.5,"undefined"!=typeof document){var s=document.createElement("div");t.HI_DPI&&void 0!==s.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),!n.isEdge&&void 0!==s.style.animationName&&(t.HAS_CSS_ANIMATION=!0),s=null}t.translate=t.HAS_CSS_TRANSFORMS?function(e,t,i){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(i)+"px)"}:function(e,t,i){e.style.top=Math.round(i)+"px",e.style.left=Math.round(t)+"px"}})),define("ace/lib/oop",["require","exports","module"],(function(e,t,i){"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 i in t)e[i]=t[i];return e},t.implement=function(e,i){t.mixin(e,i)}})),define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(e,t,i){"use strict";var n=e("./oop"),s=function(){var e,t,i={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},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",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in i.FUNCTION_KEYS)e=i.FUNCTION_KEYS[t].toLowerCase(),i[e]=parseInt(t,10);for(t in i.PRINTABLE_KEYS)e=i.PRINTABLE_KEYS[t].toLowerCase(),i[e]=parseInt(t,10);return n.mixin(i,i.MODIFIER_KEYS),n.mixin(i,i.PRINTABLE_KEYS),n.mixin(i,i.FUNCTION_KEYS),i.enter=i.return,i.escape=i.esc,i.del=i.delete,i[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)i.KEY_MODS[t]=e.filter((function(e){return t&i.KEY_MODS[e]})).join("-")+"-"}(),i.KEY_MODS[0]="",i.KEY_MODS[-1]="input-",i}();n.mixin(t,s),t.keyCodeToString=function(e){var t=s[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,i){"use strict";function n(){return null==r&&function(){r=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){r={passive:!1}}})}catch(e){}}(),r}function s(e,t,i){var n=u(t);if(!l.isMac&&h){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(n|=8),h.altGr){if(3==(3&n))return;h.altGr=0}if(18===i||17===i){var s="location"in t?t.location:t.keyLocation;17===i&&1===s?1==h[i]&&(c=t.timeStamp):18===i&&3===n&&2===s&&t.timeStamp-c<50&&(h.altGr=!0)}}if(i in a.MODIFIER_KEYS&&(i=-1),n||13!==i||3!==(s="location"in t?t.location:t.keyLocation)||(e(t,n,-i),!t.defaultPrevented)){if(l.isChromeOS&&8&n){if(e(t,n,i),t.defaultPrevented)return;n&=-9}return!!(n||i in a.FUNCTION_KEYS||i in a.PRINTABLE_KEYS)&&e(t,n,i)}}function o(){h=Object.create(null)}var r,a=e("./keys"),l=e("./useragent"),h=null,c=0;t.addListener=function(e,t,i){return e.addEventListener(t,i,n())},t.removeListener=function(e,t,i){return e.removeEventListener(t,i,n())},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||l.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,i,n){function s(e){i&&i(e),n&&n(e),t.removeListener(document,"mousemove",i,!0),t.removeListener(document,"mouseup",s,!0),t.removeListener(document,"dragstart",s,!0)}return t.addListener(document,"mousemove",i,!0),t.addListener(document,"mouseup",s,!0),t.addListener(document,"dragstart",s,!0),s},t.addMouseWheelListener=function(e,i){"onmousewheel"in e?t.addListener(e,"mousewheel",(function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),i(e)})):"onwheel"in e?t.addListener(e,"wheel",(function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}i(e)})):t.addListener(e,"DOMMouseScroll",(function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),i(e)}))},t.addMultiMouseDownListener=function(e,i,n,s){function o(e){if(0!==t.getButton(e)?c=0:e.detail>1?++c>4&&(c=1):c=1,l.isIE){var o=Math.abs(e.clientX-r)>5||Math.abs(e.clientY-a)>5;h&&!o||(c=1),h&&clearTimeout(h),h=setTimeout((function(){h=null}),i[c-1]||600),1==c&&(r=e.clientX,a=e.clientY)}if(e._clicks=c,n[s]("mousedown",e),c>4)c=0;else if(c>1)return n[s](u[c],e)}var r,a,h,c=0,u={2:"dblclick",3:"tripleclick",4:"quadclick"};Array.isArray(e)||(e=[e]),e.forEach((function(e){t.addListener(e,"mousedown",o)}))};var u=function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};if(t.getModifierString=function(e){return a.KEY_MODS[u(e)]},t.addCommandKeyListener=function(e,i){var n=t.addListener;if(l.isOldGecko||l.isOpera&&!("KeyboardEvent"in window)){var r=null;n(e,"keydown",(function(e){r=e.keyCode})),n(e,"keypress",(function(e){return s(i,e,r)}))}else{var a=null;n(e,"keydown",(function(e){h[e.keyCode]=(h[e.keyCode]||0)+1;var t=s(i,e,e.keyCode);return a=e.defaultPrevented,t})),n(e,"keypress",(function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)})),n(e,"keyup",(function(e){h[e.keyCode]=null})),h||(o(),n(window,"focus",o))}},"object"==typeof window&&window.postMessage&&!l.isOldIE){var d=1;t.nextTick=function(e,i){i=i||window;var n="zero-timeout-message-"+d++,s=function(o){o.data==n&&(t.stopPropagation(o),t.removeListener(i,"message",s),e())};t.addListener(i,"message",s),i.postMessage(n,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,i){return setTimeout((function i(){t.$idleBlocked?setTimeout(i,100):e()}),i)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame=t.nextFrame?t.nextFrame.bind(window):function(e){setTimeout(e,17)}})),define("ace/range",["require","exports","module"],(function(e,t,i){"use strict";var n=function(e,t,i,n){this.start={row:e,column:t},this.end={row:i,column:n}};(function(){this.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},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,i=e.end,n=e.start;return 1==(t=this.compare(i.row,i.column))?1==(t=this.compare(n.row,n.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(n.row,n.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?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:t<this.start.column?-1:t>this.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.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)},this.clipRows=function(e,t){if(this.end.row>t)var i={row:t+1,column:0};else this.end.row<e&&(i={row:e,column:0});if(this.start.row>t)var s={row:t+1,column:0};else this.start.row<e&&(s={row:e,column:0});return n.fromPoints(s||this.start,i||this.end)},this.extend=function(e,t){var i=this.compare(e,t);if(0==i)return this;if(-1==i)var s={row:e,column:t};else var o={row:e,column:t};return n.fromPoints(s||this.start,o||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return n.fromPoints(this.start,this.end)},this.collapseRows=function(){return new n(this.start.row,0,0==this.end.column?Math.max(this.start.row,this.end.row-1):this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),i=e.documentToScreenPosition(this.end);return new n(t.row,t.column,i.row,i.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(n.prototype),n.fromPoints=function(e,t){return new n(e.row,e.column,t.row,t.column)},n.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},n.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=n})),define("ace/lib/lang",["require","exports","module"],(function(e,t,i){"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){for(var i="";t>0;)1&t&&(i+=e),(t>>=1)&&(e+=e);return i};var n=/^\s\s*/,s=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(s,"")},t.copyObject=function(e){var t={};for(var i in e)t[i]=e[i];return t},t.copyArray=function(e){for(var t=[],i=0,n=e.length;i<n;i++)t[i]=e[i]&&"object"==typeof e[i]?this.copyObject(e[i]):e[i];return t},t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var i;if(Array.isArray(t)){i=[];for(var n=0;n<t.length;n++)i[n]=e(t[n]);return i}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var n in i={},t)i[n]=e(t[n]);return i},t.arrayToMap=function(e){for(var t={},i=0;i<e.length;i++)t[e[i]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var i in e)t[i]=e[i];return t},t.arrayRemove=function(e,t){for(var i=0;i<=e.length;i++)t===e[i]&&e.splice(i,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var i=[];return e.replace(t,(function(e){i.push({offset:arguments[arguments.length-2],length:e.length})})),i},t.deferredCall=function(e){var t=null,i=function(){t=null,e()},n=function(e){return n.cancel(),t=setTimeout(i,e||0),n};return n.schedule=n,n.call=function(){return this.cancel(),e(),n},n.cancel=function(){return clearTimeout(t),t=null,n},n.isPending=function(){return t},n},t.delayedCall=function(e,t){var i=null,n=function(){i=null,e()},s=function(e){null==i&&(i=setTimeout(n,e||t))};return s.delay=function(e){i&&clearTimeout(i),i=setTimeout(n,e||t)},s.schedule=s,s.call=function(){this.cancel(),e()},s.cancel=function(){i&&clearTimeout(i),i=null},s.isPending=function(){return i},s}})),define("ace/clipboard",["require","exports","module"],(function(e,t,i){"use strict";var n;i.exports={lineMode:!1,pasteCancelled:function(){return!!(n&&n>Date.now()-50)||(n=!1)},cancel:function(){n=Date.now()}}})),define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,i){"use strict";var n=e("../lib/event"),s=e("../lib/useragent"),o=e("../lib/dom"),r=e("../lib/lang"),a=e("../clipboard"),l=s.isChrome<18,h=s.isIE,c=s.isChrome>63,u=400,d=e("../lib/keys"),g=d.KEY_MODS,f=s.isIOS,m=f?/\s/:/\n/;t.TextInput=function(e,t){function i(){x=!0,v.blur(),v.focus(),x=!1}function p(){clearTimeout(V),V=setTimeout((function(){S&&(v.style.cssText=S,S=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}var v=o.createElement("textarea");v.className="ace_text-input",v.setAttribute("wrap","off"),v.setAttribute("autocorrect","off"),v.setAttribute("autocapitalize","off"),v.setAttribute("spellcheck",!1),v.style.opacity="0",e.insertBefore(v,e.firstChild);var w=!1,b=!1,$=!1,y=!1,S="";s.isMobile||(v.style.fontSize="1px");var C=!1,x=!1,k="",A=0,L=0,R=0;try{var E=document.activeElement===v}catch(K){}n.addListener(v,"blur",(function(e){x||(t.onBlur(e),E=!1)})),n.addListener(v,"focus",(function(e){if(!x){if(E=!0,s.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),s.isEdge?setTimeout(_):_()}})),this.$focusScroll=!1,this.focus=function(){if(S||c||"browser"==this.$focusScroll)return v.focus({preventScroll:!0});var e=v.style.top;v.style.position="fixed",v.style.top="0px";try{var t=0!=v.getBoundingClientRect().top}catch(n){return}var i=[];if(t)for(var s=v.parentElement;s&&1==s.nodeType;)i.push(s),s.setAttribute("ace_nocontext",!0),s=!s.parentElement&&s.getRootNode?s.getRootNode().host:s.parentElement;v.focus({preventScroll:!0}),t&&i.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){v.style.position="","0px"==v.style.top&&(v.style.top=e)}),0)},this.blur=function(){v.blur()},this.isFocused=function(){return E},t.on("beforeEndOperation",(function(){t.curOp&&"insertstring"==t.curOp.command.name||($&&(k=v.value="",N()),_())}));var _=f?function(e){if(E&&(!w||e)&&!y){e||(e="");var i="\n ab"+e+"cde fg\n";i!=v.value&&(v.value=k=i);var n=4+(e.length||(t.selection.isEmpty()?0:1));(4!=A||L!=n)&&v.setSelectionRange(4,n),A=4,L=n}}:function(){if(!$&&!y&&(E||T)){$=!0;var e=t.selection,i=e.getRange(),n=e.cursor.row,s=i.start.column,o=i.end.column,r=t.session.getLine(n);if(i.start.row!=n){var a=t.session.getLine(n-1);s=i.start.row<n-1?0:s,o+=a.length+1,r=a+"\n"+r}else if(i.end.row!=n){var l=t.session.getLine(n+1);o=i.end.row>n+1?l.length:o,o+=r.length+1,r=r+"\n"+l}r.length>u&&(s<u&&o<u?r=r.slice(0,u):(r="\n",s=0,o=1));var h=r+"\n\n";if(h!=k&&(v.value=k=h,A=L=h.length),T&&(A=v.selectionStart,L=v.selectionEnd),L!=o||A!=s||v.selectionEnd!=L)try{v.setSelectionRange(s,o),A=s,L=o}catch(d){}$=!1}};E&&t.onFocus();var M=null;this.setInputHandler=function(e){M=e},this.getInputHandler=function(){return M};var T=!1,F=function(e,i){if(T&&(T=!1),b)return _(),e&&t.onPaste(e),b=!1,"";for(var n=v.selectionStart,s=v.selectionEnd,o=A,r=k.length-L,a=e,l=e.length-n,h=e.length-s,c=0;o>0&&k[c]==e[c];)c++,o--;for(a=a.slice(c),c=1;r>0&&k.length-c>A-1&&k[k.length-c]==e[e.length-c];)c++,r--;l-=c-1,h-=c-1;var u=a.length-c+1;return u<0&&(o=-u,u=0),a=a.slice(0,u),i||a||l||o||r||h?(y=!0,a&&!o&&!r&&!l&&!h||C?t.onTextInput(a):t.onTextInput(a,{extendLeft:o,extendRight:r,restoreStart:l,restoreEnd:h}),y=!1,k=e,A=n,L=s,R=h,a):""},O=function(e){if($)return P();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var i=v.value,n=F(i,!0);(i.length>500||m.test(n))&&_()},I=function(e,t,i){var n=e.clipboardData||window.clipboardData;if(n&&!l){var s=h||i?"Text":"text/plain";try{return t?!1!==n.setData(s,t):n.getData(s)}catch(e){if(!i)return I(e,t,!0)}}},W=function(e,i){var s=t.getCopyText();if(!s)return n.preventDefault(e);I(e,s)?(f&&(_(s),w=s,setTimeout((function(){w=!1}),10)),i?t.onCut():t.onCopy(),n.preventDefault(e)):(w=!0,v.value=s,v.select(),setTimeout((function(){w=!1,_(),i?t.onCut():t.onCopy()})))},D=function(e){W(e,!0)},B=function(e){W(e,!1)},H=function(e){var i=I(e);a.pasteCancelled()||("string"==typeof i?(i&&t.onPaste(i,e),s.isIE&&setTimeout(_),n.preventDefault(e)):(v.value="",b=!0))};n.addCommandKeyListener(v,t.onCommandKey.bind(t)),n.addListener(v,"select",(function(e){$||(w?w=!1:function(e){return 0===e.selectionStart&&e.selectionEnd>=k.length&&e.value===k&&k&&e.selectionEnd!==L}(v)&&(t.selectAll(),_()))})),n.addListener(v,"input",O),n.addListener(v,"cut",D),n.addListener(v,"copy",B),n.addListener(v,"paste",H),(!("oncut"in v)||!("oncopy"in v)||!("onpaste"in v))&&n.addListener(e,"keydown",(function(e){if((!s.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:B(e);break;case 86:H(e);break;case 88:D(e)}}));var P=function(){if($&&t.onCompositionUpdate&&!t.$readOnly){if(C)return i();$.useTextareaForIME?t.onCompositionUpdate(v.value):(F(v.value),$.markerRange&&($.context&&($.markerRange.start.column=$.selectionStart=$.context.compositionStartOffset),$.markerRange.end.column=$.markerRange.start.column+L-$.selectionStart+R))}},N=function(e){t.onCompositionEnd&&!t.$readOnly&&($=!1,t.onCompositionEnd(),t.off("mousedown",i),e&&O())},z=r.delayedCall(P,50).schedule.bind(null,null);n.addListener(v,"compositionstart",(function(e){if(!$&&t.onCompositionStart&&!t.$readOnly&&($={},!C)){setTimeout(P,0),t.on("mousedown",i);var n=t.getSelectionRange();n.end.row=n.start.row,n.end.column=n.start.column,$.markerRange=n,$.selectionStart=A,t.onCompositionStart($),$.useTextareaForIME?(v.value="",k="",A=0,L=0):(v.msGetInputContext&&($.context=v.msGetInputContext()),v.getInputContext&&($.context=v.getInputContext()))}})),n.addListener(v,"compositionupdate",P),n.addListener(v,"keyup",(function(e){27==e.keyCode&&v.value.length<v.selectionStart&&($||(k=v.value),A=L=-1,_()),z()})),n.addListener(v,"keydown",z),n.addListener(v,"compositionend",N),this.getElement=function(){return v},this.setCommandMode=function(e){C=e,v.readOnly=!1},this.setReadOnly=function(e){C||(v.readOnly=e)},this.setCopyWithEmptySelection=function(e){},this.onContextMenu=function(e){T=!0,_(),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,i){S||(S=v.style.cssText),v.style.cssText=(i?"z-index:100000;":"")+(s.isIE?"opacity:0.1;":"")+"text-indent: -"+(A+L)*t.renderer.characterWidth*.5+"px;";var r=t.container.getBoundingClientRect(),a=o.computedStyle(t.container),l=r.top+(parseInt(a.borderTopWidth)||0),h=r.left+(parseInt(r.borderLeftWidth)||0),c=r.bottom-l-v.clientHeight-2,u=function(e){o.translate(v,e.clientX-h-2,Math.min(e.clientY-l-2,c))};u(e),"mousedown"==e.type&&(t.renderer.$isMousePressed=!0,clearTimeout(V),s.isWin&&n.capture(t.container,u,p))},this.onContextMenuClose=p;var V,U=function(e){t.textInput.onContextMenu(e),p()};n.addListener(v,"mouseup",U),n.addListener(v,"mousedown",(function(e){e.preventDefault(),p()})),n.addListener(t.renderer.scroller,"contextmenu",U),n.addListener(v,"contextmenu",U),f&&function(e,t,i){var n=null,s=!1;i.addEventListener("keydown",(function(e){n&&clearTimeout(n),s=!0}),!0),i.addEventListener("keyup",(function(e){n=setTimeout((function(){s=!1}),100)}),!0);var o=function(e){if(document.activeElement===i&&!(s||$||t.$mouseHandler.isMousePressed||w)){var n=i.selectionStart,o=i.selectionEnd,r=null,a=0;if(0==n?r=d.up:1==n?r=d.home:o>L&&"\n"==k[o]?r=d.end:n<A&&" "==k[n-1]?(r=d.left,a=g.option):n<A||n==A&&L!=A&&n==o?r=d.left:o>L&&k.slice(0,o).split("\n").length>2?r=d.down:o>L&&" "==k[o-1]?(r=d.right,a=g.option):(o>L||o==L&&L!=A&&n==o)&&(r=d.right),n!==o&&(a|=g.shift),r){if(!t.onCommandKey({},a,r)&&t.commands){r=d.keyCodeToString(r);var l=t.commands.findKeyCommand(a,r);l&&t.execCommand(l)}A=n,L=o,_("")}}};document.addEventListener("selectionchange",o),t.on("destroy",(function(){document.removeEventListener("selectionchange",o)}))}(0,t,v)}})),define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,i){"use strict";function n(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function s(e,t){if(e.start.row==e.end.row)var i=2*t.column-e.start.column-e.end.column;else i=e.start.row!=e.end.row-1||e.start.column||e.end.column?2*t.row-e.start.row-e.end.row:t.column-4;return i<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var o=e("../lib/useragent");(function(){this.onMouseDown=function(e){var t=e.inSelection(),i=e.getDocumentPosition();this.mousedownEvent=e;var n=this.editor,s=e.getButton();return 0!==s?((n.getSelectionRange().isEmpty()||1==s)&&n.selection.moveToPosition(i),void(2==s&&(n.textInput.onContextMenu(e.domEvent),o.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||n.isFocused()||(n.focus(),!this.$focusTimeout||this.$clickSelection||n.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(i,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var i=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(e):t||i.selection.moveToPosition(e),t||this.select(),i.renderer.scroller.setCapture&&i.renderer.scroller.setCapture(),i.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,i=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var n=this.$clickSelection.comparePoint(i);if(-1==n)e=this.$clickSelection.end;else if(1==n)e=this.$clickSelection.start;else{var o=s(this.$clickSelection,i);i=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(i),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,i=this.editor,n=i.renderer.screenToTextCoordinates(this.x,this.y),o=i.selection[e](n.row,n.column);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(o.start),a=this.$clickSelection.comparePoint(o.end);if(-1==r&&a<=0)t=this.$clickSelection.end,o.end.row==n.row&&o.end.column==n.column||(n=o.start);else if(1==a&&r>=0)t=this.$clickSelection.start,o.start.row==n.row&&o.start.column==n.column||(n=o.end);else if(-1==r&&1==a)n=o.end,t=o.start;else{var l=s(this.$clickSelection,n);n=l.cursor,t=l.anchor}i.selection.setSelectionAnchor(t.row,t.column)}i.selection.selectToPosition(n),i.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=function(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))}(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>0||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),i=this.editor,n=i.session.getBracketRange(t);n?(n.isEmpty()&&(n.start.column--,n.end.column++),this.setState("select")):(n=i.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=n,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var n=i.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=i.selection.getLineRange(n.start.row),this.$clickSelection.end=i.selection.getLineRange(n.end.row).end):this.$clickSelection=i.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var i=this.$lastScroll,n=e.domEvent.timeStamp,s=n-i.t,o=s?e.wheelX/s:i.vx,r=s?e.wheelY/s:i.vy;s<550&&(o=(o+i.vx)/2,r=(r+i.vy)/2);var a=Math.abs(o/r),l=!1;return a>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l?i.allowed=n:n-i.allowed<550&&(Math.abs(o)<=1.5*Math.abs(i.vx)&&Math.abs(r)<=1.5*Math.abs(i.vy)?(l=!0,i.allowed=n):i.allowed=0),i.t=n,i.vx=o,i.vy=r,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(n.prototype),t.DefaultHandlers=n})),define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(e,t,i){"use strict";function n(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}e("./lib/oop");var s=e("./lib/dom");(function(){this.$init=function(){return this.$element=s.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){s.addCssClass(this.getElement(),e)},this.show=function(e,t,i){null!=e&&this.setText(e),null!=t&&null!=i&&this.setPosition(t,i),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(n.prototype),t.Tooltip=n})),define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(e,t,i){"use strict";function n(e){a.call(this,e)}var s=e("../lib/dom"),o=e("../lib/oop"),r=e("../lib/event"),a=e("../tooltip").Tooltip;o.inherits(n,a),(function(){this.setPosition=function(e,t){var i=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,s=this.getWidth(),o=this.getHeight();(e+=15)+s>i&&(e-=e+s-i),(t+=15)+o>n&&(t-=20+o),a.prototype.setPosition.call(this,e,t)}}).call(n.prototype),t.GutterHandler=function(e){function t(){var t=l.getDocumentPosition().row,n=u.$annotations[t];if(!n)return i();if(t==c.session.getLength()){var s=c.renderer.pixelToScreenCoordinates(0,l.y).row,r=l.$pos;if(s>c.session.documentToScreenRow(r.row,r.column))return i()}if(h!=n)if(h=n.text.join("<br/>"),d.setHtml(h),d.show(),c._signal("showGutterTooltip",d),c.on("mousewheel",i),e.$tooltipFollowsMouse)o(l);else{var a=l.domEvent.target.getBoundingClientRect(),g=d.getElement().style;g.left=a.right+"px",g.top=a.bottom+"px"}}function i(){a&&(a=clearTimeout(a)),h&&(d.hide(),h=null,c._signal("hideGutterTooltip",d),c.removeEventListener("mousewheel",i))}function o(e){d.setPosition(e.x,e.y)}var a,l,h,c=e.editor,u=c.renderer.$gutterLayer,d=new n(c.container);e.editor.setDefaultHandler("guttermousedown",(function(t){if(c.isFocused()&&0==t.getButton()&&"foldWidgets"!=u.getRegion(t)){var i=t.getDocumentPosition().row,n=c.session.selection;if(t.getShiftKey())n.selectTo(i,0);else{if(2==t.domEvent.detail)return c.selectAll(),t.preventDefault();e.$clickSelection=c.selection.getLineRange(i)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(n){if(s.hasCssClass(n.domEvent.target||n.domEvent.srcElement,"ace_fold-widget"))return i();h&&e.$tooltipFollowsMouse&&o(n),l=n,a||(a=setTimeout((function(){a=null,l&&!e.isMousePressed?t():i()}),50))})),r.addListener(c.renderer.$gutter,"mouseout",(function(e){l=null,h&&!a&&(a=setTimeout((function(){a=null,i()}),50))})),c.on("changeSession",i)}})),define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,i){"use strict";var n=e("../lib/event"),s=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return n.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=s.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)})),define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,i){"use strict";function n(e){function t(){var e=y;(function(e,t){var i=Date.now();k&&t&&e.row==t.row&&t&&e.column==t.column?s(A.x,A.y,v,w)>c?k=null:i-k>=h&&(f.renderer.scrollCursorIntoView(),k=null):(f.moveCursorToPosition(e),k=i,A={x:v,y:w})})(y=f.renderer.screenToTextCoordinates(v,w),e),function(e,t){var i=Date.now(),n=f.renderer.layerConfig.lineHeight,s=f.renderer.layerConfig.characterWidth,o=f.renderer.scroller.getBoundingClientRect(),r={x:{left:v-o.left,right:o.right-v},y:{top:w-o.top,bottom:o.bottom-w}},a=Math.min(r.x.left,r.x.right),h=Math.min(r.y.top,r.y.bottom),c={row:e.row,column:e.column};a/s<=2&&(c.column+=r.x.left<r.x.right?-3:2),h/n<=1&&(c.row+=r.y.top<r.y.bottom?-1:1),e.row!=c.row||e.column!=c.column&&t&&e.row==t.row?x?i-x>=l&&f.renderer.scrollCursorIntoView(c):x=i:x=null}(y,e)}function i(){$=f.selection.toOrientedRange(),p=f.session.addMarker($,"ace_selection",f.getSelectionStyle()),f.clearSelection(),f.isFocused()&&f.renderer.$cursorLayer.setBlinking(!1),clearInterval(b),t(),b=setInterval(t,20),R=0,r.addListener(document,"mousemove",u)}function n(){clearInterval(b),f.session.removeMarker(p),p=null,f.selection.fromOrientedRange($),f.isFocused()&&!C&&f.$resetCursorStyle(),$=null,y=null,R=0,x=null,k=null,r.removeListener(document,"mousemove",u)}function u(){null==E&&(E=setTimeout((function(){null!=E&&p&&n()}),20))}function d(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function g(e){var t=["copy","copymove","all","uninitialized"],i=a.isMac?e.altKey:e.ctrlKey,n="uninitialized";try{n=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var s="none";return i&&t.indexOf(n)>=0?s="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(n)>=0?s="move":t.indexOf(n)>=0&&(s="copy"),s}var f=e.editor,m=o.createElement("img");m.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",a.isOpera&&(m.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"),["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),f.addEventListener("mousedown",this.onMouseDown.bind(e));var p,v,w,b,$,y,S,C,x,k,A,L=f.container,R=0;this.onDragStart=function(e){if(this.cancelDrag||!L.draggable){var t=this;return setTimeout((function(){t.startSelect(),t.captureMouse(e)}),0),e.preventDefault()}$=f.getSelectionRange();var i=e.dataTransfer;i.effectAllowed=f.getReadOnly()?"copy":"copyMove",a.isOpera&&(f.container.appendChild(m),m.scrollTop=0),i.setDragImage&&i.setDragImage(m,0,0),a.isOpera&&f.container.removeChild(m),i.clearData(),i.setData("Text",f.session.getTextRange()),C=!0,this.setState("drag")},this.onDragEnd=function(e){L.draggable=!1,C=!1,this.setState(null),f.getReadOnly()||(!S&&"move"==e.dataTransfer.dropEffect&&f.session.remove(f.getSelectionRange()),f.$resetCursorStyle()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!f.getReadOnly()&&d(e.dataTransfer))return v=e.clientX,w=e.clientY,p||i(),R++,e.dataTransfer.dropEffect=S=g(e),r.preventDefault(e)},this.onDragOver=