UNPKG

connect-platform

Version:

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

1 lines 1000 kB
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(t,e,n){t.exports=n("zUnb")},B9Yq:function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},Bhyg:function(t,e,n){!function(){var t=function(){return this}();t||"undefined"==typeof window||(t=window);var e=function(t,n,i){"string"==typeof t?(2==arguments.length&&(i=n),e.modules[t]||(e.payloads[t]=i,e.modules[t]=null)):e.original?e.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};e.modules={},e.payloads={};var n,i=function(t,e,n){if("string"==typeof e){var i=o(t,e);if(null!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(e)){for(var r=[],a=0,l=e.length;a<l;++a){var c=o(t,e[a]);if(null==c&&s.original)return;r.push(c)}return n&&n.apply(null,r)||!0}},s=function(t,e){var n=i("",t,e);return null==n&&s.original?s.original.apply(this,arguments):n},r=function(t,e){if(-1!==e.indexOf("!")){var n=e.split("!");return r(t,n[0])+"!"+r(t,n[1])}if("."==e.charAt(0))for(e=t.split("/").slice(0,-1).join("/")+"/"+e;-1!==e.indexOf(".")&&i!=e;){var i=e;e=e.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return e},o=function(t,n){n=r(t,n);var s=e.modules[n];if(!s){if("function"==typeof(s=e.payloads[n])){var o={},a={id:n,uri:"",exports:o,packaged:!0},l=s((function(t,e){return i(n,t,e)}),o,a);e.modules[n]=o=l||a.exports,delete e.payloads[n]}s=e.modules[n]=o||s}return s};n=t,t.ace||(t.ace={}),(n=t.ace).define&&n.define.packaged||(e.original=n.define,n.define=e,n.define.packaged=!0),n.acequire&&n.acequire.packaged||(s.original=n.acequire,n.acequire=s,n.acequire.packaged=!0)}(),ace.define("ace/lib/regexp",["require","exports","module"],(function(t,e,n){"use strict";var i,s={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},r=void 0===s.exec.call(/()??/,"")[1],o=(s.test.call(i=/^/g,""),!i.lastIndex);function a(t){return(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.extended?"x":"")+(t.sticky?"y":"")}function l(t,e,n){if(Array.prototype.indexOf)return t.indexOf(e,n);for(var i=n||0;i<t.length;i++)if(t[i]===e)return i;return-1}o&&r||(RegExp.prototype.exec=function(t){var e,n,i=s.exec.apply(this,arguments);if("string"==typeof t&&i){if(!r&&i.length>1&&l(i,"")>-1&&(n=RegExp(this.source,s.replace.call(a(this),"g","")),s.replace.call(t.slice(i.index),n,(function(){for(var t=1;t<arguments.length-2;t++)void 0===arguments[t]&&(i[t]=void 0)}))),this._xregexp&&this._xregexp.captureNames)for(var c=1;c<i.length;c++)(e=this._xregexp.captureNames[c-1])&&(i[e]=i[c]);!o&&this.global&&!i[0].length&&this.lastIndex>i.index&&this.lastIndex--}return i},o||(RegExp.prototype.test=function(t){var e=s.exec.call(this,t);return e&&this.global&&!e[0].length&&this.lastIndex>e.index&&this.lastIndex--,!!e}))})),ace.define("ace/lib/es5-shim",["require","exports","module"],(function(t,e,n){function i(){}Function.prototype.bind||(Function.prototype.bind=function(t){var e=this;if("function"!=typeof e)throw new TypeError("Function.prototype.bind called on incompatible "+e);var n=u.call(arguments,1),s=function(){if(this instanceof s){var i=e.apply(this,n.concat(u.call(arguments)));return Object(i)===i?i:this}return e.apply(t,n.concat(u.call(arguments)))};return e.prototype&&(i.prototype=e.prototype,s.prototype=new i,i.prototype=null),s});var s,r,o,a,l,c=Function.prototype.call,h=Object.prototype,u=Array.prototype.slice,d=c.bind(h.toString),p=c.bind(h.hasOwnProperty);if((l=p(h,"__defineGetter__"))&&(s=c.bind(h.__defineGetter__),r=c.bind(h.__defineSetter__),o=c.bind(h.__lookupGetter__),a=c.bind(h.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function t(t){var e=new Array(t+2);return e[0]=e[1]=0,e}var e,n=[];if(n.splice.apply(n,t(20)),n.splice.apply(n,t(26)),e=n.length,n.splice(5,0,"XXX"),e+1==n.length)return!0}()){var g=Array.prototype.splice;Array.prototype.splice=function(t,e){return arguments.length?g.apply(this,[void 0===t?0:t,void 0===e?this.length-t:e].concat(u.call(arguments,2))):[]}}else Array.prototype.splice=function(t,e){var n=this.length;t>0?t>n&&(t=n):null==t?t=0:t<0&&(t=Math.max(n+t,0)),t+e<n||(e=n-t);var i=this.slice(t,t+e),s=u.call(arguments,2),r=s.length;if(t===n)r&&this.push.apply(this,s);else{var o=Math.min(e,n-t),a=t+o,l=a+r-o,c=n-a,h=n-o;if(l<a)for(var d=0;d<c;++d)this[l+d]=this[a+d];else if(l>a)for(d=c;d--;)this[l+d]=this[a+d];if(r&&t===h)this.length=h,this.push.apply(this,s);else for(this.length=h+r,d=0;d<r;++d)this[t+d]=s[d]}return i};Array.isArray||(Array.isArray=function(t){return"[object Array]"==d(t)});var f,m,y=Object("a"),v="a"!=y[0]||!(0 in y);function b(t){try{return Object.defineProperty(t,"sentinel",{}),"sentinel"in t}catch(e){}}if(Array.prototype.forEach||(Array.prototype.forEach=function(t){var e=D(this),n=v&&"[object String]"==d(this)?this.split(""):e,i=arguments[1],s=-1,r=n.length>>>0;if("[object Function]"!=d(t))throw new TypeError;for(;++s<r;)s in n&&t.call(i,n[s],s,e)}),Array.prototype.map||(Array.prototype.map=function(t){var e=D(this),n=v&&"[object String]"==d(this)?this.split(""):e,i=n.length>>>0,s=Array(i),r=arguments[1];if("[object Function]"!=d(t))throw new TypeError(t+" is not a function");for(var o=0;o<i;o++)o in n&&(s[o]=t.call(r,n[o],o,e));return s}),Array.prototype.filter||(Array.prototype.filter=function(t){var e,n=D(this),i=v&&"[object String]"==d(this)?this.split(""):n,s=i.length>>>0,r=[],o=arguments[1];if("[object Function]"!=d(t))throw new TypeError(t+" is not a function");for(var a=0;a<s;a++)a in i&&t.call(o,e=i[a],a,n)&&r.push(e);return r}),Array.prototype.every||(Array.prototype.every=function(t){var e=D(this),n=v&&"[object String]"==d(this)?this.split(""):e,i=n.length>>>0,s=arguments[1];if("[object Function]"!=d(t))throw new TypeError(t+" is not a function");for(var r=0;r<i;r++)if(r in n&&!t.call(s,n[r],r,e))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t){var e=D(this),n=v&&"[object String]"==d(this)?this.split(""):e,i=n.length>>>0,s=arguments[1];if("[object Function]"!=d(t))throw new TypeError(t+" is not a function");for(var r=0;r<i;r++)if(r in n&&t.call(s,n[r],r,e))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(t){var e=D(this),n=v&&"[object String]"==d(this)?this.split(""):e,i=n.length>>>0;if("[object Function]"!=d(t))throw new TypeError(t+" is not a function");if(!i&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var s,r=0;if(arguments.length>=2)s=arguments[1];else for(;;){if(r in n){s=n[r++];break}if(++r>=i)throw new TypeError("reduce of empty array with no initial value")}for(;r<i;r++)r in n&&(s=t.call(void 0,s,n[r],r,e));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(t){var e=D(this),n=v&&"[object String]"==d(this)?this.split(""):e,i=n.length>>>0;if("[object Function]"!=d(t))throw new TypeError(t+" is not a function");if(!i&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var s,r=i-1;if(arguments.length>=2)s=arguments[1];else for(;;){if(r in n){s=n[r--];break}if(--r<0)throw new TypeError("reduceRight of empty array with no initial value")}do{r in this&&(s=t.call(void 0,s,n[r],r,e))}while(r--);return s}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(t){var e=v&&"[object String]"==d(this)?this.split(""):D(this),n=e.length>>>0;if(!n)return-1;var i=0;for(arguments.length>1&&(i=M(arguments[1])),i=i>=0?i:Math.max(0,n+i);i<n;i++)if(i in e&&e[i]===t)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(t){var e=v&&"[object String]"==d(this)?this.split(""):D(this),n=e.length>>>0;if(!n)return-1;var i=n-1;for(arguments.length>1&&(i=Math.min(i,M(arguments[1]))),i=i>=0?i:n-Math.abs(i);i>=0;i--)if(i in e&&t===e[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(t){return t.__proto__||(t.constructor?t.constructor.prototype:h)}),Object.getOwnPropertyDescriptor||(Object.getOwnPropertyDescriptor=function(t,e){if("object"!=typeof t&&"function"!=typeof t||null===t)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+t);if(p(t,e)){var n;if(n={enumerable:!0,configurable:!0},l){var i=t.__proto__;t.__proto__=h;var s=o(t,e),r=a(t,e);if(t.__proto__=i,s||r)return s&&(n.get=s),r&&(n.set=r),n}return n.value=t[e],n}}),Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(t){return Object.keys(t)}),Object.create||(f=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var t={};for(var e in t)t[e]=null;return t.constructor=t.hasOwnProperty=t.propertyIsEnumerable=t.isPrototypeOf=t.toLocaleString=t.toString=t.valueOf=t.__proto__=null,t},Object.create=function(t,e){var n;if(null===t)n=f();else{if("object"!=typeof t)throw new TypeError("typeof prototype["+typeof t+"] != 'object'");var i=function(){};i.prototype=t,(n=new i).__proto__=t}return void 0!==e&&Object.defineProperties(n,e),n}),Object.defineProperty){var C=b({}),w="undefined"==typeof document||b(document.createElement("div"));if(!C||!w)var _=Object.defineProperty}Object.defineProperty&&!_||(Object.defineProperty=function(t,e,n){if("object"!=typeof t&&"function"!=typeof t||null===t)throw new TypeError("Object.defineProperty called on non-object: "+t);if("object"!=typeof n&&"function"!=typeof n||null===n)throw new TypeError("Property description must be an object: "+n);if(_)try{return _.call(Object,t,e,n)}catch(c){}if(p(n,"value"))if(l&&(o(t,e)||a(t,e))){var i=t.__proto__;t.__proto__=h,delete t[e],t[e]=n.value,t.__proto__=i}else t[e]=n.value;else{if(!l)throw new TypeError("getters & setters can not be defined on this javascript engine");p(n,"get")&&s(t,e,n.get),p(n,"set")&&r(t,e,n.set)}return t}),Object.defineProperties||(Object.defineProperties=function(t,e){for(var n in e)p(e,n)&&Object.defineProperty(t,n,e[n]);return t}),Object.seal||(Object.seal=function(t){return t}),Object.freeze||(Object.freeze=function(t){return t});try{Object.freeze((function(){}))}catch(P){Object.freeze=(m=Object.freeze,function(t){return"function"==typeof t?t:m(t)})}if(Object.preventExtensions||(Object.preventExtensions=function(t){return t}),Object.isSealed||(Object.isSealed=function(t){return!1}),Object.isFrozen||(Object.isFrozen=function(t){return!1}),Object.isExtensible||(Object.isExtensible=function(t){if(Object(t)===t)throw new TypeError;for(var e="";p(t,e);)e+="?";t[e]=!0;var n=p(t,e);return delete t[e],n}),!Object.keys){var A=!0,x=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],E=x.length;for(var k in{toString:null})A=!1;Object.keys=function(t){if("object"!=typeof t&&"function"!=typeof t||null===t)throw new TypeError("Object.keys called on a non-object");var e=[];for(var n in t)p(t,n)&&e.push(n);if(A)for(var i=0,s=E;i<s;i++){var r=x[i];p(t,r)&&e.push(r)}return e}}Date.now||(Date.now=function(){return(new Date).getTime()});var S="\t\n\v\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";if(!String.prototype.trim||S.trim()){S="["+S+"]";var F=new RegExp("^"+S+S+"*"),O=new RegExp(S+S+"*$");String.prototype.trim=function(){return String(this).replace(F,"").replace(O,"")}}function M(t){return(t=+t)!=t?t=0:0!==t&&t!==1/0&&t!==-1/0&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t}var D=function(t){if(null==t)throw new TypeError("can't convert "+t+" to object");return Object(t)}})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],(function(t,e,n){"use strict";t("./regexp"),t("./es5-shim")})),ace.define("ace/lib/dom",["require","exports","module"],(function(t,e,n){"use strict";e.getDocumentHead=function(t){return t||(t=document),t.head||t.getElementsByTagName("head")[0]||t.documentElement},e.createElement=function(t,e){return document.createElementNS?document.createElementNS(e||"http://www.w3.org/1999/xhtml",t):document.createElement(t)},e.hasCssClass=function(t,e){return-1!==(t.className+"").split(/\s+/g).indexOf(e)},e.addCssClass=function(t,n){e.hasCssClass(t,n)||(t.className+=" "+n)},e.removeCssClass=function(t,e){for(var n=t.className.split(/\s+/g);;){var i=n.indexOf(e);if(-1==i)break;n.splice(i,1)}t.className=n.join(" ")},e.toggleCssClass=function(t,e){for(var n=t.className.split(/\s+/g),i=!0;;){var s=n.indexOf(e);if(-1==s)break;i=!1,n.splice(s,1)}return i&&n.push(e),t.className=n.join(" "),i},e.setCssClass=function(t,n,i){i?e.addCssClass(t,n):e.removeCssClass(t,n)},e.hasCssString=function(t,e){var n,i=0;if((e=e||document).createStyleSheet&&(n=e.styleSheets)){for(;i<n.length;)if(n[i++].owningElement.id===t)return!0}else if(n=e.getElementsByTagName("style"))for(;i<n.length;)if(n[i++].id===t)return!0;return!1},e.importCssString=function(t,n,i){if(i=i||document,n&&e.hasCssString(n,i))return null;var s;n&&(t+="\n/*# sourceURL=ace/css/"+n+" */"),i.createStyleSheet?((s=i.createStyleSheet()).cssText=t,n&&(s.owningElement.id=n)):((s=e.createElement("style")).appendChild(i.createTextNode(t)),n&&(s.id=n),e.getDocumentHead(i).appendChild(s))},e.importCssStylsheet=function(t,n){if(n.createStyleSheet)n.createStyleSheet(t);else{var i=e.createElement("link");i.rel="stylesheet",i.href=t,e.getDocumentHead(n).appendChild(i)}},e.getInnerWidth=function(t){return parseInt(e.computedStyle(t,"paddingLeft"),10)+parseInt(e.computedStyle(t,"paddingRight"),10)+t.clientWidth},e.getInnerHeight=function(t){return parseInt(e.computedStyle(t,"paddingTop"),10)+parseInt(e.computedStyle(t,"paddingBottom"),10)+t.clientHeight},e.scrollbarWidth=function(t){var n=e.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var i=e.createElement("ace_outer"),s=i.style;s.position="absolute",s.left="-10000px",s.overflow="hidden",s.width="200px",s.minWidth="0px",s.height="150px",s.display="block",i.appendChild(n);var r=t.documentElement;r.appendChild(i);var o=n.offsetWidth;s.overflow="scroll";var a=n.offsetWidth;return o==a&&(a=i.clientWidth),r.removeChild(i),o-a},"undefined"!=typeof document?(void 0!==window.pageYOffset?(e.getPageScrollTop=function(){return window.pageYOffset},e.getPageScrollLeft=function(){return window.pageXOffset}):(e.getPageScrollTop=function(){return document.body.scrollTop},e.getPageScrollLeft=function(){return document.body.scrollLeft}),e.computedStyle=window.getComputedStyle?function(t,e){return e?(window.getComputedStyle(t,"")||{})[e]||"":window.getComputedStyle(t,"")||{}}:function(t,e){return e?t.currentStyle[e]:t.currentStyle},e.setInnerHtml=function(t,e){var n=t.cloneNode(!1);return n.innerHTML=e,t.parentNode.replaceChild(n,t),n},"textContent"in document.documentElement?(e.setInnerText=function(t,e){t.textContent=e},e.getInnerText=function(t){return t.textContent}):(e.setInnerText=function(t,e){t.innerText=e},e.getInnerText=function(t){return t.innerText}),e.getParentWindow=function(t){return t.defaultView||t.parentWindow}):e.importCssString=function(){}})),ace.define("ace/lib/oop",["require","exports","module"],(function(t,e,n){"use strict";e.inherits=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})},e.mixin=function(t,e){for(var n in e)t[n]=e[n];return t},e.implement=function(t,n){e.mixin(t,n)}})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"],(function(t,e,n){"use strict";t("./fixoldbrowsers");var i=t("./oop"),s=function(){var t,e,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},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(e in n.FUNCTION_KEYS)t=n.FUNCTION_KEYS[e].toLowerCase(),n[t]=parseInt(e,10);for(e in n.PRINTABLE_KEYS)t=n.PRINTABLE_KEYS[e].toLowerCase(),n[t]=parseInt(e,10);return i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,n[173]="-",function(){for(var t=["cmd","ctrl","alt","shift"],e=Math.pow(2,t.length);e--;)n.KEY_MODS[e]=t.filter((function(t){return e&n.KEY_MODS[t]})).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();i.mixin(e,s),e.keyCodeToString=function(t){var e=s[t];return"string"!=typeof e&&(e=String.fromCharCode(t)),e.toLowerCase()}})),ace.define("ace/lib/useragent",["require","exports","module"],(function(t,e,n){"use strict";if(e.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},e.getOS=function(){return e.isMac?e.OS.MAC:e.isLinux?e.OS.LINUX:e.OS.WINDOWS},"object"==typeof navigator){var i=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),s=navigator.userAgent;e.isWin="win"==i,e.isMac="mac"==i,e.isLinux="linux"==i,e.isIE="Microsoft Internet Explorer"==navigator.appName||navigator.appName.indexOf("MSAppHost")>=0?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),e.isOldIE=e.isIE&&e.isIE<9,e.isGecko=e.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,e.isOldGecko=e.isGecko&&parseInt((s.match(/rv:(\d+)/)||[])[1],10)<4,e.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),e.isWebKit=parseFloat(s.split("WebKit/")[1])||void 0,e.isChrome=parseFloat(s.split(" Chrome/")[1])||void 0,e.isAIR=s.indexOf("AdobeAIR")>=0,e.isIPad=s.indexOf("iPad")>=0,e.isChromeOS=s.indexOf(" CrOS ")>=0,e.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,e.isIOS&&(e.isMac=!0)}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(t,e,n){"use strict";var i=t("./keys"),s=t("./useragent"),r=null,o=0;e.addListener=function(t,e,n){if(t.addEventListener)return t.addEventListener(e,n,!1);if(t.attachEvent){var i=function(){n.call(t,window.event)};n._wrapper=i,t.attachEvent("on"+e,i)}},e.removeListener=function(t,e,n){if(t.removeEventListener)return t.removeEventListener(e,n,!1);t.detachEvent&&t.detachEvent("on"+e,n._wrapper||n)},e.stopEvent=function(t){return e.stopPropagation(t),e.preventDefault(t),!1},e.stopPropagation=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},e.preventDefault=function(t){t.preventDefault?t.preventDefault():t.returnValue=!1},e.getButton=function(t){return"dblclick"==t.type?0:"contextmenu"==t.type||s.isMac&&t.ctrlKey&&!t.altKey&&!t.shiftKey?2:t.preventDefault?t.button:{1:0,2:2,4:1}[t.button]},e.capture=function(t,n,i){function s(t){n&&n(t),i&&i(t),e.removeListener(document,"mousemove",n,!0),e.removeListener(document,"mouseup",s,!0),e.removeListener(document,"dragstart",s,!0)}return e.addListener(document,"mousemove",n,!0),e.addListener(document,"mouseup",s,!0),e.addListener(document,"dragstart",s,!0),s},e.addTouchMoveListener=function(t,n){var i,s;e.addListener(t,"touchstart",(function(t){var e=t.touches[0];i=e.clientX,s=e.clientY})),e.addListener(t,"touchmove",(function(t){var e=t.touches;if(!(e.length>1)){var r=e[0];t.wheelX=i-r.clientX,t.wheelY=s-r.clientY,i=r.clientX,s=r.clientY,n(t)}}))},e.addMouseWheelListener=function(t,n){"onmousewheel"in t?e.addListener(t,"mousewheel",(function(t){void 0!==t.wheelDeltaX?(t.wheelX=-t.wheelDeltaX/8,t.wheelY=-t.wheelDeltaY/8):(t.wheelX=0,t.wheelY=-t.wheelDelta/8),n(t)})):"onwheel"in t?e.addListener(t,"wheel",(function(t){switch(t.deltaMode){case t.DOM_DELTA_PIXEL:t.wheelX=.35*t.deltaX||0,t.wheelY=.35*t.deltaY||0;break;case t.DOM_DELTA_LINE:case t.DOM_DELTA_PAGE:t.wheelX=5*(t.deltaX||0),t.wheelY=5*(t.deltaY||0)}n(t)})):e.addListener(t,"DOMMouseScroll",(function(t){t.axis&&t.axis==t.HORIZONTAL_AXIS?(t.wheelX=5*(t.detail||0),t.wheelY=0):(t.wheelX=0,t.wheelY=5*(t.detail||0)),n(t)}))},e.addMultiMouseDownListener=function(t,n,i,r){var o,a,l,c=0,h={2:"dblclick",3:"tripleclick",4:"quadclick"};function u(t){if(0!==e.getButton(t)?c=0:t.detail>1?++c>4&&(c=1):c=1,s.isIE){var u=Math.abs(t.clientX-o)>5||Math.abs(t.clientY-a)>5;l&&!u||(c=1),l&&clearTimeout(l),l=setTimeout((function(){l=null}),n[c-1]||600),1==c&&(o=t.clientX,a=t.clientY)}if(t._clicks=c,i[r]("mousedown",t),c>4)c=0;else if(c>1)return i[r](h[c],t)}function d(t){c=2,l&&clearTimeout(l),l=setTimeout((function(){l=null}),n[c-1]||600),i[r]("mousedown",t),i[r](h[c],t)}Array.isArray(t)||(t=[t]),t.forEach((function(t){e.addListener(t,"mousedown",u),s.isOldIE&&e.addListener(t,"dblclick",d)}))};var a=s.isMac&&s.isOpera&&!("KeyboardEvent"in window)?function(t){return 0|(t.metaKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.ctrlKey?8:0)}:function(t){return 0|(t.ctrlKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.metaKey?8:0)};function l(t,e,n){var l=a(e);if(!s.isMac&&r){if(e.getModifierState&&(e.getModifierState("OS")||e.getModifierState("Win"))&&(l|=8),r.altGr){if(3==(3&l))return;r.altGr=0}if(18===n||17===n){var c="location"in e?e.location:e.keyLocation;17===n&&1===c?1==r[n]&&(o=e.timeStamp):18===n&&3===l&&2===c&&e.timeStamp-o<50&&(r.altGr=!0)}}if(n in i.MODIFIER_KEYS&&(n=-1),8&l&&n>=91&&n<=93&&(n=-1),l||13!==n||3!==(c="location"in e?e.location:e.keyLocation)||(t(e,l,-n),!e.defaultPrevented)){if(s.isChromeOS&&8&l){if(t(e,l,n),e.defaultPrevented)return;l&=-9}return!!(l||n in i.FUNCTION_KEYS||n in i.PRINTABLE_KEYS)&&t(e,l,n)}}function c(){r=Object.create(null)}e.getModifierString=function(t){return i.KEY_MODS[a(t)]},e.addCommandKeyListener=function(t,n){var i=e.addListener;if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var o=null;i(t,"keydown",(function(t){o=t.keyCode})),i(t,"keypress",(function(t){return l(n,t,o)}))}else{var a=null;i(t,"keydown",(function(t){r[t.keyCode]=(r[t.keyCode]||0)+1;var e=l(n,t,t.keyCode);return a=t.defaultPrevented,e})),i(t,"keypress",(function(t){a&&(t.ctrlKey||t.altKey||t.shiftKey||t.metaKey)&&(e.stopEvent(t),a=null)})),i(t,"keyup",(function(t){r[t.keyCode]=null})),r||(c(),i(window,"focus",c))}},"object"==typeof window&&window.postMessage&&!s.isOldIE&&(e.nextTick=function(t,n){n=n||window,e.addListener(n,"message",(function i(s){"zero-timeout-message-1"==s.data&&(e.stopPropagation(s),e.removeListener(n,"message",i),t())})),n.postMessage("zero-timeout-message-1","*")}),e.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),e.nextFrame=e.nextFrame?e.nextFrame.bind(window):function(t){setTimeout(t,17)}})),ace.define("ace/lib/lang",["require","exports","module"],(function(t,e,n){"use strict";e.last=function(t){return t[t.length-1]},e.stringReverse=function(t){return t.split("").reverse().join("")},e.stringRepeat=function(t,e){for(var n="";e>0;)1&e&&(n+=t),(e>>=1)&&(t+=t);return n};var i=/^\s\s*/,s=/\s\s*$/;e.stringTrimLeft=function(t){return t.replace(i,"")},e.stringTrimRight=function(t){return t.replace(s,"")},e.copyObject=function(t){var e={};for(var n in t)e[n]=t[n];return e},e.copyArray=function(t){for(var e=[],n=0,i=t.length;n<i;n++)e[n]=t[n]&&"object"==typeof t[n]?this.copyObject(t[n]):t[n];return e},e.deepCopy=function t(e){if("object"!=typeof e||!e)return e;var n;if(Array.isArray(e)){n=[];for(var i=0;i<e.length;i++)n[i]=t(e[i]);return n}if("[object Object]"!==Object.prototype.toString.call(e))return e;for(var i in n={},e)n[i]=t(e[i]);return n},e.arrayToMap=function(t){for(var e={},n=0;n<t.length;n++)e[t[n]]=1;return e},e.createMap=function(t){var e=Object.create(null);for(var n in t)e[n]=t[n];return e},e.arrayRemove=function(t,e){for(var n=0;n<=t.length;n++)e===t[n]&&t.splice(n,1)},e.escapeRegExp=function(t){return t.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},e.escapeHTML=function(t){return t.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},e.getMatchOffsets=function(t,e){var n=[];return t.replace(e,(function(t){n.push({offset:arguments[arguments.length-2],length:t.length})})),n},e.deferredCall=function(t){var e=null,n=function(){e=null,t()},i=function(t){return i.cancel(),e=setTimeout(n,t||0),i};return i.schedule=i,i.call=function(){return this.cancel(),t(),i},i.cancel=function(){return clearTimeout(e),e=null,i},i.isPending=function(){return e},i},e.delayedCall=function(t,e){var n=null,i=function(){n=null,t()},s=function(t){null==n&&(n=setTimeout(i,t||e))};return s.delay=function(t){n&&clearTimeout(n),n=setTimeout(i,t||e)},s.schedule=s,s.call=function(){this.cancel(),t()},s.cancel=function(){n&&clearTimeout(n),n=null},s.isPending=function(){return n},s}})),ace.define("ace/keyboard/textinput_ios",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/lib/keys"],(function(t,e,n){"use strict";var i=t("../lib/event"),s=t("../lib/useragent"),r=t("../lib/dom"),o=t("../lib/lang"),a=t("../lib/keys"),l=a.KEY_MODS,c=s.isChrome<18,h=s.isIE;e.TextInput=function(t,e){var n=r.createElement("textarea");n.className=s.isIOS?"ace_text-input ace_text-input-ios":"ace_text-input",s.isTouchPad&&n.setAttribute("x-palm-disable-auto-cap",!0),n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",t.insertBefore(n,t.firstChild);var u=!1,d=!1,p=!1,g=!1,f="",m=!0;try{var y=document.activeElement===n}catch(R){}i.addListener(n,"blur",(function(t){e.onBlur(t),y=!1})),i.addListener(n,"focus",(function(t){y=!0,e.onFocus(t),C()})),this.focus=function(){if(f)return n.focus();n.style.position="fixed",n.focus()},this.blur=function(){n.blur()},this.isFocused=function(){return y};var v=o.delayedCall((function(){y&&C(m)})),b=o.delayedCall((function(){g||(n.value="\n aaaa a\n",y&&C())}));function C(t){if(!g){if(g=!0,_)e=0,i=t?0:n.value.length-1;else var e=4,i=5;try{n.setSelectionRange(e,i)}catch(R){}g=!1}}function w(){g||(n.value="\n aaaa a\n",s.isWebKit&&b.schedule())}s.isWebKit||e.addEventListener("changeSelection",(function(){e.selection.isEmpty()!=m&&(m=!m,v.schedule())})),w(),y&&e.onFocus();var _=null;this.setInputHandler=function(t){_=t},this.getInputHandler=function(){return _};var A=!1,x=function(t){4===n.selectionStart&&5===n.selectionEnd||(_&&(t=_(t),_=null),p?(C(),t&&e.onPaste(t),p=!1):t=="\n aaaa a\n".substr(0)&&4===n.selectionStart?e.execCommand(A?"del":"backspace",{source:"ace"}):u||("\n aaaa a\n"==t.substring(0,9)&&t.length>"\n aaaa a\n".length?t=t.substr(9):t.substr(0,4)=="\n aaaa a\n".substr(0,4)?t=t.substr(4,t.length-"\n aaaa a\n".length+1):t.charAt(t.length-1)=="\n aaaa a\n".charAt(0)&&(t=t.slice(0,-1)),t=="\n aaaa a\n".charAt(0)||t.charAt(t.length-1)=="\n aaaa a\n".charAt(0)&&(t=t.slice(0,-1)),t&&e.onTextInput(t)),u&&(u=!1),A&&(A=!1))},E=function(t){g||(x(n.value),w())},k=function(t,e,n){var i=t.clipboardData||window.clipboardData;if(i&&!c){var s=h||n?"Text":"text/plain";try{return e?!1!==i.setData(s,e):i.getData(s)}catch(t){if(!n)return k(t,e,!0)}}},S=function(t,r){var o=e.getCopyText();if(!o)return i.preventDefault(t);k(t,o)?(s.isIOS&&(d=r,n.value="\n aa"+o+"a a\n",n.setSelectionRange(4,4+o.length),u={value:o}),r?e.onCut():e.onCopy(),s.isIOS||i.preventDefault(t)):(u=!0,n.value=o,n.select(),setTimeout((function(){u=!1,w(),C(),r?e.onCut():e.onCopy()})))};i.addCommandKeyListener(n,e.onCommandKey.bind(e)),i.addListener(n,"select",(function(t){!function(t){return 0===t.selectionStart&&t.selectionEnd===t.value.length}(n)?_&&C(e.selection.isEmpty()):(e.selectAll(),C())})),i.addListener(n,"input",E),i.addListener(n,"cut",(function(t){S(t,!0)})),i.addListener(n,"copy",(function(t){S(t,!1)})),i.addListener(n,"paste",(function(t){var r=k(t);"string"==typeof r?(r&&e.onPaste(r,t),s.isIE&&setTimeout(C),i.preventDefault(t)):(n.value="",p=!0)}));var F,O=function(){if(g&&e.onCompositionUpdate&&!e.$readOnly){var t=n.value.replace(/\x01/g,"");if(g.lastValue!==t&&(e.onCompositionUpdate(t),g.lastValue&&e.undo(),g.canUndo&&(g.lastValue=t),g.lastValue)){var i=e.selection.getRange();e.insert(g.lastValue),e.session.markUndoGroup(),g.range=e.selection.getRange(),e.selection.setRange(i),e.selection.clearSelection()}}},M=function(t){if(e.onCompositionEnd&&!e.$readOnly){var i=g;g=!1;var r=setTimeout((function(){r=null;var t=n.value.replace(/\x01/g,"");g||(t==i.lastValue?w():!i.lastValue&&t&&(w(),x(t)))}));_=function(t){return r&&clearTimeout(r),(t=t.replace(/\x01/g,""))==i.lastValue?"":(i.lastValue&&r&&e.undo(),t)},e.onCompositionEnd(),e.removeListener("mousedown",M),"compositionend"==t.type&&i.range&&e.selection.setRange(i.range),(s.isChrome&&s.isChrome>=53||s.isWebKit&&s.isWebKit>=603)&&E()}},D=o.delayedCall(O,50);function P(){clearTimeout(F),F=setTimeout((function(){f&&(n.style.cssText=f,f=""),null==e.renderer.$keepTextAreaAtCursor&&(e.renderer.$keepTextAreaAtCursor=!0,e.renderer.$moveTextAreaToCursor())}),0)}i.addListener(n,"compositionstart",(function(t){g||!e.onCompositionStart||e.$readOnly||((g={}).canUndo=e.session.$undoManager,e.onCompositionStart(),setTimeout(O,0),e.on("mousedown",M),g.canUndo&&!e.selection.isEmpty()&&(e.insert(""),e.session.markUndoGroup(),e.selection.clearSelection()),e.session.markUndoGroup())})),s.isGecko?i.addListener(n,"text",(function(){D.schedule()})):(i.addListener(n,"keyup",(function(){D.schedule()})),i.addListener(n,"keydown",(function(){D.schedule()}))),i.addListener(n,"compositionend",M),this.getElement=function(){return n},this.setReadOnly=function(t){n.readOnly=t},this.onContextMenu=function(t){A=!0,C(e.selection.isEmpty()),e._emit("nativecontextmenu",{target:e,domEvent:t}),this.moveToMouse(t,!0)},this.moveToMouse=function(t,o){f||(f=n.style.cssText),n.style.cssText=(o?"z-index:100000;":"")+"height:"+n.style.height+";"+(s.isIE?"opacity:0.1;":"");var a=e.container.getBoundingClientRect(),l=r.computedStyle(e.container),c=a.top+(parseInt(l.borderTopWidth)||0),h=a.left+(parseInt(a.borderLeftWidth)||0),u=a.bottom-c-n.clientHeight-2,d=function(t){n.style.left=t.clientX-h-2+"px",n.style.top=Math.min(t.clientY-c-2,u)+"px"};d(t),"mousedown"==t.type&&(e.renderer.$keepTextAreaAtCursor&&(e.renderer.$keepTextAreaAtCursor=null),clearTimeout(F),s.isWin&&i.capture(e.container,d,P))},this.onContextMenuClose=P;var T=function(t){e.textInput.onContextMenu(t),P()};if(i.addListener(n,"mouseup",T),i.addListener(n,"mousedown",(function(t){t.preventDefault(),P()})),i.addListener(e.renderer.scroller,"contextmenu",T),i.addListener(n,"contextmenu",T),s.isIOS){var $=null,L=!1;t.addEventListener("keydown",(function(t){$&&clearTimeout($),L=!0})),t.addEventListener("keyup",(function(t){$=setTimeout((function(){L=!1}),100)}));var B=function(t){if(document.activeElement===n&&!L){if(d)return setTimeout((function(){d=!1}),100);var i=n.selectionStart,s=n.selectionEnd;if(n.setSelectionRange(4,5),i==s)switch(i){case 0:e.onCommandKey(null,0,a.up);break;case 1:e.onCommandKey(null,0,a.home);break;case 2:e.onCommandKey(null,l.option,a.left);break;case 4:e.onCommandKey(null,0,a.left);break;case 5:e.onCommandKey(null,0,a.right);break;case 7:e.onCommandKey(null,l.option,a.right);break;case 8:e.onCommandKey(null,0,a.end);break;case 9:e.onCommandKey(null,0,a.down)}else{switch(s){case 6:e.onCommandKey(null,l.shift,a.right);break;case 7:e.onCommandKey(null,l.shift|l.option,a.right);break;case 8:e.onCommandKey(null,l.shift,a.end);break;case 9:e.onCommandKey(null,l.shift,a.down)}switch(i){case 0:e.onCommandKey(null,l.shift,a.up);break;case 1:e.onCommandKey(null,l.shift,a.home);break;case 2:e.onCommandKey(null,l.shift|l.option,a.left);break;case 3:e.onCommandKey(null,l.shift,a.left)}}}};document.addEventListener("selectionchange",B),e.on("destroy",(function(){document.removeEventListener("selectionchange",B)}))}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/keyboard/textinput_ios"],(function(t,e,n){"use strict";var i=t("../lib/event"),s=t("../lib/useragent"),r=t("../lib/dom"),o=t("../lib/lang"),a=s.isChrome<18,l=s.isIE,c=t("./textinput_ios").TextInput;e.TextInput=function(t,e){if(s.isIOS)return c.call(this,t,e);var n=r.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",t.insertBefore(n,t.firstChild);var h=!1,u=!1,d=!1,p="",g=!0;try{var f=document.activeElement===n}catch(L){}i.addListener(n,"blur",(function(t){e.onBlur(t),f=!1})),i.addListener(n,"focus",(function(t){f=!0,e.onFocus(t),v()})),this.focus=function(){if(p)return n.focus();var t=n.style.top;n.style.position="fixed",n.style.top="0px",n.focus(),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=t)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return f};var m=o.delayedCall((function(){f&&v(g)})),y=o.delayedCall((function(){d||(n.value="\u2028\u2028",f&&v())}));function v(t){if(!d){if(d=!0,C)var e=0,i=t?0:n.value.length-1;else e=t?2:1,i=2;try{n.setSelectionRange(e,i)}catch(L){}d=!1}}function b(){d||(n.value="\u2028\u2028",s.isWebKit&&y.schedule())}s.isWebKit||e.addEventListener("changeSelection",(function(){e.selection.isEmpty()!=g&&(g=!g,m.schedule())})),b(),f&&e.onFocus();var C=null;this.setInputHandler=function(t){C=t},this.getInputHandler=function(){return C};var w=!1,_=function(t){C&&(t=C(t),C=null),u?(v(),t&&e.onPaste(t),u=!1):t=="\u2028\u2028".charAt(0)?e.execCommand(w?"del":"backspace",{source:"ace"}):("\u2028\u2028"==t.substring(0,2)?t=t.substr(2):t.charAt(0)=="\u2028\u2028".charAt(0)?t=t.substr(1):t.charAt(t.length-1)=="\u2028\u2028".charAt(0)&&(t=t.slice(0,-1)),t.charAt(t.length-1)=="\u2028\u2028".charAt(0)&&(t=t.slice(0,-1)),t&&e.onTextInput(t)),w&&(w=!1)},A=function(t){d||(_(n.value),b())},x=function(t,e,n){var i=t.clipboardData||window.clipboardData;if(i&&!a){var s=l||n?"Text":"text/plain";try{return e?!1!==i.setData(s,e):i.getData(s)}catch(t){if(!n)return x(t,e,!0)}}},E=function(t,s){var r=e.getCopyText();if(!r)return i.preventDefault(t);x(t,r)?(s?e.onCut():e.onCopy(),i.preventDefault(t)):(h=!0,n.value=r,n.select(),setTimeout((function(){h=!1,b(),v(),s?e.onCut():e.onCopy()})))},k=function(t){E(t,!0)},S=function(t){E(t,!1)},F=function(t){var r=x(t);"string"==typeof r?(r&&e.onPaste(r,t),s.isIE&&setTimeout(v),i.preventDefault(t)):(n.value="",u=!0)};i.addCommandKeyListener(n,e.onCommandKey.bind(e)),i.addListener(n,"select",(function(t){h?h=!1:function(t){return 0===t.selectionStart&&t.selectionEnd===t.value.length}(n)?(e.selectAll(),v()):C&&v(e.selection.isEmpty())})),i.addListener(n,"input",A),i.addListener(n,"cut",k),i.addListener(n,"copy",S),i.addListener(n,"paste",F),"oncut"in n&&"oncopy"in n&&"onpaste"in n||i.addListener(t,"keydown",(function(t){if((!s.isMac||t.metaKey)&&t.ctrlKey)switch(t.keyCode){case 67:S(t);break;case 86:F(t);break;case 88:k(t)}}));var O,M=function(){if(d&&e.onCompositionUpdate&&!e.$readOnly){var t=n.value.replace(/\u2028/g,"");if(d.lastValue!==t&&(e.onCompositionUpdate(t),d.lastValue&&e.undo(),d.canUndo&&(d.lastValue=t),d.lastValue)){var i=e.selection.getRange();e.insert(d.lastValue),e.session.markUndoGroup(),d.range=e.selection.getRange(),e.selection.setRange(i),e.selection.clearSelection()}}},D=function(t){if(e.onCompositionEnd&&!e.$readOnly){var i=d;d=!1;var r=setTimeout((function(){r=null;var t=n.value.replace(/\u2028/g,"");d||(t==i.lastValue?b():!i.lastValue&&t&&(b(),_(t)))}));C=function(t){return r&&clearTimeout(r),(t=t.replace(/\u2028/g,""))==i.lastValue?"":(i.lastValue&&r&&e.undo(),t)},e.onCompositionEnd(),e.removeListener("mousedown",D),"compositionend"==t.type&&i.range&&e.selection.setRange(i.range),(s.isChrome&&s.isChrome>=53||s.isWebKit&&s.isWebKit>=603)&&A()}},P=o.delayedCall(M,50);function T(){clearTimeout(O),O=setTimeout((function(){p&&(n.style.cssText=p,p=""),null==e.renderer.$keepTextAreaAtCursor&&(e.renderer.$keepTextAreaAtCursor=!0,e.renderer.$moveTextAreaToCursor())}),0)}i.addListener(n,"compositionstart",(function(t){d||!e.onCompositionStart||e.$readOnly||((d={}).canUndo=e.session.$undoManager,e.onCompositionStart(),setTimeout(M,0),e.on("mousedown",D),d.canUndo&&!e.selection.isEmpty()&&(e.insert(""),e.session.markUndoGroup(),e.selection.clearSelection()),e.session.markUndoGroup())})),s.isGecko?i.addListener(n,"text",(function(){P.schedule()})):(i.addListener(n,"keyup",(function(){P.schedule()})),i.addListener(n,"keydown",(function(){P.schedule()}))),i.addListener(n,"compositionend",D),this.getElement=function(){return n},this.setReadOnly=function(t){n.readOnly=t},this.onContextMenu=function(t){w=!0,v(e.selection.isEmpty()),e._emit("nativecontextmenu",{target:e,domEvent:t}),this.moveToMouse(t,!0)},this.moveToMouse=function(t,o){p||(p=n.style.cssText),n.style.cssText=(o?"z-index:100000;":"")+"height:"+n.style.height+";"+(s.isIE?"opacity:0.1;":"");var a=e.container.getBoundingClientRect(),l=r.computedStyle(e.container),c=a.top+(parseInt(l.borderTopWidth)||0),h=a.left+(parseInt(a.borderLeftWidth)||0),u=a.bottom-c-n.clientHeight-2,d=function(t){n.style.left=t.clientX-h-2+"px",n.style.top=Math.min(t.clientY-c-2,u)+"px"};d(t),"mousedown"==t.type&&(e.renderer.$keepTextAreaAtCursor&&(e.renderer.$keepTextAreaAtCursor=null),clearTimeout(O),s.isWin&&i.capture(e.container,d,T))},this.onContextMenuClose=T;var $=function(t){e.textInput.onContextMenu(t),T()};i.addListener(n,"mouseup",$),i.addListener(n,"mousedown",(function(t){t.preventDefault(),T()})),i.addListener(e.renderer.scroller,"contextmenu",$),i.addListener(n,"contextmenu",$)}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(t,e,n){"use strict";t("../lib/dom"),t("../lib/event");var i=t("../lib/useragent");function s(t){t.$clickSelection=null;var e=t.editor;e.setDefaultHandler("mousedown",this.onMouseDown.bind(t)),e.setDefaultHandler("dblclick",this.onDoubleClick.bind(t)),e.setDefaultHandler("tripleclick",this.onTripleClick.bind(t)),e.setDefaultHandler("quadclick",this.onQuadClick.bind(t)),e.setDefaultHandler("mousewheel",this.onMouseWheel.bind(t)),e.setDefaultHandler("touchmove",this.onTouchMove.bind(t)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(e){t[e]=this[e]}),this),t.selectByLines=this.extendSelectionBy.bind(t,"getLineRange"),t.selectByWords=this.extendSelectionBy.bind(t,"getWordRange")}function r(t,e){if(t.start.row==t.end.row)var n=2*e.column-t.start.column-t.end.column;else n=t.start.row!=t.end.row-1||t.start.column||t.end.column?2*e.row-t.start.row-t.end.row:e.column-4;return n<0?{cursor:t.start,anchor:t.end}:{cursor:t.end,anchor:t.start}}(function(){this.onMouseDown=function(t){var e=t.inSelection(),n=t.getDocumentPosition();this.mousedownEvent=t;var s=this.editor,r=t.getButton();if(0!==r){var o=s.getSelectionRange().isEmpty();return s.$blockScrolling++,(o||1==r)&&s.selection.moveToPosition(n),s.$blockScrolling--,void(2==r&&(s.textInput.onContextMenu(t.domEvent),i.isMozilla||t.preventDefault()))}return this.mousedownEvent.time=Date.now(),!e||s.isFocused()||(s.focus(),!this.$focusTimout||this.$clickSelection||s.inMultiSelectMode)?(this.captureMouse(t),this.startSelect(n,t.domEvent._clicks>1),t.preventDefault()):(this.setState("focusWait"),void this.captureMouse(t))},this.startSelect=function(t,e){t=t||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;n.$blockScrolling++,this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(t):e||n.selection.moveToPosition(t),e||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"),n.$blockScrolling--},this.select=function(){var t,e=this.editor,n=e.renderer.screenToTextCoordinates(this.x,this.y);if(e.$blockScrolling++,this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)t=this.$clickSelection.end;else if(1==i)t=this.$clickSelection.start;else{var s=r(this.$clickSelection,n);n=s.cursor,t=s.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(n),e.$blockScrolling--,e.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(t){var e,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),s=n.selection[t](i.row,i.column);if(n.$blockScrolling++,this.$clickSelection){var o=this.$clickSelection.comparePoint(s.start),a=this.$clickSelection.comparePoint(s.end);if(-1==o&&a<=0)e=this.$clickSelection.end,s.end.row==i.row&&s.end.column==i.column||(i=s.start);else if(1==a&&o>=0)e=this.$clickSelection.start,s.start.row==i.row&&s.start.column==i.column||(i=s.end);else if(-1==o&&1==a)i=s.end,e=s.start;else{var l=r(this.$clickSelection,i);i=l.cursor,e=l.anchor}n.selection.setSelectionAnchor(e.row,e.column)}n.selection.selectToPosition(i),n.$blockScrolling--,n.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 t,e,n=(t=this.mousedownEvent.y,e=this.y,Math.sqrt(Math.pow(this.x-this.mousedownEvent.x,2)+Math.pow(e-t,2))),i=Date.now();(n>0||i-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(t){var e=t.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(e);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(e.row,e.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(t){var e=t.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(e.row,e.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(e.row),this.select()},this.onQuadClick=function(t){var e=this.editor;e.selectAll(),this.$clickSelection=e.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(t){if(!t.getAccelKey()){t.getShiftKey()&&t.wheelY&&!t.wheelX&&(t.wheelX=t.wheelY,t.wheelY=0);var e=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=t.domEvent.timeStamp,s=i-n.t,r=t.wheelX/s,o=t.wheelY/s;s<250&&(r=(r+n.vx)/2,o=(o+n.vy)/2);var a=Math.abs(r/o),l=!1;return a>=1&&e.renderer.isScrollableBy(t.wheelX*t.speed,0)&&(l=!0),a<=1&&e.renderer.isScrollableBy(0,t.wheelY*t.speed)&&(l=!0),l?n.allowed=i:i-n.allowed<250&&(Math.abs(r)<=1.1*Math.abs(n.vx)&&Math.abs(o)<=1.1*Math.abs(n.vy)?(l=!0,n.allowed=i):n.allowed=0),n.t=i,n.vx=r,n.vy=o,l?(e.renderer.scrollBy(t.wheelX*t.speed,t.wheelY*t.speed),t.stop()):void 0}},this.onTouchMove=function(t){this.editor._emit("mousewheel",t)}}).call(s.prototype),e.DefaultHandlers=s})),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],(function(t,e,n){"use strict";t("./lib/oop");var i=t("./lib/dom");function s(t){this.isOpen=!1,this.$element=null,this.$parentNode=t}(function(){this.$init=function(){return this.$element=i.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(t){i.setInnerText(this.getElement(),t)},this.setHtml=function(t){this.getElement().innerHTML=t},this.setPosition=function(t,e){this.getElement().style.left=t+"px",this.getElement().style.top=e+"px"},this.setClassName=function(t){i.addCssClass(this.getElement(),t)},this.show=function(t,e,n){null!=t&&this.setText(t),null!=e&&null!=n&&this.setPosition(e,n),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(s.prototype),e.Tooltip=s})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],(function(t,e,n){"use strict";var i=t("../lib/dom"),s=t("../lib/oop"),r=t("../lib/event"),o=t("../tooltip").Tooltip;function a(t){o.call(this,t)}s.inherits(a,o),(function(){this.setPosition=function(t,e){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,s=this.getWidth(),r=this.getHeight();(t+=15)+s>n&&(t-=t+s-n),(e+=15)+r>i&&(e-=20+r),o.prototype.setPosition.call(this,t,e)}}).call(a.prototype),e.GutterHandler=function(t){var e,n,s,o=t.editor,l=o.renderer.$gutterLayer,c=new a(o.container);function h(){e&&(e=clearTimeout(e)),s&&(c.hide(),s=null,o._signal("hideGutterTooltip",c),o.removeEventListener("mousewheel",h))}function u(t){c.setPosition(t.x,t.y)}t.editor.setDefaultHandler("guttermousedown",(function(e){if(o.isFocused()&&0==e.getButton()&&"foldWidgets"!=l.getRegion(e)){var n=e.getDocumentPosition().row,i=o.session.selection;if(e.getShiftKey())i.selectTo(n,0);else{if(2==e.domEvent.detail)return o.selectAll(),e.preventDefault();t.$clickSelection=o.selection.getLineRange(n)}return t.setState("selectByLines"),t.captureMouse(e),e.preventDefault()}})),t.editor.setDefaultHandler("guttermousemove",(function(r){if(i.hasCssClass(r.domEvent.target||r.domEvent.srcElement,"ace_fold-widget"))return h();s&&t.$tooltipFollowsMouse&&u(r),n=r,e||(e=setTimeout((function(){e=null,n&&!t.isMousePressed?function(){var e=n.getDocumentPosition().row,i=l.$annotations[e];if(!i)return h();if(e==o.session.getLength()){var r=o.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(r>o.session.documentToScreenRow(a.row,a.column))return h()}if(s!=i)if(s=i.text.join("<br/>"),c.setHtml(s),c.show(),o._signal("showGutterTooltip",c),o.on("mousewheel",h),t.$tooltipFollowsMouse)u(n);else{var d=n.domEvent.target.getBoundingClientRect(),p=c.getElement().style;p.left=d.right+"px",p.top=d.bottom+"px"}}():h()}),50))})),r.addListener(o.renderer.$gutter,"mouseout",(function(t){n=null,s&&!e&&(e=setTimeout((function(){e=null,h()}),50))})),o.on("changeSession",h)}})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(t,e,n){"use strict";var i=t("../lib/event"),s=t("../lib/useragent"),r=e.MouseEvent=function(t,e){this.domEvent=t,this.editor=e,this.x=this.clientX=t.clientX,this.y=this.clientY=t.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){i.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 t=this.editor.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var e=this.getDocumentPosition();this.$inSelection=t.contains(e.row,e.column)}return this.$inSelection},this.getButton=function(){return i.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(r.prototype)})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(t,e,n){"use strict";var i=t("../lib/dom"),s=t("../lib/event"),r=t("../lib/useragent");function o(t){var e=t.editor,n=i.createElement("img");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",r.isOpera&&(n.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"),["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(e){t[e]=this[e]}),this),e.addEventListener("mousedown",this.onMouseDown.bind(t));var o,l,c,h,u,d,p,g,f,m,y,v=e.container,b=0;function C(){var t=d;(function(t,n){var i=Date.now();m&&n&&t.row==n.row&&n&&t.column==n.column?a(y.x,y.y,l,c)>5?m=null:i-m>=200&&(e.renderer.scrollCursorIntoView(),m=null):(e.$blockScrolling+=1,e.moveCursorToPosition(t),e.$blockScrolling-=1,m=i,y={x:l,y:c})})(d=e.renderer.screenToTextCoordinates(l,c),t),function(t,n){var i=Date.now(),s=e.renderer.layerConfig.lineHeight,r=e.renderer.layerConfig.characterWidth,o=e.renderer.scroller.getBoundingClientRect(),a={x:{left:l-o.left,right:o.right-l},y:{top:c-o.top,bottom:o.bottom-c}},h=Math.min(a.x.left,a.x.right),u=Math.min(a.y.top,a.y.bottom),d={row:t.row,column:t.column};h/r<=2&&(d.column+=a.x.left<a.x.right?-3:2